/** * Response Schema Validation & Input Validation * * Lightweight runtime checks for agent responses and user inputs. * No external dependencies — uses simple type guards and regex. */ import type { Chain, DkgResponse, SignResponse, SignResultResponse, HealthResponse, StatusResponse, WalletsResponse } from '../core/types'; /** * Validate a DKG initiation response from an agent. * Ensures wallet_id, status, participants, and threshold are present and valid. */ export declare function validateDkgResponse(data: unknown, endpoint: string): DkgResponse; /** * Validate a DKG completion event (from WebSocket). * Ensures wallet_id exists and public_key/address are valid. */ export declare function validateDkgCompletion(data: unknown, endpoint: string): { wallet_id: string; public_key: string; address?: string; }; /** * Validate a sign request response from an agent. */ export declare function validateSignResponse(data: unknown, endpoint: string): SignResponse; /** * Validate a sign result (polling) response. */ export declare function validateSignResultResponse(data: unknown, endpoint: string): SignResultResponse; /** * Validate a health response. */ export declare function validateHealthResponse(data: unknown, endpoint: string): HealthResponse; /** * Validate a status response. */ export declare function validateStatusResponse(data: unknown, endpoint: string): StatusResponse; /** * Validate a wallets list response. */ export declare function validateWalletsResponse(data: unknown, endpoint: string): WalletsResponse; /** * Validate a refresh/reshare acknowledgment response. * The agent should return an object with at least a status field. */ export declare function validateRefreshResponse(data: unknown, endpoint: string): { status: string; wallet_id?: string; }; /** * Validate a wallet ID string. */ export declare function validateWalletId(walletId: unknown): string; /** * Validate a chain name against the supported chains list. */ export declare function validateChain(chain: unknown): Chain; /** * Validate an address format based on the target chain. */ export declare function validateAddress(address: unknown, chain: Chain): string; /** * Validate a positive numeric amount (for transactions). */ export declare function validateAmount(amount: unknown, paramName?: string): number; /** * Validate a string amount (wei, lamports, etc.) used in EVM transactions. * Must represent a valid positive integer or bigint. */ export declare function validateStringAmount(value: unknown, paramName?: string): string | bigint; /** * Validate a hex-encoded message for signing. */ export declare function validateHexMessage(message: unknown, paramName?: string): string; /** * Validate threshold parameters. */ export declare function validateThreshold(threshold: unknown): { t: number; n: number; }; //# sourceMappingURL=validation.d.ts.map