Account Data
account
async window.fewcha.account(): Promise<Response<PublicAccount>>
Response
{
"method": "getCurrentAccount",
"status": 200,
"data": {
"address": "0x20364f4121f608f2a09830bc0ab6980fdccff45c2f5df6c41c17f40e511fe80e",
"publicKey": "0x89a10bded6d812d21299ee129410d53a74f12f91183989c19282fa24ce629b49"
}
}
async web3.action.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"
}
async web3.action.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"
}
async web3.action.getBalance(): Promise<Response<string>>;
Response
{
"method": "getBalance",
"status": 200,
"data": {
"0x1::aptos_coin::AptosCoin": "4000",
"0x8::staked_coin::StakedCoin": "9000"
}
}
getNetworkType
async window.fewcha.getNetworkType(): Promise<Response<"Aptos"|"SUI">>;
Response
{
"method": "getNetworkType",
"status": 200,
"data": "SUI"
}
Last updated