Skip to main content

avalanche_selectWallet

Core

Prompts the user to select a wallet from a list of enabled wallets, and returns the index of the selected wallet.

Params

(1)

1. walletOptions (required)

array of:
enabled
boolean
required

Indicates whether the wallet is available for selection.

type
string
required

The type of wallet to select.

name
string
required

The name of the wallet.

Result

(SelectedWalletResult)
selectedIndex
integer
required

The index of the selected wallet

Errors

CodeMessage
4001User rejected the request.
500No wallet options available

Example

Request

await window.ethereum.request({
"method": "avalanche_selectWallet",
"params": [
[
{
"enabled": true,
"type": "CORE",
"name": "Core Wallet"
},
{
"enabled": true,
"type": "METAMASK",
"name": "Metamask Wallet"
}
]
]
});

Result

1

Params

walletOptions


Request

await window.ethereum.request({
"method": "avalanche_selectWallet",
"params": [
null
]
});

Was this page helpful?