switchNetwork

Get network of current account

Method

async function switchNetwork(network: string): void

Params

the network. livenet and testnet

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat;

async provider.switchNetwork("livenet");

Demo

Last updated