@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
1,481 lines • 52.2 kB
TypeScript
import { z } from 'zod';
import { Address, WithAddress } from '@hyperlane-xyz/utils';
import { ChainMap, OwnableConfig } from '../types.js';
export declare enum OnchainHookType {
UNUSED = 0,
ROUTING = 1,
AGGREGATION = 2,
MERKLE_TREE = 3,
INTERCHAIN_GAS_PAYMASTER = 4,
FALLBACK_ROUTING = 5,
ID_AUTH_ISM = 6,
PAUSABLE = 7,
PROTOCOL_FEE = 8,
DEPRECATED = 9,
RATE_LIMITED = 10,
ARB_L2_TO_L1 = 11,
OP_L2_TO_L1 = 12,
MAILBOX_DEFAULT_HOOK = 13,
AMOUNT_ROUTING = 14
}
export declare const HookType: {
readonly CUSTOM: "custom";
readonly MERKLE_TREE: "merkleTreeHook";
readonly INTERCHAIN_GAS_PAYMASTER: "interchainGasPaymaster";
readonly AGGREGATION: "aggregationHook";
readonly PROTOCOL_FEE: "protocolFee";
readonly OP_STACK: "opStackHook";
readonly ROUTING: "domainRoutingHook";
readonly FALLBACK_ROUTING: "fallbackRoutingHook";
readonly AMOUNT_ROUTING: "amountRoutingHook";
readonly PAUSABLE: "pausableHook";
readonly ARB_L2_TO_L1: "arbL2ToL1Hook";
readonly MAILBOX_DEFAULT: "defaultHook";
readonly CCIP: "ccipHook";
};
export type HookType = (typeof HookType)[keyof typeof HookType];
export declare const HookTypeToContractNameMap: Record<Exclude<HookType, typeof HookType.CUSTOM>, string>;
export type MerkleTreeHookConfig = z.infer<typeof MerkleTreeSchema>;
export type IgpHookConfig = z.infer<typeof IgpSchema>;
export type ProtocolFeeHookConfig = z.infer<typeof ProtocolFeeSchema>;
export type PausableHookConfig = z.infer<typeof PausableHookSchema>;
export type OpStackHookConfig = z.infer<typeof OpStackHookSchema>;
export type ArbL2ToL1HookConfig = z.infer<typeof ArbL2ToL1HookSchema>;
export type MailboxDefaultHookConfig = z.infer<typeof MailboxDefaultHookSchema>;
export type CCIPHookConfig = z.infer<typeof CCIPHookSchema>;
export type AggregationHookConfig = {
type: typeof HookType.AGGREGATION;
hooks: Array<HookConfig>;
};
export type RoutingHookConfig = OwnableConfig & {
domains: ChainMap<HookConfig>;
};
export type DomainRoutingHookConfig = RoutingHookConfig & {
type: typeof HookType.ROUTING;
};
export type FallbackRoutingHookConfig = RoutingHookConfig & {
type: typeof HookType.FALLBACK_ROUTING;
fallback: HookConfig;
};
export type AmountRoutingHookConfig = {
type: typeof HookType.AMOUNT_ROUTING;
threshold: number;
lowerHook: HookConfig;
upperHook: HookConfig;
};
export type HookConfig = z.infer<typeof HookConfigSchema>;
export type DerivedHookConfig = WithAddress<Exclude<HookConfig, Address>>;
export declare const MUTABLE_HOOK_TYPE: HookType[];
export declare const ProtocolFeeSchema: z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>;
export declare const MerkleTreeSchema: z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>;
export declare const PausableHookSchema: z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>;
export declare const MailboxDefaultHookSchema: z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>;
export declare const OpStackHookSchema: z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>;
export declare const ArbL2ToL1HookSchema: z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>;
export declare const IgpSchema: z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>;
export declare const DomainRoutingHookConfigSchema: z.ZodSchema<DomainRoutingHookConfig>;
export declare const FallbackRoutingHookConfigSchema: z.ZodSchema<FallbackRoutingHookConfig>;
export declare const AmountRoutingHookConfigSchema: z.ZodSchema<AmountRoutingHookConfig>;
export declare const AggregationHookConfigSchema: z.ZodSchema<AggregationHookConfig>;
export declare const CCIPHookSchema: z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>;
export declare const HookConfigSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodType<DomainRoutingHookConfig, z.ZodTypeDef, DomainRoutingHookConfig>, z.ZodType<FallbackRoutingHookConfig, z.ZodTypeDef, FallbackRoutingHookConfig>, z.ZodType<AmountRoutingHookConfig, z.ZodTypeDef, AmountRoutingHookConfig>, z.ZodType<AggregationHookConfig, z.ZodTypeDef, AggregationHookConfig>, z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>, z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>, z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>]>;
export declare const HooksConfigSchema: z.ZodObject<{
default: z.ZodUnion<[z.ZodString, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodType<DomainRoutingHookConfig, z.ZodTypeDef, DomainRoutingHookConfig>, z.ZodType<FallbackRoutingHookConfig, z.ZodTypeDef, FallbackRoutingHookConfig>, z.ZodType<AmountRoutingHookConfig, z.ZodTypeDef, AmountRoutingHookConfig>, z.ZodType<AggregationHookConfig, z.ZodTypeDef, AggregationHookConfig>, z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>, z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>, z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>]>;
required: z.ZodUnion<[z.ZodString, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodType<DomainRoutingHookConfig, z.ZodTypeDef, DomainRoutingHookConfig>, z.ZodType<FallbackRoutingHookConfig, z.ZodTypeDef, FallbackRoutingHookConfig>, z.ZodType<AmountRoutingHookConfig, z.ZodTypeDef, AmountRoutingHookConfig>, z.ZodType<AggregationHookConfig, z.ZodTypeDef, AggregationHookConfig>, z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>, z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>, z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>]>;
}, "strip", z.ZodTypeAny, {
default: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
required: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
}, {
default: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
required: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
}>;
export type HooksConfig = z.infer<typeof HooksConfigSchema>;
export declare const HooksConfigMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
default: z.ZodUnion<[z.ZodString, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodType<DomainRoutingHookConfig, z.ZodTypeDef, DomainRoutingHookConfig>, z.ZodType<FallbackRoutingHookConfig, z.ZodTypeDef, FallbackRoutingHookConfig>, z.ZodType<AmountRoutingHookConfig, z.ZodTypeDef, AmountRoutingHookConfig>, z.ZodType<AggregationHookConfig, z.ZodTypeDef, AggregationHookConfig>, z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>, z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>, z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>]>;
required: z.ZodUnion<[z.ZodString, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"protocolFee">;
beneficiary: z.ZodString;
maxProtocolFee: z.ZodString;
protocolFee: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
paused: z.ZodBoolean;
} & {
type: z.ZodLiteral<"pausableHook">;
}, "strip", z.ZodTypeAny, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"opStackHook">;
nativeBridge: z.ZodString;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"merkleTreeHook">;
}, "strip", z.ZodTypeAny, {
type: "merkleTreeHook";
}, {
type: "merkleTreeHook";
}>, z.ZodObject<{
owner: z.ZodString;
ownerOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
} & {
type: z.ZodLiteral<"interchainGasPaymaster">;
beneficiary: z.ZodString;
oracleKey: z.ZodString;
overhead: z.ZodRecord<z.ZodString, z.ZodNumber>;
oracleConfig: z.ZodRecord<z.ZodString, z.ZodObject<{
gasPrice: z.ZodString;
tokenExchangeRate: z.ZodString;
} & {
tokenDecimals: z.ZodOptional<z.ZodNumber>;
} & {
typicalCost: z.ZodOptional<z.ZodObject<{
handleGasAmount: z.ZodNumber;
totalGasAmount: z.ZodNumber;
totalUsdCost: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}, {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
}>>;
}, "strip", z.ZodTypeAny, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}, {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
}>, z.ZodType<DomainRoutingHookConfig, z.ZodTypeDef, DomainRoutingHookConfig>, z.ZodType<FallbackRoutingHookConfig, z.ZodTypeDef, FallbackRoutingHookConfig>, z.ZodType<AmountRoutingHookConfig, z.ZodTypeDef, AmountRoutingHookConfig>, z.ZodType<AggregationHookConfig, z.ZodTypeDef, AggregationHookConfig>, z.ZodObject<{
type: z.ZodLiteral<"arbL2ToL1Hook">;
arbSys: z.ZodString;
bridge: z.ZodOptional<z.ZodString>;
destinationChain: z.ZodString;
childHook: z.ZodLazy<z.ZodType<any, z.ZodTypeDef, any>>;
}, "strip", z.ZodTypeAny, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}, {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
}>, z.ZodObject<{
type: z.ZodLiteral<"defaultHook">;
}, "strip", z.ZodTypeAny, {
type: "defaultHook";
}, {
type: "defaultHook";
}>, z.ZodObject<{
type: z.ZodLiteral<"ccipHook">;
destinationChain: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ccipHook";
destinationChain: string;
}, {
type: "ccipHook";
destinationChain: string;
}>]>;
}, "strip", z.ZodTypeAny, {
default: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
required: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "opStackHook";
owner: string;
nativeBridge: string;
destinationChain: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "arbL2ToL1Hook";
destinationChain: string;
arbSys: string;
bridge?: string | undefined;
childHook?: any;
} | {
type: "defaultHook";
} | {
type: "ccipHook";
destinationChain: string;
} | DomainRoutingHookConfig | FallbackRoutingHookConfig | AmountRoutingHookConfig | AggregationHookConfig;
}, {
default: string | {
type: "merkleTreeHook";
} | {
type: "interchainGasPaymaster";
owner: string;
beneficiary: string;
oracleKey: string;
overhead: Record<string, number>;
oracleConfig: Record<string, {
gasPrice: string;
tokenExchangeRate: string;
tokenDecimals?: number | undefined;
typicalCost?: {
handleGasAmount: number;
totalGasAmount: number;
totalUsdCost: number;
} | undefined;
}>;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "protocolFee";
owner: string;
protocolFee: string;
beneficiary: string;
maxProtocolFee: string;
ownerOverrides?: Record<string, string> | undefined;
} | {
type: "pausableHook";
owner: string;
paused: boolean;
ownerOverrides?: Record<string, string> | undefined;
}