Skip to content

@gala-chain/chaincodeAPI


API > grantAllowance

Function: grantAllowance()

grantAllowance(ctx, GrantAllowanceParams): Promise\<TokenAllowance[]>

Parameters

ctx: GalaChainContext

GrantAllowanceParams: GrantAllowanceParams

Returns

Promise

Description

Grant one or more allowances to one or more users with the specified quantities, uses, and expiration timestamp. TokenAllowance entries granted on-chain will always set the grantedBy field to the calling user.

Supports open-ended token instance query (refer to: TokenInstanceQueryKey).

Ensure that the user identities specified in the quantities array are unique.

Source

chaincode/src/allowances/grantAllowance.ts:471