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

Question: Is it possible for a reveal transaction to not be valid? #42

Closed maxgmer closed 1 month ago

maxgmer commented 1 month ago

Is it possible for a reveal transaction to not be valid, if the funding transaction went through (meaning the secret key is correct)? Provided the funding transaction was made from the same secret key.

cmdruid commented 1 month ago

The funding tx is committing to a locking script (that reveals the inscription in this case), but the funding tx does not validate if the locking script is constructed correctly.

So if there is something incorrect about the locking script, then the output may not be spendable, or it may not be recognized as an inscription from ord.

But if the locking script is correct (and includes a public key for spending), then the public key should be able to spend the inscription utxo and reveal it at any time.

maxgmer commented 1 month ago

@cmdruid thank you! I use the script from the examples without anything custom, so I should be good then.