wallet_changeNetwork
Switch the selected network within the wallet.
Switch the active network in the user's Xverse wallet
The wallet_changeNetwork
method allows your DApp to prompt the user's wallet to switch between different blockchain networks. This feature is essential for workflows that require switching networks, such as bridging assets between different chains or testing features on testnets.
The app must have first connected to the wallet and obtained account read permissions.
You can fetch the networks that the user's wallet is currently connected to, using wallet_getNetwork
.
Parameters
name
a string representing the network the wallet should switch to. This is a required parameter and should be one of the supported network names:
Mainnet
for Bitcoin & Stacks mainnet
Testnet
for Bitcoin & Stacks testnet
Signet
for Bitcoin Signet
Null response
This method returns null
if the active chain is switched.
Last updated