@sentio/sdk 0.1.12 → 0.2.14
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 +19 -0
- package/dist/base-processor-template.js +80 -0
- package/dist/base-processor-template.js.map +1 -0
- package/dist/base-processor.d.ts +7 -18
- package/dist/base-processor.js +69 -28
- package/dist/base-processor.js.map +1 -1
- package/dist/bind-options.d.ts +16 -0
- package/dist/bind-options.js +20 -0
- package/dist/bind-options.js.map +1 -0
- package/dist/chainmap.d.ts +4 -0
- package/dist/chainmap.js +95 -0
- package/dist/chainmap.js.map +1 -0
- package/dist/cli/build.d.ts +3 -1
- package/dist/cli/build.js +100 -17
- package/dist/cli/build.js.map +1 -1
- package/dist/cli/cli.d.ts +1 -2
- package/dist/cli/cli.js +9 -15
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/config.d.ts +7 -1
- package/dist/cli/config.js +4 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/solana-code-gen.d.ts +2 -0
- package/dist/cli/solana-code-gen.js +19 -0
- package/dist/cli/solana-code-gen.js.map +1 -0
- package/dist/cli/upload.js +4 -2
- package/dist/cli/upload.js.map +1 -1
- package/dist/gen/processor/protos/processor.d.ts +50 -3
- package/dist/gen/processor/protos/processor.js +244 -52
- package/dist/gen/processor/protos/processor.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/numberish.test.d.ts +1 -0
- package/dist/numberish.test.js +9 -0
- package/dist/numberish.test.js.map +1 -0
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +3 -0
- package/dist/provider.js.map +1 -1
- package/dist/service.d.ts +4 -1
- package/dist/service.js +90 -47
- package/dist/service.js.map +1 -1
- package/dist/solana-processor.d.ts +6 -6
- package/dist/solana-processor.js +5 -20
- package/dist/solana-processor.js.map +1 -1
- package/dist/target-ethers-sentio/codegen.js +46 -15
- package/dist/target-ethers-sentio/codegen.js.map +1 -1
- package/dist/test-case/clean-test.d.ts +1 -0
- package/dist/test-case/clean-test.js +11 -0
- package/dist/test-case/clean-test.js.map +1 -0
- package/dist/test-case/erc20.js +22 -6
- package/dist/test-case/erc20.js.map +1 -1
- package/dist/test-case/erc20.test.d.ts +1 -0
- package/dist/test-case/erc20.test.js +173 -0
- package/dist/test-case/erc20.test.js.map +1 -0
- package/dist/test-case/mirrorworld.d.ts +1 -4
- package/dist/test-case/mirrorworld.js +37 -57
- package/dist/test-case/mirrorworld.js.map +1 -1
- package/dist/test-case/solana.test.d.ts +1 -0
- package/dist/test-case/solana.test.js +56 -0
- package/dist/test-case/solana.test.js.map +1 -0
- package/dist/test-case/types/erc20_processor.d.ts +9 -8
- package/dist/test-case/types/erc20_processor.js +38 -14
- package/dist/test-case/types/erc20_processor.js.map +1 -1
- package/dist/test-case/types/game_wallet_processor.d.ts +107 -0
- package/dist/test-case/types/game_wallet_processor.js +102 -0
- package/dist/test-case/types/game_wallet_processor.js.map +1 -0
- package/dist/test-case/types/wormhole_processor.d.ts +16 -0
- package/dist/test-case/types/wormhole_processor.js +192 -0
- package/dist/test-case/types/wormhole_processor.js.map +1 -0
- package/dist/test-case/wormhole-token-bridge.d.ts +1 -0
- package/dist/test-case/wormhole-token-bridge.js +7 -0
- package/dist/test-case/wormhole-token-bridge.js.map +1 -0
- package/package.json +6 -4
|
@@ -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.HistogramResult = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.TransactionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.ContractInfo = exports.ContractConfig = exports.ProcessConfigResponse = exports.ProcessConfigRequest = exports.ProjectConfig = void 0;
|
|
6
|
+
exports.ProcessorDefinition = exports.CounterResult = exports.HistogramResult = exports.MetricValue = exports.RecordMetaData_LabelsEntry = exports.RecordMetaData = exports.O11yResult = exports.Block = exports.Instruction = exports.Transaction = exports.Log = exports.LogBinding = exports.ProcessBlockResponse = exports.ProcessBlockRequest = exports.ProcessInstructionResponse = exports.ProcessTransactionResponse = exports.ProcessInstructionRequest = exports.ProcessTransactionRequest = exports.ProcessLogResponse = exports.ProcessLogRequest = exports.Topic = exports.InstructionHandlerConfig = exports.TransactionHandlerConfig = exports.HandlerCondition = exports.LogHandlerConfig = exports.BlockHandlerConfig = exports.InstantiateTemplateRequest = 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"));
|
|
@@ -93,7 +93,7 @@ exports.ProcessConfigRequest = {
|
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
function createBaseProcessConfigResponse() {
|
|
96
|
-
return { config: undefined, contractConfigs: [] };
|
|
96
|
+
return { config: undefined, contractConfigs: [], templateInstances: [] };
|
|
97
97
|
}
|
|
98
98
|
exports.ProcessConfigResponse = {
|
|
99
99
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -103,6 +103,9 @@ exports.ProcessConfigResponse = {
|
|
|
103
103
|
for (const v of message.contractConfigs) {
|
|
104
104
|
exports.ContractConfig.encode(v, writer.uint32(18).fork()).ldelim();
|
|
105
105
|
}
|
|
106
|
+
for (const v of message.templateInstances) {
|
|
107
|
+
exports.TemplateInstance.encode(v, writer.uint32(26).fork()).ldelim();
|
|
108
|
+
}
|
|
106
109
|
return writer;
|
|
107
110
|
},
|
|
108
111
|
decode(input, length) {
|
|
@@ -118,6 +121,9 @@ exports.ProcessConfigResponse = {
|
|
|
118
121
|
case 2:
|
|
119
122
|
message.contractConfigs.push(exports.ContractConfig.decode(reader, reader.uint32()));
|
|
120
123
|
break;
|
|
124
|
+
case 3:
|
|
125
|
+
message.templateInstances.push(exports.TemplateInstance.decode(reader, reader.uint32()));
|
|
126
|
+
break;
|
|
121
127
|
default:
|
|
122
128
|
reader.skipType(tag & 7);
|
|
123
129
|
break;
|
|
@@ -133,6 +139,9 @@ exports.ProcessConfigResponse = {
|
|
|
133
139
|
contractConfigs: Array.isArray(object?.contractConfigs)
|
|
134
140
|
? object.contractConfigs.map((e) => exports.ContractConfig.fromJSON(e))
|
|
135
141
|
: [],
|
|
142
|
+
templateInstances: Array.isArray(object?.templateInstances)
|
|
143
|
+
? object.templateInstances.map((e) => exports.TemplateInstance.fromJSON(e))
|
|
144
|
+
: [],
|
|
136
145
|
};
|
|
137
146
|
},
|
|
138
147
|
toJSON(message) {
|
|
@@ -147,6 +156,12 @@ exports.ProcessConfigResponse = {
|
|
|
147
156
|
else {
|
|
148
157
|
obj.contractConfigs = [];
|
|
149
158
|
}
|
|
159
|
+
if (message.templateInstances) {
|
|
160
|
+
obj.templateInstances = message.templateInstances.map((e) => e ? exports.TemplateInstance.toJSON(e) : undefined);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
obj.templateInstances = [];
|
|
164
|
+
}
|
|
150
165
|
return obj;
|
|
151
166
|
},
|
|
152
167
|
fromPartial(object) {
|
|
@@ -157,6 +172,9 @@ exports.ProcessConfigResponse = {
|
|
|
157
172
|
: undefined;
|
|
158
173
|
message.contractConfigs =
|
|
159
174
|
object.contractConfigs?.map((e) => exports.ContractConfig.fromPartial(e)) || [];
|
|
175
|
+
message.templateInstances =
|
|
176
|
+
object.templateInstances?.map((e) => exports.TemplateInstance.fromPartial(e)) ||
|
|
177
|
+
[];
|
|
160
178
|
return message;
|
|
161
179
|
},
|
|
162
180
|
};
|
|
@@ -167,7 +185,6 @@ function createBaseContractConfig() {
|
|
|
167
185
|
logConfigs: [],
|
|
168
186
|
startBlock: long_1.default.UZERO,
|
|
169
187
|
endBlock: long_1.default.UZERO,
|
|
170
|
-
chunkSize: 0,
|
|
171
188
|
transactionConfig: [],
|
|
172
189
|
instructionConfig: [],
|
|
173
190
|
};
|
|
@@ -189,9 +206,6 @@ exports.ContractConfig = {
|
|
|
189
206
|
if (!message.endBlock.isZero()) {
|
|
190
207
|
writer.uint32(40).uint64(message.endBlock);
|
|
191
208
|
}
|
|
192
|
-
if (message.chunkSize !== 0) {
|
|
193
|
-
writer.uint32(48).int32(message.chunkSize);
|
|
194
|
-
}
|
|
195
209
|
for (const v of message.transactionConfig) {
|
|
196
210
|
exports.TransactionHandlerConfig.encode(v, writer.uint32(58).fork()).ldelim();
|
|
197
211
|
}
|
|
@@ -222,9 +236,6 @@ exports.ContractConfig = {
|
|
|
222
236
|
case 5:
|
|
223
237
|
message.endBlock = reader.uint64();
|
|
224
238
|
break;
|
|
225
|
-
case 6:
|
|
226
|
-
message.chunkSize = reader.int32();
|
|
227
|
-
break;
|
|
228
239
|
case 7:
|
|
229
240
|
message.transactionConfig.push(exports.TransactionHandlerConfig.decode(reader, reader.uint32()));
|
|
230
241
|
break;
|
|
@@ -255,7 +266,6 @@ exports.ContractConfig = {
|
|
|
255
266
|
endBlock: isSet(object.endBlock)
|
|
256
267
|
? long_1.default.fromValue(object.endBlock)
|
|
257
268
|
: long_1.default.UZERO,
|
|
258
|
-
chunkSize: isSet(object.chunkSize) ? Number(object.chunkSize) : 0,
|
|
259
269
|
transactionConfig: Array.isArray(object?.transactionConfig)
|
|
260
270
|
? object.transactionConfig.map((e) => exports.TransactionHandlerConfig.fromJSON(e))
|
|
261
271
|
: [],
|
|
@@ -284,8 +294,6 @@ exports.ContractConfig = {
|
|
|
284
294
|
(obj.startBlock = (message.startBlock || long_1.default.UZERO).toString());
|
|
285
295
|
message.endBlock !== undefined &&
|
|
286
296
|
(obj.endBlock = (message.endBlock || long_1.default.UZERO).toString());
|
|
287
|
-
message.chunkSize !== undefined &&
|
|
288
|
-
(obj.chunkSize = Math.round(message.chunkSize));
|
|
289
297
|
if (message.transactionConfig) {
|
|
290
298
|
obj.transactionConfig = message.transactionConfig.map((e) => e ? exports.TransactionHandlerConfig.toJSON(e) : undefined);
|
|
291
299
|
}
|
|
@@ -320,7 +328,6 @@ exports.ContractConfig = {
|
|
|
320
328
|
object.endBlock !== undefined && object.endBlock !== null
|
|
321
329
|
? long_1.default.fromValue(object.endBlock)
|
|
322
330
|
: long_1.default.UZERO;
|
|
323
|
-
message.chunkSize = object.chunkSize ?? 0;
|
|
324
331
|
message.transactionConfig =
|
|
325
332
|
object.transactionConfig?.map((e) => exports.TransactionHandlerConfig.fromPartial(e)) || [];
|
|
326
333
|
message.instructionConfig =
|
|
@@ -329,7 +336,7 @@ exports.ContractConfig = {
|
|
|
329
336
|
},
|
|
330
337
|
};
|
|
331
338
|
function createBaseContractInfo() {
|
|
332
|
-
return { name: "", chainId: "", address: "" };
|
|
339
|
+
return { name: "", chainId: "", address: "", abi: "" };
|
|
333
340
|
}
|
|
334
341
|
exports.ContractInfo = {
|
|
335
342
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -342,6 +349,9 @@ exports.ContractInfo = {
|
|
|
342
349
|
if (message.address !== "") {
|
|
343
350
|
writer.uint32(26).string(message.address);
|
|
344
351
|
}
|
|
352
|
+
if (message.abi !== "") {
|
|
353
|
+
writer.uint32(34).string(message.abi);
|
|
354
|
+
}
|
|
345
355
|
return writer;
|
|
346
356
|
},
|
|
347
357
|
decode(input, length) {
|
|
@@ -360,6 +370,9 @@ exports.ContractInfo = {
|
|
|
360
370
|
case 3:
|
|
361
371
|
message.address = reader.string();
|
|
362
372
|
break;
|
|
373
|
+
case 4:
|
|
374
|
+
message.abi = reader.string();
|
|
375
|
+
break;
|
|
363
376
|
default:
|
|
364
377
|
reader.skipType(tag & 7);
|
|
365
378
|
break;
|
|
@@ -372,6 +385,7 @@ exports.ContractInfo = {
|
|
|
372
385
|
name: isSet(object.name) ? String(object.name) : "",
|
|
373
386
|
chainId: isSet(object.chainId) ? String(object.chainId) : "",
|
|
374
387
|
address: isSet(object.address) ? String(object.address) : "",
|
|
388
|
+
abi: isSet(object.abi) ? String(object.abi) : "",
|
|
375
389
|
};
|
|
376
390
|
},
|
|
377
391
|
toJSON(message) {
|
|
@@ -379,6 +393,7 @@ exports.ContractInfo = {
|
|
|
379
393
|
message.name !== undefined && (obj.name = message.name);
|
|
380
394
|
message.chainId !== undefined && (obj.chainId = message.chainId);
|
|
381
395
|
message.address !== undefined && (obj.address = message.address);
|
|
396
|
+
message.abi !== undefined && (obj.abi = message.abi);
|
|
382
397
|
return obj;
|
|
383
398
|
},
|
|
384
399
|
fromPartial(object) {
|
|
@@ -386,6 +401,154 @@ exports.ContractInfo = {
|
|
|
386
401
|
message.name = object.name ?? "";
|
|
387
402
|
message.chainId = object.chainId ?? "";
|
|
388
403
|
message.address = object.address ?? "";
|
|
404
|
+
message.abi = object.abi ?? "";
|
|
405
|
+
return message;
|
|
406
|
+
},
|
|
407
|
+
};
|
|
408
|
+
function createBaseTemplateInstance() {
|
|
409
|
+
return {
|
|
410
|
+
contract: undefined,
|
|
411
|
+
startBlock: long_1.default.UZERO,
|
|
412
|
+
endBlock: long_1.default.UZERO,
|
|
413
|
+
templateId: 0,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
exports.TemplateInstance = {
|
|
417
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
418
|
+
if (message.contract !== undefined) {
|
|
419
|
+
exports.ContractInfo.encode(message.contract, writer.uint32(10).fork()).ldelim();
|
|
420
|
+
}
|
|
421
|
+
if (!message.startBlock.isZero()) {
|
|
422
|
+
writer.uint32(16).uint64(message.startBlock);
|
|
423
|
+
}
|
|
424
|
+
if (!message.endBlock.isZero()) {
|
|
425
|
+
writer.uint32(24).uint64(message.endBlock);
|
|
426
|
+
}
|
|
427
|
+
if (message.templateId !== 0) {
|
|
428
|
+
writer.uint32(32).int32(message.templateId);
|
|
429
|
+
}
|
|
430
|
+
return writer;
|
|
431
|
+
},
|
|
432
|
+
decode(input, length) {
|
|
433
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
434
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
435
|
+
const message = createBaseTemplateInstance();
|
|
436
|
+
while (reader.pos < end) {
|
|
437
|
+
const tag = reader.uint32();
|
|
438
|
+
switch (tag >>> 3) {
|
|
439
|
+
case 1:
|
|
440
|
+
message.contract = exports.ContractInfo.decode(reader, reader.uint32());
|
|
441
|
+
break;
|
|
442
|
+
case 2:
|
|
443
|
+
message.startBlock = reader.uint64();
|
|
444
|
+
break;
|
|
445
|
+
case 3:
|
|
446
|
+
message.endBlock = reader.uint64();
|
|
447
|
+
break;
|
|
448
|
+
case 4:
|
|
449
|
+
message.templateId = reader.int32();
|
|
450
|
+
break;
|
|
451
|
+
default:
|
|
452
|
+
reader.skipType(tag & 7);
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return message;
|
|
457
|
+
},
|
|
458
|
+
fromJSON(object) {
|
|
459
|
+
return {
|
|
460
|
+
contract: isSet(object.contract)
|
|
461
|
+
? exports.ContractInfo.fromJSON(object.contract)
|
|
462
|
+
: undefined,
|
|
463
|
+
startBlock: isSet(object.startBlock)
|
|
464
|
+
? long_1.default.fromValue(object.startBlock)
|
|
465
|
+
: long_1.default.UZERO,
|
|
466
|
+
endBlock: isSet(object.endBlock)
|
|
467
|
+
? long_1.default.fromValue(object.endBlock)
|
|
468
|
+
: long_1.default.UZERO,
|
|
469
|
+
templateId: isSet(object.templateId) ? Number(object.templateId) : 0,
|
|
470
|
+
};
|
|
471
|
+
},
|
|
472
|
+
toJSON(message) {
|
|
473
|
+
const obj = {};
|
|
474
|
+
message.contract !== undefined &&
|
|
475
|
+
(obj.contract = message.contract
|
|
476
|
+
? exports.ContractInfo.toJSON(message.contract)
|
|
477
|
+
: undefined);
|
|
478
|
+
message.startBlock !== undefined &&
|
|
479
|
+
(obj.startBlock = (message.startBlock || long_1.default.UZERO).toString());
|
|
480
|
+
message.endBlock !== undefined &&
|
|
481
|
+
(obj.endBlock = (message.endBlock || long_1.default.UZERO).toString());
|
|
482
|
+
message.templateId !== undefined &&
|
|
483
|
+
(obj.templateId = Math.round(message.templateId));
|
|
484
|
+
return obj;
|
|
485
|
+
},
|
|
486
|
+
fromPartial(object) {
|
|
487
|
+
const message = createBaseTemplateInstance();
|
|
488
|
+
message.contract =
|
|
489
|
+
object.contract !== undefined && object.contract !== null
|
|
490
|
+
? exports.ContractInfo.fromPartial(object.contract)
|
|
491
|
+
: undefined;
|
|
492
|
+
message.startBlock =
|
|
493
|
+
object.startBlock !== undefined && object.startBlock !== null
|
|
494
|
+
? long_1.default.fromValue(object.startBlock)
|
|
495
|
+
: long_1.default.UZERO;
|
|
496
|
+
message.endBlock =
|
|
497
|
+
object.endBlock !== undefined && object.endBlock !== null
|
|
498
|
+
? long_1.default.fromValue(object.endBlock)
|
|
499
|
+
: long_1.default.UZERO;
|
|
500
|
+
message.templateId = object.templateId ?? 0;
|
|
501
|
+
return message;
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
function createBaseInstantiateTemplateRequest() {
|
|
505
|
+
return { instances: [] };
|
|
506
|
+
}
|
|
507
|
+
exports.InstantiateTemplateRequest = {
|
|
508
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
509
|
+
for (const v of message.instances) {
|
|
510
|
+
exports.TemplateInstance.encode(v, writer.uint32(10).fork()).ldelim();
|
|
511
|
+
}
|
|
512
|
+
return writer;
|
|
513
|
+
},
|
|
514
|
+
decode(input, length) {
|
|
515
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
516
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
517
|
+
const message = createBaseInstantiateTemplateRequest();
|
|
518
|
+
while (reader.pos < end) {
|
|
519
|
+
const tag = reader.uint32();
|
|
520
|
+
switch (tag >>> 3) {
|
|
521
|
+
case 1:
|
|
522
|
+
message.instances.push(exports.TemplateInstance.decode(reader, reader.uint32()));
|
|
523
|
+
break;
|
|
524
|
+
default:
|
|
525
|
+
reader.skipType(tag & 7);
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return message;
|
|
530
|
+
},
|
|
531
|
+
fromJSON(object) {
|
|
532
|
+
return {
|
|
533
|
+
instances: Array.isArray(object?.instances)
|
|
534
|
+
? object.instances.map((e) => exports.TemplateInstance.fromJSON(e))
|
|
535
|
+
: [],
|
|
536
|
+
};
|
|
537
|
+
},
|
|
538
|
+
toJSON(message) {
|
|
539
|
+
const obj = {};
|
|
540
|
+
if (message.instances) {
|
|
541
|
+
obj.instances = message.instances.map((e) => e ? exports.TemplateInstance.toJSON(e) : undefined);
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
obj.instances = [];
|
|
545
|
+
}
|
|
546
|
+
return obj;
|
|
547
|
+
},
|
|
548
|
+
fromPartial(object) {
|
|
549
|
+
const message = createBaseInstantiateTemplateRequest();
|
|
550
|
+
message.instances =
|
|
551
|
+
object.instances?.map((e) => exports.TemplateInstance.fromPartial(e)) || [];
|
|
389
552
|
return message;
|
|
390
553
|
},
|
|
391
554
|
};
|
|
@@ -751,13 +914,16 @@ exports.ProcessLogRequest = {
|
|
|
751
914
|
},
|
|
752
915
|
};
|
|
753
916
|
function createBaseProcessLogResponse() {
|
|
754
|
-
return { result: undefined };
|
|
917
|
+
return { result: undefined, configUpdated: false };
|
|
755
918
|
}
|
|
756
919
|
exports.ProcessLogResponse = {
|
|
757
920
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
758
921
|
if (message.result !== undefined) {
|
|
759
922
|
exports.O11yResult.encode(message.result, writer.uint32(10).fork()).ldelim();
|
|
760
923
|
}
|
|
924
|
+
if (message.configUpdated === true) {
|
|
925
|
+
writer.uint32(32).bool(message.configUpdated);
|
|
926
|
+
}
|
|
761
927
|
return writer;
|
|
762
928
|
},
|
|
763
929
|
decode(input, length) {
|
|
@@ -770,6 +936,9 @@ exports.ProcessLogResponse = {
|
|
|
770
936
|
case 1:
|
|
771
937
|
message.result = exports.O11yResult.decode(reader, reader.uint32());
|
|
772
938
|
break;
|
|
939
|
+
case 4:
|
|
940
|
+
message.configUpdated = reader.bool();
|
|
941
|
+
break;
|
|
773
942
|
default:
|
|
774
943
|
reader.skipType(tag & 7);
|
|
775
944
|
break;
|
|
@@ -782,6 +951,9 @@ exports.ProcessLogResponse = {
|
|
|
782
951
|
result: isSet(object.result)
|
|
783
952
|
? exports.O11yResult.fromJSON(object.result)
|
|
784
953
|
: undefined,
|
|
954
|
+
configUpdated: isSet(object.configUpdated)
|
|
955
|
+
? Boolean(object.configUpdated)
|
|
956
|
+
: false,
|
|
785
957
|
};
|
|
786
958
|
},
|
|
787
959
|
toJSON(message) {
|
|
@@ -790,6 +962,8 @@ exports.ProcessLogResponse = {
|
|
|
790
962
|
(obj.result = message.result
|
|
791
963
|
? exports.O11yResult.toJSON(message.result)
|
|
792
964
|
: undefined);
|
|
965
|
+
message.configUpdated !== undefined &&
|
|
966
|
+
(obj.configUpdated = message.configUpdated);
|
|
793
967
|
return obj;
|
|
794
968
|
},
|
|
795
969
|
fromPartial(object) {
|
|
@@ -798,6 +972,7 @@ exports.ProcessLogResponse = {
|
|
|
798
972
|
object.result !== undefined && object.result !== null
|
|
799
973
|
? exports.O11yResult.fromPartial(object.result)
|
|
800
974
|
: undefined;
|
|
975
|
+
message.configUpdated = object.configUpdated ?? false;
|
|
801
976
|
return message;
|
|
802
977
|
},
|
|
803
978
|
};
|
|
@@ -853,12 +1028,12 @@ exports.ProcessTransactionRequest = {
|
|
|
853
1028
|
},
|
|
854
1029
|
};
|
|
855
1030
|
function createBaseProcessInstructionRequest() {
|
|
856
|
-
return {
|
|
1031
|
+
return { instructions: [] };
|
|
857
1032
|
}
|
|
858
1033
|
exports.ProcessInstructionRequest = {
|
|
859
1034
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
860
|
-
|
|
861
|
-
exports.Instruction.encode(
|
|
1035
|
+
for (const v of message.instructions) {
|
|
1036
|
+
exports.Instruction.encode(v, writer.uint32(10).fork()).ldelim();
|
|
862
1037
|
}
|
|
863
1038
|
return writer;
|
|
864
1039
|
},
|
|
@@ -870,7 +1045,7 @@ exports.ProcessInstructionRequest = {
|
|
|
870
1045
|
const tag = reader.uint32();
|
|
871
1046
|
switch (tag >>> 3) {
|
|
872
1047
|
case 1:
|
|
873
|
-
message.
|
|
1048
|
+
message.instructions.push(exports.Instruction.decode(reader, reader.uint32()));
|
|
874
1049
|
break;
|
|
875
1050
|
default:
|
|
876
1051
|
reader.skipType(tag & 7);
|
|
@@ -881,25 +1056,25 @@ exports.ProcessInstructionRequest = {
|
|
|
881
1056
|
},
|
|
882
1057
|
fromJSON(object) {
|
|
883
1058
|
return {
|
|
884
|
-
|
|
885
|
-
? exports.Instruction.fromJSON(
|
|
886
|
-
:
|
|
1059
|
+
instructions: Array.isArray(object?.instructions)
|
|
1060
|
+
? object.instructions.map((e) => exports.Instruction.fromJSON(e))
|
|
1061
|
+
: [],
|
|
887
1062
|
};
|
|
888
1063
|
},
|
|
889
1064
|
toJSON(message) {
|
|
890
1065
|
const obj = {};
|
|
891
|
-
message.
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
1066
|
+
if (message.instructions) {
|
|
1067
|
+
obj.instructions = message.instructions.map((e) => e ? exports.Instruction.toJSON(e) : undefined);
|
|
1068
|
+
}
|
|
1069
|
+
else {
|
|
1070
|
+
obj.instructions = [];
|
|
1071
|
+
}
|
|
895
1072
|
return obj;
|
|
896
1073
|
},
|
|
897
1074
|
fromPartial(object) {
|
|
898
1075
|
const message = createBaseProcessInstructionRequest();
|
|
899
|
-
message.
|
|
900
|
-
object.
|
|
901
|
-
? exports.Instruction.fromPartial(object.instruction)
|
|
902
|
-
: undefined;
|
|
1076
|
+
message.instructions =
|
|
1077
|
+
object.instructions?.map((e) => exports.Instruction.fromPartial(e)) || [];
|
|
903
1078
|
return message;
|
|
904
1079
|
},
|
|
905
1080
|
};
|
|
@@ -1279,15 +1454,15 @@ exports.Transaction = {
|
|
|
1279
1454
|
},
|
|
1280
1455
|
};
|
|
1281
1456
|
function createBaseInstruction() {
|
|
1282
|
-
return { instructionData: "",
|
|
1457
|
+
return { instructionData: "", slot: long_1.default.UZERO, programAccountId: "" };
|
|
1283
1458
|
}
|
|
1284
1459
|
exports.Instruction = {
|
|
1285
1460
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1286
1461
|
if (message.instructionData !== "") {
|
|
1287
1462
|
writer.uint32(10).string(message.instructionData);
|
|
1288
1463
|
}
|
|
1289
|
-
if (message.
|
|
1290
|
-
writer.uint32(
|
|
1464
|
+
if (!message.slot.isZero()) {
|
|
1465
|
+
writer.uint32(16).uint64(message.slot);
|
|
1291
1466
|
}
|
|
1292
1467
|
if (message.programAccountId !== "") {
|
|
1293
1468
|
writer.uint32(26).string(message.programAccountId);
|
|
@@ -1305,7 +1480,7 @@ exports.Instruction = {
|
|
|
1305
1480
|
message.instructionData = reader.string();
|
|
1306
1481
|
break;
|
|
1307
1482
|
case 2:
|
|
1308
|
-
message.
|
|
1483
|
+
message.slot = reader.uint64();
|
|
1309
1484
|
break;
|
|
1310
1485
|
case 3:
|
|
1311
1486
|
message.programAccountId = reader.string();
|
|
@@ -1322,7 +1497,7 @@ exports.Instruction = {
|
|
|
1322
1497
|
instructionData: isSet(object.instructionData)
|
|
1323
1498
|
? String(object.instructionData)
|
|
1324
1499
|
: "",
|
|
1325
|
-
|
|
1500
|
+
slot: isSet(object.slot) ? long_1.default.fromValue(object.slot) : long_1.default.UZERO,
|
|
1326
1501
|
programAccountId: isSet(object.programAccountId)
|
|
1327
1502
|
? String(object.programAccountId)
|
|
1328
1503
|
: "",
|
|
@@ -1332,8 +1507,8 @@ exports.Instruction = {
|
|
|
1332
1507
|
const obj = {};
|
|
1333
1508
|
message.instructionData !== undefined &&
|
|
1334
1509
|
(obj.instructionData = message.instructionData);
|
|
1335
|
-
message.
|
|
1336
|
-
(obj.
|
|
1510
|
+
message.slot !== undefined &&
|
|
1511
|
+
(obj.slot = (message.slot || long_1.default.UZERO).toString());
|
|
1337
1512
|
message.programAccountId !== undefined &&
|
|
1338
1513
|
(obj.programAccountId = message.programAccountId);
|
|
1339
1514
|
return obj;
|
|
@@ -1341,7 +1516,10 @@ exports.Instruction = {
|
|
|
1341
1516
|
fromPartial(object) {
|
|
1342
1517
|
const message = createBaseInstruction();
|
|
1343
1518
|
message.instructionData = object.instructionData ?? "";
|
|
1344
|
-
message.
|
|
1519
|
+
message.slot =
|
|
1520
|
+
object.slot !== undefined && object.slot !== null
|
|
1521
|
+
? long_1.default.fromValue(object.slot)
|
|
1522
|
+
: long_1.default.UZERO;
|
|
1345
1523
|
message.programAccountId = object.programAccountId ?? "";
|
|
1346
1524
|
return message;
|
|
1347
1525
|
},
|
|
@@ -1874,6 +2052,14 @@ exports.ProcessorDefinition = {
|
|
|
1874
2052
|
responseStream: false,
|
|
1875
2053
|
options: {},
|
|
1876
2054
|
},
|
|
2055
|
+
instantiateTemplate: {
|
|
2056
|
+
name: "InstantiateTemplate",
|
|
2057
|
+
requestType: exports.InstantiateTemplateRequest,
|
|
2058
|
+
requestStream: false,
|
|
2059
|
+
responseType: empty_1.Empty,
|
|
2060
|
+
responseStream: false,
|
|
2061
|
+
options: {},
|
|
2062
|
+
},
|
|
1877
2063
|
processLog: {
|
|
1878
2064
|
name: "ProcessLog",
|
|
1879
2065
|
requestType: exports.ProcessLogRequest,
|
|
@@ -1919,24 +2105,30 @@ var globalThis = (() => {
|
|
|
1919
2105
|
return global;
|
|
1920
2106
|
throw "Unable to locate global object";
|
|
1921
2107
|
})();
|
|
1922
|
-
const atob = globalThis.atob ||
|
|
1923
|
-
((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
1924
2108
|
function bytesFromBase64(b64) {
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
2109
|
+
if (globalThis.Buffer) {
|
|
2110
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
2111
|
+
}
|
|
2112
|
+
else {
|
|
2113
|
+
const bin = globalThis.atob(b64);
|
|
2114
|
+
const arr = new Uint8Array(bin.length);
|
|
2115
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
2116
|
+
arr[i] = bin.charCodeAt(i);
|
|
2117
|
+
}
|
|
2118
|
+
return arr;
|
|
1929
2119
|
}
|
|
1930
|
-
return arr;
|
|
1931
2120
|
}
|
|
1932
|
-
const btoa = globalThis.btoa ||
|
|
1933
|
-
((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
1934
2121
|
function base64FromBytes(arr) {
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2122
|
+
if (globalThis.Buffer) {
|
|
2123
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
2124
|
+
}
|
|
2125
|
+
else {
|
|
2126
|
+
const bin = [];
|
|
2127
|
+
arr.forEach((byte) => {
|
|
2128
|
+
bin.push(String.fromCharCode(byte));
|
|
2129
|
+
});
|
|
2130
|
+
return globalThis.btoa(bin.join(""));
|
|
2131
|
+
}
|
|
1940
2132
|
}
|
|
1941
2133
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
1942
2134
|
minimal_1.default.util.Long = long_1.default;
|