Drops Protocol documentation

Interactive · client-side only

Payload decoder

Paste a Drops leaf script, or a whole reveal transaction, and this page pulls it apart field by field: what each push is, which rule governs it, and whether it passes. It also decodes the two Pact body profiles.

Your input stays in your browser

This tool is one static JavaScript file with no network calls and no storage. Nothing you paste is transmitted, logged, cached or sent to any server, including the one serving this page. You can read the source, or work offline: save this page and its stylesheet and script, and it still runs.

If you paste more than a leaf, the decoder scans the input for a Drops leaf and reports where it found one. Whitespace, colons and a leading 0x are ignored.

This tool needs JavaScript. Everything it checks is written out as normative rules on the specification page, and the same cases appear with expected results on the test vectors page. Nothing here is available only through the tool.

Worked samples

Each button loads a real, self-consistent leaf. The hashes are genuine SHA-256 values and the creator key is a valid secp256k1 point, so the checks below are doing real work rather than replaying a stored answer.

A plain text artifact

Marker drops, content type text/plain, a 45-byte body. The simplest valid Drop.

A Pact Seed

Marker drops-pact, content type application/vnd.drops.pact-seed, a 184-byte record. The decoder also unpacks the Seed's eight fields.

A Pacts reference

Marker drops with the reference content type. The body is 176 bytes of strictly serialized JSON, and the decoder checks the serialization too.

A tampered body hash

The first sample with one bit changed in the hash push. Structurally perfect, cryptographically wrong, and therefore not a Drop.

What the decoder checks

CheckRule
Exactly ten chunks: five data pushes and the OP_DROP, OP_CHECKSIG sequence, with no trailing bytesD-1, D-2, D-3
Every push uses its minimal opcode, and no field is a one-byte value that Script would fold into OP_1 to OP_16 or OP_1NEGATED-4, D-15
Marker is drops or drops-pact, and bip110-op-drop is refused with an explanationD-6, D-7
Content type is ASCII, at most 80 bytes, and matches the restricted-name grammar with no parametersD-8, D-9, D-10
Hash field is 32 bytes and equals SHA-256 of the body, computed live from your inputD-12, D-13
Body is 1 to 256 bytesD-14
Creator key is 32 bytes and a real point on secp256k1, tested by evaluating the curve equationD-18, D-19
Pact Seed bodies: 184 bytes, DPSE magic, zero reserved bytes, known network and floor tags, valid engine id with zero paddingPacts 1
Pacts reference bodies: exactly four keys, sorted order, no whitespace, and a byte-exact re-serializationPacts 5

What it cannot check

A leaf script does not contain its own commitment. Two things therefore stay out of reach of any tool that is given only the leaf:

  • The Taproot commitment. Proving that this leaf is the leaf the spent output committed to needs the control block and the previous output script from the reveal transaction, plus secp256k1 point arithmetic. That check is specification section 4, and it is the one that actually makes a Drop trustworthy.
  • Confirmation. Whether the reveal is in a block, and whether that block is deep enough under the indexer's confirmation policy.

A leaf that decodes cleanly here is a well-formed candidate. It is not yet a Drop.