Closed soyjavi closed 5 years ago
Just add a for loop?
const node = bitcoin.bip32.fromBase58(xpubkey, bitcoin.networks.bitcoin);
const receiveBase = node.derive(0);
const addresses = [];
for (let i = 0; i < 100; i++) {
const { address } = bitcoin.payments.p2wpkh({
pubkey: receiveBase.derive(i).publicKey,
network: bitcoin.networks.bitcoin,
});
addresses.push(address);
}
console.log(JSON.stringify(addresses, null, 2));
Hi there, I'm developing an frontend invoicer using the xpub of my ledger nano S. My question is simple, is there a way to create a bunch of public address using the ledger's xpub?
I know how get one using
Someone can help me?