import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; import { Provider } from '@ethersproject/providers'; import { PermitTransferFrom, PermitBatchTransferFrom } from '../signatureTransfer'; export interface NonceValidationResult { isUsed: boolean; isExpired: boolean; isValid: boolean; } export declare class SignatureProvider { private provider; private permit2Address; private permit2; constructor(provider: Provider, permit2Address: string); /** * Check if a nonce has been used for signature transfers * @param owner The owner address * @param nonce The nonce to check * @returns true if the nonce has been used, false otherwise */ isNonceUsed(owner: string, nonce: BigNumberish): Promise; /** * Check if a permit has expired based on its deadline * @param deadline The deadline timestamp * @returns true if the permit has expired, false otherwise */ isExpired(deadline: BigNumberish): Promise; /** * Check if a permit is valid (not expired and nonce not used) * @param permit The permit data to validate * @returns true if the permit is valid, false otherwise */ isPermitValid(permit: PermitTransferFrom | PermitBatchTransferFrom): Promise; /** * Get detailed validation results for a permit * @param permit The permit data to validate * @returns Object containing validation results */ validatePermit(permit: PermitTransferFrom | PermitBatchTransferFrom): Promise; /** * Get the current nonce bitmap for an owner at a specific word position * @param owner The owner address * @param wordPos The word position in the bitmap * @returns The bitmap as a BigNumber */ getNonceBitmap(owner: string, wordPos: BigNumberish): Promise; /** * Check if a specific bit is set in the nonce bitmap * @param bitmap The bitmap to check * @param bitPos The bit position (0-255) * @returns true if the bit is set, false otherwise */ static isBitSet(bitmap: BigNumber, bitPos: number): boolean; /** * Get the word position and bit position for a given nonce * @param nonce The nonce to analyze * @returns Object containing wordPos and bitPos */ static getNoncePositions(nonce: BigNumberish): { wordPos: BigNumber; bitPos: number; }; /** * Batch check multiple nonces for the same owner * @param owner The owner address * @param nonces Array of nonces to check * @returns Array of boolean results indicating if each nonce is used */ batchCheckNonces(owner: string, nonces: BigNumberish[]): Promise; /** * Get the current block timestamp * @returns Current block timestamp */ getCurrentTimestamp(): Promise; }