TAP on DogeBitcoin Universe

Normative specification

TAP on Doge specification

Rules for reading and writing TAP messages on Dogecoin mainnet. Rules are numbered so they can be cited. "Must" is a requirement; a message that breaks a must is not a TAP message and creates no state.

1. Scope and conformance

2. The Doginals envelope

Dogecoin has no Taproot and no segregated witness, so the Bitcoin inscription envelope does not exist here. A Doginals inscription is a sequence of push data in the signature script of the first input of a transaction, and it may continue across several transactions.

How a Doginals envelope is parsed across a chain of transactions Transaction one's first input carries push data: the literal string ord, the piece count n, the content type, then the countdown value n minus one followed by a chunk, repeating. When the pushes run out before the countdown reaches zero, parsing continues into transaction two's first input, which must begin with the next countdown value followed by its chunk. When the countdown reaches zero the inscription is complete. If the chain of transactions ends first, the result is partial and nothing is indexed. TRANSACTION 1, INPUT 0 scriptSig "ord" n = 3 content type 2 chunk ≤ 520 B 1 chunk ≤ 520 B pushes exhausted, countdown still at 0 pending so parsing continues into the next transaction TRANSACTION 2, INPUT 0 scriptSig 0 chunk ≤ 520 B first push must be exactly the next countdown value a mismatch aborts the parse entirely countdown 0: COMPLETE If the chain of transactions ends before the countdown reaches zero the result is PARTIAL. No inscription exists, no TAP message exists, and every fee already paid is spent. Only input 0 is examined An envelope placed in input 1 or later is not an inscription, no matter how well formed it is.
The Dogecoin envelope is a countdown, not a delimiter pair. This is why an interrupted reveal chain produces nothing rather than a truncated inscription.
The Bitcoin envelope is not accepted here

A Bitcoin ord envelope opens with OP_FALSE OP_IF and closes with OP_ENDIF. OP_IF is not a push opcode, so under E-2 a script containing it decodes to nothing at all. Tooling ported from Bitcoin without changing the carrier produces transactions that confirm, cost full Dogecoin fees, and inscribe nothing.

3. Payload encoding

4. Identifiers

5. Tapping

Tapping is TAP's approval step and the source of its name. An inscription is tapped by sending it, after it confirms, from the address that holds it back to that same address.

The tapping cycle An inscription is created in a reveal transaction and confirms. It then sits inert with no protocol effect. A second transaction sends it from the owning address back to the same address. Once that transaction confirms, the operation takes effect. On Dogecoin both confirmations take about one minute each. Inscribe reveal confirms ≈ 1 min Inert no protocol effect yet balances unchanged Tap send to self, same address ≈ 1 min Effect applied Two confirmations, about two minutes on Dogecoin. The same cycle is about twenty minutes on Bitcoin. Sending the inscription to any other address is a transfer, not a tap, and the operation never takes effect.
Tapping is a second on-chain transaction. Every internal operation needs it; the three external token operations do not.

6. Operations

6.1 token-deploy

{
  "p": "tap",
  "op": "token-deploy",
  "tick": "tap",
  "max": "21000000",
  "lim": "1000"
}

6.2 token-mint

{
  "p": "tap",
  "op": "token-mint",
  "tick": "tap",
  "amt": "1000"
}

6.3 token-transfer

{
  "p": "tap",
  "op": "token-transfer",
  "tick": "tap",
  "amt": "100"
}

6.4 token-send

{
  "p": "tap",
  "op": "token-send",
  "items": [
    { "tick": "tap",  "amt": "10000", "address": "DHZqJo3DUyhQsrdR3Kcs8xvfaMzPkzE5gP" },
    { "tick": "-tap", "amt": "500",   "address": "D5djC8ayTw5dixq1bKGHABLE8KPN9MrF4C" }
  ]
}

6.5 block-transferables and unblock-transferables

{ "p": "tap", "op": "block-transferables" }

6.6 token-trade

Three forms share the operation name and are distinguished by their fields.

Create, as seller

{
  "p": "tap", "op": "token-trade", "side": "0",
  "tick": "tap", "amt": "1",
  "accept": [ { "tick": "buidl", "amt": "0.1" } ],
  "valid": "5900000"
}

Cancel, as seller

{ "p": "tap", "op": "token-trade", "side": "0", "trade": "<inscription id>" }

Fill, as buyer

{
  "p": "tap", "op": "token-trade", "side": "1",
  "trade": "<inscription id>",
  "tick": "buidl", "amt": "0.1",
  "fee_rcv": "<Dogecoin address>"
}

6.7 token-auth

A token authority is a third party that signs redeem messages. Anyone may inscribe a signed redeem, and the authorised tokens move. The protocol never learns why: the authority's logic stays off chain. Signatures are secp256k1.

6.8 privilege-auth

A privilege authority gates who may mint a deployment, and records signed statements that a given file hash belongs to a given address. It is the mechanism behind whitelists, launchpads, and provenance for off-chain content.

6.9 dmt-deploy and dmt-mint

{
  "p": "tap",
  "op": "dmt-mint",
  "tick": "dogenat",
  "blk": 5000000,
  "dep": "825e287bb7dd163ed633110e31bc6abb6c80815ca68b7dd3cc71d729ecaaa3dci0"
}

7. State model

Every address holds three quantities per ticker. Two are stored and the third is derived.

The three balance quantities and the operations that move between them Total balance is split into available balance and transferable balance. A token-mint credits available balance. A token-transfer moves an amount from available into transferable and creates a live transfer inscription. Sending that inscription removes the amount from the sender's transferable balance and credits the recipient's available balance. A token-send moves directly out of available balance without creating a transfer inscription. TOTAL BALANCE = AVAILABLE + TRANSFERABLE AVAILABLE Spendable by inscribing a new transfer, or by a tapped token-send or redeem. TRANSFERABLE Parked inside live transfer inscriptions. Moves only by sending those inscriptions. token-transfer parks an amount sending the resulting inscription credits the recipient's available balance
Only available balance can be spent by a new operation. This is why a wallet showing a healthy total balance can still fail a send.

8. Activation heights

Dogecoin mainnet heights at which behaviour changes. An indexer must reproduce the old behaviour below each height.
HeightChangeSource
4,600,000First Dogecoin mainnet height at which inscriptions are indexed.ord-dogecoin, Universe decision
4,771,259Ord wallet 1.0.1 behaviour becomes required. This is also the beginning of Dogemap.Dogecoin TAP specification
5,487,639Ticker lengths widen from "3, or 5 to 32" to "1 to 32" Unicode symbols.Dogecoin TAP specification
5,497,100DMT element field numbers and the blk value must be precise. Below this height they are read with JavaScript parseInt rules.Dogecoin TAP specification

The TAP protocol follows ord wallet releases conservatively rather than adopting every release, and announces supported upgrades with a grace period so indexers can prepare. An indexer that silently tracks the newest ord release is not conforming.

9. Invalid conditions

Each of these produces no state change. Nothing partial is applied and nothing is queued for later.

Conditions under which a message creates no TAP state, and where the rule lives.
ConditionRule
The envelope is in an input other than input 0.E-1
The signature script contains a non-push opcode, including a ported OP_FALSE OP_IF envelope.E-2
The first push is not exactly ord, or the piece count is zero.E-3, E-4
A countdown value does not equal the current piece count minus one.E-6
The reveal chain ends before the countdown reaches zero.E-9
The body is not valid UTF-8 JSON, or is not a single object.P-1
p is not exactly tap, or op is not one of the eleven names.P-2, P-3
An amount is not a plain decimal string, or a ticker breaks the length rule for its height.P-5, P-7
An address is not a valid Dogecoin mainnet address.P-9, I-3
A ticker is deployed twice.D-2
A mint exceeds lim, or a transfer exceeds available balance.M-2, X-4
An internal operation is never tapped, or is sent to an address other than its own.T-1, T-2
A trade is filled after valid, or filled for a token not in accept.R-2, R-8
An authority hash has been used before, or the referenced authority is cancelled.A-3, A-7
seq is passed as a string in a hashed verification.V-4

10. Defects in the published specification text

The Dogecoin TAP specification was derived from the Bitcoin TAP document, and three Bitcoin artefacts survived the derivation. They are documented here so an implementer reading the upstream text is not misled, and so a reader can tell a documentation artefact from a protocol rule.

Check your payload

The validator implements the rules on this page, including the address checks in Q-1 and Q-2. It runs entirely in your browser.