import { z } from 'zod'; import { AbstractCcipReadIsm, ArbL2ToL1Ism, CCIPIsm, DefaultIsm, DelayedFlowRouterHookIsm, IAggregationIsm, IInterchainSecurityModule, IMultisigIsm, IRoutingIsm, IStaticWeightedMultisigIsm, InterchainAccountRouter, NetFlowRateLimitedHookIsm, OPStackIsm, PausableIsm, RateLimitedIsm, TestIsm, TrustedRelayerIsm, BlacklistIsm } from '@hyperlane-xyz/core'; import type { Address, Domain, NonEmptyArray, ValueOf, WithAddress } from '@hyperlane-xyz/utils'; import { ChainMap, OwnableConfig } from '../types.js'; export declare enum ModuleType { UNUSED = 0, ROUTING = 1, AGGREGATION = 2, LEGACY_MULTISIG = 3,// DEPRECATED MERKLE_ROOT_MULTISIG = 4, MESSAGE_ID_MULTISIG = 5, NULL = 6, CCIP_READ = 7, ARB_L2_TO_L1 = 8, WEIGHTED_MERKLE_ROOT_MULTISIG = 9, WEIGHTED_MESSAGE_ID_MULTISIG = 10, OP_L2_TO_L1 = 11, POLYMER = 12, COMPOSITE = 13 } export declare const IsmType: { readonly CUSTOM: 'custom'; readonly OP_STACK: 'opStackIsm'; readonly ROUTING: 'domainRoutingIsm'; readonly INCREMENTAL_ROUTING: 'incrementalDomainRoutingIsm'; readonly FALLBACK_ROUTING: 'defaultFallbackRoutingIsm'; readonly AMOUNT_ROUTING: 'amountRoutingIsm'; readonly INTERCHAIN_ACCOUNT_ROUTING: 'interchainAccountRouting'; readonly AGGREGATION: 'staticAggregationIsm'; readonly STORAGE_AGGREGATION: 'storageAggregationIsm'; readonly MERKLE_ROOT_MULTISIG: 'merkleRootMultisigIsm'; readonly MESSAGE_ID_MULTISIG: 'messageIdMultisigIsm'; readonly STORAGE_MERKLE_ROOT_MULTISIG: 'storageMerkleRootMultisigIsm'; readonly STORAGE_MESSAGE_ID_MULTISIG: 'storageMessageIdMultisigIsm'; readonly TEST_ISM: 'testIsm'; readonly PAUSABLE: 'pausableIsm'; readonly TRUSTED_RELAYER: 'trustedRelayerIsm'; readonly ARB_L2_TO_L1: 'arbL2ToL1Ism'; readonly WEIGHTED_MERKLE_ROOT_MULTISIG: 'weightedMerkleRootMultisigIsm'; readonly WEIGHTED_MESSAGE_ID_MULTISIG: 'weightedMessageIdMultisigIsm'; readonly CCIP: 'ccipIsm'; readonly OFFCHAIN_LOOKUP: 'offchainLookupIsm'; readonly RATE_LIMITED: 'rateLimitedIsm'; readonly COMPOSITE: 'compositeIsm'; readonly ROUTING_MESSAGE_ID_MULTISIG: 'routingMessageIdMultisigIsm'; readonly BLACKLIST: 'blacklistIsm'; readonly MAILBOX_DEFAULT: 'defaultIsm'; readonly NET_FLOW_RATE_LIMITED: 'netFlowRateLimitedHookIsm'; readonly DELAYED_FLOW_ROUTER: 'delayedFlowRouterHookIsm'; readonly UNKNOWN: 'unknownIsm'; }; export type IsmType = (typeof IsmType)[keyof typeof IsmType]; export type DeployableIsmType = Exclude; export declare const MUTABLE_ISM_TYPE: IsmType[]; /** * @notice Statically deployed ISM types * @dev ISM types with immutable config embedded in contract bytecode via MetaProxy */ export declare const STATIC_ISM_TYPES: IsmType[]; export declare const DYNAMICALLY_ROUTED_ISM_TYPES: readonly ["amountRoutingIsm", "interchainAccountRouting", "defaultIsm"]; /** Type guard for dynamically routed ISM types */ export declare function isDynamicallyRoutedIsmType(type: IsmType): type is (typeof DYNAMICALLY_ROUTED_ISM_TYPES)[number]; export declare function ismTypeToModuleType(ismType: IsmType): ModuleType; export type ValidatorConfig = { address: Address; alias: string; }; export type MultisigConfig = { validators: Array; threshold: number; }; export type MultisigIsmConfig = z.infer; export type WeightedMultisigIsmConfig = z.infer; export type TestIsmConfig = z.infer; export type PausableIsmConfig = z.infer; export type OpStackIsmConfig = z.infer; export type TrustedRelayerIsmConfig = z.infer; export type CCIPIsmConfig = z.infer; export type ArbL2ToL1IsmConfig = z.infer; export type RateLimitedIsmConfig = z.infer; export type BlacklistIsmConfig = z.infer; export type OffchainLookupIsmConfig = z.infer; export type MailboxDefaultIsmConfig = z.infer; export type NetFlowRateLimitedHookIsmConfig = z.infer; export type DelayedFlowRouterHookIsmConfig = z.infer; export type NullIsmConfig = TestIsmConfig | PausableIsmConfig | OpStackIsmConfig | TrustedRelayerIsmConfig | CCIPIsmConfig | RateLimitedIsmConfig | BlacklistIsmConfig | NetFlowRateLimitedHookIsmConfig | DelayedFlowRouterHookIsmConfig; type BaseRoutingIsmConfig = { type: T; }; export type DomainRoutingIsmConfig = BaseRoutingIsmConfig & OwnableConfig & { domains: ChainMap; }; export declare const InterchainAccountRouterIsmSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional>; type: z.ZodLiteral<"interchainAccountRouting">; isms: z.ZodRecord; }, z.core.$strip>; export type InterchainAccountRouterIsm = z.infer; export type AmountRoutingIsmConfig = BaseRoutingIsmConfig & { lowerIsm: IsmConfig; upperIsm: IsmConfig; threshold: number; }; export type RoutingIsmConfig = DomainRoutingIsmConfig | AmountRoutingIsmConfig | InterchainAccountRouterIsm; export type AggregationIsmConfig = { type: typeof IsmType.AGGREGATION | typeof IsmType.STORAGE_AGGREGATION; modules: Array; threshold: number; }; export type IsmConfig = Address | TestIsmConfig | OpStackIsmConfig | DerivedPausableIsmConfig | PausableIsmConfig | TrustedRelayerIsmConfig | CCIPIsmConfig | RateLimitedIsmConfig | BlacklistIsmConfig | NetFlowRateLimitedHookIsmConfig | DelayedFlowRouterHookIsmConfig | MailboxDefaultIsmConfig | MultisigIsmConfig | WeightedMultisigIsmConfig | RoutingIsmConfig | AggregationIsmConfig | CompositeIsmConfig | RoutingMessageIdMultisigIsmConfig | ArbL2ToL1IsmConfig | OffchainLookupIsmConfig | InterchainAccountRouterIsm | UnknownIsmConfig; export type DerivedIsmConfig = WithAddress>; export type DeployedIsmType = { [IsmType.CUSTOM]: IInterchainSecurityModule; [IsmType.ROUTING]: IRoutingIsm; [IsmType.FALLBACK_ROUTING]: IRoutingIsm; [IsmType.AMOUNT_ROUTING]: IRoutingIsm; [IsmType.INCREMENTAL_ROUTING]: IRoutingIsm; [IsmType.AGGREGATION]: IAggregationIsm; [IsmType.STORAGE_AGGREGATION]: IAggregationIsm; [IsmType.MERKLE_ROOT_MULTISIG]: IMultisigIsm; [IsmType.MESSAGE_ID_MULTISIG]: IMultisigIsm; [IsmType.STORAGE_MERKLE_ROOT_MULTISIG]: IMultisigIsm; [IsmType.STORAGE_MESSAGE_ID_MULTISIG]: IMultisigIsm; [IsmType.OP_STACK]: OPStackIsm; [IsmType.TEST_ISM]: TestIsm; [IsmType.PAUSABLE]: PausableIsm; [IsmType.TRUSTED_RELAYER]: TrustedRelayerIsm; [IsmType.CCIP]: CCIPIsm; [IsmType.ARB_L2_TO_L1]: ArbL2ToL1Ism; [IsmType.WEIGHTED_MERKLE_ROOT_MULTISIG]: IStaticWeightedMultisigIsm; [IsmType.WEIGHTED_MESSAGE_ID_MULTISIG]: IStaticWeightedMultisigIsm; [IsmType.OFFCHAIN_LOOKUP]: AbstractCcipReadIsm; [IsmType.INTERCHAIN_ACCOUNT_ROUTING]: InterchainAccountRouter; [IsmType.RATE_LIMITED]: RateLimitedIsm; [IsmType.BLACKLIST]: BlacklistIsm; [IsmType.MAILBOX_DEFAULT]: DefaultIsm; [IsmType.NET_FLOW_RATE_LIMITED]: NetFlowRateLimitedHookIsm; [IsmType.DELAYED_FLOW_ROUTER]: DelayedFlowRouterHookIsm; [IsmType.UNKNOWN]: IInterchainSecurityModule; }; export type DeployedIsm = ValueOf; export type RoutingIsmDelta = { domainsToUnenroll: Domain[]; domainsToEnroll: Domain[]; owner?: Address; mailbox?: Address; }; export declare const TestIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"testIsm">; }, z.core.$strip>; export declare const MultisigConfigSchema: z.ZodObject<{ validators: z.ZodArray; threshold: z.ZodNumber; }, z.core.$strip>; export declare const WeightedMultisigConfigSchema: z.ZodObject<{ validators: z.ZodArray>; thresholdWeight: z.ZodNumber; }, z.core.$strip>; export declare const TrustedRelayerIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"trustedRelayerIsm">; relayer: z.ZodString; }, z.core.$strip>; export declare const BlacklistIsmConfigSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional>; type: z.ZodLiteral<"blacklistIsm">; blacklistedIds: z.ZodArray>>; }, z.core.$strip>; export declare const RateLimitedIsmConfigSchema: z.ZodPipe; maxCapacity: z.ZodString; duration: z.ZodDefault, z.ZodString]>, z.ZodTransform>>; recipient: z.ZodOptional; owner: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ type: "rateLimitedIsm"; maxCapacity: string; duration: bigint; recipient?: string | undefined; owner?: string | undefined; }, { type: "rateLimitedIsm"; maxCapacity: string; duration: bigint; recipient?: string | undefined; owner?: string | undefined; }>>; export declare const MailboxDefaultIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"defaultIsm">; }, z.core.$strip>; /** * Remote counterpart of a DelayedFlowRouterHookIsm, enrolled as a Router * route. Accepts a 20-byte EVM address or a 32-byte hex value; normalized to * lowercase bytes32 (the on-chain `routers(uint32)` representation) at parse * time so config and derived on-chain state compare equal. Shared with the * hook-side view of the same contract (../hook/types.ts). */ export declare const ZRouterBytes32: z.ZodPipe>; export declare const NetFlowRateLimitedHookIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"netFlowRateLimitedHookIsm">; warpRouter: z.ZodOptional; thresholdBps: z.ZodNumber; duration: z.ZodPipe, z.ZodString]>, z.ZodTransform>; owner: z.ZodOptional; }, z.core.$strip>; /** * Operational bound for DelayedFlowRouterHookIsm waits. The contract adds the * delay to a uint48 Unix timestamp; uint32 seconds (~136 years) exceeds any * practical delay while leaving ample timestamp headroom. */ export declare const MAX_SAFE_UINT48: number; export declare const DelayedFlowRouterHookIsmConfigSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional>; type: z.ZodLiteral<"delayedFlowRouterHookIsm">; warpRouter: z.ZodOptional; thresholdBps: z.ZodNumber; maxDelay: z.ZodNumber; duration: z.ZodPipe, z.ZodString]>, z.ZodTransform>; remoteIsms: z.ZodOptional>>>; }, z.core.$strip>; export declare const CCIPIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"ccipIsm">; originChain: z.ZodString; }, z.core.$strip>; export declare const OffchainLookupIsmConfigSchema: z.ZodObject<{ owner: z.ZodString; ownerOverrides: z.ZodOptional>; type: z.ZodLiteral<"offchainLookupIsm">; urls: z.ZodArray; }, z.core.$strip>; export declare const isOffchainLookupIsmConfig: (config: unknown) => config is { owner: string; ownerOverrides?: Record | undefined; type: "offchainLookupIsm"; urls: string[]; }; export declare const OpStackIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"opStackIsm">; origin: z.ZodString; nativeBridge: z.ZodString; }, z.core.$strip>; export declare const ArbL2ToL1IsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"arbL2ToL1Ism">; bridge: z.ZodString; }, z.core.$strip>; export declare const PausableIsmConfigSchema: z.ZodIntersection>; paused: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pausableIsm">; }, z.core.$strip>>; export declare const DerivedPausableIsmConfigSchema: z.ZodIntersection>; paused: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"pausableIsm">; }, z.core.$strip>>, z.ZodObject<{ address: z.ZodString; }, z.core.$strip>>; export type DerivedPausableIsmConfig = z.infer; export declare const MultisigIsmConfigSchema: z.ZodIntersection; threshold: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodUnion, z.ZodLiteral<"messageIdMultisigIsm">, z.ZodLiteral<"storageMerkleRootMultisigIsm">, z.ZodLiteral<"storageMessageIdMultisigIsm">]>; }, z.core.$strip>>; export declare const WeightedMultisigIsmConfigSchema: z.ZodIntersection>; thresholdWeight: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodUnion, z.ZodLiteral<"weightedMessageIdMultisigIsm">]>; }, z.core.$strip>>; export declare const RoutingIsmConfigSchema: z.ZodType; export declare const AggregationIsmConfigSchema: z.ZodType; export declare const CompositeIsmNodeType: { readonly TRUSTED_RELAYER: 'trustedRelayer'; readonly MULTISIG_MESSAGE_ID: 'multisigMessageId'; readonly AGGREGATION: 'aggregation'; readonly TEST: 'test'; readonly PAUSABLE: 'pausable'; readonly AMOUNT_ROUTING: 'amountRouting'; readonly RATE_LIMITED: 'rateLimited'; readonly ROUTING: 'routing'; readonly FALLBACK_ROUTING: 'fallbackRouting'; }; export type CompositeIsmNodeType = (typeof CompositeIsmNodeType)[keyof typeof CompositeIsmNodeType]; export interface CompositeTrustedRelayerNodeConfig { type: typeof CompositeIsmNodeType.TRUSTED_RELAYER; relayer: Address; } export interface CompositeMultisigMessageIdNodeConfig { type: typeof CompositeIsmNodeType.MULTISIG_MESSAGE_ID; validators: Address[]; threshold: number; } export interface CompositeAggregationNodeConfig { type: typeof CompositeIsmNodeType.AGGREGATION; threshold: number; subIsms: CompositeIsmNodeConfig[]; } export interface CompositeTestNodeConfig { type: typeof CompositeIsmNodeType.TEST; accept: boolean; } export interface CompositePausableNodeConfig { type: typeof CompositeIsmNodeType.PAUSABLE; paused: boolean; } export interface CompositeAmountRoutingNodeConfig { type: typeof CompositeIsmNodeType.AMOUNT_ROUTING; threshold: string; lower: CompositeIsmNodeConfig; upper: CompositeIsmNodeConfig; } /** * Token-bucket node. Only supported inside a warp route's ISM: it meters an * amount read from a fixed offset of the message body, so it is meaningless * against non-warp traffic. `recipient` is the warp router the ISM protects, * resolved by the deploy/apply tooling; supply it only when reproducing the * output of `warp read`. */ export interface CompositeRateLimitedNodeConfig { type: typeof CompositeIsmNodeType.RATE_LIMITED; maxCapacity: string; mailbox: Address; recipient?: Address; } export interface CompositeRoutingNodeConfig { type: typeof CompositeIsmNodeType.ROUTING; domains?: ChainMap; } export interface CompositeFallbackRoutingNodeConfig { type: typeof CompositeIsmNodeType.FALLBACK_ROUTING; fallbackIsm: Address; domains?: ChainMap; } export type CompositeIsmNodeConfig = CompositeTrustedRelayerNodeConfig | CompositeMultisigMessageIdNodeConfig | CompositeAggregationNodeConfig | CompositeTestNodeConfig | CompositePausableNodeConfig | CompositeAmountRoutingNodeConfig | CompositeRateLimitedNodeConfig | CompositeRoutingNodeConfig | CompositeFallbackRoutingNodeConfig; export declare const CompositeIsmNodeConfigSchema: z.ZodType; export type CompositeIsmConfig = OwnableConfig & { type: typeof IsmType.COMPOSITE; root: CompositeIsmNodeConfig; }; export declare const CompositeIsmConfigSchema: z.ZodType; export type RoutingMessageIdMultisigIsmConfig = OwnableConfig & { type: typeof IsmType.ROUTING_MESSAGE_ID_MULTISIG; domains: ChainMap<{ validators: NonEmptyArray
; threshold: number; }>; }; export declare const RoutingMessageIdMultisigIsmConfigSchema: z.ZodType; export declare const UnknownIsmConfigSchema: z.ZodObject<{ type: z.ZodLiteral<"unknownIsm">; }, z.core.$loose>; export type UnknownIsmConfig = z.infer; /** * Recursively normalizes unknown ISM type values to IsmType.UNKNOWN. * Use this before parsing with IsmConfigSchema when configs may contain * ISM types not yet known to this SDK version. * * Note: String address configs (e.g., "0x...") are passed through unchanged * since they represent deployed ISM addresses, not ISM type configs. */ export declare function normalizeUnknownIsmTypes(config: T): T; export declare const BaseIsmConfigSchema: z.ZodType; export declare const IsmConfigSchema: z.ZodType; /** * Forward-compatible ISM config schema that normalizes unknown ISM types. * Use this instead of IsmConfigSchema when parsing configs that may contain * ISM types added in newer registry versions. */ export declare const SafeParseIsmConfigSchema: z.ZodPreprocess>, unknown>; export {}; //# sourceMappingURL=types.d.ts.map