Vilna uses CAIP identifiers for chains, accounts and assets, and RFC 7807 for HTTP API errors.
CAIP-2 chains CAIP-10 accounts CAIP-19 assets RFC 7807 errors
CAIP (Chain Agnostic Improvement Proposals) gives every blockchain, account and asset one identifier shape - so the same code path handles Ethereum, Bitcoin and Solana without per-chain special cases. In a Vilna response, a record points at a chain, an address or a token with one of these ids.
There are three levels, and each builds on the one before it: an account is a chain plus an address; an asset is a chain plus an asset descriptor.
The base identifier. It names a chain in two parts:
The chain family - eip155 for EVM chains, bip122 for Bitcoin-like, plus solana, cosmos and more.
eip155The specific chain inside that family - the chain ID for EVM, the genesis block hash for Bitcoin.
1| Chain | CAIP-2 |
|---|---|
| Ethereum Mainnet | eip155:1 |
| BNB Smart Chain | eip155:56 |
| Polygon | eip155:137 |
| Arbitrum One | eip155:42161 |
| Bitcoin | bip122:000000000019d6689c085ae165831e93 |
| Solana | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
An address on a specific chain - take a CAIP-2 id and append the address:
Any CAIP-2 blockchain id - the chain the account lives on.
eip155:1The address on that chain, in its native format (hex for EVM, base58 for Bitcoin and Solana).
0x742d35Cc…7B123eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f7B123bip122:000000000019d6689c085ae165831e93:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNasolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWMAny asset - native coin, token or NFT. It joins a CAIP-2 chain to an asset descriptor with a /:
Any CAIP-2 blockchain id - the chain the asset lives on.
eip155:1The asset type - slip44 for a native coin, erc20 for a fungible token, erc721 / erc1155 for NFTs.
erc20The asset within that type - a contract address for tokens, or a coin type for native currencies.
0xdAC17F…1ec7| Asset | CAIP-19 |
|---|---|
| ETH (native) | eip155:1/slip44:60 |
| BTC (native) | bip122:000000000019d6689c085ae165831e93/slip44:0 |
| USDT on Ethereum | eip155:1/erc20:0xdAC17F958D2ee523a2206206994597C13D831ec7 |
| USDC on Ethereum | eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| BAYC #101 (NFT) | eip155:1/erc721:0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/101 |
Native currencies use the coin type from the SLIP-44 registry (60 = ETH, 0 = BTC); tokens and NFTs use the contract address, with the token id appended for a single NFT.
The Platform, Management and VKS HTTP APIs use RFC 7807 Problem Details (application/problem+json). See Errors for fields, service-specific extensions and recovery guidance. Blockchain RPC uses its protocol error model.
- CAIP-2 Specification - blockchain ids
- CAIP-10 Specification - account ids
- CAIP-19 Specification - asset ids
- SLIP-44 Registry - native coin types
- RFC 7807 - Problem Details for HTTP APIs