import { Cluster, Redis } from "ioredis"; import { Registry } from "prom-client"; import { ChainId } from "@certusone/wormhole-sdk"; import { Logger } from "winston"; import { RelayerApp } from "../../application.js"; import { RedisConnectionOpts } from "../../storage/redis-storage.js"; import { MissedVaaRunStats } from "./helpers.js"; import { ProcessVaaFn } from "./check.js"; import { Wormholescan } from "../../rpc/wormholescan-client.js"; export interface MissedVaaOpts extends RedisConnectionOpts { registry?: Registry; logger?: Logger; wormholeRpcs: string[]; wormscanUrl?: string; concurrency?: number; checkInterval?: number; fetchVaaRetries?: number; maxLookAhead?: number; vaasFetchConcurrency?: number; /** * "storagePrefix" is the prefix used by the storage (currently redis-storage) to * store workflows. See RedisStorage.getPrefix * * This is generating a dependency with the storage implementation, which is not ideal. * To solve this problem, we could add a new method to the storage interface to get seen sequences * and pass it to the missed vaas middleware * * Untill that happens, we assume that if you pass in a storagePrefix property, * then you are using redis-storage */ storagePrefix?: string; startingSequenceConfig?: Partial>; forceSeenKeysReindex?: boolean; } export interface FilterIdentifier { emitterChain: number; emitterAddress: string; } export declare function spawnMissedVaaWorker(app: RelayerApp, opts: MissedVaaOpts): Promise; export declare function runMissedVaaCheck(filter: FilterIdentifier, redis: Redis | Cluster, processVaa: ProcessVaaFn, opts: MissedVaaOpts, storagePrefix: string, wormholescan: Wormholescan, logger?: Logger): Promise<{ missedVaas: MissedVaaRunStats; sequenceStats: import("./helpers.js").SequenceStats; }>;