@sentio/runtime 2.38.1-rc.2 → 2.39.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.38.1-rc.2",
3
+ "version": "2.39.0-rc.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,7 +32,7 @@
32
32
  "rxjs": "^7.8.1",
33
33
  "utility-types": "^3.11.0",
34
34
  "winston": "^3.11.0",
35
- "@sentio/protos": "2.38.1-rc.2"
35
+ "@sentio/protos": "2.39.0-rc.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/command-line-args": "^5.2.3",
@@ -202,6 +202,7 @@ export enum HandlerType {
202
202
  SUI_OBJECT = 10,
203
203
  SUI_OBJECT_CHANGE = 12,
204
204
  FUEL_CALL = 13,
205
+ COSMOS_CALL = 14,
205
206
  UNRECOGNIZED = -1,
206
207
  }
207
208
 
@@ -249,6 +250,9 @@ export function handlerTypeFromJSON(object: any): HandlerType {
249
250
  case 13:
250
251
  case "FUEL_CALL":
251
252
  return HandlerType.FUEL_CALL;
253
+ case 14:
254
+ case "COSMOS_CALL":
255
+ return HandlerType.COSMOS_CALL;
252
256
  case -1:
253
257
  case "UNRECOGNIZED":
254
258
  default:
@@ -286,6 +290,8 @@ export function handlerTypeToJSON(object: HandlerType): string {
286
290
  return "SUI_OBJECT_CHANGE";
287
291
  case HandlerType.FUEL_CALL:
288
292
  return "FUEL_CALL";
293
+ case HandlerType.COSMOS_CALL:
294
+ return "COSMOS_CALL";
289
295
  case HandlerType.UNRECOGNIZED:
290
296
  default:
291
297
  return "UNRECOGNIZED";
@@ -382,6 +388,7 @@ export interface ContractConfig {
382
388
  fuelCallConfigs: FuelCallHandlerConfig[];
383
389
  assetConfigs: FuelAssetHandlerConfig[];
384
390
  fuelLogConfigs: FuelLogHandlerConfig[];
391
+ cosmosLogConfigs: CosmosLogHandlerConfig[];
385
392
  instructionConfig: InstructionHandlerConfig | undefined;
386
393
  startBlock: bigint;
387
394
  endBlock: bigint;
@@ -586,6 +593,7 @@ export interface TemplateInstance {
586
593
  startBlock: bigint;
587
594
  endBlock: bigint;
588
595
  templateId: number;
596
+ baseLabels: { [key: string]: any } | undefined;
589
597
  }
590
598
 
591
599
  export interface StartRequest {
@@ -637,6 +645,11 @@ export interface FuelLogHandlerConfig {
637
645
  handlerId: number;
638
646
  }
639
647
 
648
+ export interface CosmosLogHandlerConfig {
649
+ logFilters: string[];
650
+ handlerId: number;
651
+ }
652
+
640
653
  export interface LogFilter {
641
654
  topics: Topic[];
642
655
  address?: string | undefined;
@@ -791,6 +804,7 @@ export interface Data {
791
804
  suiObject?: Data_SuiObject | undefined;
792
805
  suiObjectChange?: Data_SuiObjectChange | undefined;
793
806
  fuelCall?: Data_FuelCall | undefined;
807
+ cosmosCall?: Data_CosmosCall | undefined;
794
808
  }
795
809
 
796
810
  export interface Data_EthLog {
@@ -874,6 +888,11 @@ export interface Data_FuelCall {
874
888
  timestamp: Date | undefined;
875
889
  }
876
890
 
891
+ export interface Data_CosmosCall {
892
+ transaction: { [key: string]: any } | undefined;
893
+ timestamp: Date | undefined;
894
+ }
895
+
877
896
  export interface DataBinding {
878
897
  data: Data | undefined;
879
898
  handlerType: HandlerType;
@@ -1411,6 +1430,7 @@ function createBaseContractConfig(): ContractConfig {
1411
1430
  fuelCallConfigs: [],
1412
1431
  assetConfigs: [],
1413
1432
  fuelLogConfigs: [],
1433
+ cosmosLogConfigs: [],
1414
1434
  instructionConfig: undefined,
1415
1435
  startBlock: BigInt("0"),
1416
1436
  endBlock: BigInt("0"),
@@ -1453,6 +1473,9 @@ export const ContractConfig = {
1453
1473
  for (const v of message.fuelLogConfigs) {
1454
1474
  FuelLogHandlerConfig.encode(v!, writer.uint32(122).fork()).ldelim();
1455
1475
  }
1476
+ for (const v of message.cosmosLogConfigs) {
1477
+ CosmosLogHandlerConfig.encode(v!, writer.uint32(130).fork()).ldelim();
1478
+ }
1456
1479
  if (message.instructionConfig !== undefined) {
1457
1480
  InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
1458
1481
  }
@@ -1558,6 +1581,13 @@ export const ContractConfig = {
1558
1581
 
1559
1582
  message.fuelLogConfigs.push(FuelLogHandlerConfig.decode(reader, reader.uint32()));
1560
1583
  continue;
1584
+ case 16:
1585
+ if (tag !== 130) {
1586
+ break;
1587
+ }
1588
+
1589
+ message.cosmosLogConfigs.push(CosmosLogHandlerConfig.decode(reader, reader.uint32()));
1590
+ continue;
1561
1591
  case 6:
1562
1592
  if (tag !== 50) {
1563
1593
  break;
@@ -1628,6 +1658,9 @@ export const ContractConfig = {
1628
1658
  fuelLogConfigs: globalThis.Array.isArray(object?.fuelLogConfigs)
1629
1659
  ? object.fuelLogConfigs.map((e: any) => FuelLogHandlerConfig.fromJSON(e))
1630
1660
  : [],
1661
+ cosmosLogConfigs: globalThis.Array.isArray(object?.cosmosLogConfigs)
1662
+ ? object.cosmosLogConfigs.map((e: any) => CosmosLogHandlerConfig.fromJSON(e))
1663
+ : [],
1631
1664
  instructionConfig: isSet(object.instructionConfig)
1632
1665
  ? InstructionHandlerConfig.fromJSON(object.instructionConfig)
1633
1666
  : undefined,
@@ -1672,6 +1705,9 @@ export const ContractConfig = {
1672
1705
  if (message.fuelLogConfigs?.length) {
1673
1706
  obj.fuelLogConfigs = message.fuelLogConfigs.map((e) => FuelLogHandlerConfig.toJSON(e));
1674
1707
  }
1708
+ if (message.cosmosLogConfigs?.length) {
1709
+ obj.cosmosLogConfigs = message.cosmosLogConfigs.map((e) => CosmosLogHandlerConfig.toJSON(e));
1710
+ }
1675
1711
  if (message.instructionConfig !== undefined) {
1676
1712
  obj.instructionConfig = InstructionHandlerConfig.toJSON(message.instructionConfig);
1677
1713
  }
@@ -1706,6 +1742,7 @@ export const ContractConfig = {
1706
1742
  message.fuelCallConfigs = object.fuelCallConfigs?.map((e) => FuelCallHandlerConfig.fromPartial(e)) || [];
1707
1743
  message.assetConfigs = object.assetConfigs?.map((e) => FuelAssetHandlerConfig.fromPartial(e)) || [];
1708
1744
  message.fuelLogConfigs = object.fuelLogConfigs?.map((e) => FuelLogHandlerConfig.fromPartial(e)) || [];
1745
+ message.cosmosLogConfigs = object.cosmosLogConfigs?.map((e) => CosmosLogHandlerConfig.fromPartial(e)) || [];
1709
1746
  message.instructionConfig = (object.instructionConfig !== undefined && object.instructionConfig !== null)
1710
1747
  ? InstructionHandlerConfig.fromPartial(object.instructionConfig)
1711
1748
  : undefined;
@@ -3344,7 +3381,7 @@ export const ContractInfo = {
3344
3381
  };
3345
3382
 
3346
3383
  function createBaseTemplateInstance(): TemplateInstance {
3347
- return { contract: undefined, startBlock: BigInt("0"), endBlock: BigInt("0"), templateId: 0 };
3384
+ return { contract: undefined, startBlock: BigInt("0"), endBlock: BigInt("0"), templateId: 0, baseLabels: undefined };
3348
3385
  }
3349
3386
 
3350
3387
  export const TemplateInstance = {
@@ -3367,6 +3404,9 @@ export const TemplateInstance = {
3367
3404
  if (message.templateId !== 0) {
3368
3405
  writer.uint32(32).int32(message.templateId);
3369
3406
  }
3407
+ if (message.baseLabels !== undefined) {
3408
+ Struct.encode(Struct.wrap(message.baseLabels), writer.uint32(42).fork()).ldelim();
3409
+ }
3370
3410
  return writer;
3371
3411
  },
3372
3412
 
@@ -3405,6 +3445,13 @@ export const TemplateInstance = {
3405
3445
 
3406
3446
  message.templateId = reader.int32();
3407
3447
  continue;
3448
+ case 5:
3449
+ if (tag !== 42) {
3450
+ break;
3451
+ }
3452
+
3453
+ message.baseLabels = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3454
+ continue;
3408
3455
  }
3409
3456
  if ((tag & 7) === 4 || tag === 0) {
3410
3457
  break;
@@ -3420,6 +3467,7 @@ export const TemplateInstance = {
3420
3467
  startBlock: isSet(object.startBlock) ? BigInt(object.startBlock) : BigInt("0"),
3421
3468
  endBlock: isSet(object.endBlock) ? BigInt(object.endBlock) : BigInt("0"),
3422
3469
  templateId: isSet(object.templateId) ? globalThis.Number(object.templateId) : 0,
3470
+ baseLabels: isObject(object.baseLabels) ? object.baseLabels : undefined,
3423
3471
  };
3424
3472
  },
3425
3473
 
@@ -3437,6 +3485,9 @@ export const TemplateInstance = {
3437
3485
  if (message.templateId !== 0) {
3438
3486
  obj.templateId = Math.round(message.templateId);
3439
3487
  }
3488
+ if (message.baseLabels !== undefined) {
3489
+ obj.baseLabels = message.baseLabels;
3490
+ }
3440
3491
  return obj;
3441
3492
  },
3442
3493
 
@@ -3451,6 +3502,7 @@ export const TemplateInstance = {
3451
3502
  message.startBlock = object.startBlock ?? BigInt("0");
3452
3503
  message.endBlock = object.endBlock ?? BigInt("0");
3453
3504
  message.templateId = object.templateId ?? 0;
3505
+ message.baseLabels = object.baseLabels ?? undefined;
3454
3506
  return message;
3455
3507
  },
3456
3508
  };
@@ -4191,6 +4243,82 @@ export const FuelLogHandlerConfig = {
4191
4243
  },
4192
4244
  };
4193
4245
 
4246
+ function createBaseCosmosLogHandlerConfig(): CosmosLogHandlerConfig {
4247
+ return { logFilters: [], handlerId: 0 };
4248
+ }
4249
+
4250
+ export const CosmosLogHandlerConfig = {
4251
+ encode(message: CosmosLogHandlerConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4252
+ for (const v of message.logFilters) {
4253
+ writer.uint32(10).string(v!);
4254
+ }
4255
+ if (message.handlerId !== 0) {
4256
+ writer.uint32(16).int32(message.handlerId);
4257
+ }
4258
+ return writer;
4259
+ },
4260
+
4261
+ decode(input: _m0.Reader | Uint8Array, length?: number): CosmosLogHandlerConfig {
4262
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4263
+ let end = length === undefined ? reader.len : reader.pos + length;
4264
+ const message = createBaseCosmosLogHandlerConfig();
4265
+ while (reader.pos < end) {
4266
+ const tag = reader.uint32();
4267
+ switch (tag >>> 3) {
4268
+ case 1:
4269
+ if (tag !== 10) {
4270
+ break;
4271
+ }
4272
+
4273
+ message.logFilters.push(reader.string());
4274
+ continue;
4275
+ case 2:
4276
+ if (tag !== 16) {
4277
+ break;
4278
+ }
4279
+
4280
+ message.handlerId = reader.int32();
4281
+ continue;
4282
+ }
4283
+ if ((tag & 7) === 4 || tag === 0) {
4284
+ break;
4285
+ }
4286
+ reader.skipType(tag & 7);
4287
+ }
4288
+ return message;
4289
+ },
4290
+
4291
+ fromJSON(object: any): CosmosLogHandlerConfig {
4292
+ return {
4293
+ logFilters: globalThis.Array.isArray(object?.logFilters)
4294
+ ? object.logFilters.map((e: any) => globalThis.String(e))
4295
+ : [],
4296
+ handlerId: isSet(object.handlerId) ? globalThis.Number(object.handlerId) : 0,
4297
+ };
4298
+ },
4299
+
4300
+ toJSON(message: CosmosLogHandlerConfig): unknown {
4301
+ const obj: any = {};
4302
+ if (message.logFilters?.length) {
4303
+ obj.logFilters = message.logFilters;
4304
+ }
4305
+ if (message.handlerId !== 0) {
4306
+ obj.handlerId = Math.round(message.handlerId);
4307
+ }
4308
+ return obj;
4309
+ },
4310
+
4311
+ create(base?: DeepPartial<CosmosLogHandlerConfig>): CosmosLogHandlerConfig {
4312
+ return CosmosLogHandlerConfig.fromPartial(base ?? {});
4313
+ },
4314
+ fromPartial(object: DeepPartial<CosmosLogHandlerConfig>): CosmosLogHandlerConfig {
4315
+ const message = createBaseCosmosLogHandlerConfig();
4316
+ message.logFilters = object.logFilters?.map((e) => e) || [];
4317
+ message.handlerId = object.handlerId ?? 0;
4318
+ return message;
4319
+ },
4320
+ };
4321
+
4194
4322
  function createBaseLogFilter(): LogFilter {
4195
4323
  return { topics: [], address: undefined, addressType: undefined };
4196
4324
  }
@@ -6255,6 +6383,7 @@ function createBaseData(): Data {
6255
6383
  suiObject: undefined,
6256
6384
  suiObjectChange: undefined,
6257
6385
  fuelCall: undefined,
6386
+ cosmosCall: undefined,
6258
6387
  };
6259
6388
  }
6260
6389
 
@@ -6302,6 +6431,9 @@ export const Data = {
6302
6431
  if (message.fuelCall !== undefined) {
6303
6432
  Data_FuelCall.encode(message.fuelCall, writer.uint32(114).fork()).ldelim();
6304
6433
  }
6434
+ if (message.cosmosCall !== undefined) {
6435
+ Data_CosmosCall.encode(message.cosmosCall, writer.uint32(122).fork()).ldelim();
6436
+ }
6305
6437
  return writer;
6306
6438
  },
6307
6439
 
@@ -6410,6 +6542,13 @@ export const Data = {
6410
6542
 
6411
6543
  message.fuelCall = Data_FuelCall.decode(reader, reader.uint32());
6412
6544
  continue;
6545
+ case 15:
6546
+ if (tag !== 122) {
6547
+ break;
6548
+ }
6549
+
6550
+ message.cosmosCall = Data_CosmosCall.decode(reader, reader.uint32());
6551
+ continue;
6413
6552
  }
6414
6553
  if ((tag & 7) === 4 || tag === 0) {
6415
6554
  break;
@@ -6437,6 +6576,7 @@ export const Data = {
6437
6576
  ? Data_SuiObjectChange.fromJSON(object.suiObjectChange)
6438
6577
  : undefined,
6439
6578
  fuelCall: isSet(object.fuelCall) ? Data_FuelCall.fromJSON(object.fuelCall) : undefined,
6579
+ cosmosCall: isSet(object.cosmosCall) ? Data_CosmosCall.fromJSON(object.cosmosCall) : undefined,
6440
6580
  };
6441
6581
  },
6442
6582
 
@@ -6484,6 +6624,9 @@ export const Data = {
6484
6624
  if (message.fuelCall !== undefined) {
6485
6625
  obj.fuelCall = Data_FuelCall.toJSON(message.fuelCall);
6486
6626
  }
6627
+ if (message.cosmosCall !== undefined) {
6628
+ obj.cosmosCall = Data_CosmosCall.toJSON(message.cosmosCall);
6629
+ }
6487
6630
  return obj;
6488
6631
  },
6489
6632
 
@@ -6532,6 +6675,9 @@ export const Data = {
6532
6675
  message.fuelCall = (object.fuelCall !== undefined && object.fuelCall !== null)
6533
6676
  ? Data_FuelCall.fromPartial(object.fuelCall)
6534
6677
  : undefined;
6678
+ message.cosmosCall = (object.cosmosCall !== undefined && object.cosmosCall !== null)
6679
+ ? Data_CosmosCall.fromPartial(object.cosmosCall)
6680
+ : undefined;
6535
6681
  return message;
6536
6682
  },
6537
6683
  };
@@ -7771,6 +7917,80 @@ export const Data_FuelCall = {
7771
7917
  },
7772
7918
  };
7773
7919
 
7920
+ function createBaseData_CosmosCall(): Data_CosmosCall {
7921
+ return { transaction: undefined, timestamp: undefined };
7922
+ }
7923
+
7924
+ export const Data_CosmosCall = {
7925
+ encode(message: Data_CosmosCall, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
7926
+ if (message.transaction !== undefined) {
7927
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(10).fork()).ldelim();
7928
+ }
7929
+ if (message.timestamp !== undefined) {
7930
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim();
7931
+ }
7932
+ return writer;
7933
+ },
7934
+
7935
+ decode(input: _m0.Reader | Uint8Array, length?: number): Data_CosmosCall {
7936
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
7937
+ let end = length === undefined ? reader.len : reader.pos + length;
7938
+ const message = createBaseData_CosmosCall();
7939
+ while (reader.pos < end) {
7940
+ const tag = reader.uint32();
7941
+ switch (tag >>> 3) {
7942
+ case 1:
7943
+ if (tag !== 10) {
7944
+ break;
7945
+ }
7946
+
7947
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
7948
+ continue;
7949
+ case 2:
7950
+ if (tag !== 18) {
7951
+ break;
7952
+ }
7953
+
7954
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
7955
+ continue;
7956
+ }
7957
+ if ((tag & 7) === 4 || tag === 0) {
7958
+ break;
7959
+ }
7960
+ reader.skipType(tag & 7);
7961
+ }
7962
+ return message;
7963
+ },
7964
+
7965
+ fromJSON(object: any): Data_CosmosCall {
7966
+ return {
7967
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
7968
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
7969
+ };
7970
+ },
7971
+
7972
+ toJSON(message: Data_CosmosCall): unknown {
7973
+ const obj: any = {};
7974
+ if (message.transaction !== undefined) {
7975
+ obj.transaction = message.transaction;
7976
+ }
7977
+ if (message.timestamp !== undefined) {
7978
+ obj.timestamp = message.timestamp.toISOString();
7979
+ }
7980
+ return obj;
7981
+ },
7982
+
7983
+ create(base?: DeepPartial<Data_CosmosCall>): Data_CosmosCall {
7984
+ return Data_CosmosCall.fromPartial(base ?? {});
7985
+ },
7986
+ fromPartial(object: DeepPartial<Data_CosmosCall>): Data_CosmosCall {
7987
+ const message = createBaseData_CosmosCall();
7988
+ message.transaction = object.transaction ?? undefined;
7989
+ message.timestamp = object.timestamp ?? undefined;
7990
+ return message;
7991
+ },
7992
+ };
7993
+
7774
7994
  function createBaseDataBinding(): DataBinding {
7775
7995
  return { data: undefined, handlerType: 0, handlerIds: [] };
7776
7996
  }