@sentio/sdk 1.33.2 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/context.js +0 -3
- package/lib/aptos/context.js.map +1 -1
- package/lib/core/context.js +0 -6
- package/lib/core/context.js.map +1 -1
- package/lib/core/logger.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +1 -171
- package/lib/gen/processor/protos/processor.js +8 -431
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/service.d.ts +3 -7
- package/lib/service.js +30 -151
- package/lib/service.js.map +1 -1
- package/lib/testing/test-processor-server.d.ts +3 -5
- package/lib/testing/test-processor-server.js +28 -15
- package/lib/testing/test-processor-server.js.map +1 -1
- package/package.json +1 -1
- package/src/aptos/context.ts +1 -3
- package/src/core/context.ts +1 -6
- package/src/core/logger.ts +1 -1
- package/src/gen/processor/protos/processor.ts +6 -573
- package/src/service.ts +38 -200
- package/src/testing/test-processor-server.ts +33 -23
|
@@ -126,7 +126,7 @@ export enum HandlerType {
|
|
|
126
126
|
ETH_LOG = 1,
|
|
127
127
|
ETH_BLOCK = 2,
|
|
128
128
|
ETH_TRACE = 5,
|
|
129
|
-
|
|
129
|
+
SOL_INSTRUCTION = 4,
|
|
130
130
|
APT_EVENT = 6,
|
|
131
131
|
APT_CALL = 7,
|
|
132
132
|
APT_RESOURCE = 8,
|
|
@@ -149,8 +149,8 @@ export function handlerTypeFromJSON(object: any): HandlerType {
|
|
|
149
149
|
case "ETH_TRACE":
|
|
150
150
|
return HandlerType.ETH_TRACE;
|
|
151
151
|
case 4:
|
|
152
|
-
case "
|
|
153
|
-
return HandlerType.
|
|
152
|
+
case "SOL_INSTRUCTION":
|
|
153
|
+
return HandlerType.SOL_INSTRUCTION;
|
|
154
154
|
case 6:
|
|
155
155
|
case "APT_EVENT":
|
|
156
156
|
return HandlerType.APT_EVENT;
|
|
@@ -180,8 +180,8 @@ export function handlerTypeToJSON(object: HandlerType): string {
|
|
|
180
180
|
return "ETH_BLOCK";
|
|
181
181
|
case HandlerType.ETH_TRACE:
|
|
182
182
|
return "ETH_TRACE";
|
|
183
|
-
case HandlerType.
|
|
184
|
-
return "
|
|
183
|
+
case HandlerType.SOL_INSTRUCTION:
|
|
184
|
+
return "SOL_INSTRUCTION";
|
|
185
185
|
case HandlerType.APT_EVENT:
|
|
186
186
|
return "APT_EVENT";
|
|
187
187
|
case HandlerType.APT_CALL:
|
|
@@ -266,7 +266,6 @@ export interface ProcessConfigResponse {
|
|
|
266
266
|
|
|
267
267
|
export interface ContractConfig {
|
|
268
268
|
contract: ContractInfo | undefined;
|
|
269
|
-
blockConfigs: BlockHandlerConfig[];
|
|
270
269
|
intervalConfigs: OnIntervalConfig[];
|
|
271
270
|
logConfigs: LogHandlerConfig[];
|
|
272
271
|
traceConfigs: TraceHandlerConfig[];
|
|
@@ -341,7 +340,6 @@ export interface MetricConfig {
|
|
|
341
340
|
description: string;
|
|
342
341
|
unit: string;
|
|
343
342
|
sparse: boolean;
|
|
344
|
-
resolutionInSeconds: number;
|
|
345
343
|
type: MetricType;
|
|
346
344
|
aggregationConfig: AggregationConfig | undefined;
|
|
347
345
|
}
|
|
@@ -449,19 +447,6 @@ export interface Topic {
|
|
|
449
447
|
hashes: string[];
|
|
450
448
|
}
|
|
451
449
|
|
|
452
|
-
export interface ProcessTransactionsRequest {
|
|
453
|
-
chainId: string;
|
|
454
|
-
transactions: RawTransaction[];
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
export interface ProcessInstructionsRequest {
|
|
458
|
-
instructions: Instruction[];
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export interface ProcessBlocksRequest {
|
|
462
|
-
blockBindings: BlockBinding[];
|
|
463
|
-
}
|
|
464
|
-
|
|
465
450
|
export interface ProcessBindingsRequest {
|
|
466
451
|
bindings: DataBinding[];
|
|
467
452
|
}
|
|
@@ -491,16 +476,10 @@ export interface Data {
|
|
|
491
476
|
|
|
492
477
|
export interface DataBinding {
|
|
493
478
|
data: Data | undefined;
|
|
494
|
-
handlerId: number;
|
|
495
479
|
handlerType: HandlerType;
|
|
496
480
|
handlerIds: number[];
|
|
497
481
|
}
|
|
498
482
|
|
|
499
|
-
export interface BlockBinding {
|
|
500
|
-
block: RawBlock | undefined;
|
|
501
|
-
handlerIds: number[];
|
|
502
|
-
}
|
|
503
|
-
|
|
504
483
|
export interface RawBlock {
|
|
505
484
|
raw: Uint8Array;
|
|
506
485
|
}
|
|
@@ -513,14 +492,6 @@ export interface ProcessResult {
|
|
|
513
492
|
exports: ExportResult[];
|
|
514
493
|
}
|
|
515
494
|
|
|
516
|
-
export interface DataDescriptor {
|
|
517
|
-
name: string;
|
|
518
|
-
description: string;
|
|
519
|
-
unit: string;
|
|
520
|
-
sparse: boolean;
|
|
521
|
-
resolutionInSeconds: number;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
495
|
export interface RecordMetaData {
|
|
525
496
|
address: string;
|
|
526
497
|
contractName: string;
|
|
@@ -529,7 +500,6 @@ export interface RecordMetaData {
|
|
|
529
500
|
chainId: string;
|
|
530
501
|
transactionIndex: number;
|
|
531
502
|
logIndex: number;
|
|
532
|
-
dataDescriptor: DataDescriptor | undefined;
|
|
533
503
|
name: string;
|
|
534
504
|
labels: { [key: string]: string };
|
|
535
505
|
}
|
|
@@ -895,7 +865,6 @@ export const ProcessConfigResponse = {
|
|
|
895
865
|
function createBaseContractConfig(): ContractConfig {
|
|
896
866
|
return {
|
|
897
867
|
contract: undefined,
|
|
898
|
-
blockConfigs: [],
|
|
899
868
|
intervalConfigs: [],
|
|
900
869
|
logConfigs: [],
|
|
901
870
|
traceConfigs: [],
|
|
@@ -916,9 +885,6 @@ export const ContractConfig = {
|
|
|
916
885
|
if (message.contract !== undefined) {
|
|
917
886
|
ContractInfo.encode(message.contract, writer.uint32(10).fork()).ldelim();
|
|
918
887
|
}
|
|
919
|
-
for (const v of message.blockConfigs) {
|
|
920
|
-
BlockHandlerConfig.encode(v!, writer.uint32(58).fork()).ldelim();
|
|
921
|
-
}
|
|
922
888
|
for (const v of message.intervalConfigs) {
|
|
923
889
|
OnIntervalConfig.encode(v!, writer.uint32(90).fork()).ldelim();
|
|
924
890
|
}
|
|
@@ -962,11 +928,6 @@ export const ContractConfig = {
|
|
|
962
928
|
case 1:
|
|
963
929
|
message.contract = ContractInfo.decode(reader, reader.uint32());
|
|
964
930
|
break;
|
|
965
|
-
case 7:
|
|
966
|
-
message.blockConfigs.push(
|
|
967
|
-
BlockHandlerConfig.decode(reader, reader.uint32())
|
|
968
|
-
);
|
|
969
|
-
break;
|
|
970
931
|
case 11:
|
|
971
932
|
message.intervalConfigs.push(
|
|
972
933
|
OnIntervalConfig.decode(reader, reader.uint32())
|
|
@@ -1020,9 +981,6 @@ export const ContractConfig = {
|
|
|
1020
981
|
contract: isSet(object.contract)
|
|
1021
982
|
? ContractInfo.fromJSON(object.contract)
|
|
1022
983
|
: undefined,
|
|
1023
|
-
blockConfigs: Array.isArray(object?.blockConfigs)
|
|
1024
|
-
? object.blockConfigs.map((e: any) => BlockHandlerConfig.fromJSON(e))
|
|
1025
|
-
: [],
|
|
1026
984
|
intervalConfigs: Array.isArray(object?.intervalConfigs)
|
|
1027
985
|
? object.intervalConfigs.map((e: any) => OnIntervalConfig.fromJSON(e))
|
|
1028
986
|
: [],
|
|
@@ -1063,13 +1021,6 @@ export const ContractConfig = {
|
|
|
1063
1021
|
(obj.contract = message.contract
|
|
1064
1022
|
? ContractInfo.toJSON(message.contract)
|
|
1065
1023
|
: undefined);
|
|
1066
|
-
if (message.blockConfigs) {
|
|
1067
|
-
obj.blockConfigs = message.blockConfigs.map((e) =>
|
|
1068
|
-
e ? BlockHandlerConfig.toJSON(e) : undefined
|
|
1069
|
-
);
|
|
1070
|
-
} else {
|
|
1071
|
-
obj.blockConfigs = [];
|
|
1072
|
-
}
|
|
1073
1024
|
if (message.intervalConfigs) {
|
|
1074
1025
|
obj.intervalConfigs = message.intervalConfigs.map((e) =>
|
|
1075
1026
|
e ? OnIntervalConfig.toJSON(e) : undefined
|
|
@@ -1124,8 +1075,6 @@ export const ContractConfig = {
|
|
|
1124
1075
|
object.contract !== undefined && object.contract !== null
|
|
1125
1076
|
? ContractInfo.fromPartial(object.contract)
|
|
1126
1077
|
: undefined;
|
|
1127
|
-
message.blockConfigs =
|
|
1128
|
-
object.blockConfigs?.map((e) => BlockHandlerConfig.fromPartial(e)) || [];
|
|
1129
1078
|
message.intervalConfigs =
|
|
1130
1079
|
object.intervalConfigs?.map((e) => OnIntervalConfig.fromPartial(e)) || [];
|
|
1131
1080
|
message.logConfigs =
|
|
@@ -1488,7 +1437,6 @@ function createBaseMetricConfig(): MetricConfig {
|
|
|
1488
1437
|
description: "",
|
|
1489
1438
|
unit: "",
|
|
1490
1439
|
sparse: false,
|
|
1491
|
-
resolutionInSeconds: 0,
|
|
1492
1440
|
type: 0,
|
|
1493
1441
|
aggregationConfig: undefined,
|
|
1494
1442
|
};
|
|
@@ -1511,9 +1459,6 @@ export const MetricConfig = {
|
|
|
1511
1459
|
if (message.sparse === true) {
|
|
1512
1460
|
writer.uint32(32).bool(message.sparse);
|
|
1513
1461
|
}
|
|
1514
|
-
if (message.resolutionInSeconds !== 0) {
|
|
1515
|
-
writer.uint32(40).int32(message.resolutionInSeconds);
|
|
1516
|
-
}
|
|
1517
1462
|
if (message.type !== 0) {
|
|
1518
1463
|
writer.uint32(56).int32(message.type);
|
|
1519
1464
|
}
|
|
@@ -1545,9 +1490,6 @@ export const MetricConfig = {
|
|
|
1545
1490
|
case 4:
|
|
1546
1491
|
message.sparse = reader.bool();
|
|
1547
1492
|
break;
|
|
1548
|
-
case 5:
|
|
1549
|
-
message.resolutionInSeconds = reader.int32();
|
|
1550
|
-
break;
|
|
1551
1493
|
case 7:
|
|
1552
1494
|
message.type = reader.int32() as any;
|
|
1553
1495
|
break;
|
|
@@ -1571,9 +1513,6 @@ export const MetricConfig = {
|
|
|
1571
1513
|
description: isSet(object.description) ? String(object.description) : "",
|
|
1572
1514
|
unit: isSet(object.unit) ? String(object.unit) : "",
|
|
1573
1515
|
sparse: isSet(object.sparse) ? Boolean(object.sparse) : false,
|
|
1574
|
-
resolutionInSeconds: isSet(object.resolutionInSeconds)
|
|
1575
|
-
? Number(object.resolutionInSeconds)
|
|
1576
|
-
: 0,
|
|
1577
1516
|
type: isSet(object.type) ? metricTypeFromJSON(object.type) : 0,
|
|
1578
1517
|
aggregationConfig: isSet(object.aggregationConfig)
|
|
1579
1518
|
? AggregationConfig.fromJSON(object.aggregationConfig)
|
|
@@ -1588,8 +1527,6 @@ export const MetricConfig = {
|
|
|
1588
1527
|
(obj.description = message.description);
|
|
1589
1528
|
message.unit !== undefined && (obj.unit = message.unit);
|
|
1590
1529
|
message.sparse !== undefined && (obj.sparse = message.sparse);
|
|
1591
|
-
message.resolutionInSeconds !== undefined &&
|
|
1592
|
-
(obj.resolutionInSeconds = Math.round(message.resolutionInSeconds));
|
|
1593
1530
|
message.type !== undefined && (obj.type = metricTypeToJSON(message.type));
|
|
1594
1531
|
message.aggregationConfig !== undefined &&
|
|
1595
1532
|
(obj.aggregationConfig = message.aggregationConfig
|
|
@@ -1604,7 +1541,6 @@ export const MetricConfig = {
|
|
|
1604
1541
|
message.description = object.description ?? "";
|
|
1605
1542
|
message.unit = object.unit ?? "";
|
|
1606
1543
|
message.sparse = object.sparse ?? false;
|
|
1607
|
-
message.resolutionInSeconds = object.resolutionInSeconds ?? 0;
|
|
1608
1544
|
message.type = object.type ?? 0;
|
|
1609
1545
|
message.aggregationConfig =
|
|
1610
1546
|
object.aggregationConfig !== undefined &&
|
|
@@ -3105,217 +3041,6 @@ export const Topic = {
|
|
|
3105
3041
|
},
|
|
3106
3042
|
};
|
|
3107
3043
|
|
|
3108
|
-
function createBaseProcessTransactionsRequest(): ProcessTransactionsRequest {
|
|
3109
|
-
return { chainId: "", transactions: [] };
|
|
3110
|
-
}
|
|
3111
|
-
|
|
3112
|
-
export const ProcessTransactionsRequest = {
|
|
3113
|
-
encode(
|
|
3114
|
-
message: ProcessTransactionsRequest,
|
|
3115
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
3116
|
-
): _m0.Writer {
|
|
3117
|
-
if (message.chainId !== "") {
|
|
3118
|
-
writer.uint32(10).string(message.chainId);
|
|
3119
|
-
}
|
|
3120
|
-
for (const v of message.transactions) {
|
|
3121
|
-
RawTransaction.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
3122
|
-
}
|
|
3123
|
-
return writer;
|
|
3124
|
-
},
|
|
3125
|
-
|
|
3126
|
-
decode(
|
|
3127
|
-
input: _m0.Reader | Uint8Array,
|
|
3128
|
-
length?: number
|
|
3129
|
-
): ProcessTransactionsRequest {
|
|
3130
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3131
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3132
|
-
const message = createBaseProcessTransactionsRequest();
|
|
3133
|
-
while (reader.pos < end) {
|
|
3134
|
-
const tag = reader.uint32();
|
|
3135
|
-
switch (tag >>> 3) {
|
|
3136
|
-
case 1:
|
|
3137
|
-
message.chainId = reader.string();
|
|
3138
|
-
break;
|
|
3139
|
-
case 2:
|
|
3140
|
-
message.transactions.push(
|
|
3141
|
-
RawTransaction.decode(reader, reader.uint32())
|
|
3142
|
-
);
|
|
3143
|
-
break;
|
|
3144
|
-
default:
|
|
3145
|
-
reader.skipType(tag & 7);
|
|
3146
|
-
break;
|
|
3147
|
-
}
|
|
3148
|
-
}
|
|
3149
|
-
return message;
|
|
3150
|
-
},
|
|
3151
|
-
|
|
3152
|
-
fromJSON(object: any): ProcessTransactionsRequest {
|
|
3153
|
-
return {
|
|
3154
|
-
chainId: isSet(object.chainId) ? String(object.chainId) : "",
|
|
3155
|
-
transactions: Array.isArray(object?.transactions)
|
|
3156
|
-
? object.transactions.map((e: any) => RawTransaction.fromJSON(e))
|
|
3157
|
-
: [],
|
|
3158
|
-
};
|
|
3159
|
-
},
|
|
3160
|
-
|
|
3161
|
-
toJSON(message: ProcessTransactionsRequest): unknown {
|
|
3162
|
-
const obj: any = {};
|
|
3163
|
-
message.chainId !== undefined && (obj.chainId = message.chainId);
|
|
3164
|
-
if (message.transactions) {
|
|
3165
|
-
obj.transactions = message.transactions.map((e) =>
|
|
3166
|
-
e ? RawTransaction.toJSON(e) : undefined
|
|
3167
|
-
);
|
|
3168
|
-
} else {
|
|
3169
|
-
obj.transactions = [];
|
|
3170
|
-
}
|
|
3171
|
-
return obj;
|
|
3172
|
-
},
|
|
3173
|
-
|
|
3174
|
-
fromPartial(
|
|
3175
|
-
object: DeepPartial<ProcessTransactionsRequest>
|
|
3176
|
-
): ProcessTransactionsRequest {
|
|
3177
|
-
const message = createBaseProcessTransactionsRequest();
|
|
3178
|
-
message.chainId = object.chainId ?? "";
|
|
3179
|
-
message.transactions =
|
|
3180
|
-
object.transactions?.map((e) => RawTransaction.fromPartial(e)) || [];
|
|
3181
|
-
return message;
|
|
3182
|
-
},
|
|
3183
|
-
};
|
|
3184
|
-
|
|
3185
|
-
function createBaseProcessInstructionsRequest(): ProcessInstructionsRequest {
|
|
3186
|
-
return { instructions: [] };
|
|
3187
|
-
}
|
|
3188
|
-
|
|
3189
|
-
export const ProcessInstructionsRequest = {
|
|
3190
|
-
encode(
|
|
3191
|
-
message: ProcessInstructionsRequest,
|
|
3192
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
3193
|
-
): _m0.Writer {
|
|
3194
|
-
for (const v of message.instructions) {
|
|
3195
|
-
Instruction.encode(v!, writer.uint32(10).fork()).ldelim();
|
|
3196
|
-
}
|
|
3197
|
-
return writer;
|
|
3198
|
-
},
|
|
3199
|
-
|
|
3200
|
-
decode(
|
|
3201
|
-
input: _m0.Reader | Uint8Array,
|
|
3202
|
-
length?: number
|
|
3203
|
-
): ProcessInstructionsRequest {
|
|
3204
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3205
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3206
|
-
const message = createBaseProcessInstructionsRequest();
|
|
3207
|
-
while (reader.pos < end) {
|
|
3208
|
-
const tag = reader.uint32();
|
|
3209
|
-
switch (tag >>> 3) {
|
|
3210
|
-
case 1:
|
|
3211
|
-
message.instructions.push(
|
|
3212
|
-
Instruction.decode(reader, reader.uint32())
|
|
3213
|
-
);
|
|
3214
|
-
break;
|
|
3215
|
-
default:
|
|
3216
|
-
reader.skipType(tag & 7);
|
|
3217
|
-
break;
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
return message;
|
|
3221
|
-
},
|
|
3222
|
-
|
|
3223
|
-
fromJSON(object: any): ProcessInstructionsRequest {
|
|
3224
|
-
return {
|
|
3225
|
-
instructions: Array.isArray(object?.instructions)
|
|
3226
|
-
? object.instructions.map((e: any) => Instruction.fromJSON(e))
|
|
3227
|
-
: [],
|
|
3228
|
-
};
|
|
3229
|
-
},
|
|
3230
|
-
|
|
3231
|
-
toJSON(message: ProcessInstructionsRequest): unknown {
|
|
3232
|
-
const obj: any = {};
|
|
3233
|
-
if (message.instructions) {
|
|
3234
|
-
obj.instructions = message.instructions.map((e) =>
|
|
3235
|
-
e ? Instruction.toJSON(e) : undefined
|
|
3236
|
-
);
|
|
3237
|
-
} else {
|
|
3238
|
-
obj.instructions = [];
|
|
3239
|
-
}
|
|
3240
|
-
return obj;
|
|
3241
|
-
},
|
|
3242
|
-
|
|
3243
|
-
fromPartial(
|
|
3244
|
-
object: DeepPartial<ProcessInstructionsRequest>
|
|
3245
|
-
): ProcessInstructionsRequest {
|
|
3246
|
-
const message = createBaseProcessInstructionsRequest();
|
|
3247
|
-
message.instructions =
|
|
3248
|
-
object.instructions?.map((e) => Instruction.fromPartial(e)) || [];
|
|
3249
|
-
return message;
|
|
3250
|
-
},
|
|
3251
|
-
};
|
|
3252
|
-
|
|
3253
|
-
function createBaseProcessBlocksRequest(): ProcessBlocksRequest {
|
|
3254
|
-
return { blockBindings: [] };
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
export const ProcessBlocksRequest = {
|
|
3258
|
-
encode(
|
|
3259
|
-
message: ProcessBlocksRequest,
|
|
3260
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
3261
|
-
): _m0.Writer {
|
|
3262
|
-
for (const v of message.blockBindings) {
|
|
3263
|
-
BlockBinding.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
3264
|
-
}
|
|
3265
|
-
return writer;
|
|
3266
|
-
},
|
|
3267
|
-
|
|
3268
|
-
decode(
|
|
3269
|
-
input: _m0.Reader | Uint8Array,
|
|
3270
|
-
length?: number
|
|
3271
|
-
): ProcessBlocksRequest {
|
|
3272
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3273
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3274
|
-
const message = createBaseProcessBlocksRequest();
|
|
3275
|
-
while (reader.pos < end) {
|
|
3276
|
-
const tag = reader.uint32();
|
|
3277
|
-
switch (tag >>> 3) {
|
|
3278
|
-
case 2:
|
|
3279
|
-
message.blockBindings.push(
|
|
3280
|
-
BlockBinding.decode(reader, reader.uint32())
|
|
3281
|
-
);
|
|
3282
|
-
break;
|
|
3283
|
-
default:
|
|
3284
|
-
reader.skipType(tag & 7);
|
|
3285
|
-
break;
|
|
3286
|
-
}
|
|
3287
|
-
}
|
|
3288
|
-
return message;
|
|
3289
|
-
},
|
|
3290
|
-
|
|
3291
|
-
fromJSON(object: any): ProcessBlocksRequest {
|
|
3292
|
-
return {
|
|
3293
|
-
blockBindings: Array.isArray(object?.blockBindings)
|
|
3294
|
-
? object.blockBindings.map((e: any) => BlockBinding.fromJSON(e))
|
|
3295
|
-
: [],
|
|
3296
|
-
};
|
|
3297
|
-
},
|
|
3298
|
-
|
|
3299
|
-
toJSON(message: ProcessBlocksRequest): unknown {
|
|
3300
|
-
const obj: any = {};
|
|
3301
|
-
if (message.blockBindings) {
|
|
3302
|
-
obj.blockBindings = message.blockBindings.map((e) =>
|
|
3303
|
-
e ? BlockBinding.toJSON(e) : undefined
|
|
3304
|
-
);
|
|
3305
|
-
} else {
|
|
3306
|
-
obj.blockBindings = [];
|
|
3307
|
-
}
|
|
3308
|
-
return obj;
|
|
3309
|
-
},
|
|
3310
|
-
|
|
3311
|
-
fromPartial(object: DeepPartial<ProcessBlocksRequest>): ProcessBlocksRequest {
|
|
3312
|
-
const message = createBaseProcessBlocksRequest();
|
|
3313
|
-
message.blockBindings =
|
|
3314
|
-
object.blockBindings?.map((e) => BlockBinding.fromPartial(e)) || [];
|
|
3315
|
-
return message;
|
|
3316
|
-
},
|
|
3317
|
-
};
|
|
3318
|
-
|
|
3319
3044
|
function createBaseProcessBindingsRequest(): ProcessBindingsRequest {
|
|
3320
3045
|
return { bindings: [] };
|
|
3321
3046
|
}
|
|
@@ -3710,7 +3435,7 @@ export const Data = {
|
|
|
3710
3435
|
};
|
|
3711
3436
|
|
|
3712
3437
|
function createBaseDataBinding(): DataBinding {
|
|
3713
|
-
return { data: undefined,
|
|
3438
|
+
return { data: undefined, handlerType: 0, handlerIds: [] };
|
|
3714
3439
|
}
|
|
3715
3440
|
|
|
3716
3441
|
export const DataBinding = {
|
|
@@ -3721,9 +3446,6 @@ export const DataBinding = {
|
|
|
3721
3446
|
if (message.data !== undefined) {
|
|
3722
3447
|
Data.encode(message.data, writer.uint32(10).fork()).ldelim();
|
|
3723
3448
|
}
|
|
3724
|
-
if (message.handlerId !== 0) {
|
|
3725
|
-
writer.uint32(16).int32(message.handlerId);
|
|
3726
|
-
}
|
|
3727
3449
|
if (message.handlerType !== 0) {
|
|
3728
3450
|
writer.uint32(24).int32(message.handlerType);
|
|
3729
3451
|
}
|
|
@@ -3745,9 +3467,6 @@ export const DataBinding = {
|
|
|
3745
3467
|
case 1:
|
|
3746
3468
|
message.data = Data.decode(reader, reader.uint32());
|
|
3747
3469
|
break;
|
|
3748
|
-
case 2:
|
|
3749
|
-
message.handlerId = reader.int32();
|
|
3750
|
-
break;
|
|
3751
3470
|
case 3:
|
|
3752
3471
|
message.handlerType = reader.int32() as any;
|
|
3753
3472
|
break;
|
|
@@ -3772,7 +3491,6 @@ export const DataBinding = {
|
|
|
3772
3491
|
fromJSON(object: any): DataBinding {
|
|
3773
3492
|
return {
|
|
3774
3493
|
data: isSet(object.data) ? Data.fromJSON(object.data) : undefined,
|
|
3775
|
-
handlerId: isSet(object.handlerId) ? Number(object.handlerId) : 0,
|
|
3776
3494
|
handlerType: isSet(object.handlerType)
|
|
3777
3495
|
? handlerTypeFromJSON(object.handlerType)
|
|
3778
3496
|
: 0,
|
|
@@ -3786,8 +3504,6 @@ export const DataBinding = {
|
|
|
3786
3504
|
const obj: any = {};
|
|
3787
3505
|
message.data !== undefined &&
|
|
3788
3506
|
(obj.data = message.data ? Data.toJSON(message.data) : undefined);
|
|
3789
|
-
message.handlerId !== undefined &&
|
|
3790
|
-
(obj.handlerId = Math.round(message.handlerId));
|
|
3791
3507
|
message.handlerType !== undefined &&
|
|
3792
3508
|
(obj.handlerType = handlerTypeToJSON(message.handlerType));
|
|
3793
3509
|
if (message.handlerIds) {
|
|
@@ -3804,93 +3520,12 @@ export const DataBinding = {
|
|
|
3804
3520
|
object.data !== undefined && object.data !== null
|
|
3805
3521
|
? Data.fromPartial(object.data)
|
|
3806
3522
|
: undefined;
|
|
3807
|
-
message.handlerId = object.handlerId ?? 0;
|
|
3808
3523
|
message.handlerType = object.handlerType ?? 0;
|
|
3809
3524
|
message.handlerIds = object.handlerIds?.map((e) => e) || [];
|
|
3810
3525
|
return message;
|
|
3811
3526
|
},
|
|
3812
3527
|
};
|
|
3813
3528
|
|
|
3814
|
-
function createBaseBlockBinding(): BlockBinding {
|
|
3815
|
-
return { block: undefined, handlerIds: [] };
|
|
3816
|
-
}
|
|
3817
|
-
|
|
3818
|
-
export const BlockBinding = {
|
|
3819
|
-
encode(
|
|
3820
|
-
message: BlockBinding,
|
|
3821
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
3822
|
-
): _m0.Writer {
|
|
3823
|
-
if (message.block !== undefined) {
|
|
3824
|
-
RawBlock.encode(message.block, writer.uint32(10).fork()).ldelim();
|
|
3825
|
-
}
|
|
3826
|
-
writer.uint32(18).fork();
|
|
3827
|
-
for (const v of message.handlerIds) {
|
|
3828
|
-
writer.int32(v);
|
|
3829
|
-
}
|
|
3830
|
-
writer.ldelim();
|
|
3831
|
-
return writer;
|
|
3832
|
-
},
|
|
3833
|
-
|
|
3834
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BlockBinding {
|
|
3835
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
3836
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3837
|
-
const message = createBaseBlockBinding();
|
|
3838
|
-
while (reader.pos < end) {
|
|
3839
|
-
const tag = reader.uint32();
|
|
3840
|
-
switch (tag >>> 3) {
|
|
3841
|
-
case 1:
|
|
3842
|
-
message.block = RawBlock.decode(reader, reader.uint32());
|
|
3843
|
-
break;
|
|
3844
|
-
case 2:
|
|
3845
|
-
if ((tag & 7) === 2) {
|
|
3846
|
-
const end2 = reader.uint32() + reader.pos;
|
|
3847
|
-
while (reader.pos < end2) {
|
|
3848
|
-
message.handlerIds.push(reader.int32());
|
|
3849
|
-
}
|
|
3850
|
-
} else {
|
|
3851
|
-
message.handlerIds.push(reader.int32());
|
|
3852
|
-
}
|
|
3853
|
-
break;
|
|
3854
|
-
default:
|
|
3855
|
-
reader.skipType(tag & 7);
|
|
3856
|
-
break;
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
|
-
return message;
|
|
3860
|
-
},
|
|
3861
|
-
|
|
3862
|
-
fromJSON(object: any): BlockBinding {
|
|
3863
|
-
return {
|
|
3864
|
-
block: isSet(object.block) ? RawBlock.fromJSON(object.block) : undefined,
|
|
3865
|
-
handlerIds: Array.isArray(object?.handlerIds)
|
|
3866
|
-
? object.handlerIds.map((e: any) => Number(e))
|
|
3867
|
-
: [],
|
|
3868
|
-
};
|
|
3869
|
-
},
|
|
3870
|
-
|
|
3871
|
-
toJSON(message: BlockBinding): unknown {
|
|
3872
|
-
const obj: any = {};
|
|
3873
|
-
message.block !== undefined &&
|
|
3874
|
-
(obj.block = message.block ? RawBlock.toJSON(message.block) : undefined);
|
|
3875
|
-
if (message.handlerIds) {
|
|
3876
|
-
obj.handlerIds = message.handlerIds.map((e) => Math.round(e));
|
|
3877
|
-
} else {
|
|
3878
|
-
obj.handlerIds = [];
|
|
3879
|
-
}
|
|
3880
|
-
return obj;
|
|
3881
|
-
},
|
|
3882
|
-
|
|
3883
|
-
fromPartial(object: DeepPartial<BlockBinding>): BlockBinding {
|
|
3884
|
-
const message = createBaseBlockBinding();
|
|
3885
|
-
message.block =
|
|
3886
|
-
object.block !== undefined && object.block !== null
|
|
3887
|
-
? RawBlock.fromPartial(object.block)
|
|
3888
|
-
: undefined;
|
|
3889
|
-
message.handlerIds = object.handlerIds?.map((e) => e) || [];
|
|
3890
|
-
return message;
|
|
3891
|
-
},
|
|
3892
|
-
};
|
|
3893
|
-
|
|
3894
3529
|
function createBaseRawBlock(): RawBlock {
|
|
3895
3530
|
return { raw: new Uint8Array() };
|
|
3896
3531
|
}
|
|
@@ -4078,104 +3713,6 @@ export const ProcessResult = {
|
|
|
4078
3713
|
},
|
|
4079
3714
|
};
|
|
4080
3715
|
|
|
4081
|
-
function createBaseDataDescriptor(): DataDescriptor {
|
|
4082
|
-
return {
|
|
4083
|
-
name: "",
|
|
4084
|
-
description: "",
|
|
4085
|
-
unit: "",
|
|
4086
|
-
sparse: false,
|
|
4087
|
-
resolutionInSeconds: 0,
|
|
4088
|
-
};
|
|
4089
|
-
}
|
|
4090
|
-
|
|
4091
|
-
export const DataDescriptor = {
|
|
4092
|
-
encode(
|
|
4093
|
-
message: DataDescriptor,
|
|
4094
|
-
writer: _m0.Writer = _m0.Writer.create()
|
|
4095
|
-
): _m0.Writer {
|
|
4096
|
-
if (message.name !== "") {
|
|
4097
|
-
writer.uint32(10).string(message.name);
|
|
4098
|
-
}
|
|
4099
|
-
if (message.description !== "") {
|
|
4100
|
-
writer.uint32(26).string(message.description);
|
|
4101
|
-
}
|
|
4102
|
-
if (message.unit !== "") {
|
|
4103
|
-
writer.uint32(18).string(message.unit);
|
|
4104
|
-
}
|
|
4105
|
-
if (message.sparse === true) {
|
|
4106
|
-
writer.uint32(32).bool(message.sparse);
|
|
4107
|
-
}
|
|
4108
|
-
if (message.resolutionInSeconds !== 0) {
|
|
4109
|
-
writer.uint32(40).int32(message.resolutionInSeconds);
|
|
4110
|
-
}
|
|
4111
|
-
return writer;
|
|
4112
|
-
},
|
|
4113
|
-
|
|
4114
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): DataDescriptor {
|
|
4115
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
4116
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
4117
|
-
const message = createBaseDataDescriptor();
|
|
4118
|
-
while (reader.pos < end) {
|
|
4119
|
-
const tag = reader.uint32();
|
|
4120
|
-
switch (tag >>> 3) {
|
|
4121
|
-
case 1:
|
|
4122
|
-
message.name = reader.string();
|
|
4123
|
-
break;
|
|
4124
|
-
case 3:
|
|
4125
|
-
message.description = reader.string();
|
|
4126
|
-
break;
|
|
4127
|
-
case 2:
|
|
4128
|
-
message.unit = reader.string();
|
|
4129
|
-
break;
|
|
4130
|
-
case 4:
|
|
4131
|
-
message.sparse = reader.bool();
|
|
4132
|
-
break;
|
|
4133
|
-
case 5:
|
|
4134
|
-
message.resolutionInSeconds = reader.int32();
|
|
4135
|
-
break;
|
|
4136
|
-
default:
|
|
4137
|
-
reader.skipType(tag & 7);
|
|
4138
|
-
break;
|
|
4139
|
-
}
|
|
4140
|
-
}
|
|
4141
|
-
return message;
|
|
4142
|
-
},
|
|
4143
|
-
|
|
4144
|
-
fromJSON(object: any): DataDescriptor {
|
|
4145
|
-
return {
|
|
4146
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
4147
|
-
description: isSet(object.description) ? String(object.description) : "",
|
|
4148
|
-
unit: isSet(object.unit) ? String(object.unit) : "",
|
|
4149
|
-
sparse: isSet(object.sparse) ? Boolean(object.sparse) : false,
|
|
4150
|
-
resolutionInSeconds: isSet(object.resolutionInSeconds)
|
|
4151
|
-
? Number(object.resolutionInSeconds)
|
|
4152
|
-
: 0,
|
|
4153
|
-
};
|
|
4154
|
-
},
|
|
4155
|
-
|
|
4156
|
-
toJSON(message: DataDescriptor): unknown {
|
|
4157
|
-
const obj: any = {};
|
|
4158
|
-
message.name !== undefined && (obj.name = message.name);
|
|
4159
|
-
message.description !== undefined &&
|
|
4160
|
-
(obj.description = message.description);
|
|
4161
|
-
message.unit !== undefined && (obj.unit = message.unit);
|
|
4162
|
-
message.sparse !== undefined && (obj.sparse = message.sparse);
|
|
4163
|
-
message.resolutionInSeconds !== undefined &&
|
|
4164
|
-
(obj.resolutionInSeconds = Math.round(message.resolutionInSeconds));
|
|
4165
|
-
return obj;
|
|
4166
|
-
},
|
|
4167
|
-
|
|
4168
|
-
fromPartial(object: DeepPartial<DataDescriptor>): DataDescriptor {
|
|
4169
|
-
const message = createBaseDataDescriptor();
|
|
4170
|
-
message.name = object.name ?? "";
|
|
4171
|
-
message.description = object.description ?? "";
|
|
4172
|
-
message.unit = object.unit ?? "";
|
|
4173
|
-
message.sparse = object.sparse ?? false;
|
|
4174
|
-
message.resolutionInSeconds = object.resolutionInSeconds ?? 0;
|
|
4175
|
-
return message;
|
|
4176
|
-
},
|
|
4177
|
-
};
|
|
4178
|
-
|
|
4179
3716
|
function createBaseRecordMetaData(): RecordMetaData {
|
|
4180
3717
|
return {
|
|
4181
3718
|
address: "",
|
|
@@ -4185,7 +3722,6 @@ function createBaseRecordMetaData(): RecordMetaData {
|
|
|
4185
3722
|
chainId: "",
|
|
4186
3723
|
transactionIndex: 0,
|
|
4187
3724
|
logIndex: 0,
|
|
4188
|
-
dataDescriptor: undefined,
|
|
4189
3725
|
name: "",
|
|
4190
3726
|
labels: {},
|
|
4191
3727
|
};
|
|
@@ -4217,12 +3753,6 @@ export const RecordMetaData = {
|
|
|
4217
3753
|
if (message.logIndex !== 0) {
|
|
4218
3754
|
writer.uint32(32).int32(message.logIndex);
|
|
4219
3755
|
}
|
|
4220
|
-
if (message.dataDescriptor !== undefined) {
|
|
4221
|
-
DataDescriptor.encode(
|
|
4222
|
-
message.dataDescriptor,
|
|
4223
|
-
writer.uint32(66).fork()
|
|
4224
|
-
).ldelim();
|
|
4225
|
-
}
|
|
4226
3756
|
if (message.name !== "") {
|
|
4227
3757
|
writer.uint32(82).string(message.name);
|
|
4228
3758
|
}
|
|
@@ -4263,12 +3793,6 @@ export const RecordMetaData = {
|
|
|
4263
3793
|
case 4:
|
|
4264
3794
|
message.logIndex = reader.int32();
|
|
4265
3795
|
break;
|
|
4266
|
-
case 8:
|
|
4267
|
-
message.dataDescriptor = DataDescriptor.decode(
|
|
4268
|
-
reader,
|
|
4269
|
-
reader.uint32()
|
|
4270
|
-
);
|
|
4271
|
-
break;
|
|
4272
3796
|
case 10:
|
|
4273
3797
|
message.name = reader.string();
|
|
4274
3798
|
break;
|
|
@@ -4306,9 +3830,6 @@ export const RecordMetaData = {
|
|
|
4306
3830
|
? Number(object.transactionIndex)
|
|
4307
3831
|
: 0,
|
|
4308
3832
|
logIndex: isSet(object.logIndex) ? Number(object.logIndex) : 0,
|
|
4309
|
-
dataDescriptor: isSet(object.dataDescriptor)
|
|
4310
|
-
? DataDescriptor.fromJSON(object.dataDescriptor)
|
|
4311
|
-
: undefined,
|
|
4312
3833
|
name: isSet(object.name) ? String(object.name) : "",
|
|
4313
3834
|
labels: isObject(object.labels)
|
|
4314
3835
|
? Object.entries(object.labels).reduce<{ [key: string]: string }>(
|
|
@@ -4336,10 +3857,6 @@ export const RecordMetaData = {
|
|
|
4336
3857
|
(obj.transactionIndex = Math.round(message.transactionIndex));
|
|
4337
3858
|
message.logIndex !== undefined &&
|
|
4338
3859
|
(obj.logIndex = Math.round(message.logIndex));
|
|
4339
|
-
message.dataDescriptor !== undefined &&
|
|
4340
|
-
(obj.dataDescriptor = message.dataDescriptor
|
|
4341
|
-
? DataDescriptor.toJSON(message.dataDescriptor)
|
|
4342
|
-
: undefined);
|
|
4343
3860
|
message.name !== undefined && (obj.name = message.name);
|
|
4344
3861
|
obj.labels = {};
|
|
4345
3862
|
if (message.labels) {
|
|
@@ -4362,10 +3879,6 @@ export const RecordMetaData = {
|
|
|
4362
3879
|
message.chainId = object.chainId ?? "";
|
|
4363
3880
|
message.transactionIndex = object.transactionIndex ?? 0;
|
|
4364
3881
|
message.logIndex = object.logIndex ?? 0;
|
|
4365
|
-
message.dataDescriptor =
|
|
4366
|
-
object.dataDescriptor !== undefined && object.dataDescriptor !== null
|
|
4367
|
-
? DataDescriptor.fromPartial(object.dataDescriptor)
|
|
4368
|
-
: undefined;
|
|
4369
3882
|
message.name = object.name ?? "";
|
|
4370
3883
|
message.labels = Object.entries(object.labels ?? {}).reduce<{
|
|
4371
3884
|
[key: string]: string;
|
|
@@ -5220,46 +4733,6 @@ export const ProcessorDefinition = {
|
|
|
5220
4733
|
responseStream: false,
|
|
5221
4734
|
options: {},
|
|
5222
4735
|
},
|
|
5223
|
-
processLogs: {
|
|
5224
|
-
name: "ProcessLogs",
|
|
5225
|
-
requestType: ProcessBindingsRequest,
|
|
5226
|
-
requestStream: false,
|
|
5227
|
-
responseType: ProcessBindingResponse,
|
|
5228
|
-
responseStream: false,
|
|
5229
|
-
options: {},
|
|
5230
|
-
},
|
|
5231
|
-
processTraces: {
|
|
5232
|
-
name: "ProcessTraces",
|
|
5233
|
-
requestType: ProcessBindingsRequest,
|
|
5234
|
-
requestStream: false,
|
|
5235
|
-
responseType: ProcessBindingResponse,
|
|
5236
|
-
responseStream: false,
|
|
5237
|
-
options: {},
|
|
5238
|
-
},
|
|
5239
|
-
processTransactions: {
|
|
5240
|
-
name: "ProcessTransactions",
|
|
5241
|
-
requestType: ProcessTransactionsRequest,
|
|
5242
|
-
requestStream: false,
|
|
5243
|
-
responseType: ProcessBindingResponse,
|
|
5244
|
-
responseStream: false,
|
|
5245
|
-
options: {},
|
|
5246
|
-
},
|
|
5247
|
-
processInstructions: {
|
|
5248
|
-
name: "ProcessInstructions",
|
|
5249
|
-
requestType: ProcessInstructionsRequest,
|
|
5250
|
-
requestStream: false,
|
|
5251
|
-
responseType: ProcessBindingResponse,
|
|
5252
|
-
responseStream: false,
|
|
5253
|
-
options: {},
|
|
5254
|
-
},
|
|
5255
|
-
processBlocks: {
|
|
5256
|
-
name: "ProcessBlocks",
|
|
5257
|
-
requestType: ProcessBlocksRequest,
|
|
5258
|
-
requestStream: false,
|
|
5259
|
-
responseType: ProcessBindingResponse,
|
|
5260
|
-
responseStream: false,
|
|
5261
|
-
options: {},
|
|
5262
|
-
},
|
|
5263
4736
|
processBindings: {
|
|
5264
4737
|
name: "ProcessBindings",
|
|
5265
4738
|
requestType: ProcessBindingsRequest,
|
|
@@ -5284,26 +4757,6 @@ export interface ProcessorServiceImplementation<CallContextExt = {}> {
|
|
|
5284
4757
|
request: ProcessConfigRequest,
|
|
5285
4758
|
context: CallContext & CallContextExt
|
|
5286
4759
|
): Promise<DeepPartial<ProcessConfigResponse>>;
|
|
5287
|
-
processLogs(
|
|
5288
|
-
request: ProcessBindingsRequest,
|
|
5289
|
-
context: CallContext & CallContextExt
|
|
5290
|
-
): Promise<DeepPartial<ProcessBindingResponse>>;
|
|
5291
|
-
processTraces(
|
|
5292
|
-
request: ProcessBindingsRequest,
|
|
5293
|
-
context: CallContext & CallContextExt
|
|
5294
|
-
): Promise<DeepPartial<ProcessBindingResponse>>;
|
|
5295
|
-
processTransactions(
|
|
5296
|
-
request: ProcessTransactionsRequest,
|
|
5297
|
-
context: CallContext & CallContextExt
|
|
5298
|
-
): Promise<DeepPartial<ProcessBindingResponse>>;
|
|
5299
|
-
processInstructions(
|
|
5300
|
-
request: ProcessInstructionsRequest,
|
|
5301
|
-
context: CallContext & CallContextExt
|
|
5302
|
-
): Promise<DeepPartial<ProcessBindingResponse>>;
|
|
5303
|
-
processBlocks(
|
|
5304
|
-
request: ProcessBlocksRequest,
|
|
5305
|
-
context: CallContext & CallContextExt
|
|
5306
|
-
): Promise<DeepPartial<ProcessBindingResponse>>;
|
|
5307
4760
|
processBindings(
|
|
5308
4761
|
request: ProcessBindingsRequest,
|
|
5309
4762
|
context: CallContext & CallContextExt
|
|
@@ -5323,26 +4776,6 @@ export interface ProcessorClient<CallOptionsExt = {}> {
|
|
|
5323
4776
|
request: DeepPartial<ProcessConfigRequest>,
|
|
5324
4777
|
options?: CallOptions & CallOptionsExt
|
|
5325
4778
|
): Promise<ProcessConfigResponse>;
|
|
5326
|
-
processLogs(
|
|
5327
|
-
request: DeepPartial<ProcessBindingsRequest>,
|
|
5328
|
-
options?: CallOptions & CallOptionsExt
|
|
5329
|
-
): Promise<ProcessBindingResponse>;
|
|
5330
|
-
processTraces(
|
|
5331
|
-
request: DeepPartial<ProcessBindingsRequest>,
|
|
5332
|
-
options?: CallOptions & CallOptionsExt
|
|
5333
|
-
): Promise<ProcessBindingResponse>;
|
|
5334
|
-
processTransactions(
|
|
5335
|
-
request: DeepPartial<ProcessTransactionsRequest>,
|
|
5336
|
-
options?: CallOptions & CallOptionsExt
|
|
5337
|
-
): Promise<ProcessBindingResponse>;
|
|
5338
|
-
processInstructions(
|
|
5339
|
-
request: DeepPartial<ProcessInstructionsRequest>,
|
|
5340
|
-
options?: CallOptions & CallOptionsExt
|
|
5341
|
-
): Promise<ProcessBindingResponse>;
|
|
5342
|
-
processBlocks(
|
|
5343
|
-
request: DeepPartial<ProcessBlocksRequest>,
|
|
5344
|
-
options?: CallOptions & CallOptionsExt
|
|
5345
|
-
): Promise<ProcessBindingResponse>;
|
|
5346
4779
|
processBindings(
|
|
5347
4780
|
request: DeepPartial<ProcessBindingsRequest>,
|
|
5348
4781
|
options?: CallOptions & CallOptionsExt
|