39 lines
2.2 KiB
TypeScript
39 lines
2.2 KiB
TypeScript
|
import type { Logger } from 'winston';
|
||
|
import { FastifyInstance, FastifyReply, FastifyRequest } from 'fastify';
|
||
|
import { NetIdType, DepositsEvents, WithdrawalsEvents, EchoEvents, EncryptedNotesEvents, AllGovernanceEvents, TovarishStatus, AllRelayerRegistryEvents, StakeBurnedEvents } from '@tornado/core';
|
||
|
import { RelayerConfig } from '../config';
|
||
|
import { SentMsg } from './routerMsg';
|
||
|
import { SyncManagerStatus } from './sync';
|
||
|
export declare function getHealthStatus(netId: NetIdType, syncManagerStatus: SyncManagerStatus): string;
|
||
|
export declare function getGasPrices(netId: NetIdType, syncManagerStatus: SyncManagerStatus): {
|
||
|
fast: number;
|
||
|
additionalProperties: number | undefined;
|
||
|
};
|
||
|
export declare function formatStatus({ url, netId, relayerConfig, syncManagerStatus, pendingWorks, }: {
|
||
|
url: string;
|
||
|
netId: NetIdType;
|
||
|
relayerConfig: RelayerConfig;
|
||
|
syncManagerStatus: SyncManagerStatus;
|
||
|
pendingWorks: number;
|
||
|
}): TovarishStatus;
|
||
|
export declare function handleIndex(enabledNetworks: NetIdType[]): string;
|
||
|
export declare function handleStatus(url: string, router: Router, netId: NetIdType | NetIdType[], reply: FastifyReply): Promise<void>;
|
||
|
/**
|
||
|
* Since we check gasLimit and fees, should extend timeout at any proxy more than 60s
|
||
|
*/
|
||
|
export declare function handleTornadoWithdraw(router: Router, netId: NetIdType, req: FastifyRequest, reply: FastifyReply): Promise<void>;
|
||
|
export declare function handleGetJob(router: Router, req: FastifyRequest, reply: FastifyReply): Promise<void>;
|
||
|
export type AllTovarishEvents = DepositsEvents | WithdrawalsEvents | EchoEvents | EncryptedNotesEvents | AllGovernanceEvents | AllRelayerRegistryEvents | StakeBurnedEvents;
|
||
|
export declare function handleEvents(router: Router, netId: NetIdType, req: FastifyRequest, reply: FastifyReply): Promise<void>;
|
||
|
export declare function handleTrees(router: Router, req: FastifyRequest, reply: FastifyReply): Promise<void>;
|
||
|
export declare function listenRouter(router: Router): void;
|
||
|
export declare class Router {
|
||
|
relayerConfig: RelayerConfig;
|
||
|
logger: Logger;
|
||
|
forkId: number;
|
||
|
app: FastifyInstance;
|
||
|
admin: FastifyInstance;
|
||
|
messages: SentMsg[];
|
||
|
constructor(relayerConfig: RelayerConfig, forkId?: number);
|
||
|
}
|