Beersy

6 standards

Script encoding

The same script can be a run of bytes, a hex string, or readable assembly. Standards here pin down those forms so two tools agree on what a script says, and one defines a higher level language that compiles down to it.

Also searched as ASM, assembly, hex, compiler, decompiler, BASIC.

Filed under

6 standards, spread across 2 of the 12 topics.

Start with

BRC-14

Bitcoin Script Binary, Hex and ASM Formats

The same script can be written as raw bytes, as hexadecimal, or in a readable assembly form, and tools disagree about the details. This documents all three so software can convert between them without surprises.

Filed under Scripts

Standards about this

Script encoding is the main subject of these 4.

  • 14

    Bitcoin Script Binary, Hex and ASM Formats

    The same script can be written as raw bytes, as hexadecimal, or in a readable assembly form, and tools disagree about the details. This documents all three so software can convert between them without surprises.

  • 15

    Bitcoin Script Assembly Language

    Bitcoin's scripting instructions are numbers, which machines read easily and people do not. This defines a readable way to write them down, so a developer can inspect a script and reason about what it does.

  • 106

    Bitcoin Script ASM Format

    Every library prints Bitcoin script in a slightly different readable form, so output from one tool is not accepted by another. This fixes one form so scripts can be moved between tools and languages.

  • 173

    Bitcoin Script to and from Bitcoin BASIC — a compiler and a decompiler

    Bitcoin Script is a low-level stack machine with no names or structure, so a script of any real size is nearly impossible to read, review, or safely edit once written. Because a published covenant can never be changed after it is funded, mistakes hidden in that unreadable stack manipulation are typically found only after it is too late to fix. This gives developers a way to write covenant logic in a readable form and, just as importantly, to read back and verify a script someone else already deployed.

Standards that touch it

These are about something else, and deal with script encoding on the way.

  • 16

    Pay to Public Key Hash

    Most Bitcoin payments lock coins so that only the holder of one particular key can spend them. This documents exactly how that lock is written and later unlocked, which is the pattern behind an ordinary Bitcoin address.

  • 171

    Fixed-Width State in a Covenant's Own Locking Script

    A Bitcoin contract that needs to change some stored value on every spend has only one trustworthy place to keep that value: inside its own locking script. But Bitcoin Script can only cut a script apart at fixed byte positions, so two developers solving this independently end up with two incompatible layouts, and neither their tools nor anyone else's contracts can read the other's state. This describes a shared, self-describing way to lay out that state so any script, wallet, or third-party contract can find and read it without being told anything else about it.

Usually read alongside

Concepts that keep appearing on the same standards as this one.

Was this helpful?

Search Beersy

Search standards by number, title, author or topic