export type X402BuyerChallenge = { network?: string; asset?: string; amountRequired?: string; payTo?: string; }; export type X402TypedPaymentErrorName = 'PaymentRequiredError' | 'QuotaExceededError' | 'TokenExpiredError' | 'ValidationFailureError' | 'SpendLimitExceededError' | 'UnknownPaymentError'; export type X402Retryability = 'retry_after_payment' | 'retry_after_quota_reset' | 'refresh_token_then_retry' | 'do_not_retry' | 'operator_review'; export type X402TypedPaymentError = { name: X402TypedPaymentErrorName; message?: string; noCharge: boolean; retryAfterSeconds?: number; }; export type X402QuotaEnvelope = { limit?: string | number; remaining?: string | number; resetAt?: string; sourceHeaders?: Record; }; export type X402SpendEnvelope = { maxSpendAtomic: string; amountRequiredAtomic?: string; remainingAfterPaymentAtomic?: string; }; export type X402BuyerFlowInput = { method: string; url: string; body?: string; signer: string; challengeSource: 'directory' | 'payment-required-header' | 'x-payment-required-header' | 'body' | 'manual' | 'none'; challenge?: X402BuyerChallenge; allowedNetworks: string[]; allowedAssets: string[]; maxSpendAtomic: string | bigint; dryRunCompleted: boolean; approvalState: 'approved' | 'pending' | 'declined' | 'not_required'; idempotencyKey?: string; typedError?: X402TypedPaymentError; quota?: X402QuotaEnvelope; mcpTools: string[]; audit: { destination?: string; correlationId?: string; receiptSink?: string; }; }; export type X402BuyerFlowResult = { ok: boolean; idempotencyKey: string; failures: string[]; warnings: string[]; parity: { discover: boolean; check: boolean; dryRun: boolean; pay: boolean; spendLimit: boolean; idempotency: boolean; mcpExposure: boolean; audit: boolean; typedErrors: boolean; retryability: boolean; quotaEnvelope: boolean; noChargeFailures: boolean; }; recovery: { errorName?: X402TypedPaymentErrorName; retryability: X402Retryability; noCharge: boolean; quotaVisible: boolean; }; envelope: { quota?: X402QuotaEnvelope; spend: X402SpendEnvelope; }; }; export declare function createX402IdempotencyKey(input: Pick): string; export declare function classifyX402PaymentError(error?: X402TypedPaymentError, quota?: X402QuotaEnvelope): X402Retryability; export declare function verifyX402BuyerFlow(input: X402BuyerFlowInput): X402BuyerFlowResult; //# sourceMappingURL=x402-buyer-flow.d.ts.map