@bitte-ai/agent-sdk
Version:
Agent SDK for Bitte Protocol
10 lines • 676 B
TypeScript
import { type Address } from "viem";
export type FieldParser<T> = Record<keyof T, FieldValidator<T[keyof T]>>;
export declare function validateInput<T>(params: URLSearchParams, validatorMapping: FieldParser<T>): T;
export declare function addressField(param: string | null, name: string): Address;
export declare function addressOrSymbolField(param: string | null, name: string): Address | string;
export declare function numberField(param: string | null, name: string): number;
export declare function floatField(param: string | null, name: string): number;
type FieldValidator<T> = (param: string | null, name: string) => T;
export {};
//# sourceMappingURL=validate.d.ts.map