> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://accounts.tempo.xyz/api/mcp` to find what you need.

# `wallet_switchEthereumChain`

Switches the provider's active chain to the chain identified by `chainId`. The chain must be one of the chains the provider was configured with — switching to an unknown chain throws an `UnsupportedChainId` error.

After a successful switch, [`eth_chainId`](/docs/rpc/eth_chainId) reflects the new chain and subsequent requests use it as their default.

## Request

```ts
type Request = {
  method: 'wallet_switchEthereumChain'
  params: [{
    /** Chain ID to switch to (hex-encoded number on the wire, decoded to `number`). */
    chainId: number
  }]
}
```

## Response

```ts
type Response = undefined
```

## Example

```ts
await provider.request({
  method: 'wallet_switchEthereumChain',
  params: [{ chainId: 1 }],
})
```
