> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CAIP-2 network ids

> The chain-agnostic network identifier the hosted wallet connector speaks: its format, the ids of common networks, and where it appears in the connect flow.

CAIP-2 is a [Chain Agnostic Improvement Proposal](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) that defines a single text format for naming a blockchain network: `namespace:reference`. The namespace names the chain family, and the reference names the network inside that family. Because the format is the same for every ecosystem, one parameter or one result field can carry a network on any chain without a per-chain special case.

The [hosted wallet connector](/docs/connections/overview) speaks CAIP-2 in two places: the `networks` parameter that restricts which networks a user may connect on, and the `network` redirect param (or `networkId` on the headless `connected` message) that reports which network the user ended up on.

## Format

A CAIP-2 id joins a namespace and a reference with a colon:

```text theme={"system"}
eip155:137
└─┬──┘ └─┬─┘
  │      └── reference: the network inside the family
  └───────── namespace: the chain family
```

The namespace is 3 to 8 lowercase letters, digits, or hyphens; the reference is 1 to 32 characters and may include underscores and mixed case. Some references are case-sensitive — Solana's is base58 — so treat ids as opaque strings and compare them exactly, never case-insensitively.

## Ids for common networks

EVM networks use the `eip155` namespace with the decimal chain id as the reference:

| Network | CAIP-2 id |
| - | - |
| Ethereum | `eip155:1` |
| Polygon | `eip155:137` |
| Base | `eip155:8453` |
| Arbitrum One | `eip155:42161` |
| Optimism | `eip155:10` |
| Avalanche C-Chain | `eip155:43114` |

Solana and Bitcoin derive the reference from the network's genesis hash — the first 32 characters of it — so the same id identifies the network no matter which RPC or index a wallet used to learn it:

| Network | CAIP-2 id |
| - | - |
| Solana | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` |
| Solana testnet | `solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z` |
| Solana devnet | `solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1` |
| Bitcoin | `bip122:000000000019d6689c085ae165831e93` |
| Bitcoin testnet | `bip122:000000000933ea01ad0ee984209779ba` |

Any `eip155` chain works the same way: take its decimal chain id and prefix it with `eip155:`. The full namespace registry and the per-family derivation rules live in the [CAIP-2 specification](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md) and the linked namespace profiles.

## Where the connector uses it

* **Filtering (`networks`)**: pass a comma-separated list of ids to offer only those networks, for example `?networks=eip155:137,solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`. See the parameter table on the [overview](/docs/connections/overview) page.
* **Results (`network`, `networkId`)**: a successful connect reports the network the wallet is on, or the network picked for a manually entered address, as a CAIP-2 id — `network` on the redirect and `networkId` on the headless `connected` message.

> [!NOTE]
>
> The connector omits the id entirely when it cannot name one rather than guessing — an unknown network or a wallet that reports none means an absent `network`, not a wrong one. Treat the field as optional everywhere you read it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.