bitcoin-php icon indicating copy to clipboard operation
bitcoin-php copied to clipboard

How to get adresses of ethereum, bitcoin cash wallet from mnemonic phrase?

Open Krendel338 opened this issue 4 years ago • 2 comments

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!

Krendel338 avatar Mar 23 '20 11:03 Krendel338

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 ;)

afk11 avatar Mar 23 '20 17:03 afk11

Pretty sure this example matches electrum and a trezor wallet: https://github.com/Bit-Wasp/bitcoin-php/blob/1.0/examples/trezor.bip32.php

afk11 avatar Mar 23 '20 17:03 afk11