@sentio/protos 1.40.2-rc.1 → 1.40.2-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/lib/chainquery/protos/chainquery.d.ts +2 -2
- package/lib/chainquery/protos/chainquery.js +48 -8
- package/lib/chainquery/protos/chainquery.js.map +1 -1
- package/lib/processor/protos/processor.d.ts +1 -0
- package/lib/processor/protos/processor.js +20 -1
- package/lib/processor/protos/processor.js.map +1 -1
- package/package.json +2 -2
- package/src/chainquery/protos/chainquery.ts +54 -10
- package/src/processor/protos/processor.ts +21 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/protos",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "1.40.2-rc.
|
|
4
|
+
"version": "1.40.2-rc.2",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"compile": "tsc -p .",
|
|
7
7
|
"clean": "tsc --build --clean",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"!{lib,src}/tests",
|
|
20
20
|
"!**/*.test.{js,ts}"
|
|
21
21
|
],
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "a81423c4d3444c75bd39ee74819c903f688b046c"
|
|
23
23
|
}
|
|
@@ -53,7 +53,7 @@ export interface QueryExecutionSummary {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface AptosGetTxnsResponse {
|
|
56
|
-
documents:
|
|
56
|
+
documents: Uint8Array[];
|
|
57
57
|
executionSummary?: QueryExecutionSummary | undefined;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -76,7 +76,7 @@ export interface EvmGetHeaderRequest {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface EvmQueryResponse {
|
|
79
|
-
rows:
|
|
79
|
+
rows: Uint8Array[];
|
|
80
80
|
executionSummary?: QueryExecutionSummary | undefined;
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -637,7 +637,7 @@ function createBaseAptosGetTxnsResponse(): AptosGetTxnsResponse {
|
|
|
637
637
|
export const AptosGetTxnsResponse = {
|
|
638
638
|
encode(message: AptosGetTxnsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
639
639
|
for (const v of message.documents) {
|
|
640
|
-
writer.uint32(10).
|
|
640
|
+
writer.uint32(10).bytes(v!);
|
|
641
641
|
}
|
|
642
642
|
if (message.executionSummary !== undefined) {
|
|
643
643
|
QueryExecutionSummary.encode(message.executionSummary, writer.uint32(18).fork()).ldelim();
|
|
@@ -653,7 +653,7 @@ export const AptosGetTxnsResponse = {
|
|
|
653
653
|
const tag = reader.uint32();
|
|
654
654
|
switch (tag >>> 3) {
|
|
655
655
|
case 1:
|
|
656
|
-
message.documents.push(reader.
|
|
656
|
+
message.documents.push(reader.bytes());
|
|
657
657
|
break;
|
|
658
658
|
case 2:
|
|
659
659
|
message.executionSummary = QueryExecutionSummary.decode(reader, reader.uint32());
|
|
@@ -668,7 +668,7 @@ export const AptosGetTxnsResponse = {
|
|
|
668
668
|
|
|
669
669
|
fromJSON(object: any): AptosGetTxnsResponse {
|
|
670
670
|
return {
|
|
671
|
-
documents: Array.isArray(object?.documents) ? object.documents.map((e: any) =>
|
|
671
|
+
documents: Array.isArray(object?.documents) ? object.documents.map((e: any) => bytesFromBase64(e)) : [],
|
|
672
672
|
executionSummary: isSet(object.executionSummary)
|
|
673
673
|
? QueryExecutionSummary.fromJSON(object.executionSummary)
|
|
674
674
|
: undefined,
|
|
@@ -678,7 +678,7 @@ export const AptosGetTxnsResponse = {
|
|
|
678
678
|
toJSON(message: AptosGetTxnsResponse): unknown {
|
|
679
679
|
const obj: any = {};
|
|
680
680
|
if (message.documents) {
|
|
681
|
-
obj.documents = message.documents.map((e) => e);
|
|
681
|
+
obj.documents = message.documents.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
682
682
|
} else {
|
|
683
683
|
obj.documents = [];
|
|
684
684
|
}
|
|
@@ -930,7 +930,7 @@ function createBaseEvmQueryResponse(): EvmQueryResponse {
|
|
|
930
930
|
export const EvmQueryResponse = {
|
|
931
931
|
encode(message: EvmQueryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
932
932
|
for (const v of message.rows) {
|
|
933
|
-
writer.uint32(10).
|
|
933
|
+
writer.uint32(10).bytes(v!);
|
|
934
934
|
}
|
|
935
935
|
if (message.executionSummary !== undefined) {
|
|
936
936
|
QueryExecutionSummary.encode(message.executionSummary, writer.uint32(18).fork()).ldelim();
|
|
@@ -946,7 +946,7 @@ export const EvmQueryResponse = {
|
|
|
946
946
|
const tag = reader.uint32();
|
|
947
947
|
switch (tag >>> 3) {
|
|
948
948
|
case 1:
|
|
949
|
-
message.rows.push(reader.
|
|
949
|
+
message.rows.push(reader.bytes());
|
|
950
950
|
break;
|
|
951
951
|
case 2:
|
|
952
952
|
message.executionSummary = QueryExecutionSummary.decode(reader, reader.uint32());
|
|
@@ -961,7 +961,7 @@ export const EvmQueryResponse = {
|
|
|
961
961
|
|
|
962
962
|
fromJSON(object: any): EvmQueryResponse {
|
|
963
963
|
return {
|
|
964
|
-
rows: Array.isArray(object?.rows) ? object.rows.map((e: any) =>
|
|
964
|
+
rows: Array.isArray(object?.rows) ? object.rows.map((e: any) => bytesFromBase64(e)) : [],
|
|
965
965
|
executionSummary: isSet(object.executionSummary)
|
|
966
966
|
? QueryExecutionSummary.fromJSON(object.executionSummary)
|
|
967
967
|
: undefined,
|
|
@@ -971,7 +971,7 @@ export const EvmQueryResponse = {
|
|
|
971
971
|
toJSON(message: EvmQueryResponse): unknown {
|
|
972
972
|
const obj: any = {};
|
|
973
973
|
if (message.rows) {
|
|
974
|
-
obj.rows = message.rows.map((e) => e);
|
|
974
|
+
obj.rows = message.rows.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
|
975
975
|
} else {
|
|
976
976
|
obj.rows = [];
|
|
977
977
|
}
|
|
@@ -1176,6 +1176,50 @@ export interface EvmQueryClient<CallOptionsExt = {}> {
|
|
|
1176
1176
|
): Promise<VoidResponse>;
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
|
+
declare var self: any | undefined;
|
|
1180
|
+
declare var window: any | undefined;
|
|
1181
|
+
declare var global: any | undefined;
|
|
1182
|
+
var tsProtoGlobalThis: any = (() => {
|
|
1183
|
+
if (typeof globalThis !== "undefined") {
|
|
1184
|
+
return globalThis;
|
|
1185
|
+
}
|
|
1186
|
+
if (typeof self !== "undefined") {
|
|
1187
|
+
return self;
|
|
1188
|
+
}
|
|
1189
|
+
if (typeof window !== "undefined") {
|
|
1190
|
+
return window;
|
|
1191
|
+
}
|
|
1192
|
+
if (typeof global !== "undefined") {
|
|
1193
|
+
return global;
|
|
1194
|
+
}
|
|
1195
|
+
throw "Unable to locate global object";
|
|
1196
|
+
})();
|
|
1197
|
+
|
|
1198
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
1199
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
1200
|
+
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
|
1201
|
+
} else {
|
|
1202
|
+
const bin = tsProtoGlobalThis.atob(b64);
|
|
1203
|
+
const arr = new Uint8Array(bin.length);
|
|
1204
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
1205
|
+
arr[i] = bin.charCodeAt(i);
|
|
1206
|
+
}
|
|
1207
|
+
return arr;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
1212
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
1213
|
+
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
|
1214
|
+
} else {
|
|
1215
|
+
const bin: string[] = [];
|
|
1216
|
+
arr.forEach((byte) => {
|
|
1217
|
+
bin.push(String.fromCharCode(byte));
|
|
1218
|
+
});
|
|
1219
|
+
return tsProtoGlobalThis.btoa(bin.join(""));
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1179
1223
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1180
1224
|
|
|
1181
1225
|
type DeepPartial<T> = T extends Builtin ? T
|
|
@@ -341,6 +341,7 @@ export interface MetricConfig {
|
|
|
341
341
|
description: string;
|
|
342
342
|
unit: string;
|
|
343
343
|
sparse: boolean;
|
|
344
|
+
persistentBetweenVersion: boolean;
|
|
344
345
|
type: MetricType;
|
|
345
346
|
aggregationConfig: AggregationConfig | undefined;
|
|
346
347
|
}
|
|
@@ -1340,7 +1341,15 @@ export const ExportConfig = {
|
|
|
1340
1341
|
};
|
|
1341
1342
|
|
|
1342
1343
|
function createBaseMetricConfig(): MetricConfig {
|
|
1343
|
-
return {
|
|
1344
|
+
return {
|
|
1345
|
+
name: "",
|
|
1346
|
+
description: "",
|
|
1347
|
+
unit: "",
|
|
1348
|
+
sparse: false,
|
|
1349
|
+
persistentBetweenVersion: false,
|
|
1350
|
+
type: 0,
|
|
1351
|
+
aggregationConfig: undefined,
|
|
1352
|
+
};
|
|
1344
1353
|
}
|
|
1345
1354
|
|
|
1346
1355
|
export const MetricConfig = {
|
|
@@ -1357,6 +1366,9 @@ export const MetricConfig = {
|
|
|
1357
1366
|
if (message.sparse === true) {
|
|
1358
1367
|
writer.uint32(32).bool(message.sparse);
|
|
1359
1368
|
}
|
|
1369
|
+
if (message.persistentBetweenVersion === true) {
|
|
1370
|
+
writer.uint32(40).bool(message.persistentBetweenVersion);
|
|
1371
|
+
}
|
|
1360
1372
|
if (message.type !== 0) {
|
|
1361
1373
|
writer.uint32(56).int32(message.type);
|
|
1362
1374
|
}
|
|
@@ -1385,6 +1397,9 @@ export const MetricConfig = {
|
|
|
1385
1397
|
case 4:
|
|
1386
1398
|
message.sparse = reader.bool();
|
|
1387
1399
|
break;
|
|
1400
|
+
case 5:
|
|
1401
|
+
message.persistentBetweenVersion = reader.bool();
|
|
1402
|
+
break;
|
|
1388
1403
|
case 7:
|
|
1389
1404
|
message.type = reader.int32() as any;
|
|
1390
1405
|
break;
|
|
@@ -1405,6 +1420,9 @@ export const MetricConfig = {
|
|
|
1405
1420
|
description: isSet(object.description) ? String(object.description) : "",
|
|
1406
1421
|
unit: isSet(object.unit) ? String(object.unit) : "",
|
|
1407
1422
|
sparse: isSet(object.sparse) ? Boolean(object.sparse) : false,
|
|
1423
|
+
persistentBetweenVersion: isSet(object.persistentBetweenVersion)
|
|
1424
|
+
? Boolean(object.persistentBetweenVersion)
|
|
1425
|
+
: false,
|
|
1408
1426
|
type: isSet(object.type) ? metricTypeFromJSON(object.type) : 0,
|
|
1409
1427
|
aggregationConfig: isSet(object.aggregationConfig)
|
|
1410
1428
|
? AggregationConfig.fromJSON(object.aggregationConfig)
|
|
@@ -1418,6 +1436,7 @@ export const MetricConfig = {
|
|
|
1418
1436
|
message.description !== undefined && (obj.description = message.description);
|
|
1419
1437
|
message.unit !== undefined && (obj.unit = message.unit);
|
|
1420
1438
|
message.sparse !== undefined && (obj.sparse = message.sparse);
|
|
1439
|
+
message.persistentBetweenVersion !== undefined && (obj.persistentBetweenVersion = message.persistentBetweenVersion);
|
|
1421
1440
|
message.type !== undefined && (obj.type = metricTypeToJSON(message.type));
|
|
1422
1441
|
message.aggregationConfig !== undefined && (obj.aggregationConfig = message.aggregationConfig
|
|
1423
1442
|
? AggregationConfig.toJSON(message.aggregationConfig)
|
|
@@ -1431,6 +1450,7 @@ export const MetricConfig = {
|
|
|
1431
1450
|
message.description = object.description ?? "";
|
|
1432
1451
|
message.unit = object.unit ?? "";
|
|
1433
1452
|
message.sparse = object.sparse ?? false;
|
|
1453
|
+
message.persistentBetweenVersion = object.persistentBetweenVersion ?? false;
|
|
1434
1454
|
message.type = object.type ?? 0;
|
|
1435
1455
|
message.aggregationConfig = (object.aggregationConfig !== undefined && object.aggregationConfig !== null)
|
|
1436
1456
|
? AggregationConfig.fromPartial(object.aggregationConfig)
|