mina_requestNetwork

This method is used to request the chain info of the Auro wallet.

Params

null

Result

type ChainInfoArgs ={
    // current chain ID, now will return mainnet, devnet, berkeley, testworld2.
    chainId:string,
    // current chain name. The default node name is fixed, 
    // and the custom added ones are user-defined.
    name:string,
}

Promise<ChainInfoArgs>

Errors

null

Example

Request

await window.mina?.requestNetwork().catch((err: any) => err);

Result

{
  "chainId": "mainnet",
  "name": "Mainnet"
}

Last updated