@sentio/sdk 0.2.19 → 0.3.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/dist/base-processor-template.d.ts +2 -1
- package/dist/base-processor-template.js +7 -6
- package/dist/base-processor-template.js.map +1 -1
- package/dist/base-processor.d.ts +3 -3
- package/dist/base-processor.js +12 -10
- package/dist/base-processor.js.map +1 -1
- package/dist/bind-options.d.ts +1 -0
- package/dist/bind-options.js +19 -1
- package/dist/bind-options.js.map +1 -1
- package/dist/cli/build.js +11 -10
- package/dist/cli/build.js.map +1 -1
- package/dist/context.d.ts +4 -4
- package/dist/context.js +3 -3
- package/dist/context.js.map +1 -1
- package/dist/error.d.ts +2 -0
- package/dist/error.js +25 -0
- package/dist/error.js.map +1 -0
- package/dist/gen/processor/protos/processor.d.ts +53 -23
- package/dist/gen/processor/protos/processor.js +171 -120
- package/dist/gen/processor/protos/processor.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/meter.d.ts +2 -2
- package/dist/meter.js +12 -12
- package/dist/meter.js.map +1 -1
- package/dist/provider.d.ts +2 -2
- package/dist/provider.js +13 -1
- package/dist/provider.js.map +1 -1
- package/dist/service.d.ts +2 -1
- package/dist/service.js +47 -29
- package/dist/service.js.map +1 -1
- package/dist/solana/builtin/spl-token-processor.d.ts +25 -0
- package/dist/solana/builtin/spl-token-processor.js +153 -0
- package/dist/solana/builtin/spl-token-processor.js.map +1 -0
- package/dist/solana-processor.d.ts +4 -2
- package/dist/solana-processor.js +7 -2
- package/dist/solana-processor.js.map +1 -1
- package/dist/target-ethers-sentio/codegen.js +9 -14
- package/dist/target-ethers-sentio/codegen.js.map +1 -1
- package/dist/test-case/erc20-template.js.map +1 -1
- package/dist/test-case/erc20.js +3 -3
- package/dist/test-case/erc20.js.map +1 -1
- package/dist/test-case/erc20.test.js +11 -7
- package/dist/test-case/erc20.test.js.map +1 -1
- package/dist/test-case/solana.test.js +2 -2
- package/dist/test-case/solana.test.js.map +1 -1
- package/dist/test-case/types/erc20_processor.js +4 -8
- package/dist/test-case/types/erc20_processor.js.map +1 -1
- package/package.json +3 -2
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ProcessorDefinition = exports.CounterResult = exports.
|
|
6
|
+
exports.ProcessorDefinition = exports.CounterResult = exports.GaugeResult = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlocksResponse = exports.ProcessBlocksRequest = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.StartRequest = exports.TemplateInstance = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = void 0;
|
|
7
7
|
const long_1 = __importDefault(require("long"));
|
|
8
8
|
const empty_1 = require("../../google/protobuf/empty");
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -185,8 +185,7 @@ function createBaseContractConfig() {
|
|
|
185
185
|
logConfigs: [],
|
|
186
186
|
startBlock: long_1.default.UZERO,
|
|
187
187
|
endBlock: long_1.default.UZERO,
|
|
188
|
-
|
|
189
|
-
instructionConfig: [],
|
|
188
|
+
instructionConfig: undefined,
|
|
190
189
|
};
|
|
191
190
|
}
|
|
192
191
|
exports.ContractConfig = {
|
|
@@ -206,11 +205,8 @@ exports.ContractConfig = {
|
|
|
206
205
|
if (!message.endBlock.isZero()) {
|
|
207
206
|
writer.uint32(40).uint64(message.endBlock);
|
|
208
207
|
}
|
|
209
|
-
|
|
210
|
-
exports.
|
|
211
|
-
}
|
|
212
|
-
for (const v of message.instructionConfig) {
|
|
213
|
-
exports.InstructionHandlerConfig.encode(v, writer.uint32(66).fork()).ldelim();
|
|
208
|
+
if (message.instructionConfig !== undefined) {
|
|
209
|
+
exports.InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
|
|
214
210
|
}
|
|
215
211
|
return writer;
|
|
216
212
|
},
|
|
@@ -236,11 +232,8 @@ exports.ContractConfig = {
|
|
|
236
232
|
case 5:
|
|
237
233
|
message.endBlock = reader.uint64();
|
|
238
234
|
break;
|
|
239
|
-
case
|
|
240
|
-
message.
|
|
241
|
-
break;
|
|
242
|
-
case 8:
|
|
243
|
-
message.instructionConfig.push(exports.InstructionHandlerConfig.decode(reader, reader.uint32()));
|
|
235
|
+
case 6:
|
|
236
|
+
message.instructionConfig = exports.InstructionHandlerConfig.decode(reader, reader.uint32());
|
|
244
237
|
break;
|
|
245
238
|
default:
|
|
246
239
|
reader.skipType(tag & 7);
|
|
@@ -266,12 +259,9 @@ exports.ContractConfig = {
|
|
|
266
259
|
endBlock: isSet(object.endBlock)
|
|
267
260
|
? long_1.default.fromValue(object.endBlock)
|
|
268
261
|
: long_1.default.UZERO,
|
|
269
|
-
|
|
270
|
-
?
|
|
271
|
-
:
|
|
272
|
-
instructionConfig: Array.isArray(object?.instructionConfig)
|
|
273
|
-
? object.instructionConfig.map((e) => exports.InstructionHandlerConfig.fromJSON(e))
|
|
274
|
-
: [],
|
|
262
|
+
instructionConfig: isSet(object.instructionConfig)
|
|
263
|
+
? exports.InstructionHandlerConfig.fromJSON(object.instructionConfig)
|
|
264
|
+
: undefined,
|
|
275
265
|
};
|
|
276
266
|
},
|
|
277
267
|
toJSON(message) {
|
|
@@ -294,18 +284,10 @@ exports.ContractConfig = {
|
|
|
294
284
|
(obj.startBlock = (message.startBlock || long_1.default.UZERO).toString());
|
|
295
285
|
message.endBlock !== undefined &&
|
|
296
286
|
(obj.endBlock = (message.endBlock || long_1.default.UZERO).toString());
|
|
297
|
-
|
|
298
|
-
obj.
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
obj.transactionConfig = [];
|
|
302
|
-
}
|
|
303
|
-
if (message.instructionConfig) {
|
|
304
|
-
obj.instructionConfig = message.instructionConfig.map((e) => e ? exports.InstructionHandlerConfig.toJSON(e) : undefined);
|
|
305
|
-
}
|
|
306
|
-
else {
|
|
307
|
-
obj.instructionConfig = [];
|
|
308
|
-
}
|
|
287
|
+
message.instructionConfig !== undefined &&
|
|
288
|
+
(obj.instructionConfig = message.instructionConfig
|
|
289
|
+
? exports.InstructionHandlerConfig.toJSON(message.instructionConfig)
|
|
290
|
+
: undefined);
|
|
309
291
|
return obj;
|
|
310
292
|
},
|
|
311
293
|
fromPartial(object) {
|
|
@@ -328,10 +310,11 @@ exports.ContractConfig = {
|
|
|
328
310
|
object.endBlock !== undefined && object.endBlock !== null
|
|
329
311
|
? long_1.default.fromValue(object.endBlock)
|
|
330
312
|
: long_1.default.UZERO;
|
|
331
|
-
message.transactionConfig =
|
|
332
|
-
object.transactionConfig?.map((e) => exports.TransactionHandlerConfig.fromPartial(e)) || [];
|
|
333
313
|
message.instructionConfig =
|
|
334
|
-
object.instructionConfig
|
|
314
|
+
object.instructionConfig !== undefined &&
|
|
315
|
+
object.instructionConfig !== null
|
|
316
|
+
? exports.InstructionHandlerConfig.fromPartial(object.instructionConfig)
|
|
317
|
+
: undefined;
|
|
335
318
|
return message;
|
|
336
319
|
},
|
|
337
320
|
};
|
|
@@ -708,69 +691,13 @@ exports.HandlerCondition = {
|
|
|
708
691
|
return message;
|
|
709
692
|
},
|
|
710
693
|
};
|
|
711
|
-
function createBaseTransactionHandlerConfig() {
|
|
712
|
-
return { handlerName: "", address: "" };
|
|
713
|
-
}
|
|
714
|
-
exports.TransactionHandlerConfig = {
|
|
715
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
716
|
-
if (message.handlerName !== "") {
|
|
717
|
-
writer.uint32(10).string(message.handlerName);
|
|
718
|
-
}
|
|
719
|
-
if (message.address !== "") {
|
|
720
|
-
writer.uint32(18).string(message.address);
|
|
721
|
-
}
|
|
722
|
-
return writer;
|
|
723
|
-
},
|
|
724
|
-
decode(input, length) {
|
|
725
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
726
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
727
|
-
const message = createBaseTransactionHandlerConfig();
|
|
728
|
-
while (reader.pos < end) {
|
|
729
|
-
const tag = reader.uint32();
|
|
730
|
-
switch (tag >>> 3) {
|
|
731
|
-
case 1:
|
|
732
|
-
message.handlerName = reader.string();
|
|
733
|
-
break;
|
|
734
|
-
case 2:
|
|
735
|
-
message.address = reader.string();
|
|
736
|
-
break;
|
|
737
|
-
default:
|
|
738
|
-
reader.skipType(tag & 7);
|
|
739
|
-
break;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
return message;
|
|
743
|
-
},
|
|
744
|
-
fromJSON(object) {
|
|
745
|
-
return {
|
|
746
|
-
handlerName: isSet(object.handlerName) ? String(object.handlerName) : "",
|
|
747
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
748
|
-
};
|
|
749
|
-
},
|
|
750
|
-
toJSON(message) {
|
|
751
|
-
const obj = {};
|
|
752
|
-
message.handlerName !== undefined &&
|
|
753
|
-
(obj.handlerName = message.handlerName);
|
|
754
|
-
message.address !== undefined && (obj.address = message.address);
|
|
755
|
-
return obj;
|
|
756
|
-
},
|
|
757
|
-
fromPartial(object) {
|
|
758
|
-
const message = createBaseTransactionHandlerConfig();
|
|
759
|
-
message.handlerName = object.handlerName ?? "";
|
|
760
|
-
message.address = object.address ?? "";
|
|
761
|
-
return message;
|
|
762
|
-
},
|
|
763
|
-
};
|
|
764
694
|
function createBaseInstructionHandlerConfig() {
|
|
765
|
-
return {
|
|
695
|
+
return { processInnerInstruction: false };
|
|
766
696
|
}
|
|
767
697
|
exports.InstructionHandlerConfig = {
|
|
768
698
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
769
|
-
if (message.
|
|
770
|
-
writer.uint32(
|
|
771
|
-
}
|
|
772
|
-
if (message.address !== "") {
|
|
773
|
-
writer.uint32(18).string(message.address);
|
|
699
|
+
if (message.processInnerInstruction === true) {
|
|
700
|
+
writer.uint32(8).bool(message.processInnerInstruction);
|
|
774
701
|
}
|
|
775
702
|
return writer;
|
|
776
703
|
},
|
|
@@ -782,10 +709,7 @@ exports.InstructionHandlerConfig = {
|
|
|
782
709
|
const tag = reader.uint32();
|
|
783
710
|
switch (tag >>> 3) {
|
|
784
711
|
case 1:
|
|
785
|
-
message.
|
|
786
|
-
break;
|
|
787
|
-
case 2:
|
|
788
|
-
message.address = reader.string();
|
|
712
|
+
message.processInnerInstruction = reader.bool();
|
|
789
713
|
break;
|
|
790
714
|
default:
|
|
791
715
|
reader.skipType(tag & 7);
|
|
@@ -796,21 +720,20 @@ exports.InstructionHandlerConfig = {
|
|
|
796
720
|
},
|
|
797
721
|
fromJSON(object) {
|
|
798
722
|
return {
|
|
799
|
-
|
|
800
|
-
|
|
723
|
+
processInnerInstruction: isSet(object.processInnerInstruction)
|
|
724
|
+
? Boolean(object.processInnerInstruction)
|
|
725
|
+
: false,
|
|
801
726
|
};
|
|
802
727
|
},
|
|
803
728
|
toJSON(message) {
|
|
804
729
|
const obj = {};
|
|
805
|
-
message.
|
|
806
|
-
(obj.
|
|
807
|
-
message.address !== undefined && (obj.address = message.address);
|
|
730
|
+
message.processInnerInstruction !== undefined &&
|
|
731
|
+
(obj.processInnerInstruction = message.processInnerInstruction);
|
|
808
732
|
return obj;
|
|
809
733
|
},
|
|
810
734
|
fromPartial(object) {
|
|
811
735
|
const message = createBaseInstructionHandlerConfig();
|
|
812
|
-
message.
|
|
813
|
-
message.address = object.address ?? "";
|
|
736
|
+
message.processInnerInstruction = object.processInnerInstruction ?? false;
|
|
814
737
|
return message;
|
|
815
738
|
},
|
|
816
739
|
};
|
|
@@ -1288,6 +1211,108 @@ exports.ProcessBlockResponse = {
|
|
|
1288
1211
|
return message;
|
|
1289
1212
|
},
|
|
1290
1213
|
};
|
|
1214
|
+
function createBaseProcessBlocksRequest() {
|
|
1215
|
+
return { requests: [] };
|
|
1216
|
+
}
|
|
1217
|
+
exports.ProcessBlocksRequest = {
|
|
1218
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1219
|
+
for (const v of message.requests) {
|
|
1220
|
+
exports.ProcessBlockRequest.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1221
|
+
}
|
|
1222
|
+
return writer;
|
|
1223
|
+
},
|
|
1224
|
+
decode(input, length) {
|
|
1225
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1226
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1227
|
+
const message = createBaseProcessBlocksRequest();
|
|
1228
|
+
while (reader.pos < end) {
|
|
1229
|
+
const tag = reader.uint32();
|
|
1230
|
+
switch (tag >>> 3) {
|
|
1231
|
+
case 1:
|
|
1232
|
+
message.requests.push(exports.ProcessBlockRequest.decode(reader, reader.uint32()));
|
|
1233
|
+
break;
|
|
1234
|
+
default:
|
|
1235
|
+
reader.skipType(tag & 7);
|
|
1236
|
+
break;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
return message;
|
|
1240
|
+
},
|
|
1241
|
+
fromJSON(object) {
|
|
1242
|
+
return {
|
|
1243
|
+
requests: Array.isArray(object?.requests)
|
|
1244
|
+
? object.requests.map((e) => exports.ProcessBlockRequest.fromJSON(e))
|
|
1245
|
+
: [],
|
|
1246
|
+
};
|
|
1247
|
+
},
|
|
1248
|
+
toJSON(message) {
|
|
1249
|
+
const obj = {};
|
|
1250
|
+
if (message.requests) {
|
|
1251
|
+
obj.requests = message.requests.map((e) => e ? exports.ProcessBlockRequest.toJSON(e) : undefined);
|
|
1252
|
+
}
|
|
1253
|
+
else {
|
|
1254
|
+
obj.requests = [];
|
|
1255
|
+
}
|
|
1256
|
+
return obj;
|
|
1257
|
+
},
|
|
1258
|
+
fromPartial(object) {
|
|
1259
|
+
const message = createBaseProcessBlocksRequest();
|
|
1260
|
+
message.requests =
|
|
1261
|
+
object.requests?.map((e) => exports.ProcessBlockRequest.fromPartial(e)) || [];
|
|
1262
|
+
return message;
|
|
1263
|
+
},
|
|
1264
|
+
};
|
|
1265
|
+
function createBaseProcessBlocksResponse() {
|
|
1266
|
+
return { response: [] };
|
|
1267
|
+
}
|
|
1268
|
+
exports.ProcessBlocksResponse = {
|
|
1269
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1270
|
+
for (const v of message.response) {
|
|
1271
|
+
exports.ProcessBlockResponse.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1272
|
+
}
|
|
1273
|
+
return writer;
|
|
1274
|
+
},
|
|
1275
|
+
decode(input, length) {
|
|
1276
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1277
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1278
|
+
const message = createBaseProcessBlocksResponse();
|
|
1279
|
+
while (reader.pos < end) {
|
|
1280
|
+
const tag = reader.uint32();
|
|
1281
|
+
switch (tag >>> 3) {
|
|
1282
|
+
case 1:
|
|
1283
|
+
message.response.push(exports.ProcessBlockResponse.decode(reader, reader.uint32()));
|
|
1284
|
+
break;
|
|
1285
|
+
default:
|
|
1286
|
+
reader.skipType(tag & 7);
|
|
1287
|
+
break;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return message;
|
|
1291
|
+
},
|
|
1292
|
+
fromJSON(object) {
|
|
1293
|
+
return {
|
|
1294
|
+
response: Array.isArray(object?.response)
|
|
1295
|
+
? object.response.map((e) => exports.ProcessBlockResponse.fromJSON(e))
|
|
1296
|
+
: [],
|
|
1297
|
+
};
|
|
1298
|
+
},
|
|
1299
|
+
toJSON(message) {
|
|
1300
|
+
const obj = {};
|
|
1301
|
+
if (message.response) {
|
|
1302
|
+
obj.response = message.response.map((e) => e ? exports.ProcessBlockResponse.toJSON(e) : undefined);
|
|
1303
|
+
}
|
|
1304
|
+
else {
|
|
1305
|
+
obj.response = [];
|
|
1306
|
+
}
|
|
1307
|
+
return obj;
|
|
1308
|
+
},
|
|
1309
|
+
fromPartial(object) {
|
|
1310
|
+
const message = createBaseProcessBlocksResponse();
|
|
1311
|
+
message.response =
|
|
1312
|
+
object.response?.map((e) => exports.ProcessBlockResponse.fromPartial(e)) || [];
|
|
1313
|
+
return message;
|
|
1314
|
+
},
|
|
1315
|
+
};
|
|
1291
1316
|
function createBaseLogBinding() {
|
|
1292
1317
|
return { log: undefined, handlerId: 0 };
|
|
1293
1318
|
}
|
|
@@ -1455,7 +1480,12 @@ exports.Transaction = {
|
|
|
1455
1480
|
},
|
|
1456
1481
|
};
|
|
1457
1482
|
function createBaseInstruction() {
|
|
1458
|
-
return {
|
|
1483
|
+
return {
|
|
1484
|
+
instructionData: "",
|
|
1485
|
+
slot: long_1.default.UZERO,
|
|
1486
|
+
programAccountId: "",
|
|
1487
|
+
parsed: undefined,
|
|
1488
|
+
};
|
|
1459
1489
|
}
|
|
1460
1490
|
exports.Instruction = {
|
|
1461
1491
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -1468,6 +1498,9 @@ exports.Instruction = {
|
|
|
1468
1498
|
if (message.programAccountId !== "") {
|
|
1469
1499
|
writer.uint32(26).string(message.programAccountId);
|
|
1470
1500
|
}
|
|
1501
|
+
if (message.parsed !== undefined) {
|
|
1502
|
+
writer.uint32(34).bytes(message.parsed);
|
|
1503
|
+
}
|
|
1471
1504
|
return writer;
|
|
1472
1505
|
},
|
|
1473
1506
|
decode(input, length) {
|
|
@@ -1486,6 +1519,9 @@ exports.Instruction = {
|
|
|
1486
1519
|
case 3:
|
|
1487
1520
|
message.programAccountId = reader.string();
|
|
1488
1521
|
break;
|
|
1522
|
+
case 4:
|
|
1523
|
+
message.parsed = reader.bytes();
|
|
1524
|
+
break;
|
|
1489
1525
|
default:
|
|
1490
1526
|
reader.skipType(tag & 7);
|
|
1491
1527
|
break;
|
|
@@ -1502,6 +1538,7 @@ exports.Instruction = {
|
|
|
1502
1538
|
programAccountId: isSet(object.programAccountId)
|
|
1503
1539
|
? String(object.programAccountId)
|
|
1504
1540
|
: "",
|
|
1541
|
+
parsed: isSet(object.parsed) ? bytesFromBase64(object.parsed) : undefined,
|
|
1505
1542
|
};
|
|
1506
1543
|
},
|
|
1507
1544
|
toJSON(message) {
|
|
@@ -1512,6 +1549,11 @@ exports.Instruction = {
|
|
|
1512
1549
|
(obj.slot = (message.slot || long_1.default.UZERO).toString());
|
|
1513
1550
|
message.programAccountId !== undefined &&
|
|
1514
1551
|
(obj.programAccountId = message.programAccountId);
|
|
1552
|
+
message.parsed !== undefined &&
|
|
1553
|
+
(obj.parsed =
|
|
1554
|
+
message.parsed !== undefined
|
|
1555
|
+
? base64FromBytes(message.parsed)
|
|
1556
|
+
: undefined);
|
|
1515
1557
|
return obj;
|
|
1516
1558
|
},
|
|
1517
1559
|
fromPartial(object) {
|
|
@@ -1522,6 +1564,7 @@ exports.Instruction = {
|
|
|
1522
1564
|
? long_1.default.fromValue(object.slot)
|
|
1523
1565
|
: long_1.default.UZERO;
|
|
1524
1566
|
message.programAccountId = object.programAccountId ?? "";
|
|
1567
|
+
message.parsed = object.parsed ?? undefined;
|
|
1525
1568
|
return message;
|
|
1526
1569
|
},
|
|
1527
1570
|
};
|
|
@@ -1570,12 +1613,12 @@ exports.Block = {
|
|
|
1570
1613
|
},
|
|
1571
1614
|
};
|
|
1572
1615
|
function createBaseO11yResult() {
|
|
1573
|
-
return {
|
|
1616
|
+
return { gauges: [], counters: [] };
|
|
1574
1617
|
}
|
|
1575
1618
|
exports.O11yResult = {
|
|
1576
1619
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1577
|
-
for (const v of message.
|
|
1578
|
-
exports.
|
|
1620
|
+
for (const v of message.gauges) {
|
|
1621
|
+
exports.GaugeResult.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1579
1622
|
}
|
|
1580
1623
|
for (const v of message.counters) {
|
|
1581
1624
|
exports.CounterResult.encode(v, writer.uint32(18).fork()).ldelim();
|
|
@@ -1590,7 +1633,7 @@ exports.O11yResult = {
|
|
|
1590
1633
|
const tag = reader.uint32();
|
|
1591
1634
|
switch (tag >>> 3) {
|
|
1592
1635
|
case 1:
|
|
1593
|
-
message.
|
|
1636
|
+
message.gauges.push(exports.GaugeResult.decode(reader, reader.uint32()));
|
|
1594
1637
|
break;
|
|
1595
1638
|
case 2:
|
|
1596
1639
|
message.counters.push(exports.CounterResult.decode(reader, reader.uint32()));
|
|
@@ -1604,8 +1647,8 @@ exports.O11yResult = {
|
|
|
1604
1647
|
},
|
|
1605
1648
|
fromJSON(object) {
|
|
1606
1649
|
return {
|
|
1607
|
-
|
|
1608
|
-
? object.
|
|
1650
|
+
gauges: Array.isArray(object?.gauges)
|
|
1651
|
+
? object.gauges.map((e) => exports.GaugeResult.fromJSON(e))
|
|
1609
1652
|
: [],
|
|
1610
1653
|
counters: Array.isArray(object?.counters)
|
|
1611
1654
|
? object.counters.map((e) => exports.CounterResult.fromJSON(e))
|
|
@@ -1614,11 +1657,11 @@ exports.O11yResult = {
|
|
|
1614
1657
|
},
|
|
1615
1658
|
toJSON(message) {
|
|
1616
1659
|
const obj = {};
|
|
1617
|
-
if (message.
|
|
1618
|
-
obj.
|
|
1660
|
+
if (message.gauges) {
|
|
1661
|
+
obj.gauges = message.gauges.map((e) => e ? exports.GaugeResult.toJSON(e) : undefined);
|
|
1619
1662
|
}
|
|
1620
1663
|
else {
|
|
1621
|
-
obj.
|
|
1664
|
+
obj.gauges = [];
|
|
1622
1665
|
}
|
|
1623
1666
|
if (message.counters) {
|
|
1624
1667
|
obj.counters = message.counters.map((e) => e ? exports.CounterResult.toJSON(e) : undefined);
|
|
@@ -1630,8 +1673,8 @@ exports.O11yResult = {
|
|
|
1630
1673
|
},
|
|
1631
1674
|
fromPartial(object) {
|
|
1632
1675
|
const message = createBaseO11yResult();
|
|
1633
|
-
message.
|
|
1634
|
-
object.
|
|
1676
|
+
message.gauges =
|
|
1677
|
+
object.gauges?.map((e) => exports.GaugeResult.fromPartial(e)) || [];
|
|
1635
1678
|
message.counters =
|
|
1636
1679
|
object.counters?.map((e) => exports.CounterResult.fromPartial(e)) || [];
|
|
1637
1680
|
return message;
|
|
@@ -1880,10 +1923,10 @@ exports.MetricValue = {
|
|
|
1880
1923
|
return message;
|
|
1881
1924
|
},
|
|
1882
1925
|
};
|
|
1883
|
-
function
|
|
1926
|
+
function createBaseGaugeResult() {
|
|
1884
1927
|
return { metadata: undefined, metricValue: undefined };
|
|
1885
1928
|
}
|
|
1886
|
-
exports.
|
|
1929
|
+
exports.GaugeResult = {
|
|
1887
1930
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1888
1931
|
if (message.metadata !== undefined) {
|
|
1889
1932
|
exports.RecordMetaData.encode(message.metadata, writer.uint32(10).fork()).ldelim();
|
|
@@ -1896,7 +1939,7 @@ exports.HistogramResult = {
|
|
|
1896
1939
|
decode(input, length) {
|
|
1897
1940
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1898
1941
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1899
|
-
const message =
|
|
1942
|
+
const message = createBaseGaugeResult();
|
|
1900
1943
|
while (reader.pos < end) {
|
|
1901
1944
|
const tag = reader.uint32();
|
|
1902
1945
|
switch (tag >>> 3) {
|
|
@@ -1936,7 +1979,7 @@ exports.HistogramResult = {
|
|
|
1936
1979
|
return obj;
|
|
1937
1980
|
},
|
|
1938
1981
|
fromPartial(object) {
|
|
1939
|
-
const message =
|
|
1982
|
+
const message = createBaseGaugeResult();
|
|
1940
1983
|
message.metadata =
|
|
1941
1984
|
object.metadata !== undefined && object.metadata !== null
|
|
1942
1985
|
? exports.RecordMetaData.fromPartial(object.metadata)
|
|
@@ -2077,6 +2120,14 @@ exports.ProcessorDefinition = {
|
|
|
2077
2120
|
responseStream: false,
|
|
2078
2121
|
options: {},
|
|
2079
2122
|
},
|
|
2123
|
+
processBlocks: {
|
|
2124
|
+
name: "ProcessBlocks",
|
|
2125
|
+
requestType: exports.ProcessBlocksRequest,
|
|
2126
|
+
requestStream: false,
|
|
2127
|
+
responseType: exports.ProcessBlocksResponse,
|
|
2128
|
+
responseStream: false,
|
|
2129
|
+
options: {},
|
|
2130
|
+
},
|
|
2080
2131
|
processInstruction: {
|
|
2081
2132
|
name: "ProcessInstruction",
|
|
2082
2133
|
requestType: exports.ProcessInstructionRequest,
|