According to
you can add data to the unexecuted branch of a taproot input like so:
OP_0
OP_IF
(embedded data comes here)
OP_ENDIF
How would I go about creating such transaction using bcoin or btcwallet?
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityAccording to
you can add data to the unexecuted branch of a taproot input like so:
OP_0
OP_IF
(embedded data comes here)
OP_ENDIF
How would I go about creating such transaction using bcoin or btcwallet?
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