import type { FasedAgentConfig } from "../config/config.js";
import type { WalletChain, WalletProviderId } from "../config/types.wallet.js";
import { type ResolvedWalletRuntimeConfig } from "./wallet-runtime-config.js";
export type WalletInboundDirection = "inbound" | "outbound" | "unknown";
export type WalletInboundKind = "deposit" | "withdrawal" | "transfer";
export type WalletInboundStatus = "detected" | "confirmed" | "reconciled" | "ignored";
export type WalletInboundSource = "poll" | "webhook";
export type WalletInboundEvent = {
    id: string;
    providerId: WalletProviderId;
    walletId?: string;
    walletName?: string;
    chain: WalletChain;
    direction: WalletInboundDirection;
    kind: WalletInboundKind;
    status: WalletInboundStatus;
    amount?: string;
    unit?: string;
    txHash?: string;
    address?: string;
    source: WalletInboundSource;
    observedAt: string;
    occurredAt?: string;
    reconciledAt?: string;
    reconciledTo?: {
        auditId?: string;
        requestId?: string;
        action?: string;
    };
    metadata?: Record<string, unknown>;
};
export declare function listWalletInboundEvents(params?: {
    env?: NodeJS.ProcessEnv;
    providerId?: WalletProviderId;
    walletId?: string;
    chain?: WalletChain;
    status?: WalletInboundStatus | "all";
    limit?: number;
}): WalletInboundEvent[];
export declare function reconcileWalletInboundEvents(params?: {
    env?: NodeJS.ProcessEnv;
    limitAuditEntries?: number;
}): {
    ok: true;
    reconciled: number;
    examined: number;
    lastReconciledAt: string | undefined;
};
export declare function pollWalletInboundEvents(params: {
    cfg: FasedAgentConfig;
    wallet: ResolvedWalletRuntimeConfig;
    env?: NodeJS.ProcessEnv;
    providerId?: WalletProviderId;
    walletId?: string;
    walletName?: string;
    chain?: WalletChain | "all";
    actor?: string;
}): Promise<{
    ok: true;
    checkedAt: string;
    providerId: WalletProviderId;
    walletId: string | undefined;
    walletName: string | undefined;
    balances: Record<string, unknown>;
    detected: WalletInboundEvent[];
    reconciliation: {
        ok: true;
        reconciled: number;
        examined: number;
        lastReconciledAt: string | undefined;
    };
}>;
export declare function recordWalletInboundWebhookEvent(params: {
    cfg: FasedAgentConfig;
    wallet: ResolvedWalletRuntimeConfig;
    payload: Record<string, unknown>;
    env?: NodeJS.ProcessEnv;
    actor?: string;
}): {
    ok: true;
    event: WalletInboundEvent;
    reconciliation: {
        ok: true;
        reconciled: number;
        examined: number;
        lastReconciledAt: string | undefined;
    };
};
