I’m struggling to find a good example of this, but what is the proper way to construct an inscription script for a commit transaction?
Using Bitcoin Last Crate, this is a way to assume that you need to build a script using “Hello World” as an example of inscription content.
let inscription_script = Script::builder()
.push_opcode(OP_FALSE)
.push_opcode(OP_IF)
.push_slice(b"ord") // marker
.push_opcode(OP_PUSHBYTES_1) // protocol version (example)
.push_slice(b"text/plain;charset=utf-8")
.push_opcode(OP_0)
.push_slice(b"Hello World") // the payload bytes
.push_opcode(OP_ENDIF)
.into_script();
However, the ASM format of the results of this script is far out of reach of what I expected.
OP_0 OP_IF OP_PUSHBYTES_3 6f7264 OP_PUSHBYTES_1 18 OP_DEPTH OP_VERIF OP_OVER OP_DEPTH OP_PUSHBYTES_47 706c61696e3b636861727365743d7574662d38000b48656c6c6f20576f726c6468
Is there a good example of building a leaf script for commit transactions for inscriptions? I prefer to use Bitcoin Last Crate.
Discover more from Earlybirds Invest
Subscribe to get the latest posts sent to your email.