@sentio/sdk 1.33.2 → 1.34.1-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/context.js +0 -3
- package/lib/aptos/context.js.map +1 -1
- package/lib/core/context.js +0 -6
- package/lib/core/context.js.map +1 -1
- package/lib/core/logger.js.map +1 -1
- package/lib/gen/chainquery/protos/chainquery.d.ts +1 -1
- package/lib/gen/chainquery/protos/chainquery.js +108 -211
- package/lib/gen/chainquery/protos/chainquery.js.map +1 -1
- package/lib/gen/google/protobuf/empty.js.map +1 -1
- package/lib/gen/google/protobuf/timestamp.js +5 -9
- package/lib/gen/google/protobuf/timestamp.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +119 -189
- package/lib/gen/processor/protos/processor.js +783 -1118
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/gen/service/price/protos/price.d.ts +4 -4
- package/lib/gen/service/price/protos/price.js +15 -27
- package/lib/gen/service/price/protos/price.js.map +1 -1
- package/lib/release.config.js +2 -2
- package/lib/service.d.ts +8 -8
- package/lib/service.js +47 -160
- package/lib/service.js.map +1 -1
- package/lib/testing/test-processor-server.d.ts +7 -5
- package/lib/testing/test-processor-server.js +42 -19
- package/lib/testing/test-processor-server.js.map +1 -1
- package/lib/utils/token.d.ts +1 -1
- package/lib/utils/token.js.map +1 -1
- package/package.json +1 -1
- package/src/aptos/context.ts +1 -3
- package/src/core/context.ts +1 -6
- package/src/core/logger.ts +1 -1
- package/src/gen/chainquery/protos/chainquery.ts +171 -379
- package/src/gen/google/protobuf/empty.ts +7 -19
- package/src/gen/google/protobuf/timestamp.ts +11 -31
- package/src/gen/processor/protos/processor.ts +1058 -1847
- package/src/gen/service/price/protos/price.ts +38 -103
- package/src/service.ts +59 -210
- package/src/testing/test-processor-server.ts +47 -28
- package/src/utils/token.ts +1 -1
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.EvmQueryDefinition = exports.AptosQueryDefinition = exports.EvmQueryResponse = exports.EvmGetHeaderRequest = exports.EvmSQLQueryRequest = exports.VoidResponse = exports.AptosRefreshRequest = exports.AptosGetTxnsResponse = exports.QueryExecutionSummary = exports.QueryPhaseSummary = exports.AptosSQLQueryRequest = exports.AptosGetTxnsByEventRequest = exports.AptosGetTxnsByVersionRequest = exports.AptosGetTxnsByFunctionRequest = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
7
8
|
const long_1 = __importDefault(require("long"));
|
|
8
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
10
|
function createBaseAptosGetTxnsByFunctionRequest() {
|
|
@@ -73,26 +74,18 @@ exports.AptosGetTxnsByFunctionRequest = {
|
|
|
73
74
|
fromJSON(object) {
|
|
74
75
|
return {
|
|
75
76
|
network: isSet(object.network) ? String(object.network) : "",
|
|
76
|
-
fromVersion: isSet(object.fromVersion)
|
|
77
|
-
|
|
78
|
-
: long_1.default.UZERO,
|
|
79
|
-
toVersion: isSet(object.toVersion)
|
|
80
|
-
? long_1.default.fromValue(object.toVersion)
|
|
81
|
-
: long_1.default.UZERO,
|
|
77
|
+
fromVersion: isSet(object.fromVersion) ? long_1.default.fromValue(object.fromVersion) : long_1.default.UZERO,
|
|
78
|
+
toVersion: isSet(object.toVersion) ? long_1.default.fromValue(object.toVersion) : long_1.default.UZERO,
|
|
82
79
|
function: isSet(object.function) ? String(object.function) : "",
|
|
83
80
|
matchAll: isSet(object.matchAll) ? Boolean(object.matchAll) : false,
|
|
84
|
-
typedArguments: Array.isArray(object?.typedArguments)
|
|
85
|
-
? object.typedArguments.map((e) => String(e))
|
|
86
|
-
: [],
|
|
81
|
+
typedArguments: Array.isArray(object?.typedArguments) ? object.typedArguments.map((e) => String(e)) : [],
|
|
87
82
|
};
|
|
88
83
|
},
|
|
89
84
|
toJSON(message) {
|
|
90
85
|
const obj = {};
|
|
91
86
|
message.network !== undefined && (obj.network = message.network);
|
|
92
|
-
message.fromVersion !== undefined &&
|
|
93
|
-
|
|
94
|
-
message.toVersion !== undefined &&
|
|
95
|
-
(obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
87
|
+
message.fromVersion !== undefined && (obj.fromVersion = (message.fromVersion || long_1.default.UZERO).toString());
|
|
88
|
+
message.toVersion !== undefined && (obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
96
89
|
message.function !== undefined && (obj.function = message.function);
|
|
97
90
|
message.matchAll !== undefined && (obj.matchAll = message.matchAll);
|
|
98
91
|
if (message.typedArguments) {
|
|
@@ -106,14 +99,12 @@ exports.AptosGetTxnsByFunctionRequest = {
|
|
|
106
99
|
fromPartial(object) {
|
|
107
100
|
const message = createBaseAptosGetTxnsByFunctionRequest();
|
|
108
101
|
message.network = object.network ?? "";
|
|
109
|
-
message.fromVersion =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
? long_1.default.fromValue(object.toVersion)
|
|
116
|
-
: long_1.default.UZERO;
|
|
102
|
+
message.fromVersion = (object.fromVersion !== undefined && object.fromVersion !== null)
|
|
103
|
+
? long_1.default.fromValue(object.fromVersion)
|
|
104
|
+
: long_1.default.UZERO;
|
|
105
|
+
message.toVersion = (object.toVersion !== undefined && object.toVersion !== null)
|
|
106
|
+
? long_1.default.fromValue(object.toVersion)
|
|
107
|
+
: long_1.default.UZERO;
|
|
117
108
|
message.function = object.function ?? "";
|
|
118
109
|
message.matchAll = object.matchAll ?? false;
|
|
119
110
|
message.typedArguments = object.typedArguments?.map((e) => e) || [];
|
|
@@ -121,12 +112,7 @@ exports.AptosGetTxnsByFunctionRequest = {
|
|
|
121
112
|
},
|
|
122
113
|
};
|
|
123
114
|
function createBaseAptosGetTxnsByVersionRequest() {
|
|
124
|
-
return {
|
|
125
|
-
network: "",
|
|
126
|
-
fromVersion: long_1.default.UZERO,
|
|
127
|
-
toVersion: long_1.default.UZERO,
|
|
128
|
-
headerOnly: undefined,
|
|
129
|
-
};
|
|
115
|
+
return { network: "", fromVersion: long_1.default.UZERO, toVersion: long_1.default.UZERO, headerOnly: undefined };
|
|
130
116
|
}
|
|
131
117
|
exports.AptosGetTxnsByVersionRequest = {
|
|
132
118
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -173,50 +159,34 @@ exports.AptosGetTxnsByVersionRequest = {
|
|
|
173
159
|
fromJSON(object) {
|
|
174
160
|
return {
|
|
175
161
|
network: isSet(object.network) ? String(object.network) : "",
|
|
176
|
-
fromVersion: isSet(object.fromVersion)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
toVersion: isSet(object.toVersion)
|
|
180
|
-
? long_1.default.fromValue(object.toVersion)
|
|
181
|
-
: long_1.default.UZERO,
|
|
182
|
-
headerOnly: isSet(object.headerOnly)
|
|
183
|
-
? Boolean(object.headerOnly)
|
|
184
|
-
: undefined,
|
|
162
|
+
fromVersion: isSet(object.fromVersion) ? long_1.default.fromValue(object.fromVersion) : long_1.default.UZERO,
|
|
163
|
+
toVersion: isSet(object.toVersion) ? long_1.default.fromValue(object.toVersion) : long_1.default.UZERO,
|
|
164
|
+
headerOnly: isSet(object.headerOnly) ? Boolean(object.headerOnly) : undefined,
|
|
185
165
|
};
|
|
186
166
|
},
|
|
187
167
|
toJSON(message) {
|
|
188
168
|
const obj = {};
|
|
189
169
|
message.network !== undefined && (obj.network = message.network);
|
|
190
|
-
message.fromVersion !== undefined &&
|
|
191
|
-
|
|
192
|
-
message.toVersion !== undefined &&
|
|
193
|
-
(obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
170
|
+
message.fromVersion !== undefined && (obj.fromVersion = (message.fromVersion || long_1.default.UZERO).toString());
|
|
171
|
+
message.toVersion !== undefined && (obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
194
172
|
message.headerOnly !== undefined && (obj.headerOnly = message.headerOnly);
|
|
195
173
|
return obj;
|
|
196
174
|
},
|
|
197
175
|
fromPartial(object) {
|
|
198
176
|
const message = createBaseAptosGetTxnsByVersionRequest();
|
|
199
177
|
message.network = object.network ?? "";
|
|
200
|
-
message.fromVersion =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
? long_1.default.fromValue(object.toVersion)
|
|
207
|
-
: long_1.default.UZERO;
|
|
178
|
+
message.fromVersion = (object.fromVersion !== undefined && object.fromVersion !== null)
|
|
179
|
+
? long_1.default.fromValue(object.fromVersion)
|
|
180
|
+
: long_1.default.UZERO;
|
|
181
|
+
message.toVersion = (object.toVersion !== undefined && object.toVersion !== null)
|
|
182
|
+
? long_1.default.fromValue(object.toVersion)
|
|
183
|
+
: long_1.default.UZERO;
|
|
208
184
|
message.headerOnly = object.headerOnly ?? undefined;
|
|
209
185
|
return message;
|
|
210
186
|
},
|
|
211
187
|
};
|
|
212
188
|
function createBaseAptosGetTxnsByEventRequest() {
|
|
213
|
-
return {
|
|
214
|
-
network: "",
|
|
215
|
-
fromVersion: long_1.default.UZERO,
|
|
216
|
-
toVersion: long_1.default.UZERO,
|
|
217
|
-
address: "",
|
|
218
|
-
type: "",
|
|
219
|
-
};
|
|
189
|
+
return { network: "", fromVersion: long_1.default.UZERO, toVersion: long_1.default.UZERO, address: "", type: "" };
|
|
220
190
|
}
|
|
221
191
|
exports.AptosGetTxnsByEventRequest = {
|
|
222
192
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -269,12 +239,8 @@ exports.AptosGetTxnsByEventRequest = {
|
|
|
269
239
|
fromJSON(object) {
|
|
270
240
|
return {
|
|
271
241
|
network: isSet(object.network) ? String(object.network) : "",
|
|
272
|
-
fromVersion: isSet(object.fromVersion)
|
|
273
|
-
|
|
274
|
-
: long_1.default.UZERO,
|
|
275
|
-
toVersion: isSet(object.toVersion)
|
|
276
|
-
? long_1.default.fromValue(object.toVersion)
|
|
277
|
-
: long_1.default.UZERO,
|
|
242
|
+
fromVersion: isSet(object.fromVersion) ? long_1.default.fromValue(object.fromVersion) : long_1.default.UZERO,
|
|
243
|
+
toVersion: isSet(object.toVersion) ? long_1.default.fromValue(object.toVersion) : long_1.default.UZERO,
|
|
278
244
|
address: isSet(object.address) ? String(object.address) : "",
|
|
279
245
|
type: isSet(object.type) ? String(object.type) : "",
|
|
280
246
|
};
|
|
@@ -282,10 +248,8 @@ exports.AptosGetTxnsByEventRequest = {
|
|
|
282
248
|
toJSON(message) {
|
|
283
249
|
const obj = {};
|
|
284
250
|
message.network !== undefined && (obj.network = message.network);
|
|
285
|
-
message.fromVersion !== undefined &&
|
|
286
|
-
|
|
287
|
-
message.toVersion !== undefined &&
|
|
288
|
-
(obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
251
|
+
message.fromVersion !== undefined && (obj.fromVersion = (message.fromVersion || long_1.default.UZERO).toString());
|
|
252
|
+
message.toVersion !== undefined && (obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
289
253
|
message.address !== undefined && (obj.address = message.address);
|
|
290
254
|
message.type !== undefined && (obj.type = message.type);
|
|
291
255
|
return obj;
|
|
@@ -293,27 +257,19 @@ exports.AptosGetTxnsByEventRequest = {
|
|
|
293
257
|
fromPartial(object) {
|
|
294
258
|
const message = createBaseAptosGetTxnsByEventRequest();
|
|
295
259
|
message.network = object.network ?? "";
|
|
296
|
-
message.fromVersion =
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
? long_1.default.fromValue(object.toVersion)
|
|
303
|
-
: long_1.default.UZERO;
|
|
260
|
+
message.fromVersion = (object.fromVersion !== undefined && object.fromVersion !== null)
|
|
261
|
+
? long_1.default.fromValue(object.fromVersion)
|
|
262
|
+
: long_1.default.UZERO;
|
|
263
|
+
message.toVersion = (object.toVersion !== undefined && object.toVersion !== null)
|
|
264
|
+
? long_1.default.fromValue(object.toVersion)
|
|
265
|
+
: long_1.default.UZERO;
|
|
304
266
|
message.address = object.address ?? "";
|
|
305
267
|
message.type = object.type ?? "";
|
|
306
268
|
return message;
|
|
307
269
|
},
|
|
308
270
|
};
|
|
309
271
|
function createBaseAptosSQLQueryRequest() {
|
|
310
|
-
return {
|
|
311
|
-
network: "",
|
|
312
|
-
fromVersion: long_1.default.UZERO,
|
|
313
|
-
toVersion: long_1.default.UZERO,
|
|
314
|
-
sql: "",
|
|
315
|
-
arbitraryRange: false,
|
|
316
|
-
};
|
|
272
|
+
return { network: "", fromVersion: long_1.default.UZERO, toVersion: long_1.default.UZERO, sql: "", arbitraryRange: false };
|
|
317
273
|
}
|
|
318
274
|
exports.AptosSQLQueryRequest = {
|
|
319
275
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -366,41 +322,30 @@ exports.AptosSQLQueryRequest = {
|
|
|
366
322
|
fromJSON(object) {
|
|
367
323
|
return {
|
|
368
324
|
network: isSet(object.network) ? String(object.network) : "",
|
|
369
|
-
fromVersion: isSet(object.fromVersion)
|
|
370
|
-
|
|
371
|
-
: long_1.default.UZERO,
|
|
372
|
-
toVersion: isSet(object.toVersion)
|
|
373
|
-
? long_1.default.fromValue(object.toVersion)
|
|
374
|
-
: long_1.default.UZERO,
|
|
325
|
+
fromVersion: isSet(object.fromVersion) ? long_1.default.fromValue(object.fromVersion) : long_1.default.UZERO,
|
|
326
|
+
toVersion: isSet(object.toVersion) ? long_1.default.fromValue(object.toVersion) : long_1.default.UZERO,
|
|
375
327
|
sql: isSet(object.sql) ? String(object.sql) : "",
|
|
376
|
-
arbitraryRange: isSet(object.arbitraryRange)
|
|
377
|
-
? Boolean(object.arbitraryRange)
|
|
378
|
-
: false,
|
|
328
|
+
arbitraryRange: isSet(object.arbitraryRange) ? Boolean(object.arbitraryRange) : false,
|
|
379
329
|
};
|
|
380
330
|
},
|
|
381
331
|
toJSON(message) {
|
|
382
332
|
const obj = {};
|
|
383
333
|
message.network !== undefined && (obj.network = message.network);
|
|
384
|
-
message.fromVersion !== undefined &&
|
|
385
|
-
|
|
386
|
-
message.toVersion !== undefined &&
|
|
387
|
-
(obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
334
|
+
message.fromVersion !== undefined && (obj.fromVersion = (message.fromVersion || long_1.default.UZERO).toString());
|
|
335
|
+
message.toVersion !== undefined && (obj.toVersion = (message.toVersion || long_1.default.UZERO).toString());
|
|
388
336
|
message.sql !== undefined && (obj.sql = message.sql);
|
|
389
|
-
message.arbitraryRange !== undefined &&
|
|
390
|
-
(obj.arbitraryRange = message.arbitraryRange);
|
|
337
|
+
message.arbitraryRange !== undefined && (obj.arbitraryRange = message.arbitraryRange);
|
|
391
338
|
return obj;
|
|
392
339
|
},
|
|
393
340
|
fromPartial(object) {
|
|
394
341
|
const message = createBaseAptosSQLQueryRequest();
|
|
395
342
|
message.network = object.network ?? "";
|
|
396
|
-
message.fromVersion =
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
? long_1.default.fromValue(object.toVersion)
|
|
403
|
-
: long_1.default.UZERO;
|
|
343
|
+
message.fromVersion = (object.fromVersion !== undefined && object.fromVersion !== null)
|
|
344
|
+
? long_1.default.fromValue(object.fromVersion)
|
|
345
|
+
: long_1.default.UZERO;
|
|
346
|
+
message.toVersion = (object.toVersion !== undefined && object.toVersion !== null)
|
|
347
|
+
? long_1.default.fromValue(object.toVersion)
|
|
348
|
+
: long_1.default.UZERO;
|
|
404
349
|
message.sql = object.sql ?? "";
|
|
405
350
|
message.arbitraryRange = object.arbitraryRange ?? false;
|
|
406
351
|
return message;
|
|
@@ -442,25 +387,21 @@ exports.QueryPhaseSummary = {
|
|
|
442
387
|
fromJSON(object) {
|
|
443
388
|
return {
|
|
444
389
|
name: isSet(object.name) ? String(object.name) : "",
|
|
445
|
-
timeTookMs: isSet(object.timeTookMs)
|
|
446
|
-
? long_1.default.fromValue(object.timeTookMs)
|
|
447
|
-
: long_1.default.UZERO,
|
|
390
|
+
timeTookMs: isSet(object.timeTookMs) ? long_1.default.fromValue(object.timeTookMs) : long_1.default.UZERO,
|
|
448
391
|
};
|
|
449
392
|
},
|
|
450
393
|
toJSON(message) {
|
|
451
394
|
const obj = {};
|
|
452
395
|
message.name !== undefined && (obj.name = message.name);
|
|
453
|
-
message.timeTookMs !== undefined &&
|
|
454
|
-
(obj.timeTookMs = (message.timeTookMs || long_1.default.UZERO).toString());
|
|
396
|
+
message.timeTookMs !== undefined && (obj.timeTookMs = (message.timeTookMs || long_1.default.UZERO).toString());
|
|
455
397
|
return obj;
|
|
456
398
|
},
|
|
457
399
|
fromPartial(object) {
|
|
458
400
|
const message = createBaseQueryPhaseSummary();
|
|
459
401
|
message.name = object.name ?? "";
|
|
460
|
-
message.timeTookMs =
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
: long_1.default.UZERO;
|
|
402
|
+
message.timeTookMs = (object.timeTookMs !== undefined && object.timeTookMs !== null)
|
|
403
|
+
? long_1.default.fromValue(object.timeTookMs)
|
|
404
|
+
: long_1.default.UZERO;
|
|
464
405
|
return message;
|
|
465
406
|
},
|
|
466
407
|
};
|
|
@@ -520,8 +461,7 @@ exports.QueryExecutionSummary = {
|
|
|
520
461
|
message.numPartitionsWithMaterializedView = reader.uint64();
|
|
521
462
|
break;
|
|
522
463
|
case 5:
|
|
523
|
-
message.numPartitionsWithoutMaterializedView =
|
|
524
|
-
reader.uint64();
|
|
464
|
+
message.numPartitionsWithoutMaterializedView = reader.uint64();
|
|
525
465
|
break;
|
|
526
466
|
case 6:
|
|
527
467
|
message.numPartitions = reader.uint64();
|
|
@@ -538,43 +478,30 @@ exports.QueryExecutionSummary = {
|
|
|
538
478
|
},
|
|
539
479
|
fromJSON(object) {
|
|
540
480
|
return {
|
|
541
|
-
timeTookMs: isSet(object.timeTookMs)
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
resultNumRows: isSet(object.resultNumRows)
|
|
545
|
-
? long_1.default.fromValue(object.resultNumRows)
|
|
546
|
-
: undefined,
|
|
547
|
-
resultNumBytes: isSet(object.resultNumBytes)
|
|
548
|
-
? long_1.default.fromValue(object.resultNumBytes)
|
|
549
|
-
: undefined,
|
|
481
|
+
timeTookMs: isSet(object.timeTookMs) ? long_1.default.fromValue(object.timeTookMs) : long_1.default.UZERO,
|
|
482
|
+
resultNumRows: isSet(object.resultNumRows) ? long_1.default.fromValue(object.resultNumRows) : undefined,
|
|
483
|
+
resultNumBytes: isSet(object.resultNumBytes) ? long_1.default.fromValue(object.resultNumBytes) : undefined,
|
|
550
484
|
numPartitionsWithMaterializedView: isSet(object.numPartitionsWithMaterializedView)
|
|
551
485
|
? long_1.default.fromValue(object.numPartitionsWithMaterializedView)
|
|
552
486
|
: undefined,
|
|
553
487
|
numPartitionsWithoutMaterializedView: isSet(object.numPartitionsWithoutMaterializedView)
|
|
554
488
|
? long_1.default.fromValue(object.numPartitionsWithoutMaterializedView)
|
|
555
489
|
: undefined,
|
|
556
|
-
numPartitions: isSet(object.numPartitions)
|
|
557
|
-
|
|
558
|
-
: undefined,
|
|
559
|
-
phases: Array.isArray(object?.phases)
|
|
560
|
-
? object.phases.map((e) => exports.QueryPhaseSummary.fromJSON(e))
|
|
561
|
-
: [],
|
|
490
|
+
numPartitions: isSet(object.numPartitions) ? long_1.default.fromValue(object.numPartitions) : undefined,
|
|
491
|
+
phases: Array.isArray(object?.phases) ? object.phases.map((e) => exports.QueryPhaseSummary.fromJSON(e)) : [],
|
|
562
492
|
};
|
|
563
493
|
},
|
|
564
494
|
toJSON(message) {
|
|
565
495
|
const obj = {};
|
|
566
|
-
message.timeTookMs !== undefined &&
|
|
567
|
-
|
|
568
|
-
message.
|
|
569
|
-
(obj.resultNumRows = (message.resultNumRows || undefined).toString());
|
|
570
|
-
message.resultNumBytes !== undefined &&
|
|
571
|
-
(obj.resultNumBytes = (message.resultNumBytes || undefined).toString());
|
|
496
|
+
message.timeTookMs !== undefined && (obj.timeTookMs = (message.timeTookMs || long_1.default.UZERO).toString());
|
|
497
|
+
message.resultNumRows !== undefined && (obj.resultNumRows = (message.resultNumRows || undefined).toString());
|
|
498
|
+
message.resultNumBytes !== undefined && (obj.resultNumBytes = (message.resultNumBytes || undefined).toString());
|
|
572
499
|
message.numPartitionsWithMaterializedView !== undefined &&
|
|
573
500
|
(obj.numPartitionsWithMaterializedView = (message.numPartitionsWithMaterializedView || undefined).toString());
|
|
574
501
|
message.numPartitionsWithoutMaterializedView !== undefined &&
|
|
575
|
-
(obj.numPartitionsWithoutMaterializedView = (message.numPartitionsWithoutMaterializedView || undefined)
|
|
576
|
-
|
|
577
|
-
|
|
502
|
+
(obj.numPartitionsWithoutMaterializedView = (message.numPartitionsWithoutMaterializedView || undefined)
|
|
503
|
+
.toString());
|
|
504
|
+
message.numPartitions !== undefined && (obj.numPartitions = (message.numPartitions || undefined).toString());
|
|
578
505
|
if (message.phases) {
|
|
579
506
|
obj.phases = message.phases.map((e) => e ? exports.QueryPhaseSummary.toJSON(e) : undefined);
|
|
580
507
|
}
|
|
@@ -585,34 +512,28 @@ exports.QueryExecutionSummary = {
|
|
|
585
512
|
},
|
|
586
513
|
fromPartial(object) {
|
|
587
514
|
const message = createBaseQueryExecutionSummary();
|
|
588
|
-
message.timeTookMs =
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
object.resultNumBytes !== undefined && object.resultNumBytes !== null
|
|
598
|
-
? long_1.default.fromValue(object.resultNumBytes)
|
|
599
|
-
: undefined;
|
|
515
|
+
message.timeTookMs = (object.timeTookMs !== undefined && object.timeTookMs !== null)
|
|
516
|
+
? long_1.default.fromValue(object.timeTookMs)
|
|
517
|
+
: long_1.default.UZERO;
|
|
518
|
+
message.resultNumRows = (object.resultNumRows !== undefined && object.resultNumRows !== null)
|
|
519
|
+
? long_1.default.fromValue(object.resultNumRows)
|
|
520
|
+
: undefined;
|
|
521
|
+
message.resultNumBytes = (object.resultNumBytes !== undefined && object.resultNumBytes !== null)
|
|
522
|
+
? long_1.default.fromValue(object.resultNumBytes)
|
|
523
|
+
: undefined;
|
|
600
524
|
message.numPartitionsWithMaterializedView =
|
|
601
|
-
object.numPartitionsWithMaterializedView !== undefined &&
|
|
602
|
-
object.numPartitionsWithMaterializedView !== null
|
|
525
|
+
(object.numPartitionsWithMaterializedView !== undefined && object.numPartitionsWithMaterializedView !== null)
|
|
603
526
|
? long_1.default.fromValue(object.numPartitionsWithMaterializedView)
|
|
604
527
|
: undefined;
|
|
605
528
|
message.numPartitionsWithoutMaterializedView =
|
|
606
|
-
object.numPartitionsWithoutMaterializedView !== undefined &&
|
|
607
|
-
object.numPartitionsWithoutMaterializedView !== null
|
|
529
|
+
(object.numPartitionsWithoutMaterializedView !== undefined &&
|
|
530
|
+
object.numPartitionsWithoutMaterializedView !== null)
|
|
608
531
|
? long_1.default.fromValue(object.numPartitionsWithoutMaterializedView)
|
|
609
532
|
: undefined;
|
|
610
|
-
message.numPartitions =
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
message.phases =
|
|
615
|
-
object.phases?.map((e) => exports.QueryPhaseSummary.fromPartial(e)) || [];
|
|
533
|
+
message.numPartitions = (object.numPartitions !== undefined && object.numPartitions !== null)
|
|
534
|
+
? long_1.default.fromValue(object.numPartitions)
|
|
535
|
+
: undefined;
|
|
536
|
+
message.phases = object.phases?.map((e) => exports.QueryPhaseSummary.fromPartial(e)) || [];
|
|
616
537
|
return message;
|
|
617
538
|
},
|
|
618
539
|
};
|
|
@@ -651,9 +572,7 @@ exports.AptosGetTxnsResponse = {
|
|
|
651
572
|
},
|
|
652
573
|
fromJSON(object) {
|
|
653
574
|
return {
|
|
654
|
-
documents: Array.isArray(object?.documents)
|
|
655
|
-
? object.documents.map((e) => String(e))
|
|
656
|
-
: [],
|
|
575
|
+
documents: Array.isArray(object?.documents) ? object.documents.map((e) => String(e)) : [],
|
|
657
576
|
executionSummary: isSet(object.executionSummary)
|
|
658
577
|
? exports.QueryExecutionSummary.fromJSON(object.executionSummary)
|
|
659
578
|
: undefined,
|
|
@@ -667,19 +586,17 @@ exports.AptosGetTxnsResponse = {
|
|
|
667
586
|
else {
|
|
668
587
|
obj.documents = [];
|
|
669
588
|
}
|
|
670
|
-
message.executionSummary !== undefined &&
|
|
671
|
-
(
|
|
672
|
-
|
|
673
|
-
: undefined);
|
|
589
|
+
message.executionSummary !== undefined && (obj.executionSummary = message.executionSummary
|
|
590
|
+
? exports.QueryExecutionSummary.toJSON(message.executionSummary)
|
|
591
|
+
: undefined);
|
|
674
592
|
return obj;
|
|
675
593
|
},
|
|
676
594
|
fromPartial(object) {
|
|
677
595
|
const message = createBaseAptosGetTxnsResponse();
|
|
678
596
|
message.documents = object.documents?.map((e) => e) || [];
|
|
679
|
-
message.executionSummary =
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
: undefined;
|
|
597
|
+
message.executionSummary = (object.executionSummary !== undefined && object.executionSummary !== null)
|
|
598
|
+
? exports.QueryExecutionSummary.fromPartial(object.executionSummary)
|
|
599
|
+
: undefined;
|
|
683
600
|
return message;
|
|
684
601
|
},
|
|
685
602
|
};
|
|
@@ -802,12 +719,7 @@ exports.EvmSQLQueryRequest = {
|
|
|
802
719
|
},
|
|
803
720
|
};
|
|
804
721
|
function createBaseEvmGetHeaderRequest() {
|
|
805
|
-
return {
|
|
806
|
-
network: "",
|
|
807
|
-
fromBlock: undefined,
|
|
808
|
-
toBlock: undefined,
|
|
809
|
-
blockNumbers: [],
|
|
810
|
-
};
|
|
722
|
+
return { network: "", fromBlock: undefined, toBlock: undefined, blockNumbers: [] };
|
|
811
723
|
}
|
|
812
724
|
exports.EvmGetHeaderRequest = {
|
|
813
725
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -864,24 +776,16 @@ exports.EvmGetHeaderRequest = {
|
|
|
864
776
|
fromJSON(object) {
|
|
865
777
|
return {
|
|
866
778
|
network: isSet(object.network) ? String(object.network) : "",
|
|
867
|
-
fromBlock: isSet(object.fromBlock)
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
toBlock: isSet(object.toBlock)
|
|
871
|
-
? long_1.default.fromValue(object.toBlock)
|
|
872
|
-
: undefined,
|
|
873
|
-
blockNumbers: Array.isArray(object?.blockNumbers)
|
|
874
|
-
? object.blockNumbers.map((e) => long_1.default.fromValue(e))
|
|
875
|
-
: [],
|
|
779
|
+
fromBlock: isSet(object.fromBlock) ? long_1.default.fromValue(object.fromBlock) : undefined,
|
|
780
|
+
toBlock: isSet(object.toBlock) ? long_1.default.fromValue(object.toBlock) : undefined,
|
|
781
|
+
blockNumbers: Array.isArray(object?.blockNumbers) ? object.blockNumbers.map((e) => long_1.default.fromValue(e)) : [],
|
|
876
782
|
};
|
|
877
783
|
},
|
|
878
784
|
toJSON(message) {
|
|
879
785
|
const obj = {};
|
|
880
786
|
message.network !== undefined && (obj.network = message.network);
|
|
881
|
-
message.fromBlock !== undefined &&
|
|
882
|
-
|
|
883
|
-
message.toBlock !== undefined &&
|
|
884
|
-
(obj.toBlock = (message.toBlock || undefined).toString());
|
|
787
|
+
message.fromBlock !== undefined && (obj.fromBlock = (message.fromBlock || undefined).toString());
|
|
788
|
+
message.toBlock !== undefined && (obj.toBlock = (message.toBlock || undefined).toString());
|
|
885
789
|
if (message.blockNumbers) {
|
|
886
790
|
obj.blockNumbers = message.blockNumbers.map((e) => (e || long_1.default.UZERO).toString());
|
|
887
791
|
}
|
|
@@ -893,16 +797,13 @@ exports.EvmGetHeaderRequest = {
|
|
|
893
797
|
fromPartial(object) {
|
|
894
798
|
const message = createBaseEvmGetHeaderRequest();
|
|
895
799
|
message.network = object.network ?? "";
|
|
896
|
-
message.fromBlock =
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
: undefined;
|
|
904
|
-
message.blockNumbers =
|
|
905
|
-
object.blockNumbers?.map((e) => long_1.default.fromValue(e)) || [];
|
|
800
|
+
message.fromBlock = (object.fromBlock !== undefined && object.fromBlock !== null)
|
|
801
|
+
? long_1.default.fromValue(object.fromBlock)
|
|
802
|
+
: undefined;
|
|
803
|
+
message.toBlock = (object.toBlock !== undefined && object.toBlock !== null)
|
|
804
|
+
? long_1.default.fromValue(object.toBlock)
|
|
805
|
+
: undefined;
|
|
806
|
+
message.blockNumbers = object.blockNumbers?.map((e) => long_1.default.fromValue(e)) || [];
|
|
906
807
|
return message;
|
|
907
808
|
},
|
|
908
809
|
};
|
|
@@ -941,9 +842,7 @@ exports.EvmQueryResponse = {
|
|
|
941
842
|
},
|
|
942
843
|
fromJSON(object) {
|
|
943
844
|
return {
|
|
944
|
-
rows: Array.isArray(object?.rows)
|
|
945
|
-
? object.rows.map((e) => String(e))
|
|
946
|
-
: [],
|
|
845
|
+
rows: Array.isArray(object?.rows) ? object.rows.map((e) => String(e)) : [],
|
|
947
846
|
executionSummary: isSet(object.executionSummary)
|
|
948
847
|
? exports.QueryExecutionSummary.fromJSON(object.executionSummary)
|
|
949
848
|
: undefined,
|
|
@@ -957,19 +856,17 @@ exports.EvmQueryResponse = {
|
|
|
957
856
|
else {
|
|
958
857
|
obj.rows = [];
|
|
959
858
|
}
|
|
960
|
-
message.executionSummary !== undefined &&
|
|
961
|
-
(
|
|
962
|
-
|
|
963
|
-
: undefined);
|
|
859
|
+
message.executionSummary !== undefined && (obj.executionSummary = message.executionSummary
|
|
860
|
+
? exports.QueryExecutionSummary.toJSON(message.executionSummary)
|
|
861
|
+
: undefined);
|
|
964
862
|
return obj;
|
|
965
863
|
},
|
|
966
864
|
fromPartial(object) {
|
|
967
865
|
const message = createBaseEvmQueryResponse();
|
|
968
866
|
message.rows = object.rows?.map((e) => e) || [];
|
|
969
|
-
message.executionSummary =
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
: undefined;
|
|
867
|
+
message.executionSummary = (object.executionSummary !== undefined && object.executionSummary !== null)
|
|
868
|
+
? exports.QueryExecutionSummary.fromPartial(object.executionSummary)
|
|
869
|
+
: undefined;
|
|
973
870
|
return message;
|
|
974
871
|
},
|
|
975
872
|
};
|