Defines a chain with the given options.
Just pass the chain ID to connect to:
const chain = defineChain(1);
Or pass your own RPC or custom values:
const chain = defineChain({ id: 1, rpc: "https://my-rpc.com", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18, },});
function defineChain( options: number | ChainOptions | LegacyChain | Chain,): Chain;
The options for the chain.
let options: number | ChainOptions | LegacyChain | Chain;
let returnType: Readonly<ChainOptions & { rpc: string }>;
The defined chain.