Overview

Switches the specified wallet provider to a different blockchain chain.
  • Requires the wallet manager and its connector to be initialized.
  • The wallet provider must have at least one connected address.
  • Does nothing if the wallet provider is already on the desired chain.

Package: core

Defined in: core.ts:589

Parameters

walletProvider
WalletProvider
required
wallet provider to switch.
chainOrId
string | SwitchableChain
required
target chain as a chain ID string or SwitchableChain object.

Response

A successful response returns the following fields:
returns
void
required
A promise that resolves once the chain switch is complete.