-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to unlock p2pkh #1052
Comments
public key from tx: output 0 on blockcypher Child must be the wrong private key? You're probably running into this line of code, which just initializes the input for that key.. https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/src/transaction_builder.js#L352 Print out the public key or address for a few of the keys once again to check if your bip32 path is correct. |
The It seems like the output for |
The problem I had was that I forgot to pass the mnemonic to the function and that took me way longer to see than it ought to. |
It happens, glad to gear you got it sorted! |
Why didn't it throw? edit: https://github.com/bitcoinjs/bip39/blob/bafbcd352a6a5275bbc640a79c3917d0baee5bc8/index.js#L50 ... oh, I'll change that. |
hmm, oh yea, that stuff :/ I never think to check the input to the normalization.. extra whitespace between two of the words can lead to similar confusion, as it's directly input to a hash function. |
@afk11 maybe it should:
I have had each of those burn me in the past, and nearly experienced fund loss in a duplicate whitespace case. |
Yea I totally agree. Pretty sure this is repeated across the ecosystem, so probably a worth while effort :P |
I'm new to using this library and constructing Bitcoin transactions in general so sorry if this is obvious.
I have been sent Bitcoin from a testnet faucet as can be seen here: txid: d9c9213136854a53211f1c80d202b743dfe971867558fd2c5628fe781a7f7ba9
Everytime I try and broadcast the transaction on blockcypher I get this error
Generating the address:
Generate transaction:
Here is the transaction hex if you are interested:
I don't see where I am going wrong but if I had to guess it has something to do with the script type (pay-to-pubkey-hash) hence the title of this issue.
The text was updated successfully, but these errors were encountered: