Fewcha Wallet Dev Docs
  • Introduction
  • Get Started
    • Connect
    • Get data
    • Sign and Submit Transaction
  • Response Format and Types
  • Serializer/Deserializer
  • Status codes
  • TypeScript Wrapper
  • React Connect Button
  • Reference
    • Wallet Methods
      • Connection
      • Account Data
      • Transactions
        • Aptos transaction
        • SUI transaction
    • Token (NFT) Methods (Aptos)
    • SDK Get Data Methods
      • Account
      • Transaction
      • Miscellaneous
  • Github
  • Chrome Extension
Powered by GitBook
On this page
  • getBalance
  • account
  • getNetworkType

Was this helpful?

  1. Get Started

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

PreviousConnectNextSign and Submit Transaction

Last updated 2 years ago

Was this helpful?