Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 287 Bytes

detecting-provider-network.md

File metadata and controls

11 lines (8 loc) · 287 Bytes

Detecting Provider Network

You can detect the provider network seleted in OneKey Wallet, currently supports both mainnet and testnet.

const res = await provider.request({
  method: 'near_networkInfo',
});
console.log('near_networkInfo', res, res?.networkId);