import { AllowanceType, TokenInstance, TokenInstanceKey } from "@gala-chain/api"; import { BigNumber } from "bignumber.js"; import { GalaChainContext } from "../types"; /** * @description * * Query allowances from World State using a partial composite key query * constructed from the provided parameters, ensuring that the provided * `grantedBy` and `authorizedOnBehalf` parameters match the `TokenAllowance` * `grantedBy` and `grantedTo` properties. * * Apply the remaining quantity of each applicable allowance to the total quantity. * * Return `true` after accounting for the full spend. Write a `TokenClaim` entry * for each allowance used. * * Throws an exception if the full quantity cannot be * met by the provided allowances. * @param ctx * @param grantedBy * @param tokenInstanceKey * @param quantity * @param tokenInstance * @param authorizedOnBehalf * @param actionType * @returns Promise */ export declare function verifyAndUseAllowances(ctx: GalaChainContext, grantedBy: string, tokenInstanceKey: TokenInstanceKey, quantity: BigNumber, tokenInstance: TokenInstance, authorizedOnBehalf: string, actionType: AllowanceType): Promise; /** * @description * * Query allowances from World State using specific allowance keys (composite keys), * ensuring that the provided `grantedBy` and `authorizedOnBehalf` parameters * match the `TokenAllowance` `grantedBy` and `grantedTo` properties. * * Apply the remaining quantity of each applicable allowance to the total quantity. * * Return `true` after accounting for the full spend. Write a `TokenClaim` entry * for each allowance used. * * Throws an exception if the full quantity cannot be * met by the provided allowances. * @param ctx * @param grantedBy * @param tokenInstanceKey * @param quantity * @param tokenInstance * @param authorizedOnBehalf * @param actionType * @param useAllowancesArr Array of allowance composite keys to use * @returns Promise */ export declare function verifyAndUseTransferAllowancesByKeys(ctx: GalaChainContext, grantedBy: string, tokenInstanceKey: TokenInstanceKey, quantity: BigNumber, tokenInstance: TokenInstance, authorizedOnBehalf: string, useAllowancesArr: Array): Promise; //# sourceMappingURL=verifyAndUseAllowances.d.ts.map