Skip to content

@gala-chain/chaincodeAPI


API > fetchBalances

Function: fetchBalances()

fetchBalances(ctx, data): Promise\<TokenBalance[]>

Parameters

ctx: GalaChainContext

data: FetchBalancesParams

Returns

Promise

Description

Query balances from on-chain World State using the provided parameters. This function does not support pagination.

Also see the TokenBalance definition, where its ChainKey properties are defined.

The @ChainKeys that make up the World State composite key are ordered, and cannot be skipped when making partial composite key queries. Be advised that broad queries can lead to performance issues for large result sets.

Source

chaincode/src/balances/fetchBalances.ts:48