@gala-chain/chaincode ∙ API
API > fetchBalancesWithTokenMetadata
Function: fetchBalancesWithTokenMetadata()
fetchBalancesWithTokenMetadata(
ctx
,data
):Promise
\<FetchBalancesWithTokenMetadataResponse
>
Parameters
▪ ctx: GalaChainContext
▪ data: FetchBalancesWithTokenMetadataParams
Returns
Promise
Description
Using the provided parameters, this function will first query TokenBalance entries from on-chain World State.
Next, for each TokenBalance
, the corresponding TokenClass
will be fetched from the ledger.
The TokenBalance
and corresponding TokenClass
for each
result will be combined into a results set, yielding a
response defined by the FetchBalancesWithTokenMetadataResponse
DTO class.
This method supports pagination. For large results sets,
use the bookmark
and limit
parameters for subsequent
calls.