Account Data

account

async window.fewcha.account(): Promise<Response<PublicAccount>>

Response

{
    "method": "getCurrentAccount",
    "status": 200,
    "data": {
        "address": "0x20364f4121f608f2a09830bc0ab6980fdccff45c2f5df6c41c17f40e511fe80e",
        "publicKey": "0x89a10bded6d812d21299ee129410d53a74f12f91183989c19282fa24ce629b49"
    }
}

getNetwork

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

Response

{
    "method": "getNetwork",
    "status": 200,
    "data": "https://fullnode.devnet.aptoslabs.com"
}

getBalance

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

Response

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

getNetworkType

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

Response

{
    "method": "getNetworkType",
    "status": 200,
    "data": "SUI"
}

Last updated