Toroforge Collective
  • Welcome to ToroForge Collective
  • Getting Started
    • Quickstart
    • SDKs
      • Javascript
        • Wallet Management
        • Token & Balances
        • Fiat Deposit & Verification
        • KYC & Identity
        • Transfers
        • Blockchain Queries
        • Utilities & Helpers
        • Full Reference
      • Flutter
  • Resources
    • Smart Contracts
    • Community
Powered by GitBook
On this page
  • πŸ“¦ Get Wallet Balance
  • πŸ“Š Response Format
  • 🧩 Use Cases
  • ⚠️ Important Notes
  • πŸ”— Related Docs
  1. Getting Started
  2. SDKs
  3. Javascript

Token & Balances

The ToroForge SDK provides simple, secure methods to retrieve wallet balances across different supported currencies on the Toronet blockchain.

Supported tokens:

  • NGN (Naira – fiat-backed)

  • USD (US Dollar – fiat-backed)

  • ToroG (Toronet’s native token)


πŸ“¦ Get Wallet Balance

To get a wallet’s full balance breakdown (NGN, USD, ToroG):

import { getBalance } from 'torosdk';

const balances = await getBalance({
  address: '0xYourWalletAddress',
});

console.log(balances);
/*
{
  ngnBalance: '1000',
  usdBalance: '25.50',
  toroGBalance: '430'
}
*/

Returned object includes:

  • ngnBalance: Naira balance

  • usdBalance: USD balance

  • toroGBalance: Native ToroG token amount


πŸ“Š Response Format

{
  ngnBalance: string;
  usdBalance: string;
  toroGBalance: string;
}

Note: All amounts are returned as strings, already normalized for display (i.e. not in smallest unit like wei).


🧩 Use Cases

You can use this method to:

  • Display balances on a user dashboard

  • Validate available funds before initiating a transaction

  • Refresh balances after a fiat deposit or on-chain token transfer


⚠️ Important Notes

  • Ensure the address passed in is a valid Toronet address.

  • Fiat-backed tokens like NGN and USD require successful KYC verification for high-volume usage.

  • For real-time updates, consider calling this method after:

    • Successful deposits

    • Transfers between wallets

    • KYC approval confirmation


πŸ”— Related Docs

PreviousWallet ManagementNextFiat Deposit & Verification

Last updated 11 days ago

Fiat Deposit & Verification
KYC & Identity
Transfers