# Chains (Chain)

A chain as plain data that an application writes: what a wallet or a page needs to know about
it. There is no registry of chains. A `Chain` is what
[`Connection.switchChain`](https://ethect.dev/reference/connection/switch-chain/) offers to a wallet that does not know the
chain.

```ts
import type { Chain } from "@ethect/core";

const base: Chain.Chain = {
  id: 8453,
  name: "Base",
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
  rpcUrls: ["https://mainnet.base.org"],
  explorer: "https://basescan.org",
};
```

| Export | Kind | Description |
| --- | --- | --- |
| [`Chain.Chain`](#fields) | type | A chain: the fields below. |

## Fields

| Field | Type | Holds |
| --- | --- | --- |
| `id` | `number` | the chain id |
| `name` | `string` | what a wallet shows |
| `nativeCurrency` | `{ name, symbol, decimals }` | the currency that pays for gas |
| `rpcUrls` | `ReadonlyArray<string>` | public endpoints a wallet can use |
| `explorer` (optional) | `string` | the URL of a block explorer |
