CAIP-2

CAIP-2 is a way of naming a blockchain in one string: a namespace, a colon, and a reference. It exists so that a single identifier means the same chain everywhere, instead of each system keeping its own list of names. It is the form an x402 payment quote states its network in.

The specification's own summary is that it defines a way to identify a blockchain in a human-readable, developer-friendly and transaction-friendly way. The identifier is a case-sensitive string of a namespace, a colon and a reference, each constrained in length and character set. Its status is Final.

The problem it names is easy to underestimate: something has to say where an asset or a smart contract lives, and a common name does not carry that. The stated objectives are uniqueness within the whole blockchain ecosystem, and staying readable enough to debug and small enough for a hardware wallet to display.

x402 adopted the form for its network field. The specification states that networks use CAIP-2 format, namespace:reference, and the project's documentation lists the families it recognises — eip155:<chainId> for EVM chains, solana:<genesisHash>, and identifiers for further chain families beside them. The specification also encourages networks that are not blockchains to follow the same shape.

For a quote the effect is that the chain is stated rather than assumed. An accepts array entry naming an asset contract means nothing without the chain that contract lives on, and the same asset name on a different chain is a different asset as far as settlement is concerned.

→ probe402 records the network each tracked endpoint quoted — open an endpoint from the endpoint list.

Sources

Related accepts array · settlement · scheme · USDC

Glossary