js-algorand-sdk icon indicating copy to clipboard operation
js-algorand-sdk copied to clipboard

HD wallet

Open magmel48 opened this issue 3 years ago • 4 comments

Hi,

is there any way to create hierarchical deterministic wallet generation schema? Like described here: https://en.bitcoinwiki.org/wiki/Deterministic_wallet.

Some master public key can be used to generate new addresses to accept money using derivation and master private key can be stored on some cold storage to avoid data leaks.

There is HD features implemented for:

  • ETH (https://github.com/ethereumjs/ethereumjs-wallet#hd-wallet-api)
  • BTC (https://github.com/bitcoinjs/bitcoinjs-lib/issues/1454#issuecomment-631115171)

magmel48 avatar Mar 18 '21 22:03 magmel48

@jasonpaulos

magmel48 avatar Mar 26 '21 13:03 magmel48

Hi @magmel48, currently the only implementations of hierarchical deterministic wallet generation for Algorand that I know of are in our ledger app and in KMD, a command-line tool used by goal (section from docs which reference hierarchical generation: https://developer.algorand.org/docs/features/accounts/#wallets).

As far as I am aware, no one has created SDK-level tools for this, but it does seem like a good suggestion.

jasonpaulos avatar Mar 26 '21 14:03 jasonpaulos

Hey gang, our team actually made one not too long ago if you want to take a look: https://github.com/yieldly-finance/yieldly-deterministic-account-generator

AronTurner avatar Dec 04 '21 14:12 AronTurner

Public key derivations (from xpub to pub) is not possible for ed25519 curve to my knowledge, which is the one Algorand uses. It is stated in SLIP-0010 standard.

Anyway, I came across this issue while I was investigating the same topic. I need to integrate Algorand coin, and need deterministic key derivation.

I started an Algorand HDWallet implementation trial recently, following slip-0010 / bip-32. If someone have a look, please give me your feedbacks and comments. Cheers!

Also implemented the non-hd solution provided by Yieldly in the same repo. (Thank you for that @AronTurner )

The work is still in progress.

polarbit avatar Feb 15 '22 21:02 polarbit

I'm going to close this for the following reasons:

  • As mentioned above there are quite a few examples of HDWallet implementations outside of this repo.
  • At this point, we're not going to provide a single wallet in our SDKs--we encourage users to create their own.

If there is any core building blocks of HD wallets that we're missing from our SDKs (that would block implementation of an HDWallet in Algorand), feel free to point those out.

Eric-Warehime avatar Apr 13 '23 17:04 Eric-Warehime