@sentio/sdk 1.7.22 → 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 +123 -36
- package/lib/gen/processor/protos/processor.js +417 -53
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/meter.js +1 -1
- package/lib/meter.js.map +1 -1
- package/lib/service.d.ts +3 -2
- package/lib/service.js +11 -3
- 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/index.d.ts +1 -0
- package/lib/test/index.js +3 -1
- package/lib/test/index.js.map +1 -1
- package/lib/test/metric-utils.d.ts +3 -3
- package/lib/test/metric-utils.js.map +1 -1
- package/lib/test/test-processor-server.d.ts +2 -1
- package/lib/test/test-processor-server.js +3 -0
- package/lib/test/test-processor-server.js.map +1 -1
- package/lib/test/test-provider.d.ts +1 -0
- package/lib/test/test-provider.js +25 -0
- package/lib/test/test-provider.js.map +1 -0
- package/lib/utils/chainmap.js +3 -3
- package/lib/utils/chainmap.js.map +1 -1
- package/lib/utils/erc20.test.js +6 -11
- package/lib/utils/erc20.test.js.map +1 -1
- package/package.json +1 -1
- package/src/base-processor.ts +6 -3
- package/src/gen/processor/protos/processor.ts +547 -83
- package/src/meter.ts +1 -1
- package/src/service.ts +25 -14
- package/src/solana-processor.ts +3 -2
- package/src/test/erc20.test.ts +9 -11
- package/src/test/index.ts +1 -0
- package/src/test/metric-utils.ts +3 -3
- package/src/test/test-processor-server.ts +6 -0
- package/src/test/test-provider.ts +25 -0
- package/src/utils/chainmap.ts +3 -3
- package/src/utils/erc20.test.ts +7 -12
|
@@ -10,6 +10,7 @@ export enum HandlerType {
|
|
|
10
10
|
BLOCK = 2,
|
|
11
11
|
TRANSACTION = 3,
|
|
12
12
|
INSTRUCTION = 4,
|
|
13
|
+
TRACE = 5,
|
|
13
14
|
UNRECOGNIZED = -1,
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -30,6 +31,9 @@ export function handlerTypeFromJSON(object: any): HandlerType {
|
|
|
30
31
|
case 4:
|
|
31
32
|
case "INSTRUCTION":
|
|
32
33
|
return HandlerType.INSTRUCTION;
|
|
34
|
+
case 5:
|
|
35
|
+
case "TRACE":
|
|
36
|
+
return HandlerType.TRACE;
|
|
33
37
|
case -1:
|
|
34
38
|
case "UNRECOGNIZED":
|
|
35
39
|
default:
|
|
@@ -49,12 +53,59 @@ export function handlerTypeToJSON(object: HandlerType): string {
|
|
|
49
53
|
return "TRANSACTION";
|
|
50
54
|
case HandlerType.INSTRUCTION:
|
|
51
55
|
return "INSTRUCTION";
|
|
56
|
+
case HandlerType.TRACE:
|
|
57
|
+
return "TRACE";
|
|
52
58
|
case HandlerType.UNRECOGNIZED:
|
|
53
59
|
default:
|
|
54
60
|
return "UNRECOGNIZED";
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
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
|
+
|
|
58
109
|
export interface ProjectConfig {
|
|
59
110
|
name: string;
|
|
60
111
|
version: string;
|
|
@@ -124,12 +175,20 @@ export interface ProcessLogsRequest {
|
|
|
124
175
|
}
|
|
125
176
|
|
|
126
177
|
export interface ProcessLogsResponse {
|
|
127
|
-
result:
|
|
178
|
+
result: ProcessResult | undefined;
|
|
128
179
|
configUpdated: boolean;
|
|
129
180
|
}
|
|
130
181
|
|
|
182
|
+
export interface ProcessTracesRequest {
|
|
183
|
+
logBindings: LogBinding[];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface ProcessTracesResponse {
|
|
187
|
+
result: ProcessResult | undefined;
|
|
188
|
+
}
|
|
189
|
+
|
|
131
190
|
export interface ProcessTransactionsRequest {
|
|
132
|
-
transaction:
|
|
191
|
+
transaction: RawTransaction | undefined;
|
|
133
192
|
}
|
|
134
193
|
|
|
135
194
|
export interface ProcessInstructionsRequest {
|
|
@@ -137,11 +196,11 @@ export interface ProcessInstructionsRequest {
|
|
|
137
196
|
}
|
|
138
197
|
|
|
139
198
|
export interface ProcessTransactionsResponse {
|
|
140
|
-
result:
|
|
199
|
+
result: ProcessResult | undefined;
|
|
141
200
|
}
|
|
142
201
|
|
|
143
202
|
export interface ProcessInstructionsResponse {
|
|
144
|
-
result:
|
|
203
|
+
result: ProcessResult | undefined;
|
|
145
204
|
}
|
|
146
205
|
|
|
147
206
|
export interface ProcessBlocksRequest {
|
|
@@ -149,19 +208,28 @@ export interface ProcessBlocksRequest {
|
|
|
149
208
|
}
|
|
150
209
|
|
|
151
210
|
export interface ProcessBlocksResponse {
|
|
152
|
-
result:
|
|
211
|
+
result: ProcessResult | undefined;
|
|
153
212
|
}
|
|
154
213
|
|
|
155
214
|
export interface LogBinding {
|
|
156
|
-
log:
|
|
215
|
+
log: RawLog | undefined;
|
|
157
216
|
handlerId: number;
|
|
158
217
|
}
|
|
159
218
|
|
|
160
|
-
export interface
|
|
219
|
+
export interface RawLog {
|
|
161
220
|
raw: Uint8Array;
|
|
162
221
|
}
|
|
163
222
|
|
|
164
|
-
export interface
|
|
223
|
+
export interface TraceBinding {
|
|
224
|
+
trace: RawTrace | undefined;
|
|
225
|
+
handlerId: number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface RawTrace {
|
|
229
|
+
raw: Uint8Array;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface RawTransaction {
|
|
165
233
|
txHash: string;
|
|
166
234
|
raw: Uint8Array;
|
|
167
235
|
programAccountId: string;
|
|
@@ -175,17 +243,18 @@ export interface Instruction {
|
|
|
175
243
|
}
|
|
176
244
|
|
|
177
245
|
export interface BlockBinding {
|
|
178
|
-
block:
|
|
246
|
+
block: RawBlock | undefined;
|
|
179
247
|
handlerIds: number[];
|
|
180
248
|
}
|
|
181
249
|
|
|
182
|
-
export interface
|
|
250
|
+
export interface RawBlock {
|
|
183
251
|
raw: Uint8Array;
|
|
184
252
|
}
|
|
185
253
|
|
|
186
|
-
export interface
|
|
254
|
+
export interface ProcessResult {
|
|
187
255
|
gauges: GaugeResult[];
|
|
188
256
|
counters: CounterResult[];
|
|
257
|
+
logs: LogResult[];
|
|
189
258
|
}
|
|
190
259
|
|
|
191
260
|
export interface RecordMetaData {
|
|
@@ -231,6 +300,13 @@ export interface CounterResult {
|
|
|
231
300
|
runtimeInfo: RuntimeInfo | undefined;
|
|
232
301
|
}
|
|
233
302
|
|
|
303
|
+
export interface LogResult {
|
|
304
|
+
metadata: RecordMetaData | undefined;
|
|
305
|
+
level: LogLevel;
|
|
306
|
+
message: string;
|
|
307
|
+
runtimeInfo: RuntimeInfo | undefined;
|
|
308
|
+
}
|
|
309
|
+
|
|
234
310
|
function createBaseProjectConfig(): ProjectConfig {
|
|
235
311
|
return { name: "", version: "" };
|
|
236
312
|
}
|
|
@@ -1261,7 +1337,7 @@ export const ProcessLogsResponse = {
|
|
|
1261
1337
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1262
1338
|
): _m0.Writer {
|
|
1263
1339
|
if (message.result !== undefined) {
|
|
1264
|
-
|
|
1340
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1265
1341
|
}
|
|
1266
1342
|
if (message.configUpdated === true) {
|
|
1267
1343
|
writer.uint32(32).bool(message.configUpdated);
|
|
@@ -1277,7 +1353,7 @@ export const ProcessLogsResponse = {
|
|
|
1277
1353
|
const tag = reader.uint32();
|
|
1278
1354
|
switch (tag >>> 3) {
|
|
1279
1355
|
case 1:
|
|
1280
|
-
message.result =
|
|
1356
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1281
1357
|
break;
|
|
1282
1358
|
case 4:
|
|
1283
1359
|
message.configUpdated = reader.bool();
|
|
@@ -1293,7 +1369,7 @@ export const ProcessLogsResponse = {
|
|
|
1293
1369
|
fromJSON(object: any): ProcessLogsResponse {
|
|
1294
1370
|
return {
|
|
1295
1371
|
result: isSet(object.result)
|
|
1296
|
-
?
|
|
1372
|
+
? ProcessResult.fromJSON(object.result)
|
|
1297
1373
|
: undefined,
|
|
1298
1374
|
configUpdated: isSet(object.configUpdated)
|
|
1299
1375
|
? Boolean(object.configUpdated)
|
|
@@ -1305,7 +1381,7 @@ export const ProcessLogsResponse = {
|
|
|
1305
1381
|
const obj: any = {};
|
|
1306
1382
|
message.result !== undefined &&
|
|
1307
1383
|
(obj.result = message.result
|
|
1308
|
-
?
|
|
1384
|
+
? ProcessResult.toJSON(message.result)
|
|
1309
1385
|
: undefined);
|
|
1310
1386
|
message.configUpdated !== undefined &&
|
|
1311
1387
|
(obj.configUpdated = message.configUpdated);
|
|
@@ -1316,13 +1392,142 @@ export const ProcessLogsResponse = {
|
|
|
1316
1392
|
const message = createBaseProcessLogsResponse();
|
|
1317
1393
|
message.result =
|
|
1318
1394
|
object.result !== undefined && object.result !== null
|
|
1319
|
-
?
|
|
1395
|
+
? ProcessResult.fromPartial(object.result)
|
|
1320
1396
|
: undefined;
|
|
1321
1397
|
message.configUpdated = object.configUpdated ?? false;
|
|
1322
1398
|
return message;
|
|
1323
1399
|
},
|
|
1324
1400
|
};
|
|
1325
1401
|
|
|
1402
|
+
function createBaseProcessTracesRequest(): ProcessTracesRequest {
|
|
1403
|
+
return { logBindings: [] };
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
export const ProcessTracesRequest = {
|
|
1407
|
+
encode(
|
|
1408
|
+
message: ProcessTracesRequest,
|
|
1409
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
1410
|
+
): _m0.Writer {
|
|
1411
|
+
for (const v of message.logBindings) {
|
|
1412
|
+
LogBinding.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
1413
|
+
}
|
|
1414
|
+
return writer;
|
|
1415
|
+
},
|
|
1416
|
+
|
|
1417
|
+
decode(
|
|
1418
|
+
input: _m0.Reader | Uint8Array,
|
|
1419
|
+
length?: number
|
|
1420
|
+
): ProcessTracesRequest {
|
|
1421
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1422
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1423
|
+
const message = createBaseProcessTracesRequest();
|
|
1424
|
+
while (reader.pos < end) {
|
|
1425
|
+
const tag = reader.uint32();
|
|
1426
|
+
switch (tag >>> 3) {
|
|
1427
|
+
case 1:
|
|
1428
|
+
message.logBindings.push(LogBinding.decode(reader, reader.uint32()));
|
|
1429
|
+
break;
|
|
1430
|
+
default:
|
|
1431
|
+
reader.skipType(tag & 7);
|
|
1432
|
+
break;
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
return message;
|
|
1436
|
+
},
|
|
1437
|
+
|
|
1438
|
+
fromJSON(object: any): ProcessTracesRequest {
|
|
1439
|
+
return {
|
|
1440
|
+
logBindings: Array.isArray(object?.logBindings)
|
|
1441
|
+
? object.logBindings.map((e: any) => LogBinding.fromJSON(e))
|
|
1442
|
+
: [],
|
|
1443
|
+
};
|
|
1444
|
+
},
|
|
1445
|
+
|
|
1446
|
+
toJSON(message: ProcessTracesRequest): unknown {
|
|
1447
|
+
const obj: any = {};
|
|
1448
|
+
if (message.logBindings) {
|
|
1449
|
+
obj.logBindings = message.logBindings.map((e) =>
|
|
1450
|
+
e ? LogBinding.toJSON(e) : undefined
|
|
1451
|
+
);
|
|
1452
|
+
} else {
|
|
1453
|
+
obj.logBindings = [];
|
|
1454
|
+
}
|
|
1455
|
+
return obj;
|
|
1456
|
+
},
|
|
1457
|
+
|
|
1458
|
+
fromPartial(object: DeepPartial<ProcessTracesRequest>): ProcessTracesRequest {
|
|
1459
|
+
const message = createBaseProcessTracesRequest();
|
|
1460
|
+
message.logBindings =
|
|
1461
|
+
object.logBindings?.map((e) => LogBinding.fromPartial(e)) || [];
|
|
1462
|
+
return message;
|
|
1463
|
+
},
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
function createBaseProcessTracesResponse(): ProcessTracesResponse {
|
|
1467
|
+
return { result: undefined };
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
export const ProcessTracesResponse = {
|
|
1471
|
+
encode(
|
|
1472
|
+
message: ProcessTracesResponse,
|
|
1473
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
1474
|
+
): _m0.Writer {
|
|
1475
|
+
if (message.result !== undefined) {
|
|
1476
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1477
|
+
}
|
|
1478
|
+
return writer;
|
|
1479
|
+
},
|
|
1480
|
+
|
|
1481
|
+
decode(
|
|
1482
|
+
input: _m0.Reader | Uint8Array,
|
|
1483
|
+
length?: number
|
|
1484
|
+
): ProcessTracesResponse {
|
|
1485
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1486
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1487
|
+
const message = createBaseProcessTracesResponse();
|
|
1488
|
+
while (reader.pos < end) {
|
|
1489
|
+
const tag = reader.uint32();
|
|
1490
|
+
switch (tag >>> 3) {
|
|
1491
|
+
case 1:
|
|
1492
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1493
|
+
break;
|
|
1494
|
+
default:
|
|
1495
|
+
reader.skipType(tag & 7);
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
return message;
|
|
1500
|
+
},
|
|
1501
|
+
|
|
1502
|
+
fromJSON(object: any): ProcessTracesResponse {
|
|
1503
|
+
return {
|
|
1504
|
+
result: isSet(object.result)
|
|
1505
|
+
? ProcessResult.fromJSON(object.result)
|
|
1506
|
+
: undefined,
|
|
1507
|
+
};
|
|
1508
|
+
},
|
|
1509
|
+
|
|
1510
|
+
toJSON(message: ProcessTracesResponse): unknown {
|
|
1511
|
+
const obj: any = {};
|
|
1512
|
+
message.result !== undefined &&
|
|
1513
|
+
(obj.result = message.result
|
|
1514
|
+
? ProcessResult.toJSON(message.result)
|
|
1515
|
+
: undefined);
|
|
1516
|
+
return obj;
|
|
1517
|
+
},
|
|
1518
|
+
|
|
1519
|
+
fromPartial(
|
|
1520
|
+
object: DeepPartial<ProcessTracesResponse>
|
|
1521
|
+
): ProcessTracesResponse {
|
|
1522
|
+
const message = createBaseProcessTracesResponse();
|
|
1523
|
+
message.result =
|
|
1524
|
+
object.result !== undefined && object.result !== null
|
|
1525
|
+
? ProcessResult.fromPartial(object.result)
|
|
1526
|
+
: undefined;
|
|
1527
|
+
return message;
|
|
1528
|
+
},
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1326
1531
|
function createBaseProcessTransactionsRequest(): ProcessTransactionsRequest {
|
|
1327
1532
|
return { transaction: undefined };
|
|
1328
1533
|
}
|
|
@@ -1333,7 +1538,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1333
1538
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1334
1539
|
): _m0.Writer {
|
|
1335
1540
|
if (message.transaction !== undefined) {
|
|
1336
|
-
|
|
1541
|
+
RawTransaction.encode(
|
|
1337
1542
|
message.transaction,
|
|
1338
1543
|
writer.uint32(10).fork()
|
|
1339
1544
|
).ldelim();
|
|
@@ -1352,7 +1557,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1352
1557
|
const tag = reader.uint32();
|
|
1353
1558
|
switch (tag >>> 3) {
|
|
1354
1559
|
case 1:
|
|
1355
|
-
message.transaction =
|
|
1560
|
+
message.transaction = RawTransaction.decode(reader, reader.uint32());
|
|
1356
1561
|
break;
|
|
1357
1562
|
default:
|
|
1358
1563
|
reader.skipType(tag & 7);
|
|
@@ -1365,7 +1570,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1365
1570
|
fromJSON(object: any): ProcessTransactionsRequest {
|
|
1366
1571
|
return {
|
|
1367
1572
|
transaction: isSet(object.transaction)
|
|
1368
|
-
?
|
|
1573
|
+
? RawTransaction.fromJSON(object.transaction)
|
|
1369
1574
|
: undefined,
|
|
1370
1575
|
};
|
|
1371
1576
|
},
|
|
@@ -1374,7 +1579,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1374
1579
|
const obj: any = {};
|
|
1375
1580
|
message.transaction !== undefined &&
|
|
1376
1581
|
(obj.transaction = message.transaction
|
|
1377
|
-
?
|
|
1582
|
+
? RawTransaction.toJSON(message.transaction)
|
|
1378
1583
|
: undefined);
|
|
1379
1584
|
return obj;
|
|
1380
1585
|
},
|
|
@@ -1385,7 +1590,7 @@ export const ProcessTransactionsRequest = {
|
|
|
1385
1590
|
const message = createBaseProcessTransactionsRequest();
|
|
1386
1591
|
message.transaction =
|
|
1387
1592
|
object.transaction !== undefined && object.transaction !== null
|
|
1388
|
-
?
|
|
1593
|
+
? RawTransaction.fromPartial(object.transaction)
|
|
1389
1594
|
: undefined;
|
|
1390
1595
|
return message;
|
|
1391
1596
|
},
|
|
@@ -1469,7 +1674,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1469
1674
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1470
1675
|
): _m0.Writer {
|
|
1471
1676
|
if (message.result !== undefined) {
|
|
1472
|
-
|
|
1677
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1473
1678
|
}
|
|
1474
1679
|
return writer;
|
|
1475
1680
|
},
|
|
@@ -1485,7 +1690,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1485
1690
|
const tag = reader.uint32();
|
|
1486
1691
|
switch (tag >>> 3) {
|
|
1487
1692
|
case 1:
|
|
1488
|
-
message.result =
|
|
1693
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1489
1694
|
break;
|
|
1490
1695
|
default:
|
|
1491
1696
|
reader.skipType(tag & 7);
|
|
@@ -1498,7 +1703,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1498
1703
|
fromJSON(object: any): ProcessTransactionsResponse {
|
|
1499
1704
|
return {
|
|
1500
1705
|
result: isSet(object.result)
|
|
1501
|
-
?
|
|
1706
|
+
? ProcessResult.fromJSON(object.result)
|
|
1502
1707
|
: undefined,
|
|
1503
1708
|
};
|
|
1504
1709
|
},
|
|
@@ -1507,7 +1712,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1507
1712
|
const obj: any = {};
|
|
1508
1713
|
message.result !== undefined &&
|
|
1509
1714
|
(obj.result = message.result
|
|
1510
|
-
?
|
|
1715
|
+
? ProcessResult.toJSON(message.result)
|
|
1511
1716
|
: undefined);
|
|
1512
1717
|
return obj;
|
|
1513
1718
|
},
|
|
@@ -1518,7 +1723,7 @@ export const ProcessTransactionsResponse = {
|
|
|
1518
1723
|
const message = createBaseProcessTransactionsResponse();
|
|
1519
1724
|
message.result =
|
|
1520
1725
|
object.result !== undefined && object.result !== null
|
|
1521
|
-
?
|
|
1726
|
+
? ProcessResult.fromPartial(object.result)
|
|
1522
1727
|
: undefined;
|
|
1523
1728
|
return message;
|
|
1524
1729
|
},
|
|
@@ -1534,7 +1739,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1534
1739
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1535
1740
|
): _m0.Writer {
|
|
1536
1741
|
if (message.result !== undefined) {
|
|
1537
|
-
|
|
1742
|
+
ProcessResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
1538
1743
|
}
|
|
1539
1744
|
return writer;
|
|
1540
1745
|
},
|
|
@@ -1550,7 +1755,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1550
1755
|
const tag = reader.uint32();
|
|
1551
1756
|
switch (tag >>> 3) {
|
|
1552
1757
|
case 1:
|
|
1553
|
-
message.result =
|
|
1758
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1554
1759
|
break;
|
|
1555
1760
|
default:
|
|
1556
1761
|
reader.skipType(tag & 7);
|
|
@@ -1563,7 +1768,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1563
1768
|
fromJSON(object: any): ProcessInstructionsResponse {
|
|
1564
1769
|
return {
|
|
1565
1770
|
result: isSet(object.result)
|
|
1566
|
-
?
|
|
1771
|
+
? ProcessResult.fromJSON(object.result)
|
|
1567
1772
|
: undefined,
|
|
1568
1773
|
};
|
|
1569
1774
|
},
|
|
@@ -1572,7 +1777,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1572
1777
|
const obj: any = {};
|
|
1573
1778
|
message.result !== undefined &&
|
|
1574
1779
|
(obj.result = message.result
|
|
1575
|
-
?
|
|
1780
|
+
? ProcessResult.toJSON(message.result)
|
|
1576
1781
|
: undefined);
|
|
1577
1782
|
return obj;
|
|
1578
1783
|
},
|
|
@@ -1583,7 +1788,7 @@ export const ProcessInstructionsResponse = {
|
|
|
1583
1788
|
const message = createBaseProcessInstructionsResponse();
|
|
1584
1789
|
message.result =
|
|
1585
1790
|
object.result !== undefined && object.result !== null
|
|
1586
|
-
?
|
|
1791
|
+
? ProcessResult.fromPartial(object.result)
|
|
1587
1792
|
: undefined;
|
|
1588
1793
|
return message;
|
|
1589
1794
|
},
|
|
@@ -1665,7 +1870,7 @@ export const ProcessBlocksResponse = {
|
|
|
1665
1870
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1666
1871
|
): _m0.Writer {
|
|
1667
1872
|
if (message.result !== undefined) {
|
|
1668
|
-
|
|
1873
|
+
ProcessResult.encode(message.result, writer.uint32(18).fork()).ldelim();
|
|
1669
1874
|
}
|
|
1670
1875
|
return writer;
|
|
1671
1876
|
},
|
|
@@ -1681,7 +1886,7 @@ export const ProcessBlocksResponse = {
|
|
|
1681
1886
|
const tag = reader.uint32();
|
|
1682
1887
|
switch (tag >>> 3) {
|
|
1683
1888
|
case 2:
|
|
1684
|
-
message.result =
|
|
1889
|
+
message.result = ProcessResult.decode(reader, reader.uint32());
|
|
1685
1890
|
break;
|
|
1686
1891
|
default:
|
|
1687
1892
|
reader.skipType(tag & 7);
|
|
@@ -1694,7 +1899,7 @@ export const ProcessBlocksResponse = {
|
|
|
1694
1899
|
fromJSON(object: any): ProcessBlocksResponse {
|
|
1695
1900
|
return {
|
|
1696
1901
|
result: isSet(object.result)
|
|
1697
|
-
?
|
|
1902
|
+
? ProcessResult.fromJSON(object.result)
|
|
1698
1903
|
: undefined,
|
|
1699
1904
|
};
|
|
1700
1905
|
},
|
|
@@ -1703,7 +1908,7 @@ export const ProcessBlocksResponse = {
|
|
|
1703
1908
|
const obj: any = {};
|
|
1704
1909
|
message.result !== undefined &&
|
|
1705
1910
|
(obj.result = message.result
|
|
1706
|
-
?
|
|
1911
|
+
? ProcessResult.toJSON(message.result)
|
|
1707
1912
|
: undefined);
|
|
1708
1913
|
return obj;
|
|
1709
1914
|
},
|
|
@@ -1714,7 +1919,7 @@ export const ProcessBlocksResponse = {
|
|
|
1714
1919
|
const message = createBaseProcessBlocksResponse();
|
|
1715
1920
|
message.result =
|
|
1716
1921
|
object.result !== undefined && object.result !== null
|
|
1717
|
-
?
|
|
1922
|
+
? ProcessResult.fromPartial(object.result)
|
|
1718
1923
|
: undefined;
|
|
1719
1924
|
return message;
|
|
1720
1925
|
},
|
|
@@ -1730,7 +1935,7 @@ export const LogBinding = {
|
|
|
1730
1935
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1731
1936
|
): _m0.Writer {
|
|
1732
1937
|
if (message.log !== undefined) {
|
|
1733
|
-
|
|
1938
|
+
RawLog.encode(message.log, writer.uint32(10).fork()).ldelim();
|
|
1734
1939
|
}
|
|
1735
1940
|
if (message.handlerId !== 0) {
|
|
1736
1941
|
writer.uint32(16).int32(message.handlerId);
|
|
@@ -1746,7 +1951,7 @@ export const LogBinding = {
|
|
|
1746
1951
|
const tag = reader.uint32();
|
|
1747
1952
|
switch (tag >>> 3) {
|
|
1748
1953
|
case 1:
|
|
1749
|
-
message.log =
|
|
1954
|
+
message.log = RawLog.decode(reader, reader.uint32());
|
|
1750
1955
|
break;
|
|
1751
1956
|
case 2:
|
|
1752
1957
|
message.handlerId = reader.int32();
|
|
@@ -1761,7 +1966,7 @@ export const LogBinding = {
|
|
|
1761
1966
|
|
|
1762
1967
|
fromJSON(object: any): LogBinding {
|
|
1763
1968
|
return {
|
|
1764
|
-
log: isSet(object.log) ?
|
|
1969
|
+
log: isSet(object.log) ? RawLog.fromJSON(object.log) : undefined,
|
|
1765
1970
|
handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
|
|
1766
1971
|
};
|
|
1767
1972
|
},
|
|
@@ -1769,7 +1974,7 @@ export const LogBinding = {
|
|
|
1769
1974
|
toJSON(message: LogBinding): unknown {
|
|
1770
1975
|
const obj: any = {};
|
|
1771
1976
|
message.log !== undefined &&
|
|
1772
|
-
(obj.log = message.log ?
|
|
1977
|
+
(obj.log = message.log ? RawLog.toJSON(message.log) : undefined);
|
|
1773
1978
|
message.handlerId !== undefined &&
|
|
1774
1979
|
(obj.handlerId = Math.round(message.handlerId));
|
|
1775
1980
|
return obj;
|
|
@@ -1779,29 +1984,153 @@ export const LogBinding = {
|
|
|
1779
1984
|
const message = createBaseLogBinding();
|
|
1780
1985
|
message.log =
|
|
1781
1986
|
object.log !== undefined && object.log !== null
|
|
1782
|
-
?
|
|
1987
|
+
? RawLog.fromPartial(object.log)
|
|
1988
|
+
: undefined;
|
|
1989
|
+
message.handlerId = object.handlerId ?? 0;
|
|
1990
|
+
return message;
|
|
1991
|
+
},
|
|
1992
|
+
};
|
|
1993
|
+
|
|
1994
|
+
function createBaseRawLog(): RawLog {
|
|
1995
|
+
return { raw: new Uint8Array() };
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
export const RawLog = {
|
|
1999
|
+
encode(
|
|
2000
|
+
message: RawLog,
|
|
2001
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2002
|
+
): _m0.Writer {
|
|
2003
|
+
if (message.raw.length !== 0) {
|
|
2004
|
+
writer.uint32(10).bytes(message.raw);
|
|
2005
|
+
}
|
|
2006
|
+
return writer;
|
|
2007
|
+
},
|
|
2008
|
+
|
|
2009
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RawLog {
|
|
2010
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2011
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2012
|
+
const message = createBaseRawLog();
|
|
2013
|
+
while (reader.pos < end) {
|
|
2014
|
+
const tag = reader.uint32();
|
|
2015
|
+
switch (tag >>> 3) {
|
|
2016
|
+
case 1:
|
|
2017
|
+
message.raw = reader.bytes();
|
|
2018
|
+
break;
|
|
2019
|
+
default:
|
|
2020
|
+
reader.skipType(tag & 7);
|
|
2021
|
+
break;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
return message;
|
|
2025
|
+
},
|
|
2026
|
+
|
|
2027
|
+
fromJSON(object: any): RawLog {
|
|
2028
|
+
return {
|
|
2029
|
+
raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
|
|
2030
|
+
};
|
|
2031
|
+
},
|
|
2032
|
+
|
|
2033
|
+
toJSON(message: RawLog): unknown {
|
|
2034
|
+
const obj: any = {};
|
|
2035
|
+
message.raw !== undefined &&
|
|
2036
|
+
(obj.raw = base64FromBytes(
|
|
2037
|
+
message.raw !== undefined ? message.raw : new Uint8Array()
|
|
2038
|
+
));
|
|
2039
|
+
return obj;
|
|
2040
|
+
},
|
|
2041
|
+
|
|
2042
|
+
fromPartial(object: DeepPartial<RawLog>): RawLog {
|
|
2043
|
+
const message = createBaseRawLog();
|
|
2044
|
+
message.raw = object.raw ?? new Uint8Array();
|
|
2045
|
+
return message;
|
|
2046
|
+
},
|
|
2047
|
+
};
|
|
2048
|
+
|
|
2049
|
+
function createBaseTraceBinding(): TraceBinding {
|
|
2050
|
+
return { trace: undefined, handlerId: 0 };
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
export const TraceBinding = {
|
|
2054
|
+
encode(
|
|
2055
|
+
message: TraceBinding,
|
|
2056
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2057
|
+
): _m0.Writer {
|
|
2058
|
+
if (message.trace !== undefined) {
|
|
2059
|
+
RawTrace.encode(message.trace, writer.uint32(10).fork()).ldelim();
|
|
2060
|
+
}
|
|
2061
|
+
if (message.handlerId !== 0) {
|
|
2062
|
+
writer.uint32(16).int32(message.handlerId);
|
|
2063
|
+
}
|
|
2064
|
+
return writer;
|
|
2065
|
+
},
|
|
2066
|
+
|
|
2067
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): TraceBinding {
|
|
2068
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2069
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2070
|
+
const message = createBaseTraceBinding();
|
|
2071
|
+
while (reader.pos < end) {
|
|
2072
|
+
const tag = reader.uint32();
|
|
2073
|
+
switch (tag >>> 3) {
|
|
2074
|
+
case 1:
|
|
2075
|
+
message.trace = RawTrace.decode(reader, reader.uint32());
|
|
2076
|
+
break;
|
|
2077
|
+
case 2:
|
|
2078
|
+
message.handlerId = reader.int32();
|
|
2079
|
+
break;
|
|
2080
|
+
default:
|
|
2081
|
+
reader.skipType(tag & 7);
|
|
2082
|
+
break;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
return message;
|
|
2086
|
+
},
|
|
2087
|
+
|
|
2088
|
+
fromJSON(object: any): TraceBinding {
|
|
2089
|
+
return {
|
|
2090
|
+
trace: isSet(object.trace) ? RawTrace.fromJSON(object.trace) : undefined,
|
|
2091
|
+
handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
|
|
2092
|
+
};
|
|
2093
|
+
},
|
|
2094
|
+
|
|
2095
|
+
toJSON(message: TraceBinding): unknown {
|
|
2096
|
+
const obj: any = {};
|
|
2097
|
+
message.trace !== undefined &&
|
|
2098
|
+
(obj.trace = message.trace ? RawTrace.toJSON(message.trace) : undefined);
|
|
2099
|
+
message.handlerId !== undefined &&
|
|
2100
|
+
(obj.handlerId = Math.round(message.handlerId));
|
|
2101
|
+
return obj;
|
|
2102
|
+
},
|
|
2103
|
+
|
|
2104
|
+
fromPartial(object: DeepPartial<TraceBinding>): TraceBinding {
|
|
2105
|
+
const message = createBaseTraceBinding();
|
|
2106
|
+
message.trace =
|
|
2107
|
+
object.trace !== undefined && object.trace !== null
|
|
2108
|
+
? RawTrace.fromPartial(object.trace)
|
|
1783
2109
|
: undefined;
|
|
1784
2110
|
message.handlerId = object.handlerId ?? 0;
|
|
1785
2111
|
return message;
|
|
1786
2112
|
},
|
|
1787
2113
|
};
|
|
1788
2114
|
|
|
1789
|
-
function
|
|
2115
|
+
function createBaseRawTrace(): RawTrace {
|
|
1790
2116
|
return { raw: new Uint8Array() };
|
|
1791
2117
|
}
|
|
1792
2118
|
|
|
1793
|
-
export const
|
|
1794
|
-
encode(
|
|
2119
|
+
export const RawTrace = {
|
|
2120
|
+
encode(
|
|
2121
|
+
message: RawTrace,
|
|
2122
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2123
|
+
): _m0.Writer {
|
|
1795
2124
|
if (message.raw.length !== 0) {
|
|
1796
2125
|
writer.uint32(10).bytes(message.raw);
|
|
1797
2126
|
}
|
|
1798
2127
|
return writer;
|
|
1799
2128
|
},
|
|
1800
2129
|
|
|
1801
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2130
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RawTrace {
|
|
1802
2131
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1803
2132
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1804
|
-
const message =
|
|
2133
|
+
const message = createBaseRawTrace();
|
|
1805
2134
|
while (reader.pos < end) {
|
|
1806
2135
|
const tag = reader.uint32();
|
|
1807
2136
|
switch (tag >>> 3) {
|
|
@@ -1816,13 +2145,13 @@ export const Log = {
|
|
|
1816
2145
|
return message;
|
|
1817
2146
|
},
|
|
1818
2147
|
|
|
1819
|
-
fromJSON(object: any):
|
|
2148
|
+
fromJSON(object: any): RawTrace {
|
|
1820
2149
|
return {
|
|
1821
2150
|
raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
|
|
1822
2151
|
};
|
|
1823
2152
|
},
|
|
1824
2153
|
|
|
1825
|
-
toJSON(message:
|
|
2154
|
+
toJSON(message: RawTrace): unknown {
|
|
1826
2155
|
const obj: any = {};
|
|
1827
2156
|
message.raw !== undefined &&
|
|
1828
2157
|
(obj.raw = base64FromBytes(
|
|
@@ -1831,20 +2160,20 @@ export const Log = {
|
|
|
1831
2160
|
return obj;
|
|
1832
2161
|
},
|
|
1833
2162
|
|
|
1834
|
-
fromPartial(object: DeepPartial<
|
|
1835
|
-
const message =
|
|
2163
|
+
fromPartial(object: DeepPartial<RawTrace>): RawTrace {
|
|
2164
|
+
const message = createBaseRawTrace();
|
|
1836
2165
|
message.raw = object.raw ?? new Uint8Array();
|
|
1837
2166
|
return message;
|
|
1838
2167
|
},
|
|
1839
2168
|
};
|
|
1840
2169
|
|
|
1841
|
-
function
|
|
2170
|
+
function createBaseRawTransaction(): RawTransaction {
|
|
1842
2171
|
return { txHash: "", raw: new Uint8Array(), programAccountId: "" };
|
|
1843
2172
|
}
|
|
1844
2173
|
|
|
1845
|
-
export const
|
|
2174
|
+
export const RawTransaction = {
|
|
1846
2175
|
encode(
|
|
1847
|
-
message:
|
|
2176
|
+
message: RawTransaction,
|
|
1848
2177
|
writer: _m0.Writer = _m0.Writer.create()
|
|
1849
2178
|
): _m0.Writer {
|
|
1850
2179
|
if (message.txHash !== "") {
|
|
@@ -1859,10 +2188,10 @@ export const Transaction = {
|
|
|
1859
2188
|
return writer;
|
|
1860
2189
|
},
|
|
1861
2190
|
|
|
1862
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2191
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RawTransaction {
|
|
1863
2192
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
1864
2193
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1865
|
-
const message =
|
|
2194
|
+
const message = createBaseRawTransaction();
|
|
1866
2195
|
while (reader.pos < end) {
|
|
1867
2196
|
const tag = reader.uint32();
|
|
1868
2197
|
switch (tag >>> 3) {
|
|
@@ -1883,7 +2212,7 @@ export const Transaction = {
|
|
|
1883
2212
|
return message;
|
|
1884
2213
|
},
|
|
1885
2214
|
|
|
1886
|
-
fromJSON(object: any):
|
|
2215
|
+
fromJSON(object: any): RawTransaction {
|
|
1887
2216
|
return {
|
|
1888
2217
|
txHash: isSet(object.txHash) ? String(object.txHash) : "",
|
|
1889
2218
|
raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
|
|
@@ -1893,7 +2222,7 @@ export const Transaction = {
|
|
|
1893
2222
|
};
|
|
1894
2223
|
},
|
|
1895
2224
|
|
|
1896
|
-
toJSON(message:
|
|
2225
|
+
toJSON(message: RawTransaction): unknown {
|
|
1897
2226
|
const obj: any = {};
|
|
1898
2227
|
message.txHash !== undefined && (obj.txHash = message.txHash);
|
|
1899
2228
|
message.raw !== undefined &&
|
|
@@ -1905,8 +2234,8 @@ export const Transaction = {
|
|
|
1905
2234
|
return obj;
|
|
1906
2235
|
},
|
|
1907
2236
|
|
|
1908
|
-
fromPartial(object: DeepPartial<
|
|
1909
|
-
const message =
|
|
2237
|
+
fromPartial(object: DeepPartial<RawTransaction>): RawTransaction {
|
|
2238
|
+
const message = createBaseRawTransaction();
|
|
1910
2239
|
message.txHash = object.txHash ?? "";
|
|
1911
2240
|
message.raw = object.raw ?? new Uint8Array();
|
|
1912
2241
|
message.programAccountId = object.programAccountId ?? "";
|
|
@@ -2022,7 +2351,7 @@ export const BlockBinding = {
|
|
|
2022
2351
|
writer: _m0.Writer = _m0.Writer.create()
|
|
2023
2352
|
): _m0.Writer {
|
|
2024
2353
|
if (message.block !== undefined) {
|
|
2025
|
-
|
|
2354
|
+
RawBlock.encode(message.block, writer.uint32(10).fork()).ldelim();
|
|
2026
2355
|
}
|
|
2027
2356
|
writer.uint32(18).fork();
|
|
2028
2357
|
for (const v of message.handlerIds) {
|
|
@@ -2040,7 +2369,7 @@ export const BlockBinding = {
|
|
|
2040
2369
|
const tag = reader.uint32();
|
|
2041
2370
|
switch (tag >>> 3) {
|
|
2042
2371
|
case 1:
|
|
2043
|
-
message.block =
|
|
2372
|
+
message.block = RawBlock.decode(reader, reader.uint32());
|
|
2044
2373
|
break;
|
|
2045
2374
|
case 2:
|
|
2046
2375
|
if ((tag & 7) === 2) {
|
|
@@ -2062,7 +2391,7 @@ export const BlockBinding = {
|
|
|
2062
2391
|
|
|
2063
2392
|
fromJSON(object: any): BlockBinding {
|
|
2064
2393
|
return {
|
|
2065
|
-
block: isSet(object.block) ?
|
|
2394
|
+
block: isSet(object.block) ? RawBlock.fromJSON(object.block) : undefined,
|
|
2066
2395
|
handlerIds: Array.isArray(object?.handlerIds)
|
|
2067
2396
|
? object.handlerIds.map((e: any) => Number(e))
|
|
2068
2397
|
: [],
|
|
@@ -2072,7 +2401,7 @@ export const BlockBinding = {
|
|
|
2072
2401
|
toJSON(message: BlockBinding): unknown {
|
|
2073
2402
|
const obj: any = {};
|
|
2074
2403
|
message.block !== undefined &&
|
|
2075
|
-
(obj.block = message.block ?
|
|
2404
|
+
(obj.block = message.block ? RawBlock.toJSON(message.block) : undefined);
|
|
2076
2405
|
if (message.handlerIds) {
|
|
2077
2406
|
obj.handlerIds = message.handlerIds.map((e) => Math.round(e));
|
|
2078
2407
|
} else {
|
|
@@ -2085,29 +2414,32 @@ export const BlockBinding = {
|
|
|
2085
2414
|
const message = createBaseBlockBinding();
|
|
2086
2415
|
message.block =
|
|
2087
2416
|
object.block !== undefined && object.block !== null
|
|
2088
|
-
?
|
|
2417
|
+
? RawBlock.fromPartial(object.block)
|
|
2089
2418
|
: undefined;
|
|
2090
2419
|
message.handlerIds = object.handlerIds?.map((e) => e) || [];
|
|
2091
2420
|
return message;
|
|
2092
2421
|
},
|
|
2093
2422
|
};
|
|
2094
2423
|
|
|
2095
|
-
function
|
|
2424
|
+
function createBaseRawBlock(): RawBlock {
|
|
2096
2425
|
return { raw: new Uint8Array() };
|
|
2097
2426
|
}
|
|
2098
2427
|
|
|
2099
|
-
export const
|
|
2100
|
-
encode(
|
|
2428
|
+
export const RawBlock = {
|
|
2429
|
+
encode(
|
|
2430
|
+
message: RawBlock,
|
|
2431
|
+
writer: _m0.Writer = _m0.Writer.create()
|
|
2432
|
+
): _m0.Writer {
|
|
2101
2433
|
if (message.raw.length !== 0) {
|
|
2102
2434
|
writer.uint32(10).bytes(message.raw);
|
|
2103
2435
|
}
|
|
2104
2436
|
return writer;
|
|
2105
2437
|
},
|
|
2106
2438
|
|
|
2107
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2439
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RawBlock {
|
|
2108
2440
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2109
2441
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2110
|
-
const message =
|
|
2442
|
+
const message = createBaseRawBlock();
|
|
2111
2443
|
while (reader.pos < end) {
|
|
2112
2444
|
const tag = reader.uint32();
|
|
2113
2445
|
switch (tag >>> 3) {
|
|
@@ -2122,13 +2454,13 @@ export const Block = {
|
|
|
2122
2454
|
return message;
|
|
2123
2455
|
},
|
|
2124
2456
|
|
|
2125
|
-
fromJSON(object: any):
|
|
2457
|
+
fromJSON(object: any): RawBlock {
|
|
2126
2458
|
return {
|
|
2127
2459
|
raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
|
|
2128
2460
|
};
|
|
2129
2461
|
},
|
|
2130
2462
|
|
|
2131
|
-
toJSON(message:
|
|
2463
|
+
toJSON(message: RawBlock): unknown {
|
|
2132
2464
|
const obj: any = {};
|
|
2133
2465
|
message.raw !== undefined &&
|
|
2134
2466
|
(obj.raw = base64FromBytes(
|
|
@@ -2137,20 +2469,20 @@ export const Block = {
|
|
|
2137
2469
|
return obj;
|
|
2138
2470
|
},
|
|
2139
2471
|
|
|
2140
|
-
fromPartial(object: DeepPartial<
|
|
2141
|
-
const message =
|
|
2472
|
+
fromPartial(object: DeepPartial<RawBlock>): RawBlock {
|
|
2473
|
+
const message = createBaseRawBlock();
|
|
2142
2474
|
message.raw = object.raw ?? new Uint8Array();
|
|
2143
2475
|
return message;
|
|
2144
2476
|
},
|
|
2145
2477
|
};
|
|
2146
2478
|
|
|
2147
|
-
function
|
|
2148
|
-
return { gauges: [], counters: [] };
|
|
2479
|
+
function createBaseProcessResult(): ProcessResult {
|
|
2480
|
+
return { gauges: [], counters: [], logs: [] };
|
|
2149
2481
|
}
|
|
2150
2482
|
|
|
2151
|
-
export const
|
|
2483
|
+
export const ProcessResult = {
|
|
2152
2484
|
encode(
|
|
2153
|
-
message:
|
|
2485
|
+
message: ProcessResult,
|
|
2154
2486
|
writer: _m0.Writer = _m0.Writer.create()
|
|
2155
2487
|
): _m0.Writer {
|
|
2156
2488
|
for (const v of message.gauges) {
|
|
@@ -2159,13 +2491,16 @@ export const O11yResult = {
|
|
|
2159
2491
|
for (const v of message.counters) {
|
|
2160
2492
|
CounterResult.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
2161
2493
|
}
|
|
2494
|
+
for (const v of message.logs) {
|
|
2495
|
+
LogResult.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
2496
|
+
}
|
|
2162
2497
|
return writer;
|
|
2163
2498
|
},
|
|
2164
2499
|
|
|
2165
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
2500
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ProcessResult {
|
|
2166
2501
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
2167
2502
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2168
|
-
const message =
|
|
2503
|
+
const message = createBaseProcessResult();
|
|
2169
2504
|
while (reader.pos < end) {
|
|
2170
2505
|
const tag = reader.uint32();
|
|
2171
2506
|
switch (tag >>> 3) {
|
|
@@ -2175,6 +2510,9 @@ export const O11yResult = {
|
|
|
2175
2510
|
case 2:
|
|
2176
2511
|
message.counters.push(CounterResult.decode(reader, reader.uint32()));
|
|
2177
2512
|
break;
|
|
2513
|
+
case 3:
|
|
2514
|
+
message.logs.push(LogResult.decode(reader, reader.uint32()));
|
|
2515
|
+
break;
|
|
2178
2516
|
default:
|
|
2179
2517
|
reader.skipType(tag & 7);
|
|
2180
2518
|
break;
|
|
@@ -2183,7 +2521,7 @@ export const O11yResult = {
|
|
|
2183
2521
|
return message;
|
|
2184
2522
|
},
|
|
2185
2523
|
|
|
2186
|
-
fromJSON(object: any):
|
|
2524
|
+
fromJSON(object: any): ProcessResult {
|
|
2187
2525
|
return {
|
|
2188
2526
|
gauges: Array.isArray(object?.gauges)
|
|
2189
2527
|
? object.gauges.map((e: any) => GaugeResult.fromJSON(e))
|
|
@@ -2191,10 +2529,13 @@ export const O11yResult = {
|
|
|
2191
2529
|
counters: Array.isArray(object?.counters)
|
|
2192
2530
|
? object.counters.map((e: any) => CounterResult.fromJSON(e))
|
|
2193
2531
|
: [],
|
|
2532
|
+
logs: Array.isArray(object?.logs)
|
|
2533
|
+
? object.logs.map((e: any) => LogResult.fromJSON(e))
|
|
2534
|
+
: [],
|
|
2194
2535
|
};
|
|
2195
2536
|
},
|
|
2196
2537
|
|
|
2197
|
-
toJSON(message:
|
|
2538
|
+
toJSON(message: ProcessResult): unknown {
|
|
2198
2539
|
const obj: any = {};
|
|
2199
2540
|
if (message.gauges) {
|
|
2200
2541
|
obj.gauges = message.gauges.map((e) =>
|
|
@@ -2210,15 +2551,21 @@ export const O11yResult = {
|
|
|
2210
2551
|
} else {
|
|
2211
2552
|
obj.counters = [];
|
|
2212
2553
|
}
|
|
2554
|
+
if (message.logs) {
|
|
2555
|
+
obj.logs = message.logs.map((e) => (e ? LogResult.toJSON(e) : undefined));
|
|
2556
|
+
} else {
|
|
2557
|
+
obj.logs = [];
|
|
2558
|
+
}
|
|
2213
2559
|
return obj;
|
|
2214
2560
|
},
|
|
2215
2561
|
|
|
2216
|
-
fromPartial(object: DeepPartial<
|
|
2217
|
-
const message =
|
|
2562
|
+
fromPartial(object: DeepPartial<ProcessResult>): ProcessResult {
|
|
2563
|
+
const message = createBaseProcessResult();
|
|
2218
2564
|
message.gauges =
|
|
2219
2565
|
object.gauges?.map((e) => GaugeResult.fromPartial(e)) || [];
|
|
2220
2566
|
message.counters =
|
|
2221
2567
|
object.counters?.map((e) => CounterResult.fromPartial(e)) || [];
|
|
2568
|
+
message.logs = object.logs?.map((e) => LogResult.fromPartial(e)) || [];
|
|
2222
2569
|
return message;
|
|
2223
2570
|
},
|
|
2224
2571
|
};
|
|
@@ -2874,6 +3221,107 @@ export const CounterResult = {
|
|
|
2874
3221
|
},
|
|
2875
3222
|
};
|
|
2876
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
|
+
|
|
2877
3325
|
export type ProcessorDefinition = typeof ProcessorDefinition;
|
|
2878
3326
|
export const ProcessorDefinition = {
|
|
2879
3327
|
name: "Processor",
|
|
@@ -2911,6 +3359,14 @@ export const ProcessorDefinition = {
|
|
|
2911
3359
|
responseStream: false,
|
|
2912
3360
|
options: {},
|
|
2913
3361
|
},
|
|
3362
|
+
processTraces: {
|
|
3363
|
+
name: "ProcessTraces",
|
|
3364
|
+
requestType: ProcessTracesRequest,
|
|
3365
|
+
requestStream: false,
|
|
3366
|
+
responseType: ProcessTracesResponse,
|
|
3367
|
+
responseStream: false,
|
|
3368
|
+
options: {},
|
|
3369
|
+
},
|
|
2914
3370
|
processTransactions: {
|
|
2915
3371
|
name: "ProcessTransactions",
|
|
2916
3372
|
requestType: ProcessTransactionsRequest,
|
|
@@ -2955,6 +3411,10 @@ export interface ProcessorServiceImplementation<CallContextExt = {}> {
|
|
|
2955
3411
|
request: ProcessLogsRequest,
|
|
2956
3412
|
context: CallContext & CallContextExt
|
|
2957
3413
|
): Promise<DeepPartial<ProcessLogsResponse>>;
|
|
3414
|
+
processTraces(
|
|
3415
|
+
request: ProcessTracesRequest,
|
|
3416
|
+
context: CallContext & CallContextExt
|
|
3417
|
+
): Promise<DeepPartial<ProcessTracesResponse>>;
|
|
2958
3418
|
processTransactions(
|
|
2959
3419
|
request: ProcessTransactionsRequest,
|
|
2960
3420
|
context: CallContext & CallContextExt
|
|
@@ -2986,6 +3446,10 @@ export interface ProcessorClient<CallOptionsExt = {}> {
|
|
|
2986
3446
|
request: DeepPartial<ProcessLogsRequest>,
|
|
2987
3447
|
options?: CallOptions & CallOptionsExt
|
|
2988
3448
|
): Promise<ProcessLogsResponse>;
|
|
3449
|
+
processTraces(
|
|
3450
|
+
request: DeepPartial<ProcessTracesRequest>,
|
|
3451
|
+
options?: CallOptions & CallOptionsExt
|
|
3452
|
+
): Promise<ProcessTracesResponse>;
|
|
2989
3453
|
processTransactions(
|
|
2990
3454
|
request: DeepPartial<ProcessTransactionsRequest>,
|
|
2991
3455
|
options?: CallOptions & CallOptionsExt
|