import type { Logger } from 'pino'; import type { MultiProtocolCore } from '@hyperlane-xyz/sdk'; import type { Address, Domain } from '@hyperlane-xyz/utils'; import type { ExternalBridgeRegistry } from '../interfaces/IExternalBridge.js'; import type { ConfirmedBlockTags } from '../interfaces/IMonitor.js'; import type { IExplorerClient } from '../utils/ExplorerClient.js'; import type { CreateRebalanceActionParams, CreateRebalanceIntentParams, IActionTracker } from './IActionTracker.js'; import type { ActionType, IRebalanceActionStore, IRebalanceIntentStore, ITransferStore, PartialInventoryIntent, RebalanceAction, RebalanceIntent, Transfer } from './types.js'; export interface ActionTrackerConfig { routersByDomain: Record; bridges: Address[]; rebalancerAddress: Address; inventorySignerAddresses?: Address[]; intentTTL: number; } /** * ActionTracker implementation managing the lifecycle of tracked entities. */ export declare class ActionTracker implements IActionTracker { private readonly transferStore; private readonly rebalanceIntentStore; private readonly rebalanceActionStore; private readonly explorerClient; private readonly core; private readonly config; private readonly logger; constructor(transferStore: ITransferStore, rebalanceIntentStore: IRebalanceIntentStore, rebalanceActionStore: IRebalanceActionStore, explorerClient: IExplorerClient, core: MultiProtocolCore, config: ActionTrackerConfig, logger: Logger); initialize(): Promise; syncTransfers(confirmedBlockTags?: ConfirmedBlockTags): Promise; syncRebalanceIntents(): Promise; syncRebalanceActions(confirmedBlockTags?: ConfirmedBlockTags): Promise; getTransfer(id: string): Promise; getInProgressTransfers(): Promise; getTransfersByDestination(destination: Domain): Promise; getRebalanceIntent(id: string): Promise; getActiveRebalanceIntents(): Promise; getRebalanceIntentsByDestination(destination: Domain): Promise; createRebalanceIntent(params: CreateRebalanceIntentParams): Promise; completeRebalanceIntent(id: string): Promise; cancelRebalanceIntent(id: string): Promise; failRebalanceIntent(id: string): Promise; getRebalanceAction(id: string): Promise; getInProgressActions(): Promise; createRebalanceAction(params: CreateRebalanceActionParams): Promise; completeRebalanceAction(id: string): Promise; /** * Check if an intent is fully fulfilled based on completed action amounts. * Only `inventory_deposit` and `rebalance_message` actions count toward fulfillment. */ private checkAndCompleteIntent; /** * Get the total completed amount for an intent from its actions. * Only `inventory_deposit` and `rebalance_message` actions count. */ private getCompletedAmountForIntent; failRebalanceAction(id: string): Promise; getActionsByType(type: ActionType): Promise; getInflightInventoryMovements(origin: Domain): Promise; /** * Get inventory intents that are in_progress or not_started but not fully settled. * Intents with in-flight deposits are included but flagged via hasInflightDeposit. * Returns enriched data with computed values derived from action states. * * NOTE: We include 'not_started' intents because they may have been created * but failed to execute (e.g., all bridges failed viability check). Without * checking for these, we would create duplicate intents every polling cycle. */ getPartiallyFulfilledInventoryIntents(): Promise; /** * Get all actions associated with a specific intent. */ getActionsForIntent(intentId: string): Promise; syncInventoryMovementActions(externalBridgeRegistry: Partial): Promise<{ completed: number; failed: number; }>; /** * Log the contents of all stores. * Logs each item separately for full visibility (avoids [Object] truncation). */ logStoreContents(): Promise; /** * Get the confirmed block tag for delivery checks. * Uses cached value from Monitor event if available, otherwise computes on-demand. */ private getConfirmedBlockTag; private isMessageDelivered; private recoverAction; } //# sourceMappingURL=ActionTracker.d.ts.map