Skip to content

setChain

Allows you to change the current chain in the core store. Note, this chain must be one of the chains configured in your original createConfig call.

Import

import { setChain } from "@account-kit/core";

Usage

import { setChain } from "@account-kit/core";
import { config } from "./config";
import { sepolia } from "@account-kit/infra";
 
await setChain(config, sepolia);

Parameters

config

AlchemyAccountsConfig the accounts config object

chain

Chain the chain to change to. It must be present in the connections config object