@sentio/protos 1.37.4 → 1.37.5-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.
@@ -207,7 +207,6 @@ export interface RawTransaction {
207
207
  slot?: bigint | undefined;
208
208
  }
209
209
  export interface Data {
210
- raw: Uint8Array;
211
210
  ethLog?: Data_EthLog | undefined;
212
211
  ethBlock?: Data_EthBlock | undefined;
213
212
  ethTransaction?: Data_EthTransaction | undefined;
@@ -221,7 +220,10 @@ export interface Data_EthLog {
221
220
  log: {
222
221
  [key: string]: any;
223
222
  } | undefined;
224
- transaction?: Uint8Array | undefined;
223
+ timestamp: Date | undefined;
224
+ transaction?: {
225
+ [key: string]: any;
226
+ } | undefined;
225
227
  }
226
228
  export interface Data_EthBlock {
227
229
  block: {
@@ -232,14 +234,22 @@ export interface Data_EthTransaction {
232
234
  transaction: {
233
235
  [key: string]: any;
234
236
  } | undefined;
235
- transactionReceipt?: Uint8Array | undefined;
237
+ timestamp: Date | undefined;
238
+ transactionReceipt?: {
239
+ [key: string]: any;
240
+ } | undefined;
236
241
  }
237
242
  export interface Data_EthTrace {
238
243
  trace: {
239
244
  [key: string]: any;
240
245
  } | undefined;
241
- transaction?: Uint8Array | undefined;
242
- transactionReceipt?: Uint8Array | undefined;
246
+ timestamp: Date | undefined;
247
+ transaction?: {
248
+ [key: string]: any;
249
+ } | undefined;
250
+ transactionReceipt?: {
251
+ [key: string]: any;
252
+ } | undefined;
243
253
  }
244
254
  export interface Data_SolInstruction {
245
255
  instructionData: string;
@@ -251,12 +261,12 @@ export interface Data_SolInstruction {
251
261
  } | undefined;
252
262
  }
253
263
  export interface Data_AptEvent {
254
- event: {
264
+ transaction: {
255
265
  [key: string]: any;
256
266
  } | undefined;
257
267
  }
258
268
  export interface Data_AptCall {
259
- call: {
269
+ transaction: {
260
270
  [key: string]: any;
261
271
  } | undefined;
262
272
  }
@@ -10,6 +10,7 @@ const long_1 = __importDefault(require("long"));
10
10
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
11
11
  const empty_1 = require("../../google/protobuf/empty");
12
12
  const struct_1 = require("../../google/protobuf/struct");
13
+ const timestamp_1 = require("../../google/protobuf/timestamp");
13
14
  var MetricType;
14
15
  (function (MetricType) {
15
16
  MetricType[MetricType["UNKNOWN_TYPE"] = 0] = "UNKNOWN_TYPE";
@@ -2381,7 +2382,6 @@ exports.RawTransaction = {
2381
2382
  };
2382
2383
  function createBaseData() {
2383
2384
  return {
2384
- raw: new Uint8Array(),
2385
2385
  ethLog: undefined,
2386
2386
  ethBlock: undefined,
2387
2387
  ethTransaction: undefined,
@@ -2394,9 +2394,6 @@ function createBaseData() {
2394
2394
  }
2395
2395
  exports.Data = {
2396
2396
  encode(message, writer = minimal_1.default.Writer.create()) {
2397
- if (message.raw.length !== 0) {
2398
- writer.uint32(10).bytes(message.raw);
2399
- }
2400
2397
  if (message.ethLog !== undefined) {
2401
2398
  exports.Data_EthLog.encode(message.ethLog, writer.uint32(18).fork()).ldelim();
2402
2399
  }
@@ -2430,9 +2427,6 @@ exports.Data = {
2430
2427
  while (reader.pos < end) {
2431
2428
  const tag = reader.uint32();
2432
2429
  switch (tag >>> 3) {
2433
- case 1:
2434
- message.raw = reader.bytes();
2435
- break;
2436
2430
  case 2:
2437
2431
  message.ethLog = exports.Data_EthLog.decode(reader, reader.uint32());
2438
2432
  break;
@@ -2466,7 +2460,6 @@ exports.Data = {
2466
2460
  },
2467
2461
  fromJSON(object) {
2468
2462
  return {
2469
- raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
2470
2463
  ethLog: isSet(object.ethLog) ? exports.Data_EthLog.fromJSON(object.ethLog) : undefined,
2471
2464
  ethBlock: isSet(object.ethBlock) ? exports.Data_EthBlock.fromJSON(object.ethBlock) : undefined,
2472
2465
  ethTransaction: isSet(object.ethTransaction) ? exports.Data_EthTransaction.fromJSON(object.ethTransaction) : undefined,
@@ -2479,7 +2472,6 @@ exports.Data = {
2479
2472
  },
2480
2473
  toJSON(message) {
2481
2474
  const obj = {};
2482
- message.raw !== undefined && (obj.raw = base64FromBytes(message.raw !== undefined ? message.raw : new Uint8Array()));
2483
2475
  message.ethLog !== undefined && (obj.ethLog = message.ethLog ? exports.Data_EthLog.toJSON(message.ethLog) : undefined);
2484
2476
  message.ethBlock !== undefined &&
2485
2477
  (obj.ethBlock = message.ethBlock ? exports.Data_EthBlock.toJSON(message.ethBlock) : undefined);
@@ -2498,7 +2490,6 @@ exports.Data = {
2498
2490
  },
2499
2491
  fromPartial(object) {
2500
2492
  const message = createBaseData();
2501
- message.raw = object.raw ?? new Uint8Array();
2502
2493
  message.ethLog =
2503
2494
  object.ethLog !== undefined && object.ethLog !== null ? exports.Data_EthLog.fromPartial(object.ethLog) : undefined;
2504
2495
  message.ethBlock =
@@ -2525,15 +2516,18 @@ exports.Data = {
2525
2516
  },
2526
2517
  };
2527
2518
  function createBaseData_EthLog() {
2528
- return { log: undefined, transaction: undefined };
2519
+ return { log: undefined, timestamp: undefined, transaction: undefined };
2529
2520
  }
2530
2521
  exports.Data_EthLog = {
2531
2522
  encode(message, writer = minimal_1.default.Writer.create()) {
2532
2523
  if (message.log !== undefined) {
2533
2524
  struct_1.Struct.encode(struct_1.Struct.wrap(message.log), writer.uint32(26).fork()).ldelim();
2534
2525
  }
2526
+ if (message.timestamp !== undefined) {
2527
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(34).fork()).ldelim();
2528
+ }
2535
2529
  if (message.transaction !== undefined) {
2536
- writer.uint32(18).bytes(message.transaction);
2530
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
2537
2531
  }
2538
2532
  return writer;
2539
2533
  },
@@ -2547,8 +2541,11 @@ exports.Data_EthLog = {
2547
2541
  case 3:
2548
2542
  message.log = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2549
2543
  break;
2544
+ case 4:
2545
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2546
+ break;
2550
2547
  case 2:
2551
- message.transaction = reader.bytes();
2548
+ message.transaction = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2552
2549
  break;
2553
2550
  default:
2554
2551
  reader.skipType(tag & 7);
@@ -2560,19 +2557,21 @@ exports.Data_EthLog = {
2560
2557
  fromJSON(object) {
2561
2558
  return {
2562
2559
  log: isObject(object.log) ? object.log : undefined,
2563
- transaction: isSet(object.transaction) ? bytesFromBase64(object.transaction) : undefined,
2560
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
2561
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
2564
2562
  };
2565
2563
  },
2566
2564
  toJSON(message) {
2567
2565
  const obj = {};
2568
2566
  message.log !== undefined && (obj.log = message.log);
2569
- message.transaction !== undefined &&
2570
- (obj.transaction = message.transaction !== undefined ? base64FromBytes(message.transaction) : undefined);
2567
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
2568
+ message.transaction !== undefined && (obj.transaction = message.transaction);
2571
2569
  return obj;
2572
2570
  },
2573
2571
  fromPartial(object) {
2574
2572
  const message = createBaseData_EthLog();
2575
2573
  message.log = object.log ?? undefined;
2574
+ message.timestamp = object.timestamp ?? undefined;
2576
2575
  message.transaction = object.transaction ?? undefined;
2577
2576
  return message;
2578
2577
  },
@@ -2619,15 +2618,18 @@ exports.Data_EthBlock = {
2619
2618
  },
2620
2619
  };
2621
2620
  function createBaseData_EthTransaction() {
2622
- return { transaction: undefined, transactionReceipt: undefined };
2621
+ return { transaction: undefined, timestamp: undefined, transactionReceipt: undefined };
2623
2622
  }
2624
2623
  exports.Data_EthTransaction = {
2625
2624
  encode(message, writer = minimal_1.default.Writer.create()) {
2626
2625
  if (message.transaction !== undefined) {
2627
2626
  struct_1.Struct.encode(struct_1.Struct.wrap(message.transaction), writer.uint32(34).fork()).ldelim();
2628
2627
  }
2628
+ if (message.timestamp !== undefined) {
2629
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
2630
+ }
2629
2631
  if (message.transactionReceipt !== undefined) {
2630
- writer.uint32(26).bytes(message.transactionReceipt);
2632
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transactionReceipt), writer.uint32(26).fork()).ldelim();
2631
2633
  }
2632
2634
  return writer;
2633
2635
  },
@@ -2641,8 +2643,11 @@ exports.Data_EthTransaction = {
2641
2643
  case 4:
2642
2644
  message.transaction = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2643
2645
  break;
2646
+ case 5:
2647
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2648
+ break;
2644
2649
  case 3:
2645
- message.transactionReceipt = reader.bytes();
2650
+ message.transactionReceipt = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2646
2651
  break;
2647
2652
  default:
2648
2653
  reader.skipType(tag & 7);
@@ -2654,37 +2659,41 @@ exports.Data_EthTransaction = {
2654
2659
  fromJSON(object) {
2655
2660
  return {
2656
2661
  transaction: isObject(object.transaction) ? object.transaction : undefined,
2657
- transactionReceipt: isSet(object.transactionReceipt) ? bytesFromBase64(object.transactionReceipt) : undefined,
2662
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
2663
+ transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
2658
2664
  };
2659
2665
  },
2660
2666
  toJSON(message) {
2661
2667
  const obj = {};
2662
2668
  message.transaction !== undefined && (obj.transaction = message.transaction);
2663
- message.transactionReceipt !== undefined &&
2664
- (obj.transactionReceipt =
2665
- message.transactionReceipt !== undefined ? base64FromBytes(message.transactionReceipt) : undefined);
2669
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
2670
+ message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt);
2666
2671
  return obj;
2667
2672
  },
2668
2673
  fromPartial(object) {
2669
2674
  const message = createBaseData_EthTransaction();
2670
2675
  message.transaction = object.transaction ?? undefined;
2676
+ message.timestamp = object.timestamp ?? undefined;
2671
2677
  message.transactionReceipt = object.transactionReceipt ?? undefined;
2672
2678
  return message;
2673
2679
  },
2674
2680
  };
2675
2681
  function createBaseData_EthTrace() {
2676
- return { trace: undefined, transaction: undefined, transactionReceipt: undefined };
2682
+ return { trace: undefined, timestamp: undefined, transaction: undefined, transactionReceipt: undefined };
2677
2683
  }
2678
2684
  exports.Data_EthTrace = {
2679
2685
  encode(message, writer = minimal_1.default.Writer.create()) {
2680
2686
  if (message.trace !== undefined) {
2681
2687
  struct_1.Struct.encode(struct_1.Struct.wrap(message.trace), writer.uint32(34).fork()).ldelim();
2682
2688
  }
2689
+ if (message.timestamp !== undefined) {
2690
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
2691
+ }
2683
2692
  if (message.transaction !== undefined) {
2684
- writer.uint32(18).bytes(message.transaction);
2693
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
2685
2694
  }
2686
2695
  if (message.transactionReceipt !== undefined) {
2687
- writer.uint32(26).bytes(message.transactionReceipt);
2696
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transactionReceipt), writer.uint32(26).fork()).ldelim();
2688
2697
  }
2689
2698
  return writer;
2690
2699
  },
@@ -2698,11 +2707,14 @@ exports.Data_EthTrace = {
2698
2707
  case 4:
2699
2708
  message.trace = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2700
2709
  break;
2710
+ case 5:
2711
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
2712
+ break;
2701
2713
  case 2:
2702
- message.transaction = reader.bytes();
2714
+ message.transaction = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2703
2715
  break;
2704
2716
  case 3:
2705
- message.transactionReceipt = reader.bytes();
2717
+ message.transactionReceipt = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2706
2718
  break;
2707
2719
  default:
2708
2720
  reader.skipType(tag & 7);
@@ -2714,23 +2726,23 @@ exports.Data_EthTrace = {
2714
2726
  fromJSON(object) {
2715
2727
  return {
2716
2728
  trace: isObject(object.trace) ? object.trace : undefined,
2717
- transaction: isSet(object.transaction) ? bytesFromBase64(object.transaction) : undefined,
2718
- transactionReceipt: isSet(object.transactionReceipt) ? bytesFromBase64(object.transactionReceipt) : undefined,
2729
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
2730
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
2731
+ transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
2719
2732
  };
2720
2733
  },
2721
2734
  toJSON(message) {
2722
2735
  const obj = {};
2723
2736
  message.trace !== undefined && (obj.trace = message.trace);
2724
- message.transaction !== undefined &&
2725
- (obj.transaction = message.transaction !== undefined ? base64FromBytes(message.transaction) : undefined);
2726
- message.transactionReceipt !== undefined &&
2727
- (obj.transactionReceipt =
2728
- message.transactionReceipt !== undefined ? base64FromBytes(message.transactionReceipt) : undefined);
2737
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
2738
+ message.transaction !== undefined && (obj.transaction = message.transaction);
2739
+ message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt);
2729
2740
  return obj;
2730
2741
  },
2731
2742
  fromPartial(object) {
2732
2743
  const message = createBaseData_EthTrace();
2733
2744
  message.trace = object.trace ?? undefined;
2745
+ message.timestamp = object.timestamp ?? undefined;
2734
2746
  message.transaction = object.transaction ?? undefined;
2735
2747
  message.transactionReceipt = object.transactionReceipt ?? undefined;
2736
2748
  return message;
@@ -2821,12 +2833,12 @@ exports.Data_SolInstruction = {
2821
2833
  },
2822
2834
  };
2823
2835
  function createBaseData_AptEvent() {
2824
- return { event: undefined };
2836
+ return { transaction: undefined };
2825
2837
  }
2826
2838
  exports.Data_AptEvent = {
2827
2839
  encode(message, writer = minimal_1.default.Writer.create()) {
2828
- if (message.event !== undefined) {
2829
- struct_1.Struct.encode(struct_1.Struct.wrap(message.event), writer.uint32(18).fork()).ldelim();
2840
+ if (message.transaction !== undefined) {
2841
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
2830
2842
  }
2831
2843
  return writer;
2832
2844
  },
@@ -2838,7 +2850,7 @@ exports.Data_AptEvent = {
2838
2850
  const tag = reader.uint32();
2839
2851
  switch (tag >>> 3) {
2840
2852
  case 2:
2841
- message.event = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2853
+ message.transaction = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2842
2854
  break;
2843
2855
  default:
2844
2856
  reader.skipType(tag & 7);
@@ -2848,26 +2860,26 @@ exports.Data_AptEvent = {
2848
2860
  return message;
2849
2861
  },
2850
2862
  fromJSON(object) {
2851
- return { event: isObject(object.event) ? object.event : undefined };
2863
+ return { transaction: isObject(object.transaction) ? object.transaction : undefined };
2852
2864
  },
2853
2865
  toJSON(message) {
2854
2866
  const obj = {};
2855
- message.event !== undefined && (obj.event = message.event);
2867
+ message.transaction !== undefined && (obj.transaction = message.transaction);
2856
2868
  return obj;
2857
2869
  },
2858
2870
  fromPartial(object) {
2859
2871
  const message = createBaseData_AptEvent();
2860
- message.event = object.event ?? undefined;
2872
+ message.transaction = object.transaction ?? undefined;
2861
2873
  return message;
2862
2874
  },
2863
2875
  };
2864
2876
  function createBaseData_AptCall() {
2865
- return { call: undefined };
2877
+ return { transaction: undefined };
2866
2878
  }
2867
2879
  exports.Data_AptCall = {
2868
2880
  encode(message, writer = minimal_1.default.Writer.create()) {
2869
- if (message.call !== undefined) {
2870
- struct_1.Struct.encode(struct_1.Struct.wrap(message.call), writer.uint32(18).fork()).ldelim();
2881
+ if (message.transaction !== undefined) {
2882
+ struct_1.Struct.encode(struct_1.Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
2871
2883
  }
2872
2884
  return writer;
2873
2885
  },
@@ -2879,7 +2891,7 @@ exports.Data_AptCall = {
2879
2891
  const tag = reader.uint32();
2880
2892
  switch (tag >>> 3) {
2881
2893
  case 2:
2882
- message.call = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2894
+ message.transaction = struct_1.Struct.unwrap(struct_1.Struct.decode(reader, reader.uint32()));
2883
2895
  break;
2884
2896
  default:
2885
2897
  reader.skipType(tag & 7);
@@ -2889,16 +2901,16 @@ exports.Data_AptCall = {
2889
2901
  return message;
2890
2902
  },
2891
2903
  fromJSON(object) {
2892
- return { call: isObject(object.call) ? object.call : undefined };
2904
+ return { transaction: isObject(object.transaction) ? object.transaction : undefined };
2893
2905
  },
2894
2906
  toJSON(message) {
2895
2907
  const obj = {};
2896
- message.call !== undefined && (obj.call = message.call);
2908
+ message.transaction !== undefined && (obj.transaction = message.transaction);
2897
2909
  return obj;
2898
2910
  },
2899
2911
  fromPartial(object) {
2900
2912
  const message = createBaseData_AptCall();
2901
- message.call = object.call ?? undefined;
2913
+ message.transaction = object.transaction ?? undefined;
2902
2914
  return message;
2903
2915
  },
2904
2916
  };
@@ -3974,6 +3986,27 @@ function base64FromBytes(arr) {
3974
3986
  return tsProtoGlobalThis.btoa(bin.join(''));
3975
3987
  }
3976
3988
  }
3989
+ function toTimestamp(date) {
3990
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
3991
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
3992
+ return { seconds, nanos };
3993
+ }
3994
+ function fromTimestamp(t) {
3995
+ let millis = Number(t.seconds.toString()) * 1_000;
3996
+ millis += t.nanos / 1_000_000;
3997
+ return new Date(millis);
3998
+ }
3999
+ function fromJsonTimestamp(o) {
4000
+ if (o instanceof Date) {
4001
+ return o;
4002
+ }
4003
+ else if (typeof o === 'string') {
4004
+ return new Date(o);
4005
+ }
4006
+ else {
4007
+ return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
4008
+ }
4009
+ }
3977
4010
  function longToBigint(long) {
3978
4011
  return BigInt(long.toString());
3979
4012
  }