@sentio/runtime 0.0.0-rc.a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts ADDED
@@ -0,0 +1,663 @@
1
+ import * as _sentio_protos from '@sentio/protos';
2
+ import { DeepPartial as DeepPartial$1, ProcessStreamResponse, DBResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, EthCallParam, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
3
+ import { Subject } from 'rxjs';
4
+ import { AsyncLocalStorage } from 'node:async_hooks';
5
+ import { Required } from 'utility-types';
6
+ import { CallContext } from 'nice-grpc';
7
+ import _m0 from 'protobufjs/minimal.js';
8
+ import { JsonRpcProvider, Provider, Network } from 'ethers';
9
+ import PQueue from 'p-queue';
10
+ import { EthChainId } from '@sentio/chain';
11
+ import { Counter, Attributes, Gauge, Histogram } from '@opentelemetry/api';
12
+
13
+ type Request = Omit<DBRequest, 'opId'>;
14
+ type RequestType = keyof Request;
15
+ declare const timeoutError: Error;
16
+ declare class StoreContext {
17
+ readonly subject: Subject<DeepPartial$1<ProcessStreamResponse>>;
18
+ readonly processId: number;
19
+ private static opCounter;
20
+ private defers;
21
+ private statsInterval;
22
+ private pendings;
23
+ constructor(subject: Subject<DeepPartial$1<ProcessStreamResponse>>, processId: number);
24
+ newPromise<T>(opId: bigint, requestType?: RequestType): Promise<T>;
25
+ sendRequest(request: DeepPartial$1<Request>, timeoutSecs?: number): Promise<DBResponse>;
26
+ result(dbResult: DBResponse): void;
27
+ error(processId: number, e: any): void;
28
+ close(): void;
29
+ upsertBatch: {
30
+ opId: bigint;
31
+ request: DBRequest_DBUpsert;
32
+ promise: Promise<DBResponse>;
33
+ timer: NodeJS.Timeout;
34
+ } | undefined;
35
+ private sendUpsertInBatch;
36
+ private sendBatch;
37
+ awaitPendings(): Promise<void>;
38
+ }
39
+
40
+ declare abstract class Plugin {
41
+ name: string;
42
+ supportedHandlers: HandlerType[];
43
+ configure(config: ProcessConfigResponse): Promise<void>;
44
+ start(start: StartRequest): Promise<void>;
45
+ /**
46
+ * @deprecated The method should not be used, use ctx.states instead
47
+ */
48
+ stateDiff(config: ProcessConfigResponse): boolean;
49
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined): Promise<ProcessResult>;
50
+ preprocessBinding(request: DataBinding, preprocessStore: {
51
+ [k: string]: any;
52
+ }): Promise<PreprocessResult>;
53
+ /**
54
+ * method used by action server only
55
+ * @param port
56
+ */
57
+ startServer(port?: number): Promise<void>;
58
+ /**
59
+ * method used by action server only
60
+ */
61
+ shutdownServer(): void;
62
+ }
63
+ declare class PluginManager {
64
+ static INSTANCE: PluginManager;
65
+ dbContextLocalStorage: AsyncLocalStorage<StoreContext | undefined>;
66
+ plugins: Plugin[];
67
+ typesToPlugin: Map<HandlerType, Plugin>;
68
+ register(plugin: Plugin): void;
69
+ configure(config: ProcessConfigResponse): Promise<void[]>;
70
+ start(start: StartRequest, actionServerPort?: number): Promise<void[]>;
71
+ startServer(port?: number): Promise<void[]>;
72
+ shutdown(): void;
73
+ /**
74
+ * @deprecated The method should not be used, use ctx.states instead
75
+ */
76
+ stateDiff(config: ProcessConfigResponse): boolean;
77
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined, dbContext?: StoreContext): Promise<ProcessResult>;
78
+ preprocessBinding(request: DataBinding, preprocessStore: {
79
+ [k: string]: any;
80
+ }, dbContext?: StoreContext): Promise<PreprocessResult>;
81
+ }
82
+
83
+ declare class State {
84
+ stateMap: Map<string, any>;
85
+ static INSTANCE: State;
86
+ static reset(): void;
87
+ }
88
+ declare abstract class StateStorage<T> {
89
+ protected constructor();
90
+ abstract initValue(): T;
91
+ key(): string;
92
+ getOrRegister(): T;
93
+ unregister(): T;
94
+ }
95
+ declare abstract class MapStateStorage<T> extends StateStorage<Map<string, T>> {
96
+ initValue(): Map<string, T>;
97
+ getValue(key: string): T | undefined;
98
+ getValues(): T[];
99
+ getOrSetValue(key: string, value: T): T;
100
+ }
101
+ declare abstract class ListStateStorage<T> extends StateStorage<T[]> {
102
+ initValue(): never[];
103
+ getValues(): T[];
104
+ addValue(value: T): T;
105
+ }
106
+
107
+ declare function mergeProcessResults(results: ProcessResult[]): Required<ProcessResult, 'states'>;
108
+ declare function errorString(e: Error): string;
109
+ declare const USER_PROCESSOR = "user_processor";
110
+ declare function makeEthCallKey(param: EthCallParam): string;
111
+ type Semver = {
112
+ semVer?: string;
113
+ major: number;
114
+ minor: number;
115
+ patch: number;
116
+ prerelease?: string;
117
+ buildmetadata?: string;
118
+ };
119
+ declare function parseSemver(version: string): Semver;
120
+ declare function compareSemver(a: Semver, b: Semver): number;
121
+
122
+ declare class Endpoints {
123
+ static INSTANCE: Endpoints;
124
+ concurrency: number;
125
+ chainQueryAPI: string;
126
+ priceFeedAPI: string;
127
+ chainServer: Map<string, string>;
128
+ batchCount: number;
129
+ }
130
+
131
+ interface ChainConfig {
132
+ ChainID: string;
133
+ Https?: string[];
134
+ ChainServer?: string;
135
+ }
136
+
137
+ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
138
+ private started;
139
+ unhandled: Error;
140
+ private readonly loader;
141
+ private readonly shutdownHandler?;
142
+ private readonly enablePreprocess;
143
+ private preparedData;
144
+ constructor(loader: () => Promise<any>, shutdownHandler?: () => void);
145
+ getConfig(request: ProcessConfigRequest, context: CallContext): Promise<ProcessConfigResponse>;
146
+ start(request: StartRequest, context: CallContext): Promise<Empty>;
147
+ stop(request: Empty, context: CallContext): Promise<Empty>;
148
+ processBindings(request: ProcessBindingsRequest, options?: CallContext): Promise<ProcessBindingResponse>;
149
+ preprocessBindings(bindings: DataBinding[], preprocessStore: {
150
+ [k: string]: any;
151
+ }, dbContext?: StoreContext, options?: CallContext): Promise<PreparedData>;
152
+ preprocessBinding(request: DataBinding, preprocessStore: {
153
+ [k: string]: any;
154
+ }, dbContext?: StoreContext, options?: CallContext): Promise<PreprocessResult>;
155
+ processBinding(request: DataBinding, preparedData: PreparedData | undefined, options?: CallContext): Promise<ProcessResult>;
156
+ processBindingsStream(requests: AsyncIterable<ProcessStreamRequest>, context: CallContext): AsyncGenerator<{
157
+ processId?: number | undefined;
158
+ dbRequest?: {
159
+ opId?: bigint | undefined;
160
+ get?: {
161
+ entity?: string | undefined;
162
+ id?: string | undefined;
163
+ } | undefined;
164
+ upsert?: {
165
+ entity?: string[] | undefined;
166
+ id?: string[] | undefined;
167
+ data?: {
168
+ [x: string]: any;
169
+ }[] | undefined;
170
+ entityData?: {
171
+ fields?: {
172
+ [x: string]: {
173
+ nullValue?: _sentio_protos.RichValue_NullValue | undefined;
174
+ intValue?: number | undefined;
175
+ int64Value?: bigint | undefined;
176
+ floatValue?: number | undefined;
177
+ bytesValue?: Uint8Array | undefined;
178
+ boolValue?: boolean | undefined;
179
+ stringValue?: string | undefined;
180
+ timestampValue?: Date | undefined;
181
+ bigintValue?: {
182
+ negative?: boolean | undefined;
183
+ data?: Uint8Array | undefined;
184
+ } | undefined;
185
+ bigdecimalValue?: {
186
+ value?: {
187
+ negative?: boolean | undefined;
188
+ data?: Uint8Array | undefined;
189
+ } | undefined;
190
+ exp?: number | undefined;
191
+ } | undefined;
192
+ listValue?: {
193
+ values?: any[] | undefined;
194
+ } | undefined;
195
+ structValue?: any | undefined;
196
+ tokenValue?: {
197
+ token?: {
198
+ symbol?: string | undefined;
199
+ address?: {
200
+ address?: string | undefined;
201
+ chain?: string | undefined;
202
+ } | undefined;
203
+ } | undefined;
204
+ amount?: {
205
+ value?: {
206
+ negative?: boolean | undefined;
207
+ data?: Uint8Array | undefined;
208
+ } | undefined;
209
+ exp?: number | undefined;
210
+ } | undefined;
211
+ specifiedAt?: Date | undefined;
212
+ } | undefined;
213
+ } | undefined;
214
+ } | undefined;
215
+ }[] | undefined;
216
+ } | undefined;
217
+ delete?: {
218
+ entity?: string[] | undefined;
219
+ id?: string[] | undefined;
220
+ } | undefined;
221
+ list?: {
222
+ entity?: string | undefined;
223
+ filters?: {
224
+ field?: string | undefined;
225
+ op?: _sentio_protos.DBRequest_DBOperator | undefined;
226
+ value?: {
227
+ values?: any[] | undefined;
228
+ } | undefined;
229
+ }[] | undefined;
230
+ cursor?: string | undefined;
231
+ pageSize?: number | undefined;
232
+ } | undefined;
233
+ } | undefined;
234
+ result?: {
235
+ gauges?: {
236
+ metadata?: {
237
+ address?: string | undefined;
238
+ contractName?: string | undefined;
239
+ blockNumber?: bigint | undefined;
240
+ transactionHash?: string | undefined;
241
+ chainId?: string | undefined;
242
+ transactionIndex?: number | undefined;
243
+ logIndex?: number | undefined;
244
+ name?: string | undefined;
245
+ labels?: {
246
+ [x: string]: string | undefined;
247
+ } | undefined;
248
+ } | undefined;
249
+ metricValue?: {
250
+ bigDecimal?: string | undefined;
251
+ doubleValue?: number | undefined;
252
+ bigInteger?: {
253
+ negative?: boolean | undefined;
254
+ data?: Uint8Array | undefined;
255
+ } | undefined;
256
+ } | undefined;
257
+ runtimeInfo?: {
258
+ from?: HandlerType | undefined;
259
+ } | undefined;
260
+ }[] | undefined;
261
+ counters?: {
262
+ metadata?: {
263
+ address?: string | undefined;
264
+ contractName?: string | undefined;
265
+ blockNumber?: bigint | undefined;
266
+ transactionHash?: string | undefined;
267
+ chainId?: string | undefined;
268
+ transactionIndex?: number | undefined;
269
+ logIndex?: number | undefined;
270
+ name?: string | undefined;
271
+ labels?: {
272
+ [x: string]: string | undefined;
273
+ } | undefined;
274
+ } | undefined;
275
+ metricValue?: {
276
+ bigDecimal?: string | undefined;
277
+ doubleValue?: number | undefined;
278
+ bigInteger?: {
279
+ negative?: boolean | undefined;
280
+ data?: Uint8Array | undefined;
281
+ } | undefined;
282
+ } | undefined;
283
+ add?: boolean | undefined;
284
+ runtimeInfo?: {
285
+ from?: HandlerType | undefined;
286
+ } | undefined;
287
+ }[] | undefined;
288
+ events?: {
289
+ metadata?: {
290
+ address?: string | undefined;
291
+ contractName?: string | undefined;
292
+ blockNumber?: bigint | undefined;
293
+ transactionHash?: string | undefined;
294
+ chainId?: string | undefined;
295
+ transactionIndex?: number | undefined;
296
+ logIndex?: number | undefined;
297
+ name?: string | undefined;
298
+ labels?: {
299
+ [x: string]: string | undefined;
300
+ } | undefined;
301
+ } | undefined;
302
+ distinctEntityId?: string | undefined;
303
+ attributes?: {
304
+ [x: string]: any;
305
+ } | undefined;
306
+ severity?: _sentio_protos.LogLevel | undefined;
307
+ message?: string | undefined;
308
+ runtimeInfo?: {
309
+ from?: HandlerType | undefined;
310
+ } | undefined;
311
+ attributes2?: {
312
+ fields?: {
313
+ [x: string]: {
314
+ nullValue?: _sentio_protos.RichValue_NullValue | undefined;
315
+ intValue?: number | undefined;
316
+ int64Value?: bigint | undefined;
317
+ floatValue?: number | undefined;
318
+ bytesValue?: Uint8Array | undefined;
319
+ boolValue?: boolean | undefined;
320
+ stringValue?: string | undefined;
321
+ timestampValue?: Date | undefined;
322
+ bigintValue?: {
323
+ negative?: boolean | undefined;
324
+ data?: Uint8Array | undefined;
325
+ } | undefined;
326
+ bigdecimalValue?: {
327
+ value?: {
328
+ negative?: boolean | undefined;
329
+ data?: Uint8Array | undefined;
330
+ } | undefined;
331
+ exp?: number | undefined;
332
+ } | undefined;
333
+ listValue?: {
334
+ values?: any[] | undefined;
335
+ } | undefined;
336
+ structValue?: any | undefined;
337
+ tokenValue?: {
338
+ token?: {
339
+ symbol?: string | undefined;
340
+ address?: {
341
+ address?: string | undefined;
342
+ chain?: string | undefined;
343
+ } | undefined;
344
+ } | undefined;
345
+ amount?: {
346
+ value?: {
347
+ negative?: boolean | undefined;
348
+ data?: Uint8Array | undefined;
349
+ } | undefined;
350
+ exp?: number | undefined;
351
+ } | undefined;
352
+ specifiedAt?: Date | undefined;
353
+ } | undefined;
354
+ } | undefined;
355
+ } | undefined;
356
+ } | undefined;
357
+ noMetric?: boolean | undefined;
358
+ }[] | undefined;
359
+ exports?: {
360
+ metadata?: {
361
+ address?: string | undefined;
362
+ contractName?: string | undefined;
363
+ blockNumber?: bigint | undefined;
364
+ transactionHash?: string | undefined;
365
+ chainId?: string | undefined;
366
+ transactionIndex?: number | undefined;
367
+ logIndex?: number | undefined;
368
+ name?: string | undefined;
369
+ labels?: {
370
+ [x: string]: string | undefined;
371
+ } | undefined;
372
+ } | undefined;
373
+ payload?: string | undefined;
374
+ runtimeInfo?: {
375
+ from?: HandlerType | undefined;
376
+ } | undefined;
377
+ }[] | undefined;
378
+ states?: {
379
+ configUpdated?: boolean | undefined;
380
+ error?: string | undefined;
381
+ } | undefined;
382
+ } | undefined;
383
+ }, void, undefined>;
384
+ handlePreprocessRequests(requests: AsyncIterable<PreprocessStreamRequest>, subject: Subject<DeepPartial$1<PreprocessStreamResponse>>): Promise<void>;
385
+ preprocessBindingsStream(requests: AsyncIterable<PreprocessStreamRequest>, context: CallContext): AsyncGenerator<{
386
+ processId?: number | undefined;
387
+ dbRequest?: {
388
+ opId?: bigint | undefined;
389
+ get?: {
390
+ entity?: string | undefined;
391
+ id?: string | undefined;
392
+ } | undefined;
393
+ upsert?: {
394
+ entity?: string[] | undefined;
395
+ id?: string[] | undefined;
396
+ data?: {
397
+ [x: string]: any;
398
+ }[] | undefined;
399
+ entityData?: {
400
+ fields?: {
401
+ [x: string]: {
402
+ nullValue?: _sentio_protos.RichValue_NullValue | undefined;
403
+ intValue?: number | undefined;
404
+ int64Value?: bigint | undefined;
405
+ floatValue?: number | undefined;
406
+ bytesValue?: Uint8Array | undefined;
407
+ boolValue?: boolean | undefined;
408
+ stringValue?: string | undefined;
409
+ timestampValue?: Date | undefined;
410
+ bigintValue?: {
411
+ negative?: boolean | undefined;
412
+ data?: Uint8Array | undefined;
413
+ } | undefined;
414
+ bigdecimalValue?: {
415
+ value?: {
416
+ negative?: boolean | undefined;
417
+ data?: Uint8Array | undefined;
418
+ } | undefined;
419
+ exp?: number | undefined;
420
+ } | undefined;
421
+ listValue?: {
422
+ values?: any[] | undefined;
423
+ } | undefined;
424
+ structValue?: any | undefined;
425
+ tokenValue?: {
426
+ token?: {
427
+ symbol?: string | undefined;
428
+ address?: {
429
+ address?: string | undefined;
430
+ chain?: string | undefined;
431
+ } | undefined;
432
+ } | undefined;
433
+ amount?: {
434
+ value?: {
435
+ negative?: boolean | undefined;
436
+ data?: Uint8Array | undefined;
437
+ } | undefined;
438
+ exp?: number | undefined;
439
+ } | undefined;
440
+ specifiedAt?: Date | undefined;
441
+ } | undefined;
442
+ } | undefined;
443
+ } | undefined;
444
+ }[] | undefined;
445
+ } | undefined;
446
+ delete?: {
447
+ entity?: string[] | undefined;
448
+ id?: string[] | undefined;
449
+ } | undefined;
450
+ list?: {
451
+ entity?: string | undefined;
452
+ filters?: {
453
+ field?: string | undefined;
454
+ op?: _sentio_protos.DBRequest_DBOperator | undefined;
455
+ value?: {
456
+ values?: any[] | undefined;
457
+ } | undefined;
458
+ }[] | undefined;
459
+ cursor?: string | undefined;
460
+ pageSize?: number | undefined;
461
+ } | undefined;
462
+ } | undefined;
463
+ }, void, undefined>;
464
+ private handleRequests;
465
+ }
466
+ declare function recordRuntimeInfo(results: ProcessResult, handlerType: HandlerType): void;
467
+
468
+ interface ExecutionConfig {
469
+ sequential: boolean;
470
+ forceExactBlockTime: boolean;
471
+ processBindingTimeout: number;
472
+ skipStartBlockValidation: boolean;
473
+ rpcRetryTimes: number;
474
+ ethAbiDecoderConfig?: ExecutionConfig_DecoderWorkerConfig | undefined;
475
+ }
476
+ declare const ExecutionConfig: {
477
+ encode(message: ExecutionConfig, writer?: _m0.Writer): _m0.Writer;
478
+ decode(input: _m0.Reader | Uint8Array, length?: number): ExecutionConfig;
479
+ fromJSON(object: any): ExecutionConfig;
480
+ toJSON(message: ExecutionConfig): unknown;
481
+ create(base?: DeepPartial<ExecutionConfig>): ExecutionConfig;
482
+ fromPartial(object: DeepPartial<ExecutionConfig>): ExecutionConfig;
483
+ };
484
+ interface ExecutionConfig_DecoderWorkerConfig {
485
+ enabled: boolean;
486
+ workerCount?: number | undefined;
487
+ skipWhenDecodeFailed?: boolean | undefined;
488
+ }
489
+ declare const ExecutionConfig_DecoderWorkerConfig: {
490
+ encode(message: ExecutionConfig_DecoderWorkerConfig, writer?: _m0.Writer): _m0.Writer;
491
+ decode(input: _m0.Reader | Uint8Array, length?: number): ExecutionConfig_DecoderWorkerConfig;
492
+ fromJSON(object: any): ExecutionConfig_DecoderWorkerConfig;
493
+ toJSON(message: ExecutionConfig_DecoderWorkerConfig): unknown;
494
+ create(base?: DeepPartial<ExecutionConfig_DecoderWorkerConfig>): ExecutionConfig_DecoderWorkerConfig;
495
+ fromPartial(object: DeepPartial<ExecutionConfig_DecoderWorkerConfig>): ExecutionConfig_DecoderWorkerConfig;
496
+ };
497
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
498
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
499
+ [K in keyof T]?: DeepPartial<T[K]>;
500
+ } : Partial<T>;
501
+
502
+ interface GlobalConfig {
503
+ execution: Partial<ExecutionConfig>;
504
+ }
505
+ declare const GLOBAL_CONFIG: GlobalConfig;
506
+
507
+ declare const DummyProvider: JsonRpcProvider;
508
+ declare function getProvider(chainId?: EthChainId): Provider;
509
+ declare class QueuedStaticJsonRpcProvider extends JsonRpcProvider {
510
+ #private;
511
+ executor: PQueue;
512
+ constructor(url: string, network: Network, concurrency: number, batchCount?: number);
513
+ send(method: string, params: Array<any>): Promise<any>;
514
+ toString(): string;
515
+ }
516
+
517
+ declare class C {
518
+ private name;
519
+ private _counter;
520
+ private value;
521
+ constructor(name: string);
522
+ get counter(): Counter<Attributes>;
523
+ add(value: number, attributes?: Attributes): void;
524
+ get(): number;
525
+ }
526
+ declare class G {
527
+ private name;
528
+ private _gauge;
529
+ private value;
530
+ constructor(name: string);
531
+ get gauge(): Gauge<Attributes>;
532
+ record(value: number, attributes?: Attributes): void;
533
+ get(): number;
534
+ }
535
+ declare class H {
536
+ private name;
537
+ private _histogram;
538
+ private value;
539
+ constructor(name: string);
540
+ get histogram(): Histogram<Attributes>;
541
+ record(value: number, attributes?: Attributes): void;
542
+ get(): number;
543
+ }
544
+ declare const dbMetrics: {
545
+ send_counts: {
546
+ get: C;
547
+ upsert: C;
548
+ list: C;
549
+ delete: C;
550
+ };
551
+ recv_counts: {
552
+ get: C;
553
+ upsert: C;
554
+ list: C;
555
+ delete: C;
556
+ };
557
+ request_times: {
558
+ get: C;
559
+ upsert: C;
560
+ list: C;
561
+ delete: C;
562
+ };
563
+ request_errors: {
564
+ get: C;
565
+ upsert: C;
566
+ list: C;
567
+ delete: C;
568
+ };
569
+ batched_total_count: C;
570
+ batched_request_count: C;
571
+ unsolved_requests: G;
572
+ stats(): {
573
+ send_counts: {
574
+ get: number;
575
+ upsert: number;
576
+ list: number;
577
+ delete: number;
578
+ };
579
+ recv_counts: {
580
+ get: number;
581
+ upsert: number;
582
+ list: number;
583
+ delete: number;
584
+ };
585
+ request_times: {
586
+ get: number;
587
+ upsert: number;
588
+ list: number;
589
+ delete: number;
590
+ };
591
+ request_errors: {
592
+ get: number;
593
+ upsert: number;
594
+ list: number;
595
+ delete: number;
596
+ };
597
+ batched_total_count: number;
598
+ batched_request_count: number;
599
+ unsolved_requests: number;
600
+ average_request_time: {
601
+ get: number;
602
+ upsert: number;
603
+ list: number;
604
+ };
605
+ };
606
+ };
607
+ declare const providerMetrics: {
608
+ hit_count: C;
609
+ miss_count: C;
610
+ queue_size: G;
611
+ total_duration: C;
612
+ total_queued: C;
613
+ stats(): {
614
+ hit_count: number;
615
+ miss_count: number;
616
+ queue_size: number;
617
+ total_duration: number;
618
+ total_queued: number;
619
+ average_queue_time: number;
620
+ average_duration: number;
621
+ };
622
+ };
623
+ declare const processMetrics: {
624
+ process_binding_count: C;
625
+ process_binding_time: C;
626
+ process_binding_error: C;
627
+ process_ethcall_count: C;
628
+ process_eventemit_count: C;
629
+ process_metricrecord_count: C;
630
+ process_pricecall_count: C;
631
+ process_template_count: C;
632
+ process_handler_duration: G;
633
+ processor_handler_duration: H;
634
+ processor_rpc_duration: H;
635
+ processor_rpc_queue_duration: H;
636
+ processor_template_instance_count: C;
637
+ processor_worker_run_time: C;
638
+ processor_worker_wait_time: C;
639
+ processor_worker_queue_size: G;
640
+ processor_worker_completed: C;
641
+ stats(): {
642
+ process_binding_count: number;
643
+ process_binding_time: number;
644
+ process_binding_error: number;
645
+ process_ethcall_count: number;
646
+ process_eventemit_count: number;
647
+ process_metricrecord_count: number;
648
+ process_pricecall_count: number;
649
+ process_template_count: number;
650
+ process_handler_duration: number;
651
+ processor_handler_duration: number;
652
+ processor_rpc_duration: number;
653
+ processor_rpc_queue_duration: number;
654
+ processor_template_instance_count: number;
655
+ processor_worker_run_time: number;
656
+ processor_worker_wait_time: number;
657
+ processor_worker_queue_size: number;
658
+ processor_worker_completed: number;
659
+ };
660
+ };
661
+ declare const metricsStorage: AsyncLocalStorage<string>;
662
+
663
+ export { type ChainConfig, DummyProvider, Endpoints, GLOBAL_CONFIG, type GlobalConfig, ListStateStorage, MapStateStorage, Plugin, PluginManager, ProcessorServiceImpl, QueuedStaticJsonRpcProvider, type Semver, State, StateStorage, StoreContext, USER_PROCESSOR, compareSemver, dbMetrics, errorString, getProvider, makeEthCallKey, mergeProcessResults, metricsStorage, parseSemver, processMetrics, providerMetrics, recordRuntimeInfo, timeoutError };