import type { Chain } from './chain.ts'; import type { CCIPMessage, CCIPVersion, Lane, WithLogger } from './types.ts'; /** * Pure/sync function to calculate/generate OffRamp.executeManually report for messageIds * * @param messagesInBatch - Array containing all messages in batch, ordered * @param lane - Arguments for leafHasher (lane info) * @param messageId - Message ID to prove for manual execution * @param merkleRoot - Optional merkleRoot of the CommitReport, for validation * @param ctx - Context for logging * @returns ManualExec report arguments * @throws CCIPMessageNotInBatchError - When the messageId is not found in the provided batch * @throws CCIPMerkleRootMismatchError - When calculated merkle root doesn't match the provided one * * @remarks * This is a pure/sync function that performs no I/O - all data must be pre-fetched. * It builds a merkle tree from the messages, generates a proof for the target messageId, * and optionally validates against the provided merkleRoot. * * The returned proof can be used with `execute` to manually execute a stuck message. * * @example * ```typescript * import { calculateManualExecProof, EVMChain } from '@chainlink/ccip-sdk' * * // Fetch the request and all messages in its batch * const request = (await source.getMessagesInTx(txHash))[0] * const verifications = await dest.getVerifications({ offRamp, request }) * const messages = await source.getMessagesInBatch(request, commit.report) * * // Calculate proof for manual execution * const proof = calculateManualExecProof( * messages, * request.lane, * request.message.messageId, * commit.report.merkleRoot * ) * console.log('Merkle root:', proof.merkleRoot) * console.log('Proofs:', proof.proofs) * ``` * @see {@link discoverOffRamp} - Find the OffRamp for manual execution * @see {@link execute} - Execute the report on destination chain * @see {@link generateUnsignedExecute} - Build unsigned execution tx **/ export declare function calculateManualExecProof(messagesInBatch: readonly CCIPMessage[], lane: Lane, messageId: string, merkleRoot?: string, ctx?: WithLogger): { proofs: string[]; proofFlagBits: bigint; merkleRoot: string; }; /** * Discover the OffRamp address for a given OnRamp and destination chain. * Results are memoized for performance. * * @param source - Source chain instance. * @param dest - Destination chain instance. * @param onRamp - OnRamp contract address on source chain. * @param ctx - Optional context with logger. * @returns OffRamp address on destination chain. * @throws CCIPOffRampNotFoundError - When no matching OffRamp is found for the OnRamp * @example * ```typescript * import { discoverOffRamp, EVMChain } from '@chainlink/ccip-sdk' * * const source = await EVMChain.fromUrl('https://rpc.sepolia.org') * const dest = await EVMChain.fromUrl('https://rpc.fuji.avax.network') * * const offRamp = await discoverOffRamp(source, dest, onRampAddress) * console.log('OffRamp on destination:', offRamp) * ``` * @see {@link calculateManualExecProof} - Use with OffRamp for manual execution * @see {@link execute} - Execute on destination chain * @see {@link getExecutionReceipts} - Check execution status */ export declare const discoverOffRamp: import("micro-memoize").Memoized<(source: Chain, dest: Chain, onRamp: string, { logger }?: WithLogger) => Promise, { transformKey: ([source, dest, onRamp]: [source: Chain, dest: Chain, onRamp: string, (WithLogger | undefined)?]) => [bigint, bigint, string]; }>; //# sourceMappingURL=execution.d.ts.map