@avaprotocol/sdk-js 2.10.3 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +225 -106
- package/dist/index.mjs +225 -106
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +15 -8
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,6 @@ var require_avs_pb = __commonJS({
|
|
|
64
64
|
goog.exportSymbol("proto.aggregator.BranchNode.Condition", null, global);
|
|
65
65
|
goog.exportSymbol("proto.aggregator.BranchNode.Config", null, global);
|
|
66
66
|
goog.exportSymbol("proto.aggregator.BranchNode.Output", null, global);
|
|
67
|
-
goog.exportSymbol("proto.aggregator.CancelTaskResp", null, global);
|
|
68
67
|
goog.exportSymbol("proto.aggregator.ContractReadNode", null, global);
|
|
69
68
|
goog.exportSymbol("proto.aggregator.ContractReadNode.Config", null, global);
|
|
70
69
|
goog.exportSymbol("proto.aggregator.ContractReadNode.MethodCall", null, global);
|
|
@@ -166,6 +165,8 @@ var require_avs_pb = __commonJS({
|
|
|
166
165
|
goog.exportSymbol("proto.aggregator.RunTriggerResp", null, global);
|
|
167
166
|
goog.exportSymbol("proto.aggregator.RunTriggerResp.OutputDataCase", null, global);
|
|
168
167
|
goog.exportSymbol("proto.aggregator.Secret", null, global);
|
|
168
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledReq", null, global);
|
|
169
|
+
goog.exportSymbol("proto.aggregator.SetTaskEnabledResp", null, global);
|
|
169
170
|
goog.exportSymbol("proto.aggregator.SetWalletReq", null, global);
|
|
170
171
|
goog.exportSymbol("proto.aggregator.SimulateTaskReq", null, global);
|
|
171
172
|
goog.exportSymbol("proto.aggregator.SmartWallet", null, global);
|
|
@@ -864,12 +865,19 @@ var require_avs_pb = __commonJS({
|
|
|
864
865
|
if (goog.DEBUG && !COMPILED) {
|
|
865
866
|
proto.aggregator.DeleteTaskResp.displayName = "proto.aggregator.DeleteTaskResp";
|
|
866
867
|
}
|
|
867
|
-
proto.aggregator.
|
|
868
|
+
proto.aggregator.SetTaskEnabledReq = function(opt_data) {
|
|
868
869
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
869
870
|
};
|
|
870
|
-
goog.inherits(proto.aggregator.
|
|
871
|
+
goog.inherits(proto.aggregator.SetTaskEnabledReq, jspb.Message);
|
|
871
872
|
if (goog.DEBUG && !COMPILED) {
|
|
872
|
-
proto.aggregator.
|
|
873
|
+
proto.aggregator.SetTaskEnabledReq.displayName = "proto.aggregator.SetTaskEnabledReq";
|
|
874
|
+
}
|
|
875
|
+
proto.aggregator.SetTaskEnabledResp = function(opt_data) {
|
|
876
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
877
|
+
};
|
|
878
|
+
goog.inherits(proto.aggregator.SetTaskEnabledResp, jspb.Message);
|
|
879
|
+
if (goog.DEBUG && !COMPILED) {
|
|
880
|
+
proto.aggregator.SetTaskEnabledResp.displayName = "proto.aggregator.SetTaskEnabledResp";
|
|
873
881
|
}
|
|
874
882
|
proto.aggregator.GetWorkflowCountReq = function(opt_data) {
|
|
875
883
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.GetWorkflowCountReq.repeatedFields_, null);
|
|
@@ -1017,7 +1025,7 @@ var require_avs_pb = __commonJS({
|
|
|
1017
1025
|
};
|
|
1018
1026
|
proto.aggregator.TokenMetadata.toObject = function(includeInstance, msg) {
|
|
1019
1027
|
var f, obj = {
|
|
1020
|
-
|
|
1028
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1021
1029
|
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
1022
1030
|
symbol: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
1023
1031
|
decimals: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
@@ -1045,7 +1053,7 @@ var require_avs_pb = __commonJS({
|
|
|
1045
1053
|
/** @type {string} */
|
|
1046
1054
|
reader.readString()
|
|
1047
1055
|
);
|
|
1048
|
-
msg.
|
|
1056
|
+
msg.setId(value);
|
|
1049
1057
|
break;
|
|
1050
1058
|
case 2:
|
|
1051
1059
|
var value = (
|
|
@@ -1082,7 +1090,7 @@ var require_avs_pb = __commonJS({
|
|
|
1082
1090
|
};
|
|
1083
1091
|
proto.aggregator.TokenMetadata.serializeBinaryToWriter = function(message, writer) {
|
|
1084
1092
|
var f = void 0;
|
|
1085
|
-
f = message.
|
|
1093
|
+
f = message.getId();
|
|
1086
1094
|
if (f.length > 0) {
|
|
1087
1095
|
writer.writeString(
|
|
1088
1096
|
1,
|
|
@@ -1111,13 +1119,13 @@ var require_avs_pb = __commonJS({
|
|
|
1111
1119
|
);
|
|
1112
1120
|
}
|
|
1113
1121
|
};
|
|
1114
|
-
proto.aggregator.TokenMetadata.prototype.
|
|
1122
|
+
proto.aggregator.TokenMetadata.prototype.getId = function() {
|
|
1115
1123
|
return (
|
|
1116
1124
|
/** @type {string} */
|
|
1117
1125
|
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
1118
1126
|
);
|
|
1119
1127
|
};
|
|
1120
|
-
proto.aggregator.TokenMetadata.prototype.
|
|
1128
|
+
proto.aggregator.TokenMetadata.prototype.setId = function(value) {
|
|
1121
1129
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
1122
1130
|
};
|
|
1123
1131
|
proto.aggregator.TokenMetadata.prototype.getName = function() {
|
|
@@ -10870,10 +10878,10 @@ var require_avs_pb = __commonJS({
|
|
|
10870
10878
|
factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
10871
10879
|
isHidden: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
|
10872
10880
|
totalTaskCount: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
10873
|
-
|
|
10881
|
+
enabledTaskCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
|
|
10874
10882
|
completedTaskCount: jspb.Message.getFieldWithDefault(msg, 7, 0),
|
|
10875
10883
|
failedTaskCount: jspb.Message.getFieldWithDefault(msg, 8, 0),
|
|
10876
|
-
|
|
10884
|
+
disabledTaskCount: jspb.Message.getFieldWithDefault(msg, 9, 0)
|
|
10877
10885
|
};
|
|
10878
10886
|
if (includeInstance) {
|
|
10879
10887
|
obj.$jspbMessageInstance = msg;
|
|
@@ -10933,7 +10941,7 @@ var require_avs_pb = __commonJS({
|
|
|
10933
10941
|
/** @type {number} */
|
|
10934
10942
|
reader.readUint64()
|
|
10935
10943
|
);
|
|
10936
|
-
msg.
|
|
10944
|
+
msg.setEnabledTaskCount(value);
|
|
10937
10945
|
break;
|
|
10938
10946
|
case 7:
|
|
10939
10947
|
var value = (
|
|
@@ -10954,7 +10962,7 @@ var require_avs_pb = __commonJS({
|
|
|
10954
10962
|
/** @type {number} */
|
|
10955
10963
|
reader.readUint64()
|
|
10956
10964
|
);
|
|
10957
|
-
msg.
|
|
10965
|
+
msg.setDisabledTaskCount(value);
|
|
10958
10966
|
break;
|
|
10959
10967
|
default:
|
|
10960
10968
|
reader.skipField();
|
|
@@ -11005,7 +11013,7 @@ var require_avs_pb = __commonJS({
|
|
|
11005
11013
|
f
|
|
11006
11014
|
);
|
|
11007
11015
|
}
|
|
11008
|
-
f = message.
|
|
11016
|
+
f = message.getEnabledTaskCount();
|
|
11009
11017
|
if (f !== 0) {
|
|
11010
11018
|
writer.writeUint64(
|
|
11011
11019
|
6,
|
|
@@ -11026,7 +11034,7 @@ var require_avs_pb = __commonJS({
|
|
|
11026
11034
|
f
|
|
11027
11035
|
);
|
|
11028
11036
|
}
|
|
11029
|
-
f = message.
|
|
11037
|
+
f = message.getDisabledTaskCount();
|
|
11030
11038
|
if (f !== 0) {
|
|
11031
11039
|
writer.writeUint64(
|
|
11032
11040
|
9,
|
|
@@ -11079,13 +11087,13 @@ var require_avs_pb = __commonJS({
|
|
|
11079
11087
|
proto.aggregator.GetWalletResp.prototype.setTotalTaskCount = function(value) {
|
|
11080
11088
|
return jspb.Message.setProto3IntField(this, 5, value);
|
|
11081
11089
|
};
|
|
11082
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11090
|
+
proto.aggregator.GetWalletResp.prototype.getEnabledTaskCount = function() {
|
|
11083
11091
|
return (
|
|
11084
11092
|
/** @type {number} */
|
|
11085
11093
|
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
11086
11094
|
);
|
|
11087
11095
|
};
|
|
11088
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11096
|
+
proto.aggregator.GetWalletResp.prototype.setEnabledTaskCount = function(value) {
|
|
11089
11097
|
return jspb.Message.setProto3IntField(this, 6, value);
|
|
11090
11098
|
};
|
|
11091
11099
|
proto.aggregator.GetWalletResp.prototype.getCompletedTaskCount = function() {
|
|
@@ -11106,13 +11114,13 @@ var require_avs_pb = __commonJS({
|
|
|
11106
11114
|
proto.aggregator.GetWalletResp.prototype.setFailedTaskCount = function(value) {
|
|
11107
11115
|
return jspb.Message.setProto3IntField(this, 8, value);
|
|
11108
11116
|
};
|
|
11109
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11117
|
+
proto.aggregator.GetWalletResp.prototype.getDisabledTaskCount = function() {
|
|
11110
11118
|
return (
|
|
11111
11119
|
/** @type {number} */
|
|
11112
11120
|
jspb.Message.getFieldWithDefault(this, 9, 0)
|
|
11113
11121
|
);
|
|
11114
11122
|
};
|
|
11115
|
-
proto.aggregator.GetWalletResp.prototype.
|
|
11123
|
+
proto.aggregator.GetWalletResp.prototype.setDisabledTaskCount = function(value) {
|
|
11116
11124
|
return jspb.Message.setProto3IntField(this, 9, value);
|
|
11117
11125
|
};
|
|
11118
11126
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -13972,17 +13980,105 @@ var require_avs_pb = __commonJS({
|
|
|
13972
13980
|
return jspb.Message.setProto3StringField(this, 6, value);
|
|
13973
13981
|
};
|
|
13974
13982
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
13975
|
-
proto.aggregator.
|
|
13976
|
-
return proto.aggregator.
|
|
13983
|
+
proto.aggregator.SetTaskEnabledReq.prototype.toObject = function(opt_includeInstance) {
|
|
13984
|
+
return proto.aggregator.SetTaskEnabledReq.toObject(opt_includeInstance, this);
|
|
13977
13985
|
};
|
|
13978
|
-
proto.aggregator.
|
|
13986
|
+
proto.aggregator.SetTaskEnabledReq.toObject = function(includeInstance, msg) {
|
|
13987
|
+
var f, obj = {
|
|
13988
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
13989
|
+
enabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
|
|
13990
|
+
};
|
|
13991
|
+
if (includeInstance) {
|
|
13992
|
+
obj.$jspbMessageInstance = msg;
|
|
13993
|
+
}
|
|
13994
|
+
return obj;
|
|
13995
|
+
};
|
|
13996
|
+
}
|
|
13997
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinary = function(bytes) {
|
|
13998
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
13999
|
+
var msg = new proto.aggregator.SetTaskEnabledReq();
|
|
14000
|
+
return proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader(msg, reader);
|
|
14001
|
+
};
|
|
14002
|
+
proto.aggregator.SetTaskEnabledReq.deserializeBinaryFromReader = function(msg, reader) {
|
|
14003
|
+
while (reader.nextField()) {
|
|
14004
|
+
if (reader.isEndGroup()) {
|
|
14005
|
+
break;
|
|
14006
|
+
}
|
|
14007
|
+
var field = reader.getFieldNumber();
|
|
14008
|
+
switch (field) {
|
|
14009
|
+
case 1:
|
|
14010
|
+
var value = (
|
|
14011
|
+
/** @type {string} */
|
|
14012
|
+
reader.readString()
|
|
14013
|
+
);
|
|
14014
|
+
msg.setId(value);
|
|
14015
|
+
break;
|
|
14016
|
+
case 2:
|
|
14017
|
+
var value = (
|
|
14018
|
+
/** @type {boolean} */
|
|
14019
|
+
reader.readBool()
|
|
14020
|
+
);
|
|
14021
|
+
msg.setEnabled(value);
|
|
14022
|
+
break;
|
|
14023
|
+
default:
|
|
14024
|
+
reader.skipField();
|
|
14025
|
+
break;
|
|
14026
|
+
}
|
|
14027
|
+
}
|
|
14028
|
+
return msg;
|
|
14029
|
+
};
|
|
14030
|
+
proto.aggregator.SetTaskEnabledReq.prototype.serializeBinary = function() {
|
|
14031
|
+
var writer = new jspb.BinaryWriter();
|
|
14032
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter(this, writer);
|
|
14033
|
+
return writer.getResultBuffer();
|
|
14034
|
+
};
|
|
14035
|
+
proto.aggregator.SetTaskEnabledReq.serializeBinaryToWriter = function(message, writer) {
|
|
14036
|
+
var f = void 0;
|
|
14037
|
+
f = message.getId();
|
|
14038
|
+
if (f.length > 0) {
|
|
14039
|
+
writer.writeString(
|
|
14040
|
+
1,
|
|
14041
|
+
f
|
|
14042
|
+
);
|
|
14043
|
+
}
|
|
14044
|
+
f = message.getEnabled();
|
|
14045
|
+
if (f) {
|
|
14046
|
+
writer.writeBool(
|
|
14047
|
+
2,
|
|
14048
|
+
f
|
|
14049
|
+
);
|
|
14050
|
+
}
|
|
14051
|
+
};
|
|
14052
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getId = function() {
|
|
14053
|
+
return (
|
|
14054
|
+
/** @type {string} */
|
|
14055
|
+
jspb.Message.getFieldWithDefault(this, 1, "")
|
|
14056
|
+
);
|
|
14057
|
+
};
|
|
14058
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setId = function(value) {
|
|
14059
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
14060
|
+
};
|
|
14061
|
+
proto.aggregator.SetTaskEnabledReq.prototype.getEnabled = function() {
|
|
14062
|
+
return (
|
|
14063
|
+
/** @type {boolean} */
|
|
14064
|
+
jspb.Message.getBooleanFieldWithDefault(this, 2, false)
|
|
14065
|
+
);
|
|
14066
|
+
};
|
|
14067
|
+
proto.aggregator.SetTaskEnabledReq.prototype.setEnabled = function(value) {
|
|
14068
|
+
return jspb.Message.setProto3BooleanField(this, 2, value);
|
|
14069
|
+
};
|
|
14070
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
14071
|
+
proto.aggregator.SetTaskEnabledResp.prototype.toObject = function(opt_includeInstance) {
|
|
14072
|
+
return proto.aggregator.SetTaskEnabledResp.toObject(opt_includeInstance, this);
|
|
14073
|
+
};
|
|
14074
|
+
proto.aggregator.SetTaskEnabledResp.toObject = function(includeInstance, msg) {
|
|
13979
14075
|
var f, obj = {
|
|
13980
14076
|
success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
13981
14077
|
status: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
13982
14078
|
message: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
14079
|
+
id: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
14080
|
+
previousStatus: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
14081
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0)
|
|
13986
14082
|
};
|
|
13987
14083
|
if (includeInstance) {
|
|
13988
14084
|
obj.$jspbMessageInstance = msg;
|
|
@@ -13990,12 +14086,12 @@ var require_avs_pb = __commonJS({
|
|
|
13990
14086
|
return obj;
|
|
13991
14087
|
};
|
|
13992
14088
|
}
|
|
13993
|
-
proto.aggregator.
|
|
14089
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinary = function(bytes) {
|
|
13994
14090
|
var reader = new jspb.BinaryReader(bytes);
|
|
13995
|
-
var msg = new proto.aggregator.
|
|
13996
|
-
return proto.aggregator.
|
|
14091
|
+
var msg = new proto.aggregator.SetTaskEnabledResp();
|
|
14092
|
+
return proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader(msg, reader);
|
|
13997
14093
|
};
|
|
13998
|
-
proto.aggregator.
|
|
14094
|
+
proto.aggregator.SetTaskEnabledResp.deserializeBinaryFromReader = function(msg, reader) {
|
|
13999
14095
|
while (reader.nextField()) {
|
|
14000
14096
|
if (reader.isEndGroup()) {
|
|
14001
14097
|
break;
|
|
@@ -14025,24 +14121,24 @@ var require_avs_pb = __commonJS({
|
|
|
14025
14121
|
break;
|
|
14026
14122
|
case 4:
|
|
14027
14123
|
var value = (
|
|
14028
|
-
/** @type {
|
|
14029
|
-
reader.
|
|
14124
|
+
/** @type {string} */
|
|
14125
|
+
reader.readString()
|
|
14030
14126
|
);
|
|
14031
|
-
msg.
|
|
14127
|
+
msg.setId(value);
|
|
14032
14128
|
break;
|
|
14033
14129
|
case 5:
|
|
14034
14130
|
var value = (
|
|
14035
14131
|
/** @type {string} */
|
|
14036
14132
|
reader.readString()
|
|
14037
14133
|
);
|
|
14038
|
-
msg.
|
|
14134
|
+
msg.setPreviousStatus(value);
|
|
14039
14135
|
break;
|
|
14040
14136
|
case 6:
|
|
14041
14137
|
var value = (
|
|
14042
|
-
/** @type {
|
|
14043
|
-
reader.
|
|
14138
|
+
/** @type {number} */
|
|
14139
|
+
reader.readInt64()
|
|
14044
14140
|
);
|
|
14045
|
-
msg.
|
|
14141
|
+
msg.setUpdatedAt(value);
|
|
14046
14142
|
break;
|
|
14047
14143
|
default:
|
|
14048
14144
|
reader.skipField();
|
|
@@ -14051,12 +14147,12 @@ var require_avs_pb = __commonJS({
|
|
|
14051
14147
|
}
|
|
14052
14148
|
return msg;
|
|
14053
14149
|
};
|
|
14054
|
-
proto.aggregator.
|
|
14150
|
+
proto.aggregator.SetTaskEnabledResp.prototype.serializeBinary = function() {
|
|
14055
14151
|
var writer = new jspb.BinaryWriter();
|
|
14056
|
-
proto.aggregator.
|
|
14152
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter(this, writer);
|
|
14057
14153
|
return writer.getResultBuffer();
|
|
14058
14154
|
};
|
|
14059
|
-
proto.aggregator.
|
|
14155
|
+
proto.aggregator.SetTaskEnabledResp.serializeBinaryToWriter = function(message, writer) {
|
|
14060
14156
|
var f = void 0;
|
|
14061
14157
|
f = message.getSuccess();
|
|
14062
14158
|
if (f) {
|
|
@@ -14079,81 +14175,81 @@ var require_avs_pb = __commonJS({
|
|
|
14079
14175
|
f
|
|
14080
14176
|
);
|
|
14081
14177
|
}
|
|
14082
|
-
f = message.
|
|
14083
|
-
if (f
|
|
14084
|
-
writer.
|
|
14178
|
+
f = message.getId();
|
|
14179
|
+
if (f.length > 0) {
|
|
14180
|
+
writer.writeString(
|
|
14085
14181
|
4,
|
|
14086
14182
|
f
|
|
14087
14183
|
);
|
|
14088
14184
|
}
|
|
14089
|
-
f = message.
|
|
14185
|
+
f = message.getPreviousStatus();
|
|
14090
14186
|
if (f.length > 0) {
|
|
14091
14187
|
writer.writeString(
|
|
14092
14188
|
5,
|
|
14093
14189
|
f
|
|
14094
14190
|
);
|
|
14095
14191
|
}
|
|
14096
|
-
f = message.
|
|
14097
|
-
if (f
|
|
14098
|
-
writer.
|
|
14192
|
+
f = message.getUpdatedAt();
|
|
14193
|
+
if (f !== 0) {
|
|
14194
|
+
writer.writeInt64(
|
|
14099
14195
|
6,
|
|
14100
14196
|
f
|
|
14101
14197
|
);
|
|
14102
14198
|
}
|
|
14103
14199
|
};
|
|
14104
|
-
proto.aggregator.
|
|
14200
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getSuccess = function() {
|
|
14105
14201
|
return (
|
|
14106
14202
|
/** @type {boolean} */
|
|
14107
14203
|
jspb.Message.getBooleanFieldWithDefault(this, 1, false)
|
|
14108
14204
|
);
|
|
14109
14205
|
};
|
|
14110
|
-
proto.aggregator.
|
|
14206
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setSuccess = function(value) {
|
|
14111
14207
|
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
14112
14208
|
};
|
|
14113
|
-
proto.aggregator.
|
|
14209
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getStatus = function() {
|
|
14114
14210
|
return (
|
|
14115
14211
|
/** @type {string} */
|
|
14116
14212
|
jspb.Message.getFieldWithDefault(this, 2, "")
|
|
14117
14213
|
);
|
|
14118
14214
|
};
|
|
14119
|
-
proto.aggregator.
|
|
14215
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setStatus = function(value) {
|
|
14120
14216
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
14121
14217
|
};
|
|
14122
|
-
proto.aggregator.
|
|
14218
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getMessage = function() {
|
|
14123
14219
|
return (
|
|
14124
14220
|
/** @type {string} */
|
|
14125
14221
|
jspb.Message.getFieldWithDefault(this, 3, "")
|
|
14126
14222
|
);
|
|
14127
14223
|
};
|
|
14128
|
-
proto.aggregator.
|
|
14224
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setMessage = function(value) {
|
|
14129
14225
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
14130
14226
|
};
|
|
14131
|
-
proto.aggregator.
|
|
14227
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getId = function() {
|
|
14132
14228
|
return (
|
|
14133
|
-
/** @type {
|
|
14134
|
-
jspb.Message.getFieldWithDefault(this, 4,
|
|
14229
|
+
/** @type {string} */
|
|
14230
|
+
jspb.Message.getFieldWithDefault(this, 4, "")
|
|
14135
14231
|
);
|
|
14136
14232
|
};
|
|
14137
|
-
proto.aggregator.
|
|
14138
|
-
return jspb.Message.
|
|
14233
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setId = function(value) {
|
|
14234
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
14139
14235
|
};
|
|
14140
|
-
proto.aggregator.
|
|
14236
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getPreviousStatus = function() {
|
|
14141
14237
|
return (
|
|
14142
14238
|
/** @type {string} */
|
|
14143
14239
|
jspb.Message.getFieldWithDefault(this, 5, "")
|
|
14144
14240
|
);
|
|
14145
14241
|
};
|
|
14146
|
-
proto.aggregator.
|
|
14242
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setPreviousStatus = function(value) {
|
|
14147
14243
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
14148
14244
|
};
|
|
14149
|
-
proto.aggregator.
|
|
14245
|
+
proto.aggregator.SetTaskEnabledResp.prototype.getUpdatedAt = function() {
|
|
14150
14246
|
return (
|
|
14151
|
-
/** @type {
|
|
14152
|
-
jspb.Message.getFieldWithDefault(this, 6,
|
|
14247
|
+
/** @type {number} */
|
|
14248
|
+
jspb.Message.getFieldWithDefault(this, 6, 0)
|
|
14153
14249
|
);
|
|
14154
14250
|
};
|
|
14155
|
-
proto.aggregator.
|
|
14156
|
-
return jspb.Message.
|
|
14251
|
+
proto.aggregator.SetTaskEnabledResp.prototype.setUpdatedAt = function(value) {
|
|
14252
|
+
return jspb.Message.setProto3IntField(this, 6, value);
|
|
14157
14253
|
};
|
|
14158
14254
|
proto.aggregator.GetWorkflowCountReq.repeatedFields_ = [1];
|
|
14159
14255
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
@@ -17844,11 +17940,11 @@ var require_avs_pb = __commonJS({
|
|
|
17844
17940
|
INSUFFICIENT_BALANCE: 8003
|
|
17845
17941
|
};
|
|
17846
17942
|
proto.aggregator.TaskStatus = {
|
|
17847
|
-
|
|
17943
|
+
ENABLED: 0,
|
|
17848
17944
|
COMPLETED: 1,
|
|
17849
17945
|
FAILED: 2,
|
|
17850
|
-
|
|
17851
|
-
|
|
17946
|
+
RUNNING: 4,
|
|
17947
|
+
DISABLED: 5
|
|
17852
17948
|
};
|
|
17853
17949
|
proto.aggregator.ExecutionStatus = {
|
|
17854
17950
|
EXECUTION_STATUS_UNSPECIFIED: 0,
|
|
@@ -17868,15 +17964,6 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
17868
17964
|
var grpc = __require("@grpc/grpc-js");
|
|
17869
17965
|
var avs_pb25 = require_avs_pb();
|
|
17870
17966
|
var google_protobuf_struct_pb4 = __require("google-protobuf/google/protobuf/struct_pb.js");
|
|
17871
|
-
function serialize_aggregator_CancelTaskResp(arg) {
|
|
17872
|
-
if (!(arg instanceof avs_pb25.CancelTaskResp)) {
|
|
17873
|
-
throw new Error("Expected argument of type aggregator.CancelTaskResp");
|
|
17874
|
-
}
|
|
17875
|
-
return Buffer.from(arg.serializeBinary());
|
|
17876
|
-
}
|
|
17877
|
-
function deserialize_aggregator_CancelTaskResp(buffer_arg) {
|
|
17878
|
-
return avs_pb25.CancelTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
17879
|
-
}
|
|
17880
17967
|
function serialize_aggregator_CreateOrUpdateSecretReq(arg) {
|
|
17881
17968
|
if (!(arg instanceof avs_pb25.CreateOrUpdateSecretReq)) {
|
|
17882
17969
|
throw new Error("Expected argument of type aggregator.CreateOrUpdateSecretReq");
|
|
@@ -18246,6 +18333,24 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18246
18333
|
function deserialize_aggregator_RunTriggerResp(buffer_arg) {
|
|
18247
18334
|
return avs_pb25.RunTriggerResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18248
18335
|
}
|
|
18336
|
+
function serialize_aggregator_SetTaskEnabledReq(arg) {
|
|
18337
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledReq)) {
|
|
18338
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledReq");
|
|
18339
|
+
}
|
|
18340
|
+
return Buffer.from(arg.serializeBinary());
|
|
18341
|
+
}
|
|
18342
|
+
function deserialize_aggregator_SetTaskEnabledReq(buffer_arg) {
|
|
18343
|
+
return avs_pb25.SetTaskEnabledReq.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18344
|
+
}
|
|
18345
|
+
function serialize_aggregator_SetTaskEnabledResp(arg) {
|
|
18346
|
+
if (!(arg instanceof avs_pb25.SetTaskEnabledResp)) {
|
|
18347
|
+
throw new Error("Expected argument of type aggregator.SetTaskEnabledResp");
|
|
18348
|
+
}
|
|
18349
|
+
return Buffer.from(arg.serializeBinary());
|
|
18350
|
+
}
|
|
18351
|
+
function deserialize_aggregator_SetTaskEnabledResp(buffer_arg) {
|
|
18352
|
+
return avs_pb25.SetTaskEnabledResp.deserializeBinary(new Uint8Array(buffer_arg));
|
|
18353
|
+
}
|
|
18249
18354
|
function serialize_aggregator_SetWalletReq(arg) {
|
|
18250
18355
|
if (!(arg instanceof avs_pb25.SetWalletReq)) {
|
|
18251
18356
|
throw new Error("Expected argument of type aggregator.SetWalletReq");
|
|
@@ -18467,16 +18572,16 @@ var require_avs_grpc_pb = __commonJS({
|
|
|
18467
18572
|
responseSerialize: serialize_aggregator_ExecutionStatusResp,
|
|
18468
18573
|
responseDeserialize: deserialize_aggregator_ExecutionStatusResp
|
|
18469
18574
|
},
|
|
18470
|
-
|
|
18471
|
-
path: "/aggregator.Aggregator/
|
|
18575
|
+
setTaskEnabled: {
|
|
18576
|
+
path: "/aggregator.Aggregator/SetTaskEnabled",
|
|
18472
18577
|
requestStream: false,
|
|
18473
18578
|
responseStream: false,
|
|
18474
|
-
requestType: avs_pb25.
|
|
18475
|
-
responseType: avs_pb25.
|
|
18476
|
-
requestSerialize:
|
|
18477
|
-
requestDeserialize:
|
|
18478
|
-
responseSerialize:
|
|
18479
|
-
responseDeserialize:
|
|
18579
|
+
requestType: avs_pb25.SetTaskEnabledReq,
|
|
18580
|
+
responseType: avs_pb25.SetTaskEnabledResp,
|
|
18581
|
+
requestSerialize: serialize_aggregator_SetTaskEnabledReq,
|
|
18582
|
+
requestDeserialize: deserialize_aggregator_SetTaskEnabledReq,
|
|
18583
|
+
responseSerialize: serialize_aggregator_SetTaskEnabledResp,
|
|
18584
|
+
responseDeserialize: deserialize_aggregator_SetTaskEnabledResp
|
|
18480
18585
|
},
|
|
18481
18586
|
deleteTask: {
|
|
18482
18587
|
path: "/aggregator.Aggregator/DeleteTask",
|
|
@@ -20503,14 +20608,21 @@ var factory_default2 = NodeFactory;
|
|
|
20503
20608
|
// src/models/workflow.ts
|
|
20504
20609
|
import { WorkflowStatus } from "@avaprotocol/types";
|
|
20505
20610
|
function convertStatusToString(status2) {
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20510
|
-
|
|
20511
|
-
|
|
20512
|
-
|
|
20513
|
-
|
|
20611
|
+
switch (status2) {
|
|
20612
|
+
case avs_pb20.TaskStatus.ENABLED:
|
|
20613
|
+
return WorkflowStatus.Enabled;
|
|
20614
|
+
case avs_pb20.TaskStatus.COMPLETED:
|
|
20615
|
+
return WorkflowStatus.Completed;
|
|
20616
|
+
case avs_pb20.TaskStatus.FAILED:
|
|
20617
|
+
return WorkflowStatus.Failed;
|
|
20618
|
+
case avs_pb20.TaskStatus.RUNNING:
|
|
20619
|
+
return WorkflowStatus.Running;
|
|
20620
|
+
case avs_pb20.TaskStatus.DISABLED:
|
|
20621
|
+
return WorkflowStatus.Disabled;
|
|
20622
|
+
default: {
|
|
20623
|
+
throw new Error(`Unknown TaskStatus: ${status2}`);
|
|
20624
|
+
}
|
|
20625
|
+
}
|
|
20514
20626
|
}
|
|
20515
20627
|
var Workflow = class _Workflow {
|
|
20516
20628
|
/**
|
|
@@ -21274,12 +21386,17 @@ var Client = class extends BaseClient {
|
|
|
21274
21386
|
/**
|
|
21275
21387
|
* Get the list of smart wallets; new wallets can be added to the list by calling `getWallet`
|
|
21276
21388
|
* @param {RequestOptions} options - Request options
|
|
21277
|
-
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects
|
|
21389
|
+
* @returns {Promise<SmartWallet[]>} - The list of SmartWallet objects, sorted by salt
|
|
21278
21390
|
*/
|
|
21279
21391
|
async getWallets(options) {
|
|
21280
21392
|
const request = new avs_pb24.ListWalletReq();
|
|
21281
21393
|
const result = await this.sendGrpcRequest("listWallets", request, options);
|
|
21282
|
-
|
|
21394
|
+
const wallets = result.getItemsList().map((item) => item.toObject());
|
|
21395
|
+
return wallets.sort((a, b) => {
|
|
21396
|
+
const saltA = a.salt || "";
|
|
21397
|
+
const saltB = b.salt || "";
|
|
21398
|
+
return saltA.localeCompare(saltB);
|
|
21399
|
+
});
|
|
21283
21400
|
}
|
|
21284
21401
|
/**
|
|
21285
21402
|
* Add a new smart wallet address to the wallet list
|
|
@@ -21303,10 +21420,10 @@ var Client = class extends BaseClient {
|
|
|
21303
21420
|
factory: result.getFactoryAddress(),
|
|
21304
21421
|
isHidden: result.getIsHidden(),
|
|
21305
21422
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21306
|
-
|
|
21423
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21307
21424
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21308
21425
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21309
|
-
|
|
21426
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21310
21427
|
};
|
|
21311
21428
|
}
|
|
21312
21429
|
/**
|
|
@@ -21333,17 +21450,17 @@ var Client = class extends BaseClient {
|
|
|
21333
21450
|
factory: result.getFactoryAddress(),
|
|
21334
21451
|
isHidden: result.getIsHidden(),
|
|
21335
21452
|
totalTaskCount: result.getTotalTaskCount(),
|
|
21336
|
-
|
|
21453
|
+
enabledTaskCount: result.getEnabledTaskCount(),
|
|
21337
21454
|
completedTaskCount: result.getCompletedTaskCount(),
|
|
21338
21455
|
failedTaskCount: result.getFailedTaskCount(),
|
|
21339
|
-
|
|
21456
|
+
disabledTaskCount: result.getDisabledTaskCount()
|
|
21340
21457
|
};
|
|
21341
21458
|
}
|
|
21342
21459
|
/**
|
|
21343
21460
|
* Withdraw funds from a smart wallet using UserOp
|
|
21344
21461
|
* @param {WithdrawFundsRequest} withdrawRequest - The withdraw request parameters
|
|
21345
21462
|
* @param {string} withdrawRequest.recipientAddress - The recipient address to send funds to
|
|
21346
|
-
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20
|
|
21463
|
+
* @param {string} withdrawRequest.amount - The amount to withdraw in wei for ETH or smallest token unit for ERC20. Use "max" to withdraw maximum available balance
|
|
21347
21464
|
* @param {string} withdrawRequest.token - Token type: "ETH" for native ETH, or contract address for ERC20 tokens
|
|
21348
21465
|
* @param {string} withdrawRequest.smartWalletAddress - Required: Smart wallet address to withdraw from (must be from user's getWallet() call)
|
|
21349
21466
|
* @param {RequestOptions} options - Request options
|
|
@@ -21706,20 +21823,22 @@ var Client = class extends BaseClient {
|
|
|
21706
21823
|
return response;
|
|
21707
21824
|
}
|
|
21708
21825
|
/**
|
|
21709
|
-
*
|
|
21826
|
+
* Set workflow active state (activate/deactivate)
|
|
21710
21827
|
* @param {string} id - The workflow id
|
|
21828
|
+
* @param {boolean} enabled - Desired enabled state (true=enable, false=disable)
|
|
21711
21829
|
* @param {RequestOptions} options - Request options
|
|
21712
|
-
* @returns {Promise<
|
|
21830
|
+
* @returns {Promise<SetTaskEnabledResponse>} - The response from updating the workflow state
|
|
21713
21831
|
*/
|
|
21714
|
-
async
|
|
21715
|
-
const request = new avs_pb24.
|
|
21832
|
+
async setWorkflowEnabled(id, enabled, options) {
|
|
21833
|
+
const request = new avs_pb24.SetTaskEnabledReq();
|
|
21716
21834
|
request.setId(id);
|
|
21717
|
-
|
|
21835
|
+
request.setEnabled(enabled);
|
|
21836
|
+
const result = await this.sendGrpcRequest("setTaskEnabled", request, options);
|
|
21718
21837
|
return {
|
|
21719
21838
|
success: result.getSuccess(),
|
|
21720
21839
|
status: result.getStatus(),
|
|
21721
21840
|
message: result.getMessage(),
|
|
21722
|
-
|
|
21841
|
+
updatedAt: result.getUpdatedAt() || void 0,
|
|
21723
21842
|
id: result.getId(),
|
|
21724
21843
|
previousStatus: result.getPreviousStatus()
|
|
21725
21844
|
};
|
|
@@ -21993,7 +22112,7 @@ var Client = class extends BaseClient {
|
|
|
21993
22112
|
const token = result.getToken();
|
|
21994
22113
|
return {
|
|
21995
22114
|
token: token ? {
|
|
21996
|
-
|
|
22115
|
+
id: token.getId()?.toLowerCase(),
|
|
21997
22116
|
name: token.getName(),
|
|
21998
22117
|
symbol: token.getSymbol(),
|
|
21999
22118
|
decimals: token.getDecimals()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/models/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAInF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,UAAU,GACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/models/workflow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAInF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,CAAC,UAAU,GACxB,cAAc,CAgBhB;AAED,cAAM,QAAS,YAAW,aAAa;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IAGrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;gBACS,KAAK,EAAE,aAAa;IAwBhC;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IA4C/C;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,QAAQ;IAmCnD,SAAS,IAAI,MAAM,CAAC,aAAa;IA8DjC;;;OAGG;IACH,MAAM,IAAI,aAAa;CAmBxB;AAED,eAAe,QAAQ,CAAC"}
|