import { AllowanceType, TokenAllowance, TokenInstanceKey } from "@gala-chain/api"; import { BigNumber } from "bignumber.js"; import { GalaChainContext } from "../types"; export declare function isAllowanceSpent(allowance: TokenAllowance): boolean; export declare function isAllowanceExpired(ctx: GalaChainContext, allowance: TokenAllowance): boolean; /** * @description * * Iterate through the provided `TokenAllowance` chain objects, * deleting those from world state that: a) have exhausted all uses, b) are expired, * c) are otherwise invalid or unnecessary * * @param ctx * @param allowancesToClean `TokenAllowance[]` * @param authorizedOnBehalf `string` * @returns `Promise>` */ export declare function cleanAllowances(ctx: GalaChainContext, allowancesToClean: TokenAllowance[], authorizedOnBehalf: string): Promise>; /** * @description * * Given an array of allowances, * * 1. clean up and delete expired / fully used allowances * 2. Match the remaining allowances against the `TokenInstanceKey` and `AllowanceType` * 3. Sum up and return the total useable allowance quantity available * * @param ctx * @param applicableAllowances * @param tokenInstanceKey * @param action * @param callingOnBehalf * @returns `Promise` */ export declare function checkAllowances(ctx: GalaChainContext, applicableAllowances: TokenAllowance[], tokenInstanceKey: TokenInstanceKey, action: AllowanceType, callingOnBehalf: string): Promise; //# sourceMappingURL=checkAllowances.d.ts.map