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
188 stars 49 forks source link

Plz how to use tweaked P2TR address to sign? #4

Closed winktool closed 1 year ago

winktool commented 1 year ago

https://github.com/cmdruid/tapscript/blob/master/test/example/taproot/inscribe.test.ts#L76

cmdruid commented 1 year ago

You can't use a tweaked tapkey to sign for an inscription, because it requires to reveal a script with the pubkey already included. If you are doing a key-spend, there is an example located here:

https://github.com/cmdruid/tapscript/blob/master/test/example/taproot/keyspend.test.ts

toptal126 commented 1 year ago

Dear cmdruid. In unisat wallet, taproot address is displayed in tweaked form. How do i write a script to sign for an inscription using the tweaked tapkey? I don't mind revealing the script.