@sentio/runtime 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.
@@ -1 +1 @@
1
- {"version":3,"file":"service.test.js","sourceRoot":"","sources":["../src/service.test.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,iDAAyD;AAEzD,2CAAwE;AACxE,qCAAgD;AAChD,+BAA6B;AAEhB,QAAA,YAAY,GAA6B,EAAE,CAAA;AAExD,gBAAgB;AAChB,MAAM,UAAW,SAAQ,eAAM;IAC7B,KAAK,CAAC,cAAc,CAAC,OAAoB;QACvC,IAAI,OAAO,CAAC,WAAW,KAAK,oBAAW,CAAC,OAAO,EAAE;YAC/C,IAAA,aAAM,EAAC,OAAO,CAAC,IAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;SACrC;QACD,OAAO,sBAAa,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACtC,CAAC;IACD,iBAAiB,GAAG,CAAC,oBAAW,CAAC,OAAO,CAAC,CAAA;CAC1C;AAED,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,MAAM,WAAW,GAAG,IAAI,8BAAoB,CAAC,GAAG,EAAE;QAChD,sBAAa,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAE,CAAA;QACnC,sBAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,UAAU,EAAE,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,IAAI,uCAAwB,CAAC,WAAW,CAAC,CAAA;IAEzD,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,oBAAY,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,QAAQ,GAAgB;YAC5B,IAAI,EAAE;gBACJ,GAAG,EAAE,IAAI,UAAU,EAAE;gBACrB,QAAQ,EAAE;oBACR,KAAK,EAAE;wBACL,MAAM,EAAE,KAAK;qBACd;iBACF;aACF;YACD,WAAW,EAAE,oBAAW,CAAC,OAAO;YAChC,UAAU,EAAE,CAAC,CAAC,CAAC;SAChB,CAAA;QAED,MAAM,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAY,CAAC,CAAA;IACvE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { ProcessorServiceImpl } from './service'\nimport { FullProcessorServiceImpl } from './full-service'\nimport { CallContext } from 'nice-grpc-common'\nimport { DataBinding, HandlerType, ProcessResult } from '@sentio/protos'\nimport { Plugin, PluginManager } from './plugin'\nimport { assert } from 'chai'\n\nexport const TEST_CONTEXT: CallContext = <CallContext>{}\n\n// TODO use mock\nclass TestPlugin extends Plugin {\n async processBinding(request: DataBinding): Promise<ProcessResult> {\n if (request.handlerType === HandlerType.UNKNOWN) {\n assert(request.data!.raw.length > 0)\n }\n return ProcessResult.fromPartial({})\n }\n supportedHandlers = [HandlerType.UNKNOWN]\n}\n\ndescribe('Test Service Compatibility', () => {\n const baseService = new ProcessorServiceImpl(() => {\n PluginManager.INSTANCE.plugins = []\n PluginManager.INSTANCE.register(new TestPlugin())\n })\n const service = new FullProcessorServiceImpl(baseService)\n\n beforeAll(async () => {\n await service.start({ templateInstances: [] }, TEST_CONTEXT)\n })\n\n test('Check tictactoe transaction dispatch', async () => {\n const binding1: DataBinding = {\n data: {\n raw: new Uint8Array(),\n ethBlock: {\n block: {\n number: '0x1',\n },\n },\n },\n handlerType: HandlerType.UNKNOWN,\n handlerIds: [0],\n }\n\n await service.processBindings({ bindings: [binding1] }, TEST_CONTEXT)\n })\n})\n"]}
1
+ {"version":3,"file":"service.test.js","sourceRoot":"","sources":["../src/service.test.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,iDAAyD;AAEzD,gEAA0F;AAC1F,qCAAgD;AAChD,+BAA6B;AAEhB,QAAA,YAAY,GAA6B,EAAE,CAAA;AAExD,gBAAgB;AAChB,MAAM,UAAW,SAAQ,eAAM;IAC7B,KAAK,CAAC,cAAc,CAAC,OAAoB;QACvC,IAAI,OAAO,CAAC,WAAW,KAAK,uBAAW,CAAC,OAAO,EAAE;YAC/C,IAAA,aAAM,EAAC,OAAO,CAAC,IAAK,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;SACrC;QACD,OAAO,yBAAa,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACtC,CAAC;IACD,iBAAiB,GAAG,CAAC,uBAAW,CAAC,OAAO,CAAC,CAAA;CAC1C;AAED,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,MAAM,WAAW,GAAG,IAAI,8BAAoB,CAAC,GAAG,EAAE;QAChD,sBAAa,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAE,CAAA;QACnC,sBAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,UAAU,EAAE,CAAC,CAAA;IACnD,CAAC,CAAC,CAAA;IACF,MAAM,OAAO,GAAG,IAAI,uCAAwB,CAAC,WAAW,CAAC,CAAA;IAEzD,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,OAAO,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,oBAAY,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,QAAQ,GAAgB;YAC5B,IAAI,EAAE;gBACJ,GAAG,EAAE,IAAI,UAAU,EAAE;gBACrB,QAAQ,EAAE;oBACR,KAAK,EAAE;wBACL,MAAM,EAAE,KAAK;qBACd;iBACF;aACF;YACD,WAAW,EAAE,uBAAW,CAAC,OAAO;YAChC,UAAU,EAAE,CAAC,CAAC,CAAC;SAChB,CAAA;QAED,MAAM,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,oBAAY,CAAC,CAAA;IACvE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { ProcessorServiceImpl } from './service'\nimport { FullProcessorServiceImpl } from './full-service'\nimport { CallContext } from 'nice-grpc-common'\nimport { DataBinding, HandlerType, ProcessResult } from './gen/processor/protos/processor'\nimport { Plugin, PluginManager } from './plugin'\nimport { assert } from 'chai'\n\nexport const TEST_CONTEXT: CallContext = <CallContext>{}\n\n// TODO use mock\nclass TestPlugin extends Plugin {\n async processBinding(request: DataBinding): Promise<ProcessResult> {\n if (request.handlerType === HandlerType.UNKNOWN) {\n assert(request.data!.raw.length > 0)\n }\n return ProcessResult.fromPartial({})\n }\n supportedHandlers = [HandlerType.UNKNOWN]\n}\n\ndescribe('Test Service Compatibility', () => {\n const baseService = new ProcessorServiceImpl(() => {\n PluginManager.INSTANCE.plugins = []\n PluginManager.INSTANCE.register(new TestPlugin())\n })\n const service = new FullProcessorServiceImpl(baseService)\n\n beforeAll(async () => {\n await service.start({ templateInstances: [] }, TEST_CONTEXT)\n })\n\n test('Check tictactoe transaction dispatch', async () => {\n const binding1: DataBinding = {\n data: {\n raw: new Uint8Array(),\n ethBlock: {\n block: {\n number: '0x1',\n },\n },\n },\n handlerType: HandlerType.UNKNOWN,\n handlerIds: [0],\n }\n\n await service.processBindings({ bindings: [binding1] }, TEST_CONTEXT)\n })\n})\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
3
  "license": "Apache-2.0",
4
- "version": "1.37.4",
4
+ "version": "1.37.5-rc.2",
5
5
  "scripts": {
6
6
  "compile": "tsc -p .",
7
7
  "build": "yarn compile",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@ethersproject/providers": "~5.7.0",
13
- "@sentio/protos": "^1.37.4",
13
+ "@sentio/protos": "^1.37.5-rc.2",
14
14
  "bignumber.js": "^9.1.0",
15
15
  "command-line-args": "^5.2.1",
16
16
  "command-line-usage": "^6.1.3",
@@ -46,5 +46,5 @@
46
46
  "!{lib,src}/tests",
47
47
  "!**/*.test.{js,ts}"
48
48
  ],
49
- "gitHead": "3eb53f4125983b37e81ea4160eee95c1932ce965"
49
+ "gitHead": "26f28749e1de41e65a086063d325ef4c96c4ec6a"
50
50
  }
@@ -1,91 +1,86 @@
1
1
  /* eslint-disable */
2
- import Long from 'long'
3
- import _m0 from 'protobufjs/minimal'
2
+ import Long from "long";
3
+ import _m0 from "protobufjs/minimal";
4
4
 
5
5
  export interface Timestamp {
6
- seconds: bigint
7
- nanos: number
6
+ seconds: bigint;
7
+ nanos: number;
8
8
  }
9
9
 
10
10
  function createBaseTimestamp(): Timestamp {
11
- return { seconds: BigInt('0'), nanos: 0 }
11
+ return { seconds: BigInt("0"), nanos: 0 };
12
12
  }
13
13
 
14
14
  export const Timestamp = {
15
15
  encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16
- if (message.seconds !== BigInt('0')) {
17
- writer.uint32(8).int64(message.seconds.toString())
16
+ if (message.seconds !== BigInt("0")) {
17
+ writer.uint32(8).int64(message.seconds.toString());
18
18
  }
19
19
  if (message.nanos !== 0) {
20
- writer.uint32(16).int32(message.nanos)
20
+ writer.uint32(16).int32(message.nanos);
21
21
  }
22
- return writer
22
+ return writer;
23
23
  },
24
24
 
25
25
  decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {
26
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input)
27
- let end = length === undefined ? reader.len : reader.pos + length
28
- const message = createBaseTimestamp()
26
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseTimestamp();
29
29
  while (reader.pos < end) {
30
- const tag = reader.uint32()
30
+ const tag = reader.uint32();
31
31
  switch (tag >>> 3) {
32
32
  case 1:
33
- message.seconds = longToBigint(reader.int64() as Long)
34
- break
33
+ message.seconds = longToBigint(reader.int64() as Long);
34
+ break;
35
35
  case 2:
36
- message.nanos = reader.int32()
37
- break
36
+ message.nanos = reader.int32();
37
+ break;
38
38
  default:
39
- reader.skipType(tag & 7)
40
- break
39
+ reader.skipType(tag & 7);
40
+ break;
41
41
  }
42
42
  }
43
- return message
43
+ return message;
44
44
  },
45
45
 
46
46
  fromJSON(object: any): Timestamp {
47
47
  return {
48
- seconds: isSet(object.seconds) ? BigInt(object.seconds) : BigInt('0'),
48
+ seconds: isSet(object.seconds) ? BigInt(object.seconds) : BigInt("0"),
49
49
  nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
50
- }
50
+ };
51
51
  },
52
52
 
53
53
  toJSON(message: Timestamp): unknown {
54
- const obj: any = {}
55
- message.seconds !== undefined && (obj.seconds = message.seconds.toString())
56
- message.nanos !== undefined && (obj.nanos = Math.round(message.nanos))
57
- return obj
54
+ const obj: any = {};
55
+ message.seconds !== undefined && (obj.seconds = message.seconds.toString());
56
+ message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
57
+ return obj;
58
58
  },
59
59
 
60
60
  fromPartial(object: DeepPartial<Timestamp>): Timestamp {
61
- const message = createBaseTimestamp()
62
- message.seconds = object.seconds ?? BigInt('0')
63
- message.nanos = object.nanos ?? 0
64
- return message
61
+ const message = createBaseTimestamp();
62
+ message.seconds = object.seconds ?? BigInt("0");
63
+ message.nanos = object.nanos ?? 0;
64
+ return message;
65
65
  },
66
- }
66
+ };
67
67
 
68
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined
68
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
69
69
 
70
- type DeepPartial<T> = T extends Builtin
71
- ? T
72
- : T extends Array<infer U>
73
- ? Array<DeepPartial<U>>
74
- : T extends ReadonlyArray<infer U>
75
- ? ReadonlyArray<DeepPartial<U>>
76
- : T extends {}
77
- ? { [K in keyof T]?: DeepPartial<T[K]> }
78
- : Partial<T>
70
+ type DeepPartial<T> = T extends Builtin ? T
71
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
72
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
73
+ : Partial<T>;
79
74
 
80
75
  function longToBigint(long: Long) {
81
- return BigInt(long.toString())
76
+ return BigInt(long.toString());
82
77
  }
83
78
 
84
79
  if (_m0.util.Long !== Long) {
85
- _m0.util.Long = Long as any
86
- _m0.configure()
80
+ _m0.util.Long = Long as any;
81
+ _m0.configure();
87
82
  }
88
83
 
89
84
  function isSet(value: any): boolean {
90
- return value !== null && value !== undefined
85
+ return value !== null && value !== undefined;
91
86
  }
@@ -4,6 +4,7 @@ import type { CallContext, CallOptions } from "nice-grpc-common";
4
4
  import _m0 from "protobufjs/minimal";
5
5
  import { Empty } from "../../google/protobuf/empty";
6
6
  import { Struct } from "../../google/protobuf/struct";
7
+ import { Timestamp } from "../../google/protobuf/timestamp";
7
8
 
8
9
  export enum MetricType {
9
10
  UNKNOWN_TYPE = 0,
@@ -462,6 +463,7 @@ export interface RawTransaction {
462
463
  }
463
464
 
464
465
  export interface Data {
466
+ /** @deprecated */
465
467
  raw: Uint8Array;
466
468
  ethLog?: Data_EthLog | undefined;
467
469
  ethBlock?: Data_EthBlock | undefined;
@@ -475,7 +477,8 @@ export interface Data {
475
477
 
476
478
  export interface Data_EthLog {
477
479
  log: { [key: string]: any } | undefined;
478
- transaction?: Uint8Array | undefined;
480
+ timestamp: Date | undefined;
481
+ transaction?: { [key: string]: any } | undefined;
479
482
  }
480
483
 
481
484
  export interface Data_EthBlock {
@@ -484,13 +487,15 @@ export interface Data_EthBlock {
484
487
 
485
488
  export interface Data_EthTransaction {
486
489
  transaction: { [key: string]: any } | undefined;
487
- transactionReceipt?: Uint8Array | undefined;
490
+ timestamp: Date | undefined;
491
+ transactionReceipt?: { [key: string]: any } | undefined;
488
492
  }
489
493
 
490
494
  export interface Data_EthTrace {
491
495
  trace: { [key: string]: any } | undefined;
492
- transaction?: Uint8Array | undefined;
493
- transactionReceipt?: Uint8Array | undefined;
496
+ timestamp: Date | undefined;
497
+ transaction?: { [key: string]: any } | undefined;
498
+ transactionReceipt?: { [key: string]: any } | undefined;
494
499
  }
495
500
 
496
501
  export interface Data_SolInstruction {
@@ -502,11 +507,11 @@ export interface Data_SolInstruction {
502
507
  }
503
508
 
504
509
  export interface Data_AptEvent {
505
- event: { [key: string]: any } | undefined;
510
+ transaction: { [key: string]: any } | undefined;
506
511
  }
507
512
 
508
513
  export interface Data_AptCall {
509
- call: { [key: string]: any } | undefined;
514
+ transaction: { [key: string]: any } | undefined;
510
515
  }
511
516
 
512
517
  export interface Data_AptResource {
@@ -2992,7 +2997,7 @@ export const Data = {
2992
2997
  };
2993
2998
 
2994
2999
  function createBaseData_EthLog(): Data_EthLog {
2995
- return { log: undefined, transaction: undefined };
3000
+ return { log: undefined, timestamp: undefined, transaction: undefined };
2996
3001
  }
2997
3002
 
2998
3003
  export const Data_EthLog = {
@@ -3000,8 +3005,11 @@ export const Data_EthLog = {
3000
3005
  if (message.log !== undefined) {
3001
3006
  Struct.encode(Struct.wrap(message.log), writer.uint32(26).fork()).ldelim();
3002
3007
  }
3008
+ if (message.timestamp !== undefined) {
3009
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(34).fork()).ldelim();
3010
+ }
3003
3011
  if (message.transaction !== undefined) {
3004
- writer.uint32(18).bytes(message.transaction);
3012
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
3005
3013
  }
3006
3014
  return writer;
3007
3015
  },
@@ -3016,8 +3024,11 @@ export const Data_EthLog = {
3016
3024
  case 3:
3017
3025
  message.log = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3018
3026
  break;
3027
+ case 4:
3028
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3029
+ break;
3019
3030
  case 2:
3020
- message.transaction = reader.bytes();
3031
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3021
3032
  break;
3022
3033
  default:
3023
3034
  reader.skipType(tag & 7);
@@ -3030,21 +3041,23 @@ export const Data_EthLog = {
3030
3041
  fromJSON(object: any): Data_EthLog {
3031
3042
  return {
3032
3043
  log: isObject(object.log) ? object.log : undefined,
3033
- transaction: isSet(object.transaction) ? bytesFromBase64(object.transaction) : undefined,
3044
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
3045
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
3034
3046
  };
3035
3047
  },
3036
3048
 
3037
3049
  toJSON(message: Data_EthLog): unknown {
3038
3050
  const obj: any = {};
3039
3051
  message.log !== undefined && (obj.log = message.log);
3040
- message.transaction !== undefined &&
3041
- (obj.transaction = message.transaction !== undefined ? base64FromBytes(message.transaction) : undefined);
3052
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
3053
+ message.transaction !== undefined && (obj.transaction = message.transaction);
3042
3054
  return obj;
3043
3055
  },
3044
3056
 
3045
3057
  fromPartial(object: DeepPartial<Data_EthLog>): Data_EthLog {
3046
3058
  const message = createBaseData_EthLog();
3047
3059
  message.log = object.log ?? undefined;
3060
+ message.timestamp = object.timestamp ?? undefined;
3048
3061
  message.transaction = object.transaction ?? undefined;
3049
3062
  return message;
3050
3063
  },
@@ -3098,7 +3111,7 @@ export const Data_EthBlock = {
3098
3111
  };
3099
3112
 
3100
3113
  function createBaseData_EthTransaction(): Data_EthTransaction {
3101
- return { transaction: undefined, transactionReceipt: undefined };
3114
+ return { transaction: undefined, timestamp: undefined, transactionReceipt: undefined };
3102
3115
  }
3103
3116
 
3104
3117
  export const Data_EthTransaction = {
@@ -3106,8 +3119,11 @@ export const Data_EthTransaction = {
3106
3119
  if (message.transaction !== undefined) {
3107
3120
  Struct.encode(Struct.wrap(message.transaction), writer.uint32(34).fork()).ldelim();
3108
3121
  }
3122
+ if (message.timestamp !== undefined) {
3123
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
3124
+ }
3109
3125
  if (message.transactionReceipt !== undefined) {
3110
- writer.uint32(26).bytes(message.transactionReceipt);
3126
+ Struct.encode(Struct.wrap(message.transactionReceipt), writer.uint32(26).fork()).ldelim();
3111
3127
  }
3112
3128
  return writer;
3113
3129
  },
@@ -3122,8 +3138,11 @@ export const Data_EthTransaction = {
3122
3138
  case 4:
3123
3139
  message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3124
3140
  break;
3141
+ case 5:
3142
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3143
+ break;
3125
3144
  case 3:
3126
- message.transactionReceipt = reader.bytes();
3145
+ message.transactionReceipt = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3127
3146
  break;
3128
3147
  default:
3129
3148
  reader.skipType(tag & 7);
@@ -3136,29 +3155,30 @@ export const Data_EthTransaction = {
3136
3155
  fromJSON(object: any): Data_EthTransaction {
3137
3156
  return {
3138
3157
  transaction: isObject(object.transaction) ? object.transaction : undefined,
3139
- transactionReceipt: isSet(object.transactionReceipt) ? bytesFromBase64(object.transactionReceipt) : undefined,
3158
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
3159
+ transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
3140
3160
  };
3141
3161
  },
3142
3162
 
3143
3163
  toJSON(message: Data_EthTransaction): unknown {
3144
3164
  const obj: any = {};
3145
3165
  message.transaction !== undefined && (obj.transaction = message.transaction);
3146
- message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt !== undefined
3147
- ? base64FromBytes(message.transactionReceipt)
3148
- : undefined);
3166
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
3167
+ message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt);
3149
3168
  return obj;
3150
3169
  },
3151
3170
 
3152
3171
  fromPartial(object: DeepPartial<Data_EthTransaction>): Data_EthTransaction {
3153
3172
  const message = createBaseData_EthTransaction();
3154
3173
  message.transaction = object.transaction ?? undefined;
3174
+ message.timestamp = object.timestamp ?? undefined;
3155
3175
  message.transactionReceipt = object.transactionReceipt ?? undefined;
3156
3176
  return message;
3157
3177
  },
3158
3178
  };
3159
3179
 
3160
3180
  function createBaseData_EthTrace(): Data_EthTrace {
3161
- return { trace: undefined, transaction: undefined, transactionReceipt: undefined };
3181
+ return { trace: undefined, timestamp: undefined, transaction: undefined, transactionReceipt: undefined };
3162
3182
  }
3163
3183
 
3164
3184
  export const Data_EthTrace = {
@@ -3166,11 +3186,14 @@ export const Data_EthTrace = {
3166
3186
  if (message.trace !== undefined) {
3167
3187
  Struct.encode(Struct.wrap(message.trace), writer.uint32(34).fork()).ldelim();
3168
3188
  }
3189
+ if (message.timestamp !== undefined) {
3190
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
3191
+ }
3169
3192
  if (message.transaction !== undefined) {
3170
- writer.uint32(18).bytes(message.transaction);
3193
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
3171
3194
  }
3172
3195
  if (message.transactionReceipt !== undefined) {
3173
- writer.uint32(26).bytes(message.transactionReceipt);
3196
+ Struct.encode(Struct.wrap(message.transactionReceipt), writer.uint32(26).fork()).ldelim();
3174
3197
  }
3175
3198
  return writer;
3176
3199
  },
@@ -3185,11 +3208,14 @@ export const Data_EthTrace = {
3185
3208
  case 4:
3186
3209
  message.trace = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3187
3210
  break;
3211
+ case 5:
3212
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3213
+ break;
3188
3214
  case 2:
3189
- message.transaction = reader.bytes();
3215
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3190
3216
  break;
3191
3217
  case 3:
3192
- message.transactionReceipt = reader.bytes();
3218
+ message.transactionReceipt = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3193
3219
  break;
3194
3220
  default:
3195
3221
  reader.skipType(tag & 7);
@@ -3202,25 +3228,25 @@ export const Data_EthTrace = {
3202
3228
  fromJSON(object: any): Data_EthTrace {
3203
3229
  return {
3204
3230
  trace: isObject(object.trace) ? object.trace : undefined,
3205
- transaction: isSet(object.transaction) ? bytesFromBase64(object.transaction) : undefined,
3206
- transactionReceipt: isSet(object.transactionReceipt) ? bytesFromBase64(object.transactionReceipt) : undefined,
3231
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
3232
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
3233
+ transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
3207
3234
  };
3208
3235
  },
3209
3236
 
3210
3237
  toJSON(message: Data_EthTrace): unknown {
3211
3238
  const obj: any = {};
3212
3239
  message.trace !== undefined && (obj.trace = message.trace);
3213
- message.transaction !== undefined &&
3214
- (obj.transaction = message.transaction !== undefined ? base64FromBytes(message.transaction) : undefined);
3215
- message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt !== undefined
3216
- ? base64FromBytes(message.transactionReceipt)
3217
- : undefined);
3240
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
3241
+ message.transaction !== undefined && (obj.transaction = message.transaction);
3242
+ message.transactionReceipt !== undefined && (obj.transactionReceipt = message.transactionReceipt);
3218
3243
  return obj;
3219
3244
  },
3220
3245
 
3221
3246
  fromPartial(object: DeepPartial<Data_EthTrace>): Data_EthTrace {
3222
3247
  const message = createBaseData_EthTrace();
3223
3248
  message.trace = object.trace ?? undefined;
3249
+ message.timestamp = object.timestamp ?? undefined;
3224
3250
  message.transaction = object.transaction ?? undefined;
3225
3251
  message.transactionReceipt = object.transactionReceipt ?? undefined;
3226
3252
  return message;
@@ -3317,13 +3343,13 @@ export const Data_SolInstruction = {
3317
3343
  };
3318
3344
 
3319
3345
  function createBaseData_AptEvent(): Data_AptEvent {
3320
- return { event: undefined };
3346
+ return { transaction: undefined };
3321
3347
  }
3322
3348
 
3323
3349
  export const Data_AptEvent = {
3324
3350
  encode(message: Data_AptEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3325
- if (message.event !== undefined) {
3326
- Struct.encode(Struct.wrap(message.event), writer.uint32(18).fork()).ldelim();
3351
+ if (message.transaction !== undefined) {
3352
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
3327
3353
  }
3328
3354
  return writer;
3329
3355
  },
@@ -3336,7 +3362,7 @@ export const Data_AptEvent = {
3336
3362
  const tag = reader.uint32();
3337
3363
  switch (tag >>> 3) {
3338
3364
  case 2:
3339
- message.event = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3365
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3340
3366
  break;
3341
3367
  default:
3342
3368
  reader.skipType(tag & 7);
@@ -3347,30 +3373,30 @@ export const Data_AptEvent = {
3347
3373
  },
3348
3374
 
3349
3375
  fromJSON(object: any): Data_AptEvent {
3350
- return { event: isObject(object.event) ? object.event : undefined };
3376
+ return { transaction: isObject(object.transaction) ? object.transaction : undefined };
3351
3377
  },
3352
3378
 
3353
3379
  toJSON(message: Data_AptEvent): unknown {
3354
3380
  const obj: any = {};
3355
- message.event !== undefined && (obj.event = message.event);
3381
+ message.transaction !== undefined && (obj.transaction = message.transaction);
3356
3382
  return obj;
3357
3383
  },
3358
3384
 
3359
3385
  fromPartial(object: DeepPartial<Data_AptEvent>): Data_AptEvent {
3360
3386
  const message = createBaseData_AptEvent();
3361
- message.event = object.event ?? undefined;
3387
+ message.transaction = object.transaction ?? undefined;
3362
3388
  return message;
3363
3389
  },
3364
3390
  };
3365
3391
 
3366
3392
  function createBaseData_AptCall(): Data_AptCall {
3367
- return { call: undefined };
3393
+ return { transaction: undefined };
3368
3394
  }
3369
3395
 
3370
3396
  export const Data_AptCall = {
3371
3397
  encode(message: Data_AptCall, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3372
- if (message.call !== undefined) {
3373
- Struct.encode(Struct.wrap(message.call), writer.uint32(18).fork()).ldelim();
3398
+ if (message.transaction !== undefined) {
3399
+ Struct.encode(Struct.wrap(message.transaction), writer.uint32(18).fork()).ldelim();
3374
3400
  }
3375
3401
  return writer;
3376
3402
  },
@@ -3383,7 +3409,7 @@ export const Data_AptCall = {
3383
3409
  const tag = reader.uint32();
3384
3410
  switch (tag >>> 3) {
3385
3411
  case 2:
3386
- message.call = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3412
+ message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3387
3413
  break;
3388
3414
  default:
3389
3415
  reader.skipType(tag & 7);
@@ -3394,18 +3420,18 @@ export const Data_AptCall = {
3394
3420
  },
3395
3421
 
3396
3422
  fromJSON(object: any): Data_AptCall {
3397
- return { call: isObject(object.call) ? object.call : undefined };
3423
+ return { transaction: isObject(object.transaction) ? object.transaction : undefined };
3398
3424
  },
3399
3425
 
3400
3426
  toJSON(message: Data_AptCall): unknown {
3401
3427
  const obj: any = {};
3402
- message.call !== undefined && (obj.call = message.call);
3428
+ message.transaction !== undefined && (obj.transaction = message.transaction);
3403
3429
  return obj;
3404
3430
  },
3405
3431
 
3406
3432
  fromPartial(object: DeepPartial<Data_AptCall>): Data_AptCall {
3407
3433
  const message = createBaseData_AptCall();
3408
- message.call = object.call ?? undefined;
3434
+ message.transaction = object.transaction ?? undefined;
3409
3435
  return message;
3410
3436
  },
3411
3437
  };
@@ -4456,7 +4482,7 @@ export const ExportResult = {
4456
4482
  export type ProcessorDefinition = typeof ProcessorDefinition;
4457
4483
  export const ProcessorDefinition = {
4458
4484
  name: "Processor",
4459
- fullName: "processor.Processor",
4485
+ fullName: "processor_full.Processor",
4460
4486
  methods: {
4461
4487
  start: {
4462
4488
  name: "Start",
@@ -4586,6 +4612,28 @@ type DeepPartial<T> = T extends Builtin ? T
4586
4612
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
4587
4613
  : Partial<T>;
4588
4614
 
4615
+ function toTimestamp(date: Date): Timestamp {
4616
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
4617
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
4618
+ return { seconds, nanos };
4619
+ }
4620
+
4621
+ function fromTimestamp(t: Timestamp): Date {
4622
+ let millis = Number(t.seconds.toString()) * 1_000;
4623
+ millis += t.nanos / 1_000_000;
4624
+ return new Date(millis);
4625
+ }
4626
+
4627
+ function fromJsonTimestamp(o: any): Date {
4628
+ if (o instanceof Date) {
4629
+ return o;
4630
+ } else if (typeof o === "string") {
4631
+ return new Date(o);
4632
+ } else {
4633
+ return fromTimestamp(Timestamp.fromJSON(o));
4634
+ }
4635
+ }
4636
+
4589
4637
  function longToBigint(long: Long) {
4590
4638
  return BigInt(long.toString());
4591
4639
  }