We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I want to generate the address from the xpub,but I don't know how to get derive path. This my codes:
const bitcoin = require('bitcoinjs-lib'); const zpub = 'zpub6r1Di2DqG9hrkk3EYQgjxVSr2QJTvtBaLswyknjwPc3eFiBipPWUE8RAhiCKDJxPiYHUpavEFueEuA4NsD82mhPMdPws6LonuuNGhDVyv4Q'; const path = "m/0/1"; const network = bitcoin.networks.bitcoin; const hdNode = bitcoin.bip32.fromBase58(zpub, network); const childNode = hdNode.derivePath(path); const address = bitcoin.payments.p2wpkh({ pubkey: childNode.publicKey, network }).address;
My purpose is to verify that an address is generated by this wallet,thx
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, I want to generate the address from the xpub,but I don't know how to get derive path.
This my codes:
My purpose is to verify that an address is generated by this wallet,thx
The text was updated successfully, but these errors were encountered: