Get the wallet's chainId

The network that the current wallet is connected to will be returned to the DApp to help users accurately obtain the currently connected network

Get chainId

Use the sample code to get the current chainId

const chainId = await window.NaboxWallet.request({ method: 'eht_chainId' });
console.log(chainId);

Monitor chainId changes

const chainId = await window.NaboxWallet.request({ method: 'eht_chainId' });
console.log(chainId);

Last updated