Client-side tool
Protostone encoder and decoder
Build the exact script hex for an alkanes edict, or take a script hex apart field by field and see what an indexer would actually do with it. The encoding rules follow alkanes-rs 2.2.1-rc.4, protocol tag 1, Bitcoin mainnet and regtest.
Privacy
Everything happens in your browser. This page makes no network requests, stores nothing, and logs nothing. You can read protostone.js and confirm that for yourself, or save the page and run it offline.
The interactive encoder and decoder load with JavaScript. Without it, use the worked examples on the encoding page and the test vectors.
Encode a transfer
Produces a single-edict protostone: the payload for moving one alkane to one output.
Decode a script
Paste the full scriptPubKey hex of an OP_RETURN output.
Try one
What the decoder checks
- That the script starts
6a 5d, and says plainly what it means if it does not. - That every byte after the magic is a data push, concatenating pushes the way the reference decoder does.
- LEB128 decoding of the runestone payload, with the same 18-byte varint limit.
- Which Runes-layer tags are present, including the tag 22 pointer.
- Reassembly of the tag 16383 chunks into the protostone byte stream, 15 bytes per value.
- Every protostone record: protocol tag, declared length, and each recognised field with its meaning.
- Edicts, with the delta decoding undone so you see real ids, and the sets-of-four failure surfaced explicitly even though alkanes-rs swallows it.
- Message calldata parsed as a cellpack, with the target block explained and the opcode identified.
What it does not do
- It does not build transactions, sign anything, or touch a wallet.
- It does not know your transaction's outputs, so it cannot tell you whether an output index is in range. It flags obviously impossible values only.
- It does not execute contracts. Use the
simulateview functions for that. - It encodes single-edict transfers. Multi-edict and message protostones are documented on the encoding page and can be checked here in the decoder.