@avaprotocol/sdk-js 2.6.12 → 2.6.13
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 +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +184 -103
- package/dist/index.mjs +184 -103
- package/dist/models/step.d.ts +29 -0
- package/dist/models/step.d.ts.map +1 -1
- package/dist/models/step.js +52 -39
- package/dist/utils.d.ts +77 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +19 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -51,10 +51,6 @@ var require_avs_pb = __commonJS({
|
|
|
51
51
|
}
|
|
52
52
|
return Function("return this")();
|
|
53
53
|
}.call(null);
|
|
54
|
-
var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js");
|
|
55
|
-
goog.object.extend(proto, google_protobuf_wrappers_pb);
|
|
56
|
-
var google_protobuf_any_pb = __require("google-protobuf/google/protobuf/any_pb.js");
|
|
57
|
-
goog.object.extend(proto, google_protobuf_any_pb);
|
|
58
54
|
var google_protobuf_struct_pb5 = __require("google-protobuf/google/protobuf/struct_pb.js");
|
|
59
55
|
goog.object.extend(proto, google_protobuf_struct_pb5);
|
|
60
56
|
goog.exportSymbol("proto.aggregator.BlockTrigger", null, global);
|
|
@@ -3723,8 +3719,7 @@ var require_avs_pb = __commonJS({
|
|
|
3723
3719
|
};
|
|
3724
3720
|
proto.aggregator.ContractWriteNode.Output.toObject = function(includeInstance, msg) {
|
|
3725
3721
|
var f, obj = {
|
|
3726
|
-
data: (f = msg.getData()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
3727
|
-
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
3722
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
3728
3723
|
};
|
|
3729
3724
|
if (includeInstance) {
|
|
3730
3725
|
obj.$jspbMessageInstance = msg;
|
|
@@ -3749,11 +3744,6 @@ var require_avs_pb = __commonJS({
|
|
|
3749
3744
|
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
3750
3745
|
msg.setData(value);
|
|
3751
3746
|
break;
|
|
3752
|
-
case 2:
|
|
3753
|
-
var value = new google_protobuf_struct_pb5.Value();
|
|
3754
|
-
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
3755
|
-
msg.setMetadata(value);
|
|
3756
|
-
break;
|
|
3757
3747
|
default:
|
|
3758
3748
|
reader.skipField();
|
|
3759
3749
|
break;
|
|
@@ -3776,14 +3766,6 @@ var require_avs_pb = __commonJS({
|
|
|
3776
3766
|
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
3777
3767
|
);
|
|
3778
3768
|
}
|
|
3779
|
-
f = message.getMetadata();
|
|
3780
|
-
if (f != null) {
|
|
3781
|
-
writer.writeMessage(
|
|
3782
|
-
2,
|
|
3783
|
-
f,
|
|
3784
|
-
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
3785
|
-
);
|
|
3786
|
-
}
|
|
3787
3769
|
};
|
|
3788
3770
|
proto.aggregator.ContractWriteNode.Output.prototype.getData = function() {
|
|
3789
3771
|
return (
|
|
@@ -3800,21 +3782,6 @@ var require_avs_pb = __commonJS({
|
|
|
3800
3782
|
proto.aggregator.ContractWriteNode.Output.prototype.hasData = function() {
|
|
3801
3783
|
return jspb.Message.getField(this, 1) != null;
|
|
3802
3784
|
};
|
|
3803
|
-
proto.aggregator.ContractWriteNode.Output.prototype.getMetadata = function() {
|
|
3804
|
-
return (
|
|
3805
|
-
/** @type{?proto.google.protobuf.Value} */
|
|
3806
|
-
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 2)
|
|
3807
|
-
);
|
|
3808
|
-
};
|
|
3809
|
-
proto.aggregator.ContractWriteNode.Output.prototype.setMetadata = function(value) {
|
|
3810
|
-
return jspb.Message.setWrapperField(this, 2, value);
|
|
3811
|
-
};
|
|
3812
|
-
proto.aggregator.ContractWriteNode.Output.prototype.clearMetadata = function() {
|
|
3813
|
-
return this.setMetadata(void 0);
|
|
3814
|
-
};
|
|
3815
|
-
proto.aggregator.ContractWriteNode.Output.prototype.hasMetadata = function() {
|
|
3816
|
-
return jspb.Message.getField(this, 2) != null;
|
|
3817
|
-
};
|
|
3818
3785
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
3819
3786
|
proto.aggregator.ContractWriteNode.MethodResult.prototype.toObject = function(opt_includeInstance) {
|
|
3820
3787
|
return proto.aggregator.ContractWriteNode.MethodResult.toObject(opt_includeInstance, this);
|
|
@@ -4665,8 +4632,7 @@ var require_avs_pb = __commonJS({
|
|
|
4665
4632
|
};
|
|
4666
4633
|
proto.aggregator.ContractReadNode.Output.toObject = function(includeInstance, msg) {
|
|
4667
4634
|
var f, obj = {
|
|
4668
|
-
data: (f = msg.getData()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
4669
|
-
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
4635
|
+
data: (f = msg.getData()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f)
|
|
4670
4636
|
};
|
|
4671
4637
|
if (includeInstance) {
|
|
4672
4638
|
obj.$jspbMessageInstance = msg;
|
|
@@ -4691,11 +4657,6 @@ var require_avs_pb = __commonJS({
|
|
|
4691
4657
|
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
4692
4658
|
msg.setData(value);
|
|
4693
4659
|
break;
|
|
4694
|
-
case 2:
|
|
4695
|
-
var value = new google_protobuf_struct_pb5.Value();
|
|
4696
|
-
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
4697
|
-
msg.setMetadata(value);
|
|
4698
|
-
break;
|
|
4699
4660
|
default:
|
|
4700
4661
|
reader.skipField();
|
|
4701
4662
|
break;
|
|
@@ -4718,14 +4679,6 @@ var require_avs_pb = __commonJS({
|
|
|
4718
4679
|
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
4719
4680
|
);
|
|
4720
4681
|
}
|
|
4721
|
-
f = message.getMetadata();
|
|
4722
|
-
if (f != null) {
|
|
4723
|
-
writer.writeMessage(
|
|
4724
|
-
2,
|
|
4725
|
-
f,
|
|
4726
|
-
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
4727
|
-
);
|
|
4728
|
-
}
|
|
4729
4682
|
};
|
|
4730
4683
|
proto.aggregator.ContractReadNode.Output.prototype.getData = function() {
|
|
4731
4684
|
return (
|
|
@@ -4742,21 +4695,6 @@ var require_avs_pb = __commonJS({
|
|
|
4742
4695
|
proto.aggregator.ContractReadNode.Output.prototype.hasData = function() {
|
|
4743
4696
|
return jspb.Message.getField(this, 1) != null;
|
|
4744
4697
|
};
|
|
4745
|
-
proto.aggregator.ContractReadNode.Output.prototype.getMetadata = function() {
|
|
4746
|
-
return (
|
|
4747
|
-
/** @type{?proto.google.protobuf.Value} */
|
|
4748
|
-
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 2)
|
|
4749
|
-
);
|
|
4750
|
-
};
|
|
4751
|
-
proto.aggregator.ContractReadNode.Output.prototype.setMetadata = function(value) {
|
|
4752
|
-
return jspb.Message.setWrapperField(this, 2, value);
|
|
4753
|
-
};
|
|
4754
|
-
proto.aggregator.ContractReadNode.Output.prototype.clearMetadata = function() {
|
|
4755
|
-
return this.setMetadata(void 0);
|
|
4756
|
-
};
|
|
4757
|
-
proto.aggregator.ContractReadNode.Output.prototype.hasMetadata = function() {
|
|
4758
|
-
return jspb.Message.getField(this, 2) != null;
|
|
4759
|
-
};
|
|
4760
4698
|
proto.aggregator.ContractReadNode.prototype.getConfig = function() {
|
|
4761
4699
|
return (
|
|
4762
4700
|
/** @type{?proto.aggregator.ContractReadNode.Config} */
|
|
@@ -7217,6 +7155,8 @@ var require_avs_pb = __commonJS({
|
|
|
7217
7155
|
log: jspb.Message.getFieldWithDefault(msg, 12, ""),
|
|
7218
7156
|
inputsList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? void 0 : f,
|
|
7219
7157
|
config: (f = msg.getConfig()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
7158
|
+
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
7159
|
+
executionContext: (f = msg.getExecutionContext()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
7220
7160
|
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
7221
7161
|
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
7222
7162
|
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
@@ -7306,6 +7246,16 @@ var require_avs_pb = __commonJS({
|
|
|
7306
7246
|
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
7307
7247
|
msg.setConfig(value);
|
|
7308
7248
|
break;
|
|
7249
|
+
case 25:
|
|
7250
|
+
var value = new google_protobuf_struct_pb5.Value();
|
|
7251
|
+
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
7252
|
+
msg.setMetadata(value);
|
|
7253
|
+
break;
|
|
7254
|
+
case 26:
|
|
7255
|
+
var value = new google_protobuf_struct_pb5.Value();
|
|
7256
|
+
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
7257
|
+
msg.setExecutionContext(value);
|
|
7258
|
+
break;
|
|
7309
7259
|
case 20:
|
|
7310
7260
|
var value = new proto.aggregator.BlockTrigger.Output();
|
|
7311
7261
|
reader.readMessage(value, proto.aggregator.BlockTrigger.Output.deserializeBinaryFromReader);
|
|
@@ -7461,6 +7411,22 @@ var require_avs_pb = __commonJS({
|
|
|
7461
7411
|
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
7462
7412
|
);
|
|
7463
7413
|
}
|
|
7414
|
+
f = message.getMetadata();
|
|
7415
|
+
if (f != null) {
|
|
7416
|
+
writer.writeMessage(
|
|
7417
|
+
25,
|
|
7418
|
+
f,
|
|
7419
|
+
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
7420
|
+
);
|
|
7421
|
+
}
|
|
7422
|
+
f = message.getExecutionContext();
|
|
7423
|
+
if (f != null) {
|
|
7424
|
+
writer.writeMessage(
|
|
7425
|
+
26,
|
|
7426
|
+
f,
|
|
7427
|
+
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
7428
|
+
);
|
|
7429
|
+
}
|
|
7464
7430
|
f = message.getBlockTrigger();
|
|
7465
7431
|
if (f != null) {
|
|
7466
7432
|
writer.writeMessage(
|
|
@@ -7672,6 +7638,36 @@ var require_avs_pb = __commonJS({
|
|
|
7672
7638
|
proto.aggregator.Execution.Step.prototype.hasConfig = function() {
|
|
7673
7639
|
return jspb.Message.getField(this, 19) != null;
|
|
7674
7640
|
};
|
|
7641
|
+
proto.aggregator.Execution.Step.prototype.getMetadata = function() {
|
|
7642
|
+
return (
|
|
7643
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
7644
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 25)
|
|
7645
|
+
);
|
|
7646
|
+
};
|
|
7647
|
+
proto.aggregator.Execution.Step.prototype.setMetadata = function(value) {
|
|
7648
|
+
return jspb.Message.setWrapperField(this, 25, value);
|
|
7649
|
+
};
|
|
7650
|
+
proto.aggregator.Execution.Step.prototype.clearMetadata = function() {
|
|
7651
|
+
return this.setMetadata(void 0);
|
|
7652
|
+
};
|
|
7653
|
+
proto.aggregator.Execution.Step.prototype.hasMetadata = function() {
|
|
7654
|
+
return jspb.Message.getField(this, 25) != null;
|
|
7655
|
+
};
|
|
7656
|
+
proto.aggregator.Execution.Step.prototype.getExecutionContext = function() {
|
|
7657
|
+
return (
|
|
7658
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
7659
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 26)
|
|
7660
|
+
);
|
|
7661
|
+
};
|
|
7662
|
+
proto.aggregator.Execution.Step.prototype.setExecutionContext = function(value) {
|
|
7663
|
+
return jspb.Message.setWrapperField(this, 26, value);
|
|
7664
|
+
};
|
|
7665
|
+
proto.aggregator.Execution.Step.prototype.clearExecutionContext = function() {
|
|
7666
|
+
return this.setExecutionContext(void 0);
|
|
7667
|
+
};
|
|
7668
|
+
proto.aggregator.Execution.Step.prototype.hasExecutionContext = function() {
|
|
7669
|
+
return jspb.Message.getField(this, 26) != null;
|
|
7670
|
+
};
|
|
7675
7671
|
proto.aggregator.Execution.Step.prototype.getBlockTrigger = function() {
|
|
7676
7672
|
return (
|
|
7677
7673
|
/** @type{?proto.aggregator.BlockTrigger.Output} */
|
|
@@ -13641,6 +13637,7 @@ var require_avs_pb = __commonJS({
|
|
|
13641
13637
|
error: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
13642
13638
|
nodeId: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
13643
13639
|
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
13640
|
+
executionContext: (f = msg.getExecutionContext()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
13644
13641
|
ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.Output.toObject(includeInstance, f),
|
|
13645
13642
|
graphql: (f = msg.getGraphql()) && proto.aggregator.GraphQLQueryNode.Output.toObject(includeInstance, f),
|
|
13646
13643
|
contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.Output.toObject(includeInstance, f),
|
|
@@ -13695,6 +13692,11 @@ var require_avs_pb = __commonJS({
|
|
|
13695
13692
|
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
13696
13693
|
msg.setMetadata(value);
|
|
13697
13694
|
break;
|
|
13695
|
+
case 6:
|
|
13696
|
+
var value = new google_protobuf_struct_pb5.Value();
|
|
13697
|
+
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
13698
|
+
msg.setExecutionContext(value);
|
|
13699
|
+
break;
|
|
13698
13700
|
case 10:
|
|
13699
13701
|
var value = new proto.aggregator.ETHTransferNode.Output();
|
|
13700
13702
|
reader.readMessage(value, proto.aggregator.ETHTransferNode.Output.deserializeBinaryFromReader);
|
|
@@ -13783,6 +13785,14 @@ var require_avs_pb = __commonJS({
|
|
|
13783
13785
|
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
13784
13786
|
);
|
|
13785
13787
|
}
|
|
13788
|
+
f = message.getExecutionContext();
|
|
13789
|
+
if (f != null) {
|
|
13790
|
+
writer.writeMessage(
|
|
13791
|
+
6,
|
|
13792
|
+
f,
|
|
13793
|
+
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
13794
|
+
);
|
|
13795
|
+
}
|
|
13786
13796
|
f = message.getEthTransfer();
|
|
13787
13797
|
if (f != null) {
|
|
13788
13798
|
writer.writeMessage(
|
|
@@ -13898,6 +13908,21 @@ var require_avs_pb = __commonJS({
|
|
|
13898
13908
|
proto.aggregator.RunNodeWithInputsResp.prototype.hasMetadata = function() {
|
|
13899
13909
|
return jspb.Message.getField(this, 5) != null;
|
|
13900
13910
|
};
|
|
13911
|
+
proto.aggregator.RunNodeWithInputsResp.prototype.getExecutionContext = function() {
|
|
13912
|
+
return (
|
|
13913
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
13914
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 6)
|
|
13915
|
+
);
|
|
13916
|
+
};
|
|
13917
|
+
proto.aggregator.RunNodeWithInputsResp.prototype.setExecutionContext = function(value) {
|
|
13918
|
+
return jspb.Message.setWrapperField(this, 6, value);
|
|
13919
|
+
};
|
|
13920
|
+
proto.aggregator.RunNodeWithInputsResp.prototype.clearExecutionContext = function() {
|
|
13921
|
+
return this.setExecutionContext(void 0);
|
|
13922
|
+
};
|
|
13923
|
+
proto.aggregator.RunNodeWithInputsResp.prototype.hasExecutionContext = function() {
|
|
13924
|
+
return jspb.Message.getField(this, 6) != null;
|
|
13925
|
+
};
|
|
13901
13926
|
proto.aggregator.RunNodeWithInputsResp.prototype.getEthTransfer = function() {
|
|
13902
13927
|
return (
|
|
13903
13928
|
/** @type{?proto.aggregator.ETHTransferNode.Output} */
|
|
@@ -14174,6 +14199,7 @@ var require_avs_pb = __commonJS({
|
|
|
14174
14199
|
error: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
14175
14200
|
triggerId: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
14176
14201
|
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
14202
|
+
executionContext: (f = msg.getExecutionContext()) && google_protobuf_struct_pb5.Value.toObject(includeInstance, f),
|
|
14177
14203
|
blockTrigger: (f = msg.getBlockTrigger()) && proto.aggregator.BlockTrigger.Output.toObject(includeInstance, f),
|
|
14178
14204
|
fixedTimeTrigger: (f = msg.getFixedTimeTrigger()) && proto.aggregator.FixedTimeTrigger.Output.toObject(includeInstance, f),
|
|
14179
14205
|
cronTrigger: (f = msg.getCronTrigger()) && proto.aggregator.CronTrigger.Output.toObject(includeInstance, f),
|
|
@@ -14224,6 +14250,11 @@ var require_avs_pb = __commonJS({
|
|
|
14224
14250
|
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
14225
14251
|
msg.setMetadata(value);
|
|
14226
14252
|
break;
|
|
14253
|
+
case 5:
|
|
14254
|
+
var value = new google_protobuf_struct_pb5.Value();
|
|
14255
|
+
reader.readMessage(value, google_protobuf_struct_pb5.Value.deserializeBinaryFromReader);
|
|
14256
|
+
msg.setExecutionContext(value);
|
|
14257
|
+
break;
|
|
14227
14258
|
case 10:
|
|
14228
14259
|
var value = new proto.aggregator.BlockTrigger.Output();
|
|
14229
14260
|
reader.readMessage(value, proto.aggregator.BlockTrigger.Output.deserializeBinaryFromReader);
|
|
@@ -14292,6 +14323,14 @@ var require_avs_pb = __commonJS({
|
|
|
14292
14323
|
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
14293
14324
|
);
|
|
14294
14325
|
}
|
|
14326
|
+
f = message.getExecutionContext();
|
|
14327
|
+
if (f != null) {
|
|
14328
|
+
writer.writeMessage(
|
|
14329
|
+
5,
|
|
14330
|
+
f,
|
|
14331
|
+
google_protobuf_struct_pb5.Value.serializeBinaryToWriter
|
|
14332
|
+
);
|
|
14333
|
+
}
|
|
14295
14334
|
f = message.getBlockTrigger();
|
|
14296
14335
|
if (f != null) {
|
|
14297
14336
|
writer.writeMessage(
|
|
@@ -14375,6 +14414,21 @@ var require_avs_pb = __commonJS({
|
|
|
14375
14414
|
proto.aggregator.RunTriggerResp.prototype.hasMetadata = function() {
|
|
14376
14415
|
return jspb.Message.getField(this, 4) != null;
|
|
14377
14416
|
};
|
|
14417
|
+
proto.aggregator.RunTriggerResp.prototype.getExecutionContext = function() {
|
|
14418
|
+
return (
|
|
14419
|
+
/** @type{?proto.google.protobuf.Value} */
|
|
14420
|
+
jspb.Message.getWrapperField(this, google_protobuf_struct_pb5.Value, 5)
|
|
14421
|
+
);
|
|
14422
|
+
};
|
|
14423
|
+
proto.aggregator.RunTriggerResp.prototype.setExecutionContext = function(value) {
|
|
14424
|
+
return jspb.Message.setWrapperField(this, 5, value);
|
|
14425
|
+
};
|
|
14426
|
+
proto.aggregator.RunTriggerResp.prototype.clearExecutionContext = function() {
|
|
14427
|
+
return this.setExecutionContext(void 0);
|
|
14428
|
+
};
|
|
14429
|
+
proto.aggregator.RunTriggerResp.prototype.hasExecutionContext = function() {
|
|
14430
|
+
return jspb.Message.getField(this, 5) != null;
|
|
14431
|
+
};
|
|
14378
14432
|
proto.aggregator.RunTriggerResp.prototype.getBlockTrigger = function() {
|
|
14379
14433
|
return (
|
|
14380
14434
|
/** @type{?proto.aggregator.BlockTrigger.Output} */
|
|
@@ -14839,8 +14893,6 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
14839
14893
|
"use strict";
|
|
14840
14894
|
var grpc = __require("@grpc/grpc-js");
|
|
14841
14895
|
var avs_pb23 = require_avs_pb();
|
|
14842
|
-
var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js");
|
|
14843
|
-
var google_protobuf_any_pb = __require("google-protobuf/google/protobuf/any_pb.js");
|
|
14844
14896
|
var google_protobuf_struct_pb5 = __require("google-protobuf/google/protobuf/struct_pb.js");
|
|
14845
14897
|
function serialize_aggregator_CancelTaskResp(arg) {
|
|
14846
14898
|
if (!(arg instanceof avs_pb23.CancelTaskResp)) {
|
|
@@ -15872,6 +15924,19 @@ function convertJSValueToProtobuf(value) {
|
|
|
15872
15924
|
}
|
|
15873
15925
|
return protobufValue;
|
|
15874
15926
|
}
|
|
15927
|
+
function toCamelCaseKeys(input) {
|
|
15928
|
+
if (input === null || input === void 0) return input;
|
|
15929
|
+
if (Array.isArray(input)) {
|
|
15930
|
+
return input.map((item) => toCamelCaseKeys(item));
|
|
15931
|
+
}
|
|
15932
|
+
if (typeof input !== "object") return input;
|
|
15933
|
+
const result = {};
|
|
15934
|
+
for (const [key, value] of Object.entries(input)) {
|
|
15935
|
+
const camelKey = key.replace(/_([a-z])/g, (_4, c) => c.toUpperCase());
|
|
15936
|
+
result[camelKey] = toCamelCaseKeys(value);
|
|
15937
|
+
}
|
|
15938
|
+
return result;
|
|
15939
|
+
}
|
|
15875
15940
|
function convertProtobufTriggerTypeToSdk(protobufType) {
|
|
15876
15941
|
switch (protobufType) {
|
|
15877
15942
|
case "TRIGGER_TYPE_MANUAL":
|
|
@@ -17466,6 +17531,8 @@ var Step = class _Step {
|
|
|
17466
17531
|
this.output = props.output;
|
|
17467
17532
|
this.startAt = props.startAt;
|
|
17468
17533
|
this.endAt = props.endAt;
|
|
17534
|
+
this.metadata = props.metadata;
|
|
17535
|
+
this.executionContext = props.executionContext;
|
|
17469
17536
|
}
|
|
17470
17537
|
/**
|
|
17471
17538
|
* Convert Step instance to plain object (StepProps)
|
|
@@ -17483,44 +17550,35 @@ var Step = class _Step {
|
|
|
17483
17550
|
config: this.config,
|
|
17484
17551
|
output: this.output,
|
|
17485
17552
|
startAt: this.startAt,
|
|
17486
|
-
endAt: this.endAt
|
|
17553
|
+
endAt: this.endAt,
|
|
17554
|
+
metadata: this.metadata,
|
|
17555
|
+
executionContext: this.executionContext
|
|
17487
17556
|
};
|
|
17488
17557
|
}
|
|
17489
17558
|
static getOutput(step) {
|
|
17490
|
-
const
|
|
17491
|
-
if (!
|
|
17492
|
-
|
|
17493
|
-
|
|
17559
|
+
const outputObj = this.extractOutputData(step);
|
|
17560
|
+
if (!outputObj) return null;
|
|
17561
|
+
if (typeof outputObj.getData === "function") {
|
|
17562
|
+
const val = outputObj.getData();
|
|
17563
|
+
if (!val) return null;
|
|
17494
17564
|
try {
|
|
17495
|
-
|
|
17496
|
-
if (typeof outputData.getData === "function") {
|
|
17497
|
-
result.data = convertProtobufValueToJs(outputData.getData());
|
|
17498
|
-
}
|
|
17499
|
-
if (typeof outputData.getMetadata === "function") {
|
|
17500
|
-
result.metadata = convertProtobufValueToJs(outputData.getMetadata());
|
|
17501
|
-
}
|
|
17502
|
-
return result;
|
|
17503
|
-
} catch (error) {
|
|
17504
|
-
console.warn("Failed to convert ContractWrite/ContractRead protobuf to JavaScript:", error);
|
|
17505
|
-
return outputData.getData ? outputData.getData() : null;
|
|
17506
|
-
}
|
|
17507
|
-
}
|
|
17508
|
-
if (typeof outputData.hasData === "function" && outputData.hasData()) {
|
|
17509
|
-
try {
|
|
17510
|
-
return convertProtobufValueToJs(outputData.getData());
|
|
17565
|
+
return convertProtobufValueToJs(val);
|
|
17511
17566
|
} catch (error) {
|
|
17512
17567
|
console.warn("Failed to convert protobuf Value to JavaScript:", error);
|
|
17513
|
-
return
|
|
17568
|
+
return val;
|
|
17514
17569
|
}
|
|
17515
|
-
}
|
|
17570
|
+
}
|
|
17571
|
+
const data = outputObj.data;
|
|
17572
|
+
if (data) {
|
|
17516
17573
|
try {
|
|
17517
|
-
return convertProtobufValueToJs(
|
|
17574
|
+
return typeof data.getKindCase === "function" ? convertProtobufValueToJs(data) : data;
|
|
17518
17575
|
} catch (error) {
|
|
17519
|
-
console.warn(
|
|
17520
|
-
|
|
17576
|
+
console.warn(
|
|
17577
|
+
"Failed to convert plain object Value to JavaScript:",
|
|
17578
|
+
error
|
|
17579
|
+
);
|
|
17580
|
+
return data;
|
|
17521
17581
|
}
|
|
17522
|
-
} else if (outputData.data) {
|
|
17523
|
-
return typeof outputData.data.getKindCase === "function" ? convertProtobufValueToJs(outputData.data) : outputData.data;
|
|
17524
17582
|
}
|
|
17525
17583
|
return null;
|
|
17526
17584
|
}
|
|
@@ -17611,6 +17669,28 @@ var Step = class _Step {
|
|
|
17611
17669
|
const getInputsList = () => typeof step.getInputsList === "function" ? step.getInputsList() : step.inputsList || [];
|
|
17612
17670
|
const getStartAt = () => typeof step.getStartAt === "function" ? step.getStartAt() : step.startAt;
|
|
17613
17671
|
const getEndAt = () => typeof step.getEndAt === "function" ? step.getEndAt() : step.endAt;
|
|
17672
|
+
let stepMetadata = void 0;
|
|
17673
|
+
if (typeof step.getMetadata === "function" && step.getMetadata()) {
|
|
17674
|
+
try {
|
|
17675
|
+
stepMetadata = convertProtobufValueToJs(step.getMetadata());
|
|
17676
|
+
} catch (e) {
|
|
17677
|
+
stepMetadata = step.getMetadata();
|
|
17678
|
+
}
|
|
17679
|
+
} else if (step.metadata) {
|
|
17680
|
+
stepMetadata = step.metadata;
|
|
17681
|
+
}
|
|
17682
|
+
let executionContext = void 0;
|
|
17683
|
+
if (typeof step.getExecutionContext === "function" && step.getExecutionContext()) {
|
|
17684
|
+
try {
|
|
17685
|
+
executionContext = convertProtobufValueToJs(
|
|
17686
|
+
step.getExecutionContext()
|
|
17687
|
+
);
|
|
17688
|
+
} catch (e) {
|
|
17689
|
+
executionContext = step.getExecutionContext();
|
|
17690
|
+
}
|
|
17691
|
+
} else if (step.executionContext) {
|
|
17692
|
+
executionContext = step.executionContext;
|
|
17693
|
+
}
|
|
17614
17694
|
return new _Step({
|
|
17615
17695
|
id: getId(),
|
|
17616
17696
|
type: convertProtobufStepTypeToSdk(getType()),
|
|
@@ -17622,7 +17702,9 @@ var Step = class _Step {
|
|
|
17622
17702
|
config: configData,
|
|
17623
17703
|
output: _Step.getOutput(step),
|
|
17624
17704
|
startAt: getStartAt(),
|
|
17625
|
-
endAt: getEndAt()
|
|
17705
|
+
endAt: getEndAt(),
|
|
17706
|
+
metadata: stepMetadata,
|
|
17707
|
+
executionContext
|
|
17626
17708
|
});
|
|
17627
17709
|
}
|
|
17628
17710
|
// Client side does not generate the step, so there's no toRequest() method
|
|
@@ -18590,8 +18672,7 @@ var Client = class extends BaseClient {
|
|
|
18590
18672
|
return {
|
|
18591
18673
|
success: false,
|
|
18592
18674
|
error: `Trigger type "${nodeType}" should use the runTrigger() method instead of runNodeWithInputs()`,
|
|
18593
|
-
data: null
|
|
18594
|
-
nodeId: ""
|
|
18675
|
+
data: null
|
|
18595
18676
|
};
|
|
18596
18677
|
}
|
|
18597
18678
|
const request = new avs_pb22.RunNodeWithInputsReq();
|
|
@@ -18610,10 +18691,10 @@ var Client = class extends BaseClient {
|
|
|
18610
18691
|
const result = await this.sendGrpcRequest("runNodeWithInputs", request, options);
|
|
18611
18692
|
return {
|
|
18612
18693
|
success: result.getSuccess(),
|
|
18613
|
-
data: factory_default2.fromOutputData(result),
|
|
18694
|
+
data: toCamelCaseKeys(factory_default2.fromOutputData(result)),
|
|
18614
18695
|
error: result.getError(),
|
|
18615
|
-
|
|
18616
|
-
|
|
18696
|
+
metadata: result.hasMetadata() ? toCamelCaseKeys(convertProtobufValueToJs(result.getMetadata())) : void 0,
|
|
18697
|
+
executionContext: result.hasExecutionContext() ? toCamelCaseKeys(convertProtobufValueToJs(result.getExecutionContext())) : void 0
|
|
18617
18698
|
};
|
|
18618
18699
|
}
|
|
18619
18700
|
/**
|
|
@@ -18645,10 +18726,10 @@ var Client = class extends BaseClient {
|
|
|
18645
18726
|
}
|
|
18646
18727
|
return {
|
|
18647
18728
|
success: result.getSuccess(),
|
|
18648
|
-
data: factory_default.fromOutputData(result),
|
|
18729
|
+
data: toCamelCaseKeys(factory_default.fromOutputData(result)),
|
|
18649
18730
|
error: result.getError(),
|
|
18650
|
-
|
|
18651
|
-
|
|
18731
|
+
metadata: toCamelCaseKeys(metadata),
|
|
18732
|
+
executionContext: result.hasExecutionContext() ? toCamelCaseKeys(convertProtobufValueToJs(result.getExecutionContext())) : void 0
|
|
18652
18733
|
};
|
|
18653
18734
|
}
|
|
18654
18735
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
|
+
import { StepProps, OutputDataProps } from "@avaprotocol/types";
|
|
3
|
+
declare class Step implements StepProps {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
name: string;
|
|
7
|
+
success: boolean;
|
|
8
|
+
error: string;
|
|
9
|
+
log: string;
|
|
10
|
+
inputsList: string[];
|
|
11
|
+
config?: any;
|
|
12
|
+
output: OutputDataProps;
|
|
13
|
+
startAt: number;
|
|
14
|
+
endAt: number;
|
|
15
|
+
metadata?: any;
|
|
16
|
+
executionContext?: any;
|
|
17
|
+
constructor(props: StepProps);
|
|
18
|
+
/**
|
|
19
|
+
* Convert Step instance to plain object (StepProps)
|
|
20
|
+
* This is useful for serialization, especially with Next.js Server Components
|
|
21
|
+
*/
|
|
22
|
+
toJson(): StepProps;
|
|
23
|
+
static getOutput(step: avs_pb.Execution.Step): OutputDataProps;
|
|
24
|
+
private static extractOutputData;
|
|
25
|
+
private static getOutputDataCase;
|
|
26
|
+
static fromResponse(step: avs_pb.Execution.Step): Step;
|
|
27
|
+
}
|
|
28
|
+
export default Step;
|
|
29
|
+
//# sourceMappingURL=step.d.ts.map
|
|
@@ -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,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;
|
|
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,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,gBAAgB,CAAC,EAAE,GAAG,CAAC;gBAEX,KAAK,EAAE,SAAS;IAgB5B;;;OAGG;IACH,MAAM,IAAI,SAAS;IAkBnB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,eAAe;IAoC9D,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAiEhC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAkChC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI;CAuGvD;AAED,eAAe,IAAI,CAAC"}
|
package/dist/models/step.js
CHANGED
|
@@ -13,6 +13,8 @@ class Step {
|
|
|
13
13
|
this.output = props.output;
|
|
14
14
|
this.startAt = props.startAt;
|
|
15
15
|
this.endAt = props.endAt;
|
|
16
|
+
this.metadata = props.metadata;
|
|
17
|
+
this.executionContext = props.executionContext;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Convert Step instance to plain object (StepProps)
|
|
@@ -31,60 +33,41 @@ class Step {
|
|
|
31
33
|
output: this.output,
|
|
32
34
|
startAt: this.startAt,
|
|
33
35
|
endAt: this.endAt,
|
|
36
|
+
metadata: this.metadata,
|
|
37
|
+
executionContext: this.executionContext,
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
40
|
static getOutput(step) {
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
// Always return Output.data; step-level metadata is separate.
|
|
42
|
+
const outputObj = this.extractOutputData(step);
|
|
43
|
+
if (!outputObj)
|
|
39
44
|
return null;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const result = {};
|
|
46
|
-
// Extract data field (decoded events/results)
|
|
47
|
-
if (typeof outputData.getData === "function") {
|
|
48
|
-
result.data = convertProtobufValueToJs(outputData.getData());
|
|
49
|
-
}
|
|
50
|
-
// Extract metadata field (method execution details)
|
|
51
|
-
if (typeof outputData.getMetadata === "function") {
|
|
52
|
-
result.metadata = convertProtobufValueToJs(outputData.getMetadata());
|
|
53
|
-
}
|
|
54
|
-
// Return both data and metadata for ContractWrite and ContractRead
|
|
55
|
-
// This ensures consistent structure between simulated and deployed workflow execution
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
console.warn("Failed to convert ContractWrite/ContractRead protobuf to JavaScript:", error);
|
|
60
|
-
return outputData.getData ? outputData.getData() : null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
// STANDARDIZED Direct Mapping - ALL other triggers and nodes use the same logic
|
|
64
|
-
if (typeof outputData.hasData === "function" && outputData.hasData()) {
|
|
45
|
+
// Protobuf accessor path
|
|
46
|
+
if (typeof outputObj.getData === "function") {
|
|
47
|
+
const val = outputObj.getData();
|
|
48
|
+
if (!val)
|
|
49
|
+
return null;
|
|
65
50
|
try {
|
|
66
|
-
return convertProtobufValueToJs(
|
|
51
|
+
return convertProtobufValueToJs(val);
|
|
67
52
|
}
|
|
68
53
|
catch (error) {
|
|
69
54
|
console.warn("Failed to convert protobuf Value to JavaScript:", error);
|
|
70
|
-
return
|
|
55
|
+
return val;
|
|
71
56
|
}
|
|
72
57
|
}
|
|
73
|
-
|
|
58
|
+
// Plain object fallback
|
|
59
|
+
const data = outputObj.data;
|
|
60
|
+
if (data) {
|
|
74
61
|
try {
|
|
75
|
-
return
|
|
62
|
+
return typeof data.getKindCase === "function"
|
|
63
|
+
? convertProtobufValueToJs(data)
|
|
64
|
+
: data;
|
|
76
65
|
}
|
|
77
66
|
catch (error) {
|
|
78
|
-
console.warn("Failed to convert
|
|
79
|
-
return
|
|
67
|
+
console.warn("Failed to convert plain object Value to JavaScript:", error);
|
|
68
|
+
return data;
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
|
-
else if (outputData.data) {
|
|
83
|
-
// For plain objects, try to convert or use directly
|
|
84
|
-
return typeof outputData.data.getKindCase === "function"
|
|
85
|
-
? convertProtobufValueToJs(outputData.data)
|
|
86
|
-
: outputData.data;
|
|
87
|
-
}
|
|
88
71
|
return null;
|
|
89
72
|
}
|
|
90
73
|
static extractOutputData(step) {
|
|
@@ -226,6 +209,34 @@ class Step {
|
|
|
226
209
|
const getEndAt = () => typeof step.getEndAt === "function"
|
|
227
210
|
? step.getEndAt()
|
|
228
211
|
: step.endAt;
|
|
212
|
+
// Extract step-level metadata if present (per protobuf: Execution.Step.metadata)
|
|
213
|
+
let stepMetadata = undefined;
|
|
214
|
+
if (typeof step.getMetadata === "function" &&
|
|
215
|
+
step.getMetadata()) {
|
|
216
|
+
try {
|
|
217
|
+
stepMetadata = convertProtobufValueToJs(step.getMetadata());
|
|
218
|
+
}
|
|
219
|
+
catch (e) {
|
|
220
|
+
stepMetadata = step.getMetadata();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else if (step.metadata) {
|
|
224
|
+
stepMetadata = step.metadata;
|
|
225
|
+
}
|
|
226
|
+
// Extract executionContext if present on the step
|
|
227
|
+
let executionContext = undefined;
|
|
228
|
+
if (typeof step.getExecutionContext === "function" &&
|
|
229
|
+
step.getExecutionContext()) {
|
|
230
|
+
try {
|
|
231
|
+
executionContext = convertProtobufValueToJs(step.getExecutionContext());
|
|
232
|
+
}
|
|
233
|
+
catch (e) {
|
|
234
|
+
executionContext = step.getExecutionContext();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (step.executionContext) {
|
|
238
|
+
executionContext = step.executionContext;
|
|
239
|
+
}
|
|
229
240
|
return new Step({
|
|
230
241
|
id: getId(),
|
|
231
242
|
type: convertProtobufStepTypeToSdk(getType()),
|
|
@@ -238,6 +249,8 @@ class Step {
|
|
|
238
249
|
output: Step.getOutput(step),
|
|
239
250
|
startAt: getStartAt(),
|
|
240
251
|
endAt: getEndAt(),
|
|
252
|
+
metadata: stepMetadata,
|
|
253
|
+
executionContext,
|
|
241
254
|
});
|
|
242
255
|
}
|
|
243
256
|
}
|