@sentio/sdk 1.3.3 → 1.4.1

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.
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ProcessorDefinition = exports.CounterResult = exports.GaugeResult = exports.RuntimeInfo = exports.BigInteger = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlocksResponse = exports.ProcessBlocksRequest = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.StartRequest = exports.TemplateInstance = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = exports.handlerTypeToJSON = exports.handlerTypeFromJSON = exports.HandlerType = void 0;
6
+ exports.ProcessorDefinition = exports.CounterResult = exports.GaugeResult = exports.RuntimeInfo = exports.BigInteger = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.BlockBinding = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlocksResponse = exports.ProcessBlocksRequest = exports.ProcessInstructionsResponse = exports.ProcessTransactionsResponse = exports.ProcessInstructionsRequest = exports.ProcessTransactionsRequest = exports.ProcessLogsResponse = exports.ProcessLogsRequest = exports.Topic = exports.InstructionHandlerConfig = exports.LogFilter = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.OldBlockHandlerConfig = exports.StartRequest = exports.TemplateInstance = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = exports.handlerTypeToJSON = exports.handlerTypeFromJSON = exports.HandlerType = void 0;
7
7
  const long_1 = __importDefault(require("long"));
8
8
  const empty_1 = require("../../google/protobuf/empty");
9
9
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -232,11 +232,12 @@ exports.ProcessConfigResponse = {
232
232
  function createBaseContractConfig() {
233
233
  return {
234
234
  contract: undefined,
235
- blockConfig: undefined,
235
+ blockConfigs: [],
236
236
  logConfigs: [],
237
237
  startBlock: long_1.default.UZERO,
238
238
  endBlock: long_1.default.UZERO,
239
239
  instructionConfig: undefined,
240
+ processorType: "",
240
241
  };
241
242
  }
242
243
  exports.ContractConfig = {
@@ -244,8 +245,8 @@ exports.ContractConfig = {
244
245
  if (message.contract !== undefined) {
245
246
  exports.ContractInfo.encode(message.contract, writer.uint32(10).fork()).ldelim();
246
247
  }
247
- if (message.blockConfig !== undefined) {
248
- exports.BlockHandlerConfig.encode(message.blockConfig, writer.uint32(18).fork()).ldelim();
248
+ for (const v of message.blockConfigs) {
249
+ exports.BlockHandlerConfig.encode(v, writer.uint32(58).fork()).ldelim();
249
250
  }
250
251
  for (const v of message.logConfigs) {
251
252
  exports.LogHandlerConfig.encode(v, writer.uint32(26).fork()).ldelim();
@@ -259,6 +260,9 @@ exports.ContractConfig = {
259
260
  if (message.instructionConfig !== undefined) {
260
261
  exports.InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
261
262
  }
263
+ if (message.processorType !== "") {
264
+ writer.uint32(66).string(message.processorType);
265
+ }
262
266
  return writer;
263
267
  },
264
268
  decode(input, length) {
@@ -271,8 +275,8 @@ exports.ContractConfig = {
271
275
  case 1:
272
276
  message.contract = exports.ContractInfo.decode(reader, reader.uint32());
273
277
  break;
274
- case 2:
275
- message.blockConfig = exports.BlockHandlerConfig.decode(reader, reader.uint32());
278
+ case 7:
279
+ message.blockConfigs.push(exports.BlockHandlerConfig.decode(reader, reader.uint32()));
276
280
  break;
277
281
  case 3:
278
282
  message.logConfigs.push(exports.LogHandlerConfig.decode(reader, reader.uint32()));
@@ -286,6 +290,9 @@ exports.ContractConfig = {
286
290
  case 6:
287
291
  message.instructionConfig = exports.InstructionHandlerConfig.decode(reader, reader.uint32());
288
292
  break;
293
+ case 8:
294
+ message.processorType = reader.string();
295
+ break;
289
296
  default:
290
297
  reader.skipType(tag & 7);
291
298
  break;
@@ -298,9 +305,9 @@ exports.ContractConfig = {
298
305
  contract: isSet(object.contract)
299
306
  ? exports.ContractInfo.fromJSON(object.contract)
300
307
  : undefined,
301
- blockConfig: isSet(object.blockConfig)
302
- ? exports.BlockHandlerConfig.fromJSON(object.blockConfig)
303
- : undefined,
308
+ blockConfigs: Array.isArray(object?.blockConfigs)
309
+ ? object.blockConfigs.map((e) => exports.BlockHandlerConfig.fromJSON(e))
310
+ : [],
304
311
  logConfigs: Array.isArray(object?.logConfigs)
305
312
  ? object.logConfigs.map((e) => exports.LogHandlerConfig.fromJSON(e))
306
313
  : [],
@@ -313,6 +320,9 @@ exports.ContractConfig = {
313
320
  instructionConfig: isSet(object.instructionConfig)
314
321
  ? exports.InstructionHandlerConfig.fromJSON(object.instructionConfig)
315
322
  : undefined,
323
+ processorType: isSet(object.processorType)
324
+ ? String(object.processorType)
325
+ : "",
316
326
  };
317
327
  },
318
328
  toJSON(message) {
@@ -321,10 +331,12 @@ exports.ContractConfig = {
321
331
  (obj.contract = message.contract
322
332
  ? exports.ContractInfo.toJSON(message.contract)
323
333
  : undefined);
324
- message.blockConfig !== undefined &&
325
- (obj.blockConfig = message.blockConfig
326
- ? exports.BlockHandlerConfig.toJSON(message.blockConfig)
327
- : undefined);
334
+ if (message.blockConfigs) {
335
+ obj.blockConfigs = message.blockConfigs.map((e) => e ? exports.BlockHandlerConfig.toJSON(e) : undefined);
336
+ }
337
+ else {
338
+ obj.blockConfigs = [];
339
+ }
328
340
  if (message.logConfigs) {
329
341
  obj.logConfigs = message.logConfigs.map((e) => e ? exports.LogHandlerConfig.toJSON(e) : undefined);
330
342
  }
@@ -339,6 +351,8 @@ exports.ContractConfig = {
339
351
  (obj.instructionConfig = message.instructionConfig
340
352
  ? exports.InstructionHandlerConfig.toJSON(message.instructionConfig)
341
353
  : undefined);
354
+ message.processorType !== undefined &&
355
+ (obj.processorType = message.processorType);
342
356
  return obj;
343
357
  },
344
358
  fromPartial(object) {
@@ -347,10 +361,8 @@ exports.ContractConfig = {
347
361
  object.contract !== undefined && object.contract !== null
348
362
  ? exports.ContractInfo.fromPartial(object.contract)
349
363
  : undefined;
350
- message.blockConfig =
351
- object.blockConfig !== undefined && object.blockConfig !== null
352
- ? exports.BlockHandlerConfig.fromPartial(object.blockConfig)
353
- : undefined;
364
+ message.blockConfigs =
365
+ object.blockConfigs?.map((e) => exports.BlockHandlerConfig.fromPartial(e)) || [];
354
366
  message.logConfigs =
355
367
  object.logConfigs?.map((e) => exports.LogHandlerConfig.fromPartial(e)) || [];
356
368
  message.startBlock =
@@ -366,6 +378,7 @@ exports.ContractConfig = {
366
378
  object.instructionConfig !== null
367
379
  ? exports.InstructionHandlerConfig.fromPartial(object.instructionConfig)
368
380
  : undefined;
381
+ message.processorType = object.processorType ?? "";
369
382
  return message;
370
383
  },
371
384
  };
@@ -587,10 +600,10 @@ exports.StartRequest = {
587
600
  return message;
588
601
  },
589
602
  };
590
- function createBaseBlockHandlerConfig() {
603
+ function createBaseOldBlockHandlerConfig() {
591
604
  return { numHandlers: 0 };
592
605
  }
593
- exports.BlockHandlerConfig = {
606
+ exports.OldBlockHandlerConfig = {
594
607
  encode(message, writer = minimal_1.default.Writer.create()) {
595
608
  if (message.numHandlers !== 0) {
596
609
  writer.uint32(8).int32(message.numHandlers);
@@ -600,7 +613,7 @@ exports.BlockHandlerConfig = {
600
613
  decode(input, length) {
601
614
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
602
615
  let end = length === undefined ? reader.len : reader.pos + length;
603
- const message = createBaseBlockHandlerConfig();
616
+ const message = createBaseOldBlockHandlerConfig();
604
617
  while (reader.pos < end) {
605
618
  const tag = reader.uint32();
606
619
  switch (tag >>> 3) {
@@ -626,18 +639,62 @@ exports.BlockHandlerConfig = {
626
639
  return obj;
627
640
  },
628
641
  fromPartial(object) {
629
- const message = createBaseBlockHandlerConfig();
642
+ const message = createBaseOldBlockHandlerConfig();
630
643
  message.numHandlers = object.numHandlers ?? 0;
631
644
  return message;
632
645
  },
633
646
  };
647
+ function createBaseBlockHandlerConfig() {
648
+ return { handlerId: 0 };
649
+ }
650
+ exports.BlockHandlerConfig = {
651
+ encode(message, writer = minimal_1.default.Writer.create()) {
652
+ if (message.handlerId !== 0) {
653
+ writer.uint32(8).int32(message.handlerId);
654
+ }
655
+ return writer;
656
+ },
657
+ decode(input, length) {
658
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
659
+ let end = length === undefined ? reader.len : reader.pos + length;
660
+ const message = createBaseBlockHandlerConfig();
661
+ while (reader.pos < end) {
662
+ const tag = reader.uint32();
663
+ switch (tag >>> 3) {
664
+ case 1:
665
+ message.handlerId = reader.int32();
666
+ break;
667
+ default:
668
+ reader.skipType(tag & 7);
669
+ break;
670
+ }
671
+ }
672
+ return message;
673
+ },
674
+ fromJSON(object) {
675
+ return {
676
+ handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
677
+ };
678
+ },
679
+ toJSON(message) {
680
+ const obj = {};
681
+ message.handlerId !== undefined &&
682
+ (obj.handlerId = Math.round(message.handlerId));
683
+ return obj;
684
+ },
685
+ fromPartial(object) {
686
+ const message = createBaseBlockHandlerConfig();
687
+ message.handlerId = object.handlerId ?? 0;
688
+ return message;
689
+ },
690
+ };
634
691
  function createBaseLogHandlerConfig() {
635
- return { conditions: [], handlerId: 0 };
692
+ return { filters: [], handlerId: 0 };
636
693
  }
637
694
  exports.LogHandlerConfig = {
638
695
  encode(message, writer = minimal_1.default.Writer.create()) {
639
- for (const v of message.conditions) {
640
- exports.HandlerCondition.encode(v, writer.uint32(10).fork()).ldelim();
696
+ for (const v of message.filters) {
697
+ exports.LogFilter.encode(v, writer.uint32(10).fork()).ldelim();
641
698
  }
642
699
  if (message.handlerId !== 0) {
643
700
  writer.uint32(16).int32(message.handlerId);
@@ -652,7 +709,7 @@ exports.LogHandlerConfig = {
652
709
  const tag = reader.uint32();
653
710
  switch (tag >>> 3) {
654
711
  case 1:
655
- message.conditions.push(exports.HandlerCondition.decode(reader, reader.uint32()));
712
+ message.filters.push(exports.LogFilter.decode(reader, reader.uint32()));
656
713
  break;
657
714
  case 2:
658
715
  message.handlerId = reader.int32();
@@ -666,19 +723,19 @@ exports.LogHandlerConfig = {
666
723
  },
667
724
  fromJSON(object) {
668
725
  return {
669
- conditions: Array.isArray(object?.conditions)
670
- ? object.conditions.map((e) => exports.HandlerCondition.fromJSON(e))
726
+ filters: Array.isArray(object?.filters)
727
+ ? object.filters.map((e) => exports.LogFilter.fromJSON(e))
671
728
  : [],
672
729
  handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
673
730
  };
674
731
  },
675
732
  toJSON(message) {
676
733
  const obj = {};
677
- if (message.conditions) {
678
- obj.conditions = message.conditions.map((e) => e ? exports.HandlerCondition.toJSON(e) : undefined);
734
+ if (message.filters) {
735
+ obj.filters = message.filters.map((e) => e ? exports.LogFilter.toJSON(e) : undefined);
679
736
  }
680
737
  else {
681
- obj.conditions = [];
738
+ obj.filters = [];
682
739
  }
683
740
  message.handlerId !== undefined &&
684
741
  (obj.handlerId = Math.round(message.handlerId));
@@ -686,16 +743,16 @@ exports.LogHandlerConfig = {
686
743
  },
687
744
  fromPartial(object) {
688
745
  const message = createBaseLogHandlerConfig();
689
- message.conditions =
690
- object.conditions?.map((e) => exports.HandlerCondition.fromPartial(e)) || [];
746
+ message.filters =
747
+ object.filters?.map((e) => exports.LogFilter.fromPartial(e)) || [];
691
748
  message.handlerId = object.handlerId ?? 0;
692
749
  return message;
693
750
  },
694
751
  };
695
- function createBaseHandlerCondition() {
752
+ function createBaseLogFilter() {
696
753
  return { topics: [] };
697
754
  }
698
- exports.HandlerCondition = {
755
+ exports.LogFilter = {
699
756
  encode(message, writer = minimal_1.default.Writer.create()) {
700
757
  for (const v of message.topics) {
701
758
  exports.Topic.encode(v, writer.uint32(10).fork()).ldelim();
@@ -705,7 +762,7 @@ exports.HandlerCondition = {
705
762
  decode(input, length) {
706
763
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
707
764
  let end = length === undefined ? reader.len : reader.pos + length;
708
- const message = createBaseHandlerCondition();
765
+ const message = createBaseLogFilter();
709
766
  while (reader.pos < end) {
710
767
  const tag = reader.uint32();
711
768
  switch (tag >>> 3) {
@@ -737,7 +794,7 @@ exports.HandlerCondition = {
737
794
  return obj;
738
795
  },
739
796
  fromPartial(object) {
740
- const message = createBaseHandlerCondition();
797
+ const message = createBaseLogFilter();
741
798
  message.topics = object.topics?.map((e) => exports.Topic.fromPartial(e)) || [];
742
799
  return message;
743
800
  },
@@ -866,12 +923,12 @@ exports.Topic = {
866
923
  return message;
867
924
  },
868
925
  };
869
- function createBaseProcessLogRequest() {
870
- return { logs: [] };
926
+ function createBaseProcessLogsRequest() {
927
+ return { logBindings: [] };
871
928
  }
872
- exports.ProcessLogRequest = {
929
+ exports.ProcessLogsRequest = {
873
930
  encode(message, writer = minimal_1.default.Writer.create()) {
874
- for (const v of message.logs) {
931
+ for (const v of message.logBindings) {
875
932
  exports.LogBinding.encode(v, writer.uint32(10).fork()).ldelim();
876
933
  }
877
934
  return writer;
@@ -879,12 +936,12 @@ exports.ProcessLogRequest = {
879
936
  decode(input, length) {
880
937
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
881
938
  let end = length === undefined ? reader.len : reader.pos + length;
882
- const message = createBaseProcessLogRequest();
939
+ const message = createBaseProcessLogsRequest();
883
940
  while (reader.pos < end) {
884
941
  const tag = reader.uint32();
885
942
  switch (tag >>> 3) {
886
943
  case 1:
887
- message.logs.push(exports.LogBinding.decode(reader, reader.uint32()));
944
+ message.logBindings.push(exports.LogBinding.decode(reader, reader.uint32()));
888
945
  break;
889
946
  default:
890
947
  reader.skipType(tag & 7);
@@ -895,31 +952,32 @@ exports.ProcessLogRequest = {
895
952
  },
896
953
  fromJSON(object) {
897
954
  return {
898
- logs: Array.isArray(object?.logs)
899
- ? object.logs.map((e) => exports.LogBinding.fromJSON(e))
955
+ logBindings: Array.isArray(object?.logBindings)
956
+ ? object.logBindings.map((e) => exports.LogBinding.fromJSON(e))
900
957
  : [],
901
958
  };
902
959
  },
903
960
  toJSON(message) {
904
961
  const obj = {};
905
- if (message.logs) {
906
- obj.logs = message.logs.map((e) => e ? exports.LogBinding.toJSON(e) : undefined);
962
+ if (message.logBindings) {
963
+ obj.logBindings = message.logBindings.map((e) => e ? exports.LogBinding.toJSON(e) : undefined);
907
964
  }
908
965
  else {
909
- obj.logs = [];
966
+ obj.logBindings = [];
910
967
  }
911
968
  return obj;
912
969
  },
913
970
  fromPartial(object) {
914
- const message = createBaseProcessLogRequest();
915
- message.logs = object.logs?.map((e) => exports.LogBinding.fromPartial(e)) || [];
971
+ const message = createBaseProcessLogsRequest();
972
+ message.logBindings =
973
+ object.logBindings?.map((e) => exports.LogBinding.fromPartial(e)) || [];
916
974
  return message;
917
975
  },
918
976
  };
919
- function createBaseProcessLogResponse() {
977
+ function createBaseProcessLogsResponse() {
920
978
  return { result: undefined, configUpdated: false };
921
979
  }
922
- exports.ProcessLogResponse = {
980
+ exports.ProcessLogsResponse = {
923
981
  encode(message, writer = minimal_1.default.Writer.create()) {
924
982
  if (message.result !== undefined) {
925
983
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -932,7 +990,7 @@ exports.ProcessLogResponse = {
932
990
  decode(input, length) {
933
991
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
934
992
  let end = length === undefined ? reader.len : reader.pos + length;
935
- const message = createBaseProcessLogResponse();
993
+ const message = createBaseProcessLogsResponse();
936
994
  while (reader.pos < end) {
937
995
  const tag = reader.uint32();
938
996
  switch (tag >>> 3) {
@@ -970,7 +1028,7 @@ exports.ProcessLogResponse = {
970
1028
  return obj;
971
1029
  },
972
1030
  fromPartial(object) {
973
- const message = createBaseProcessLogResponse();
1031
+ const message = createBaseProcessLogsResponse();
974
1032
  message.result =
975
1033
  object.result !== undefined && object.result !== null
976
1034
  ? exports.O11yResult.fromPartial(object.result)
@@ -979,10 +1037,10 @@ exports.ProcessLogResponse = {
979
1037
  return message;
980
1038
  },
981
1039
  };
982
- function createBaseProcessTransactionRequest() {
1040
+ function createBaseProcessTransactionsRequest() {
983
1041
  return { transaction: undefined };
984
1042
  }
985
- exports.ProcessTransactionRequest = {
1043
+ exports.ProcessTransactionsRequest = {
986
1044
  encode(message, writer = minimal_1.default.Writer.create()) {
987
1045
  if (message.transaction !== undefined) {
988
1046
  exports.Transaction.encode(message.transaction, writer.uint32(10).fork()).ldelim();
@@ -992,7 +1050,7 @@ exports.ProcessTransactionRequest = {
992
1050
  decode(input, length) {
993
1051
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
994
1052
  let end = length === undefined ? reader.len : reader.pos + length;
995
- const message = createBaseProcessTransactionRequest();
1053
+ const message = createBaseProcessTransactionsRequest();
996
1054
  while (reader.pos < end) {
997
1055
  const tag = reader.uint32();
998
1056
  switch (tag >>> 3) {
@@ -1022,7 +1080,7 @@ exports.ProcessTransactionRequest = {
1022
1080
  return obj;
1023
1081
  },
1024
1082
  fromPartial(object) {
1025
- const message = createBaseProcessTransactionRequest();
1083
+ const message = createBaseProcessTransactionsRequest();
1026
1084
  message.transaction =
1027
1085
  object.transaction !== undefined && object.transaction !== null
1028
1086
  ? exports.Transaction.fromPartial(object.transaction)
@@ -1030,10 +1088,10 @@ exports.ProcessTransactionRequest = {
1030
1088
  return message;
1031
1089
  },
1032
1090
  };
1033
- function createBaseProcessInstructionRequest() {
1091
+ function createBaseProcessInstructionsRequest() {
1034
1092
  return { instructions: [] };
1035
1093
  }
1036
- exports.ProcessInstructionRequest = {
1094
+ exports.ProcessInstructionsRequest = {
1037
1095
  encode(message, writer = minimal_1.default.Writer.create()) {
1038
1096
  for (const v of message.instructions) {
1039
1097
  exports.Instruction.encode(v, writer.uint32(10).fork()).ldelim();
@@ -1043,7 +1101,7 @@ exports.ProcessInstructionRequest = {
1043
1101
  decode(input, length) {
1044
1102
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1045
1103
  let end = length === undefined ? reader.len : reader.pos + length;
1046
- const message = createBaseProcessInstructionRequest();
1104
+ const message = createBaseProcessInstructionsRequest();
1047
1105
  while (reader.pos < end) {
1048
1106
  const tag = reader.uint32();
1049
1107
  switch (tag >>> 3) {
@@ -1075,16 +1133,16 @@ exports.ProcessInstructionRequest = {
1075
1133
  return obj;
1076
1134
  },
1077
1135
  fromPartial(object) {
1078
- const message = createBaseProcessInstructionRequest();
1136
+ const message = createBaseProcessInstructionsRequest();
1079
1137
  message.instructions =
1080
1138
  object.instructions?.map((e) => exports.Instruction.fromPartial(e)) || [];
1081
1139
  return message;
1082
1140
  },
1083
1141
  };
1084
- function createBaseProcessTransactionResponse() {
1142
+ function createBaseProcessTransactionsResponse() {
1085
1143
  return { result: undefined };
1086
1144
  }
1087
- exports.ProcessTransactionResponse = {
1145
+ exports.ProcessTransactionsResponse = {
1088
1146
  encode(message, writer = minimal_1.default.Writer.create()) {
1089
1147
  if (message.result !== undefined) {
1090
1148
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -1094,7 +1152,7 @@ exports.ProcessTransactionResponse = {
1094
1152
  decode(input, length) {
1095
1153
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1096
1154
  let end = length === undefined ? reader.len : reader.pos + length;
1097
- const message = createBaseProcessTransactionResponse();
1155
+ const message = createBaseProcessTransactionsResponse();
1098
1156
  while (reader.pos < end) {
1099
1157
  const tag = reader.uint32();
1100
1158
  switch (tag >>> 3) {
@@ -1124,7 +1182,7 @@ exports.ProcessTransactionResponse = {
1124
1182
  return obj;
1125
1183
  },
1126
1184
  fromPartial(object) {
1127
- const message = createBaseProcessTransactionResponse();
1185
+ const message = createBaseProcessTransactionsResponse();
1128
1186
  message.result =
1129
1187
  object.result !== undefined && object.result !== null
1130
1188
  ? exports.O11yResult.fromPartial(object.result)
@@ -1132,10 +1190,10 @@ exports.ProcessTransactionResponse = {
1132
1190
  return message;
1133
1191
  },
1134
1192
  };
1135
- function createBaseProcessInstructionResponse() {
1193
+ function createBaseProcessInstructionsResponse() {
1136
1194
  return { result: undefined };
1137
1195
  }
1138
- exports.ProcessInstructionResponse = {
1196
+ exports.ProcessInstructionsResponse = {
1139
1197
  encode(message, writer = minimal_1.default.Writer.create()) {
1140
1198
  if (message.result !== undefined) {
1141
1199
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -1145,7 +1203,7 @@ exports.ProcessInstructionResponse = {
1145
1203
  decode(input, length) {
1146
1204
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1147
1205
  let end = length === undefined ? reader.len : reader.pos + length;
1148
- const message = createBaseProcessInstructionResponse();
1206
+ const message = createBaseProcessInstructionsResponse();
1149
1207
  while (reader.pos < end) {
1150
1208
  const tag = reader.uint32();
1151
1209
  switch (tag >>> 3) {
@@ -1175,7 +1233,7 @@ exports.ProcessInstructionResponse = {
1175
1233
  return obj;
1176
1234
  },
1177
1235
  fromPartial(object) {
1178
- const message = createBaseProcessInstructionResponse();
1236
+ const message = createBaseProcessInstructionsResponse();
1179
1237
  message.result =
1180
1238
  object.result !== undefined && object.result !== null
1181
1239
  ? exports.O11yResult.fromPartial(object.result)
@@ -1183,31 +1241,25 @@ exports.ProcessInstructionResponse = {
1183
1241
  return message;
1184
1242
  },
1185
1243
  };
1186
- function createBaseProcessBlockRequest() {
1187
- return { block: undefined, chainId: "" };
1244
+ function createBaseProcessBlocksRequest() {
1245
+ return { blockBindings: [] };
1188
1246
  }
1189
- exports.ProcessBlockRequest = {
1247
+ exports.ProcessBlocksRequest = {
1190
1248
  encode(message, writer = minimal_1.default.Writer.create()) {
1191
- if (message.block !== undefined) {
1192
- exports.Block.encode(message.block, writer.uint32(10).fork()).ldelim();
1193
- }
1194
- if (message.chainId !== "") {
1195
- writer.uint32(18).string(message.chainId);
1249
+ for (const v of message.blockBindings) {
1250
+ exports.BlockBinding.encode(v, writer.uint32(18).fork()).ldelim();
1196
1251
  }
1197
1252
  return writer;
1198
1253
  },
1199
1254
  decode(input, length) {
1200
1255
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1201
1256
  let end = length === undefined ? reader.len : reader.pos + length;
1202
- const message = createBaseProcessBlockRequest();
1257
+ const message = createBaseProcessBlocksRequest();
1203
1258
  while (reader.pos < end) {
1204
1259
  const tag = reader.uint32();
1205
1260
  switch (tag >>> 3) {
1206
- case 1:
1207
- message.block = exports.Block.decode(reader, reader.uint32());
1208
- break;
1209
1261
  case 2:
1210
- message.chainId = reader.string();
1262
+ message.blockBindings.push(exports.BlockBinding.decode(reader, reader.uint32()));
1211
1263
  break;
1212
1264
  default:
1213
1265
  reader.skipType(tag & 7);
@@ -1218,45 +1270,46 @@ exports.ProcessBlockRequest = {
1218
1270
  },
1219
1271
  fromJSON(object) {
1220
1272
  return {
1221
- block: isSet(object.block) ? exports.Block.fromJSON(object.block) : undefined,
1222
- chainId: isSet(object.chainId) ? String(object.chainId) : "",
1273
+ blockBindings: Array.isArray(object?.blockBindings)
1274
+ ? object.blockBindings.map((e) => exports.BlockBinding.fromJSON(e))
1275
+ : [],
1223
1276
  };
1224
1277
  },
1225
1278
  toJSON(message) {
1226
1279
  const obj = {};
1227
- message.block !== undefined &&
1228
- (obj.block = message.block ? exports.Block.toJSON(message.block) : undefined);
1229
- message.chainId !== undefined && (obj.chainId = message.chainId);
1280
+ if (message.blockBindings) {
1281
+ obj.blockBindings = message.blockBindings.map((e) => e ? exports.BlockBinding.toJSON(e) : undefined);
1282
+ }
1283
+ else {
1284
+ obj.blockBindings = [];
1285
+ }
1230
1286
  return obj;
1231
1287
  },
1232
1288
  fromPartial(object) {
1233
- const message = createBaseProcessBlockRequest();
1234
- message.block =
1235
- object.block !== undefined && object.block !== null
1236
- ? exports.Block.fromPartial(object.block)
1237
- : undefined;
1238
- message.chainId = object.chainId ?? "";
1289
+ const message = createBaseProcessBlocksRequest();
1290
+ message.blockBindings =
1291
+ object.blockBindings?.map((e) => exports.BlockBinding.fromPartial(e)) || [];
1239
1292
  return message;
1240
1293
  },
1241
1294
  };
1242
- function createBaseProcessBlockResponse() {
1295
+ function createBaseProcessBlocksResponse() {
1243
1296
  return { result: undefined };
1244
1297
  }
1245
- exports.ProcessBlockResponse = {
1298
+ exports.ProcessBlocksResponse = {
1246
1299
  encode(message, writer = minimal_1.default.Writer.create()) {
1247
1300
  if (message.result !== undefined) {
1248
- exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
1301
+ exports.O11yResult.encode(message.result, writer.uint32(18).fork()).ldelim();
1249
1302
  }
1250
1303
  return writer;
1251
1304
  },
1252
1305
  decode(input, length) {
1253
1306
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1254
1307
  let end = length === undefined ? reader.len : reader.pos + length;
1255
- const message = createBaseProcessBlockResponse();
1308
+ const message = createBaseProcessBlocksResponse();
1256
1309
  while (reader.pos < end) {
1257
1310
  const tag = reader.uint32();
1258
1311
  switch (tag >>> 3) {
1259
- case 1:
1312
+ case 2:
1260
1313
  message.result = exports.O11yResult.decode(reader, reader.uint32());
1261
1314
  break;
1262
1315
  default:
@@ -1282,7 +1335,7 @@ exports.ProcessBlockResponse = {
1282
1335
  return obj;
1283
1336
  },
1284
1337
  fromPartial(object) {
1285
- const message = createBaseProcessBlockResponse();
1338
+ const message = createBaseProcessBlocksResponse();
1286
1339
  message.result =
1287
1340
  object.result !== undefined && object.result !== null
1288
1341
  ? exports.O11yResult.fromPartial(object.result)
@@ -1290,108 +1343,6 @@ exports.ProcessBlockResponse = {
1290
1343
  return message;
1291
1344
  },
1292
1345
  };
1293
- function createBaseProcessBlocksRequest() {
1294
- return { requests: [] };
1295
- }
1296
- exports.ProcessBlocksRequest = {
1297
- encode(message, writer = minimal_1.default.Writer.create()) {
1298
- for (const v of message.requests) {
1299
- exports.ProcessBlockRequest.encode(v, writer.uint32(10).fork()).ldelim();
1300
- }
1301
- return writer;
1302
- },
1303
- decode(input, length) {
1304
- const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1305
- let end = length === undefined ? reader.len : reader.pos + length;
1306
- const message = createBaseProcessBlocksRequest();
1307
- while (reader.pos < end) {
1308
- const tag = reader.uint32();
1309
- switch (tag >>> 3) {
1310
- case 1:
1311
- message.requests.push(exports.ProcessBlockRequest.decode(reader, reader.uint32()));
1312
- break;
1313
- default:
1314
- reader.skipType(tag & 7);
1315
- break;
1316
- }
1317
- }
1318
- return message;
1319
- },
1320
- fromJSON(object) {
1321
- return {
1322
- requests: Array.isArray(object?.requests)
1323
- ? object.requests.map((e) => exports.ProcessBlockRequest.fromJSON(e))
1324
- : [],
1325
- };
1326
- },
1327
- toJSON(message) {
1328
- const obj = {};
1329
- if (message.requests) {
1330
- obj.requests = message.requests.map((e) => e ? exports.ProcessBlockRequest.toJSON(e) : undefined);
1331
- }
1332
- else {
1333
- obj.requests = [];
1334
- }
1335
- return obj;
1336
- },
1337
- fromPartial(object) {
1338
- const message = createBaseProcessBlocksRequest();
1339
- message.requests =
1340
- object.requests?.map((e) => exports.ProcessBlockRequest.fromPartial(e)) || [];
1341
- return message;
1342
- },
1343
- };
1344
- function createBaseProcessBlocksResponse() {
1345
- return { response: [] };
1346
- }
1347
- exports.ProcessBlocksResponse = {
1348
- encode(message, writer = minimal_1.default.Writer.create()) {
1349
- for (const v of message.response) {
1350
- exports.ProcessBlockResponse.encode(v, writer.uint32(10).fork()).ldelim();
1351
- }
1352
- return writer;
1353
- },
1354
- decode(input, length) {
1355
- const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1356
- let end = length === undefined ? reader.len : reader.pos + length;
1357
- const message = createBaseProcessBlocksResponse();
1358
- while (reader.pos < end) {
1359
- const tag = reader.uint32();
1360
- switch (tag >>> 3) {
1361
- case 1:
1362
- message.response.push(exports.ProcessBlockResponse.decode(reader, reader.uint32()));
1363
- break;
1364
- default:
1365
- reader.skipType(tag & 7);
1366
- break;
1367
- }
1368
- }
1369
- return message;
1370
- },
1371
- fromJSON(object) {
1372
- return {
1373
- response: Array.isArray(object?.response)
1374
- ? object.response.map((e) => exports.ProcessBlockResponse.fromJSON(e))
1375
- : [],
1376
- };
1377
- },
1378
- toJSON(message) {
1379
- const obj = {};
1380
- if (message.response) {
1381
- obj.response = message.response.map((e) => e ? exports.ProcessBlockResponse.toJSON(e) : undefined);
1382
- }
1383
- else {
1384
- obj.response = [];
1385
- }
1386
- return obj;
1387
- },
1388
- fromPartial(object) {
1389
- const message = createBaseProcessBlocksResponse();
1390
- message.response =
1391
- object.response?.map((e) => exports.ProcessBlockResponse.fromPartial(e)) || [];
1392
- return message;
1393
- },
1394
- };
1395
1346
  function createBaseLogBinding() {
1396
1347
  return { log: undefined, handlerId: 0 };
1397
1348
  }
@@ -1647,6 +1598,88 @@ exports.Instruction = {
1647
1598
  return message;
1648
1599
  },
1649
1600
  };
1601
+ function createBaseBlockBinding() {
1602
+ return { block: undefined, handlerIds: [], chainId: "" };
1603
+ }
1604
+ exports.BlockBinding = {
1605
+ encode(message, writer = minimal_1.default.Writer.create()) {
1606
+ if (message.block !== undefined) {
1607
+ exports.Block.encode(message.block, writer.uint32(10).fork()).ldelim();
1608
+ }
1609
+ writer.uint32(18).fork();
1610
+ for (const v of message.handlerIds) {
1611
+ writer.int32(v);
1612
+ }
1613
+ writer.ldelim();
1614
+ if (message.chainId !== "") {
1615
+ writer.uint32(26).string(message.chainId);
1616
+ }
1617
+ return writer;
1618
+ },
1619
+ decode(input, length) {
1620
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1621
+ let end = length === undefined ? reader.len : reader.pos + length;
1622
+ const message = createBaseBlockBinding();
1623
+ while (reader.pos < end) {
1624
+ const tag = reader.uint32();
1625
+ switch (tag >>> 3) {
1626
+ case 1:
1627
+ message.block = exports.Block.decode(reader, reader.uint32());
1628
+ break;
1629
+ case 2:
1630
+ if ((tag & 7) === 2) {
1631
+ const end2 = reader.uint32() + reader.pos;
1632
+ while (reader.pos < end2) {
1633
+ message.handlerIds.push(reader.int32());
1634
+ }
1635
+ }
1636
+ else {
1637
+ message.handlerIds.push(reader.int32());
1638
+ }
1639
+ break;
1640
+ case 3:
1641
+ message.chainId = reader.string();
1642
+ break;
1643
+ default:
1644
+ reader.skipType(tag & 7);
1645
+ break;
1646
+ }
1647
+ }
1648
+ return message;
1649
+ },
1650
+ fromJSON(object) {
1651
+ return {
1652
+ block: isSet(object.block) ? exports.Block.fromJSON(object.block) : undefined,
1653
+ handlerIds: Array.isArray(object?.handlerIds)
1654
+ ? object.handlerIds.map((e) => Number(e))
1655
+ : [],
1656
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
1657
+ };
1658
+ },
1659
+ toJSON(message) {
1660
+ const obj = {};
1661
+ message.block !== undefined &&
1662
+ (obj.block = message.block ? exports.Block.toJSON(message.block) : undefined);
1663
+ if (message.handlerIds) {
1664
+ obj.handlerIds = message.handlerIds.map((e) => Math.round(e));
1665
+ }
1666
+ else {
1667
+ obj.handlerIds = [];
1668
+ }
1669
+ message.chainId !== undefined && (obj.chainId = message.chainId);
1670
+ return obj;
1671
+ },
1672
+ fromPartial(object) {
1673
+ const message = createBaseBlockBinding();
1674
+ message.block =
1675
+ object.block !== undefined && object.block !== null
1676
+ ? exports.Block.fromPartial(object.block)
1677
+ : undefined;
1678
+ message.handlerIds = object.handlerIds?.map((e) => e) || [];
1679
+ message.chainId = object.chainId ?? "";
1680
+ return message;
1681
+ },
1682
+ };
1650
1683
  function createBaseBlock() {
1651
1684
  return { raw: new Uint8Array() };
1652
1685
  }
@@ -2309,14 +2342,6 @@ exports.ProcessorDefinition = {
2309
2342
  name: "Processor",
2310
2343
  fullName: "processor.Processor",
2311
2344
  methods: {
2312
- getConfig: {
2313
- name: "GetConfig",
2314
- requestType: exports.ProcessConfigRequest,
2315
- requestStream: false,
2316
- responseType: exports.ProcessConfigResponse,
2317
- responseStream: false,
2318
- options: {},
2319
- },
2320
2345
  start: {
2321
2346
  name: "Start",
2322
2347
  requestType: exports.StartRequest,
@@ -2333,27 +2358,27 @@ exports.ProcessorDefinition = {
2333
2358
  responseStream: false,
2334
2359
  options: {},
2335
2360
  },
2336
- processLog: {
2337
- name: "ProcessLog",
2338
- requestType: exports.ProcessLogRequest,
2361
+ getConfig: {
2362
+ name: "GetConfig",
2363
+ requestType: exports.ProcessConfigRequest,
2339
2364
  requestStream: false,
2340
- responseType: exports.ProcessLogResponse,
2365
+ responseType: exports.ProcessConfigResponse,
2341
2366
  responseStream: false,
2342
2367
  options: {},
2343
2368
  },
2344
- processTransaction: {
2345
- name: "ProcessTransaction",
2346
- requestType: exports.ProcessTransactionRequest,
2369
+ processLogs: {
2370
+ name: "ProcessLogs",
2371
+ requestType: exports.ProcessLogsRequest,
2347
2372
  requestStream: false,
2348
- responseType: exports.ProcessTransactionResponse,
2373
+ responseType: exports.ProcessLogsResponse,
2349
2374
  responseStream: false,
2350
2375
  options: {},
2351
2376
  },
2352
- processBlock: {
2353
- name: "ProcessBlock",
2354
- requestType: exports.ProcessBlockRequest,
2377
+ processTransactions: {
2378
+ name: "ProcessTransactions",
2379
+ requestType: exports.ProcessTransactionsRequest,
2355
2380
  requestStream: false,
2356
- responseType: exports.ProcessBlockResponse,
2381
+ responseType: exports.ProcessTransactionsResponse,
2357
2382
  responseStream: false,
2358
2383
  options: {},
2359
2384
  },
@@ -2365,11 +2390,11 @@ exports.ProcessorDefinition = {
2365
2390
  responseStream: false,
2366
2391
  options: {},
2367
2392
  },
2368
- processInstruction: {
2369
- name: "ProcessInstruction",
2370
- requestType: exports.ProcessInstructionRequest,
2393
+ processInstructions: {
2394
+ name: "ProcessInstructions",
2395
+ requestType: exports.ProcessInstructionsRequest,
2371
2396
  requestStream: false,
2372
- responseType: exports.ProcessInstructionResponse,
2397
+ responseType: exports.ProcessInstructionsResponse,
2373
2398
  responseStream: false,
2374
2399
  options: {},
2375
2400
  },