I am new in cryptocurrencies.
I am using
Bitwasp/Bitcoin-lib (https://github.com/Bit-Wasp/bitcoin-lib-php) to generate addresses for bitcoin. I am validating my outputs here. I was successful to generate
Dogecoin addresses which the BIP32 class in the library supports. iancoleman is generating
ethereum addresses too with BIP32 protocol. How can I do that? I have debuged the code and I found that there are some lines on the top of
BIP32.php file which shows the coins that this class supports.
// Bitcoin public static $bitcoin_mainnet_public = '0488b21e'; public static $bitcoin_mainnet_private = '0488ade4'; public static $bitcoin_mainnet_version = '00'; public static $bitcoin_testnet_public = '043587cf'; public static $bitcoin_testnet_private = '04358394'; public static $bitcoin_testnet_version = '6f'; // Dogecoin public static $dogecoin_mainnet_public = '02facafd'; public static $dogecoin_mainnet_private = '02fac398'; public static $dogecoin_mainnet_version = '1e'; public static $dogecoin_testnet_public = '0432a9a8'; public static $dogecoin_testnet_private = '0432a243'; public static $dogecoin_testnet_version = '71'; // Litecoin public static $litecoin_mainnet_public = '019da462'; public static $litecoin_mainnet_private = '019d9cfe'; public static $litecoin_mainnet_version = '30'; public static $litecoin_testnet_public = '0436f6e1'; public static $litecoin_testnet_private = '0436ef7d'; public static $litecoin_testnet_version = '6f';
I know these are magic bytes. What are these values for
ethereum or other coins like
Bitcoin-cash? How can I find these values?
I found that It is possible to generate ethereum address using BIP32 here. But I don't know how?