Get Current Blockchain

This method can be used to fetch active blockchain name in the wallet.

Below is an example code describing the way to fetch blockchain name.

// Fetch blockchain info
const blockchain = await window.martian.getCurrentBlockchain();
console.log(blockchain);
// above code output
aptos or sui

Last updated