mina_requestNetwork

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

Params

null

Result

type ChainInfoArgs ={
    // current networkID, now will return mina:mainnet, mina:testnet, mina:berkeley
    networkID:string
}

Promise<ChainInfoArgs>
** Please update as soon as possible. **
`ChainInfoArgs` params have updated from App 2.0.2 & extension 2.2.17.
Only `networkID` is returned, no longer supports returning `chainId` and `name`. 

// @deprecated from App 2.0.2 & extension 2.2.17.
type ChainInfoArgs ={ 
    chainId:string,
    name:string
}

Errors

null

Example

Request

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

Result

{
  "networkID": "mina:mainnet"
}

Last updated