@sentio/runtime 2.40.0-rc.1 → 2.40.0-rc.2
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-LMUCLUM5.js → chunk-WDKQZPD5.js} +651 -8
- package/lib/index.d.ts +64 -3
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +4 -1
- package/package.json +1 -1
- package/src/full-service.ts +5 -0
- package/src/gen/processor/protos/processor.ts +545 -0
- package/src/service.ts +77 -6
@@ -44325,6 +44325,7 @@ var HandlerType;
|
|
44325
44325
|
HandlerType4[HandlerType4["SUI_OBJECT_CHANGE"] = 12] = "SUI_OBJECT_CHANGE";
|
44326
44326
|
HandlerType4[HandlerType4["FUEL_CALL"] = 13] = "FUEL_CALL";
|
44327
44327
|
HandlerType4[HandlerType4["COSMOS_CALL"] = 14] = "COSMOS_CALL";
|
44328
|
+
HandlerType4[HandlerType4["STARKNET_EVENT"] = 15] = "STARKNET_EVENT";
|
44328
44329
|
HandlerType4[HandlerType4["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
44329
44330
|
})(HandlerType || (HandlerType = {}));
|
44330
44331
|
function handlerTypeFromJSON(object2) {
|
@@ -44374,6 +44375,9 @@ function handlerTypeFromJSON(object2) {
|
|
44374
44375
|
case 14:
|
44375
44376
|
case "COSMOS_CALL":
|
44376
44377
|
return HandlerType.COSMOS_CALL;
|
44378
|
+
case 15:
|
44379
|
+
case "STARKNET_EVENT":
|
44380
|
+
return HandlerType.STARKNET_EVENT;
|
44377
44381
|
case -1:
|
44378
44382
|
case "UNRECOGNIZED":
|
44379
44383
|
default:
|
@@ -44412,6 +44416,8 @@ function handlerTypeToJSON(object2) {
|
|
44412
44416
|
return "FUEL_CALL";
|
44413
44417
|
case HandlerType.COSMOS_CALL:
|
44414
44418
|
return "COSMOS_CALL";
|
44419
|
+
case HandlerType.STARKNET_EVENT:
|
44420
|
+
return "STARKNET_EVENT";
|
44415
44421
|
case HandlerType.UNRECOGNIZED:
|
44416
44422
|
default:
|
44417
44423
|
return "UNRECOGNIZED";
|
@@ -44892,6 +44898,7 @@ function createBaseContractConfig() {
|
|
44892
44898
|
assetConfigs: [],
|
44893
44899
|
fuelLogConfigs: [],
|
44894
44900
|
cosmosLogConfigs: [],
|
44901
|
+
starknetEventConfigs: [],
|
44895
44902
|
instructionConfig: void 0,
|
44896
44903
|
startBlock: BigInt("0"),
|
44897
44904
|
endBlock: BigInt("0"),
|
@@ -44936,6 +44943,9 @@ var ContractConfig = {
|
|
44936
44943
|
for (const v of message.cosmosLogConfigs) {
|
44937
44944
|
CosmosLogHandlerConfig.encode(v, writer.uint32(130).fork()).ldelim();
|
44938
44945
|
}
|
44946
|
+
for (const v of message.starknetEventConfigs) {
|
44947
|
+
StarknetEventHandlerConfig.encode(v, writer.uint32(138).fork()).ldelim();
|
44948
|
+
}
|
44939
44949
|
if (message.instructionConfig !== void 0) {
|
44940
44950
|
InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
|
44941
44951
|
}
|
@@ -45035,6 +45045,12 @@ var ContractConfig = {
|
|
45035
45045
|
}
|
45036
45046
|
message.cosmosLogConfigs.push(CosmosLogHandlerConfig.decode(reader, reader.uint32()));
|
45037
45047
|
continue;
|
45048
|
+
case 17:
|
45049
|
+
if (tag !== 138) {
|
45050
|
+
break;
|
45051
|
+
}
|
45052
|
+
message.starknetEventConfigs.push(StarknetEventHandlerConfig.decode(reader, reader.uint32()));
|
45053
|
+
continue;
|
45038
45054
|
case 6:
|
45039
45055
|
if (tag !== 50) {
|
45040
45056
|
break;
|
@@ -45081,6 +45097,7 @@ var ContractConfig = {
|
|
45081
45097
|
assetConfigs: globalThis.Array.isArray(object2?.assetConfigs) ? object2.assetConfigs.map((e) => FuelAssetHandlerConfig.fromJSON(e)) : [],
|
45082
45098
|
fuelLogConfigs: globalThis.Array.isArray(object2?.fuelLogConfigs) ? object2.fuelLogConfigs.map((e) => FuelLogHandlerConfig.fromJSON(e)) : [],
|
45083
45099
|
cosmosLogConfigs: globalThis.Array.isArray(object2?.cosmosLogConfigs) ? object2.cosmosLogConfigs.map((e) => CosmosLogHandlerConfig.fromJSON(e)) : [],
|
45100
|
+
starknetEventConfigs: globalThis.Array.isArray(object2?.starknetEventConfigs) ? object2.starknetEventConfigs.map((e) => StarknetEventHandlerConfig.fromJSON(e)) : [],
|
45084
45101
|
instructionConfig: isSet3(object2.instructionConfig) ? InstructionHandlerConfig.fromJSON(object2.instructionConfig) : void 0,
|
45085
45102
|
startBlock: isSet3(object2.startBlock) ? BigInt(object2.startBlock) : BigInt("0"),
|
45086
45103
|
endBlock: isSet3(object2.endBlock) ? BigInt(object2.endBlock) : BigInt("0"),
|
@@ -45125,6 +45142,9 @@ var ContractConfig = {
|
|
45125
45142
|
if (message.cosmosLogConfigs?.length) {
|
45126
45143
|
obj.cosmosLogConfigs = message.cosmosLogConfigs.map((e) => CosmosLogHandlerConfig.toJSON(e));
|
45127
45144
|
}
|
45145
|
+
if (message.starknetEventConfigs?.length) {
|
45146
|
+
obj.starknetEventConfigs = message.starknetEventConfigs.map((e) => StarknetEventHandlerConfig.toJSON(e));
|
45147
|
+
}
|
45128
45148
|
if (message.instructionConfig !== void 0) {
|
45129
45149
|
obj.instructionConfig = InstructionHandlerConfig.toJSON(message.instructionConfig);
|
45130
45150
|
}
|
@@ -45156,6 +45176,7 @@ var ContractConfig = {
|
|
45156
45176
|
message.assetConfigs = object2.assetConfigs?.map((e) => FuelAssetHandlerConfig.fromPartial(e)) || [];
|
45157
45177
|
message.fuelLogConfigs = object2.fuelLogConfigs?.map((e) => FuelLogHandlerConfig.fromPartial(e)) || [];
|
45158
45178
|
message.cosmosLogConfigs = object2.cosmosLogConfigs?.map((e) => CosmosLogHandlerConfig.fromPartial(e)) || [];
|
45179
|
+
message.starknetEventConfigs = object2.starknetEventConfigs?.map((e) => StarknetEventHandlerConfig.fromPartial(e)) || [];
|
45159
45180
|
message.instructionConfig = object2.instructionConfig !== void 0 && object2.instructionConfig !== null ? InstructionHandlerConfig.fromPartial(object2.instructionConfig) : void 0;
|
45160
45181
|
message.startBlock = object2.startBlock ?? BigInt("0");
|
45161
45182
|
message.endBlock = object2.endBlock ?? BigInt("0");
|
@@ -48071,6 +48092,138 @@ var MoveCallFilter_FromAndToAddress = {
|
|
48071
48092
|
return message;
|
48072
48093
|
}
|
48073
48094
|
};
|
48095
|
+
function createBaseStarknetEventHandlerConfig() {
|
48096
|
+
return { filters: [], handlerId: 0 };
|
48097
|
+
}
|
48098
|
+
var StarknetEventHandlerConfig = {
|
48099
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
48100
|
+
for (const v of message.filters) {
|
48101
|
+
StarknetEventFilter.encode(v, writer.uint32(10).fork()).ldelim();
|
48102
|
+
}
|
48103
|
+
if (message.handlerId !== 0) {
|
48104
|
+
writer.uint32(16).int32(message.handlerId);
|
48105
|
+
}
|
48106
|
+
return writer;
|
48107
|
+
},
|
48108
|
+
decode(input, length) {
|
48109
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
48110
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
48111
|
+
const message = createBaseStarknetEventHandlerConfig();
|
48112
|
+
while (reader.pos < end) {
|
48113
|
+
const tag = reader.uint32();
|
48114
|
+
switch (tag >>> 3) {
|
48115
|
+
case 1:
|
48116
|
+
if (tag !== 10) {
|
48117
|
+
break;
|
48118
|
+
}
|
48119
|
+
message.filters.push(StarknetEventFilter.decode(reader, reader.uint32()));
|
48120
|
+
continue;
|
48121
|
+
case 2:
|
48122
|
+
if (tag !== 16) {
|
48123
|
+
break;
|
48124
|
+
}
|
48125
|
+
message.handlerId = reader.int32();
|
48126
|
+
continue;
|
48127
|
+
}
|
48128
|
+
if ((tag & 7) === 4 || tag === 0) {
|
48129
|
+
break;
|
48130
|
+
}
|
48131
|
+
reader.skipType(tag & 7);
|
48132
|
+
}
|
48133
|
+
return message;
|
48134
|
+
},
|
48135
|
+
fromJSON(object2) {
|
48136
|
+
return {
|
48137
|
+
filters: globalThis.Array.isArray(object2?.filters) ? object2.filters.map((e) => StarknetEventFilter.fromJSON(e)) : [],
|
48138
|
+
handlerId: isSet3(object2.handlerId) ? globalThis.Number(object2.handlerId) : 0
|
48139
|
+
};
|
48140
|
+
},
|
48141
|
+
toJSON(message) {
|
48142
|
+
const obj = {};
|
48143
|
+
if (message.filters?.length) {
|
48144
|
+
obj.filters = message.filters.map((e) => StarknetEventFilter.toJSON(e));
|
48145
|
+
}
|
48146
|
+
if (message.handlerId !== 0) {
|
48147
|
+
obj.handlerId = Math.round(message.handlerId);
|
48148
|
+
}
|
48149
|
+
return obj;
|
48150
|
+
},
|
48151
|
+
create(base) {
|
48152
|
+
return StarknetEventHandlerConfig.fromPartial(base ?? {});
|
48153
|
+
},
|
48154
|
+
fromPartial(object2) {
|
48155
|
+
const message = createBaseStarknetEventHandlerConfig();
|
48156
|
+
message.filters = object2.filters?.map((e) => StarknetEventFilter.fromPartial(e)) || [];
|
48157
|
+
message.handlerId = object2.handlerId ?? 0;
|
48158
|
+
return message;
|
48159
|
+
}
|
48160
|
+
};
|
48161
|
+
function createBaseStarknetEventFilter() {
|
48162
|
+
return { address: "", keys: [] };
|
48163
|
+
}
|
48164
|
+
var StarknetEventFilter = {
|
48165
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
48166
|
+
if (message.address !== "") {
|
48167
|
+
writer.uint32(10).string(message.address);
|
48168
|
+
}
|
48169
|
+
for (const v of message.keys) {
|
48170
|
+
writer.uint32(18).string(v);
|
48171
|
+
}
|
48172
|
+
return writer;
|
48173
|
+
},
|
48174
|
+
decode(input, length) {
|
48175
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
48176
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
48177
|
+
const message = createBaseStarknetEventFilter();
|
48178
|
+
while (reader.pos < end) {
|
48179
|
+
const tag = reader.uint32();
|
48180
|
+
switch (tag >>> 3) {
|
48181
|
+
case 1:
|
48182
|
+
if (tag !== 10) {
|
48183
|
+
break;
|
48184
|
+
}
|
48185
|
+
message.address = reader.string();
|
48186
|
+
continue;
|
48187
|
+
case 2:
|
48188
|
+
if (tag !== 18) {
|
48189
|
+
break;
|
48190
|
+
}
|
48191
|
+
message.keys.push(reader.string());
|
48192
|
+
continue;
|
48193
|
+
}
|
48194
|
+
if ((tag & 7) === 4 || tag === 0) {
|
48195
|
+
break;
|
48196
|
+
}
|
48197
|
+
reader.skipType(tag & 7);
|
48198
|
+
}
|
48199
|
+
return message;
|
48200
|
+
},
|
48201
|
+
fromJSON(object2) {
|
48202
|
+
return {
|
48203
|
+
address: isSet3(object2.address) ? globalThis.String(object2.address) : "",
|
48204
|
+
keys: globalThis.Array.isArray(object2?.keys) ? object2.keys.map((e) => globalThis.String(e)) : []
|
48205
|
+
};
|
48206
|
+
},
|
48207
|
+
toJSON(message) {
|
48208
|
+
const obj = {};
|
48209
|
+
if (message.address !== "") {
|
48210
|
+
obj.address = message.address;
|
48211
|
+
}
|
48212
|
+
if (message.keys?.length) {
|
48213
|
+
obj.keys = message.keys;
|
48214
|
+
}
|
48215
|
+
return obj;
|
48216
|
+
},
|
48217
|
+
create(base) {
|
48218
|
+
return StarknetEventFilter.fromPartial(base ?? {});
|
48219
|
+
},
|
48220
|
+
fromPartial(object2) {
|
48221
|
+
const message = createBaseStarknetEventFilter();
|
48222
|
+
message.address = object2.address ?? "";
|
48223
|
+
message.keys = object2.keys?.map((e) => e) || [];
|
48224
|
+
return message;
|
48225
|
+
}
|
48226
|
+
};
|
48074
48227
|
function createBaseFuelCallFilter() {
|
48075
48228
|
return { function: "", includeFailed: false };
|
48076
48229
|
}
|
@@ -50957,6 +51110,9 @@ function handlerTypeFromJSON2(object2) {
|
|
50957
51110
|
case 14:
|
50958
51111
|
case "COSMOS_CALL":
|
50959
51112
|
return 14 /* COSMOS_CALL */;
|
51113
|
+
case 15:
|
51114
|
+
case "STARKNET_EVENT":
|
51115
|
+
return 15 /* STARKNET_EVENT */;
|
50960
51116
|
case -1:
|
50961
51117
|
case "UNRECOGNIZED":
|
50962
51118
|
default:
|
@@ -50995,6 +51151,8 @@ function handlerTypeToJSON2(object2) {
|
|
50995
51151
|
return "FUEL_CALL";
|
50996
51152
|
case 14 /* COSMOS_CALL */:
|
50997
51153
|
return "COSMOS_CALL";
|
51154
|
+
case 15 /* STARKNET_EVENT */:
|
51155
|
+
return "STARKNET_EVENT";
|
50998
51156
|
case -1 /* UNRECOGNIZED */:
|
50999
51157
|
default:
|
51000
51158
|
return "UNRECOGNIZED";
|
@@ -51546,6 +51704,7 @@ function createBaseContractConfig2() {
|
|
51546
51704
|
assetConfigs: [],
|
51547
51705
|
fuelLogConfigs: [],
|
51548
51706
|
cosmosLogConfigs: [],
|
51707
|
+
starknetEventConfigs: [],
|
51549
51708
|
instructionConfig: void 0,
|
51550
51709
|
startBlock: BigInt("0"),
|
51551
51710
|
endBlock: BigInt("0"),
|
@@ -51590,6 +51749,9 @@ var ContractConfig2 = {
|
|
51590
51749
|
for (const v of message.cosmosLogConfigs) {
|
51591
51750
|
CosmosLogHandlerConfig2.encode(v, writer.uint32(130).fork()).ldelim();
|
51592
51751
|
}
|
51752
|
+
for (const v of message.starknetEventConfigs) {
|
51753
|
+
StarknetEventHandlerConfig2.encode(v, writer.uint32(138).fork()).ldelim();
|
51754
|
+
}
|
51593
51755
|
if (message.instructionConfig !== void 0) {
|
51594
51756
|
InstructionHandlerConfig2.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
|
51595
51757
|
}
|
@@ -51689,6 +51851,12 @@ var ContractConfig2 = {
|
|
51689
51851
|
}
|
51690
51852
|
message.cosmosLogConfigs.push(CosmosLogHandlerConfig2.decode(reader, reader.uint32()));
|
51691
51853
|
continue;
|
51854
|
+
case 17:
|
51855
|
+
if (tag !== 138) {
|
51856
|
+
break;
|
51857
|
+
}
|
51858
|
+
message.starknetEventConfigs.push(StarknetEventHandlerConfig2.decode(reader, reader.uint32()));
|
51859
|
+
continue;
|
51692
51860
|
case 6:
|
51693
51861
|
if (tag !== 50) {
|
51694
51862
|
break;
|
@@ -51735,6 +51903,7 @@ var ContractConfig2 = {
|
|
51735
51903
|
assetConfigs: globalThis.Array.isArray(object2?.assetConfigs) ? object2.assetConfigs.map((e) => FuelAssetHandlerConfig2.fromJSON(e)) : [],
|
51736
51904
|
fuelLogConfigs: globalThis.Array.isArray(object2?.fuelLogConfigs) ? object2.fuelLogConfigs.map((e) => FuelLogHandlerConfig2.fromJSON(e)) : [],
|
51737
51905
|
cosmosLogConfigs: globalThis.Array.isArray(object2?.cosmosLogConfigs) ? object2.cosmosLogConfigs.map((e) => CosmosLogHandlerConfig2.fromJSON(e)) : [],
|
51906
|
+
starknetEventConfigs: globalThis.Array.isArray(object2?.starknetEventConfigs) ? object2.starknetEventConfigs.map((e) => StarknetEventHandlerConfig2.fromJSON(e)) : [],
|
51738
51907
|
instructionConfig: isSet7(object2.instructionConfig) ? InstructionHandlerConfig2.fromJSON(object2.instructionConfig) : void 0,
|
51739
51908
|
startBlock: isSet7(object2.startBlock) ? BigInt(object2.startBlock) : BigInt("0"),
|
51740
51909
|
endBlock: isSet7(object2.endBlock) ? BigInt(object2.endBlock) : BigInt("0"),
|
@@ -51779,6 +51948,9 @@ var ContractConfig2 = {
|
|
51779
51948
|
if (message.cosmosLogConfigs?.length) {
|
51780
51949
|
obj.cosmosLogConfigs = message.cosmosLogConfigs.map((e) => CosmosLogHandlerConfig2.toJSON(e));
|
51781
51950
|
}
|
51951
|
+
if (message.starknetEventConfigs?.length) {
|
51952
|
+
obj.starknetEventConfigs = message.starknetEventConfigs.map((e) => StarknetEventHandlerConfig2.toJSON(e));
|
51953
|
+
}
|
51782
51954
|
if (message.instructionConfig !== void 0) {
|
51783
51955
|
obj.instructionConfig = InstructionHandlerConfig2.toJSON(message.instructionConfig);
|
51784
51956
|
}
|
@@ -51810,6 +51982,7 @@ var ContractConfig2 = {
|
|
51810
51982
|
message.assetConfigs = object2.assetConfigs?.map((e) => FuelAssetHandlerConfig2.fromPartial(e)) || [];
|
51811
51983
|
message.fuelLogConfigs = object2.fuelLogConfigs?.map((e) => FuelLogHandlerConfig2.fromPartial(e)) || [];
|
51812
51984
|
message.cosmosLogConfigs = object2.cosmosLogConfigs?.map((e) => CosmosLogHandlerConfig2.fromPartial(e)) || [];
|
51985
|
+
message.starknetEventConfigs = object2.starknetEventConfigs?.map((e) => StarknetEventHandlerConfig2.fromPartial(e)) || [];
|
51813
51986
|
message.instructionConfig = object2.instructionConfig !== void 0 && object2.instructionConfig !== null ? InstructionHandlerConfig2.fromPartial(object2.instructionConfig) : void 0;
|
51814
51987
|
message.startBlock = object2.startBlock ?? BigInt("0");
|
51815
51988
|
message.endBlock = object2.endBlock ?? BigInt("0");
|
@@ -54858,6 +55031,138 @@ var MoveCallFilter_FromAndToAddress2 = {
|
|
54858
55031
|
return message;
|
54859
55032
|
}
|
54860
55033
|
};
|
55034
|
+
function createBaseStarknetEventHandlerConfig2() {
|
55035
|
+
return { filters: [], handlerId: 0 };
|
55036
|
+
}
|
55037
|
+
var StarknetEventHandlerConfig2 = {
|
55038
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
55039
|
+
for (const v of message.filters) {
|
55040
|
+
StarknetEventFilter2.encode(v, writer.uint32(10).fork()).ldelim();
|
55041
|
+
}
|
55042
|
+
if (message.handlerId !== 0) {
|
55043
|
+
writer.uint32(16).int32(message.handlerId);
|
55044
|
+
}
|
55045
|
+
return writer;
|
55046
|
+
},
|
55047
|
+
decode(input, length) {
|
55048
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
55049
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
55050
|
+
const message = createBaseStarknetEventHandlerConfig2();
|
55051
|
+
while (reader.pos < end) {
|
55052
|
+
const tag = reader.uint32();
|
55053
|
+
switch (tag >>> 3) {
|
55054
|
+
case 1:
|
55055
|
+
if (tag !== 10) {
|
55056
|
+
break;
|
55057
|
+
}
|
55058
|
+
message.filters.push(StarknetEventFilter2.decode(reader, reader.uint32()));
|
55059
|
+
continue;
|
55060
|
+
case 2:
|
55061
|
+
if (tag !== 16) {
|
55062
|
+
break;
|
55063
|
+
}
|
55064
|
+
message.handlerId = reader.int32();
|
55065
|
+
continue;
|
55066
|
+
}
|
55067
|
+
if ((tag & 7) === 4 || tag === 0) {
|
55068
|
+
break;
|
55069
|
+
}
|
55070
|
+
reader.skipType(tag & 7);
|
55071
|
+
}
|
55072
|
+
return message;
|
55073
|
+
},
|
55074
|
+
fromJSON(object2) {
|
55075
|
+
return {
|
55076
|
+
filters: globalThis.Array.isArray(object2?.filters) ? object2.filters.map((e) => StarknetEventFilter2.fromJSON(e)) : [],
|
55077
|
+
handlerId: isSet7(object2.handlerId) ? globalThis.Number(object2.handlerId) : 0
|
55078
|
+
};
|
55079
|
+
},
|
55080
|
+
toJSON(message) {
|
55081
|
+
const obj = {};
|
55082
|
+
if (message.filters?.length) {
|
55083
|
+
obj.filters = message.filters.map((e) => StarknetEventFilter2.toJSON(e));
|
55084
|
+
}
|
55085
|
+
if (message.handlerId !== 0) {
|
55086
|
+
obj.handlerId = Math.round(message.handlerId);
|
55087
|
+
}
|
55088
|
+
return obj;
|
55089
|
+
},
|
55090
|
+
create(base) {
|
55091
|
+
return StarknetEventHandlerConfig2.fromPartial(base ?? {});
|
55092
|
+
},
|
55093
|
+
fromPartial(object2) {
|
55094
|
+
const message = createBaseStarknetEventHandlerConfig2();
|
55095
|
+
message.filters = object2.filters?.map((e) => StarknetEventFilter2.fromPartial(e)) || [];
|
55096
|
+
message.handlerId = object2.handlerId ?? 0;
|
55097
|
+
return message;
|
55098
|
+
}
|
55099
|
+
};
|
55100
|
+
function createBaseStarknetEventFilter2() {
|
55101
|
+
return { address: "", keys: [] };
|
55102
|
+
}
|
55103
|
+
var StarknetEventFilter2 = {
|
55104
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
55105
|
+
if (message.address !== "") {
|
55106
|
+
writer.uint32(10).string(message.address);
|
55107
|
+
}
|
55108
|
+
for (const v of message.keys) {
|
55109
|
+
writer.uint32(18).string(v);
|
55110
|
+
}
|
55111
|
+
return writer;
|
55112
|
+
},
|
55113
|
+
decode(input, length) {
|
55114
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
55115
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
55116
|
+
const message = createBaseStarknetEventFilter2();
|
55117
|
+
while (reader.pos < end) {
|
55118
|
+
const tag = reader.uint32();
|
55119
|
+
switch (tag >>> 3) {
|
55120
|
+
case 1:
|
55121
|
+
if (tag !== 10) {
|
55122
|
+
break;
|
55123
|
+
}
|
55124
|
+
message.address = reader.string();
|
55125
|
+
continue;
|
55126
|
+
case 2:
|
55127
|
+
if (tag !== 18) {
|
55128
|
+
break;
|
55129
|
+
}
|
55130
|
+
message.keys.push(reader.string());
|
55131
|
+
continue;
|
55132
|
+
}
|
55133
|
+
if ((tag & 7) === 4 || tag === 0) {
|
55134
|
+
break;
|
55135
|
+
}
|
55136
|
+
reader.skipType(tag & 7);
|
55137
|
+
}
|
55138
|
+
return message;
|
55139
|
+
},
|
55140
|
+
fromJSON(object2) {
|
55141
|
+
return {
|
55142
|
+
address: isSet7(object2.address) ? globalThis.String(object2.address) : "",
|
55143
|
+
keys: globalThis.Array.isArray(object2?.keys) ? object2.keys.map((e) => globalThis.String(e)) : []
|
55144
|
+
};
|
55145
|
+
},
|
55146
|
+
toJSON(message) {
|
55147
|
+
const obj = {};
|
55148
|
+
if (message.address !== "") {
|
55149
|
+
obj.address = message.address;
|
55150
|
+
}
|
55151
|
+
if (message.keys?.length) {
|
55152
|
+
obj.keys = message.keys;
|
55153
|
+
}
|
55154
|
+
return obj;
|
55155
|
+
},
|
55156
|
+
create(base) {
|
55157
|
+
return StarknetEventFilter2.fromPartial(base ?? {});
|
55158
|
+
},
|
55159
|
+
fromPartial(object2) {
|
55160
|
+
const message = createBaseStarknetEventFilter2();
|
55161
|
+
message.address = object2.address ?? "";
|
55162
|
+
message.keys = object2.keys?.map((e) => e) || [];
|
55163
|
+
return message;
|
55164
|
+
}
|
55165
|
+
};
|
54861
55166
|
function createBaseFuelCallFilter2() {
|
54862
55167
|
return { function: "", includeFailed: false };
|
54863
55168
|
}
|
@@ -55320,6 +55625,204 @@ var ProcessStreamResponse = {
|
|
55320
55625
|
return message;
|
55321
55626
|
}
|
55322
55627
|
};
|
55628
|
+
function createBasePreprocessStreamRequest() {
|
55629
|
+
return { processId: 0, bindings: void 0, dbResult: void 0 };
|
55630
|
+
}
|
55631
|
+
var PreprocessStreamRequest = {
|
55632
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
55633
|
+
if (message.processId !== 0) {
|
55634
|
+
writer.uint32(8).int32(message.processId);
|
55635
|
+
}
|
55636
|
+
if (message.bindings !== void 0) {
|
55637
|
+
PreprocessStreamRequest_DataBindings.encode(message.bindings, writer.uint32(18).fork()).ldelim();
|
55638
|
+
}
|
55639
|
+
if (message.dbResult !== void 0) {
|
55640
|
+
DBResponse.encode(message.dbResult, writer.uint32(26).fork()).ldelim();
|
55641
|
+
}
|
55642
|
+
return writer;
|
55643
|
+
},
|
55644
|
+
decode(input, length) {
|
55645
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
55646
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
55647
|
+
const message = createBasePreprocessStreamRequest();
|
55648
|
+
while (reader.pos < end) {
|
55649
|
+
const tag = reader.uint32();
|
55650
|
+
switch (tag >>> 3) {
|
55651
|
+
case 1:
|
55652
|
+
if (tag !== 8) {
|
55653
|
+
break;
|
55654
|
+
}
|
55655
|
+
message.processId = reader.int32();
|
55656
|
+
continue;
|
55657
|
+
case 2:
|
55658
|
+
if (tag !== 18) {
|
55659
|
+
break;
|
55660
|
+
}
|
55661
|
+
message.bindings = PreprocessStreamRequest_DataBindings.decode(reader, reader.uint32());
|
55662
|
+
continue;
|
55663
|
+
case 3:
|
55664
|
+
if (tag !== 26) {
|
55665
|
+
break;
|
55666
|
+
}
|
55667
|
+
message.dbResult = DBResponse.decode(reader, reader.uint32());
|
55668
|
+
continue;
|
55669
|
+
}
|
55670
|
+
if ((tag & 7) === 4 || tag === 0) {
|
55671
|
+
break;
|
55672
|
+
}
|
55673
|
+
reader.skipType(tag & 7);
|
55674
|
+
}
|
55675
|
+
return message;
|
55676
|
+
},
|
55677
|
+
fromJSON(object2) {
|
55678
|
+
return {
|
55679
|
+
processId: isSet7(object2.processId) ? globalThis.Number(object2.processId) : 0,
|
55680
|
+
bindings: isSet7(object2.bindings) ? PreprocessStreamRequest_DataBindings.fromJSON(object2.bindings) : void 0,
|
55681
|
+
dbResult: isSet7(object2.dbResult) ? DBResponse.fromJSON(object2.dbResult) : void 0
|
55682
|
+
};
|
55683
|
+
},
|
55684
|
+
toJSON(message) {
|
55685
|
+
const obj = {};
|
55686
|
+
if (message.processId !== 0) {
|
55687
|
+
obj.processId = Math.round(message.processId);
|
55688
|
+
}
|
55689
|
+
if (message.bindings !== void 0) {
|
55690
|
+
obj.bindings = PreprocessStreamRequest_DataBindings.toJSON(message.bindings);
|
55691
|
+
}
|
55692
|
+
if (message.dbResult !== void 0) {
|
55693
|
+
obj.dbResult = DBResponse.toJSON(message.dbResult);
|
55694
|
+
}
|
55695
|
+
return obj;
|
55696
|
+
},
|
55697
|
+
create(base) {
|
55698
|
+
return PreprocessStreamRequest.fromPartial(base ?? {});
|
55699
|
+
},
|
55700
|
+
fromPartial(object2) {
|
55701
|
+
const message = createBasePreprocessStreamRequest();
|
55702
|
+
message.processId = object2.processId ?? 0;
|
55703
|
+
message.bindings = object2.bindings !== void 0 && object2.bindings !== null ? PreprocessStreamRequest_DataBindings.fromPartial(object2.bindings) : void 0;
|
55704
|
+
message.dbResult = object2.dbResult !== void 0 && object2.dbResult !== null ? DBResponse.fromPartial(object2.dbResult) : void 0;
|
55705
|
+
return message;
|
55706
|
+
}
|
55707
|
+
};
|
55708
|
+
function createBasePreprocessStreamRequest_DataBindings() {
|
55709
|
+
return { bindings: [] };
|
55710
|
+
}
|
55711
|
+
var PreprocessStreamRequest_DataBindings = {
|
55712
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
55713
|
+
for (const v of message.bindings) {
|
55714
|
+
DataBinding2.encode(v, writer.uint32(10).fork()).ldelim();
|
55715
|
+
}
|
55716
|
+
return writer;
|
55717
|
+
},
|
55718
|
+
decode(input, length) {
|
55719
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
55720
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
55721
|
+
const message = createBasePreprocessStreamRequest_DataBindings();
|
55722
|
+
while (reader.pos < end) {
|
55723
|
+
const tag = reader.uint32();
|
55724
|
+
switch (tag >>> 3) {
|
55725
|
+
case 1:
|
55726
|
+
if (tag !== 10) {
|
55727
|
+
break;
|
55728
|
+
}
|
55729
|
+
message.bindings.push(DataBinding2.decode(reader, reader.uint32()));
|
55730
|
+
continue;
|
55731
|
+
}
|
55732
|
+
if ((tag & 7) === 4 || tag === 0) {
|
55733
|
+
break;
|
55734
|
+
}
|
55735
|
+
reader.skipType(tag & 7);
|
55736
|
+
}
|
55737
|
+
return message;
|
55738
|
+
},
|
55739
|
+
fromJSON(object2) {
|
55740
|
+
return {
|
55741
|
+
bindings: globalThis.Array.isArray(object2?.bindings) ? object2.bindings.map((e) => DataBinding2.fromJSON(e)) : []
|
55742
|
+
};
|
55743
|
+
},
|
55744
|
+
toJSON(message) {
|
55745
|
+
const obj = {};
|
55746
|
+
if (message.bindings?.length) {
|
55747
|
+
obj.bindings = message.bindings.map((e) => DataBinding2.toJSON(e));
|
55748
|
+
}
|
55749
|
+
return obj;
|
55750
|
+
},
|
55751
|
+
create(base) {
|
55752
|
+
return PreprocessStreamRequest_DataBindings.fromPartial(base ?? {});
|
55753
|
+
},
|
55754
|
+
fromPartial(object2) {
|
55755
|
+
const message = createBasePreprocessStreamRequest_DataBindings();
|
55756
|
+
message.bindings = object2.bindings?.map((e) => DataBinding2.fromPartial(e)) || [];
|
55757
|
+
return message;
|
55758
|
+
}
|
55759
|
+
};
|
55760
|
+
function createBasePreprocessStreamResponse() {
|
55761
|
+
return { processId: 0, dbRequest: void 0 };
|
55762
|
+
}
|
55763
|
+
var PreprocessStreamResponse = {
|
55764
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
55765
|
+
if (message.processId !== 0) {
|
55766
|
+
writer.uint32(8).int32(message.processId);
|
55767
|
+
}
|
55768
|
+
if (message.dbRequest !== void 0) {
|
55769
|
+
DBRequest.encode(message.dbRequest, writer.uint32(18).fork()).ldelim();
|
55770
|
+
}
|
55771
|
+
return writer;
|
55772
|
+
},
|
55773
|
+
decode(input, length) {
|
55774
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
55775
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
55776
|
+
const message = createBasePreprocessStreamResponse();
|
55777
|
+
while (reader.pos < end) {
|
55778
|
+
const tag = reader.uint32();
|
55779
|
+
switch (tag >>> 3) {
|
55780
|
+
case 1:
|
55781
|
+
if (tag !== 8) {
|
55782
|
+
break;
|
55783
|
+
}
|
55784
|
+
message.processId = reader.int32();
|
55785
|
+
continue;
|
55786
|
+
case 2:
|
55787
|
+
if (tag !== 18) {
|
55788
|
+
break;
|
55789
|
+
}
|
55790
|
+
message.dbRequest = DBRequest.decode(reader, reader.uint32());
|
55791
|
+
continue;
|
55792
|
+
}
|
55793
|
+
if ((tag & 7) === 4 || tag === 0) {
|
55794
|
+
break;
|
55795
|
+
}
|
55796
|
+
reader.skipType(tag & 7);
|
55797
|
+
}
|
55798
|
+
return message;
|
55799
|
+
},
|
55800
|
+
fromJSON(object2) {
|
55801
|
+
return {
|
55802
|
+
processId: isSet7(object2.processId) ? globalThis.Number(object2.processId) : 0,
|
55803
|
+
dbRequest: isSet7(object2.dbRequest) ? DBRequest.fromJSON(object2.dbRequest) : void 0
|
55804
|
+
};
|
55805
|
+
},
|
55806
|
+
toJSON(message) {
|
55807
|
+
const obj = {};
|
55808
|
+
if (message.processId !== 0) {
|
55809
|
+
obj.processId = Math.round(message.processId);
|
55810
|
+
}
|
55811
|
+
if (message.dbRequest !== void 0) {
|
55812
|
+
obj.dbRequest = DBRequest.toJSON(message.dbRequest);
|
55813
|
+
}
|
55814
|
+
return obj;
|
55815
|
+
},
|
55816
|
+
create(base) {
|
55817
|
+
return PreprocessStreamResponse.fromPartial(base ?? {});
|
55818
|
+
},
|
55819
|
+
fromPartial(object2) {
|
55820
|
+
const message = createBasePreprocessStreamResponse();
|
55821
|
+
message.processId = object2.processId ?? 0;
|
55822
|
+
message.dbRequest = object2.dbRequest !== void 0 && object2.dbRequest !== null ? DBRequest.fromPartial(object2.dbRequest) : void 0;
|
55823
|
+
return message;
|
55824
|
+
}
|
55825
|
+
};
|
55323
55826
|
function createBaseDBResponse() {
|
55324
55827
|
return {
|
55325
55828
|
opId: BigInt("0"),
|
@@ -56157,7 +56660,8 @@ function createBaseData() {
|
|
56157
56660
|
suiObject: void 0,
|
56158
56661
|
suiObjectChange: void 0,
|
56159
56662
|
fuelCall: void 0,
|
56160
|
-
cosmosCall: void 0
|
56663
|
+
cosmosCall: void 0,
|
56664
|
+
starknetEvents: void 0
|
56161
56665
|
};
|
56162
56666
|
}
|
56163
56667
|
var Data = {
|
@@ -56207,6 +56711,9 @@ var Data = {
|
|
56207
56711
|
if (message.cosmosCall !== void 0) {
|
56208
56712
|
Data_CosmosCall.encode(message.cosmosCall, writer.uint32(122).fork()).ldelim();
|
56209
56713
|
}
|
56714
|
+
if (message.starknetEvents !== void 0) {
|
56715
|
+
Data_StarknetEvent.encode(message.starknetEvents, writer.uint32(130).fork()).ldelim();
|
56716
|
+
}
|
56210
56717
|
return writer;
|
56211
56718
|
},
|
56212
56719
|
decode(input, length) {
|
@@ -56306,6 +56813,12 @@ var Data = {
|
|
56306
56813
|
}
|
56307
56814
|
message.cosmosCall = Data_CosmosCall.decode(reader, reader.uint32());
|
56308
56815
|
continue;
|
56816
|
+
case 16:
|
56817
|
+
if (tag !== 130) {
|
56818
|
+
break;
|
56819
|
+
}
|
56820
|
+
message.starknetEvents = Data_StarknetEvent.decode(reader, reader.uint32());
|
56821
|
+
continue;
|
56309
56822
|
}
|
56310
56823
|
if ((tag & 7) === 4 || tag === 0) {
|
56311
56824
|
break;
|
@@ -56330,7 +56843,8 @@ var Data = {
|
|
56330
56843
|
suiObject: isSet7(object2.suiObject) ? Data_SuiObject.fromJSON(object2.suiObject) : void 0,
|
56331
56844
|
suiObjectChange: isSet7(object2.suiObjectChange) ? Data_SuiObjectChange.fromJSON(object2.suiObjectChange) : void 0,
|
56332
56845
|
fuelCall: isSet7(object2.fuelCall) ? Data_FuelCall.fromJSON(object2.fuelCall) : void 0,
|
56333
|
-
cosmosCall: isSet7(object2.cosmosCall) ? Data_CosmosCall.fromJSON(object2.cosmosCall) : void 0
|
56846
|
+
cosmosCall: isSet7(object2.cosmosCall) ? Data_CosmosCall.fromJSON(object2.cosmosCall) : void 0,
|
56847
|
+
starknetEvents: isSet7(object2.starknetEvents) ? Data_StarknetEvent.fromJSON(object2.starknetEvents) : void 0
|
56334
56848
|
};
|
56335
56849
|
},
|
56336
56850
|
toJSON(message) {
|
@@ -56380,6 +56894,9 @@ var Data = {
|
|
56380
56894
|
if (message.cosmosCall !== void 0) {
|
56381
56895
|
obj.cosmosCall = Data_CosmosCall.toJSON(message.cosmosCall);
|
56382
56896
|
}
|
56897
|
+
if (message.starknetEvents !== void 0) {
|
56898
|
+
obj.starknetEvents = Data_StarknetEvent.toJSON(message.starknetEvents);
|
56899
|
+
}
|
56383
56900
|
return obj;
|
56384
56901
|
},
|
56385
56902
|
create(base) {
|
@@ -56402,6 +56919,7 @@ var Data = {
|
|
56402
56919
|
message.suiObjectChange = object2.suiObjectChange !== void 0 && object2.suiObjectChange !== null ? Data_SuiObjectChange.fromPartial(object2.suiObjectChange) : void 0;
|
56403
56920
|
message.fuelCall = object2.fuelCall !== void 0 && object2.fuelCall !== null ? Data_FuelCall.fromPartial(object2.fuelCall) : void 0;
|
56404
56921
|
message.cosmosCall = object2.cosmosCall !== void 0 && object2.cosmosCall !== null ? Data_CosmosCall.fromPartial(object2.cosmosCall) : void 0;
|
56922
|
+
message.starknetEvents = object2.starknetEvents !== void 0 && object2.starknetEvents !== null ? Data_StarknetEvent.fromPartial(object2.starknetEvents) : void 0;
|
56405
56923
|
return message;
|
56406
56924
|
}
|
56407
56925
|
};
|
@@ -57586,6 +58104,72 @@ var Data_CosmosCall = {
|
|
57586
58104
|
return message;
|
57587
58105
|
}
|
57588
58106
|
};
|
58107
|
+
function createBaseData_StarknetEvent() {
|
58108
|
+
return { result: void 0, timestamp: void 0 };
|
58109
|
+
}
|
58110
|
+
var Data_StarknetEvent = {
|
58111
|
+
encode(message, writer = import_minimal10.default.Writer.create()) {
|
58112
|
+
if (message.result !== void 0) {
|
58113
|
+
Struct2.encode(Struct2.wrap(message.result), writer.uint32(10).fork()).ldelim();
|
58114
|
+
}
|
58115
|
+
if (message.timestamp !== void 0) {
|
58116
|
+
Timestamp2.encode(toTimestamp2(message.timestamp), writer.uint32(18).fork()).ldelim();
|
58117
|
+
}
|
58118
|
+
return writer;
|
58119
|
+
},
|
58120
|
+
decode(input, length) {
|
58121
|
+
const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
|
58122
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
58123
|
+
const message = createBaseData_StarknetEvent();
|
58124
|
+
while (reader.pos < end) {
|
58125
|
+
const tag = reader.uint32();
|
58126
|
+
switch (tag >>> 3) {
|
58127
|
+
case 1:
|
58128
|
+
if (tag !== 10) {
|
58129
|
+
break;
|
58130
|
+
}
|
58131
|
+
message.result = Struct2.unwrap(Struct2.decode(reader, reader.uint32()));
|
58132
|
+
continue;
|
58133
|
+
case 2:
|
58134
|
+
if (tag !== 18) {
|
58135
|
+
break;
|
58136
|
+
}
|
58137
|
+
message.timestamp = fromTimestamp2(Timestamp2.decode(reader, reader.uint32()));
|
58138
|
+
continue;
|
58139
|
+
}
|
58140
|
+
if ((tag & 7) === 4 || tag === 0) {
|
58141
|
+
break;
|
58142
|
+
}
|
58143
|
+
reader.skipType(tag & 7);
|
58144
|
+
}
|
58145
|
+
return message;
|
58146
|
+
},
|
58147
|
+
fromJSON(object2) {
|
58148
|
+
return {
|
58149
|
+
result: isObject5(object2.result) ? object2.result : void 0,
|
58150
|
+
timestamp: isSet7(object2.timestamp) ? fromJsonTimestamp2(object2.timestamp) : void 0
|
58151
|
+
};
|
58152
|
+
},
|
58153
|
+
toJSON(message) {
|
58154
|
+
const obj = {};
|
58155
|
+
if (message.result !== void 0) {
|
58156
|
+
obj.result = message.result;
|
58157
|
+
}
|
58158
|
+
if (message.timestamp !== void 0) {
|
58159
|
+
obj.timestamp = message.timestamp.toISOString();
|
58160
|
+
}
|
58161
|
+
return obj;
|
58162
|
+
},
|
58163
|
+
create(base) {
|
58164
|
+
return Data_StarknetEvent.fromPartial(base ?? {});
|
58165
|
+
},
|
58166
|
+
fromPartial(object2) {
|
58167
|
+
const message = createBaseData_StarknetEvent();
|
58168
|
+
message.result = object2.result ?? void 0;
|
58169
|
+
message.timestamp = object2.timestamp ?? void 0;
|
58170
|
+
return message;
|
58171
|
+
}
|
58172
|
+
};
|
57589
58173
|
function createBaseDataBinding() {
|
57590
58174
|
return { data: void 0, handlerType: 0, handlerIds: [] };
|
57591
58175
|
}
|
@@ -58816,6 +59400,14 @@ var ProcessorDefinition = {
|
|
58816
59400
|
responseType: ProcessStreamResponse,
|
58817
59401
|
responseStream: true,
|
58818
59402
|
options: {}
|
59403
|
+
},
|
59404
|
+
preprocessBindingsStream: {
|
59405
|
+
name: "PreprocessBindingsStream",
|
59406
|
+
requestType: PreprocessStreamRequest,
|
59407
|
+
requestStream: true,
|
59408
|
+
responseType: PreprocessStreamResponse,
|
59409
|
+
responseStream: true,
|
59410
|
+
options: {}
|
58819
59411
|
}
|
58820
59412
|
}
|
58821
59413
|
};
|
@@ -77829,7 +78421,7 @@ var ProcessorServiceImpl = class {
|
|
77829
78421
|
return {};
|
77830
78422
|
}
|
77831
78423
|
async processBindings(request, options) {
|
77832
|
-
const ethCallResults = await this.preprocessBindings(request, options);
|
78424
|
+
const ethCallResults = await this.preprocessBindings(request.bindings, void 0, options);
|
77833
78425
|
const promises = [];
|
77834
78426
|
for (const binding of request.bindings) {
|
77835
78427
|
const promise2 = this.processBinding(binding, { ethCallResults });
|
@@ -77849,10 +78441,11 @@ var ProcessorServiceImpl = class {
|
|
77849
78441
|
result
|
77850
78442
|
};
|
77851
78443
|
}
|
77852
|
-
async preprocessBindings(
|
78444
|
+
async preprocessBindings(bindings, dbContext, options) {
|
78445
|
+
console.log("preprocessBindings start");
|
77853
78446
|
const promises = [];
|
77854
|
-
for (const binding of
|
77855
|
-
promises.push(this.preprocessBinding(binding, options));
|
78447
|
+
for (const binding of bindings) {
|
78448
|
+
promises.push(this.preprocessBinding(binding, dbContext, options));
|
77856
78449
|
}
|
77857
78450
|
let preprocessResults;
|
77858
78451
|
try {
|
@@ -77860,6 +78453,10 @@ var ProcessorServiceImpl = class {
|
|
77860
78453
|
} catch (e) {
|
77861
78454
|
throw e;
|
77862
78455
|
}
|
78456
|
+
console.log(
|
78457
|
+
"ethCallParams: ",
|
78458
|
+
preprocessResults.map((r) => r.ethCallParams)
|
78459
|
+
);
|
77863
78460
|
const groupedRequests = /* @__PURE__ */ new Map();
|
77864
78461
|
const providers2 = /* @__PURE__ */ new Map();
|
77865
78462
|
for (const result of preprocessResults) {
|
@@ -77893,7 +78490,7 @@ var ProcessorServiceImpl = class {
|
|
77893
78490
|
console.log(`${callPromises.length} calls finished, elapsed: ${Date.now() - start}ms`);
|
77894
78491
|
return results;
|
77895
78492
|
}
|
77896
|
-
async preprocessBinding(request, options) {
|
78493
|
+
async preprocessBinding(request, dbContext, options) {
|
77897
78494
|
if (!this.started) {
|
77898
78495
|
throw new import_nice_grpc.ServerError(import_nice_grpc.Status.UNAVAILABLE, "Service Not started.");
|
77899
78496
|
}
|
@@ -77909,7 +78506,7 @@ var ProcessorServiceImpl = class {
|
|
77909
78506
|
]
|
77910
78507
|
);
|
77911
78508
|
}
|
77912
|
-
return await PluginManager.INSTANCE.preprocessBinding(request);
|
78509
|
+
return await PluginManager.INSTANCE.preprocessBinding(request, dbContext);
|
77913
78510
|
}
|
77914
78511
|
async processBinding(request, preparedData, options) {
|
77915
78512
|
if (!this.started) {
|
@@ -77944,6 +78541,52 @@ var ProcessorServiceImpl = class {
|
|
77944
78541
|
});
|
77945
78542
|
yield* (0, import_Ix_dom_asynciterable.from)(subject).pipe((0, import_Ix_dom_asynciterable_operators.withAbort)(context2.signal));
|
77946
78543
|
}
|
78544
|
+
async handlePreprocessRequests(requests, subject) {
|
78545
|
+
const contexts = new Contexts();
|
78546
|
+
for await (const request of requests) {
|
78547
|
+
try {
|
78548
|
+
console.debug("received request:", request);
|
78549
|
+
if (request.bindings) {
|
78550
|
+
const bindings = request.bindings.bindings;
|
78551
|
+
const dbContext = contexts.new(request.processId, subject);
|
78552
|
+
const start = Date.now();
|
78553
|
+
this.preprocessBindings(bindings, dbContext).then(() => {
|
78554
|
+
subject.next({
|
78555
|
+
processId: request.processId
|
78556
|
+
});
|
78557
|
+
}).catch((e) => {
|
78558
|
+
console.debug(e);
|
78559
|
+
dbContext.error(request.processId, e);
|
78560
|
+
process_binding_error.add(1);
|
78561
|
+
}).finally(() => {
|
78562
|
+
const cost = Date.now() - start;
|
78563
|
+
console.debug("preprocessBinding", request.processId, " took", cost, "ms");
|
78564
|
+
process_binding_time.add(cost);
|
78565
|
+
contexts.delete(request.processId);
|
78566
|
+
});
|
78567
|
+
}
|
78568
|
+
if (request.dbResult) {
|
78569
|
+
const dbContext = contexts.get(request.processId);
|
78570
|
+
dbContext?.result(request.dbResult);
|
78571
|
+
}
|
78572
|
+
} catch (e) {
|
78573
|
+
console.error("unexpect error during handle loop", e);
|
78574
|
+
}
|
78575
|
+
}
|
78576
|
+
}
|
78577
|
+
async *preprocessBindingsStream(requests, context2) {
|
78578
|
+
if (!this.started) {
|
78579
|
+
throw new import_nice_grpc.ServerError(import_nice_grpc.Status.UNAVAILABLE, "Service Not started.");
|
78580
|
+
}
|
78581
|
+
const subject = new import_rxjs.Subject();
|
78582
|
+
this.handlePreprocessRequests(requests, subject).then(() => {
|
78583
|
+
subject.complete();
|
78584
|
+
}).catch((e) => {
|
78585
|
+
console.error(e);
|
78586
|
+
subject.error(e);
|
78587
|
+
});
|
78588
|
+
yield* (0, import_Ix_dom_asynciterable.from)(subject).pipe((0, import_Ix_dom_asynciterable_operators.withAbort)(context2.signal));
|
78589
|
+
}
|
77947
78590
|
async handleRequests(requests, subject) {
|
77948
78591
|
const contexts = new Contexts();
|
77949
78592
|
for await (const request of requests) {
|