/** * The types defined here are the source of truth for chain metadata. * ANY CHANGES HERE NEED TO BE REFLECTED IN HYPERLANE-BASE CONFIG PARSING. */ import { z } from 'zod'; /** * Creates a forward-compatible Zod schema for enums that normalizes unknown values. * * When registry is updated with new enum values, older SDK versions will parse * the unknown value as the specified `unknownValue` instead of failing entirely. * * This enables: * - Old SDK + New Registry: Works - unknown values become `Unknown` variant * - New SDK + Old Registry: Works - known values parse normally * - TypeScript exhaustiveness checking forces explicit handling of unknown cases * * @param enumObj - The enum or const object to validate against * @param unknownValue - The value to use for unknown/new enum variants * @returns A Zod schema that accepts any string but normalizes unknown values * * @example * ```ts * const zProtocolType = forwardCompatibleEnum(ProtocolType, ProtocolType.Unknown); * zProtocolType.parse('ethereum'); // => ProtocolType.Ethereum * zProtocolType.parse('newprotocol'); // => ProtocolType.Unknown * ``` */ export declare function forwardCompatibleEnum>(enumObj: T, unknownValue: T[keyof T]): z.ZodEffects, z.ZodString]>, T[keyof T]>; /** Zod uint schema */ export declare const ZUint: z.ZodNumber; /** Zod NonZeroUint schema */ export declare const ZNzUint: z.ZodNumber; /** Zod unsigned Wei schema which accepts either a string number or a literal number */ export declare const ZUWei: z.ZodUnion<[z.ZodNumber, z.ZodString]>; /** Zod 128, 160, 256, or 512 bit hex-defined hash with a 0x prefix for hex and no prefix for base58 */ export declare const ZHash: z.ZodString; /** Zod ChainName schema */ export declare const ZChainName: z.ZodString; export declare const ZBigNumberish: z.ZodEffects, z.ZodString]>, bigint, string | number | bigint>; export declare const ZBytes32String: z.ZodEffects; //# sourceMappingURL=customZodTypes.d.ts.map