ThirdwebSDK.getBalance() method
Get the native balance of a given address (wallet or contract)
Example
const balance = await sdk.getBalance("0x...");
console.log(balance.displayValue);
Signature:
getBalance(address: string): Promise<CurrencyValue>;
Parameters
Parameter | Type | Description |
---|---|---|
address | string | the address to check the balance for |
Returns:
Promise<CurrencyValue>