import { Client } from '@ponder/client';
import { ResolvedSchema } from '@ponder/react';
import { DefaultError, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
import * as defaultSchema from 'indexer/schema';
export { defaultSchema as schema };
import * as defaultTokenSchema from 'token-indexer/schema';
export { defaultTokenSchema as tokenSchema };
import * as defaultIdentitySchema from 'identity-indexer/schema';
export { defaultIdentitySchema as identitySchema };
import { ProviderRates, ConversionRateInfo } from '@provex/utils/conversionRates';
import { ProviderKey, SubProviderKey } from '@provex/utils/payment';
import { TokenInfo } from '@provex/utils/tokens';
import { Currency } from '@provex/utils/currencies';
import { Hex } from 'viem';
import { ChainId } from '@provex/utils/chain';
import { DepositStatus } from '@provex/utils/deposit';
export { DepositStatus, depositStatuses } from '@provex/utils/deposit';
import { EscrowLocation } from '@provex/utils/contracts';
import { DependencyList } from 'react';
import { TimeResolutionKey } from '@provex/utils/time';
export { TimeResolutionKey } from '@provex/utils/time';
import { IndexerAdapter } from '@provex/react';

/**
 * @fileoverview Ponder SQL client initialization and React hooks.
 *
 * Sets up the connection to the indexer's SQL-over-HTTP endpoint
 * and provides type-safe query hooks for React components.
 *
 * @remarks
 * The client uses the schema directly from the indexer package for
 * full type safety without any code generation step.
 *
 * Environment variables:
 * - `VITE_INDEXER_URL` - Indexer base URL (defaults to localhost:21820)
 *
 * @see {@link ./ponderQueries} for query helper functions
 */

/**
 * Create a custom indexer client with your own URL and/or schema.
 *
 * The bundled `@provex/indexer-client` tarball includes the Provex indexer
 * schema by default. Supply a different schema (e.g., a fork of the indexer
 * that adds custom tables) by passing it here.
 *
 * @example
 * ```ts
 * import { createProvexIndexerClient } from '@provex/indexer-client'
 * import * as mySchema from './my-custom-schema'
 *
 * const client = createProvexIndexerClient({
 *   url: 'https://staging-indexer.example.com',
 *   schema: mySchema,
 * })
 * ```
 */
declare function createProvexIndexerClient(opts?: {
    url?: string;
    schema?: typeof defaultSchema;
}): Client<typeof defaultSchema>;
/**
 * Default Ponder SQL over HTTP client pointing at https://indexer.provex.com.
 * For a custom URL or schema, use {@link createProvexIndexerClient}.
 */
declare const ponderClient: Client<typeof defaultSchema>;
/**
 * Custom usePonderQuery hook with live updates disabled by default.
 * This improves query performance by preventing continuous polling.
 *
 * @param params - Query parameters with live updates disabled by default
 * @returns Query result from React Query
 *
 * @example
 * ```typescript
 * const { data, isLoading } = usePonderQuery({
 *   queryFn: async (db) => {
 *     return await db
 *       .select()
 *       .from(schema.deposits)
 *       .where(eq(schema.deposits.status, 'active'))
 *   }
 * })
 * ```
 */
declare function usePonderQuery<queryFnData = unknown, error = DefaultError, data = queryFnData>(params: {
    queryFn: (db: Client<ResolvedSchema>["db"]) => Promise<queryFnData>;
    live?: boolean;
} & Omit<UseQueryOptions<queryFnData, error, data>, "queryFn" | "queryKey">): UseQueryResult<data, error>;

/**
 * Create a custom token indexer client. See {@link createProvexIndexerClient}
 * for the schema-swap use case.
 */
declare function createProvexTokenIndexerClient(opts?: {
    url?: string;
    schema?: typeof defaultTokenSchema;
}): Client<typeof defaultTokenSchema>;
declare const tokenPonderClient: Client<typeof defaultTokenSchema>;

declare function createProvexIdentityIndexerClient(opts?: {
    url?: string;
    schema?: typeof defaultIdentitySchema;
}): Client<typeof defaultIdentitySchema>;
declare const identityPonderClient: Client<typeof defaultIdentitySchema>;

/**
 * Inferred type for deposit data returned by getDepositByCompoundKey.
 * This replaces manually-defined SQL types with actual schema inference.
 */
type PonderDeposit = NonNullable<Awaited<ReturnType<typeof getDepositByCompoundKey>>>;
/**
 * Get a deposit by its serialized compound key.
 * @param serializedDepositKey - The serialized deposit key from orderId.deposit.serialize()
 * @returns The deposit record or null if not found
 */
declare function getDepositById(serializedDepositKey: Hex): Promise<{
    escrow: `0x${string}`;
    localId: bigint;
    chainId: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    token: `0x${string}`;
    participantAddress: `0x${string}`;
    deposited: bigint;
    remaining: bigint;
    outstandingIntentAmount: bigint;
    minAmount: bigint;
    maxAmount: bigint;
    depositConversionRateCurrencies: `0x${string}`[];
    depositConversionRateVerifiers: `0x${string}`[];
    version: "v2" | "v3";
    acceptingIntents: boolean;
    delegate: `0x${string}`;
    intentGuardian: `0x${string}`;
    retainOnEmpty: boolean;
    status: "active" | "closed" | "paused" | "withdrawn" | "underfunded";
}>;
/**
 * Get a deposit with all its related data using compound key
 * This fetches all relationships needed by the Deposit class
 */
declare function getDepositByCompoundKey(params: {
    escrow: Hex;
    localId: bigint;
    chainId: bigint;
}): Promise<{
    depositId: `0x${string}`;
    owner: {
        address: `0x${string}`;
        chainId: bigint;
        firstSeenAt: bigint | null;
        lastSignaledAt: bigint | null;
    } | null;
    transaction: {
        block: {
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            number: bigint;
            timestamp: bigint;
        } | undefined;
        hash: `0x${string}`;
        chainId: bigint;
        orderId: `0x${string}`;
        blockId: `0x${string}`;
        index: bigint;
        from: `0x${string}`;
        to: `0x${string}`;
    } | null;
    depositReceiveds: {
        depositId: `0x${string}`;
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        depositDelta: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            amountBefore: bigint;
            delta: bigint;
            amountAfter: bigint;
        } | undefined;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        token: `0x${string}`;
        participantAddress: `0x${string}`;
        amount: bigint;
        transactionId: `0x${string}`;
    }[];
    depositWithdrawns: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        depositDelta: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            amountBefore: bigint;
            delta: bigint;
            amountAfter: bigint;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        participantAddress: `0x${string}`;
        amount: bigint;
        transactionId: `0x${string}`;
    }[];
    depositCloseds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        participantAddress: `0x${string}`;
        transactionId: `0x${string}`;
    }[];
    depositCurrencyAddeds: {
        depositCurrencyAddedId: `0x${string}`;
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        currentDepositConversionRateUpdated: {
            transaction: {
                block: {
                    hash: `0x${string}`;
                    chainId: bigint;
                    orderId: `0x${string}`;
                    number: bigint;
                    timestamp: bigint;
                } | undefined;
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                blockId: `0x${string}`;
                index: bigint;
                from: `0x${string}`;
                to: `0x${string}`;
            } | undefined;
            depositConversionRateUpdatedId: `0x${string}`;
            depositCurrencyAddedId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            paymentMethodId: `0x${string}`;
            currency: `0x${string}`;
            changeId: number;
            orderId: `0x${string}`;
            logId: `0x${string}`;
            transactionId: `0x${string}`;
            verifier: `0x${string}`;
            value: bigint;
            active: boolean;
        } | null;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        paymentMethodId: `0x${string}`;
        currency: `0x${string}`;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        verifier: `0x${string}`;
        participantAddress: `0x${string}`;
        currentConversionRateChangeId: number | null;
        currentMinConversionRateChangeId: number | null;
        minConversionRate: bigint | null;
        transactionId: `0x${string}`;
    }[];
    depositVerifierAddeds: {
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        paymentMethodId: `0x${string}`;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        verifier: `0x${string}`;
        transactionId: `0x${string}`;
        participantAddress: `0x${string}`;
        payeeDetailsHash: `0x${string}`;
        intentGatingService: `0x${string}`;
        active: boolean;
        currentActiveChangeId: number | null;
    }[];
    depositConversionRateUpdateds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        depositConversionRateUpdatedId: `0x${string}`;
        depositCurrencyAddedId: `0x${string}`;
        depositId: `0x${string}`;
        depositVerifierAddedId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        paymentMethodId: `0x${string}`;
        currency: `0x${string}`;
        changeId: number;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        transactionId: `0x${string}`;
        verifier: `0x${string}`;
        value: bigint;
        active: boolean;
    }[];
    intentSignaleds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        verifier: `0x${string}`;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        fundsLocked: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            intentHash: `0x${string}`;
            amount: bigint;
            expiryTime: bigint;
            transactionId: `0x${string}`;
        } | undefined;
        depositCurrencyAddedId: `0x${string}`;
        depositConversionRateUpdatedId: `0x${string}` | null;
        intentHash: `0x${string}`;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        escrow: `0x${string}`;
        paymentMethodId: `0x${string}`;
        ownerAddress: `0x${string}`;
        toAddress: `0x${string}`;
        amount: bigint;
        fiatCurrency: `0x${string}`;
        conversionRate: bigint;
        timestamp: bigint;
        conversionRateChangeId: number | null;
        status: string;
    }[];
    intentPruneds: {
        depositId: `0x${string}`;
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        intentHash: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        transactionId: `0x${string}`;
        participantAddress: `0x${string}`;
        isLateCancellation: boolean;
    }[];
    intentFulfilleds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        depositConversionRateUpdated: {
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            paymentMethodId: `0x${string}`;
            currency: `0x${string}`;
            changeId: number;
            orderId: `0x${string}`;
            logId: `0x${string}`;
            transactionId: `0x${string}`;
            verifier: `0x${string}`;
            value: bigint;
            active: boolean;
        } | null;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        depositDelta: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            amountBefore: bigint;
            delta: bigint;
            amountAfter: bigint;
        } | undefined;
        paymentVerified: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            intentHash: `0x${string}`;
            paymentMethodId: `0x${string}`;
            currency: `0x${string}`;
            amount: bigint;
            timestamp: bigint;
            paymentId: `0x${string}`;
            payeeId: `0x${string}`;
            transactionId: `0x${string}`;
            depositChainId: bigint;
        } | null;
        depositCurrencyAddedId: `0x${string}`;
        depositConversionRateUpdatedId: `0x${string}` | null;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        intentHash: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        transactionId: `0x${string}`;
        participantAddress: `0x${string}`;
        amount: bigint;
        paymentMethodId: `0x${string}`;
        fiatCurrency: `0x${string}`;
        conversionRateChangeId: number | null;
        conversionRate: bigint | null;
        sustainabilityFee: bigint | null;
        verifierFee: bigint | null;
        ownerAddress: `0x${string}` | null;
        manualRelease: boolean | null;
        fillTimeSeconds: bigint | null;
    }[];
    depositIntentAmountRangeUpdateds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        eventName: string;
        participantAddress: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}` | null;
        depositLocalId: bigint | null;
        depositChainId: bigint | null;
        paymentMethodId: `0x${string}` | null;
        currency: `0x${string}` | null;
        intentHash: `0x${string}` | null;
    }[];
    depositFundsAddeds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        depositDelta: {
            orderId: `0x${string}`;
            logId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            amountBefore: bigint;
            delta: bigint;
            amountAfter: bigint;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        eventName: string;
        participantAddress: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}` | null;
        depositLocalId: bigint | null;
        depositChainId: bigint | null;
        paymentMethodId: `0x${string}` | null;
        currency: `0x${string}` | null;
        intentHash: `0x${string}` | null;
    }[];
    depositRetainOnEmptyUpdateds: {
        transaction: {
            block: {
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                number: bigint;
                timestamp: bigint;
            } | undefined;
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            blockId: `0x${string}`;
            index: bigint;
            from: `0x${string}`;
            to: `0x${string}`;
        } | undefined;
        participant: {
            address: `0x${string}`;
            chainId: bigint;
            firstSeenAt: bigint | null;
            lastSignaledAt: bigint | null;
        } | undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        eventName: string;
        participantAddress: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}` | null;
        depositLocalId: bigint | null;
        depositChainId: bigint | null;
        paymentMethodId: `0x${string}` | null;
        currency: `0x${string}` | null;
        intentHash: `0x${string}` | null;
    }[];
    depositStats: {
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        maxRemaining: bigint;
        totalAmountTaken: bigint;
        totalWithdrawn: bigint;
        grossDeposited: bigint;
        signaledIntents: number;
        fulfilledIntents: number;
        prunedIntents: number;
        successRateBps: number;
        updatedAt: bigint;
    } | null;
    escrow: `0x${string}`;
    localId: bigint;
    chainId: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    token: `0x${string}`;
    participantAddress: `0x${string}`;
    deposited: bigint;
    remaining: bigint;
    outstandingIntentAmount: bigint;
    minAmount: bigint;
    maxAmount: bigint;
    depositConversionRateCurrencies: `0x${string}`[];
    depositConversionRateVerifiers: `0x${string}`[];
    version: "v2" | "v3";
    acceptingIntents: boolean;
    delegate: `0x${string}`;
    intentGuardian: `0x${string}`;
    retainOnEmpty: boolean;
    status: "active" | "closed" | "paused" | "withdrawn" | "underfunded";
} | null>;
/**
 * Get deposits for a specific participant (user address).
 * Fetches essential relations needed for filtering and display in list views.
 * Use getDepositByCompoundKey for full data with all relations.
 */
declare function getDepositsByParticipant(participantAddress: Hex, chainId?: ChainId): Promise<{
    depositId: `0x${string}`;
    owner: {
        address: `0x${string}`;
        chainId: bigint;
        firstSeenAt: bigint | null;
        lastSignaledAt: bigint | null;
    };
    transaction: {
        block: {
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            number: bigint;
            timestamp: bigint;
        } | undefined;
        hash: `0x${string}`;
        chainId: bigint;
        orderId: `0x${string}`;
        blockId: `0x${string}`;
        index: bigint;
        from: `0x${string}`;
        to: `0x${string}`;
    } | null;
    depositReceiveds: {
        depositId: `0x${string}`;
        transaction: undefined;
        participant: undefined;
        depositDelta: undefined;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        token: `0x${string}`;
        participantAddress: `0x${string}`;
        amount: bigint;
        transactionId: `0x${string}`;
    }[];
    depositWithdrawns: {
        depositId: `0x${string}`;
        transaction: undefined;
        participant: undefined;
        depositDelta: undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        participantAddress: `0x${string}`;
        amount: bigint;
        transactionId: `0x${string}`;
    }[];
    depositCloseds: {
        depositId: `0x${string}`;
        transaction: undefined;
        participant: undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        participantAddress: `0x${string}`;
        transactionId: `0x${string}`;
    }[];
    intentFulfilleds: {
        depositId: `0x${string}`;
        transaction: undefined;
        depositConversionRateUpdated: {
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            paymentMethodId: `0x${string}`;
            currency: `0x${string}`;
            changeId: number;
            orderId: `0x${string}`;
            logId: `0x${string}`;
            transactionId: `0x${string}`;
            verifier: `0x${string}`;
            value: bigint;
            active: boolean;
        } | null;
        participant: undefined;
        depositDelta: undefined;
        paymentVerified: null;
        depositCurrencyAddedId: `0x${string}`;
        depositConversionRateUpdatedId: `0x${string}` | null;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        intentHash: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        transactionId: `0x${string}`;
        participantAddress: `0x${string}`;
        amount: bigint;
        paymentMethodId: `0x${string}`;
        fiatCurrency: `0x${string}`;
        conversionRateChangeId: number | null;
        conversionRate: bigint | null;
        sustainabilityFee: bigint | null;
        verifierFee: bigint | null;
        ownerAddress: `0x${string}` | null;
        manualRelease: boolean | null;
        fillTimeSeconds: bigint | null;
    }[];
    intentSignaleds: {
        depositId: `0x${string}`;
        transaction: undefined;
        participant: undefined;
        toParticipant: undefined;
        intentHash: `0x${string}`;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        escrow: `0x${string}`;
        paymentMethodId: `0x${string}`;
        ownerAddress: `0x${string}`;
        toAddress: `0x${string}`;
        amount: bigint;
        fiatCurrency: `0x${string}`;
        conversionRate: bigint;
        timestamp: bigint;
        conversionRateChangeId: number | null;
        status: string;
    }[];
    intentPruneds: {
        depositId: `0x${string}`;
        transaction: undefined;
        participant: undefined;
        orderId: `0x${string}`;
        logId: `0x${string}`;
        intentHash: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        transactionId: `0x${string}`;
        participantAddress: `0x${string}`;
        isLateCancellation: boolean;
    }[];
    depositCurrencyAddeds: never[];
    depositVerifierAddeds: never[];
    depositConversionRateUpdateds: never[];
    depositIntentAmountRangeUpdateds: never[];
    depositFundsAddeds: never[];
    escrow: `0x${string}`;
    localId: bigint;
    chainId: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    token: `0x${string}`;
    participantAddress: `0x${string}`;
    deposited: bigint;
    remaining: bigint;
    outstandingIntentAmount: bigint;
    minAmount: bigint;
    maxAmount: bigint;
    depositConversionRateCurrencies: `0x${string}`[];
    depositConversionRateVerifiers: `0x${string}`[];
    version: "v2" | "v3";
    acceptingIntents: boolean;
    delegate: `0x${string}`;
    intentGuardian: `0x${string}`;
    retainOnEmpty: boolean;
    status: "active" | "closed" | "paused" | "withdrawn" | "underfunded";
}[]>;
/**
 * Get all verifiers for a deposit by its orderId
 * Returns the depositVerifierAdded records for the deposit
 */
declare function getVerifiersByDepositId(depositOrderId: Hex): Promise<{
    depositEscrow: `0x${string}`;
    depositLocalId: bigint;
    depositChainId: bigint;
    paymentMethodId: `0x${string}`;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    verifier: `0x${string}`;
    transactionId: `0x${string}`;
    participantAddress: `0x${string}`;
    payeeDetailsHash: `0x${string}`;
    intentGatingService: `0x${string}`;
    active: boolean;
    currentActiveChangeId: number | null;
}[]>;
/**
 * Get payee details for a deposit and payment method.
 * @param serializedDepositKey - The serialized deposit compound key from orderId.deposit.serialize()
 * @param paymentMethodId - The payment method ID (bytes32 hash)
 * @returns The depositVerifierAdded record or null if not found
 */
declare function getPayeeDetails(serializedDepositKey: Hex, paymentMethodId: Hex): Promise<{
    depositEscrow: `0x${string}`;
    depositLocalId: bigint;
    depositChainId: bigint;
    paymentMethodId: `0x${string}`;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    verifier: `0x${string}`;
    transactionId: `0x${string}`;
    participantAddress: `0x${string}`;
    payeeDetailsHash: `0x${string}`;
    intentGatingService: `0x${string}`;
    active: boolean;
    currentActiveChangeId: number | null;
} | null>;
/**
 * Get transaction by hash
 */
declare function getTransactionByHash(hash: Hex): Promise<{
    hash: `0x${string}`;
    chainId: bigint;
    orderId: `0x${string}`;
    blockId: `0x${string}`;
    index: bigint;
    from: `0x${string}`;
    to: `0x${string}`;
}>;
/**
 * Get active deposits (status = 'active')
 */
declare function getActiveDeposits(chainId?: ChainId): Promise<{
    escrow: `0x${string}`;
    localId: bigint;
    chainId: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    token: `0x${string}`;
    participantAddress: `0x${string}`;
    deposited: bigint;
    remaining: bigint;
    outstandingIntentAmount: bigint;
    minAmount: bigint;
    maxAmount: bigint;
    depositConversionRateCurrencies: `0x${string}`[];
    depositConversionRateVerifiers: `0x${string}`[];
    version: "v2" | "v3";
    acceptingIntents: boolean;
    delegate: `0x${string}`;
    intentGuardian: `0x${string}`;
    retainOnEmpty: boolean;
    status: "active" | "closed" | "paused" | "withdrawn" | "underfunded";
}[]>;
/**
 * Get deposits with conversion rates
 */
declare function getDepositsWithRates(params: {
    chainId?: ChainId;
    status?: string;
    minAmount?: bigint;
    maxAmount?: bigint;
    currencies?: Hex[];
}): Promise<{
    escrow: `0x${string}`;
    localId: bigint;
    chainId: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    token: `0x${string}`;
    participantAddress: `0x${string}`;
    deposited: bigint;
    remaining: bigint;
    outstandingIntentAmount: bigint;
    minAmount: bigint;
    maxAmount: bigint;
    depositConversionRateCurrencies: `0x${string}`[];
    depositConversionRateVerifiers: `0x${string}`[];
    version: "v2" | "v3";
    acceptingIntents: boolean;
    delegate: `0x${string}`;
    intentGuardian: `0x${string}`;
    retainOnEmpty: boolean;
    status: "active" | "closed" | "paused" | "withdrawn" | "underfunded";
}[]>;
/**
 * Get intent signals for a deposit
 * Pass the deposit's orderId
 */
declare function getIntentSignals(depositOrderId: Hex): Promise<{
    intentHash: `0x${string}`;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    depositEscrow: `0x${string}`;
    depositLocalId: bigint;
    depositChainId: bigint;
    escrow: `0x${string}`;
    paymentMethodId: `0x${string}`;
    ownerAddress: `0x${string}`;
    toAddress: `0x${string}`;
    amount: bigint;
    fiatCurrency: `0x${string}`;
    conversionRate: bigint;
    timestamp: bigint;
    conversionRateChangeId: number | null;
    status: string;
}[]>;
/**
 * Get intent by hash from the indexer, including expiry time via fundsLocked relation.
 *
 * @param intentHash - The intent hash (bytes32)
 * @param chainId - Optional chain ID to filter by (required for cross-chain support)
 * @returns The intent signaled record with fundsLocked relation or null
 *
 * @remarks
 * If chainId is not provided, returns the first intent found with the given hash.
 * For proper cross-chain support, always provide the chainId to avoid ambiguity.
 */
declare function getIntentByHash(intentHash: Hex, chainId?: ChainId): Promise<{
    timestamp: bigint;
    orderId: `0x${string}`;
    logId: `0x${string}`;
    transactionId: `0x${string}`;
    depositEscrow: `0x${string}`;
    depositLocalId: bigint;
    depositChainId: bigint;
    paymentMethodId: `0x${string}`;
    intentHash: `0x${string}`;
    amount: bigint;
    escrow: `0x${string}`;
    status: string;
    ownerAddress: `0x${string}`;
    toAddress: `0x${string}`;
    fiatCurrency: `0x${string}`;
    conversionRate: bigint;
    conversionRateChangeId: number | null;
    fundsLocked: {
        orderId: `0x${string}`;
        logId: `0x${string}`;
        transactionId: `0x${string}`;
        depositEscrow: `0x${string}`;
        depositLocalId: bigint;
        depositChainId: bigint;
        intentHash: `0x${string}`;
        amount: bigint;
        expiryTime: bigint;
    };
} | null>;
/**
 * Get stats for analytics
 */
declare function getStats(params: {
    chainId?: ChainId;
    startTime?: bigint;
    endTime?: bigint;
    type?: string;
}): Promise<{
    orderId: `0x${string}`;
    type: string;
    event: string;
    amount: bigint;
    currency: `0x${string}` | null;
    token: `0x${string}`;
    verifier: `0x${string}`;
    chainId: bigint;
    timestamp: bigint;
    version: "v2" | "v3";
}[]>;
/**
 * Represents a location where a deposit with a specific localId exists
 */
type DepositLocation = EscrowLocation & {
    deposit: {
        orderId: Hex;
        localId: bigint;
        status: string;
        remaining: bigint;
    };
};
/**
 * Find all locations where a deposit with a given localId exists.
 * Searches across all escrow contracts on all chains and versions.
 *
 * This is useful when a user navigates to a deposit by ID alone,
 * since the same localId can exist on different escrow contracts.
 *
 * @param localId - The deposit's local ID (numeric ID within an escrow)
 * @returns Array of locations where this deposit exists
 *
 * @example
 * // Find all escrows that have deposit #989
 * const locations = await findDepositLocations(989n)
 * // Returns locations on v2/base, v3/base, etc. if they exist
 */
declare function findDepositLocations(localId: bigint): Promise<DepositLocation[]>;
/**
 * User reputation stats for tier calculation.
 * Volume is measured in USDC which is 1:1 with USD.
 */
interface UserReputationStats {
    /** Taker-side fulfilled volume in USDC 6-decimal base units (1:1 with
     *  USD at the dollar level — `$153.04` is `153_040_000n`). Sum of
     *  `intent.amount` across every intent this user signaled that
     *  reached fulfillment. Kept as `bigint` end-to-end so the server-
     *  side tier check and the cap check use the same primitive — see
     *  the `money-values-stay-bigint-until-display` rule. */
    fulfilledVolume: bigint;
    /** Taker-side fulfilled intent count. */
    fulfilledCount: number;
    /** Maker-side fulfilled volume in USDC 6-decimal base units. Sum of
     *  `intent.amount` across every intent that closed against a deposit
     *  owned by this user. Optional pending the indexer schema migration
     *  that adds the `fulfilledMakerVolume` column; reads `undefined`
     *  until then and the consumer should treat that as `0n`. */
    fulfilledMakerVolume?: bigint;
    /** Maker-side fulfilled intent count. Same `undefined`-until-migration
     *  caveat as `fulfilledMakerVolume`. */
    fulfilledMakerCount?: number;
    /** Number of late cancellations (pruned >15min after signal) */
    lateCancellations: number;
    /** Total intents signaled */
    totalSignaled: number;
    /** Total cancelled volume in USDC 6-decimal base units */
    cancelledVolume: bigint;
}
/**
 * Get user reputation stats for tier calculation.
 * Reads from the pre-computed participantStats table (maintained incrementally
 * by IntentSignaled/Fulfilled/Pruned event handlers) instead of joining
 * across 4+ tables at query time.
 *
 * @param address - User's wallet address
 * @param chainId - Optional chain filter (omit to aggregate across all chains)
 * @returns User reputation stats
 */
declare function getUserReputationStats({ address, chainId, }: {
    address: Hex;
    chainId?: ChainId;
}): Promise<UserReputationStats>;
/**
 * One participantStats row as the aggregator consumes it. The shape is a
 * subset of the Drizzle row so the aggregator stays decoupled from the
 * database driver — pass plain objects in tests, the real query result
 * in production.
 */
interface ParticipantStatsRow {
    fulfilledVolume: bigint;
    fulfilledCount: number;
    fulfilledMakerVolume: bigint;
    fulfilledMakerCount: number;
    lateCancellations: number;
    totalSignaled: number;
}
/**
 * Pure aggregation step for getUserReputationStats — sums the
 * per-chain participantStats rows the SQL layer returns and rebases the
 * bigint base-unit columns to USDC (1:1 with USD). Extracted so the
 * aggregation can be tested without a Ponder database.
 */
declare function aggregateReputationStatsRows({ statsRows, pruneRows, }: {
    statsRows: ReadonlyArray<ParticipantStatsRow>;
    pruneRows: ReadonlyArray<{
        amount: bigint;
    }>;
}): UserReputationStats;
/**
 * Get the timestamp of the user's last signaled intent.
 * Cooldowns start from when an intent is signaled, not when it's fulfilled.
 * Reads from participant.lastSignaledAt (maintained by IntentSignaled handler).
 *
 * @param address - User's wallet address
 * @param chainId - Chain ID (only Base for now since cooldowns only apply there)
 * @returns Timestamp in seconds of last signaled intent, or null if none
 */
declare function getLastSignaledIntentTimestamp({ address, chainId, }: {
    address: Hex;
    chainId: ChainId;
}): Promise<bigint | null>;
/**
 * Get the timestamp when the user first signaled an intent on a specific chain.
 * Used to display "Member Since" date in the user profile.
 * Reads from participant.firstSeenAt (maintained by IntentSignaled handler).
 *
 * @param address - User's wallet address
 * @param chainId - Chain ID to check
 * @returns Date of first signaled intent, or null if none
 */
declare function getUserMemberSince({ address, chainId, }: {
    address: Hex;
    chainId: ChainId;
}): Promise<Date | null>;
/**
 * Information about a deposit for cross-chain detection.
 * Used to identify deposits across chains that share the same payment identity.
 */
interface CrossChainDepositInfo {
    /** Escrow contract address */
    escrow: Hex;
    /** Local deposit ID within the escrow */
    localId: bigint;
    /** Chain ID where this deposit exists */
    chainId: ChainId;
    /** Current deposit status */
    status: string;
    /** Remaining balance in the deposit */
    remaining: bigint;
    /** Payment method ID (keccak256 hash of provider key) */
    paymentMethodId: Hex;
}
/**
 * Verifier input for cross-chain deposit queries.
 * Represents a single payment method on a deposit.
 */
interface VerifierInput {
    payeeDetailsHash: Hex;
    paymentMethodId: Hex;
}
/**
 * Get all V3 deposits that share any of the given payee details hashes.
 * Used to detect cross-chain deposits for the same payment identity.
 *
 * Note: Only V3 deposits are considered. V2 deposits are excluded as they
 * use a different payment verification system.
 *
 * @param verifiers - Array of verifier inputs (payeeDetailsHash + paymentMethodId pairs)
 * @returns Array of V3 deposit info across all chains matching any of the payee details
 */
declare function getDepositsByPayeeDetails({ verifiers, }: {
    verifiers: VerifierInput[];
}): Promise<CrossChainDepositInfo[]>;
/**
 * Order history item for user transaction history display.
 * Represents a single intent at any lifecycle stage.
 */
interface OrderHistoryItem {
    /** Unique order identifier */
    orderId: string;
    /** When the intent was signaled */
    timestamp: Date;
    /** Current status of the order */
    status: 'signaled' | 'fulfilled' | 'cancelled' | 'expired';
    /** Amount in crypto (formatted string) */
    amountCrypto: string;
    /** Amount in fiat currency (formatted string) */
    amountFiat: string;
    /** Crypto token symbol (e.g., "USDC") */
    tokenSymbol: string;
    /** Fiat currency code (e.g., "USD") */
    currencyCode: string;
    /** Payment provider key for icon display */
    providerKey: ProviderKey;
    /** Chain where the order occurred */
    chainId: ChainId;
    /** Associated deposit ID for navigation */
    depositId: string;
    /** Transaction hash for blockchain explorer link */
    transactionHash: string;
    /** Deposit escrow address */
    escrow: Hex;
    /** Deposit local ID */
    localId: bigint;
}
/**
 * Get user's order history (intents signaled, fulfilled, and pruned).
 * Queries across all chains and returns chronologically ordered results.
 *
 * @param address - User's wallet address
 * @param limit - Maximum number of orders to return (default 50)
 * @param offset - Number of orders to skip for pagination (default 0)
 * @returns Array of order history items
 */
declare function getUserOrderHistory({ address, limit, offset, status, }: {
    address: Hex;
    limit?: number;
    offset?: number;
    /** Filter by lifecycle status. Omit to return all statuses. */
    status?: 'fulfilled' | 'cancelled' | 'expired' | 'signaled';
}): Promise<OrderHistoryItem[]>;

/**
 * @fileoverview Deposit model and UI presentation logic.
 *
 * The `Deposit` class wraps raw Ponder deposit data and provides:
 * - Formatted display values (amounts, rates, addresses)
 * - Computed properties (remaining liquidity, status, events)
 * - Helper methods for UI rendering
 *
 * @remarks
 * This is the primary data model used throughout the UI for deposit
 * information. It handles both V2 and V3 deposit structures.
 *
 * @see {@link depositStatuses} for status enum from @provex/utils
 * @see {@link PonderDeposit} for the raw data type
 */

/**
 * Extracted element types from PonderDeposit arrays.
 * These provide type-safe access to individual records from ponder queries.
 */
type PonderDepositReceived = PonderDeposit['depositReceiveds'][number];
type PonderDepositWithdrawn = PonderDeposit['depositWithdrawns'][number];
type PonderDepositClosed = PonderDeposit['depositCloseds'][number];
type PonderDepositCurrencyAdded = PonderDeposit['depositCurrencyAddeds'][number];
type PonderDepositVerifierAdded = PonderDeposit['depositVerifierAddeds'][number];
type PonderDepositConversionRateUpdated = PonderDeposit['depositConversionRateUpdateds'][number];
type PonderIntentSignaled = PonderDeposit['intentSignaleds'][number];
type PonderIntentPruned = PonderDeposit['intentPruneds'][number];
type PonderIntentFulfilled = PonderDeposit['intentFulfilleds'][number];
type PonderDepositIntentAmountRangeUpdated = PonderDeposit['depositIntentAmountRangeUpdateds'][number];
type PonderDepositFundsAdded = PonderDeposit['depositFundsAddeds'][number];
type PonderDepositRetainOnEmptyUpdated = PonderDeposit['depositRetainOnEmptyUpdateds'][number];
type PonderParticipant = NonNullable<PonderDeposit['owner']>;
type PonderTransaction = NonNullable<PonderDeposit['transaction']>;
type DepositReceived = PonderDepositReceived;
type DepositWithdrawn = PonderDepositWithdrawn;
type DepositClosed = PonderDepositClosed;
type DepositCurrencyAdded = PonderDepositCurrencyAdded;
type DepositVerifierAdded = PonderDepositVerifierAdded;
type DepositConversionRateUpdated = PonderDepositConversionRateUpdated;
type IntentSignaled = PonderIntentSignaled;
type IntentPruned = PonderIntentPruned;
type IntentFulfilled = PonderIntentFulfilled;
type Participant = PonderParticipant;
type Transaction = PonderTransaction;
/**
 * Type for deposit data from Ponder SQL queries
 */
type DepositInput = PonderDeposit;

interface DepositStatusConfig {
    label: string;
    color: string;
    tooltip: string;
}
declare const depositStatusConfigs: Record<DepositStatus, DepositStatusConfig>;
/**
 * Calculate derived status based on events and amounts.
 *
 * Status priority:
 * 1. CLOSED - deposit was explicitly closed
 * 2. WITHDRAWN - deposit was fully withdrawn (remaining = 0) with withdrawal events
 * 3. UNDERFUNDED - remaining balance is below minimum thresholds
 * 4. ACTIVE - deposit can accept exchanges
 *
 * Note: Partial withdrawals (depositWithdrawns with remaining > 0) do NOT
 * automatically make a deposit WITHDRAWN. Status depends on remaining balance.
 */
declare function calculateDepositStatus(deposit: Deposit, tokenInfo: TokenInfo, providerRates?: ProviderRates<ConversionRateInfo>): DepositStatus;
interface FormattedNumbers {
    remaining: string;
    minAmount: string;
    maxAmount: string;
    effectiveMinAmount: string;
    effectiveMaxAmount: string;
    profit?: string;
}
declare class Deposit {
    deposit: DepositInput;
    depositReceiveds: PonderDepositReceived[];
    depositWithdrawns: PonderDepositWithdrawn[];
    depositCloseds: PonderDepositClosed[];
    depositCurrencyAddeds: PonderDepositCurrencyAdded[];
    depositVerifierAddeds: PonderDepositVerifierAdded[];
    depositConversionRateUpdateds: PonderDepositConversionRateUpdated[];
    depositIntentAmountRangeUpdateds: PonderDepositIntentAmountRangeUpdated[];
    depositFundsAddeds: PonderDepositFundsAdded[];
    depositRetainOnEmptyUpdateds: PonderDepositRetainOnEmptyUpdated[];
    intentSignaleds: PonderIntentSignaled[];
    intentPruneds: PonderIntentPruned[];
    intentFulfilleds: PonderIntentFulfilled[];
    private _transaction;
    /**
     * Pre-computed locked funds amount, injected by useMatchableDeposits
     * when full intent data isn't fetched. Null means "use intent-based calculation".
     */
    private _computedLockedFunds;
    private _computedReclaimableFunds;
    private _resolvedViaUnlock;
    constructor(deposit: DepositInput);
    /**
     * Access a base property from the deposit data.
     */
    access<K extends keyof PonderDeposit>(key: K): PonderDeposit[K];
    /**
     * Get the deposit ID (localId) by parsing from the orderId.
     * This is the on-chain numeric ID within the escrow contract.
     */
    get depositId(): bigint;
    /**
     * Get the local deposit ID (the actual numeric ID within the escrow contract).
     * This is the ID to use when building URLs or referencing the deposit.
     * This comes from the `localId` field directly.
     */
    get localId(): bigint;
    get logId(): `0x${string}`;
    get transaction(): {
        block: {
            hash: `0x${string}`;
            chainId: bigint;
            orderId: `0x${string}`;
            number: bigint;
            timestamp: bigint;
        } | undefined;
        hash: `0x${string}`;
        chainId: bigint;
        orderId: `0x${string}`;
        blockId: `0x${string}`;
        index: bigint;
        from: `0x${string}`;
        to: `0x${string}`;
    } | null;
    get block(): {
        hash: `0x${string}`;
        chainId: bigint;
        orderId: `0x${string}`;
        number: bigint;
        timestamp: bigint;
    } | null;
    get timestamp(): Date;
    get endTimestamp(): Date | null;
    get transactionId(): `0x${string}`;
    get participantAddress(): `0x${string}`;
    get owner(): {
        address: `0x${string}`;
        chainId: bigint;
        firstSeenAt: bigint | null;
        lastSignaledAt: bigint | null;
    } | null;
    get orderId(): `0x${string}`;
    get minAmount(): bigint;
    get maxAmount(): bigint;
    get remaining(): bigint;
    get deposited(): bigint;
    /** High-water mark of remaining balance from depositStats. Falls back to deposited if unavailable. */
    get maxRemaining(): bigint;
    /**
     * Get the total amount withdrawn from this deposit.
     * Sum of all depositWithdrawn event amounts.
     */
    get totalWithdrawn(): bigint;
    get token(): TokenInfo | null;
    /**
     * Returns the token info or a stub with 18 decimals for unknown tokens.
     * Use this when a non-null TokenInfo is required for calculations.
     */
    get tokenOrStub(): TokenInfo;
    /**
     * Indexer-stored status — what the Ponder DB last wrote on the row. May be
     * stale for V3 deposits whose liquidity dropped below min via IntentSignaled
     * events (the V3 indexer doesn't re-derive status on signal). Prefer
     * {@link displayStatus} for UI surfaces; reserve this getter for SQL
     * filters that operate on the indexer's stored value.
     */
    get status(): DepositStatus;
    /**
     * Live, derived status for display.
     *
     * The indexer-side derivation (`packages/indexer/src/depositStatus.ts`)
     * only re-runs on a fixed set of actions — deposit / withdrawal / exchange /
     * close — and compares against the raw `remaining` field. Two real-world
     * gaps follow from that:
     *
     * 1. **IntentSignaled doesn't trigger a status recompute.** A maker whose
     *    active intents lock most of the deposit balance below min still sees
     *    `status='active'` from the indexer. The contract's `signalIntent`
     *    reverts on the next attempt (Escrow.sol:495-496), so the deposit is
     *    effectively unusable — but the badge lies.
     *
     * 2. **Raw `remaining` ignores active locks.** `availableFunds = remaining
     *    + reclaimableFunds - lockedFunds` is the actual usable balance from a
     *    new-intent perspective. Comparing `remaining` to `min` overstates
     *    capacity when most of `remaining` is already promised to in-flight
     *    intents.
     *
     * This getter consolidates both:
     * - Honors terminal states from the indexer (CLOSED, WITHDRAWN — these
     *   come from explicit on-chain events that the indexer reliably catches).
     * - Layers PAUSED next via the live `acceptingIntents` flag (V3 only; V2's
     *   getter always reads true, so V2 deposits skip this branch).
     * - Layers UNDERFUNDED via live `availableFunds` vs `effectiveMinAmount`.
     * - Falls through to ACTIVE.
     *
     * Priority order is "most-restrictive-wins": a paused-and-underfunded
     * deposit reads PAUSED, since pause requires explicit maker action to
     * recover while underfunded can self-heal via expired-intent pruning.
     */
    get displayStatus(): DepositStatus;
    /**
     * True when the deposit's live usable balance is below the maker's
     * effective minimum — i.e. no new intent can be signaled. Used by
     * provider cards on the deposit detail page to swap the "would buy"
     * numbers for an "Insufficient liquidity" placeholder.
     */
    get isInsufficientLiquidity(): boolean;
    get chainId(): ChainId;
    /**
     * Get the escrow contract address for this deposit.
     */
    get escrow(): Hex;
    /**
     * Get whether the deposit should remain open when balance reaches zero.
     * V3 only - V2 deposits always return false.
     */
    get retainOnEmpty(): boolean;
    /**
     * Get whether the deposit is accepting new intents.
     * V3 only - V2 deposits always return true (no pause functionality).
     */
    get acceptingIntents(): boolean;
    /**
     * Check if an intent is expired based on its on-chain expiryTime from fundsLocked.
     * Falls back to timestamp-based calculation if expiryTime is not available.
     * @param intent - The intent signaled record with optional fundsLocked relation
     * @returns true if the intent has expired
     */
    isIntentExpired(intent: PonderIntentSignaled): boolean;
    /**
     * Get the expiry time for an intent from its fundsLocked record.
     * @param intent - The intent signaled record with optional fundsLocked relation
     * @returns The expiry timestamp in seconds, or null if not available
     */
    getIntentExpiryTime(intent: PonderIntentSignaled): bigint | null;
    get unprunedIntents(): {
        active: {
            transaction: {
                block: {
                    hash: `0x${string}`;
                    chainId: bigint;
                    orderId: `0x${string}`;
                    number: bigint;
                    timestamp: bigint;
                } | undefined;
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                blockId: `0x${string}`;
                index: bigint;
                from: `0x${string}`;
                to: `0x${string}`;
            } | undefined;
            verifier: `0x${string}`;
            participant: {
                address: `0x${string}`;
                chainId: bigint;
                firstSeenAt: bigint | null;
                lastSignaledAt: bigint | null;
            } | undefined;
            fundsLocked: {
                orderId: `0x${string}`;
                logId: `0x${string}`;
                depositEscrow: `0x${string}`;
                depositLocalId: bigint;
                depositChainId: bigint;
                intentHash: `0x${string}`;
                amount: bigint;
                expiryTime: bigint;
                transactionId: `0x${string}`;
            } | undefined;
            depositCurrencyAddedId: `0x${string}`;
            depositConversionRateUpdatedId: `0x${string}` | null;
            intentHash: `0x${string}`;
            orderId: `0x${string}`;
            logId: `0x${string}`;
            transactionId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            escrow: `0x${string}`;
            paymentMethodId: `0x${string}`;
            ownerAddress: `0x${string}`;
            toAddress: `0x${string}`;
            amount: bigint;
            fiatCurrency: `0x${string}`;
            conversionRate: bigint;
            timestamp: bigint;
            conversionRateChangeId: number | null;
            status: string;
        }[];
        expired: {
            transaction: {
                block: {
                    hash: `0x${string}`;
                    chainId: bigint;
                    orderId: `0x${string}`;
                    number: bigint;
                    timestamp: bigint;
                } | undefined;
                hash: `0x${string}`;
                chainId: bigint;
                orderId: `0x${string}`;
                blockId: `0x${string}`;
                index: bigint;
                from: `0x${string}`;
                to: `0x${string}`;
            } | undefined;
            verifier: `0x${string}`;
            participant: {
                address: `0x${string}`;
                chainId: bigint;
                firstSeenAt: bigint | null;
                lastSignaledAt: bigint | null;
            } | undefined;
            fundsLocked: {
                orderId: `0x${string}`;
                logId: `0x${string}`;
                depositEscrow: `0x${string}`;
                depositLocalId: bigint;
                depositChainId: bigint;
                intentHash: `0x${string}`;
                amount: bigint;
                expiryTime: bigint;
                transactionId: `0x${string}`;
            } | undefined;
            depositCurrencyAddedId: `0x${string}`;
            depositConversionRateUpdatedId: `0x${string}` | null;
            intentHash: `0x${string}`;
            orderId: `0x${string}`;
            logId: `0x${string}`;
            transactionId: `0x${string}`;
            depositEscrow: `0x${string}`;
            depositLocalId: bigint;
            depositChainId: bigint;
            escrow: `0x${string}`;
            paymentMethodId: `0x${string}`;
            ownerAddress: `0x${string}`;
            toAddress: `0x${string}`;
            amount: bigint;
            fiatCurrency: `0x${string}`;
            conversionRate: bigint;
            timestamp: bigint;
            conversionRateChangeId: number | null;
            status: string;
        }[];
    };
    get lockedFunds(): bigint;
    get reclaimableFunds(): bigint;
    get availableFunds(): bigint;
    get effectiveMinAmount(): bigint;
    get effectiveMaxAmount(): bigint;
    get currentConversionRates(): ProviderRates<ConversionRateInfo>;
    get historicalConversionRates(): ProviderRates<ConversionRateInfo[]>;
    get formattedNumbers(): FormattedNumbers;
    canAcceptAmount(amount: bigint): boolean;
    get usdConversionRates(): Map<ProviderKey | SubProviderKey, ConversionRateInfo>;
    get lowestUsdConversionRate(): ConversionRateInfo | null;
    get primaryConversionRate(): ConversionRateInfo | null;
    /**
     * Set of lowercased `paymentMethodId` hex hashes for every payment method
     * that has EVER been attached to this deposit — active OR inactive.
     *
     * This is the contract-truth "no longer addable" set: once a paymentMethodId
     * is on this deposit, `addPaymentMethods` will revert with
     * `PaymentMethodAlreadyExists` if the same hash is submitted again, even
     * after `setPaymentMethodActive(false)`. The contract only has a remove-by-
     * deactivate path; the row in `depositVerifierAdded` is permanent.
     *
     * Use this for "can this provider still be added to this deposit?" decisions
     * (Add Platform modal, Add Platform card enable gate). Do NOT use it for
     * buyer-facing "is this active right now?" checks — use
     * {@link activePaymentMethodIds}, {@link isProviderActive}, or
     * {@link currentConversionRates} for those.
     *
     * For V3 deposits the value comes from `depositVerifierAdded.paymentMethodId`
     * (a keccak hash of the provider key, e.g. `keccak('zelle-chase')`). For V2
     * deposits the same field is populated by the indexer with a derived hash;
     * both shapes are comparable to `providerKeyToContractId(key)`.
     */
    get attachedPaymentMethodIds(): Set<string>;
    /**
     * Set of identifiers (lowercased) that are CURRENTLY ACTIVE on this
     * deposit. Used by the provider-surfacing getters below.
     *
     * The set intentionally stores BOTH `paymentMethodId` and the non-zero
     * `verifier` for each active row. V3 rows have `paymentMethodId` = keccak
     * hash and `verifier` = zeroAddress (sentinel); V2 rows have
     * `paymentMethodId` = derived hash and `verifier` = contract address.
     * Downstream lookups (`providerCurrencies`, `paymentProviders`) consume
     * the denormalized `depositConversionRateVerifiers` array on the deposit
     * row, which stores the V3 hash on V3 chains and the V2 verifier address
     * on V2 chains — adding both identifiers here lets the active check work
     * against either shape without branching at the call site.
     *
     * Treat absence-of-`active`-field as active=true so legacy v2 rows are
     * not accidentally hidden.
     */
    private get activePaymentMethodIds();
    get paymentProviders(): Set<ProviderKey | SubProviderKey>;
    /**
     * Provider + currency combinations from the denormalized deposit arrays.
     * Groups currencies by provider key for compact display.
     *
     * Returns a Map: ProviderKey → Currency[] (e.g., "revolut" → [EUR, USD])
     *
     * The denormalized `depositConversionRateVerifiers` array on the deposit
     * row reflects every payment method ever attached and does NOT prune on
     * `setPaymentMethodActive(false)`. We re-filter here against the per-row
     * verifier table's `active` flag so deactivated methods don't surface.
     */
    get providerCurrencies(): Map<ProviderKey | SubProviderKey, Currency[]>;
    /**
     * Same shape as `providerCurrencies` but WITHOUT the active filter — every
     * provider that has ever had a currency attached on this deposit shows up.
     * Use this on maker-facing surfaces (e.g. the sell-table) where the maker
     * needs to see inactive payment methods alongside active ones so they can
     * re-enable them. Pair with `isProviderActive(key)` at the render site to
     * apply a "disabled" treatment to the inactive entries.
     */
    get allProviderCurrencies(): Map<ProviderKey | SubProviderKey, Currency[]>;
    get profit(): {
        profit: bigint;
        nullAmounts: number;
    };
    /**
     * Whether a given provider has an ACTIVE verifier registered on this
     * deposit. Distinct from `getVerifier()` which filters inactive rows out:
     * this method returns false ONLY when the row is missing or the row's
     * `active` field is explicitly false. Use this for "is this payment method
     * available for new buys right now" decisions and for the deposit-details
     * UI that wants to render inactive provider cards with a muted treatment.
     */
    isProviderActive(key: ProviderKey | SubProviderKey): boolean;
    getVerifier(key: ProviderKey | SubProviderKey): DepositVerifierAdded | PonderDepositVerifierAdded | null;
    providerByIntentHash(hash: Hex): ProviderKey | null;
}

type EasAttestationRow = {
    uid: string;
    recipient: string;
    attester: string;
    schemaUid: string;
    chainId: number;
    time: bigint;
    expirationTime: bigint;
    revocationTime: bigint;
    handle: string;
    platformHash: string;
    isOffchain?: boolean;
    ipfsHash?: string;
};
/**
 * Fetch active (non-revoked) identity attestations for `recipient`
 * from the Provex identity indexer (identity-indexer package).
 */
declare function fetchEasAttestations(recipient: string): Promise<EasAttestationRow[]>;

/**
 * Fetch the most recent active (non-revoked) identity attestations on
 * the Provex identity schema, newest first.
 *
 * Powers the Identity → Browse Others feed for chains the Provex
 * identity-indexer covers (currently PulseChain 369). Unlike easscan's
 * 100-row per-request cap, this query reaches the full history bounded
 * only by the caller-supplied `take`.
 */
declare function fetchRecentEasAttestations(args?: {
    take?: number;
}): Promise<EasAttestationRow[]>;

type LookupEasAttestationByHandleArgs = {
    /** `keccak256(bytes(hostname))` — the on-chain platform identity. */
    platformHash: Hex;
    /** Raw handle (already trimmed and `@`-stripped by the caller). */
    handle: string;
};
/**
 * Resolve a single active identity attestation by (platform, handle)
 * against the Provex identity-indexer.
 *
 * Implementation notes:
 *
 *   - The `(platformHash, revocationTime)` filter uses the table's
 *     `platformHash`-prefixed scan; the platform key narrows to one
 *     platform's set before the handle predicate runs.
 *   - Case-insensitivity is enforced in SQL via `lower(handle) = lower($)`
 *     so we don't pay the wire cost of streaming an entire platform's
 *     attestations to the client to filter in memory. The trade-off:
 *     `lower(handle)` does not use the plain `handleIdx`. If the table
 *     grows past a few hundred thousand rows on one platform, add a
 *     functional index `(lower(handle))` on the indexer side.
 *   - Sorted newest-first so a re-attestation (older revoked / newer
 *     active) returns the active row.
 *
 * Returns `null` when no match is found rather than throwing — the
 * "missing handle" case is the common path, not an error.
 */
declare function lookupEasAttestationByHandle(args: LookupEasAttestationByHandleArgs): Promise<EasAttestationRow | null>;

/**
 * @fileoverview Hook for fetching deposits that match a buyer's criteria.
 *
 * Queries the indexer for active V3 deposits that:
 * - Support the specified payment method
 * - Support the specified fiat currency
 * - Have sufficient liquidity for the requested amount
 * - Are accepting intents
 *
 * @remarks
 * This is the primary hook for the deposit selection flow. It filters
 * deposits by payment method and currency, then ranks them by conversion
 * rate to help buyers find the best deals.
 *
 * @see {@link useBestRate} for just the best rate without full deposit data
 */

/**
 * Options for the useMatchableDeposits hook.
 */
interface UseMatchableDepositsOptions {
    token: TokenInfo;
    paymentMethod: ProviderKey;
    currency?: Currency;
    /** Polling interval in milliseconds (default: 5000ms) */
    refetchIntervalMs?: number;
}
/**
 * Fetches matchable deposits from the indexer.
 * Extracted as a standalone async function for use with useAsyncData and
 * exported so integration probes / tests can exercise the exact same query
 * path the buy panel runs, without needing to render a React tree.
 */
declare function fetchMatchableDeposits({ token, paymentMethod, currency, }: {
    token: TokenInfo;
    paymentMethod: ProviderKey;
    currency: Currency;
}): Promise<Deposit[]>;
/**
 * Get the best (lowest) conversion rate for a deposit across the main provider and all
 * sub-providers (e.g., zelle-chase, zelle-bofa for zelle).
 *
 * Returns the minimum rate so that display and sort order are always consistent —
 * both reflect the best deal available from this deposit regardless of which
 * sub-provider happens to be listed first in the config.
 *
 * Returns 0n when the deposit has no rate for the given payment method / currency.
 */
declare const getRate: ({ deposit, paymentMethod, currency }: {
    deposit: Deposit | null | undefined;
    paymentMethod: ProviderKey | SubProviderKey;
    currency: Currency;
}) => bigint;
declare function useMatchableDeposits(options: UseMatchableDepositsOptions): {
    deposits: Deposit[];
    /** @deprecated Use isLoading for initial load, isUpdating for background refresh */
    loading: boolean;
    /** True during initial fetch when no data exists yet */
    isLoading: boolean;
    /** True during background refetch when data already exists */
    isUpdating: boolean;
    error: string | null;
    refetch: () => Promise<void>;
    filterDepositsByAmount: (amountInInt: bigint) => Deposit[];
    getMatchableDeposits: (amountInInt: bigint | null | string) => Deposit[];
};

/**
 * @fileoverview Generic async data fetching hook with loading states.
 *
 * A lightweight alternative to React Query for simpler use cases.
 * Provides clear loading/updating states and automatic polling.
 *
 * @remarks
 * **Loading vs Updating:**
 * - `isLoading`: True on initial fetch (no data yet) - show skeleton
 * - `isUpdating`: True on background refetch (data exists) - show subtle indicator
 *
 * This distinction allows UIs to avoid flashing loading states during
 * background polling while still showing proper initial loading states.
 *
 * @see {@link useBestRate} for example usage
 */

/**
 * Options for the useAsyncData hook.
 */
interface UseAsyncDataOptions {
    /**
     * Polling interval in milliseconds.
     * If set, data will be automatically refetched at this interval.
     * The interval is cleared on unmount to prevent memory leaks.
     */
    refetchInterval?: number;
    /**
     * If false, the fetch will not run.
     * Useful for conditional fetching based on dependencies being ready.
     * @default true
     */
    enabled?: boolean;
}
/**
 * Result returned by the useAsyncData hook.
 * @template T - The type of data returned by the fetch function
 */
interface UseAsyncDataResult<T> {
    /**
     * The fetched data, or null if not yet loaded or if fetch failed.
     * Data is preserved across refetches - only cleared on dependency changes.
     */
    data: T | null;
    /**
     * Error message if the fetch failed, null otherwise.
     * Cleared on successful fetch.
     */
    error: string | null;
    /**
     * True during the initial fetch when no data exists yet.
     * Use this to show a full loading skeleton/spinner.
     *
     * `isLoading = isFetching && data === null`
     */
    isLoading: boolean;
    /**
     * True during a background refetch when data already exists.
     * Use this to show a subtle update indicator while keeping existing data visible.
     *
     * `isUpdating = isFetching && data !== null`
     */
    isUpdating: boolean;
    /**
     * Backward compatibility flag.
     * True if either isLoading or isUpdating is true.
     *
     * `loading = isLoading || isUpdating`
     */
    loading: boolean;
    /**
     * Manually trigger a refetch.
     * Can be called to refresh data on user action.
     */
    refetch: () => Promise<void>;
}
/**
 * A hook for fetching async data with proper loading state semantics.
 *
 * Unlike naive implementations that set `loading=true` on every fetch,
 * this hook distinguishes between:
 * - `isLoading`: Initial load with no data (show skeleton)
 * - `isUpdating`: Background refresh with existing data (show subtle indicator)
 *
 * This prevents UI flicker during polling/refetch operations.
 *
 * @template T - The type of data returned by the fetch function
 * @param fetchFn - Async function that fetches and returns the data
 * @param deps - Dependencies that trigger a refetch when changed
 * @param options - Configuration options (refetchInterval, enabled)
 * @returns Object containing data, error, loading states, and refetch function
 *
 * @example
 * ```typescript
 * const { data, isLoading, isUpdating, error, refetch } = useAsyncData(
 *   async () => {
 *     const response = await fetch('/api/deposits')
 *     return response.json()
 *   },
 *   [userId],
 *   { refetchInterval: 5000, enabled: !!userId }
 * )
 *
 * if (isLoading) return <Skeleton />
 * if (error && !data) return <ErrorState error={error} />
 *
 * return (
 *   <Box opacity={isUpdating ? 0.7 : 1}>
 *     <DataTable data={data} />
 *     {isUpdating && <Spinner size="xs" />}
 *   </Box>
 * )
 * ```
 */
declare function useAsyncData<T>(fetchFn: () => Promise<T>, deps: DependencyList, options?: UseAsyncDataOptions): UseAsyncDataResult<T>;

/**
 * @fileoverview Hook for fetching the best (lowest) conversion rate.
 *
 * Queries the indexer for active V3 deposits with sufficient liquidity
 * and returns the deposit with the most favorable exchange rate.
 *
 * @remarks
 * Used on the main buy page to show users the best available rate
 * before they select a specific deposit. Only considers deposits with:
 * - At least $20 USD equivalent liquidity
 * - Active status and acceptingIntents = true
 * - V3 escrow version
 *
 * @see {@link useMatchableDeposits} for fetching deposits with specific filters
 */

/**
 * Information about the best available conversion rate.
 */
interface BestRateInfo {
    rate: number;
    depositId: string;
    remainingAmount: string;
    currency: string;
    verifier: string;
    formattedRate: string;
}
interface UseBestRateReturn {
    bestRate: BestRateInfo | null;
    /** @deprecated Use isLoading for initial load, isUpdating for background refresh */
    loading: boolean;
    /** True during initial fetch when no data exists yet */
    isLoading: boolean;
    /** True during background refetch when data already exists */
    isUpdating: boolean;
    error: string | null;
}
declare function useBestRate(chainId: ChainId): UseBestRateReturn;

/**
 * @fileoverview Hook for fetching aggregated monthly statistics.
 *
 * Queries the indexer for time-bucketed statistics (deposits, withdrawals,
 * exchanges) across different time resolutions (hour, day, month).
 *
 * @remarks
 * Used by the analytics dashboard to display volume charts, provider
 * breakdowns, and currency distributions.
 *
 * @see {@link MonthlyStatsContext} for the provider that caches this data
 */

/**
 * Statistics record type matching the ponder schema.
 * Used for tracking deposits, withdrawals, and exchanges over time.
 */
interface Stat {
    orderId: string;
    type: string;
    event: string;
    action: string;
    amount: bigint;
    currency: string | null;
    token: string;
    verifier: string;
    chainId: bigint;
    timestamp: bigint;
}

declare function clearStatsRequestCache(): void;
interface MonthlyStatsEntry {
    currency?: string;
    token: string;
    verifier: string;
    verifierName: string;
    totalDeposits: bigint;
    totalWithdrawals: bigint;
    totalExchanges: bigint;
    totalFees: bigint;
    totalDust: bigint;
    totalVolume: bigint;
    netAmount: bigint;
}
interface StatsByTimeEntry {
    timeKey: string;
    exchangeAmount: bigint;
    withdrawalAmount: bigint;
    depositAmount: bigint;
    feeAmount: bigint;
    dustAmount: bigint;
    totalVolume: bigint;
    netAmount: bigint;
}
interface OrderedLists {
    currenciesByVolume: Array<{
        currency: string;
        totalVolume: bigint;
        totalDeposits: bigint;
        totalWithdrawals: bigint;
        totalExchanges: bigint;
    }>;
    currenciesByNetLiquidity: Array<{
        currency: string;
        netAmount: bigint;
        totalVolume: bigint;
    }>;
    tokensByVolume: Array<{
        token: string;
        totalVolume: bigint;
        totalDeposits: bigint;
        totalWithdrawals: bigint;
        totalExchanges: bigint;
    }>;
    tokensByNetLiquidity: Array<{
        token: string;
        netAmount: bigint;
        totalVolume: bigint;
    }>;
    verifiersByVolume: Array<{
        verifier: ProviderKey;
        totalVolume: bigint;
        totalDeposits: bigint;
        totalWithdrawals: bigint;
        totalExchanges: bigint;
    }>;
    verifiersByNetLiquidity: Array<{
        verifier: ProviderKey;
        netAmount: bigint;
        totalVolume: bigint;
    }>;
}
interface UseMonthlyStatsReturn {
    monthlyStats: MonthlyStatsEntry[];
    statsByTime: StatsByTimeEntry[];
    orderedLists: OrderedLists;
    /** @deprecated Use isLoading for initial load, isUpdating for background refresh */
    loading: boolean;
    /** True during initial fetch when no data exists yet */
    isLoading: boolean;
    /** True during background refetch when data already exists */
    isUpdating: boolean;
    error: string | null;
    hasData: boolean;
}
/**
 * Fetch stats data with automatic caching
 * Results are cached per unique combination of chainIds, after cursor, resolution, and time bounds
 * Cache expires after 10 seconds
 */
declare const fetchStats: ({ chainIds, lowerBoundTimestamp, upperBoundTimestamp, after, resolution, }: {
    chainIds?: ChainId[];
    lowerBoundTimestamp: number;
    upperBoundTimestamp?: number;
    after: string | undefined;
    resolution?: TimeResolutionKey;
}) => Promise<{
    stats: {
        items: Stat[];
        pageInfo: {
            hasNextPage: boolean;
            endCursor: string | null;
        };
    };
}>;
/**
 * Fetch baseline liquidity by getting monthly stats before target month and detailed stats from target month start
 * This approach is more efficient: use aggregated monthly data for history, detailed data for current period
 */
declare const fetchLiquidityBaseline: ({ chainIds, targetTimestamp, resolution, }: {
    chainIds?: ChainId[];
    targetTimestamp: number;
    resolution?: TimeResolutionKey;
}) => Promise<{
    baseline: bigint;
    currentPeriodStats: Stat[];
    statsByTime: StatsByTimeEntry[];
}>;
/**
 * Fetch comprehensive stats data for charts and analysis
 * This function consolidates the fetching logic to avoid duplicate API calls
 */
declare const fetchComprehensiveStats: ({ chainIds, lowerBoundTimestamp, resolution, }: {
    chainIds?: ChainId[];
    lowerBoundTimestamp: number;
    resolution?: TimeResolutionKey;
}) => Promise<{
    baseline: bigint;
    allStats: Stat[];
    statsByTime: StatsByTimeEntry[];
}>;
/**
 * Hook for fetching and processing monthly statistics data
 * @param chainIds - Array of chain IDs to filter by. If empty, includes all chain IDs.
 * @returns Monthly stats data, ordered lists, loading state, error state, and refetch function
 */
declare function useMonthlyStats({ chainIds, }: {
    chainIds: ChainId[];
}): UseMonthlyStatsReturn;

/**
 * @fileoverview Ponder adapter — implements IndexerAdapter for @provex/react.
 *
 * This is the default data source for Provex apps. It wraps the Ponder SQL
 * client and existing query functions into the IndexerAdapter interface
 * that @provex/react hooks consume.
 *
 * @example
 * ```tsx
 * import { createPonderAdapter } from '@provex/indexer-client'
 * import { ProvexProvider } from '@provex/react'
 *
 * const indexer = createPonderAdapter({ indexerUrl: 'https://indexer.provex.com' })
 *
 * <ProvexProvider indexer={indexer} config={...}>
 *   <App />
 * </ProvexProvider>
 * ```
 */
/**
 * Re-export the IndexerAdapter type so consumers can type their own
 * implementations without importing from @provex/react directly.
 */

/**
 * Create an IndexerAdapter backed by a Ponder SQL-over-HTTP client.
 *
 * This is the reference implementation of IndexerAdapter. Third-party
 * developers can implement the same interface against The Graph, a REST
 * API, or direct RPC calls.
 */
declare function createPonderAdapter(): IndexerAdapter;

export { type BestRateInfo, type CrossChainDepositInfo, Deposit, type DepositClosed, type DepositConversionRateUpdated, type DepositCurrencyAdded, type DepositInput, type DepositLocation, type DepositReceived, type DepositStatusConfig, type DepositVerifierAdded, type DepositWithdrawn, type EasAttestationRow, type FormattedNumbers, type IntentFulfilled, type IntentPruned, type IntentSignaled, type LookupEasAttestationByHandleArgs, type MonthlyStatsEntry, type OrderHistoryItem, type OrderedLists, type Participant, type ParticipantStatsRow, type PonderDeposit, type PonderDepositClosed, type PonderDepositConversionRateUpdated, type PonderDepositCurrencyAdded, type PonderDepositFundsAdded, type PonderDepositIntentAmountRangeUpdated, type PonderDepositReceived, type PonderDepositRetainOnEmptyUpdated, type PonderDepositVerifierAdded, type PonderDepositWithdrawn, type PonderIntentFulfilled, type PonderIntentPruned, type PonderIntentSignaled, type PonderParticipant, type PonderTransaction, type Stat, type StatsByTimeEntry, type Transaction, type UseAsyncDataOptions, type UseBestRateReturn, type UseMonthlyStatsReturn, type UserReputationStats, type VerifierInput, aggregateReputationStatsRows, calculateDepositStatus, clearStatsRequestCache, createPonderAdapter, createProvexIdentityIndexerClient, createProvexIndexerClient, createProvexTokenIndexerClient, depositStatusConfigs, fetchComprehensiveStats, fetchEasAttestations, fetchLiquidityBaseline, fetchMatchableDeposits, fetchRecentEasAttestations, fetchStats, findDepositLocations, getActiveDeposits, getDepositByCompoundKey, getDepositById, getDepositsByParticipant, getDepositsByPayeeDetails, getDepositsWithRates, getIntentByHash, getIntentSignals, getLastSignaledIntentTimestamp, getPayeeDetails, getRate, getStats, getTransactionByHash, getUserMemberSince, getUserOrderHistory, getUserReputationStats, getVerifiersByDepositId, identityPonderClient, lookupEasAttestationByHandle, ponderClient, tokenPonderClient, useAsyncData, useBestRate, useMatchableDeposits, useMonthlyStats, usePonderQuery };
