Get data

After connect to the wallet, you can get Account Data, examples: balance, address, network URL, network type... then show it on your website

getBalance

async window.fewcha.getBalance(): Promise<Response<string>>;

Response

{
    "method": "getBalance",
    "status": 200,
    "data": "4000"
}

account

async window.fewcha.account(): Promise<Response<Record<string, string>>>;

Response

{
    "method": "getCurrentAccount",
    "status": 200,
    "data": {
        "address": "0x...",
        "publicKey": "0x..."
    }
}

getNetworkType

async window.fewcha.getNetworkType(): Promise<Response<"Aptos"|"SUI">>;

Response

{
    "method": "getCurrentAccount",
    "status": 200,
    "data": "Aptos"
}

This method is a part of Account Data methods

Last updated