TAPProtocol documentation

Normative specification, document version 2.0.0

TAP specification for Bitcoin mainnet

Every numbered rule below is enforced by code that Bitcoin Universe runs, or is recorded in the payload builders and protocol registry that Bitcoin Universe maintains. Where TAP defines behaviour that Bitcoin Universe does not implement, this document says so rather than restating rules it cannot check.

1. Scope and conformance

2. Carrier and transaction anatomy

3. Payload encoding

These rules define the exact content contract for a TAP token-transfer. They are a direct statement of the parser used by Bitcoin Universe's TAP indexer.

The parser reads the object itself rather than handing the text to a general JSON reader. That is deliberate: two payloads that a permissive reader would treat as equal, for instance one with a duplicate key, must not be able to produce the same transfer.

4. Tickers

5. Decimals and amounts

Worked conversions, taken from the indexer's own test suite.
Amount as writtenDecimal scaleAtomic value
1.25412500
18100000000
080
000
010rejected by rule AM-4
1.0012rejected by rule AM-5

6. Operations

Per operation field requirements. Rows shaded gold are authority bearing. Required fields are listed first, optional fields in brackets.
Operation Fields Authority Indexed by Bitcoin Universe
token-deploy p, op, tick, max, lim [prv, dec] Optional, through prv Yes, as a deployment
token-mint p, op, tick, amt [prv, dta] Optional, set by the deployment Yes, as a mint
token-transfer p, op, tick, amt [dta] None Yes, as a transfer
token-send p, op, items, where each item carries tick, amt, address Required No
dmt-deploy p, op, tick, elem, prv, dt [id, prj] Required Recorded, not normalised
dmt-mint p, op, tick, plus the deployment block reference None Recorded, not normalised
token-deployOrdinary unless it names an authority

Creates a ticker. max is the supply cap and lim is the maximum amount a single mint may claim. Both are amount strings under section 5.

When prv is present it holds the inscription id of a privilege authority inscription. From that point the ticker has an authority, and privileged operations on it must be authorised by that authority. A deployment with no prv has no authority and no privileged operations.

{ "p": "tap","op": "token-deploy","tick": "example","max": "21000000","lim": "1000","prv" : "<authority inscription id>"}

Ticker rules TK-1 to TK-5 apply. Bitcoin Universe's inscribe surface additionally applies rule TK-7 and requires max and lim to be greater than zero.

token-mintOrdinary unless the deployment named an authority

Mints amt of tick to the address that receives the inscription, subject to the deployment's lim and remaining supply.

When the deployment named an authority, the mint body is produced by that authority rather than by the minter, and carries a prv object that includes the authority's salt. This is how a project keeps control of who may mint and on what terms while the mint stays a normal inscription.

token-transferOrdinary

Step one of the two step transfer. Inscribing it moves amt out of the inscriber's available balance and into a transferable balance bound to the new inscription. Sending that inscription to another address completes the transfer.

This is the only operation whose content contract is stated at byte level, in section 3. It is also the only TAP operation that Bitcoin Universe's marketplace authority will accept as proof of a listable position.

{"p":"tap","op":"token-transfer","tick":"example","amt":"1.25","dta":"optional free data"}
token-sendAuthority required

A single payload that moves balances for a list of items, each naming a ticker, an amount and a destination address. It is the operation that makes TAP different in kind from a plain inscribed token: one authorised payload can settle many movements without one transfer inscription per movement.

{"p":"tap","op":"token-send","items":[{"tick":"example","amt":"100","address":"<destination>"}]}

Bitcoin Universe's Bitcoin TAP indexer does not index token-send. The operation appears in the organisation's code only as an unsigned draft payload on the Dogecoin variant of TAP. Treat the field list above as the shape observed in that code, not as a complete authorisation contract, and use the upstream Trac documentation for the signing rules.

dmt-deployAuthority required

A Digital Matter Theory deployment carried on the tap tag. elem names the element, dt the data type and prv the privilege authority inscription. id and prj are optional identifiers.

{ "p": "tap","op": "dmt-deploy","tick": "dmt-example","elem": "<element>","prv" : "<authority inscription id>", "dt" : "<type>"}
dmt-mintOrdinary

A Digital Matter Theory mint, recognised by the deployment block it references. Bitcoin Universe indexes DMT with a separate service. Its TAP indexer records these rows as consumed source offsets so that nothing is silently skipped, and does not normalise them into TAP assets or events.

7. Authority model

Delegated authority is TAP's distinguishing idea, and it is worth being precise about what it does and does not give you.

How a deployment binds an authority, and what that authority can then authorise A privilege authority inscription is created first and holds a public key. A deployment then names that inscription in its prv field, which binds the ticker to the authority. From that point the authority can sign operation bodies, and an indexer treats a privileged operation as effective only when the signature traces back to the bound authority. An ordinary transfer bypasses the authority entirely and depends only on the holder's own balance and the location of the transfer inscription. 1. Authority inscription holds the authority public key inscribed once, referenced forever 2. Deployment prv: <inscription id> binds the ticker to that authority 3. Authorised body signed by the authority, carries a salt so it is single use Indexer decision effective only if the signature traces to the bound authority Ordinary transfer, for contrast no authority consulted, only the holder's balance and the inscription's location The authority never holds anyone's balance and cannot move it. It authorises operations that the deployment already gave it the right to authorise.
The authority is named once, at deployment. Everything after that is a question of whether a given operation body traces back to it.

What an authority is worth trusting with. Naming an authority is a decision to trust a key with whatever privileged operations the protocol allows for that ticker, for as long as the ticker exists. Before holding a token whose deployment carries prv, look at what that authority can do, and remember that the ordinary transfer path in rule AU-6 is the part nobody else controls.

8. State model and transitions

Every TAP indexer keeps three things per ticker: the deployment terms, a balance per address, and the set of live transfer inscriptions with the amount each one carries.

9. Invalidity conditions

A payload is not a TAP operation when any of the following holds. This list is the practical reject set an implementation should test against; the test vectors page gives a worked case for each group.

GroupConditionRule
EncodingByte order mark presentEN-2
EncodingNot valid UTF-8EN-3
EncodingNot a single JSON object, or the object is emptyEN-4, EN-5
EncodingA value is a number, boolean, null, array or objectEN-6
EncodingA key repeatsEN-7
EncodingAn unknown key is presentEN-8
EncodingA required key is missingEN-9
EncodingUnescaped control character inside a stringEN-10
EncodingTrailing comma, or data after the closing braceEN-11, EN-12
Identityp is not tap, or op does not match the contract being appliedEN-13
Identitydta longer than 512 UTF-8 bytesEN-14
TickerEmpty, over 32 UTF-16 code units, or over 128 UTF-8 bytesTK-2, TK-3
TickerNot already in NFC lower case form, in transfer contentTK-4
TickerContains a Unicode control, format or separator characterTK-5
AmountNot a string, or carries surrounding whitespaceAM-3
AmountLeading zero, sign, exponent or separatorAM-4
AmountMore fractional digits than the decimal scaleAM-5
AmountAtomic value longer than 78 digitsAM-7
DeploymentDeclared decimal scale outside 0 to 18AM-2
StateTransfer amount above the available balanceST-4
StateReuse of a consumed transfer inscriptionST-6
AuthorityAuthority bearing operation with no valid authorisationAU-4

10. Bitcoin Universe indexing decisions

These are choices made by Bitcoin Universe's indexer. They are not properties of TAP, and another conforming indexer may reasonably differ.

Continue to the reference for confirmation, mempool and reorg semantics in full, or to the test vectors for payloads you can run against your own implementation.