Skip to content

@gala-chain/chaincodeAPI


API > fullAllowanceCheck

Function: fullAllowanceCheck()

fullAllowanceCheck(ctx, data): Promise\<FullAllowanceCheckResDto>

Parameters

ctx: GalaChainContext

data: FullAllowanceCheckParams

Returns

Promise

Description

Convenience method to efficiently determine if the grantedTo identity has useable allowances for all of the owner's tokens that match the provided query paraemters.

Using the provided TokenClassKey parameters (collection, category, type, additionalKey) this method will query all the owners matching balances, and iterate through each NFT instance ensuring that the allowance of specified AllowanceType exists and is validly useable by the grantedTo identity.

In the event one or more token instances has an expired, fully used, or otherwise missing allowance, its details will be returned in the response.

Source

chaincode/src/allowances/fullAllowanceCheck.ts:50