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
async window.fewcha.getBalance(): Promise<Response<string>>;
Response
{
"method": "getBalance",
"status": 200,
"data": "4000"
}
async window.fewcha.account(): Promise<Response<Record<string, string>>>;
Response
{
"method": "getCurrentAccount",
"status": 200,
"data": {
"address": "0x...",
"publicKey": "0x..."
}
}
async window.fewcha.getNetworkType(): Promise<Response<"Aptos"|"SUI">>;
Response
{
"method": "getCurrentAccount",
"status": 200,
"data": "Aptos"
}
Last modified 10mo ago