import type { Horizon, LogLevel } from './common.js'; import type { BigNumberish } from 'ethers'; export type DeliveryMode = 'realtime' | 'redrive' | 'backfill'; export type BackfillRequest> = { jobId: string; indexerId: string; logLevel: LogLevel; context: T; }; export type EvmIngestedBlock = { number: number; hash: string; parentHash: string; nonce: string; sha3Uncles?: string; stateRoot?: string; receiptsRoot?: string; logsBloom?: string; miner?: string; extraData: string; size: number; gasLimit: string; gasUsed: string; baseFeePerGas: string; timestamp: number; transactions: string[]; uncles?: string[]; chainId: number; blockForkIndex: number; ingestionReceivedAt: number; delivery: DeliveryMode; }; export type IngestedBlock = EvmIngestedBlock; export type EvmIngestedTransaction = { blockNumber: number; blockHash: string; hash: string; to?: string; from?: string; nonce?: number; gasLimit?: string; gasPrice?: string; maxFeePerGas?: string; maxPriorityFeePerGas?: string; data?: string; value?: string; type?: number; accessList?: any[]; status?: boolean; revertReason?: string; blockTimestamp: number; gasUsed?: BigNumberish; effectiveGasPrice?: BigNumberish; deployedContractAddress?: string; events?: EvmInlineEvent[]; traces?: EvmInlineTrace[]; chainId: number; blockForkIndex: number; indexerId?: string; filterGroupId?: string; createdAt?: number; ingestionReceivedAt: number; }; export type IngestedTransaction = EvmIngestedTransaction; export type EvmIngestedEvent = { blockNumber: `0x${string}`; blockHash: string; address: string; data?: string; logIndex: number; topics?: string[]; transactionHash: string; transactionIndex: number; blockTimestamp: number; chainId: number; blockForkIndex: number; localIndex: number; ingestionReceivedAt: number; receivingEndpoint?: string; delivery: DeliveryMode; }; export type IngestedEvent = EvmIngestedEvent; export type EvmParsedCall | any[], OUTPUT = Record | any[]> = { name: string; sighash: string; input: INPUT; output?: OUTPUT; }; export type EvmInlineEvent> = { address: string; logIndex: number; topics?: string[]; data?: string; eventName?: string; args?: TArgs; }; export type EvmTraceType = 'call' | 'create' | 'suicide' | 'reward'; export type EvmTraceCallType = 'call' | 'create' | 'delegatecall' | 'staticcall'; export type EvmInlineTrace = { action: { from: string; callType: EvmTraceCallType; gas: string; input: string; to: string; value: string; parsed?: EvmParsedCall; }; result: { gasUsed: string; output: string; }; subtraces: number; traceAddress: number[]; type: EvmTraceType; parsed?: EvmParsedCall; }; export type EvmBlockReorg = { indexerId: string; chainId: number; forkIndex: number; newBlock: EvmIngestedBlock; detectedAt: number; }; export type BlockReorg = EvmBlockReorg; export type BlockHandlerInput> = { block: EvmIngestedBlock; horizon: Horizon; backfill?: BackfillRequest; }; export type TransactionHandlerInput> = { transaction: EvmIngestedTransaction; horizon: Horizon; backfill?: BackfillRequest; }; export type EventHandlerInput, ContextType = Record> = { chainId: number; blockNumber: number; blockTimestamp: number; txHash: string; txIndex: number; log: EvmIngestedEvent; horizon: Horizon; parsed?: { name: string; topic: string; args: ArgsType; }; abi?: Record; backfill?: BackfillRequest; }; export type ReorgHandlerInput> = { reorg: EvmBlockReorg; horizon: Horizon; backfill?: BackfillRequest; }; export type BlockProcessorHandlerObject = { processBlock: (input: BlockHandlerInput) => Promise; }; export type TransactionProcessorHandlerObject = { processTransaction: (input: TransactionHandlerInput) => Promise; }; export type EventProcessorHandlerObject = { processEvent: (input: EventHandlerInput) => Promise; }; export type ReorgProcessorHandlerObject = { processReorg: (input: ReorgHandlerInput) => Promise; }; export type EnricherHandlerInput, TParams = Record> = { data?: TData; parameters?: TParams; }; export type EnricherHandlerObject = { handleInput: ((input: EnricherHandlerInput) => Promise) | ((input: EnricherHandlerInput, callback: (result: undefined, error?: Error) => void) => void); }; //# sourceMappingURL=ingestion.d.ts.map