import { AltVM, ProtocolType } from '@hyperlane-xyz/provider-sdk'; import { type ChainLookup } from '@hyperlane-xyz/provider-sdk/chain'; import { type FeeReadContext } from '@hyperlane-xyz/provider-sdk/fee'; import { AnnotatedTx, TxReceipt } from '@hyperlane-xyz/provider-sdk/module'; import { WarpConfig as ProviderWarpConfig } from '@hyperlane-xyz/provider-sdk/warp'; import { Address } from '@hyperlane-xyz/utils'; import { DelayedFlowRouterHookIsmConfig } from '../ism/types.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { AnnotatedEV5Transaction, TypedAnnotatedTransaction } from '../providers/ProviderType.js'; import { WarpRouteDeployConfig, WarpRouteDeployConfigMailboxRequired } from '../token/types.js'; import { ChainMap, ChainName } from '../types.js'; type ChainAddresses = Record; /** * Builds a `FeeReadContext` directly from a warp deploy config, bypassing * `validateWarpConfigForAltVM` + `warpConfigToArtifact` + * `buildFeeReadContextFromWarpArtifactConfig`. The read flow only needs the * per-domain router set, not the full `ProviderWarpConfig` conversion, so * this works for any token type (including EVM-only `xerc20`, * `fastCollateral`, etc.) that the AltVM validator would reject. * * Mirrors `buildFeeReadContextFromWarpArtifactConfig` (provider-sdk) — same * `DEFAULT_CROSS_COLLATERAL_FEE_ROUTER_KEY` injection so CC default-router * quotes remain visible to the reader. */ export declare function buildFeeReadContextFromWarpDeployConfig(config: WarpRouteDeployConfigMailboxRequired[string], chainLookup: ChainLookup): FeeReadContext; export declare function validateWarpConfigForAltVM(config: WarpRouteDeployConfigMailboxRequired[string], chain: string, protocol?: ProtocolType): ProviderWarpConfig; export type WarpDeployArgs = { warpDeployConfig: WarpRouteDeployConfigMailboxRequired; multiProvider: MultiProvider; altVmSigners: ChainMap>; registryAddresses: ChainMap; apiKeys: ChainMap; }; /** * Deploys a WHOLE warp route: its routers, plus the ISM and hook trees they * install. * * Everything decidable from the config is decided before any gas is spent — * the full `IsmConfigSchema`/`HookConfigSchema` refinement over both trees, the * hybrid hook/ISM pairing (planWarpRouteHybrids), and the route-scoped * delayed-flow invariants. The route-scoped ones read the config's chain set as * "the route", so they belong to this entry point alone: shrinking the config * does not narrow them, it enlarges what counts as outside the route. Use * `executeWarpRouteExtensionDeploy` for the chains an extension adds. */ export declare function executeWarpDeploy(warpDeployConfig: WarpRouteDeployConfigMailboxRequired, multiProvider: MultiProvider, altVmSigners: ChainMap>, registryAddresses: ChainMap, apiKeys: ChainMap): Promise>; /** * Deploys the chains an extension adds to an EXISTING route. * * Same engine as `executeWarpDeploy`, minus the invariants that measure the * route by the config's own chain set — the caller holds the full route config * and has already checked those (runWarpRouteApply). Everything per chain still * runs here, so an extension cannot deploy a chain whose composition can never * work. * * A separate entry point rather than a flag: which validation applies is a * property of what the caller is deploying, not something to infer from the * shape of the config it happens to pass. */ export declare function executeWarpRouteExtensionDeploy(warpDeployConfig: WarpRouteDeployConfigMailboxRequired, multiProvider: MultiProvider, altVmSigners: ChainMap>, registryAddresses: ChainMap, apiKeys: ChainMap): Promise>; export type DelayedFlowEnrollmentTarget = { ismAddress: Address; userNode: DelayedFlowRouterHookIsmConfig; }; /** * Whole-route coverage: every leg carries an instance * (assertDelayedFlowLegCoverage), and a `remoteRouters` entry naming a chain * outside the route has to enroll that counterpart explicitly * (assertDelayedFlowRemoteRouterCoverage). * * Correct only against the FULL route config. Shrinking the config enlarges * what counts as outside the route, so running this on a subset — the single * chain `warp apply` deploys per extension, say — rejects `remoteRouters` * entries naming the very legs that chain is joining. */ export declare function assertDelayedFlowRouteCoverage({ multiProvider, warpDeployConfig, }: { multiProvider: MultiProvider; warpDeployConfig: WarpRouteDeployConfigMailboxRequired; }): void; /** * The full delayed-flow preconditions for a whole route, checked before any * on-chain work: assertDelayedFlowRouteCoverage — which adds the route-scoped * external `remoteRouters` check to the leg coverage above — and the * mailbox nonce guard. * * Call this with every chain of the route. The CLI entry points do * (runWarpRouteDeploy, runWarpRouteApply); executeWarpDeploy cannot, because * an extension reaches it one chain at a time. */ export declare function assertDelayedFlowRoutePreconditions({ multiProvider, warpDeployConfig, }: { multiProvider: MultiProvider; warpDeployConfig: WarpRouteDeployConfigMailboxRequired; }): Promise; /** * Resolves the shared hybrid instance behind each chain's ISM tree. * * Callers pass whichever tree is authoritative for them: the address a run has * just deployed but not yet installed, or the tree already on the router. * Nothing here guesses between the two — a caller that knows both states knows * which one it means. */ export declare function resolveHybridIsmAddresses(multiProvider: MultiProvider, ismTreeAddresses: ChainMap
): Promise>; /** * Resolves the hybrid instance installed on each router, by reading the ISM the * router currently points at. Used by callers holding only routers, such as * `warp apply` on chains it is not re-deploying. */ export declare function readInstalledHybridIsmAddresses(multiProvider: MultiProvider, routers: ChainMap
): Promise>; /** * Pairs the route's DelayedFlowRouterHookIsm instances so each one's enrollment * transactions can name every other one. * * `hybridIsmAddresses` is supplied by the caller (resolveHybridIsmAddresses / * readInstalledHybridIsmAddresses) rather than re-derived here: which tree is * authoritative differs per caller, and a chain whose instance the caller could * not resolve is skipped rather than silently paired against a stale one. The * config node is carried through as `userNode` so configured external * `remoteIsms` are merged with the route-derived pairing. */ export declare function deriveDelayedFlowEnrollmentTargets(multiProvider: MultiProvider, warpDeployConfig: WarpRouteDeployConfig, deployedContracts: ChainMap
, hybridIsmAddresses?: ChainMap
): Promise>; /** * Builds the enrollment transactions for one chain's * DelayedFlowRouterHookIsm: enrolls every other chain's instance as a remote * counterpart, plus configured peers outside the route, and * optionally transfers ownership to the configured owner LAST (the enrollment * calls are owner-gated). Converges to zero transactions once the on-chain * state already matches. * * Shared by the deploy flow (deployer-owned instances) and `warp apply` * (instances that may be owned by a Safe/ICA — the returned transactions carry * no signing assumptions and ride whichever submitter the caller uses). */ export declare function buildDelayedFlowEnrollmentTxs({ chain, multiProvider, registryAddresses, warpRouter, target, allTargets, reconcileOwnership, }: { chain: ChainName; multiProvider: MultiProvider; registryAddresses: ChainMap; warpRouter: Address; target: DelayedFlowEnrollmentTarget; allTargets: ChainMap; /** Preserve the current owner when ownership is handled by another phase. */ reconcileOwnership?: boolean; }): Promise; export declare function enrollCrossChainRouters({ multiProvider, altVmSigners, registryAddresses, warpDeployConfig, }: { multiProvider: MultiProvider; altVmSigners: ChainMap>; registryAddresses: ChainMap; warpDeployConfig: WarpRouteDeployConfigMailboxRequired; }, deployedContracts: ChainMap
): Promise>; export {}; //# sourceMappingURL=warp.d.ts.map