@sentio/sdk 1.3.2 → 1.4.0

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"));
@@ -233,6 +233,7 @@ function createBaseContractConfig() {
233
233
  return {
234
234
  contract: undefined,
235
235
  blockConfig: undefined,
236
+ blockConfigs: [],
236
237
  logConfigs: [],
237
238
  startBlock: long_1.default.UZERO,
238
239
  endBlock: long_1.default.UZERO,
@@ -245,7 +246,10 @@ exports.ContractConfig = {
245
246
  exports.ContractInfo.encode(message.contract, writer.uint32(10).fork()).ldelim();
246
247
  }
247
248
  if (message.blockConfig !== undefined) {
248
- exports.BlockHandlerConfig.encode(message.blockConfig, writer.uint32(18).fork()).ldelim();
249
+ exports.OldBlockHandlerConfig.encode(message.blockConfig, writer.uint32(18).fork()).ldelim();
250
+ }
251
+ for (const v of message.blockConfigs) {
252
+ exports.BlockHandlerConfig.encode(v, writer.uint32(58).fork()).ldelim();
249
253
  }
250
254
  for (const v of message.logConfigs) {
251
255
  exports.LogHandlerConfig.encode(v, writer.uint32(26).fork()).ldelim();
@@ -272,7 +276,10 @@ exports.ContractConfig = {
272
276
  message.contract = exports.ContractInfo.decode(reader, reader.uint32());
273
277
  break;
274
278
  case 2:
275
- message.blockConfig = exports.BlockHandlerConfig.decode(reader, reader.uint32());
279
+ message.blockConfig = exports.OldBlockHandlerConfig.decode(reader, reader.uint32());
280
+ break;
281
+ case 7:
282
+ message.blockConfigs.push(exports.BlockHandlerConfig.decode(reader, reader.uint32()));
276
283
  break;
277
284
  case 3:
278
285
  message.logConfigs.push(exports.LogHandlerConfig.decode(reader, reader.uint32()));
@@ -299,8 +306,11 @@ exports.ContractConfig = {
299
306
  ? exports.ContractInfo.fromJSON(object.contract)
300
307
  : undefined,
301
308
  blockConfig: isSet(object.blockConfig)
302
- ? exports.BlockHandlerConfig.fromJSON(object.blockConfig)
309
+ ? exports.OldBlockHandlerConfig.fromJSON(object.blockConfig)
303
310
  : undefined,
311
+ blockConfigs: Array.isArray(object?.blockConfigs)
312
+ ? object.blockConfigs.map((e) => exports.BlockHandlerConfig.fromJSON(e))
313
+ : [],
304
314
  logConfigs: Array.isArray(object?.logConfigs)
305
315
  ? object.logConfigs.map((e) => exports.LogHandlerConfig.fromJSON(e))
306
316
  : [],
@@ -323,8 +333,14 @@ exports.ContractConfig = {
323
333
  : undefined);
324
334
  message.blockConfig !== undefined &&
325
335
  (obj.blockConfig = message.blockConfig
326
- ? exports.BlockHandlerConfig.toJSON(message.blockConfig)
336
+ ? exports.OldBlockHandlerConfig.toJSON(message.blockConfig)
327
337
  : undefined);
338
+ if (message.blockConfigs) {
339
+ obj.blockConfigs = message.blockConfigs.map((e) => e ? exports.BlockHandlerConfig.toJSON(e) : undefined);
340
+ }
341
+ else {
342
+ obj.blockConfigs = [];
343
+ }
328
344
  if (message.logConfigs) {
329
345
  obj.logConfigs = message.logConfigs.map((e) => e ? exports.LogHandlerConfig.toJSON(e) : undefined);
330
346
  }
@@ -349,8 +365,10 @@ exports.ContractConfig = {
349
365
  : undefined;
350
366
  message.blockConfig =
351
367
  object.blockConfig !== undefined && object.blockConfig !== null
352
- ? exports.BlockHandlerConfig.fromPartial(object.blockConfig)
368
+ ? exports.OldBlockHandlerConfig.fromPartial(object.blockConfig)
353
369
  : undefined;
370
+ message.blockConfigs =
371
+ object.blockConfigs?.map((e) => exports.BlockHandlerConfig.fromPartial(e)) || [];
354
372
  message.logConfigs =
355
373
  object.logConfigs?.map((e) => exports.LogHandlerConfig.fromPartial(e)) || [];
356
374
  message.startBlock =
@@ -587,10 +605,10 @@ exports.StartRequest = {
587
605
  return message;
588
606
  },
589
607
  };
590
- function createBaseBlockHandlerConfig() {
608
+ function createBaseOldBlockHandlerConfig() {
591
609
  return { numHandlers: 0 };
592
610
  }
593
- exports.BlockHandlerConfig = {
611
+ exports.OldBlockHandlerConfig = {
594
612
  encode(message, writer = minimal_1.default.Writer.create()) {
595
613
  if (message.numHandlers !== 0) {
596
614
  writer.uint32(8).int32(message.numHandlers);
@@ -600,7 +618,7 @@ exports.BlockHandlerConfig = {
600
618
  decode(input, length) {
601
619
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
602
620
  let end = length === undefined ? reader.len : reader.pos + length;
603
- const message = createBaseBlockHandlerConfig();
621
+ const message = createBaseOldBlockHandlerConfig();
604
622
  while (reader.pos < end) {
605
623
  const tag = reader.uint32();
606
624
  switch (tag >>> 3) {
@@ -626,18 +644,62 @@ exports.BlockHandlerConfig = {
626
644
  return obj;
627
645
  },
628
646
  fromPartial(object) {
629
- const message = createBaseBlockHandlerConfig();
647
+ const message = createBaseOldBlockHandlerConfig();
630
648
  message.numHandlers = object.numHandlers ?? 0;
631
649
  return message;
632
650
  },
633
651
  };
652
+ function createBaseBlockHandlerConfig() {
653
+ return { handlerId: 0 };
654
+ }
655
+ exports.BlockHandlerConfig = {
656
+ encode(message, writer = minimal_1.default.Writer.create()) {
657
+ if (message.handlerId !== 0) {
658
+ writer.uint32(8).int32(message.handlerId);
659
+ }
660
+ return writer;
661
+ },
662
+ decode(input, length) {
663
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
664
+ let end = length === undefined ? reader.len : reader.pos + length;
665
+ const message = createBaseBlockHandlerConfig();
666
+ while (reader.pos < end) {
667
+ const tag = reader.uint32();
668
+ switch (tag >>> 3) {
669
+ case 1:
670
+ message.handlerId = reader.int32();
671
+ break;
672
+ default:
673
+ reader.skipType(tag & 7);
674
+ break;
675
+ }
676
+ }
677
+ return message;
678
+ },
679
+ fromJSON(object) {
680
+ return {
681
+ handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
682
+ };
683
+ },
684
+ toJSON(message) {
685
+ const obj = {};
686
+ message.handlerId !== undefined &&
687
+ (obj.handlerId = Math.round(message.handlerId));
688
+ return obj;
689
+ },
690
+ fromPartial(object) {
691
+ const message = createBaseBlockHandlerConfig();
692
+ message.handlerId = object.handlerId ?? 0;
693
+ return message;
694
+ },
695
+ };
634
696
  function createBaseLogHandlerConfig() {
635
- return { conditions: [], handlerId: 0 };
697
+ return { filters: [], handlerId: 0 };
636
698
  }
637
699
  exports.LogHandlerConfig = {
638
700
  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();
701
+ for (const v of message.filters) {
702
+ exports.LogFilter.encode(v, writer.uint32(10).fork()).ldelim();
641
703
  }
642
704
  if (message.handlerId !== 0) {
643
705
  writer.uint32(16).int32(message.handlerId);
@@ -652,7 +714,7 @@ exports.LogHandlerConfig = {
652
714
  const tag = reader.uint32();
653
715
  switch (tag >>> 3) {
654
716
  case 1:
655
- message.conditions.push(exports.HandlerCondition.decode(reader, reader.uint32()));
717
+ message.filters.push(exports.LogFilter.decode(reader, reader.uint32()));
656
718
  break;
657
719
  case 2:
658
720
  message.handlerId = reader.int32();
@@ -666,19 +728,19 @@ exports.LogHandlerConfig = {
666
728
  },
667
729
  fromJSON(object) {
668
730
  return {
669
- conditions: Array.isArray(object?.conditions)
670
- ? object.conditions.map((e) => exports.HandlerCondition.fromJSON(e))
731
+ filters: Array.isArray(object?.filters)
732
+ ? object.filters.map((e) => exports.LogFilter.fromJSON(e))
671
733
  : [],
672
734
  handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
673
735
  };
674
736
  },
675
737
  toJSON(message) {
676
738
  const obj = {};
677
- if (message.conditions) {
678
- obj.conditions = message.conditions.map((e) => e ? exports.HandlerCondition.toJSON(e) : undefined);
739
+ if (message.filters) {
740
+ obj.filters = message.filters.map((e) => e ? exports.LogFilter.toJSON(e) : undefined);
679
741
  }
680
742
  else {
681
- obj.conditions = [];
743
+ obj.filters = [];
682
744
  }
683
745
  message.handlerId !== undefined &&
684
746
  (obj.handlerId = Math.round(message.handlerId));
@@ -686,16 +748,16 @@ exports.LogHandlerConfig = {
686
748
  },
687
749
  fromPartial(object) {
688
750
  const message = createBaseLogHandlerConfig();
689
- message.conditions =
690
- object.conditions?.map((e) => exports.HandlerCondition.fromPartial(e)) || [];
751
+ message.filters =
752
+ object.filters?.map((e) => exports.LogFilter.fromPartial(e)) || [];
691
753
  message.handlerId = object.handlerId ?? 0;
692
754
  return message;
693
755
  },
694
756
  };
695
- function createBaseHandlerCondition() {
757
+ function createBaseLogFilter() {
696
758
  return { topics: [] };
697
759
  }
698
- exports.HandlerCondition = {
760
+ exports.LogFilter = {
699
761
  encode(message, writer = minimal_1.default.Writer.create()) {
700
762
  for (const v of message.topics) {
701
763
  exports.Topic.encode(v, writer.uint32(10).fork()).ldelim();
@@ -705,7 +767,7 @@ exports.HandlerCondition = {
705
767
  decode(input, length) {
706
768
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
707
769
  let end = length === undefined ? reader.len : reader.pos + length;
708
- const message = createBaseHandlerCondition();
770
+ const message = createBaseLogFilter();
709
771
  while (reader.pos < end) {
710
772
  const tag = reader.uint32();
711
773
  switch (tag >>> 3) {
@@ -737,7 +799,7 @@ exports.HandlerCondition = {
737
799
  return obj;
738
800
  },
739
801
  fromPartial(object) {
740
- const message = createBaseHandlerCondition();
802
+ const message = createBaseLogFilter();
741
803
  message.topics = object.topics?.map((e) => exports.Topic.fromPartial(e)) || [];
742
804
  return message;
743
805
  },
@@ -866,12 +928,12 @@ exports.Topic = {
866
928
  return message;
867
929
  },
868
930
  };
869
- function createBaseProcessLogRequest() {
870
- return { logs: [] };
931
+ function createBaseProcessLogsRequest() {
932
+ return { logBindings: [] };
871
933
  }
872
- exports.ProcessLogRequest = {
934
+ exports.ProcessLogsRequest = {
873
935
  encode(message, writer = minimal_1.default.Writer.create()) {
874
- for (const v of message.logs) {
936
+ for (const v of message.logBindings) {
875
937
  exports.LogBinding.encode(v, writer.uint32(10).fork()).ldelim();
876
938
  }
877
939
  return writer;
@@ -879,12 +941,12 @@ exports.ProcessLogRequest = {
879
941
  decode(input, length) {
880
942
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
881
943
  let end = length === undefined ? reader.len : reader.pos + length;
882
- const message = createBaseProcessLogRequest();
944
+ const message = createBaseProcessLogsRequest();
883
945
  while (reader.pos < end) {
884
946
  const tag = reader.uint32();
885
947
  switch (tag >>> 3) {
886
948
  case 1:
887
- message.logs.push(exports.LogBinding.decode(reader, reader.uint32()));
949
+ message.logBindings.push(exports.LogBinding.decode(reader, reader.uint32()));
888
950
  break;
889
951
  default:
890
952
  reader.skipType(tag & 7);
@@ -895,31 +957,32 @@ exports.ProcessLogRequest = {
895
957
  },
896
958
  fromJSON(object) {
897
959
  return {
898
- logs: Array.isArray(object?.logs)
899
- ? object.logs.map((e) => exports.LogBinding.fromJSON(e))
960
+ logBindings: Array.isArray(object?.logBindings)
961
+ ? object.logBindings.map((e) => exports.LogBinding.fromJSON(e))
900
962
  : [],
901
963
  };
902
964
  },
903
965
  toJSON(message) {
904
966
  const obj = {};
905
- if (message.logs) {
906
- obj.logs = message.logs.map((e) => e ? exports.LogBinding.toJSON(e) : undefined);
967
+ if (message.logBindings) {
968
+ obj.logBindings = message.logBindings.map((e) => e ? exports.LogBinding.toJSON(e) : undefined);
907
969
  }
908
970
  else {
909
- obj.logs = [];
971
+ obj.logBindings = [];
910
972
  }
911
973
  return obj;
912
974
  },
913
975
  fromPartial(object) {
914
- const message = createBaseProcessLogRequest();
915
- message.logs = object.logs?.map((e) => exports.LogBinding.fromPartial(e)) || [];
976
+ const message = createBaseProcessLogsRequest();
977
+ message.logBindings =
978
+ object.logBindings?.map((e) => exports.LogBinding.fromPartial(e)) || [];
916
979
  return message;
917
980
  },
918
981
  };
919
- function createBaseProcessLogResponse() {
982
+ function createBaseProcessLogsResponse() {
920
983
  return { result: undefined, configUpdated: false };
921
984
  }
922
- exports.ProcessLogResponse = {
985
+ exports.ProcessLogsResponse = {
923
986
  encode(message, writer = minimal_1.default.Writer.create()) {
924
987
  if (message.result !== undefined) {
925
988
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -932,7 +995,7 @@ exports.ProcessLogResponse = {
932
995
  decode(input, length) {
933
996
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
934
997
  let end = length === undefined ? reader.len : reader.pos + length;
935
- const message = createBaseProcessLogResponse();
998
+ const message = createBaseProcessLogsResponse();
936
999
  while (reader.pos < end) {
937
1000
  const tag = reader.uint32();
938
1001
  switch (tag >>> 3) {
@@ -970,7 +1033,7 @@ exports.ProcessLogResponse = {
970
1033
  return obj;
971
1034
  },
972
1035
  fromPartial(object) {
973
- const message = createBaseProcessLogResponse();
1036
+ const message = createBaseProcessLogsResponse();
974
1037
  message.result =
975
1038
  object.result !== undefined && object.result !== null
976
1039
  ? exports.O11yResult.fromPartial(object.result)
@@ -979,10 +1042,10 @@ exports.ProcessLogResponse = {
979
1042
  return message;
980
1043
  },
981
1044
  };
982
- function createBaseProcessTransactionRequest() {
1045
+ function createBaseProcessTransactionsRequest() {
983
1046
  return { transaction: undefined };
984
1047
  }
985
- exports.ProcessTransactionRequest = {
1048
+ exports.ProcessTransactionsRequest = {
986
1049
  encode(message, writer = minimal_1.default.Writer.create()) {
987
1050
  if (message.transaction !== undefined) {
988
1051
  exports.Transaction.encode(message.transaction, writer.uint32(10).fork()).ldelim();
@@ -992,7 +1055,7 @@ exports.ProcessTransactionRequest = {
992
1055
  decode(input, length) {
993
1056
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
994
1057
  let end = length === undefined ? reader.len : reader.pos + length;
995
- const message = createBaseProcessTransactionRequest();
1058
+ const message = createBaseProcessTransactionsRequest();
996
1059
  while (reader.pos < end) {
997
1060
  const tag = reader.uint32();
998
1061
  switch (tag >>> 3) {
@@ -1022,7 +1085,7 @@ exports.ProcessTransactionRequest = {
1022
1085
  return obj;
1023
1086
  },
1024
1087
  fromPartial(object) {
1025
- const message = createBaseProcessTransactionRequest();
1088
+ const message = createBaseProcessTransactionsRequest();
1026
1089
  message.transaction =
1027
1090
  object.transaction !== undefined && object.transaction !== null
1028
1091
  ? exports.Transaction.fromPartial(object.transaction)
@@ -1030,10 +1093,10 @@ exports.ProcessTransactionRequest = {
1030
1093
  return message;
1031
1094
  },
1032
1095
  };
1033
- function createBaseProcessInstructionRequest() {
1096
+ function createBaseProcessInstructionsRequest() {
1034
1097
  return { instructions: [] };
1035
1098
  }
1036
- exports.ProcessInstructionRequest = {
1099
+ exports.ProcessInstructionsRequest = {
1037
1100
  encode(message, writer = minimal_1.default.Writer.create()) {
1038
1101
  for (const v of message.instructions) {
1039
1102
  exports.Instruction.encode(v, writer.uint32(10).fork()).ldelim();
@@ -1043,7 +1106,7 @@ exports.ProcessInstructionRequest = {
1043
1106
  decode(input, length) {
1044
1107
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1045
1108
  let end = length === undefined ? reader.len : reader.pos + length;
1046
- const message = createBaseProcessInstructionRequest();
1109
+ const message = createBaseProcessInstructionsRequest();
1047
1110
  while (reader.pos < end) {
1048
1111
  const tag = reader.uint32();
1049
1112
  switch (tag >>> 3) {
@@ -1075,16 +1138,16 @@ exports.ProcessInstructionRequest = {
1075
1138
  return obj;
1076
1139
  },
1077
1140
  fromPartial(object) {
1078
- const message = createBaseProcessInstructionRequest();
1141
+ const message = createBaseProcessInstructionsRequest();
1079
1142
  message.instructions =
1080
1143
  object.instructions?.map((e) => exports.Instruction.fromPartial(e)) || [];
1081
1144
  return message;
1082
1145
  },
1083
1146
  };
1084
- function createBaseProcessTransactionResponse() {
1147
+ function createBaseProcessTransactionsResponse() {
1085
1148
  return { result: undefined };
1086
1149
  }
1087
- exports.ProcessTransactionResponse = {
1150
+ exports.ProcessTransactionsResponse = {
1088
1151
  encode(message, writer = minimal_1.default.Writer.create()) {
1089
1152
  if (message.result !== undefined) {
1090
1153
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -1094,7 +1157,7 @@ exports.ProcessTransactionResponse = {
1094
1157
  decode(input, length) {
1095
1158
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1096
1159
  let end = length === undefined ? reader.len : reader.pos + length;
1097
- const message = createBaseProcessTransactionResponse();
1160
+ const message = createBaseProcessTransactionsResponse();
1098
1161
  while (reader.pos < end) {
1099
1162
  const tag = reader.uint32();
1100
1163
  switch (tag >>> 3) {
@@ -1124,7 +1187,7 @@ exports.ProcessTransactionResponse = {
1124
1187
  return obj;
1125
1188
  },
1126
1189
  fromPartial(object) {
1127
- const message = createBaseProcessTransactionResponse();
1190
+ const message = createBaseProcessTransactionsResponse();
1128
1191
  message.result =
1129
1192
  object.result !== undefined && object.result !== null
1130
1193
  ? exports.O11yResult.fromPartial(object.result)
@@ -1132,10 +1195,10 @@ exports.ProcessTransactionResponse = {
1132
1195
  return message;
1133
1196
  },
1134
1197
  };
1135
- function createBaseProcessInstructionResponse() {
1198
+ function createBaseProcessInstructionsResponse() {
1136
1199
  return { result: undefined };
1137
1200
  }
1138
- exports.ProcessInstructionResponse = {
1201
+ exports.ProcessInstructionsResponse = {
1139
1202
  encode(message, writer = minimal_1.default.Writer.create()) {
1140
1203
  if (message.result !== undefined) {
1141
1204
  exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
@@ -1145,7 +1208,7 @@ exports.ProcessInstructionResponse = {
1145
1208
  decode(input, length) {
1146
1209
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1147
1210
  let end = length === undefined ? reader.len : reader.pos + length;
1148
- const message = createBaseProcessInstructionResponse();
1211
+ const message = createBaseProcessInstructionsResponse();
1149
1212
  while (reader.pos < end) {
1150
1213
  const tag = reader.uint32();
1151
1214
  switch (tag >>> 3) {
@@ -1175,7 +1238,7 @@ exports.ProcessInstructionResponse = {
1175
1238
  return obj;
1176
1239
  },
1177
1240
  fromPartial(object) {
1178
- const message = createBaseProcessInstructionResponse();
1241
+ const message = createBaseProcessInstructionsResponse();
1179
1242
  message.result =
1180
1243
  object.result !== undefined && object.result !== null
1181
1244
  ? exports.O11yResult.fromPartial(object.result)
@@ -1183,31 +1246,25 @@ exports.ProcessInstructionResponse = {
1183
1246
  return message;
1184
1247
  },
1185
1248
  };
1186
- function createBaseProcessBlockRequest() {
1187
- return { block: undefined, chainId: "" };
1249
+ function createBaseProcessBlocksRequest() {
1250
+ return { blockBindings: [] };
1188
1251
  }
1189
- exports.ProcessBlockRequest = {
1252
+ exports.ProcessBlocksRequest = {
1190
1253
  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);
1254
+ for (const v of message.blockBindings) {
1255
+ exports.BlockBinding.encode(v, writer.uint32(18).fork()).ldelim();
1196
1256
  }
1197
1257
  return writer;
1198
1258
  },
1199
1259
  decode(input, length) {
1200
1260
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1201
1261
  let end = length === undefined ? reader.len : reader.pos + length;
1202
- const message = createBaseProcessBlockRequest();
1262
+ const message = createBaseProcessBlocksRequest();
1203
1263
  while (reader.pos < end) {
1204
1264
  const tag = reader.uint32();
1205
1265
  switch (tag >>> 3) {
1206
- case 1:
1207
- message.block = exports.Block.decode(reader, reader.uint32());
1208
- break;
1209
1266
  case 2:
1210
- message.chainId = reader.string();
1267
+ message.blockBindings.push(exports.BlockBinding.decode(reader, reader.uint32()));
1211
1268
  break;
1212
1269
  default:
1213
1270
  reader.skipType(tag & 7);
@@ -1218,45 +1275,46 @@ exports.ProcessBlockRequest = {
1218
1275
  },
1219
1276
  fromJSON(object) {
1220
1277
  return {
1221
- block: isSet(object.block) ? exports.Block.fromJSON(object.block) : undefined,
1222
- chainId: isSet(object.chainId) ? String(object.chainId) : "",
1278
+ blockBindings: Array.isArray(object?.blockBindings)
1279
+ ? object.blockBindings.map((e) => exports.BlockBinding.fromJSON(e))
1280
+ : [],
1223
1281
  };
1224
1282
  },
1225
1283
  toJSON(message) {
1226
1284
  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);
1285
+ if (message.blockBindings) {
1286
+ obj.blockBindings = message.blockBindings.map((e) => e ? exports.BlockBinding.toJSON(e) : undefined);
1287
+ }
1288
+ else {
1289
+ obj.blockBindings = [];
1290
+ }
1230
1291
  return obj;
1231
1292
  },
1232
1293
  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 ?? "";
1294
+ const message = createBaseProcessBlocksRequest();
1295
+ message.blockBindings =
1296
+ object.blockBindings?.map((e) => exports.BlockBinding.fromPartial(e)) || [];
1239
1297
  return message;
1240
1298
  },
1241
1299
  };
1242
- function createBaseProcessBlockResponse() {
1300
+ function createBaseProcessBlocksResponse() {
1243
1301
  return { result: undefined };
1244
1302
  }
1245
- exports.ProcessBlockResponse = {
1303
+ exports.ProcessBlocksResponse = {
1246
1304
  encode(message, writer = minimal_1.default.Writer.create()) {
1247
1305
  if (message.result !== undefined) {
1248
- exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
1306
+ exports.O11yResult.encode(message.result, writer.uint32(18).fork()).ldelim();
1249
1307
  }
1250
1308
  return writer;
1251
1309
  },
1252
1310
  decode(input, length) {
1253
1311
  const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1254
1312
  let end = length === undefined ? reader.len : reader.pos + length;
1255
- const message = createBaseProcessBlockResponse();
1313
+ const message = createBaseProcessBlocksResponse();
1256
1314
  while (reader.pos < end) {
1257
1315
  const tag = reader.uint32();
1258
1316
  switch (tag >>> 3) {
1259
- case 1:
1317
+ case 2:
1260
1318
  message.result = exports.O11yResult.decode(reader, reader.uint32());
1261
1319
  break;
1262
1320
  default:
@@ -1282,7 +1340,7 @@ exports.ProcessBlockResponse = {
1282
1340
  return obj;
1283
1341
  },
1284
1342
  fromPartial(object) {
1285
- const message = createBaseProcessBlockResponse();
1343
+ const message = createBaseProcessBlocksResponse();
1286
1344
  message.result =
1287
1345
  object.result !== undefined && object.result !== null
1288
1346
  ? exports.O11yResult.fromPartial(object.result)
@@ -1290,108 +1348,6 @@ exports.ProcessBlockResponse = {
1290
1348
  return message;
1291
1349
  },
1292
1350
  };
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
1351
  function createBaseLogBinding() {
1396
1352
  return { log: undefined, handlerId: 0 };
1397
1353
  }
@@ -1647,6 +1603,88 @@ exports.Instruction = {
1647
1603
  return message;
1648
1604
  },
1649
1605
  };
1606
+ function createBaseBlockBinding() {
1607
+ return { block: undefined, handlerIds: [], chainId: "" };
1608
+ }
1609
+ exports.BlockBinding = {
1610
+ encode(message, writer = minimal_1.default.Writer.create()) {
1611
+ if (message.block !== undefined) {
1612
+ exports.Block.encode(message.block, writer.uint32(10).fork()).ldelim();
1613
+ }
1614
+ writer.uint32(18).fork();
1615
+ for (const v of message.handlerIds) {
1616
+ writer.int32(v);
1617
+ }
1618
+ writer.ldelim();
1619
+ if (message.chainId !== "") {
1620
+ writer.uint32(26).string(message.chainId);
1621
+ }
1622
+ return writer;
1623
+ },
1624
+ decode(input, length) {
1625
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
1626
+ let end = length === undefined ? reader.len : reader.pos + length;
1627
+ const message = createBaseBlockBinding();
1628
+ while (reader.pos < end) {
1629
+ const tag = reader.uint32();
1630
+ switch (tag >>> 3) {
1631
+ case 1:
1632
+ message.block = exports.Block.decode(reader, reader.uint32());
1633
+ break;
1634
+ case 2:
1635
+ if ((tag & 7) === 2) {
1636
+ const end2 = reader.uint32() + reader.pos;
1637
+ while (reader.pos < end2) {
1638
+ message.handlerIds.push(reader.int32());
1639
+ }
1640
+ }
1641
+ else {
1642
+ message.handlerIds.push(reader.int32());
1643
+ }
1644
+ break;
1645
+ case 3:
1646
+ message.chainId = reader.string();
1647
+ break;
1648
+ default:
1649
+ reader.skipType(tag & 7);
1650
+ break;
1651
+ }
1652
+ }
1653
+ return message;
1654
+ },
1655
+ fromJSON(object) {
1656
+ return {
1657
+ block: isSet(object.block) ? exports.Block.fromJSON(object.block) : undefined,
1658
+ handlerIds: Array.isArray(object?.handlerIds)
1659
+ ? object.handlerIds.map((e) => Number(e))
1660
+ : [],
1661
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
1662
+ };
1663
+ },
1664
+ toJSON(message) {
1665
+ const obj = {};
1666
+ message.block !== undefined &&
1667
+ (obj.block = message.block ? exports.Block.toJSON(message.block) : undefined);
1668
+ if (message.handlerIds) {
1669
+ obj.handlerIds = message.handlerIds.map((e) => Math.round(e));
1670
+ }
1671
+ else {
1672
+ obj.handlerIds = [];
1673
+ }
1674
+ message.chainId !== undefined && (obj.chainId = message.chainId);
1675
+ return obj;
1676
+ },
1677
+ fromPartial(object) {
1678
+ const message = createBaseBlockBinding();
1679
+ message.block =
1680
+ object.block !== undefined && object.block !== null
1681
+ ? exports.Block.fromPartial(object.block)
1682
+ : undefined;
1683
+ message.handlerIds = object.handlerIds?.map((e) => e) || [];
1684
+ message.chainId = object.chainId ?? "";
1685
+ return message;
1686
+ },
1687
+ };
1650
1688
  function createBaseBlock() {
1651
1689
  return { raw: new Uint8Array() };
1652
1690
  }
@@ -2309,14 +2347,6 @@ exports.ProcessorDefinition = {
2309
2347
  name: "Processor",
2310
2348
  fullName: "processor.Processor",
2311
2349
  methods: {
2312
- getConfig: {
2313
- name: "GetConfig",
2314
- requestType: exports.ProcessConfigRequest,
2315
- requestStream: false,
2316
- responseType: exports.ProcessConfigResponse,
2317
- responseStream: false,
2318
- options: {},
2319
- },
2320
2350
  start: {
2321
2351
  name: "Start",
2322
2352
  requestType: exports.StartRequest,
@@ -2333,27 +2363,27 @@ exports.ProcessorDefinition = {
2333
2363
  responseStream: false,
2334
2364
  options: {},
2335
2365
  },
2336
- processLog: {
2337
- name: "ProcessLog",
2338
- requestType: exports.ProcessLogRequest,
2366
+ getConfig: {
2367
+ name: "GetConfig",
2368
+ requestType: exports.ProcessConfigRequest,
2339
2369
  requestStream: false,
2340
- responseType: exports.ProcessLogResponse,
2370
+ responseType: exports.ProcessConfigResponse,
2341
2371
  responseStream: false,
2342
2372
  options: {},
2343
2373
  },
2344
- processTransaction: {
2345
- name: "ProcessTransaction",
2346
- requestType: exports.ProcessTransactionRequest,
2374
+ processLogs: {
2375
+ name: "ProcessLogs",
2376
+ requestType: exports.ProcessLogsRequest,
2347
2377
  requestStream: false,
2348
- responseType: exports.ProcessTransactionResponse,
2378
+ responseType: exports.ProcessLogsResponse,
2349
2379
  responseStream: false,
2350
2380
  options: {},
2351
2381
  },
2352
- processBlock: {
2353
- name: "ProcessBlock",
2354
- requestType: exports.ProcessBlockRequest,
2382
+ processTransactions: {
2383
+ name: "ProcessTransactions",
2384
+ requestType: exports.ProcessTransactionsRequest,
2355
2385
  requestStream: false,
2356
- responseType: exports.ProcessBlockResponse,
2386
+ responseType: exports.ProcessTransactionsResponse,
2357
2387
  responseStream: false,
2358
2388
  options: {},
2359
2389
  },
@@ -2365,11 +2395,11 @@ exports.ProcessorDefinition = {
2365
2395
  responseStream: false,
2366
2396
  options: {},
2367
2397
  },
2368
- processInstruction: {
2369
- name: "ProcessInstruction",
2370
- requestType: exports.ProcessInstructionRequest,
2398
+ processInstructions: {
2399
+ name: "ProcessInstructions",
2400
+ requestType: exports.ProcessInstructionsRequest,
2371
2401
  requestStream: false,
2372
- responseType: exports.ProcessInstructionResponse,
2402
+ responseType: exports.ProcessInstructionsResponse,
2373
2403
  responseStream: false,
2374
2404
  options: {},
2375
2405
  },