Skip to content
New issue

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

Replace HDNode with bitcoinjs/bip32 #1047

Closed
dcousens opened this issue Apr 23, 2018 · 5 comments
Closed

Replace HDNode with bitcoinjs/bip32 #1047

dcousens opened this issue Apr 23, 2018 · 5 comments
Assignees
Milestone

Comments

@dcousens
Copy link
Contributor

dcousens commented Apr 23, 2018

.HDNode will be hard deprecated (removed), for now replaced with .bip32.

The bitcoinjs/bip32 mirrors the ECPair API, however node.keyPair does not exist.
To access the private/public key, you can use getPrivate, getPublic respectively, or whatever ECPair uses respectively.

The 2 interfaces should match.

@dcousens dcousens added this to the 4.0.0 milestone Apr 23, 2018
@dcousens dcousens self-assigned this Apr 23, 2018
@dcousens dcousens mentioned this issue Apr 23, 2018
@dcousens
Copy link
Contributor Author

See #1073

@abyuwono
Copy link

how to use bip32 Keypair for signing transaction?

@dcousens
Copy link
Contributor Author

@imediabiz no differently than using an ECPair.

@abyuwono
Copy link

abyuwono commented Jul 24, 2018

txb.sign(0, keyPair0, p2sh.redeem.output)
TypeError: Inconsistent network
at TransactionBuilder.sign (/Users/buo/node_modules/bitcoinjs-lib/src/transaction_builder.js:628:66)

@dcousens
Copy link
Contributor Author

Read the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants