bitcoin-php
bitcoin-php copied to clipboard
How to get adresses of ethereum, bitcoin cash wallet from mnemonic phrase?
I have a phrase of 12 words. I need adresses for different wallets such as ethereum, bitcoin cash. Did not find how to do this, please help. Thanks for your time!
You should review BIP32, and BIP44. The bips are here: https://github.com/bitcoin/bips, and there's examples for bip39, bip32 here: https://github.com/Bit-Wasp/bitcoin-php/tree/1.0/examples
I suggest you generate a bip39 seed, import it to electrum (it's a hidden option when you recover from a seed) and try get your code to match the address it generates
Btw, ethereum & bitcoin cash aren't supported by this repo. There's a cash address converter in this library here: https://github.com/btccom/bitwasp-bitcoin-bch-addon/tree/master/src/Address, but for Ethereum you'll have to work it out yourself ;)
Pretty sure this example matches electrum and a trezor wallet: https://github.com/Bit-Wasp/bitcoin-php/blob/1.0/examples/trezor.bip32.php