import { RelayerApp, RelayerAppOpts, defaultOpts } from "./application.js"; import { LoggingContext, ProvidersOpts, SourceTxContext, StagingAreaContext, TokenBridgeContext, WalletContext } from "./middleware/index.js"; import { Logger } from "winston"; import { StorageContext } from "./storage/storage.js"; import { ExponentialBackoffOpts } from "./storage/redis-storage.js"; import { ChainId } from "@certusone/wormhole-sdk"; import { ClusterNode, ClusterOptions, RedisOptions } from "ioredis"; import { MakeOptional } from "./utils.js"; import { Environment } from "./environment.js"; import { TokensByChain } from "./middleware/wallet/wallet-management.js"; import { Registry } from "prom-client"; import Koa from "koa"; export interface StandardMissedVaaOpts { concurrency?: number; checkInterval?: number; fetchVaaRetries?: number; vaasFetchConcurrency?: number; storagePrefix?: string; startingSequenceConfig?: Partial>; forceSeenKeysReindex?: boolean; } export interface StandardRelayerAppOpts extends RelayerAppOpts { name: string; spyEndpoint: string; logger?: Logger; privateKeys?: Partial<{ [k in ChainId]: any[]; }>; tokensByChain?: TokensByChain; workflows?: { retries: number; }; providers?: ProvidersOpts; redisClusterEndpoints?: ClusterNode[]; redisCluster?: ClusterOptions; redis?: RedisOptions; fetchSourceTxhash?: boolean; retryBackoffOptions?: ExponentialBackoffOpts; missedVaaOptions?: StandardMissedVaaOpts; maxCompletedQueueSize?: number; maxFailedQueueSize?: number; } declare const defaultStdOpts: { spyEndpoint: string; workflows: { retries: number; }; fetchSourceTxhash: true; logger: Logger; }; type FullDefaultOpts = typeof defaultStdOpts & ReturnType; export type StandardRelayerContext = LoggingContext & StorageContext & TokenBridgeContext & StagingAreaContext & WalletContext & SourceTxContext; export declare class StandardRelayerApp extends RelayerApp { private readonly store; private readonly mergedRegistry; constructor(env: Environment, opts: MakeOptional); /** * Registry with prometheus metrics exported by the relayer. * Metrics include: * - active_workflows: Number of workflows currently running * - delayed_workflows: Number of worklows which are scheduled in the future either because they were scheduled that way or because they failed. * - waiting_workflows: Workflows waiting for a worker to pick them up. * - worklow_processing_duration: Processing time for completed jobs (processing until completed) * - workflow_total_duration: Processing time for completed jobs (processing until completed) */ get metricsRegistry(): Registry; /** * A UI that you can mount in a KOA app to show the status of the queue / jobs. * @param path */ storageKoaUI(path: string): Koa.Middleware; } export {};