On this page
switchNetwork
Request a switch to the specified Bitcoin network.
Method
declare function switchNetwork(network: 'livenet' | 'testnet'): Promise<void>;Params
network — the target network: livenet or testnet. The promise resolves without a value.
Example
const provider = (window.$onekey && window.$onekey.btc) || window.unisat;
await provider.switchNetwork("livenet");Demo
Last updated on