getClusterBalance
Get the balance in current connected cluster for given address
.
Usage
const address = '4.....'
const balance = await client.getClusterBalance(address)
Parameters
The function comes with two parameters:
getClusterBalance(address, cert)
address
string | AccountId
The SS58 format address that you want to query. If can be the instance AccountId
class from the polkadot-js.
cert
(optional)
CertificateData
The CertificateData
signed by the account processing the off-chain query. If can skip in most case.
Returns
Promise<BalanceData>
The BalanceData
is a plain object with total
and free
.
{
total: 1000000000000000,
free: 0,
}