checkConnect

Function using for check connect to web3 wallet

Wallets supported:

  • MetaMask

  • WalletConnect EVM

  • CoinbaseWallet

  • Trust

Input parameters:

MetaMask wallet:

// JavaScript

const data = {
    wallet: 'MetaMask', // required
    rpc: '', // option
}

WalletConnect EVM:

// JavaScript

const data = {
    wallet: 'WalletConnect', // required
}

CoinbaseWallet:

// JavaScript

const data = {
    wallet: 'CoinbaseWallet', // required
    rpc: '', // option
}

Trust wallet:

// JavaScript

const data = {
    wallet: 'Trust', // required
    rpc: '', // option
}

Using:

// JavaScript

const accounts = await checkConnect(data)

Return:

EVM wallets:

// JavaScript

{
    accounts:[], // array of wallet addresses
    chainId:'', // number, selected chain in user wallet, only for EVM chains
}

Last updated