Interface AddEthereumChainParameter

interface AddEthereumChainParameter {
    blockExplorerUrls?: string[];
    chainId: string;
    chainName: string;
    iconUrls?: string[];
    nativeCurrency: NativeCurrency;
    rpcUrls: [string, ...string[]];
}

Properties

blockExplorerUrls?: string[]

(Optional) One or more URLs pointing to block explorer sites for the chain.

chainId: string

The chain ID as a 0x-prefixed hexadecimal string, per the eth_chainId method. MetaMask compares this chain ID value with the eth_chainId return value. If these values aren't identical, MetaMask rejects the request.

chainName: string

A human-readable name for the chain.

iconUrls?: string[]

(Optional) One or more URLs pointing to reasonably sized images that can be used to visually identify the chain. NOTE: MetaMask will not currently display these images. Values can still be included so that they are utilized if MetaMask incorporates them into the display of custom networks in the future.

nativeCurrency: NativeCurrency
rpcUrls: [string, ...string[]]

One or more URLs pointing to RPC endpoints that can be used to communicate with the chain. At least one item is required, and only the first item is used.

1