bitcoinjs/bitcoinjs-lib

SIGHASH_SINGLE|SIGHASH_ANYONECANPAY finalizeInput faild

lukegao209 opened this issue · 3 comments

Hey, @junderw
I want to create a psbt with bitcoin.Transaction.SIGHASH_SINGLE|bitcoin.Transaction.SIGHASH_ANYONECANPAY

psbt.addInput(); success
psbt.signInput(0,signer) success
psbt.finalizeInput(0) faild,
Error ==>
Error: Expected property "signature" of type Buffer(Length: 64), got Buffer(Length: 65)

it seems sighashType was added to "signature"'s 65 byte, how can I fix this issue?

Are you using the latest version? I faintly remember a similar issue being fixed recently.

https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/CHANGELOG.md#611

Looks like 6.1.1 fixed it. Are you above that version?

Hey, yeah , I was using the old version. it works now. thanks