Network Switcher for Dapps

The wallet_switchStarknetChain can be used by dapps to request that the wallet switches its active Starknet Network.

Params

1. SwitchStarknetChainParameter (required)

chainId (required)

MUST specify the integer ID of the chain as a short string.

'SN_MAIN' || 'SN_GOERLI'

Example

Request

await window.starknet.request({
  type: "wallet_switchStarknetChain",
  params: {
    chainId: "SN_MAIN"
  }
});

Result

"null"

Last updated