Links
Comment on page

Get Network

This method can be used to fetch network name.
Below is an example code describing the way to fetch network name.
aptos
sui
// Fetch network info
const network = await window.martian.network();
console.log(network);
// above code output
Testnet or Devnet or Custom
// Fetch network info
const network = await window.martian.sui.network();
console.log(network);
// above code output
Devnet