cmdruid / tapscript

A humble library for working with Tapscript and Bitcoin Transactions.
https://www.npmjs.com/package/@cmdcode/tapscript
Creative Commons Zero v1.0 Universal
196 stars 50 forks source link

Invalid Schnorr Siganture - Example: Basic Pay-to-Pubkey Spending #40

Closed arminherbsthofer closed 4 months ago

arminherbsthofer commented 5 months ago

Hi, when I follow the example “Basic Pay-to-Pubkey Spending” the Signature check at the end of the script returns True, however, when I submit the transaction hash to mempool.space, it tells me: non-mandatory-script-verify-flag Invalid-Schnorr-Signature.

Is the script correct? I am using testnet.

cmdruid commented 4 months ago

Hello. I apologize for missing this. The error "non-mandatory-script-verify-flag Invalid-Schnorr-Signature" has to do with the signature being invalid. It could also do with the sighash being invalid as well, or the key not being properly tweaked.

I would need to know more information. Please feel free to re-open this issue if you still need help.