import { AllowanceType, GrantAllowanceQuantity, TokenAllowance, TokenClass, TokenInstanceQueryKey, TokenMintAllowance, TokenMintAllowanceRequest } from "@gala-chain/api"; import { BigNumber } from "bignumber.js"; import { GalaChainContext } from "../types/GalaChainContext"; /** * @description * * Calculate whether or not the requested quantity exceeds the maximum * capacity or supply for the given `TokenClass`. * * @param tokenClass * @param quantity * @param totalKnownMintAllowanceCount * @param totalKnownBurnsCount * @returns boolean */ export declare function ensureQuantityCanBeMinted(tokenClass: TokenClass, quantity: BigNumber, totalKnownMintAllowanceCount?: BigNumber, totalKnownBurnsCount?: BigNumber): boolean; export interface GrantAllowanceParams { tokenInstance: TokenInstanceQueryKey; allowanceType: AllowanceType; quantities: Array; uses: BigNumber; expires: number; } export declare function putMintAllowanceRequestsOnChain(ctx: GalaChainContext, { quantities, uses, expires }: Omit, tokenClass: TokenClass, knownMintAllowanceSupply: BigNumber): Promise; export interface PutMintAllowancesOnChainParams { mintAllowanceRequests: Array; } export declare function putMintAllowancesOnChain(ctx: GalaChainContext, { mintAllowanceRequests }: PutMintAllowancesOnChainParams, tokenClass: TokenClass, knownMintAllowanceSupply: BigNumber): 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. * * @param ctx * @param GrantAllowanceParams * @returns Promise */ export declare function grantAllowance(ctx: GalaChainContext, { tokenInstance: tokenInstanceQueryKey, allowanceType, quantities, uses, expires }: GrantAllowanceParams): Promise; export declare function preventDuplicateAllowance(ctx: GalaChainContext, tokenAllowance: TokenAllowance): Promise; export declare function allowanceIsUseable(ctx: GalaChainContext, tokenAllowance: TokenAllowance): boolean; //# sourceMappingURL=grantAllowance.d.ts.map