@avaprotocol/sdk-js 2.3.13-dev.1 → 2.3.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/CHANGELOG.md +14 -0
- package/dist/index.js +122 -86
- package/dist/index.mjs +122 -86
- package/dist/models/node/contractRead.d.ts.map +1 -1
- package/dist/models/node/contractRead.js +9 -4
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/contractWrite.js +9 -4
- package/dist/models/node/customCode.d.ts.map +1 -1
- package/dist/models/node/customCode.js +9 -4
- package/dist/models/node/interface.js +2 -3
- package/dist/models/node/loop.d.ts.map +1 -1
- package/dist/models/node/loop.js +9 -4
- package/dist/models/step.d.ts.map +1 -1
- package/dist/models/step.js +45 -34
- package/dist/models/trigger/event.d.ts.map +1 -1
- package/dist/models/trigger/event.js +12 -0
- package/dist/models/trigger/fixedTime.d.ts.map +1 -1
- package/dist/models/trigger/fixedTime.js +12 -0
- package/dist/models/trigger/interface.d.ts +1 -2
- package/dist/models/trigger/interface.d.ts.map +1 -1
- package/dist/models/trigger/interface.js +1 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 2.3.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ba5ec8f: Fix input is not correctly entered into eventTrigger issue
|
|
8
|
+
|
|
9
|
+
## 2.3.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 272c26e: Fixed types package include protobuf library issue
|
|
14
|
+
- Updated dependencies [272c26e]
|
|
15
|
+
- @avaprotocol/types@2.2.11
|
|
16
|
+
|
|
3
17
|
## 2.3.12
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -16625,6 +16625,41 @@ var avs_pb7 = __toESM(require_avs_pb());
|
|
|
16625
16625
|
// src/models/trigger/block.ts
|
|
16626
16626
|
var avs_pb2 = __toESM(require_avs_pb());
|
|
16627
16627
|
|
|
16628
|
+
// src/models/trigger/interface.ts
|
|
16629
|
+
var Trigger = class {
|
|
16630
|
+
/**
|
|
16631
|
+
* Create an instance of Trigger from user inputs
|
|
16632
|
+
* @param props
|
|
16633
|
+
*/
|
|
16634
|
+
constructor(props) {
|
|
16635
|
+
this.id = props.id;
|
|
16636
|
+
this.name = props.name;
|
|
16637
|
+
this.type = props.type;
|
|
16638
|
+
this.data = props.data;
|
|
16639
|
+
this.output = props.output;
|
|
16640
|
+
this.input = props.input;
|
|
16641
|
+
}
|
|
16642
|
+
toRequest() {
|
|
16643
|
+
throw new Error("Method not implemented.");
|
|
16644
|
+
}
|
|
16645
|
+
getOutput() {
|
|
16646
|
+
return this.output;
|
|
16647
|
+
}
|
|
16648
|
+
toJson() {
|
|
16649
|
+
return {
|
|
16650
|
+
id: this.id,
|
|
16651
|
+
name: this.name,
|
|
16652
|
+
type: this.type,
|
|
16653
|
+
data: this.data,
|
|
16654
|
+
output: this.output,
|
|
16655
|
+
input: this.input
|
|
16656
|
+
};
|
|
16657
|
+
}
|
|
16658
|
+
};
|
|
16659
|
+
|
|
16660
|
+
// src/models/trigger/block.ts
|
|
16661
|
+
var import_types2 = require("@avaprotocol/types");
|
|
16662
|
+
|
|
16628
16663
|
// src/utils.ts
|
|
16629
16664
|
var import_struct_pb = require("google-protobuf/google/protobuf/struct_pb");
|
|
16630
16665
|
var import_types = require("@avaprotocol/types");
|
|
@@ -16790,40 +16825,7 @@ function extractInputFromProtobuf(inputValue) {
|
|
|
16790
16825
|
return void 0;
|
|
16791
16826
|
}
|
|
16792
16827
|
|
|
16793
|
-
// src/models/trigger/interface.ts
|
|
16794
|
-
var Trigger = class {
|
|
16795
|
-
/**
|
|
16796
|
-
* Create an instance of Trigger from user inputs
|
|
16797
|
-
* @param props
|
|
16798
|
-
*/
|
|
16799
|
-
constructor(props) {
|
|
16800
|
-
this.id = props.id;
|
|
16801
|
-
this.name = props.name;
|
|
16802
|
-
this.type = props.type;
|
|
16803
|
-
this.data = props.data;
|
|
16804
|
-
this.output = props.output;
|
|
16805
|
-
this.input = props.input ? extractInputFromProtobuf(props.input) : void 0;
|
|
16806
|
-
}
|
|
16807
|
-
toRequest() {
|
|
16808
|
-
throw new Error("Method not implemented.");
|
|
16809
|
-
}
|
|
16810
|
-
getOutput() {
|
|
16811
|
-
return this.output;
|
|
16812
|
-
}
|
|
16813
|
-
toJson() {
|
|
16814
|
-
return {
|
|
16815
|
-
id: this.id,
|
|
16816
|
-
name: this.name,
|
|
16817
|
-
type: this.type,
|
|
16818
|
-
data: this.data,
|
|
16819
|
-
output: this.output,
|
|
16820
|
-
input: this.input
|
|
16821
|
-
};
|
|
16822
|
-
}
|
|
16823
|
-
};
|
|
16824
|
-
|
|
16825
16828
|
// src/models/trigger/block.ts
|
|
16826
|
-
var import_types2 = require("@avaprotocol/types");
|
|
16827
16829
|
var BlockTrigger2 = class _BlockTrigger extends Trigger {
|
|
16828
16830
|
constructor(props) {
|
|
16829
16831
|
super({ ...props, type: import_types2.TriggerType.Block, data: props.data });
|
|
@@ -17034,12 +17036,17 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
17034
17036
|
});
|
|
17035
17037
|
config.setQueriesList(queryMessages);
|
|
17036
17038
|
trigger.setConfig(config);
|
|
17039
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
17040
|
+
if (inputValue) {
|
|
17041
|
+
trigger.setInput(inputValue);
|
|
17042
|
+
}
|
|
17037
17043
|
request.setEvent(trigger);
|
|
17038
17044
|
return request;
|
|
17039
17045
|
}
|
|
17040
17046
|
static fromResponse(raw) {
|
|
17041
17047
|
const obj = raw.toObject();
|
|
17042
17048
|
let data = { queries: [] };
|
|
17049
|
+
let input = void 0;
|
|
17043
17050
|
if (raw.getEvent() && raw.getEvent().hasConfig()) {
|
|
17044
17051
|
const config = raw.getEvent().getConfig();
|
|
17045
17052
|
if (config) {
|
|
@@ -17070,11 +17077,15 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
17070
17077
|
}
|
|
17071
17078
|
data = { queries };
|
|
17072
17079
|
}
|
|
17080
|
+
if (raw.getEvent().hasInput()) {
|
|
17081
|
+
input = extractInputFromProtobuf(raw.getEvent().getInput());
|
|
17082
|
+
}
|
|
17073
17083
|
}
|
|
17074
17084
|
return new _EventTrigger({
|
|
17075
17085
|
...obj,
|
|
17076
17086
|
type: import_types4.TriggerType.Event,
|
|
17077
|
-
data
|
|
17087
|
+
data,
|
|
17088
|
+
input
|
|
17078
17089
|
});
|
|
17079
17090
|
}
|
|
17080
17091
|
/**
|
|
@@ -17123,12 +17134,17 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends Trigger {
|
|
|
17123
17134
|
const config = new avs_pb5.FixedTimeTrigger.Config();
|
|
17124
17135
|
config.setEpochsList(this.data.epochsList || []);
|
|
17125
17136
|
trigger.setConfig(config);
|
|
17137
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
17138
|
+
if (inputValue) {
|
|
17139
|
+
trigger.setInput(inputValue);
|
|
17140
|
+
}
|
|
17126
17141
|
request.setFixedTime(trigger);
|
|
17127
17142
|
return request;
|
|
17128
17143
|
}
|
|
17129
17144
|
static fromResponse(raw) {
|
|
17130
17145
|
const obj = raw.toObject();
|
|
17131
17146
|
let data = { epochsList: [] };
|
|
17147
|
+
let input = void 0;
|
|
17132
17148
|
if (raw.getFixedTime() && raw.getFixedTime().hasConfig()) {
|
|
17133
17149
|
const config = raw.getFixedTime().getConfig();
|
|
17134
17150
|
if (config) {
|
|
@@ -17136,11 +17152,15 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends Trigger {
|
|
|
17136
17152
|
epochsList: config.getEpochsList() || []
|
|
17137
17153
|
};
|
|
17138
17154
|
}
|
|
17155
|
+
if (raw.getFixedTime().hasInput()) {
|
|
17156
|
+
input = extractInputFromProtobuf(raw.getFixedTime().getInput());
|
|
17157
|
+
}
|
|
17139
17158
|
}
|
|
17140
17159
|
return new _FixedTimeTrigger({
|
|
17141
17160
|
...obj,
|
|
17142
17161
|
type: import_types5.TriggerType.FixedTime,
|
|
17143
|
-
data
|
|
17162
|
+
data,
|
|
17163
|
+
input
|
|
17144
17164
|
});
|
|
17145
17165
|
}
|
|
17146
17166
|
/**
|
|
@@ -17330,7 +17350,7 @@ var Node = class {
|
|
|
17330
17350
|
this.name = props.name;
|
|
17331
17351
|
this.type = props.type;
|
|
17332
17352
|
this.data = props.data;
|
|
17333
|
-
this.input = props.input
|
|
17353
|
+
this.input = props.input;
|
|
17334
17354
|
}
|
|
17335
17355
|
toRequest() {
|
|
17336
17356
|
const request = new avs_pb8.TaskNode();
|
|
@@ -17373,7 +17393,10 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
17373
17393
|
methodName: call.methodName
|
|
17374
17394
|
})) || []
|
|
17375
17395
|
};
|
|
17376
|
-
|
|
17396
|
+
let input = void 0;
|
|
17397
|
+
if (raw.hasInput()) {
|
|
17398
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17399
|
+
}
|
|
17377
17400
|
return new _ContractWriteNode({
|
|
17378
17401
|
...obj,
|
|
17379
17402
|
type: import_types9.NodeType.ContractWrite,
|
|
@@ -17402,7 +17425,7 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
17402
17425
|
node.setConfig(config);
|
|
17403
17426
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17404
17427
|
if (inputValue) {
|
|
17405
|
-
|
|
17428
|
+
request.setInput(inputValue);
|
|
17406
17429
|
}
|
|
17407
17430
|
request.setContractWrite(node);
|
|
17408
17431
|
return request;
|
|
@@ -17477,7 +17500,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends Node {
|
|
|
17477
17500
|
lang: rawConfig.lang,
|
|
17478
17501
|
source: rawConfig.source
|
|
17479
17502
|
};
|
|
17480
|
-
|
|
17503
|
+
let input = void 0;
|
|
17504
|
+
if (raw.hasInput()) {
|
|
17505
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17506
|
+
}
|
|
17481
17507
|
return new _CustomCodeNode({
|
|
17482
17508
|
...obj,
|
|
17483
17509
|
type: import_types10.NodeType.CustomCode,
|
|
@@ -17496,7 +17522,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends Node {
|
|
|
17496
17522
|
node.setConfig(config);
|
|
17497
17523
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17498
17524
|
if (inputValue) {
|
|
17499
|
-
|
|
17525
|
+
request.setInput(inputValue);
|
|
17500
17526
|
}
|
|
17501
17527
|
request.setCustomCode(node);
|
|
17502
17528
|
return request;
|
|
@@ -17644,7 +17670,10 @@ var ContractReadNode2 = class _ContractReadNode extends Node {
|
|
|
17644
17670
|
methodName: call.methodName
|
|
17645
17671
|
})) || []
|
|
17646
17672
|
};
|
|
17647
|
-
|
|
17673
|
+
let input = void 0;
|
|
17674
|
+
if (raw.hasInput()) {
|
|
17675
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17676
|
+
}
|
|
17648
17677
|
return new _ContractReadNode({
|
|
17649
17678
|
...obj,
|
|
17650
17679
|
type: import_types13.NodeType.ContractRead,
|
|
@@ -17672,7 +17701,7 @@ var ContractReadNode2 = class _ContractReadNode extends Node {
|
|
|
17672
17701
|
node.setConfig(config);
|
|
17673
17702
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17674
17703
|
if (inputValue) {
|
|
17675
|
-
|
|
17704
|
+
request.setInput(inputValue);
|
|
17676
17705
|
}
|
|
17677
17706
|
request.setContractRead(node);
|
|
17678
17707
|
return request;
|
|
@@ -17863,7 +17892,10 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
17863
17892
|
contractWrite: loopNodeData.contractWrite,
|
|
17864
17893
|
graphqlDataQuery: loopNodeData.graphqlDataQuery
|
|
17865
17894
|
};
|
|
17866
|
-
|
|
17895
|
+
let input = void 0;
|
|
17896
|
+
if (raw.hasInput()) {
|
|
17897
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17898
|
+
}
|
|
17867
17899
|
return new _LoopNode({
|
|
17868
17900
|
...obj,
|
|
17869
17901
|
type: import_types17.NodeType.Loop,
|
|
@@ -17884,7 +17916,7 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
17884
17916
|
loopNode.setConfig(config);
|
|
17885
17917
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17886
17918
|
if (inputValue) {
|
|
17887
|
-
|
|
17919
|
+
node.setInput(inputValue);
|
|
17888
17920
|
}
|
|
17889
17921
|
if (data.ethTransfer) {
|
|
17890
17922
|
const ethTransfer = new avs_pb17.ETHTransferNode();
|
|
@@ -18388,9 +18420,10 @@ var Step = class _Step {
|
|
|
18388
18420
|
if (contractReadOutput) {
|
|
18389
18421
|
const outputObj = typeof contractReadOutput.toObject === "function" ? contractReadOutput.toObject() : contractReadOutput;
|
|
18390
18422
|
if (outputObj && outputObj.resultsList) {
|
|
18423
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
18391
18424
|
return {
|
|
18392
|
-
...
|
|
18393
|
-
results:
|
|
18425
|
+
...cleanOutputObj,
|
|
18426
|
+
results: resultsList.map((result) => ({
|
|
18394
18427
|
methodName: result.methodName,
|
|
18395
18428
|
success: result.success,
|
|
18396
18429
|
error: result.error,
|
|
@@ -18406,47 +18439,50 @@ var Step = class _Step {
|
|
|
18406
18439
|
if (contractWriteOutput) {
|
|
18407
18440
|
const outputObj = typeof contractWriteOutput.toObject === "function" ? contractWriteOutput.toObject() : contractWriteOutput;
|
|
18408
18441
|
if (outputObj && outputObj.resultsList) {
|
|
18409
|
-
const transformedResults = outputObj.resultsList.map(
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
|
|
18442
|
+
const transformedResults = outputObj.resultsList.map(
|
|
18443
|
+
(result) => ({
|
|
18444
|
+
methodName: result.methodName,
|
|
18445
|
+
success: result.success,
|
|
18446
|
+
transaction: result.transaction ? {
|
|
18447
|
+
hash: result.transaction.hash,
|
|
18448
|
+
status: result.transaction.status,
|
|
18449
|
+
blockNumber: result.transaction.blockNumber,
|
|
18450
|
+
blockHash: result.transaction.blockHash,
|
|
18451
|
+
gasUsed: result.transaction.gasUsed,
|
|
18452
|
+
gasLimit: result.transaction.gasLimit,
|
|
18453
|
+
gasPrice: result.transaction.gasPrice,
|
|
18454
|
+
effectiveGasPrice: result.transaction.effectiveGasPrice,
|
|
18455
|
+
from: result.transaction.from,
|
|
18456
|
+
to: result.transaction.to,
|
|
18457
|
+
value: result.transaction.value,
|
|
18458
|
+
nonce: result.transaction.nonce,
|
|
18459
|
+
transactionIndex: result.transaction.transactionIndex,
|
|
18460
|
+
confirmations: result.transaction.confirmations,
|
|
18461
|
+
timestamp: result.transaction.timestamp
|
|
18462
|
+
} : null,
|
|
18463
|
+
events: result.eventsList?.map((event) => ({
|
|
18464
|
+
eventName: event.eventName,
|
|
18465
|
+
address: event.address,
|
|
18466
|
+
topics: event.topicsList || [],
|
|
18467
|
+
data: event.data,
|
|
18468
|
+
decoded: event.decodedMap || {}
|
|
18469
|
+
})) || [],
|
|
18470
|
+
error: result.error ? {
|
|
18471
|
+
code: result.error.code,
|
|
18472
|
+
message: result.error.message,
|
|
18473
|
+
revertReason: result.error.revertReason
|
|
18474
|
+
} : null,
|
|
18475
|
+
returnData: result.returnData ? {
|
|
18476
|
+
name: result.returnData.name,
|
|
18477
|
+
type: result.returnData.type,
|
|
18478
|
+
value: result.returnData.value
|
|
18479
|
+
} : null,
|
|
18480
|
+
inputData: result.inputData
|
|
18481
|
+
})
|
|
18482
|
+
);
|
|
18483
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
18448
18484
|
return {
|
|
18449
|
-
...
|
|
18485
|
+
...cleanOutputObj,
|
|
18450
18486
|
results: transformedResults,
|
|
18451
18487
|
// For backward compatibility, provide legacy fields from first result
|
|
18452
18488
|
...transformedResults.length > 0 && {
|
package/dist/index.mjs
CHANGED
|
@@ -16596,6 +16596,41 @@ var avs_pb7 = __toESM(require_avs_pb());
|
|
|
16596
16596
|
// src/models/trigger/block.ts
|
|
16597
16597
|
var avs_pb2 = __toESM(require_avs_pb());
|
|
16598
16598
|
|
|
16599
|
+
// src/models/trigger/interface.ts
|
|
16600
|
+
var Trigger = class {
|
|
16601
|
+
/**
|
|
16602
|
+
* Create an instance of Trigger from user inputs
|
|
16603
|
+
* @param props
|
|
16604
|
+
*/
|
|
16605
|
+
constructor(props) {
|
|
16606
|
+
this.id = props.id;
|
|
16607
|
+
this.name = props.name;
|
|
16608
|
+
this.type = props.type;
|
|
16609
|
+
this.data = props.data;
|
|
16610
|
+
this.output = props.output;
|
|
16611
|
+
this.input = props.input;
|
|
16612
|
+
}
|
|
16613
|
+
toRequest() {
|
|
16614
|
+
throw new Error("Method not implemented.");
|
|
16615
|
+
}
|
|
16616
|
+
getOutput() {
|
|
16617
|
+
return this.output;
|
|
16618
|
+
}
|
|
16619
|
+
toJson() {
|
|
16620
|
+
return {
|
|
16621
|
+
id: this.id,
|
|
16622
|
+
name: this.name,
|
|
16623
|
+
type: this.type,
|
|
16624
|
+
data: this.data,
|
|
16625
|
+
output: this.output,
|
|
16626
|
+
input: this.input
|
|
16627
|
+
};
|
|
16628
|
+
}
|
|
16629
|
+
};
|
|
16630
|
+
|
|
16631
|
+
// src/models/trigger/block.ts
|
|
16632
|
+
import { TriggerType as TriggerType3 } from "@avaprotocol/types";
|
|
16633
|
+
|
|
16599
16634
|
// src/utils.ts
|
|
16600
16635
|
import {
|
|
16601
16636
|
Value as ProtobufValue,
|
|
@@ -16765,40 +16800,7 @@ function extractInputFromProtobuf(inputValue) {
|
|
|
16765
16800
|
return void 0;
|
|
16766
16801
|
}
|
|
16767
16802
|
|
|
16768
|
-
// src/models/trigger/interface.ts
|
|
16769
|
-
var Trigger = class {
|
|
16770
|
-
/**
|
|
16771
|
-
* Create an instance of Trigger from user inputs
|
|
16772
|
-
* @param props
|
|
16773
|
-
*/
|
|
16774
|
-
constructor(props) {
|
|
16775
|
-
this.id = props.id;
|
|
16776
|
-
this.name = props.name;
|
|
16777
|
-
this.type = props.type;
|
|
16778
|
-
this.data = props.data;
|
|
16779
|
-
this.output = props.output;
|
|
16780
|
-
this.input = props.input ? extractInputFromProtobuf(props.input) : void 0;
|
|
16781
|
-
}
|
|
16782
|
-
toRequest() {
|
|
16783
|
-
throw new Error("Method not implemented.");
|
|
16784
|
-
}
|
|
16785
|
-
getOutput() {
|
|
16786
|
-
return this.output;
|
|
16787
|
-
}
|
|
16788
|
-
toJson() {
|
|
16789
|
-
return {
|
|
16790
|
-
id: this.id,
|
|
16791
|
-
name: this.name,
|
|
16792
|
-
type: this.type,
|
|
16793
|
-
data: this.data,
|
|
16794
|
-
output: this.output,
|
|
16795
|
-
input: this.input
|
|
16796
|
-
};
|
|
16797
|
-
}
|
|
16798
|
-
};
|
|
16799
|
-
|
|
16800
16803
|
// src/models/trigger/block.ts
|
|
16801
|
-
import { TriggerType as TriggerType3 } from "@avaprotocol/types";
|
|
16802
16804
|
var BlockTrigger2 = class _BlockTrigger extends Trigger {
|
|
16803
16805
|
constructor(props) {
|
|
16804
16806
|
super({ ...props, type: TriggerType3.Block, data: props.data });
|
|
@@ -17011,12 +17013,17 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
17011
17013
|
});
|
|
17012
17014
|
config.setQueriesList(queryMessages);
|
|
17013
17015
|
trigger.setConfig(config);
|
|
17016
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
17017
|
+
if (inputValue) {
|
|
17018
|
+
trigger.setInput(inputValue);
|
|
17019
|
+
}
|
|
17014
17020
|
request.setEvent(trigger);
|
|
17015
17021
|
return request;
|
|
17016
17022
|
}
|
|
17017
17023
|
static fromResponse(raw) {
|
|
17018
17024
|
const obj = raw.toObject();
|
|
17019
17025
|
let data = { queries: [] };
|
|
17026
|
+
let input = void 0;
|
|
17020
17027
|
if (raw.getEvent() && raw.getEvent().hasConfig()) {
|
|
17021
17028
|
const config = raw.getEvent().getConfig();
|
|
17022
17029
|
if (config) {
|
|
@@ -17047,11 +17054,15 @@ var EventTrigger2 = class _EventTrigger extends Trigger {
|
|
|
17047
17054
|
}
|
|
17048
17055
|
data = { queries };
|
|
17049
17056
|
}
|
|
17057
|
+
if (raw.getEvent().hasInput()) {
|
|
17058
|
+
input = extractInputFromProtobuf(raw.getEvent().getInput());
|
|
17059
|
+
}
|
|
17050
17060
|
}
|
|
17051
17061
|
return new _EventTrigger({
|
|
17052
17062
|
...obj,
|
|
17053
17063
|
type: TriggerType7.Event,
|
|
17054
|
-
data
|
|
17064
|
+
data,
|
|
17065
|
+
input
|
|
17055
17066
|
});
|
|
17056
17067
|
}
|
|
17057
17068
|
/**
|
|
@@ -17100,12 +17111,17 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends Trigger {
|
|
|
17100
17111
|
const config = new avs_pb5.FixedTimeTrigger.Config();
|
|
17101
17112
|
config.setEpochsList(this.data.epochsList || []);
|
|
17102
17113
|
trigger.setConfig(config);
|
|
17114
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
17115
|
+
if (inputValue) {
|
|
17116
|
+
trigger.setInput(inputValue);
|
|
17117
|
+
}
|
|
17103
17118
|
request.setFixedTime(trigger);
|
|
17104
17119
|
return request;
|
|
17105
17120
|
}
|
|
17106
17121
|
static fromResponse(raw) {
|
|
17107
17122
|
const obj = raw.toObject();
|
|
17108
17123
|
let data = { epochsList: [] };
|
|
17124
|
+
let input = void 0;
|
|
17109
17125
|
if (raw.getFixedTime() && raw.getFixedTime().hasConfig()) {
|
|
17110
17126
|
const config = raw.getFixedTime().getConfig();
|
|
17111
17127
|
if (config) {
|
|
@@ -17113,11 +17129,15 @@ var FixedTimeTrigger2 = class _FixedTimeTrigger extends Trigger {
|
|
|
17113
17129
|
epochsList: config.getEpochsList() || []
|
|
17114
17130
|
};
|
|
17115
17131
|
}
|
|
17132
|
+
if (raw.getFixedTime().hasInput()) {
|
|
17133
|
+
input = extractInputFromProtobuf(raw.getFixedTime().getInput());
|
|
17134
|
+
}
|
|
17116
17135
|
}
|
|
17117
17136
|
return new _FixedTimeTrigger({
|
|
17118
17137
|
...obj,
|
|
17119
17138
|
type: TriggerType9.FixedTime,
|
|
17120
|
-
data
|
|
17139
|
+
data,
|
|
17140
|
+
input
|
|
17121
17141
|
});
|
|
17122
17142
|
}
|
|
17123
17143
|
/**
|
|
@@ -17309,7 +17329,7 @@ var Node = class {
|
|
|
17309
17329
|
this.name = props.name;
|
|
17310
17330
|
this.type = props.type;
|
|
17311
17331
|
this.data = props.data;
|
|
17312
|
-
this.input = props.input
|
|
17332
|
+
this.input = props.input;
|
|
17313
17333
|
}
|
|
17314
17334
|
toRequest() {
|
|
17315
17335
|
const request = new avs_pb8.TaskNode();
|
|
@@ -17352,7 +17372,10 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
17352
17372
|
methodName: call.methodName
|
|
17353
17373
|
})) || []
|
|
17354
17374
|
};
|
|
17355
|
-
|
|
17375
|
+
let input = void 0;
|
|
17376
|
+
if (raw.hasInput()) {
|
|
17377
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17378
|
+
}
|
|
17356
17379
|
return new _ContractWriteNode({
|
|
17357
17380
|
...obj,
|
|
17358
17381
|
type: NodeType3.ContractWrite,
|
|
@@ -17381,7 +17404,7 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
17381
17404
|
node.setConfig(config);
|
|
17382
17405
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17383
17406
|
if (inputValue) {
|
|
17384
|
-
|
|
17407
|
+
request.setInput(inputValue);
|
|
17385
17408
|
}
|
|
17386
17409
|
request.setContractWrite(node);
|
|
17387
17410
|
return request;
|
|
@@ -17458,7 +17481,10 @@ var CustomCodeNode2 = class _CustomCodeNode extends Node {
|
|
|
17458
17481
|
lang: rawConfig.lang,
|
|
17459
17482
|
source: rawConfig.source
|
|
17460
17483
|
};
|
|
17461
|
-
|
|
17484
|
+
let input = void 0;
|
|
17485
|
+
if (raw.hasInput()) {
|
|
17486
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17487
|
+
}
|
|
17462
17488
|
return new _CustomCodeNode({
|
|
17463
17489
|
...obj,
|
|
17464
17490
|
type: NodeType4.CustomCode,
|
|
@@ -17477,7 +17503,7 @@ var CustomCodeNode2 = class _CustomCodeNode extends Node {
|
|
|
17477
17503
|
node.setConfig(config);
|
|
17478
17504
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17479
17505
|
if (inputValue) {
|
|
17480
|
-
|
|
17506
|
+
request.setInput(inputValue);
|
|
17481
17507
|
}
|
|
17482
17508
|
request.setCustomCode(node);
|
|
17483
17509
|
return request;
|
|
@@ -17627,7 +17653,10 @@ var ContractReadNode2 = class _ContractReadNode extends Node {
|
|
|
17627
17653
|
methodName: call.methodName
|
|
17628
17654
|
})) || []
|
|
17629
17655
|
};
|
|
17630
|
-
|
|
17656
|
+
let input = void 0;
|
|
17657
|
+
if (raw.hasInput()) {
|
|
17658
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17659
|
+
}
|
|
17631
17660
|
return new _ContractReadNode({
|
|
17632
17661
|
...obj,
|
|
17633
17662
|
type: NodeType7.ContractRead,
|
|
@@ -17655,7 +17684,7 @@ var ContractReadNode2 = class _ContractReadNode extends Node {
|
|
|
17655
17684
|
node.setConfig(config);
|
|
17656
17685
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17657
17686
|
if (inputValue) {
|
|
17658
|
-
|
|
17687
|
+
request.setInput(inputValue);
|
|
17659
17688
|
}
|
|
17660
17689
|
request.setContractRead(node);
|
|
17661
17690
|
return request;
|
|
@@ -17848,7 +17877,10 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
17848
17877
|
contractWrite: loopNodeData.contractWrite,
|
|
17849
17878
|
graphqlDataQuery: loopNodeData.graphqlDataQuery
|
|
17850
17879
|
};
|
|
17851
|
-
|
|
17880
|
+
let input = void 0;
|
|
17881
|
+
if (raw.hasInput()) {
|
|
17882
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
17883
|
+
}
|
|
17852
17884
|
return new _LoopNode({
|
|
17853
17885
|
...obj,
|
|
17854
17886
|
type: NodeType11.Loop,
|
|
@@ -17869,7 +17901,7 @@ var LoopNode2 = class _LoopNode extends Node {
|
|
|
17869
17901
|
loopNode.setConfig(config);
|
|
17870
17902
|
const inputValue = convertInputToProtobuf(this.input);
|
|
17871
17903
|
if (inputValue) {
|
|
17872
|
-
|
|
17904
|
+
node.setInput(inputValue);
|
|
17873
17905
|
}
|
|
17874
17906
|
if (data.ethTransfer) {
|
|
17875
17907
|
const ethTransfer = new avs_pb17.ETHTransferNode();
|
|
@@ -18375,9 +18407,10 @@ var Step = class _Step {
|
|
|
18375
18407
|
if (contractReadOutput) {
|
|
18376
18408
|
const outputObj = typeof contractReadOutput.toObject === "function" ? contractReadOutput.toObject() : contractReadOutput;
|
|
18377
18409
|
if (outputObj && outputObj.resultsList) {
|
|
18410
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
18378
18411
|
return {
|
|
18379
|
-
...
|
|
18380
|
-
results:
|
|
18412
|
+
...cleanOutputObj,
|
|
18413
|
+
results: resultsList.map((result) => ({
|
|
18381
18414
|
methodName: result.methodName,
|
|
18382
18415
|
success: result.success,
|
|
18383
18416
|
error: result.error,
|
|
@@ -18393,47 +18426,50 @@ var Step = class _Step {
|
|
|
18393
18426
|
if (contractWriteOutput) {
|
|
18394
18427
|
const outputObj = typeof contractWriteOutput.toObject === "function" ? contractWriteOutput.toObject() : contractWriteOutput;
|
|
18395
18428
|
if (outputObj && outputObj.resultsList) {
|
|
18396
|
-
const transformedResults = outputObj.resultsList.map(
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18429
|
+
const transformedResults = outputObj.resultsList.map(
|
|
18430
|
+
(result) => ({
|
|
18431
|
+
methodName: result.methodName,
|
|
18432
|
+
success: result.success,
|
|
18433
|
+
transaction: result.transaction ? {
|
|
18434
|
+
hash: result.transaction.hash,
|
|
18435
|
+
status: result.transaction.status,
|
|
18436
|
+
blockNumber: result.transaction.blockNumber,
|
|
18437
|
+
blockHash: result.transaction.blockHash,
|
|
18438
|
+
gasUsed: result.transaction.gasUsed,
|
|
18439
|
+
gasLimit: result.transaction.gasLimit,
|
|
18440
|
+
gasPrice: result.transaction.gasPrice,
|
|
18441
|
+
effectiveGasPrice: result.transaction.effectiveGasPrice,
|
|
18442
|
+
from: result.transaction.from,
|
|
18443
|
+
to: result.transaction.to,
|
|
18444
|
+
value: result.transaction.value,
|
|
18445
|
+
nonce: result.transaction.nonce,
|
|
18446
|
+
transactionIndex: result.transaction.transactionIndex,
|
|
18447
|
+
confirmations: result.transaction.confirmations,
|
|
18448
|
+
timestamp: result.transaction.timestamp
|
|
18449
|
+
} : null,
|
|
18450
|
+
events: result.eventsList?.map((event) => ({
|
|
18451
|
+
eventName: event.eventName,
|
|
18452
|
+
address: event.address,
|
|
18453
|
+
topics: event.topicsList || [],
|
|
18454
|
+
data: event.data,
|
|
18455
|
+
decoded: event.decodedMap || {}
|
|
18456
|
+
})) || [],
|
|
18457
|
+
error: result.error ? {
|
|
18458
|
+
code: result.error.code,
|
|
18459
|
+
message: result.error.message,
|
|
18460
|
+
revertReason: result.error.revertReason
|
|
18461
|
+
} : null,
|
|
18462
|
+
returnData: result.returnData ? {
|
|
18463
|
+
name: result.returnData.name,
|
|
18464
|
+
type: result.returnData.type,
|
|
18465
|
+
value: result.returnData.value
|
|
18466
|
+
} : null,
|
|
18467
|
+
inputData: result.inputData
|
|
18468
|
+
})
|
|
18469
|
+
);
|
|
18470
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
18435
18471
|
return {
|
|
18436
|
-
...
|
|
18472
|
+
...cleanOutputObj,
|
|
18437
18473
|
results: transformedResults,
|
|
18438
18474
|
// For backward compatibility, provide legacy fields from first result
|
|
18439
18475
|
...transformedResults.length > 0 && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;
|
|
1
|
+
{"version":3,"file":"contractRead.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractRead.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAkC,qBAAqB,EAAa,MAAM,oBAAoB,CAAC;AAMtG,cAAM,gBAAiB,SAAQ,IAAI;gBACrB,KAAK,EAAE,qBAAqB;IAIxC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,gBAAgB;IA8B3D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAqC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAmBrE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -20,8 +20,12 @@ class ContractReadNode extends Node {
|
|
|
20
20
|
methodName: call.methodName,
|
|
21
21
|
})) || [],
|
|
22
22
|
};
|
|
23
|
-
// Extract input data
|
|
24
|
-
|
|
23
|
+
// Extract input data from top-level TaskNode.input field (not nested ContractReadNode.input)
|
|
24
|
+
// This matches where we set it in toRequest() and where the Go backend looks for it
|
|
25
|
+
let input = undefined;
|
|
26
|
+
if (raw.hasInput()) {
|
|
27
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
28
|
+
}
|
|
25
29
|
return new ContractReadNode({
|
|
26
30
|
...obj,
|
|
27
31
|
type: NodeType.ContractRead,
|
|
@@ -48,10 +52,11 @@ class ContractReadNode extends Node {
|
|
|
48
52
|
config.addMethodCalls(methodCallMsg);
|
|
49
53
|
});
|
|
50
54
|
node.setConfig(config);
|
|
51
|
-
// Set input data
|
|
55
|
+
// Set input data on the top-level TaskNode, not the nested ContractReadNode
|
|
56
|
+
// This matches where the Go backend's ExtractNodeInputData() looks for it
|
|
52
57
|
const inputValue = convertInputToProtobuf(this.input);
|
|
53
58
|
if (inputValue) {
|
|
54
|
-
|
|
59
|
+
request.setInput(inputValue);
|
|
55
60
|
}
|
|
56
61
|
request.setContractRead(node);
|
|
57
62
|
return request;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAmC,sBAAsB,EAAa,MAAM,oBAAoB,CAAC;AAMxG,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;
|
|
1
|
+
{"version":3,"file":"contractWrite.d.ts","sourceRoot":"","sources":["../../../src/models/node/contractWrite.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAmC,sBAAsB,EAAa,MAAM,oBAAoB,CAAC;AAMxG,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IA+B5D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAsC5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAyDrE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -21,8 +21,12 @@ class ContractWriteNode extends Node {
|
|
|
21
21
|
methodName: call.methodName,
|
|
22
22
|
})) || [],
|
|
23
23
|
};
|
|
24
|
-
// Extract input data
|
|
25
|
-
|
|
24
|
+
// Extract input data from top-level TaskNode.input field (not nested ContractWriteNode.input)
|
|
25
|
+
// This matches where we set it in toRequest() and where the Go backend looks for it
|
|
26
|
+
let input = undefined;
|
|
27
|
+
if (raw.hasInput()) {
|
|
28
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
29
|
+
}
|
|
26
30
|
return new ContractWriteNode({
|
|
27
31
|
...obj,
|
|
28
32
|
type: NodeType.ContractWrite,
|
|
@@ -50,10 +54,11 @@ class ContractWriteNode extends Node {
|
|
|
50
54
|
config.addMethodCalls(methodCallMsg);
|
|
51
55
|
});
|
|
52
56
|
node.setConfig(config);
|
|
53
|
-
// Set input data
|
|
57
|
+
// Set input data on the top-level TaskNode, not the nested ContractWriteNode
|
|
58
|
+
// This matches where the Go backend's ExtractNodeInputData() looks for it
|
|
54
59
|
const inputValue = convertInputToProtobuf(this.input);
|
|
55
60
|
if (inputValue) {
|
|
56
|
-
|
|
61
|
+
request.setInput(inputValue);
|
|
57
62
|
}
|
|
58
63
|
request.setContractWrite(node);
|
|
59
64
|
return request;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAIL,mBAAmB,EAEpB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;
|
|
1
|
+
{"version":3,"file":"customCode.d.ts","sourceRoot":"","sources":["../../../src/models/node/customCode.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAIL,mBAAmB,EAEpB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,cAAe,SAAQ,IAAI;gBACnB,KAAK,EAAE,mBAAmB;IAItC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,cAAc;IA2BzD,SAAS,IAAI,MAAM,CAAC,QAAQ;IA4B5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAkBrE;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -16,8 +16,12 @@ class CustomCodeNode extends Node {
|
|
|
16
16
|
lang: rawConfig.lang,
|
|
17
17
|
source: rawConfig.source,
|
|
18
18
|
};
|
|
19
|
-
// Extract input data
|
|
20
|
-
|
|
19
|
+
// Extract input data from top-level TaskNode.input field (not nested CustomCodeNode.input)
|
|
20
|
+
// This matches where we set it in toRequest() and where the Go backend looks for it
|
|
21
|
+
let input = undefined;
|
|
22
|
+
if (raw.hasInput()) {
|
|
23
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
24
|
+
}
|
|
21
25
|
return new CustomCodeNode({
|
|
22
26
|
...obj,
|
|
23
27
|
type: NodeType.CustomCode,
|
|
@@ -35,10 +39,11 @@ class CustomCodeNode extends Node {
|
|
|
35
39
|
config.setLang(this.data.lang);
|
|
36
40
|
config.setSource(this.data.source);
|
|
37
41
|
node.setConfig(config);
|
|
38
|
-
// Set input data
|
|
42
|
+
// Set input data on the top-level TaskNode, not the nested CustomCodeNode
|
|
43
|
+
// This matches where the Go backend's ExtractNodeInputData() looks for it
|
|
39
44
|
const inputValue = convertInputToProtobuf(this.input);
|
|
40
45
|
if (inputValue) {
|
|
41
|
-
|
|
46
|
+
request.setInput(inputValue);
|
|
42
47
|
}
|
|
43
48
|
request.setCustomCode(node);
|
|
44
49
|
return request;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
2
|
import { NodeType, NodeTypeGoConverter } from "@avaprotocol/types";
|
|
3
3
|
import _ from "lodash";
|
|
4
|
-
import { extractInputFromProtobuf } from "../../utils";
|
|
5
4
|
// Function to convert TaskStatus to string
|
|
6
5
|
export function covertNodeTypeToString(status) {
|
|
7
6
|
const conversionMap = {
|
|
@@ -38,8 +37,8 @@ export default class Node {
|
|
|
38
37
|
this.name = props.name;
|
|
39
38
|
this.type = props.type;
|
|
40
39
|
this.data = props.data;
|
|
41
|
-
//
|
|
42
|
-
this.input = props.input
|
|
40
|
+
// Direct assignment - no protobuf conversion needed for user input
|
|
41
|
+
this.input = props.input;
|
|
43
42
|
}
|
|
44
43
|
toRequest() {
|
|
45
44
|
const request = new avs_pb.TaskNode();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/models/node/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAGL,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAI5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/models/node/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAGL,aAAa,EAEd,MAAM,oBAAoB,CAAC;AAI5B,cAAM,QAAS,SAAQ,IAAI;gBACb,KAAK,EAAE,aAAa;IAIhC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ;IAuCnD,SAAS,IAAI,MAAM,CAAC,QAAQ;IA8I5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAuCrE;AAED,eAAe,QAAQ,CAAC"}
|
package/dist/models/node/loop.js
CHANGED
|
@@ -27,8 +27,12 @@ class LoopNode extends Node {
|
|
|
27
27
|
contractWrite: loopNodeData.contractWrite,
|
|
28
28
|
graphqlDataQuery: loopNodeData.graphqlDataQuery,
|
|
29
29
|
};
|
|
30
|
-
// Extract input data
|
|
31
|
-
|
|
30
|
+
// Extract input data from top-level TaskNode.input field (not nested LoopNode.input)
|
|
31
|
+
// This matches where we set it in toRequest() and where the Go backend looks for it
|
|
32
|
+
let input = undefined;
|
|
33
|
+
if (raw.hasInput()) {
|
|
34
|
+
input = extractInputFromProtobuf(raw.getInput());
|
|
35
|
+
}
|
|
32
36
|
return new LoopNode({
|
|
33
37
|
...obj,
|
|
34
38
|
type: NodeType.Loop,
|
|
@@ -48,10 +52,11 @@ class LoopNode extends Node {
|
|
|
48
52
|
config.setIterVal(data.iterVal || "");
|
|
49
53
|
config.setIterKey(data.iterKey || "");
|
|
50
54
|
loopNode.setConfig(config);
|
|
51
|
-
// Set input data
|
|
55
|
+
// Set input data on the top-level TaskNode, not the nested LoopNode
|
|
56
|
+
// This matches where the Go backend's ExtractNodeInputData() looks for it
|
|
52
57
|
const inputValue = convertInputToProtobuf(this.input);
|
|
53
58
|
if (inputValue) {
|
|
54
|
-
|
|
59
|
+
node.setInput(inputValue);
|
|
55
60
|
}
|
|
56
61
|
// Handle nested nodes - these still use the nested structure within LoopNodeData
|
|
57
62
|
if (data.ethTransfer) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/models/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBAEF,KAAK,EAAE,SAAS;IAc5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAgBnB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/models/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAMhD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEhE,cAAM,IAAK,YAAW,SAAS;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;gBAEF,KAAK,EAAE,SAAS;IAc5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAgBnB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;IA8T9D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI;CAqFvD;AAED,eAAe,IAAI,CAAC"}
|
package/dist/models/step.js
CHANGED
|
@@ -220,14 +220,16 @@ class Step {
|
|
|
220
220
|
: contractReadOutput;
|
|
221
221
|
// Convert resultsList to results for consistency with ContractReadNode.fromOutputData
|
|
222
222
|
if (outputObj && outputObj.resultsList) {
|
|
223
|
+
// Exclude resultsList from the spread to avoid duplication
|
|
224
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
223
225
|
return {
|
|
224
|
-
...
|
|
225
|
-
results:
|
|
226
|
+
...cleanOutputObj,
|
|
227
|
+
results: resultsList.map((result) => ({
|
|
226
228
|
methodName: result.methodName,
|
|
227
229
|
success: result.success,
|
|
228
230
|
error: result.error,
|
|
229
|
-
data: result.dataList || []
|
|
230
|
-
}))
|
|
231
|
+
data: result.dataList || [],
|
|
232
|
+
})),
|
|
231
233
|
};
|
|
232
234
|
}
|
|
233
235
|
return outputObj;
|
|
@@ -247,23 +249,25 @@ class Step {
|
|
|
247
249
|
const transformedResults = outputObj.resultsList.map((result) => ({
|
|
248
250
|
methodName: result.methodName,
|
|
249
251
|
success: result.success,
|
|
250
|
-
transaction: result.transaction
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
252
|
+
transaction: result.transaction
|
|
253
|
+
? {
|
|
254
|
+
hash: result.transaction.hash,
|
|
255
|
+
status: result.transaction.status,
|
|
256
|
+
blockNumber: result.transaction.blockNumber,
|
|
257
|
+
blockHash: result.transaction.blockHash,
|
|
258
|
+
gasUsed: result.transaction.gasUsed,
|
|
259
|
+
gasLimit: result.transaction.gasLimit,
|
|
260
|
+
gasPrice: result.transaction.gasPrice,
|
|
261
|
+
effectiveGasPrice: result.transaction.effectiveGasPrice,
|
|
262
|
+
from: result.transaction.from,
|
|
263
|
+
to: result.transaction.to,
|
|
264
|
+
value: result.transaction.value,
|
|
265
|
+
nonce: result.transaction.nonce,
|
|
266
|
+
transactionIndex: result.transaction.transactionIndex,
|
|
267
|
+
confirmations: result.transaction.confirmations,
|
|
268
|
+
timestamp: result.transaction.timestamp,
|
|
269
|
+
}
|
|
270
|
+
: null,
|
|
267
271
|
events: result.eventsList?.map((event) => ({
|
|
268
272
|
eventName: event.eventName,
|
|
269
273
|
address: event.address,
|
|
@@ -271,20 +275,26 @@ class Step {
|
|
|
271
275
|
data: event.data,
|
|
272
276
|
decoded: event.decodedMap || {},
|
|
273
277
|
})) || [],
|
|
274
|
-
error: result.error
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
278
|
+
error: result.error
|
|
279
|
+
? {
|
|
280
|
+
code: result.error.code,
|
|
281
|
+
message: result.error.message,
|
|
282
|
+
revertReason: result.error.revertReason,
|
|
283
|
+
}
|
|
284
|
+
: null,
|
|
285
|
+
returnData: result.returnData
|
|
286
|
+
? {
|
|
287
|
+
name: result.returnData.name,
|
|
288
|
+
type: result.returnData.type,
|
|
289
|
+
value: result.returnData.value,
|
|
290
|
+
}
|
|
291
|
+
: null,
|
|
284
292
|
inputData: result.inputData,
|
|
285
293
|
}));
|
|
294
|
+
// Exclude resultsList from the spread to avoid duplication
|
|
295
|
+
const { resultsList, ...cleanOutputObj } = outputObj;
|
|
286
296
|
return {
|
|
287
|
-
...
|
|
297
|
+
...cleanOutputObj,
|
|
288
298
|
results: transformedResults,
|
|
289
299
|
// For backward compatibility, provide legacy fields from first result
|
|
290
300
|
...(transformedResults.length > 0 && {
|
|
@@ -321,7 +331,8 @@ class Step {
|
|
|
321
331
|
// Extract input data if present - USE PROPER PROTOBUF GETTER
|
|
322
332
|
let inputData = undefined;
|
|
323
333
|
// Check for input using proper protobuf methods
|
|
324
|
-
if (typeof step.hasInput === "function" &&
|
|
334
|
+
if (typeof step.hasInput === "function" &&
|
|
335
|
+
step.hasInput()) {
|
|
325
336
|
const inputValue = step.getInput();
|
|
326
337
|
if (inputValue) {
|
|
327
338
|
// If it's a protobuf Value instance, convert it
|
|
@@ -329,7 +340,7 @@ class Step {
|
|
|
329
340
|
inputData = convertProtobufValueToJs(inputValue);
|
|
330
341
|
}
|
|
331
342
|
catch (error) {
|
|
332
|
-
console.warn(
|
|
343
|
+
console.warn("Failed to convert protobuf input value:", error);
|
|
333
344
|
// Fallback: if conversion fails, use the raw value
|
|
334
345
|
inputData = inputValue;
|
|
335
346
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAGL,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AA8C5B,cAAM,YAAa,SAAQ,OAAO;gBACpB,KAAK,EAAE,iBAAiB;IAIpC,SAAS,IAAI,MAAM,CAAC,WAAW;IAmE/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,YAAY;IA8D1D;;;;OAIG;IACH,SAAS,IAAI,kBAAkB,GAAG,SAAS;IAI3C;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
2
|
import Trigger from "./interface";
|
|
3
3
|
import { TriggerType, } from "@avaprotocol/types";
|
|
4
|
+
import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
|
|
4
5
|
// Ref: https://github.com/AvaProtocol/EigenLayer-AVS/issues/94
|
|
5
6
|
// The trigger is an array of Condition, which can be topics, dateRage, etc.
|
|
6
7
|
// We imply or operator among all conditions.
|
|
@@ -88,6 +89,11 @@ class EventTrigger extends Trigger {
|
|
|
88
89
|
});
|
|
89
90
|
config.setQueriesList(queryMessages);
|
|
90
91
|
trigger.setConfig(config);
|
|
92
|
+
// Convert input field to protobuf format and set on EventTrigger
|
|
93
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
94
|
+
if (inputValue) {
|
|
95
|
+
trigger.setInput(inputValue);
|
|
96
|
+
}
|
|
91
97
|
request.setEvent(trigger);
|
|
92
98
|
return request;
|
|
93
99
|
}
|
|
@@ -95,6 +101,7 @@ class EventTrigger extends Trigger {
|
|
|
95
101
|
// Convert the raw object to TriggerProps, which should keep name and id
|
|
96
102
|
const obj = raw.toObject();
|
|
97
103
|
let data = { queries: [] };
|
|
104
|
+
let input = undefined;
|
|
98
105
|
if (raw.getEvent() && raw.getEvent().hasConfig()) {
|
|
99
106
|
const config = raw.getEvent().getConfig();
|
|
100
107
|
if (config) {
|
|
@@ -128,11 +135,16 @@ class EventTrigger extends Trigger {
|
|
|
128
135
|
}
|
|
129
136
|
data = { queries: queries };
|
|
130
137
|
}
|
|
138
|
+
// Extract input data if present
|
|
139
|
+
if (raw.getEvent().hasInput()) {
|
|
140
|
+
input = extractInputFromProtobuf(raw.getEvent().getInput());
|
|
141
|
+
}
|
|
131
142
|
}
|
|
132
143
|
return new EventTrigger({
|
|
133
144
|
...obj,
|
|
134
145
|
type: TriggerType.Event,
|
|
135
146
|
data: data,
|
|
147
|
+
input: input,
|
|
136
148
|
});
|
|
137
149
|
}
|
|
138
150
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixedTime.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/fixedTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAyC,sBAAsB,EAAE,qBAAqB,EAA+B,MAAM,oBAAoB,CAAC;AAMvJ,cAAM,gBAAiB,SAAQ,OAAO;gBACxB,KAAK,EAAE,qBAAqB;IAIxC,SAAS,IAAI,MAAM,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"fixedTime.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/fixedTime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAyC,sBAAsB,EAAE,qBAAqB,EAA+B,MAAM,oBAAoB,CAAC;AAMvJ,cAAM,gBAAiB,SAAQ,OAAO;gBACxB,KAAK,EAAE,qBAAqB;IAIxC,SAAS,IAAI,MAAM,CAAC,WAAW;IA0B/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,gBAAgB;IA8B9D;;;;OAIG;IACH,SAAS,IAAI,sBAAsB,GAAG,SAAS;IAI/C;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,GAAG;CAW9D;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
2
|
import Trigger from "./interface";
|
|
3
3
|
import { TriggerType } from "@avaprotocol/types";
|
|
4
|
+
import { convertInputToProtobuf, extractInputFromProtobuf } from "../../utils";
|
|
4
5
|
// Required props for constructor: id, name, type and data: { epochsList }
|
|
5
6
|
class FixedTimeTrigger extends Trigger {
|
|
6
7
|
constructor(props) {
|
|
@@ -18,6 +19,11 @@ class FixedTimeTrigger extends Trigger {
|
|
|
18
19
|
const config = new avs_pb.FixedTimeTrigger.Config();
|
|
19
20
|
config.setEpochsList(this.data.epochsList || []);
|
|
20
21
|
trigger.setConfig(config);
|
|
22
|
+
// Convert input field to protobuf format and set on FixedTimeTrigger
|
|
23
|
+
const inputValue = convertInputToProtobuf(this.input);
|
|
24
|
+
if (inputValue) {
|
|
25
|
+
trigger.setInput(inputValue);
|
|
26
|
+
}
|
|
21
27
|
request.setFixedTime(trigger);
|
|
22
28
|
return request;
|
|
23
29
|
}
|
|
@@ -25,6 +31,7 @@ class FixedTimeTrigger extends Trigger {
|
|
|
25
31
|
// Convert the raw object to TriggerProps, which should keep name and id
|
|
26
32
|
const obj = raw.toObject();
|
|
27
33
|
let data = { epochsList: [] };
|
|
34
|
+
let input = undefined;
|
|
28
35
|
if (raw.getFixedTime() && raw.getFixedTime().hasConfig()) {
|
|
29
36
|
const config = raw.getFixedTime().getConfig();
|
|
30
37
|
if (config) {
|
|
@@ -32,11 +39,16 @@ class FixedTimeTrigger extends Trigger {
|
|
|
32
39
|
epochsList: config.getEpochsList() || []
|
|
33
40
|
};
|
|
34
41
|
}
|
|
42
|
+
// Extract input data if present
|
|
43
|
+
if (raw.getFixedTime().hasInput()) {
|
|
44
|
+
input = extractInputFromProtobuf(raw.getFixedTime().getInput());
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
return new FixedTimeTrigger({
|
|
37
48
|
...obj,
|
|
38
49
|
type: TriggerType.FixedTime,
|
|
39
50
|
data: data,
|
|
51
|
+
input: input,
|
|
40
52
|
});
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
-
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
|
|
3
2
|
import { TriggerType, TriggerProps, TriggerData, TriggerOutput } from "@avaprotocol/types";
|
|
4
3
|
export default abstract class Trigger implements TriggerProps {
|
|
5
4
|
id: string;
|
|
@@ -7,7 +6,7 @@ export default abstract class Trigger implements TriggerProps {
|
|
|
7
6
|
type: TriggerType;
|
|
8
7
|
data: TriggerData;
|
|
9
8
|
output?: TriggerOutput;
|
|
10
|
-
input?:
|
|
9
|
+
input?: Record<string, any>;
|
|
11
10
|
/**
|
|
12
11
|
* Create an instance of Trigger from user inputs
|
|
13
12
|
* @param props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EACL,WAAW,EAGX,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,oBAAoB,CAAC;AAI5B,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,OAAQ,YAAW,YAAY;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B;;;OAGG;gBACS,KAAK,EAAE,YAAY;IAS/B,SAAS,IAAI,MAAM,CAAC,WAAW;IAI/B,SAAS,IAAI,aAAa,GAAG,SAAS;IAItC,MAAM,IAAI,YAAY;CAUvB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { extractInputFromProtobuf } from "../../utils";
|
|
2
1
|
export default class Trigger {
|
|
3
2
|
/**
|
|
4
3
|
* Create an instance of Trigger from user inputs
|
|
@@ -10,7 +9,7 @@ export default class Trigger {
|
|
|
10
9
|
this.type = props.type;
|
|
11
10
|
this.data = props.data;
|
|
12
11
|
this.output = props.output;
|
|
13
|
-
this.input = props.input
|
|
12
|
+
this.input = props.input;
|
|
14
13
|
}
|
|
15
14
|
toRequest() {
|
|
16
15
|
throw new Error("Method not implemented.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.14",
|
|
4
4
|
"description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepare": "node ../../scripts/prepare-package.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@avaprotocol/types": "^2.2.
|
|
34
|
+
"@avaprotocol/types": "^2.2.11",
|
|
35
35
|
"@grpc/grpc-js": "^1.11.3",
|
|
36
36
|
"@grpc/proto-loader": "^0.7.13",
|
|
37
37
|
"dotenv": "^16.4.5",
|