@sentio/sdk 1.8.0 → 1.8.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/base-processor.d.ts +3 -3
- package/lib/base-processor.js +3 -0
- package/lib/base-processor.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +43 -20
- package/lib/gen/processor/protos/processor.js +187 -40
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/service.d.ts +2 -2
- package/lib/service.js +5 -2
- package/lib/service.js.map +1 -1
- package/lib/solana-processor.d.ts +2 -2
- package/lib/solana-processor.js +1 -0
- package/lib/solana-processor.js.map +1 -1
- package/lib/test/erc20.test.js +9 -11
- package/lib/test/erc20.test.js.map +1 -1
- package/lib/test/metric-utils.d.ts +3 -3
- package/lib/test/metric-utils.js.map +1 -1
- package/package.json +1 -1
- package/src/base-processor.ts +6 -3
- package/src/gen/processor/protos/processor.ts +226 -57
- package/src/service.ts +16 -13
- package/src/solana-processor.ts +3 -2
- package/src/test/erc20.test.ts +9 -11
- package/src/test/metric-utils.ts +3 -3
|
@@ -61,6 +61,51 @@ export function handlerTypeToJSON(object: HandlerType): string {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export enum LogLevel {
|
|
65
|
+
DEBUG = 0,
|
|
66
|
+
INFO = 1,
|
|
67
|
+
WARNING = 2,
|
|
68
|
+
ERROR = 3,
|
|
69
|
+
UNRECOGNIZED = -1,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function logLevelFromJSON(object: any): LogLevel {
|
|
73
|
+
switch (object) {
|
|
74
|
+
case 0:
|
|
75
|
+
case "DEBUG":
|
|
76
|
+
return LogLevel.DEBUG;
|
|
77
|
+
case 1:
|
|
78
|
+
case "INFO":
|
|
79
|
+
return LogLevel.INFO;
|
|
80
|
+
case 2:
|
|
81
|
+
case "WARNING":
|
|
82
|
+
return LogLevel.WARNING;
|
|
83
|
+
case 3:
|
|
84
|
+
case "ERROR":
|
|
85
|
+
return LogLevel.ERROR;
|
|
86
|
+
case -1:
|
|
87
|
+
case "UNRECOGNIZED":
|
|
88
|
+
default:
|
|
89
|
+
return LogLevel.UNRECOGNIZED;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function logLevelToJSON(object: LogLevel): string {
|
|
94
|
+
switch (object) {
|
|
95
|
+
case LogLevel.DEBUG:
|
|
96
|
+
return "DEBUG";
|
|
97
|
+
case LogLevel.INFO:
|
|
98
|
+
return "INFO";
|
|
99
|
+
case LogLevel.WARNING:
|
|
100
|
+
return "WARNING";
|
|
101
|
+
case LogLevel.ERROR:
|
|
102
|
+
return "ERROR";
|
|
103
|
+
case LogLevel.UNRECOGNIZED:
|
|
104
|
+
default:
|
|
105
|
+
return "UNRECOGNIZED";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
64
109
|
export interface ProjectConfig {
|
|
65
110
|
name: string;
|
|
66
111
|
version: string;
|
|
@@ -130,7 +175,7 @@ export interface ProcessLogsRequest {
|
|
|
130
175
|
}
|
|
131
176
|
|
|
132
177
|
export interface ProcessLogsResponse {
|
|
133
|
-
result:
|
|
178
|
+
result: ProcessResult | undefined;
|
|
134
179
|
configUpdated: boolean;
|
|
135
180
|
}
|
|
136
181
|
|
|
@@ -139,11 +184,11 @@ export interface ProcessTracesRequest {
|
|
|
139
184
|
}
|
|
140
185
|
|
|
141
186
|
export interface ProcessTracesResponse {
|
|
142
|
-
result:
|
|
187
|
+
result: ProcessResult | undefined;
|
|
143
188
|
}
|
|
144
189
|
|
|
145
190
|
export interface ProcessTransactionsRequest {
|
|
146
|
-
transaction:
|
|
191
|
+
transaction: RawTransaction | undefined;
|
|
147
192
|
}
|
|
148
193
|
|
|
149
194
|
export interface ProcessInstructionsRequest {
|
|
@@ -151,11 +196,11 @@ export interface ProcessInstructionsRequest {
|
|
|
151
196
|
}
|
|
152
197
|
|
|
153
198
|
export interface ProcessTransactionsResponse {
|
|
154
|
-
result:
|
|
199
|
+
result: ProcessResult | undefined;
|
|
155
200
|
}
|
|
156
201
|
|
|
157
202
|
export interface ProcessInstructionsResponse {
|
|
158
|
-
result:
|
|
203
|
+
result: ProcessResult | undefined;
|
|
159
204
|
}
|
|
160
205
|
|
|
161
206
|
export interface ProcessBlocksRequest {
|
|
@@ -163,7 +208,7 @@ export interface ProcessBlocksRequest {
|
|
|
163
208
|
}
|
|
164
209
|
|
|
165
210
|
export interface ProcessBlocksResponse {
|
|
166
|
-
result:
|
|
211
|
+
result: ProcessResult | undefined;
|
|
167
212
|
}
|
|
168
213
|
|
|
169
214
|
export interface LogBinding {
|
|
@@ -184,7 +229,7 @@ export interface RawTrace {
|
|
|
184
229
|
raw: Uint8Array;
|
|
185
230
|
}
|
|
186
231
|
|
|
187
|
-
export interface
|
|
232
|
+
export interface RawTransaction {
|
|
188
233
|
txHash: string;
|
|
189
234
|
raw: Uint8Array;
|
|
190
235
|
programAccountId: string;
|
|
@@ -206,9 +251,10 @@ export interface RawBlock {
|
|
|
206
251
|
raw: Uint8Array;
|
|
207
252
|
}
|
|
208
253
|
|
|
209
|
-
export interface
|
|
254
|
+
export interface ProcessResult {
|
|
210
255
|
gauges: GaugeResult[];
|
|
211
256
|
counters: CounterResult[];
|
|
257
|
+
logs: LogResult[];
|
|
212
258
|
}
|
|
213
259
|
|
|
214
260
|
export interface RecordMetaData {
|
|
@@ -254,6 +300,13 @@ export interface CounterResult {
|
|
|
254
300
|
runtimeInfo: RuntimeInfo | undefined;
|
|
255
301
|
}
|
|
256
302
|
|
|
303
|
+
export interface LogResult {
|
|
304
|
+
metadata: RecordMetaData | undefined;
|
|
305
|
+
level: LogLevel;
|
|
306
|
+
message: string;
|
|
307
|
+
runtimeInfo: RuntimeInfo | undefined;
|
|
308
|
+
}
|
|
309
|
+
|
|
257
310
|
function createBaseProjectConfig(): ProjectConfig {
|
|
258
311
|
return { name: "", version: "" };
|
|
259
312
|
}
|
|
@@ -1284,7 +1337,7 @@ export const ProcessLogsResponse = {
|
|
|
1284
1337
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1285
1338
|
): _m0.Writer {
|
|
1286
1339
|
if (message.result !== undefined) {
|
|
1287
|
-
|
|
1340
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1288
1341
|
}
|
|
1289
1342
|
if (message.configUpdated === true) {
|
|
1290
1343
|
writer.uint32(32).bool(message.configUpdated);
|
|
@@ -1300,7 +1353,7 @@ export const ProcessLogsResponse = {
|
|
|
1300
1353
|
const tag = reader.uint32();
|
|
1301
1354
|
switch (tag >>> 3) {
|
|
1302
1355
|
case 1:
|
|
1303
|
-
message.result =
|
|
1356
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1304
1357
|
break;
|
|
1305
1358
|
case 4:
|
|
1306
1359
|
message.configUpdated = reader.bool();
|
|
@@ -1316,7 +1369,7 @@ export const ProcessLogsResponse = {
|
|
|
1316
1369
|
fromJSON(object: any): ProcessLogsResponse {
|
|
1317
1370
|
return {
|
|
1318
1371
|
result: isSet(object.result)
|
|
1319
|
-
?
|
|
1372
|
+
? ProcessResult.fromJSON(object.result)
|
|
1320
1373
|
: undefined,
|
|
1321
1374
|
configUpdated: isSet(object.configUpdated)
|
|
1322
1375
|
? Boolean(object.configUpdated)
|
|
@@ -1328,7 +1381,7 @@ export const ProcessLogsResponse = {
|
|
|
1328
1381
|
const obj: any = {};
|
|
1329
1382
|
message.result !== undefined &&
|
|
1330
1383
|
(obj.result = message.result
|
|
1331
|
-
?
|
|
1384
|
+
? ProcessResult.toJSON(message.result)
|
|
1332
1385
|
: undefined);
|
|
1333
1386
|
message.configUpdated !== undefined &&
|
|
1334
1387
|
(obj.configUpdated = message.configUpdated);
|
|
@@ -1339,7 +1392,7 @@ export const ProcessLogsResponse = {
|
|
|
1339
1392
|
const message = createBaseProcessLogsResponse();
|
|
1340
1393
|
message.result =
|
|
1341
1394
|
object.result !== undefined && object.result !== null
|
|
1342
|
-
?
|
|
1395
|
+
? ProcessResult.fromPartial(object.result)
|
|
1343
1396
|
: undefined;
|
|
1344
1397
|
message.configUpdated = object.configUpdated ?? false;
|
|
1345
1398
|
return message;
|
|
@@ -1420,7 +1473,7 @@ export const ProcessTracesResponse = {
|
|
|
1420
1473
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1421
1474
|
): _m0.Writer {
|
|
1422
1475
|
if (message.result !== undefined) {
|
|
1423
|
-
|
|
1476
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1424
1477
|
}
|
|
1425
1478
|
return writer;
|
|
1426
1479
|
},
|
|
@@ -1436,7 +1489,7 @@ export const ProcessTracesResponse = {
|
|
|
1436
1489
|
const tag = reader.uint32();
|
|
1437
1490
|
switch (tag >>> 3) {
|
|
1438
1491
|
case 1:
|
|
1439
|
-
message.result =
|
|
1492
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1440
1493
|
break;
|
|
1441
1494
|
default:
|
|
1442
1495
|
reader.skipType(tag & 7);
|
|
@@ -1449,7 +1502,7 @@ export const ProcessTracesResponse = {
|
|
|
1449
1502
|
fromJSON(object: any): ProcessTracesResponse {
|
|
1450
1503
|
return {
|
|
1451
1504
|
result: isSet(object.result)
|
|
1452
|
-
?
|
|
1505
|
+
? ProcessResult.fromJSON(object.result)
|
|
1453
1506
|
: undefined,
|
|
1454
1507
|
};
|
|
1455
1508
|
},
|
|
@@ -1458,7 +1511,7 @@ export const ProcessTracesResponse = {
|
|
|
1458
1511
|
const obj: any = {};
|
|
1459
1512
|
message.result !== undefined &&
|
|
1460
1513
|
(obj.result = message.result
|
|
1461
|
-
?
|
|
1514
|
+
? ProcessResult.toJSON(message.result)
|
|
1462
1515
|
: undefined);
|
|
1463
1516
|
return obj;
|
|
1464
1517
|
},
|
|
@@ -1469,7 +1522,7 @@ export const ProcessTracesResponse = {
|
|
|
1469
1522
|
const message = createBaseProcessTracesResponse();
|
|
1470
1523
|
message.result =
|
|
1471
1524
|
object.result !== undefined && object.result !== null
|
|
1472
|
-
?
|
|
1525
|
+
? ProcessResult.fromPartial(object.result)
|
|
1473
1526
|
: undefined;
|
|
1474
1527
|
return message;
|
|
1475
1528
|
},
|
|
@@ -1485,7 +1538,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1485
1538
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1486
1539
|
): _m0.Writer {
|
|
1487
1540
|
if (message.transaction !== undefined) {
|
|
1488
|
-
|
|
1541
|
+
RawTransaction.encode(
|
|
1489
1542
|
message.transaction,
|
|
1490
1543
|
writer.uint32(10).fork()
|
|
1491
1544
|
).ldelim();
|
|
@@ -1504,7 +1557,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1504
1557
|
const tag = reader.uint32();
|
|
1505
1558
|
switch (tag >>> 3) {
|
|
1506
1559
|
case 1:
|
|
1507
|
-
message.transaction =
|
|
1560
|
+
message.transaction = RawTransaction.decode(reader, reader.uint32());
|
|
1508
1561
|
break;
|
|
1509
1562
|
default:
|
|
1510
1563
|
reader.skipType(tag & 7);
|
|
@@ -1517,7 +1570,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1517
1570
|
fromJSON(object: any): ProcessTransactionsRequest {
|
|
1518
1571
|
return {
|
|
1519
1572
|
transaction: isSet(object.transaction)
|
|
1520
|
-
?
|
|
1573
|
+
? RawTransaction.fromJSON(object.transaction)
|
|
1521
1574
|
: undefined,
|
|
1522
1575
|
};
|
|
1523
1576
|
},
|
|
@@ -1526,7 +1579,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1526
1579
|
const obj: any = {};
|
|
1527
1580
|
message.transaction !== undefined &&
|
|
1528
1581
|
(obj.transaction = message.transaction
|
|
1529
|
-
?
|
|
1582
|
+
? RawTransaction.toJSON(message.transaction)
|
|
1530
1583
|
: undefined);
|
|
1531
1584
|
return obj;
|
|
1532
1585
|
},
|
|
@@ -1537,7 +1590,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1537
1590
|
const message = createBaseProcessTransactionsRequest();
|
|
1538
1591
|
message.transaction =
|
|
1539
1592
|
object.transaction !== undefined && object.transaction !== null
|
|
1540
|
-
?
|
|
1593
|
+
? RawTransaction.fromPartial(object.transaction)
|
|
1541
1594
|
: undefined;
|
|
1542
1595
|
return message;
|
|
1543
1596
|
},
|
|
@@ -1621,7 +1674,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1621
1674
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1622
1675
|
): _m0.Writer {
|
|
1623
1676
|
if (message.result !== undefined) {
|
|
1624
|
-
|
|
1677
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1625
1678
|
}
|
|
1626
1679
|
return writer;
|
|
1627
1680
|
},
|
|
@@ -1637,7 +1690,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1637
1690
|
const tag = reader.uint32();
|
|
1638
1691
|
switch (tag >>> 3) {
|
|
1639
1692
|
case 1:
|
|
1640
|
-
message.result =
|
|
1693
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1641
1694
|
break;
|
|
1642
1695
|
default:
|
|
1643
1696
|
reader.skipType(tag & 7);
|
|
@@ -1650,7 +1703,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1650
1703
|
fromJSON(object: any): ProcessTransactionsResponse {
|
|
1651
1704
|
return {
|
|
1652
1705
|
result: isSet(object.result)
|
|
1653
|
-
?
|
|
1706
|
+
? ProcessResult.fromJSON(object.result)
|
|
1654
1707
|
: undefined,
|
|
1655
1708
|
};
|
|
1656
1709
|
},
|
|
@@ -1659,7 +1712,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1659
1712
|
const obj: any = {};
|
|
1660
1713
|
message.result !== undefined &&
|
|
1661
1714
|
(obj.result = message.result
|
|
1662
|
-
?
|
|
1715
|
+
? ProcessResult.toJSON(message.result)
|
|
1663
1716
|
: undefined);
|
|
1664
1717
|
return obj;
|
|
1665
1718
|
},
|
|
@@ -1670,7 +1723,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1670
1723
|
const message = createBaseProcessTransactionsResponse();
|
|
1671
1724
|
message.result =
|
|
1672
1725
|
object.result !== undefined && object.result !== null
|
|
1673
|
-
?
|
|
1726
|
+
? ProcessResult.fromPartial(object.result)
|
|
1674
1727
|
: undefined;
|
|
1675
1728
|
return message;
|
|
1676
1729
|
},
|
|
@@ -1686,7 +1739,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1686
1739
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1687
1740
|
): _m0.Writer {
|
|
1688
1741
|
if (message.result !== undefined) {
|
|
1689
|
-
|
|
1742
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1690
1743
|
}
|
|
1691
1744
|
return writer;
|
|
1692
1745
|
},
|
|
@@ -1702,7 +1755,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1702
1755
|
const tag = reader.uint32();
|
|
1703
1756
|
switch (tag >>> 3) {
|
|
1704
1757
|
case 1:
|
|
1705
|
-
message.result =
|
|
1758
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1706
1759
|
break;
|
|
1707
1760
|
default:
|
|
1708
1761
|
reader.skipType(tag & 7);
|
|
@@ -1715,7 +1768,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1715
1768
|
fromJSON(object: any): ProcessInstructionsResponse {
|
|
1716
1769
|
return {
|
|
1717
1770
|
result: isSet(object.result)
|
|
1718
|
-
?
|
|
1771
|
+
? ProcessResult.fromJSON(object.result)
|
|
1719
1772
|
: undefined,
|
|
1720
1773
|
};
|
|
1721
1774
|
},
|
|
@@ -1724,7 +1777,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1724
1777
|
const obj: any = {};
|
|
1725
1778
|
message.result !== undefined &&
|
|
1726
1779
|
(obj.result = message.result
|
|
1727
|
-
?
|
|
1780
|
+
? ProcessResult.toJSON(message.result)
|
|
1728
1781
|
: undefined);
|
|
1729
1782
|
return obj;
|
|
1730
1783
|
},
|
|
@@ -1735,7 +1788,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1735
1788
|
const message = createBaseProcessInstructionsResponse();
|
|
1736
1789
|
message.result =
|
|
1737
1790
|
object.result !== undefined && object.result !== null
|
|
1738
|
-
?
|
|
1791
|
+
? ProcessResult.fromPartial(object.result)
|
|
1739
1792
|
: undefined;
|
|
1740
1793
|
return message;
|
|
1741
1794
|
},
|
|
@@ -1817,7 +1870,7 @@ export const ProcessBlocksResponse = {
|
|
|
1817
1870
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1818
1871
|
): _m0.Writer {
|
|
1819
1872
|
if (message.result !== undefined) {
|
|
1820
|
-
|
|
1873
|
+
ProcessResult.encode(message.result, writer.uint32(18).fork()).ldelim();
|
|
1821
1874
|
}
|
|
1822
1875
|
return writer;
|
|
1823
1876
|
},
|
|
@@ -1833,7 +1886,7 @@ export const ProcessBlocksResponse = {
|
|
|
1833
1886
|
const tag = reader.uint32();
|
|
1834
1887
|
switch (tag >>> 3) {
|
|
1835
1888
|
case 2:
|
|
1836
|
-
message.result =
|
|
1889
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1837
1890
|
break;
|
|
1838
1891
|
default:
|
|
1839
1892
|
reader.skipType(tag & 7);
|
|
@@ -1846,7 +1899,7 @@ export const ProcessBlocksResponse = {
|
|
|
1846
1899
|
fromJSON(object: any): ProcessBlocksResponse {
|
|
1847
1900
|
return {
|
|
1848
1901
|
result: isSet(object.result)
|
|
1849
|
-
?
|
|
1902
|
+
? ProcessResult.fromJSON(object.result)
|
|
1850
1903
|
: undefined,
|
|
1851
1904
|
};
|
|
1852
1905
|
},
|
|
@@ -1855,7 +1908,7 @@ export const ProcessBlocksResponse = {
|
|
|
1855
1908
|
const obj: any = {};
|
|
1856
1909
|
message.result !== undefined &&
|
|
1857
1910
|
(obj.result = message.result
|
|
1858
|
-
?
|
|
1911
|
+
? ProcessResult.toJSON(message.result)
|
|
1859
1912
|
: undefined);
|
|
1860
1913
|
return obj;
|
|
1861
1914
|
},
|
|
@@ -1866,7 +1919,7 @@ export const ProcessBlocksResponse = {
|
|
|
1866
1919
|
const message = createBaseProcessBlocksResponse();
|
|
1867
1920
|
message.result =
|
|
1868
1921
|
object.result !== undefined && object.result !== null
|
|
1869
|
-
?
|
|
1922
|
+
? ProcessResult.fromPartial(object.result)
|
|
1870
1923
|
: undefined;
|
|
1871
1924
|
return message;
|
|
1872
1925
|
},
|
|
@@ -2114,13 +2167,13 @@ export const RawTrace = {
|
|
|
2114
2167
|
},
|
|
2115
2168
|
};
|
|
2116
2169
|
|
|
2117
|
-
function
|
|
2170
|
+
function createBaseRawTransaction(): RawTransaction {
|
|
2118
2171
|
return { txHash: "", raw: new Uint8Array(), programAccountId: "" };
|
|
2119
2172
|
}
|
|
2120
2173
|
|
|
2121
|
-
export const
|
|
2174
|
+
export const RawTransaction = {
|
|
2122
2175
|
encode(
|
|
2123
|
-
message:
|
|
2176
|
+
message: RawTransaction,
|
|
2124
2177
|
writer: _m0.Writer = _m0.Writer.create()
|
|
2125
2178
|
): _m0.Writer {
|
|
2126
2179
|
if (message.txHash !== "") {
|
|
@@ -2135,10 +2188,10 @@ export const Transaction = {
|
|
|
2135
2188
|
return writer;
|
|
2136
2189
|
},
|
|
2137
2190
|
|
|
2138
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2191
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RawTransaction {
|
|
2139
2192
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2140
2193
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2141
|
-
const message =
|
|
2194
|
+
const message = createBaseRawTransaction();
|
|
2142
2195
|
while (reader.pos < end) {
|
|
2143
2196
|
const tag = reader.uint32();
|
|
2144
2197
|
switch (tag >>> 3) {
|
|
@@ -2159,7 +2212,7 @@ export const Transaction = {
|
|
|
2159
2212
|
return message;
|
|
2160
2213
|
},
|
|
2161
2214
|
|
|
2162
|
-
fromJSON(object: any):
|
|
2215
|
+
fromJSON(object: any): RawTransaction {
|
|
2163
2216
|
return {
|
|
2164
2217
|
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
2165
2218
|
raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
|
|
@@ -2169,7 +2222,7 @@ export const Transaction = {
|
|
|
2169
2222
|
};
|
|
2170
2223
|
},
|
|
2171
2224
|
|
|
2172
|
-
toJSON(message:
|
|
2225
|
+
toJSON(message: RawTransaction): unknown {
|
|
2173
2226
|
const obj: any = {};
|
|
2174
2227
|
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
2175
2228
|
message.raw !== undefined &&
|
|
@@ -2181,8 +2234,8 @@ export const Transaction = {
|
|
|
2181
2234
|
return obj;
|
|
2182
2235
|
},
|
|
2183
2236
|
|
|
2184
|
-
fromPartial(object: DeepPartial<
|
|
2185
|
-
const message =
|
|
2237
|
+
fromPartial(object: DeepPartial<RawTransaction>): RawTransaction {
|
|
2238
|
+
const message = createBaseRawTransaction();
|
|
2186
2239
|
message.txHash = object.txHash ?? "";
|
|
2187
2240
|
message.raw = object.raw ?? new Uint8Array();
|
|
2188
2241
|
message.programAccountId = object.programAccountId ?? "";
|
|
@@ -2423,13 +2476,13 @@ export const RawBlock = {
|
|
|
2423
2476
|
},
|
|
2424
2477
|
};
|
|
2425
2478
|
|
|
2426
|
-
function
|
|
2427
|
-
return { gauges: [], counters: [] };
|
|
2479
|
+
function createBaseProcessResult(): ProcessResult {
|
|
2480
|
+
return { gauges: [], counters: [], logs: [] };
|
|
2428
2481
|
}
|
|
2429
2482
|
|
|
2430
|
-
export const
|
|
2483
|
+
export const ProcessResult = {
|
|
2431
2484
|
encode(
|
|
2432
|
-
message:
|
|
2485
|
+
message: ProcessResult,
|
|
2433
2486
|
writer: _m0.Writer = _m0.Writer.create()
|
|
2434
2487
|
): _m0.Writer {
|
|
2435
2488
|
for (const v of message.gauges) {
|
|
@@ -2438,13 +2491,16 @@ export const O11yResult = {
|
|
|
2438
2491
|
for (const v of message.counters) {
|
|
2439
2492
|
CounterResult.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
2440
2493
|
}
|
|
2494
|
+
for (const v of message.logs) {
|
|
2495
|
+
LogResult.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
2496
|
+
}
|
|
2441
2497
|
return writer;
|
|
2442
2498
|
},
|
|
2443
2499
|
|
|
2444
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2500
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ProcessResult {
|
|
2445
2501
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2446
2502
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2447
|
-
const message =
|
|
2503
|
+
const message = createBaseProcessResult();
|
|
2448
2504
|
while (reader.pos < end) {
|
|
2449
2505
|
const tag = reader.uint32();
|
|
2450
2506
|
switch (tag >>> 3) {
|
|
@@ -2454,6 +2510,9 @@ export const O11yResult = {
|
|
|
2454
2510
|
case 2:
|
|
2455
2511
|
message.counters.push(CounterResult.decode(reader, reader.uint32()));
|
|
2456
2512
|
break;
|
|
2513
|
+
case 3:
|
|
2514
|
+
message.logs.push(LogResult.decode(reader, reader.uint32()));
|
|
2515
|
+
break;
|
|
2457
2516
|
default:
|
|
2458
2517
|
reader.skipType(tag & 7);
|
|
2459
2518
|
break;
|
|
@@ -2462,7 +2521,7 @@ export const O11yResult = {
|
|
|
2462
2521
|
return message;
|
|
2463
2522
|
},
|
|
2464
2523
|
|
|
2465
|
-
fromJSON(object: any):
|
|
2524
|
+
fromJSON(object: any): ProcessResult {
|
|
2466
2525
|
return {
|
|
2467
2526
|
gauges: Array.isArray(object?.gauges)
|
|
2468
2527
|
? object.gauges.map((e: any) => GaugeResult.fromJSON(e))
|
|
@@ -2470,10 +2529,13 @@ export const O11yResult = {
|
|
|
2470
2529
|
counters: Array.isArray(object?.counters)
|
|
2471
2530
|
? object.counters.map((e: any) => CounterResult.fromJSON(e))
|
|
2472
2531
|
: [],
|
|
2532
|
+
logs: Array.isArray(object?.logs)
|
|
2533
|
+
? object.logs.map((e: any) => LogResult.fromJSON(e))
|
|
2534
|
+
: [],
|
|
2473
2535
|
};
|
|
2474
2536
|
},
|
|
2475
2537
|
|
|
2476
|
-
toJSON(message:
|
|
2538
|
+
toJSON(message: ProcessResult): unknown {
|
|
2477
2539
|
const obj: any = {};
|
|
2478
2540
|
if (message.gauges) {
|
|
2479
2541
|
obj.gauges = message.gauges.map((e) =>
|
|
@@ -2489,15 +2551,21 @@ export const O11yResult = {
|
|
|
2489
2551
|
} else {
|
|
2490
2552
|
obj.counters = [];
|
|
2491
2553
|
}
|
|
2554
|
+
if (message.logs) {
|
|
2555
|
+
obj.logs = message.logs.map((e) => (e ? LogResult.toJSON(e) : undefined));
|
|
2556
|
+
} else {
|
|
2557
|
+
obj.logs = [];
|
|
2558
|
+
}
|
|
2492
2559
|
return obj;
|
|
2493
2560
|
},
|
|
2494
2561
|
|
|
2495
|
-
fromPartial(object: DeepPartial<
|
|
2496
|
-
const message =
|
|
2562
|
+
fromPartial(object: DeepPartial<ProcessResult>): ProcessResult {
|
|
2563
|
+
const message = createBaseProcessResult();
|
|
2497
2564
|
message.gauges =
|
|
2498
2565
|
object.gauges?.map((e) => GaugeResult.fromPartial(e)) || [];
|
|
2499
2566
|
message.counters =
|
|
2500
2567
|
object.counters?.map((e) => CounterResult.fromPartial(e)) || [];
|
|
2568
|
+
message.logs = object.logs?.map((e) => LogResult.fromPartial(e)) || [];
|
|
2501
2569
|
return message;
|
|
2502
2570
|
},
|
|
2503
2571
|
};
|
|
@@ -3153,6 +3221,107 @@ export const CounterResult = {
|
|
|
3153
3221
|
},
|
|
3154
3222
|
};
|
|
3155
3223
|
|
|
3224
|
+
function createBaseLogResult(): LogResult {
|
|
3225
|
+
return { metadata: undefined, level: 0, message: "", runtimeInfo: undefined };
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
export const LogResult = {
|
|
3229
|
+
encode(
|
|
3230
|
+
message: LogResult,
|
|
3231
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
3232
|
+
): _m0.Writer {
|
|
3233
|
+
if (message.metadata !== undefined) {
|
|
3234
|
+
RecordMetaData.encode(
|
|
3235
|
+
message.metadata,
|
|
3236
|
+
writer.uint32(10).fork()
|
|
3237
|
+
).ldelim();
|
|
3238
|
+
}
|
|
3239
|
+
if (message.level !== 0) {
|
|
3240
|
+
writer.uint32(16).int32(message.level);
|
|
3241
|
+
}
|
|
3242
|
+
if (message.message !== "") {
|
|
3243
|
+
writer.uint32(26).string(message.message);
|
|
3244
|
+
}
|
|
3245
|
+
if (message.runtimeInfo !== undefined) {
|
|
3246
|
+
RuntimeInfo.encode(
|
|
3247
|
+
message.runtimeInfo,
|
|
3248
|
+
writer.uint32(34).fork()
|
|
3249
|
+
).ldelim();
|
|
3250
|
+
}
|
|
3251
|
+
return writer;
|
|
3252
|
+
},
|
|
3253
|
+
|
|
3254
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): LogResult {
|
|
3255
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3256
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3257
|
+
const message = createBaseLogResult();
|
|
3258
|
+
while (reader.pos < end) {
|
|
3259
|
+
const tag = reader.uint32();
|
|
3260
|
+
switch (tag >>> 3) {
|
|
3261
|
+
case 1:
|
|
3262
|
+
message.metadata = RecordMetaData.decode(reader, reader.uint32());
|
|
3263
|
+
break;
|
|
3264
|
+
case 2:
|
|
3265
|
+
message.level = reader.int32() as any;
|
|
3266
|
+
break;
|
|
3267
|
+
case 3:
|
|
3268
|
+
message.message = reader.string();
|
|
3269
|
+
break;
|
|
3270
|
+
case 4:
|
|
3271
|
+
message.runtimeInfo = RuntimeInfo.decode(reader, reader.uint32());
|
|
3272
|
+
break;
|
|
3273
|
+
default:
|
|
3274
|
+
reader.skipType(tag & 7);
|
|
3275
|
+
break;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
return message;
|
|
3279
|
+
},
|
|
3280
|
+
|
|
3281
|
+
fromJSON(object: any): LogResult {
|
|
3282
|
+
return {
|
|
3283
|
+
metadata: isSet(object.metadata)
|
|
3284
|
+
? RecordMetaData.fromJSON(object.metadata)
|
|
3285
|
+
: undefined,
|
|
3286
|
+
level: isSet(object.level) ? logLevelFromJSON(object.level) : 0,
|
|
3287
|
+
message: isSet(object.message) ? String(object.message) : "",
|
|
3288
|
+
runtimeInfo: isSet(object.runtimeInfo)
|
|
3289
|
+
? RuntimeInfo.fromJSON(object.runtimeInfo)
|
|
3290
|
+
: undefined,
|
|
3291
|
+
};
|
|
3292
|
+
},
|
|
3293
|
+
|
|
3294
|
+
toJSON(message: LogResult): unknown {
|
|
3295
|
+
const obj: any = {};
|
|
3296
|
+
message.metadata !== undefined &&
|
|
3297
|
+
(obj.metadata = message.metadata
|
|
3298
|
+
? RecordMetaData.toJSON(message.metadata)
|
|
3299
|
+
: undefined);
|
|
3300
|
+
message.level !== undefined && (obj.level = logLevelToJSON(message.level));
|
|
3301
|
+
message.message !== undefined && (obj.message = message.message);
|
|
3302
|
+
message.runtimeInfo !== undefined &&
|
|
3303
|
+
(obj.runtimeInfo = message.runtimeInfo
|
|
3304
|
+
? RuntimeInfo.toJSON(message.runtimeInfo)
|
|
3305
|
+
: undefined);
|
|
3306
|
+
return obj;
|
|
3307
|
+
},
|
|
3308
|
+
|
|
3309
|
+
fromPartial(object: DeepPartial<LogResult>): LogResult {
|
|
3310
|
+
const message = createBaseLogResult();
|
|
3311
|
+
message.metadata =
|
|
3312
|
+
object.metadata !== undefined && object.metadata !== null
|
|
3313
|
+
? RecordMetaData.fromPartial(object.metadata)
|
|
3314
|
+
: undefined;
|
|
3315
|
+
message.level = object.level ?? 0;
|
|
3316
|
+
message.message = object.message ?? "";
|
|
3317
|
+
message.runtimeInfo =
|
|
3318
|
+
object.runtimeInfo !== undefined && object.runtimeInfo !== null
|
|
3319
|
+
? RuntimeInfo.fromPartial(object.runtimeInfo)
|
|
3320
|
+
: undefined;
|
|
3321
|
+
return message;
|
|
3322
|
+
},
|
|
3323
|
+
};
|
|
3324
|
+
|
|
3156
3325
|
export type ProcessorDefinition = typeof ProcessorDefinition;
|
|
3157
3326
|
export const ProcessorDefinition = {
|
|
3158
3327
|
name: "Processor",
|