@avaprotocol/sdk-js 2.9.1 → 2.9.3
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 +16 -0
- package/dist/index.js +38 -2
- package/dist/index.mjs +38 -2
- package/dist/models/node/contractWrite.d.ts.map +1 -1
- package/dist/models/node/contractWrite.js +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @avaprotocol/sdk-js
|
|
2
2
|
|
|
3
|
+
## 2.9.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6d542b4: Moved isSimulated from the runNodeWithInputs top-level to inside ContractWrite nodeConfig
|
|
8
|
+
- Updated dependencies [6d542b4]
|
|
9
|
+
- @avaprotocol/types@2.7.3
|
|
10
|
+
|
|
11
|
+
## 2.9.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 80aba7a: Added isSimulated parameter to runNodeWithInputs
|
|
16
|
+
- Updated dependencies [80aba7a]
|
|
17
|
+
- @avaprotocol/types@2.7.2
|
|
18
|
+
|
|
3
19
|
## 2.9.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -3548,7 +3548,8 @@ var require_avs_pb = __commonJS({
|
|
|
3548
3548
|
msg.getMethodCallsList(),
|
|
3549
3549
|
proto.aggregator.ContractWriteNode.MethodCall.toObject,
|
|
3550
3550
|
includeInstance
|
|
3551
|
-
)
|
|
3551
|
+
),
|
|
3552
|
+
isSimulated: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
|
|
3552
3553
|
};
|
|
3553
3554
|
if (includeInstance) {
|
|
3554
3555
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3592,6 +3593,13 @@ var require_avs_pb = __commonJS({
|
|
|
3592
3593
|
reader.readMessage(value, proto.aggregator.ContractWriteNode.MethodCall.deserializeBinaryFromReader);
|
|
3593
3594
|
msg.addMethodCalls(value);
|
|
3594
3595
|
break;
|
|
3596
|
+
case 5:
|
|
3597
|
+
var value = (
|
|
3598
|
+
/** @type {boolean} */
|
|
3599
|
+
reader.readBool()
|
|
3600
|
+
);
|
|
3601
|
+
msg.setIsSimulated(value);
|
|
3602
|
+
break;
|
|
3595
3603
|
default:
|
|
3596
3604
|
reader.skipField();
|
|
3597
3605
|
break;
|
|
@@ -3636,6 +3644,14 @@ var require_avs_pb = __commonJS({
|
|
|
3636
3644
|
proto.aggregator.ContractWriteNode.MethodCall.serializeBinaryToWriter
|
|
3637
3645
|
);
|
|
3638
3646
|
}
|
|
3647
|
+
f = /** @type {boolean} */
|
|
3648
|
+
jspb.Message.getField(message, 5);
|
|
3649
|
+
if (f != null) {
|
|
3650
|
+
writer.writeBool(
|
|
3651
|
+
5,
|
|
3652
|
+
f
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3639
3655
|
};
|
|
3640
3656
|
proto.aggregator.ContractWriteNode.Config.prototype.getContractAddress = function() {
|
|
3641
3657
|
return (
|
|
@@ -3685,6 +3701,21 @@ var require_avs_pb = __commonJS({
|
|
|
3685
3701
|
proto.aggregator.ContractWriteNode.Config.prototype.clearMethodCallsList = function() {
|
|
3686
3702
|
return this.setMethodCallsList([]);
|
|
3687
3703
|
};
|
|
3704
|
+
proto.aggregator.ContractWriteNode.Config.prototype.getIsSimulated = function() {
|
|
3705
|
+
return (
|
|
3706
|
+
/** @type {boolean} */
|
|
3707
|
+
jspb.Message.getBooleanFieldWithDefault(this, 5, false)
|
|
3708
|
+
);
|
|
3709
|
+
};
|
|
3710
|
+
proto.aggregator.ContractWriteNode.Config.prototype.setIsSimulated = function(value) {
|
|
3711
|
+
return jspb.Message.setField(this, 5, value);
|
|
3712
|
+
};
|
|
3713
|
+
proto.aggregator.ContractWriteNode.Config.prototype.clearIsSimulated = function() {
|
|
3714
|
+
return jspb.Message.setField(this, 5, void 0);
|
|
3715
|
+
};
|
|
3716
|
+
proto.aggregator.ContractWriteNode.Config.prototype.hasIsSimulated = function() {
|
|
3717
|
+
return jspb.Message.getField(this, 5) != null;
|
|
3718
|
+
};
|
|
3688
3719
|
proto.aggregator.ContractWriteNode.MethodCall.repeatedFields_ = [3, 4];
|
|
3689
3720
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3690
3721
|
proto.aggregator.ContractWriteNode.MethodCall.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -19589,6 +19620,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
19589
19620
|
}
|
|
19590
19621
|
config.addMethodCalls(methodCallMsg);
|
|
19591
19622
|
});
|
|
19623
|
+
if (configData.isSimulated !== void 0) {
|
|
19624
|
+
config.setIsSimulated(configData.isSimulated);
|
|
19625
|
+
}
|
|
19592
19626
|
node.setConfig(config);
|
|
19593
19627
|
return node;
|
|
19594
19628
|
}
|
|
@@ -19608,7 +19642,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
19608
19642
|
// Note: applyToFields is not supported for ContractWrite nodes in protobuf
|
|
19609
19643
|
// callData is optional, only include if present
|
|
19610
19644
|
...call.callData && { callData: call.callData }
|
|
19611
|
-
})) || []
|
|
19645
|
+
})) || [],
|
|
19646
|
+
// Include isSimulated if present in protobuf
|
|
19647
|
+
...protobufData.isSimulated !== void 0 && { isSimulated: protobufData.isSimulated }
|
|
19612
19648
|
};
|
|
19613
19649
|
return new _ContractWriteNode({
|
|
19614
19650
|
...obj,
|
package/dist/index.mjs
CHANGED
|
@@ -3548,7 +3548,8 @@ var require_avs_pb = __commonJS({
|
|
|
3548
3548
|
msg.getMethodCallsList(),
|
|
3549
3549
|
proto.aggregator.ContractWriteNode.MethodCall.toObject,
|
|
3550
3550
|
includeInstance
|
|
3551
|
-
)
|
|
3551
|
+
),
|
|
3552
|
+
isSimulated: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
|
|
3552
3553
|
};
|
|
3553
3554
|
if (includeInstance) {
|
|
3554
3555
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3592,6 +3593,13 @@ var require_avs_pb = __commonJS({
|
|
|
3592
3593
|
reader.readMessage(value, proto.aggregator.ContractWriteNode.MethodCall.deserializeBinaryFromReader);
|
|
3593
3594
|
msg.addMethodCalls(value);
|
|
3594
3595
|
break;
|
|
3596
|
+
case 5:
|
|
3597
|
+
var value = (
|
|
3598
|
+
/** @type {boolean} */
|
|
3599
|
+
reader.readBool()
|
|
3600
|
+
);
|
|
3601
|
+
msg.setIsSimulated(value);
|
|
3602
|
+
break;
|
|
3595
3603
|
default:
|
|
3596
3604
|
reader.skipField();
|
|
3597
3605
|
break;
|
|
@@ -3636,6 +3644,14 @@ var require_avs_pb = __commonJS({
|
|
|
3636
3644
|
proto.aggregator.ContractWriteNode.MethodCall.serializeBinaryToWriter
|
|
3637
3645
|
);
|
|
3638
3646
|
}
|
|
3647
|
+
f = /** @type {boolean} */
|
|
3648
|
+
jspb.Message.getField(message, 5);
|
|
3649
|
+
if (f != null) {
|
|
3650
|
+
writer.writeBool(
|
|
3651
|
+
5,
|
|
3652
|
+
f
|
|
3653
|
+
);
|
|
3654
|
+
}
|
|
3639
3655
|
};
|
|
3640
3656
|
proto.aggregator.ContractWriteNode.Config.prototype.getContractAddress = function() {
|
|
3641
3657
|
return (
|
|
@@ -3685,6 +3701,21 @@ var require_avs_pb = __commonJS({
|
|
|
3685
3701
|
proto.aggregator.ContractWriteNode.Config.prototype.clearMethodCallsList = function() {
|
|
3686
3702
|
return this.setMethodCallsList([]);
|
|
3687
3703
|
};
|
|
3704
|
+
proto.aggregator.ContractWriteNode.Config.prototype.getIsSimulated = function() {
|
|
3705
|
+
return (
|
|
3706
|
+
/** @type {boolean} */
|
|
3707
|
+
jspb.Message.getBooleanFieldWithDefault(this, 5, false)
|
|
3708
|
+
);
|
|
3709
|
+
};
|
|
3710
|
+
proto.aggregator.ContractWriteNode.Config.prototype.setIsSimulated = function(value) {
|
|
3711
|
+
return jspb.Message.setField(this, 5, value);
|
|
3712
|
+
};
|
|
3713
|
+
proto.aggregator.ContractWriteNode.Config.prototype.clearIsSimulated = function() {
|
|
3714
|
+
return jspb.Message.setField(this, 5, void 0);
|
|
3715
|
+
};
|
|
3716
|
+
proto.aggregator.ContractWriteNode.Config.prototype.hasIsSimulated = function() {
|
|
3717
|
+
return jspb.Message.getField(this, 5) != null;
|
|
3718
|
+
};
|
|
3688
3719
|
proto.aggregator.ContractWriteNode.MethodCall.repeatedFields_ = [3, 4];
|
|
3689
3720
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3690
3721
|
proto.aggregator.ContractWriteNode.MethodCall.prototype.toObject = function(opt_includeInstance) {
|
|
@@ -19578,6 +19609,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
19578
19609
|
}
|
|
19579
19610
|
config.addMethodCalls(methodCallMsg);
|
|
19580
19611
|
});
|
|
19612
|
+
if (configData.isSimulated !== void 0) {
|
|
19613
|
+
config.setIsSimulated(configData.isSimulated);
|
|
19614
|
+
}
|
|
19581
19615
|
node.setConfig(config);
|
|
19582
19616
|
return node;
|
|
19583
19617
|
}
|
|
@@ -19597,7 +19631,9 @@ var ContractWriteNode2 = class _ContractWriteNode extends Node {
|
|
|
19597
19631
|
// Note: applyToFields is not supported for ContractWrite nodes in protobuf
|
|
19598
19632
|
// callData is optional, only include if present
|
|
19599
19633
|
...call.callData && { callData: call.callData }
|
|
19600
|
-
})) || []
|
|
19634
|
+
})) || [],
|
|
19635
|
+
// Include isSimulated if present in protobuf
|
|
19636
|
+
...protobufData.isSimulated !== void 0 && { isSimulated: protobufData.isSimulated }
|
|
19601
19637
|
};
|
|
19602
19638
|
return new _ContractWriteNode({
|
|
19603
19639
|
...obj,
|
|
@@ -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;AAEhD,OAAO,EAEL,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAAC,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;AAEhD,OAAO,EAEL,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,oBAAoB,CAAC;AAK5B,cAAM,iBAAkB,SAAQ,IAAI;gBACtB,KAAK,EAAE,sBAAsB;IAIzC;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,qBAAqB,GAAG,MAAM,CAAC,iBAAiB;IA6CtF,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,GAAG,iBAAiB;IAgC5D,SAAS,IAAI,MAAM,CAAC,QAAQ;IAe5B,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,qBAAqB,GAAG,GAAG;CAYrE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -42,6 +42,11 @@ class ContractWriteNode extends Node {
|
|
|
42
42
|
// Note: applyToFields is not supported for ContractWrite nodes
|
|
43
43
|
config.addMethodCalls(methodCallMsg);
|
|
44
44
|
});
|
|
45
|
+
// Set isSimulated only if explicitly provided (optional field in protobuf)
|
|
46
|
+
// When unset, the backend defaults to true (simulation mode)
|
|
47
|
+
if (configData.isSimulated !== undefined) {
|
|
48
|
+
config.setIsSimulated(configData.isSimulated);
|
|
49
|
+
}
|
|
45
50
|
node.setConfig(config);
|
|
46
51
|
return node;
|
|
47
52
|
}
|
|
@@ -62,6 +67,8 @@ class ContractWriteNode extends Node {
|
|
|
62
67
|
// callData is optional, only include if present
|
|
63
68
|
...(call.callData && { callData: call.callData }),
|
|
64
69
|
})) || [],
|
|
70
|
+
// Include isSimulated if present in protobuf
|
|
71
|
+
...(protobufData.isSimulated !== undefined && { isSimulated: protobufData.isSimulated }),
|
|
65
72
|
};
|
|
66
73
|
return new ContractWriteNode({
|
|
67
74
|
...obj,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.3",
|
|
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.7.
|
|
34
|
+
"@avaprotocol/types": "2.7.3",
|
|
35
35
|
"@grpc/grpc-js": "^1.11.3",
|
|
36
36
|
"@grpc/proto-loader": "^0.7.13",
|
|
37
37
|
"dotenv": "^16.4.5",
|