I have a cold storage where I installed BTC-Electrum and LTC-Electrum wallets. So I have took extended master public keys and have generating addresses in my online service. Now I want to generate addresses for Ethereum but how can I understood the electrum core doesnt give xpub. So I need to use any wallets like MetaMask or MyEtherWallet. But I can not found how can I took xpub from those wallets.Can somebody help me to solve this problem? Thanks!
Ethereum keys are similar to Bitcoin's and are part of the Hierarchical Deterministic tree structure (HD wallets). These were introduced by BIP 32 and later improved by BIP 44. An HD wallet tree is represented by derivation paths to the first address node. For example, the default for Ethereum is m/44'/60'/0'/0 or incl. the trailing /[address_index]
- 44 — BIP 44 Purpose
- 60 — Ethereum’s coin type
- 0 — Account
- 0 — Chain
- 0 — Address index
More details here .
let HDNode = require('ethers').utils.HDNode; let mnemonic = "radar blur cabbage chef fix engine embark joy scheme fiction master release"; let masterNode = HDNode.fromMnemonic(mnemonic); let standardEthereum = masterNode.derivePath("m/44'/60'/0'/0/0"); // Get the extended private key let xpriv = node.extendedKey; // Get the extended public key let xpub = node.neuter().extnededKey;