bnb-chain / javascript-sdk

Javascript SDK to communicate with BNB Beacon Chain.
Apache License 2.0
382 stars 240 forks source link

getPrivateKeyFromMnemonic will only return account 0 #128

Closed bitcoinbrisbane closed 5 years ago

bitcoinbrisbane commented 5 years ago

The function getPrivateKeyFromMnemonic https://github.com/binance-chain/javascript-sdk/blob/master/src/crypto/index.js#L279 will only ever return address_index 0, making it pretty useless.

const HDPATH = "44'/714'/0'/0/0" m / purpose' / coin_type' / account' / change / address_index

https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki

notatestuser commented 5 years ago

Thanks