Skip to content

A permissive registry

The registry is permissive by design. It indexes token metadata as it is written, also when it breaks its standard, and reports errors found by its validation checks. It does not repair anything, guess anything, or hide anything on your behalf. Deciding what to do with a token that does not comply is left to you, the client of the API: a wallet, an explorer, a DEX, an indexer.

  • A dropped token is invisible. Its owner cannot tell why it does not show, and a client cannot decide for itself. A token whose metadata misses a description, or whose logo is a bare IPFS hash, is still a real token that people hold.
  • Clients have different needs. An explorer wants to show everything that exists. A wallet may want only tokens with the fields it needs to display. A curated list may reject tokens with any reported validation error. One rule in the registry cannot serve all of them.
  • What is written is what you get. The registry never states something that is not on chain or in the CIP-26 registry. A value that breaks a rule is kept as written and reported, not “fixed”.

Every response carries validation_errors, and metadata.valid is true exactly when there are none. To have the registry filter for you, use the validation parameter:

?validation=ReturnsSuits
ALL (default)every token, with its errorsexplorers, indexers, anything that wants to see everything
MANDATORY_ONLYonly tokens with no error in a field their standard requireswallets and apps that need a name and the required fields to show a token
STRICTonly tokens with no reported validation errorsclients that reject any reported validation error
Terminal window
curl "$REGISTRY/api/v2/subjects/$SUBJECT?validation=MANDATORY_ONLY"

A token the chosen level does not accept is a 404, or is left out of a batch. The validation level never filters the errors of a token that is returned: you see all reported validation errors, unless ?property= narrows them to the properties you asked for.

Or take everything (ALL) and decide per field yourself: each error names the field_name, whether the field is MANDATORY or OPTIONAL, and a stable code. See validation errors.

What each standard requires (an error there is MANDATORY) and what it allows (an error there is OPTIONAL):

FieldCIP-26CIP-68, label 333 (fungible)CIP-68, label 444 (rich fungible)
namemandatorymandatorymandatory
descriptionmandatorymandatoryoptional
image––mandatory, a URI (ipfs://, https://, ar://, data:)
version–mandatory, 1 to 4mandatory, 1 to 4
tickeroptionaloptionaloptional
urloptionaloptionaloptional
decimalsoptionaloptionaloptional
logooptional, base64 PNG up to 64 KiBoptional, a URI (ipfs://, https://, ar://, data:)– (the image is served as the logo)
other properties–optionaloptional

A missing or broken mandatory field is a MANDATORY error: the token is still served under ALL, and hidden by MANDATORY_ONLY and STRICT. A broken optional field is an OPTIONAL error: the token is hidden only by STRICT.

A token of a policy registered in CIP-113 needs its CIP-26 or CIP-68 metadata, its companion metadata, for the same reason: a registry node has no name, ticker or logo. Without it the token is served under ALL with a MANDATORY missing_value error on companion_metadata, and hidden by MANDATORY_ONLY and STRICT.

A CIP-68 reference NFT paired with several user tokens (a 333 and a 444) is checked against each label, and each subject is served with the errors of its own label.

The registry serves the newest metadata. If a CIP-68 token is updated with a datum that breaks the standard, the new datum is served, with its errors; the registry does not fall back to an older, valid one. Moving the reference NFT to an output without a datum is not an update: the last datum stays.

The registry answers what metadata is attached to a subject, not whether the token exists. A CIP-68 reference NFT holds the metadata of the 333 and the 444 token of the same name, and the registry serves it under both subjects, whether or not that token was minted, so the metadata of a token that was burned stays available for history. To know whether a token exists, ask the chain.

A 404 for a token that exists on chain has one of these reasons:

  1. Not indexed yet. The registry indexes the chain as it goes, and syncs the CIP-26 registry every hour. A token minted a moment ago, or a CIP-26 entry merged a moment ago, may not be there yet.
  2. No metadata. The token has neither a CIP-26 entry nor a CIP-68 datum. There is nothing to serve, unless it is a programmable token of a registered policy, which is served with the missing companion reported (see 3). NFTs (label 222) are not served.
  3. Filtered by validation. MANDATORY_ONLY returns 404 for tokens with mandatory errors. STRICT returns 404 for any reported validation error. Use ALL to see the token and its errors.
  4. The input cannot be indexed. Some inputs cannot be decoded or do not meet the requirements for indexing:
WhatWhy it is not indexed
a CIP-68 datum that cannot be decodedthere is nothing to read
a CIP-68 datum nested so deeply it cannot be decodeddecoding exceeds the parser’s stack capacity
a datum that is not CIP-68 at allit is not token metadata; it is ignored
a CIP-26 file named after another subject than the one inside itit would make two tokens claim one name
a CIP-26 subject that is not hex, or not 56 to 120 charactersit cannot identify a token
a CIP-26 file that cannot be parsed, or that has no history in the registrythere is nothing reliable to read

Some things are dropped in part, so the rest of the token is still served:

WhatWhat happens
a CIP-68 property nested more than 100 levelsthat property is left out, with a too_deep error; the rest of the datum is kept
a CIP-26 logo far beyond any real size (over about 1 MiB)the logo is not stored; the entry is

The registry records each of the items in the first table, with the reason, except a datum that is not CIP-68 at all, which is ignored. Registry operators can therefore tell a token owner why their token does not appear.

The design is recorded in the project’s architecture decision records, for those who want the full reasoning:

  • ADR-019: validation errors are reported, not enforced
  • ADR-020: what cannot be stored is recorded, CIP-113 included
  • ADR-022: why a CIP-68 subject is served whether or not its user token was minted (rejected proposal)

Built on Yaci Store and cardano-client-lib by BloxBean.