import { TransactionReceipt } from '@ethersproject/providers'; import { ethers } from 'ethers'; import type { TransactionReceipt as ViemTxReceipt } from 'viem'; import { IMessageRecipient } from '@hyperlane-xyz/core'; import { Address, AddressBytes32 } from '@hyperlane-xyz/utils'; import { HyperlaneApp } from '../app/HyperlaneApp.js'; import { HyperlaneAddressesMap } from '../contracts/types.js'; import { DerivedHookConfig } from '../hook/types.js'; import { DerivedIsmConfig } from '../ism/types.js'; import { MultiProvider } from '../providers/MultiProvider.js'; import { RouterConfig } from '../router/types.js'; import { ChainMap, ChainName, OwnableConfig } from '../types.js'; import { CoreFactories } from './contracts.js'; import { DispatchEvent } from './events.js'; import { DispatchedMessage } from './types.js'; export declare class HyperlaneCore extends HyperlaneApp { static fromAddressesMap(addressesMap: HyperlaneAddressesMap, multiProvider: MultiProvider): HyperlaneCore; getRouterConfig: (owners: Address | ChainMap) => ChainMap; quoteGasPayment: (origin: ChainName, destination: ChainName, recipient: AddressBytes32, body: string, metadata?: string, hook?: Address) => Promise; getDestination(message: DispatchedMessage): ChainName; getOrigin(message: DispatchedMessage): ChainName; getRecipientIsmAddress(message: DispatchedMessage): Promise
; getHookAddress(message: DispatchedMessage): Promise
; getRecipientIsmConfig(message: DispatchedMessage): Promise; getHookConfig(message: DispatchedMessage): Promise; sendMessage(origin: ChainName, destination: ChainName, recipient: Address, body: string, hook?: Address, metadata?: string): Promise<{ dispatchTx: TransactionReceipt; message: DispatchedMessage; }>; onDispatch(handler: (message: DispatchedMessage, event: DispatchEvent) => Promise, chains?: string[]): { removeHandler: (chains?: ChainName[]) => void; }; getDefaults(): Promise>; getIsm(destinationChain: ChainName, recipientAddress: Address): Promise
; protected getRecipient(message: DispatchedMessage): IMessageRecipient; estimateHandle(message: DispatchedMessage): Promise; /** * Estimates gas for calling handle() on a recipient contract. * * This is a flexible utility that accepts minimal parameters (destination, * recipient, origin, sender, body) instead of requiring a full DispatchedMessage. * Use this when you have message components but not a complete DispatchedMessage object. * * @param params - Object containing: * - destination: The destination chain name * - recipient: The recipient contract address (or any IMessageRecipient implementation like ICA router) * - origin: The origin domain ID * - sender: The sender address (as bytes32 string) * - body: The message body (as hex string) * - mailbox: Optional mailbox address override (defaults to chain's configured mailbox) * @returns Gas estimate as a string, or '0' if estimation fails */ estimateHandleGas(params: { destination: ChainName; recipient: Address; origin: number; sender: string; body: string; mailbox?: Address; }): Promise; deliver(message: DispatchedMessage, ismMetadata: string): Promise; getHook(originChain: ChainName, senderAddress: Address): Promise
; isDelivered(message: DispatchedMessage): Promise; getSenderHookAddress(message: DispatchedMessage): Promise
; getProcessedReceipt(message: DispatchedMessage): Promise; protected waitForProcessReceipt(message: DispatchedMessage): Promise; waitForMessageIdProcessed(messageId: string, destination: ChainName, delayMs?: number, maxAttempts?: number): Promise; waitForMessageProcessing(sourceTx: ethers.ContractReceipt | ViemTxReceipt): Promise; waitForMessageProcessed(sourceTx: ethers.ContractReceipt | ViemTxReceipt, delay?: number, maxAttempts?: number): Promise; getDispatchedMessages(sourceTx: TransactionReceipt | ViemTxReceipt): DispatchedMessage[]; getDispatchTx(originChain: ChainName, messageId: string, blockNumber?: number): Promise; static parseDispatchedMessage(message: string): DispatchedMessage; static getDispatchedMessages(sourceTx: TransactionReceipt | ViemTxReceipt): DispatchedMessage[]; } //# sourceMappingURL=HyperlaneCore.d.ts.map