According to

Understanding how ordinals work with the Bitcoin blockchain. What is exactly stored on the blockchain?

you can add data to the unexecuted branch of a taproot input like so:

(embedded data comes here)

How would I go about creating such transaction using bcoin or btcwallet?

1 Answer 1


You can create any kind of script spend with bcoin but for taproot you will need to use the taproot branch which has not yet been sufficiently reviewed or released. You can follow along with this test to learn how to add a script to a taproot tree, derive the address, send BTC to it and then spend it, revealing the witness

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.