Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 863 Bytes

mina_requestnetwork.md

File metadata and controls

54 lines (39 loc) · 863 Bytes
description
This method is used to request the chain info of the Auro wallet.

mina_requestNetwork

Params

null

Result

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

Promise<ChainInfoArgs>

{% hint style="danger" %}

** 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
}

{% endhint %}

Errors

null

Example

Request

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

Result

{
  "networkID": "mina:mainnet"
}