getBalance

suspend fun getBalance(asset: Asset, address: String): Result<Balance>

Get the balance of an asset for a given address.

For native coins (ETH, BTC), this queries the chain's native balance. For tokens (ERC-20), this queries the token contract's balanceOf method.

Return

Result containing Balance on success, or an error on failure

Parameters

asset

The asset to query balance for

address

The wallet address