/** * Pure helpers that turn prompt input into policy rule values the server * evaluates correctly. Kept free of prompts and I/O so tests can call them. */ type ValidationResult = { ok: true; value: string; } | { ok: false; error: string; }; /** * TRUST_SCORE rules compare against counterparty trust scores stored on a * 0.0 to 1.0 scale. A value such as 50 would never pass, so reject it with a * message instead of converting it silently. */ declare function parseTrustScoreInput(input: string): ValidationResult; declare const VELOCITY_PERIODS: readonly ["HOUR", "DAY", "WEEK", "MONTH"]; type VelocityPeriod = (typeof VELOCITY_PERIODS)[number]; /** * VELOCITY_LIMIT rules with a bare number are read by the server as an hourly * dollar cap. A transaction-count limit must be sent as * {"maxCount": n, "period": "HOUR" | "DAY" | "WEEK" | "MONTH"}. */ declare function buildVelocityCountValue(input: string, period: string): ValidationResult; interface PaymentRequestBody { amount: number; recipientAddress: string; purpose?: string; category?: string; walletId?: string; } type PaymentValidation = { ok: true; body: PaymentRequestBody; } | { ok: false; errors: string[]; }; /** * Mirrors the request schema of POST /api/sdk/payments/request so a dry run * catches the same input errors without contacting the server. */ declare function validatePaymentRequest(input: { address: string; amount: string; purpose?: string; category?: string; walletId?: string; }): PaymentValidation; export { VELOCITY_PERIODS, buildVelocityCountValue, parseTrustScoreInput, validatePaymentRequest }; export type { PaymentRequestBody, PaymentValidation, ValidationResult, VelocityPeriod };