Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nano contract wallet integration #580

Closed
wants to merge 1 commit into from

Conversation

pedroferreira1
Copy link
Member

Acceptance Criteria

  • Include here all things that this PR should solve

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@pedroferreira1 pedroferreira1 force-pushed the feat/nano-wallet-integration branch from 3d76e3e to 5178399 Compare October 13, 2023 08:36
@alexruzenhack
Copy link
Contributor

@pedroferreira1, I'm landing the @r4mmer suggestion commented in my PR here just to give it the right context. We can also create an issue for it.

Unrelated to this PR, but I checked the getHDPrivateKeyFromAddress method and it could use the storage method (getMainXPrivKey) to get the main private key instead of manually decrypting the key.

@pedroferreira1 pedroferreira1 force-pushed the feat/nano-wallet-integration branch from e519061 to 8bbfa3b Compare November 30, 2023 22:00
@pedroferreira1 pedroferreira1 self-assigned this Dec 1, 2023
@pedroferreira1 pedroferreira1 force-pushed the feat/nano-wallet-integration branch from 50dfe66 to 70c866c Compare December 27, 2023 18:46
@pedroferreira1 pedroferreira1 force-pushed the feat/nano-wallet-integration branch from db44fe9 to e840b86 Compare January 19, 2024 13:34
feat: add nano APIs to get state and history

feat: add nano contract class and serialization class

feat: add methods to fully integrate bet blueprint with the wallet class

tests: integration tests should run only after the hathor core docker image supports nano

tests: add comments about skipped integration test

docs: add docstring to utils methods

docs: add docstring to nc builder methods

refactor: reuse code through nano contract methods and create error class to throw specific errors

docs: improve new methods documentation

refactor: create a class for the bet blueprint with each method implementation and a generic method for the wallet class

feat: add new nano API fields for state and history

feat: create nano contract builder to improve integration

fix: should check args types only if there are args

tests: update integration tests for bet with new APIs parameters and NC builder

feat: add support for custom token in actions

chore: remove unused import

fix: call getHDPrivateKeyFromAddress with options as second param (#592)

This function extracts the pin from options or get the default value
from the wallet.

The current implementation causes an error in the wallet-mobile because
the wallet doesn't have a default pin.

feat: add get blueprint information api

feat: add nano contract to the tx version

feat: add nano contract parser and deserializer

refactor: remove argument types in the builder and improve actions typing

feat: add error handling to nano contract tx parse

refactor: getOracleInputData now receives oracle data as buffer

refactor: execute nc method now checkes the argument types of each parameter validating with the full node blueprint API

tests: adapt integration tests for new nano method parameters

feat: add support for parsing str and signed data

fix: fix bytes handling for signed fields

docs: add docstring to nano utils methods and add its methods to the lib.ts file

tests: refactor in test to use new method name and nano serializer in the result
@pedroferreira1 pedroferreira1 force-pushed the feat/nano-wallet-integration branch from e840b86 to 54b250c Compare January 19, 2024 13:45
@pedroferreira1
Copy link
Member Author

Closing because this PR was divided into 4:
#604
#603
#606
#605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants