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

Refactor TWHDWalletGetAccountKey and switch case inside HDWallet::getNode #119

Closed
hewigovens opened this Issue Mar 10, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@hewigovens
Copy link
Member

commented Mar 10, 2019

Maybe we can have something like TWHDWalletGetKey(struct TWHDWallet *wallet, TWCoinType coin, DerivationPath path)

@alejandro-isaza

This comment has been minimized.

Copy link
Contributor

commented Mar 10, 2019

It is going to be TWHDWalletGetKey(struct TWHDWallet *wallet, TWCoinType coin) since we can deduce the derivation path form the coin.

@hewigovens

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2019

Yes, TWHDWalletGetKey(struct TWHDWallet *wallet, TWCoinType coin) should be enough.

And we have at least 3 types:

  1. BTC m/44'/0'/0'/0/0
  2. XLM m/44'/148'/0' (NANO / Nimiq)
  3. AION m/44'/425'/0'/0'/0' (Tezos)

The differences between 1/2 is level, 1/3 is hardened, we have 3 getNode methods in HDWallet, maybe we can do just a simple for loop + curve check in one HDWallet::getNode.

@hewigovens

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2019

👍,it's fixed in #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.