1

How can I „convert“ a 12-words-long multi wallet seed phrase (of the Blockchain.com wallet) to the wallets private key and the wallets address using any programming language?

The given multi wallet seed phrase is like I mentioned above from Blockchain.com. The derivation path is (to my knowledge) m/44'/0'/n'.

Help would be very appreciated :)

1 Answer 1

1

This can be done with the bcoin library.

'use strict';

const bcoin = require('bcoin');
const m = bcoin.Mnemonic.fromPhrase('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about');
const master = bcoin.HDPrivateKey.fromMnemonic(m);
const key0 = master.derivePath("m'/44'/0'/0'/0/0");

const ring0 = new bcoin.KeyRing({privateKey: key0});
console.log('Legacy: ', ring0.getAddress('base58'));

const ring1 = new bcoin.KeyRing({privateKey: key0});
ring1.witness = true;
console.log('SegWit: ', ring1.getAddress('string'));

Output:

Legacy:  1LqBGSKuX5yYUonjxT5qGfpUsXKYYWeabA
SegWit:  bc1qmxrw6qdh5g3ztfcwm0et5l8mvws4eva24kmp8m

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.