/** * Parsing helpers for token registry normalization. * @remarks * These functions validate external/untrusted input (e.g. JSON files) and throw on invalid values. */ export type MaybeString = string | number | bigint; export type UnknownRecord = Record; /** * Converts a string value to a normalized hex address. */ export declare function toHexAddress(value: string): string; /** * Parses a value as a bigint. * @throws Error if the value cannot be converted to bigint. */ export declare function parseBigInt(value: MaybeString, label: string): bigint; /** * Normalizes and validates an array of RPC URLs. * @throws Error if urls is not a non-empty array of valid strings. */ export declare function normalizeRpcUrls(urls: unknown, label: string): string[]; /** * Validates that a value is a non-null object. * @throws Error if value is not an object. */ export declare function expectRecord(value: unknown, label: string): UnknownRecord; /** * Gets a required string field from a record, checking multiple possible keys. * @throws Error if no matching key is found or the value is not a non-empty string. */ export declare function getStringField(source: UnknownRecord, keys: string[], label: string): string; /** * Gets an optional string field from a record, checking multiple possible keys. * @returns The trimmed string value or undefined if not present. * @throws Error if the value is present but not a valid non-empty string. */ export declare function getOptionalStringField(source: UnknownRecord, keys: string[], label: string): string | undefined; /** * Gets a required field value from a record, checking multiple possible keys. * @throws Error if no matching key is found. */ export declare function getValueField(source: UnknownRecord, keys: string[], label: string): T; /** * Gets an optional boolean field from a record, checking multiple possible keys. * @returns The boolean value or undefined if not present. * @throws Error if the value is present but not a boolean. */ export declare function getOptionalBooleanField(source: UnknownRecord, keys: string[], label: string): boolean | undefined; /** * Gets an optional number field from a record, checking multiple possible keys. * @returns The number value or undefined if not present. * @throws Error if the value is present but not a valid finite number. */ export declare function getOptionalNumberField(source: UnknownRecord, keys: string[], label: string): number | undefined; //# sourceMappingURL=parsing.d.ts.map