@sentio/runtime 2.60.0-rc.1 → 2.60.0-rc.11
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/{chunk-7JPTCCHQ.js → chunk-BOHR42T4.js} +54 -27
- package/lib/{chunk-7JPTCCHQ.js.map → chunk-BOHR42T4.js.map} +1 -1
- package/lib/{chunk-RJMWLF3Q.js → chunk-CYS2DAE4.js} +2 -2
- package/lib/{chunk-AQYRWO7H.js → chunk-TC6OWLVA.js} +4889 -529
- package/lib/chunk-TC6OWLVA.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/processor-runner.js +357 -151
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +3 -3
- package/package.json +1 -1
- package/src/full-service.ts +167 -109
- package/src/gen/processor/protos/processor.ts +191 -10
- package/src/plugin.ts +1 -1
- package/src/processor-runner.ts +7 -2
- package/src/{service-v2.ts → service-v3.ts} +9 -4
- package/lib/chunk-AQYRWO7H.js.map +0 -1
- /package/lib/{chunk-RJMWLF3Q.js.map → chunk-CYS2DAE4.js.map} +0 -0
@@ -1,12 +1,13 @@
|
|
1
1
|
import {
|
2
2
|
ConfigureHandlersRequest,
|
3
|
+
ConfigureHandlersResponse,
|
3
4
|
DataBinding,
|
4
5
|
DeepPartial,
|
5
6
|
Empty,
|
6
7
|
HandlerType,
|
7
8
|
InitResponse,
|
8
9
|
ProcessConfigResponse,
|
9
|
-
|
10
|
+
ProcessorV3ServiceImplementation,
|
10
11
|
ProcessResult,
|
11
12
|
ProcessStreamRequest,
|
12
13
|
ProcessStreamResponseV2,
|
@@ -27,7 +28,7 @@ import { TemplateInstanceState } from './state.js'
|
|
27
28
|
|
28
29
|
const { process_binding_count, process_binding_time, process_binding_error } = processMetrics
|
29
30
|
|
30
|
-
export class
|
31
|
+
export class ProcessorServiceImplV3 implements ProcessorV3ServiceImplementation {
|
31
32
|
readonly enablePartition: boolean
|
32
33
|
private readonly loader: () => Promise<any>
|
33
34
|
private readonly shutdownHandler?: () => void
|
@@ -40,6 +41,7 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
|
|
40
41
|
}
|
41
42
|
|
42
43
|
async init(request: Empty, context: CallContext): Promise<DeepPartial<InitResponse>> {
|
44
|
+
await this.loader()
|
43
45
|
const resp = InitResponse.fromPartial({
|
44
46
|
chainIds: []
|
45
47
|
})
|
@@ -173,7 +175,7 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
|
|
173
175
|
async configureHandlers(
|
174
176
|
request: ConfigureHandlersRequest,
|
175
177
|
context: CallContext
|
176
|
-
): Promise<DeepPartial<
|
178
|
+
): Promise<DeepPartial<ConfigureHandlersResponse>> {
|
177
179
|
await PluginManager.INSTANCE.start(
|
178
180
|
StartRequest.fromPartial({
|
179
181
|
templateInstances: request.templateInstances
|
@@ -182,7 +184,10 @@ export class ProcessorServiceImplV2 implements ProcessorV2ServiceImplementation
|
|
182
184
|
|
183
185
|
const newConfig = ProcessConfigResponse.fromPartial({})
|
184
186
|
await PluginManager.INSTANCE.configure(newConfig, request.chainId)
|
185
|
-
return
|
187
|
+
return {
|
188
|
+
accountConfigs: newConfig.accountConfigs,
|
189
|
+
contractConfigs: newConfig.contractConfigs
|
190
|
+
}
|
186
191
|
}
|
187
192
|
}
|
188
193
|
|