@avaprotocol/sdk-js 0.6.11 → 0.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -33,15 +33,27 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
33
33
  // grpc_codegen/avs_pb.js
34
34
  var avs_pb_exports = {};
35
35
  __export(avs_pb_exports, {
36
+ ActionType: () => ActionType,
37
+ AddressRequest: () => AddressRequest,
38
+ AddressResp: () => AddressResp,
39
+ ContractExecution: () => ContractExecution,
36
40
  CreateTaskReq: () => CreateTaskReq,
37
41
  CreateTaskResp: () => CreateTaskResp,
42
+ ExpressionCondition: () => ExpressionCondition,
38
43
  GetKeyReq: () => GetKeyReq,
39
44
  KeyResp: () => KeyResp,
45
+ ListTasksReq: () => ListTasksReq,
46
+ ListTasksResp: () => ListTasksResp,
40
47
  Task: () => Task,
48
+ TaskAction: () => TaskAction,
49
+ TaskTrigger: () => TaskTrigger,
50
+ TaskType: () => TaskType,
51
+ TriggerType: () => TriggerType,
52
+ UUID: () => UUID,
41
53
  UpdateChecksReq: () => UpdateChecksReq,
42
54
  UpdateChecksResp: () => UpdateChecksResp
43
55
  });
44
- var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp;
56
+ var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest, ListTasksReq, ListTasksResp, TaskTrigger, TriggerType, ExpressionCondition, TaskAction, ActionType, ContractExecution, TaskType, UUID;
45
57
  var init_avs_pb = __esm({
46
58
  "grpc_codegen/avs_pb.js"() {
47
59
  "use strict";
@@ -146,7 +158,14 @@ var init_avs_pb = __esm({
146
158
  proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger";
147
159
  }
148
160
  proto.aggregator.TimeCondition = function(opt_data) {
149
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TimeCondition.repeatedFields_, null);
161
+ jspb.Message.initialize(
162
+ this,
163
+ opt_data,
164
+ 0,
165
+ -1,
166
+ proto.aggregator.TimeCondition.repeatedFields_,
167
+ null
168
+ );
150
169
  };
151
170
  goog.inherits(proto.aggregator.TimeCondition, jspb.Message);
152
171
  if (goog.DEBUG && !COMPILED) {
@@ -216,14 +235,28 @@ var init_avs_pb = __esm({
216
235
  proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump";
217
236
  }
218
237
  proto.aggregator.BranchAction = function(opt_data) {
219
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchAction.repeatedFields_, null);
238
+ jspb.Message.initialize(
239
+ this,
240
+ opt_data,
241
+ 0,
242
+ -1,
243
+ proto.aggregator.BranchAction.repeatedFields_,
244
+ null
245
+ );
220
246
  };
221
247
  goog.inherits(proto.aggregator.BranchAction, jspb.Message);
222
248
  if (goog.DEBUG && !COMPILED) {
223
249
  proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction";
224
250
  }
225
251
  proto.aggregator.TaskAction = function(opt_data) {
226
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TaskAction.repeatedFields_, null);
252
+ jspb.Message.initialize(
253
+ this,
254
+ opt_data,
255
+ 0,
256
+ -1,
257
+ proto.aggregator.TaskAction.repeatedFields_,
258
+ null
259
+ );
227
260
  };
228
261
  goog.inherits(proto.aggregator.TaskAction, jspb.Message);
229
262
  if (goog.DEBUG && !COMPILED) {
@@ -237,14 +270,28 @@ var init_avs_pb = __esm({
237
270
  proto.aggregator.Execution.displayName = "proto.aggregator.Execution";
238
271
  }
239
272
  proto.aggregator.Task = function(opt_data) {
240
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null);
273
+ jspb.Message.initialize(
274
+ this,
275
+ opt_data,
276
+ 0,
277
+ -1,
278
+ proto.aggregator.Task.repeatedFields_,
279
+ null
280
+ );
241
281
  };
242
282
  goog.inherits(proto.aggregator.Task, jspb.Message);
243
283
  if (goog.DEBUG && !COMPILED) {
244
284
  proto.aggregator.Task.displayName = "proto.aggregator.Task";
245
285
  }
246
286
  proto.aggregator.CreateTaskReq = function(opt_data) {
247
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null);
287
+ jspb.Message.initialize(
288
+ this,
289
+ opt_data,
290
+ 0,
291
+ -1,
292
+ proto.aggregator.CreateTaskReq.repeatedFields_,
293
+ null
294
+ );
248
295
  };
249
296
  goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message);
250
297
  if (goog.DEBUG && !COMPILED) {
@@ -293,7 +340,14 @@ var init_avs_pb = __esm({
293
340
  proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq";
294
341
  }
295
342
  proto.aggregator.ListTasksResp = function(opt_data) {
296
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null);
343
+ jspb.Message.initialize(
344
+ this,
345
+ opt_data,
346
+ 0,
347
+ -1,
348
+ proto.aggregator.ListTasksResp.repeatedFields_,
349
+ null
350
+ );
297
351
  };
298
352
  goog.inherits(proto.aggregator.ListTasksResp, jspb.Message);
299
353
  if (goog.DEBUG && !COMPILED) {
@@ -321,7 +375,14 @@ var init_avs_pb = __esm({
321
375
  proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp";
322
376
  }
323
377
  proto.aggregator.UpdateChecksReq = function(opt_data) {
324
- jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null);
378
+ jspb.Message.initialize(
379
+ this,
380
+ opt_data,
381
+ 0,
382
+ -1,
383
+ proto.aggregator.UpdateChecksReq.repeatedFields_,
384
+ null
385
+ );
325
386
  };
326
387
  goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message);
327
388
  if (goog.DEBUG && !COMPILED) {
@@ -383,10 +444,7 @@ var init_avs_pb = __esm({
383
444
  var f = void 0;
384
445
  f = message.getBytes();
385
446
  if (f.length > 0) {
386
- writer.writeString(
387
- 1,
388
- f
389
- );
447
+ writer.writeString(1, f);
390
448
  }
391
449
  };
392
450
  proto.aggregator.UUID.prototype.getBytes = function() {
@@ -453,7 +511,10 @@ var init_avs_pb = __esm({
453
511
  break;
454
512
  case 4:
455
513
  var value = new proto.aggregator.Checkin.Status();
456
- reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader);
514
+ reader.readMessage(
515
+ value,
516
+ proto.aggregator.Checkin.Status.deserializeBinaryFromReader
517
+ );
457
518
  msg.setStatus(value);
458
519
  break;
459
520
  case 5:
@@ -493,24 +554,15 @@ var init_avs_pb = __esm({
493
554
  var f = void 0;
494
555
  f = message.getId();
495
556
  if (f.length > 0) {
496
- writer.writeString(
497
- 1,
498
- f
499
- );
557
+ writer.writeString(1, f);
500
558
  }
501
559
  f = message.getAddress();
502
560
  if (f.length > 0) {
503
- writer.writeString(
504
- 2,
505
- f
506
- );
561
+ writer.writeString(2, f);
507
562
  }
508
563
  f = message.getSignature();
509
564
  if (f.length > 0) {
510
- writer.writeString(
511
- 3,
512
- f
513
- );
565
+ writer.writeString(3, f);
514
566
  }
515
567
  f = message.getStatus();
516
568
  if (f != null) {
@@ -522,24 +574,15 @@ var init_avs_pb = __esm({
522
574
  }
523
575
  f = message.getVersion();
524
576
  if (f.length > 0) {
525
- writer.writeString(
526
- 5,
527
- f
528
- );
577
+ writer.writeString(5, f);
529
578
  }
530
579
  f = message.getMetricsport();
531
580
  if (f !== 0) {
532
- writer.writeInt32(
533
- 6,
534
- f
535
- );
581
+ writer.writeInt32(6, f);
536
582
  }
537
583
  f = message.getRemoteip();
538
584
  if (f.length > 0) {
539
- writer.writeString(
540
- 7,
541
- f
542
- );
585
+ writer.writeString(7, f);
543
586
  }
544
587
  };
545
588
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -561,7 +604,10 @@ var init_avs_pb = __esm({
561
604
  proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) {
562
605
  var reader = new jspb.BinaryReader(bytes);
563
606
  var msg = new proto.aggregator.Checkin.Status();
564
- return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader);
607
+ return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(
608
+ msg,
609
+ reader
610
+ );
565
611
  };
566
612
  proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) {
567
613
  while (reader.nextField()) {
@@ -586,7 +632,10 @@ var init_avs_pb = __esm({
586
632
  break;
587
633
  case 3:
588
634
  var value = new google_protobuf_timestamp_pb.Timestamp();
589
- reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
635
+ reader.readMessage(
636
+ value,
637
+ google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader
638
+ );
590
639
  msg.setLastHeartbeat(value);
591
640
  break;
592
641
  default:
@@ -605,17 +654,11 @@ var init_avs_pb = __esm({
605
654
  var f = void 0;
606
655
  f = message.getUptime();
607
656
  if (f !== 0) {
608
- writer.writeInt64(
609
- 1,
610
- f
611
- );
657
+ writer.writeInt64(1, f);
612
658
  }
613
659
  f = message.getQueuedepth();
614
660
  if (f !== 0) {
615
- writer.writeInt64(
616
- 2,
617
- f
618
- );
661
+ writer.writeInt64(2, f);
619
662
  }
620
663
  f = message.getLastHeartbeat();
621
664
  if (f != null) {
@@ -647,7 +690,11 @@ var init_avs_pb = __esm({
647
690
  proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() {
648
691
  return (
649
692
  /** @type{?proto.google.protobuf.Timestamp} */
650
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)
693
+ jspb.Message.getWrapperField(
694
+ this,
695
+ google_protobuf_timestamp_pb.Timestamp,
696
+ 3
697
+ )
651
698
  );
652
699
  };
653
700
  proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) {
@@ -756,7 +803,10 @@ var init_avs_pb = __esm({
756
803
  switch (field) {
757
804
  case 1:
758
805
  var value = new google_protobuf_timestamp_pb.Timestamp();
759
- reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
806
+ reader.readMessage(
807
+ value,
808
+ google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader
809
+ );
760
810
  msg.setUpdatedAt(value);
761
811
  break;
762
812
  default:
@@ -785,7 +835,11 @@ var init_avs_pb = __esm({
785
835
  proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() {
786
836
  return (
787
837
  /** @type{?proto.google.protobuf.Timestamp} */
788
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)
838
+ jspb.Message.getWrapperField(
839
+ this,
840
+ google_protobuf_timestamp_pb.Timestamp,
841
+ 1
842
+ )
789
843
  );
790
844
  };
791
845
  proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) {
@@ -870,31 +924,19 @@ var init_avs_pb = __esm({
870
924
  var f = void 0;
871
925
  f = message.getId();
872
926
  if (f.length > 0) {
873
- writer.writeString(
874
- 1,
875
- f
876
- );
927
+ writer.writeString(1, f);
877
928
  }
878
929
  f = message.getAddress();
879
930
  if (f.length > 0) {
880
- writer.writeString(
881
- 2,
882
- f
883
- );
931
+ writer.writeString(2, f);
884
932
  }
885
933
  f = message.getSignature();
886
934
  if (f.length > 0) {
887
- writer.writeString(
888
- 3,
889
- f
890
- );
935
+ writer.writeString(3, f);
891
936
  }
892
937
  f = message.getMonotonicClock();
893
938
  if (f !== 0) {
894
- writer.writeInt64(
895
- 4,
896
- f
897
- );
939
+ writer.writeInt64(4, f);
898
940
  }
899
941
  };
900
942
  proto.aggregator.SyncTasksReq.prototype.getId = function() {
@@ -971,17 +1013,26 @@ var init_avs_pb = __esm({
971
1013
  break;
972
1014
  case 2:
973
1015
  var value = new proto.aggregator.TimeCondition();
974
- reader.readMessage(value, proto.aggregator.TimeCondition.deserializeBinaryFromReader);
1016
+ reader.readMessage(
1017
+ value,
1018
+ proto.aggregator.TimeCondition.deserializeBinaryFromReader
1019
+ );
975
1020
  msg.setSchedule(value);
976
1021
  break;
977
1022
  case 3:
978
1023
  var value = new proto.aggregator.ContractQueryCondition();
979
- reader.readMessage(value, proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader);
1024
+ reader.readMessage(
1025
+ value,
1026
+ proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader
1027
+ );
980
1028
  msg.setContractQuery(value);
981
1029
  break;
982
1030
  case 4:
983
1031
  var value = new proto.aggregator.ExpressionCondition();
984
- reader.readMessage(value, proto.aggregator.ExpressionCondition.deserializeBinaryFromReader);
1032
+ reader.readMessage(
1033
+ value,
1034
+ proto.aggregator.ExpressionCondition.deserializeBinaryFromReader
1035
+ );
985
1036
  msg.setExpression(value);
986
1037
  break;
987
1038
  default:
@@ -1000,10 +1051,7 @@ var init_avs_pb = __esm({
1000
1051
  var f = void 0;
1001
1052
  f = message.getTriggerType();
1002
1053
  if (f !== 0) {
1003
- writer.writeEnum(
1004
- 1,
1005
- f
1006
- );
1054
+ writer.writeEnum(1, f);
1007
1055
  }
1008
1056
  f = message.getSchedule();
1009
1057
  if (f != null) {
@@ -1057,7 +1105,11 @@ var init_avs_pb = __esm({
1057
1105
  proto.aggregator.TaskTrigger.prototype.getContractQuery = function() {
1058
1106
  return (
1059
1107
  /** @type{?proto.aggregator.ContractQueryCondition} */
1060
- jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryCondition, 3)
1108
+ jspb.Message.getWrapperField(
1109
+ this,
1110
+ proto.aggregator.ContractQueryCondition,
1111
+ 3
1112
+ )
1061
1113
  );
1062
1114
  };
1063
1115
  proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) {
@@ -1103,7 +1155,10 @@ var init_avs_pb = __esm({
1103
1155
  proto.aggregator.TimeCondition.deserializeBinary = function(bytes) {
1104
1156
  var reader = new jspb.BinaryReader(bytes);
1105
1157
  var msg = new proto.aggregator.TimeCondition();
1106
- return proto.aggregator.TimeCondition.deserializeBinaryFromReader(msg, reader);
1158
+ return proto.aggregator.TimeCondition.deserializeBinaryFromReader(
1159
+ msg,
1160
+ reader
1161
+ );
1107
1162
  };
1108
1163
  proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) {
1109
1164
  while (reader.nextField()) {
@@ -1144,17 +1199,11 @@ var init_avs_pb = __esm({
1144
1199
  var f = void 0;
1145
1200
  f = message.getFixedList();
1146
1201
  if (f.length > 0) {
1147
- writer.writePackedInt64(
1148
- 1,
1149
- f
1150
- );
1202
+ writer.writePackedInt64(1, f);
1151
1203
  }
1152
1204
  f = message.getCron();
1153
1205
  if (f.length > 0) {
1154
- writer.writeString(
1155
- 2,
1156
- f
1157
- );
1206
+ writer.writeString(2, f);
1158
1207
  }
1159
1208
  };
1160
1209
  proto.aggregator.TimeCondition.prototype.getFixedList = function() {
@@ -1183,7 +1232,10 @@ var init_avs_pb = __esm({
1183
1232
  };
1184
1233
  if (jspb.Message.GENERATE_TO_OBJECT) {
1185
1234
  proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) {
1186
- return proto.aggregator.ContractQueryCondition.toObject(opt_includeInstance, this);
1235
+ return proto.aggregator.ContractQueryCondition.toObject(
1236
+ opt_includeInstance,
1237
+ this
1238
+ );
1187
1239
  };
1188
1240
  proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg) {
1189
1241
  var f, obj = {
@@ -1199,7 +1251,10 @@ var init_avs_pb = __esm({
1199
1251
  proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) {
1200
1252
  var reader = new jspb.BinaryReader(bytes);
1201
1253
  var msg = new proto.aggregator.ContractQueryCondition();
1202
- return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader(msg, reader);
1254
+ return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader(
1255
+ msg,
1256
+ reader
1257
+ );
1203
1258
  };
1204
1259
  proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) {
1205
1260
  while (reader.nextField()) {
@@ -1231,24 +1286,21 @@ var init_avs_pb = __esm({
1231
1286
  };
1232
1287
  proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() {
1233
1288
  var writer = new jspb.BinaryWriter();
1234
- proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(this, writer);
1289
+ proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(
1290
+ this,
1291
+ writer
1292
+ );
1235
1293
  return writer.getResultBuffer();
1236
1294
  };
1237
1295
  proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) {
1238
1296
  var f = void 0;
1239
1297
  f = message.getContractAddress();
1240
1298
  if (f.length > 0) {
1241
- writer.writeString(
1242
- 1,
1243
- f
1244
- );
1299
+ writer.writeString(1, f);
1245
1300
  }
1246
1301
  f = message.getCallmsg();
1247
1302
  if (f.length > 0) {
1248
- writer.writeString(
1249
- 2,
1250
- f
1251
- );
1303
+ writer.writeString(2, f);
1252
1304
  }
1253
1305
  };
1254
1306
  proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() {
@@ -1271,7 +1323,10 @@ var init_avs_pb = __esm({
1271
1323
  };
1272
1324
  if (jspb.Message.GENERATE_TO_OBJECT) {
1273
1325
  proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) {
1274
- return proto.aggregator.ExpressionCondition.toObject(opt_includeInstance, this);
1326
+ return proto.aggregator.ExpressionCondition.toObject(
1327
+ opt_includeInstance,
1328
+ this
1329
+ );
1275
1330
  };
1276
1331
  proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) {
1277
1332
  var f, obj = {
@@ -1286,7 +1341,10 @@ var init_avs_pb = __esm({
1286
1341
  proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) {
1287
1342
  var reader = new jspb.BinaryReader(bytes);
1288
1343
  var msg = new proto.aggregator.ExpressionCondition();
1289
- return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader(msg, reader);
1344
+ return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader(
1345
+ msg,
1346
+ reader
1347
+ );
1290
1348
  };
1291
1349
  proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) {
1292
1350
  while (reader.nextField()) {
@@ -1318,10 +1376,7 @@ var init_avs_pb = __esm({
1318
1376
  var f = void 0;
1319
1377
  f = message.getExpression();
1320
1378
  if (f.length > 0) {
1321
- writer.writeString(
1322
- 1,
1323
- f
1324
- );
1379
+ writer.writeString(1, f);
1325
1380
  }
1326
1381
  };
1327
1382
  proto.aggregator.ExpressionCondition.prototype.getExpression = function() {
@@ -1352,7 +1407,10 @@ var init_avs_pb = __esm({
1352
1407
  proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) {
1353
1408
  var reader = new jspb.BinaryReader(bytes);
1354
1409
  var msg = new proto.aggregator.SyncTasksResp();
1355
- return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader);
1410
+ return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(
1411
+ msg,
1412
+ reader
1413
+ );
1356
1414
  };
1357
1415
  proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) {
1358
1416
  while (reader.nextField()) {
@@ -1377,7 +1435,10 @@ var init_avs_pb = __esm({
1377
1435
  break;
1378
1436
  case 3:
1379
1437
  var value = new proto.aggregator.TaskTrigger();
1380
- reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader);
1438
+ reader.readMessage(
1439
+ value,
1440
+ proto.aggregator.TaskTrigger.deserializeBinaryFromReader
1441
+ );
1381
1442
  msg.setTrigger(value);
1382
1443
  break;
1383
1444
  default:
@@ -1396,17 +1457,11 @@ var init_avs_pb = __esm({
1396
1457
  var f = void 0;
1397
1458
  f = message.getId();
1398
1459
  if (f.length > 0) {
1399
- writer.writeString(
1400
- 1,
1401
- f
1402
- );
1460
+ writer.writeString(1, f);
1403
1461
  }
1404
1462
  f = message.getChecktype();
1405
1463
  if (f.length > 0) {
1406
- writer.writeString(
1407
- 2,
1408
- f
1409
- );
1464
+ writer.writeString(2, f);
1410
1465
  }
1411
1466
  f = message.getTrigger();
1412
1467
  if (f != null) {
@@ -1507,17 +1562,11 @@ var init_avs_pb = __esm({
1507
1562
  var f = void 0;
1508
1563
  f = message.getDestination();
1509
1564
  if (f.length > 0) {
1510
- writer.writeString(
1511
- 1,
1512
- f
1513
- );
1565
+ writer.writeString(1, f);
1514
1566
  }
1515
1567
  f = message.getAmount();
1516
1568
  if (f.length > 0) {
1517
- writer.writeString(
1518
- 2,
1519
- f
1520
- );
1569
+ writer.writeString(2, f);
1521
1570
  }
1522
1571
  };
1523
1572
  proto.aggregator.ETHTransfer.prototype.getDestination = function() {
@@ -1540,7 +1589,10 @@ var init_avs_pb = __esm({
1540
1589
  };
1541
1590
  if (jspb.Message.GENERATE_TO_OBJECT) {
1542
1591
  proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) {
1543
- return proto.aggregator.ContractExecution.toObject(opt_includeInstance, this);
1592
+ return proto.aggregator.ContractExecution.toObject(
1593
+ opt_includeInstance,
1594
+ this
1595
+ );
1544
1596
  };
1545
1597
  proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) {
1546
1598
  var f, obj = {
@@ -1558,7 +1610,10 @@ var init_avs_pb = __esm({
1558
1610
  proto.aggregator.ContractExecution.deserializeBinary = function(bytes) {
1559
1611
  var reader = new jspb.BinaryReader(bytes);
1560
1612
  var msg = new proto.aggregator.ContractExecution();
1561
- return proto.aggregator.ContractExecution.deserializeBinaryFromReader(msg, reader);
1613
+ return proto.aggregator.ContractExecution.deserializeBinaryFromReader(
1614
+ msg,
1615
+ reader
1616
+ );
1562
1617
  };
1563
1618
  proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) {
1564
1619
  while (reader.nextField()) {
@@ -1611,31 +1666,19 @@ var init_avs_pb = __esm({
1611
1666
  var f = void 0;
1612
1667
  f = message.getContractAddress();
1613
1668
  if (f.length > 0) {
1614
- writer.writeString(
1615
- 1,
1616
- f
1617
- );
1669
+ writer.writeString(1, f);
1618
1670
  }
1619
1671
  f = message.getCallData();
1620
1672
  if (f.length > 0) {
1621
- writer.writeString(
1622
- 2,
1623
- f
1624
- );
1673
+ writer.writeString(2, f);
1625
1674
  }
1626
1675
  f = message.getMethod();
1627
1676
  if (f.length > 0) {
1628
- writer.writeString(
1629
- 3,
1630
- f
1631
- );
1677
+ writer.writeString(3, f);
1632
1678
  }
1633
1679
  f = message.getEncodedParams();
1634
1680
  if (f.length > 0) {
1635
- writer.writeString(
1636
- 4,
1637
- f
1638
- );
1681
+ writer.writeString(4, f);
1639
1682
  }
1640
1683
  };
1641
1684
  proto.aggregator.ContractExecution.prototype.getContractAddress = function() {
@@ -1676,7 +1719,10 @@ var init_avs_pb = __esm({
1676
1719
  };
1677
1720
  if (jspb.Message.GENERATE_TO_OBJECT) {
1678
1721
  proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) {
1679
- return proto.aggregator.GraphQLDataQuery.toObject(opt_includeInstance, this);
1722
+ return proto.aggregator.GraphQLDataQuery.toObject(
1723
+ opt_includeInstance,
1724
+ this
1725
+ );
1680
1726
  };
1681
1727
  proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) {
1682
1728
  var f, obj = {
@@ -1692,7 +1738,10 @@ var init_avs_pb = __esm({
1692
1738
  proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) {
1693
1739
  var reader = new jspb.BinaryReader(bytes);
1694
1740
  var msg = new proto.aggregator.GraphQLDataQuery();
1695
- return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader(msg, reader);
1741
+ return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader(
1742
+ msg,
1743
+ reader
1744
+ );
1696
1745
  };
1697
1746
  proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) {
1698
1747
  while (reader.nextField()) {
@@ -1731,17 +1780,11 @@ var init_avs_pb = __esm({
1731
1780
  var f = void 0;
1732
1781
  f = message.getUrl();
1733
1782
  if (f.length > 0) {
1734
- writer.writeString(
1735
- 1,
1736
- f
1737
- );
1783
+ writer.writeString(1, f);
1738
1784
  }
1739
1785
  f = message.getQuery();
1740
1786
  if (f.length > 0) {
1741
- writer.writeString(
1742
- 2,
1743
- f
1744
- );
1787
+ writer.writeString(2, f);
1745
1788
  }
1746
1789
  };
1747
1790
  proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() {
@@ -1800,7 +1843,15 @@ var init_avs_pb = __esm({
1800
1843
  case 2:
1801
1844
  var value = msg.getHeadersMap();
1802
1845
  reader.readMessage(value, function(message, reader2) {
1803
- jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
1846
+ jspb.Map.deserializeBinary(
1847
+ message,
1848
+ reader2,
1849
+ jspb.BinaryReader.prototype.readString,
1850
+ jspb.BinaryReader.prototype.readString,
1851
+ null,
1852
+ "",
1853
+ ""
1854
+ );
1804
1855
  });
1805
1856
  break;
1806
1857
  case 3:
@@ -1826,21 +1877,20 @@ var init_avs_pb = __esm({
1826
1877
  var f = void 0;
1827
1878
  f = message.getUrl();
1828
1879
  if (f.length > 0) {
1829
- writer.writeString(
1830
- 1,
1831
- f
1832
- );
1880
+ writer.writeString(1, f);
1833
1881
  }
1834
1882
  f = message.getHeadersMap(true);
1835
1883
  if (f && f.getLength() > 0) {
1836
- f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
1884
+ f.serializeBinary(
1885
+ 2,
1886
+ writer,
1887
+ jspb.BinaryWriter.prototype.writeString,
1888
+ jspb.BinaryWriter.prototype.writeString
1889
+ );
1837
1890
  }
1838
1891
  f = message.getBody();
1839
1892
  if (f.length > 0) {
1840
- writer.writeString(
1841
- 3,
1842
- f
1843
- );
1893
+ writer.writeString(3, f);
1844
1894
  }
1845
1895
  };
1846
1896
  proto.aggregator.HTTPAPICall.prototype.getUrl = function() {
@@ -1855,12 +1905,7 @@ var init_avs_pb = __esm({
1855
1905
  proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) {
1856
1906
  return (
1857
1907
  /** @type {!jspb.Map<string,string>} */
1858
- jspb.Message.getMapField(
1859
- this,
1860
- 2,
1861
- opt_noLazyCreate,
1862
- null
1863
- )
1908
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate, null)
1864
1909
  );
1865
1910
  };
1866
1911
  proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() {
@@ -1933,17 +1978,11 @@ var init_avs_pb = __esm({
1933
1978
  var f = void 0;
1934
1979
  f = message.getType();
1935
1980
  if (f !== 0) {
1936
- writer.writeEnum(
1937
- 1,
1938
- f
1939
- );
1981
+ writer.writeEnum(1, f);
1940
1982
  }
1941
1983
  f = message.getBody();
1942
1984
  if (f.length > 0) {
1943
- writer.writeString(
1944
- 2,
1945
- f
1946
- );
1985
+ writer.writeString(2, f);
1947
1986
  }
1948
1987
  };
1949
1988
  proto.aggregator.CustomCode.prototype.getType = function() {
@@ -1982,7 +2021,10 @@ var init_avs_pb = __esm({
1982
2021
  proto.aggregator.ConditionJump.deserializeBinary = function(bytes) {
1983
2022
  var reader = new jspb.BinaryReader(bytes);
1984
2023
  var msg = new proto.aggregator.ConditionJump();
1985
- return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader);
2024
+ return proto.aggregator.ConditionJump.deserializeBinaryFromReader(
2025
+ msg,
2026
+ reader
2027
+ );
1986
2028
  };
1987
2029
  proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) {
1988
2030
  while (reader.nextField()) {
@@ -2021,17 +2063,11 @@ var init_avs_pb = __esm({
2021
2063
  var f = void 0;
2022
2064
  f = message.getExpression();
2023
2065
  if (f.length > 0) {
2024
- writer.writeString(
2025
- 1,
2026
- f
2027
- );
2066
+ writer.writeString(1, f);
2028
2067
  }
2029
2068
  f = message.getNext();
2030
2069
  if (f.length > 0) {
2031
- writer.writeString(
2032
- 2,
2033
- f
2034
- );
2070
+ writer.writeString(2, f);
2035
2071
  }
2036
2072
  };
2037
2073
  proto.aggregator.ConditionJump.prototype.getExpression = function() {
@@ -2087,17 +2123,26 @@ var init_avs_pb = __esm({
2087
2123
  switch (field) {
2088
2124
  case 1:
2089
2125
  var value = new proto.aggregator.ConditionJump();
2090
- reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader);
2126
+ reader.readMessage(
2127
+ value,
2128
+ proto.aggregator.ConditionJump.deserializeBinaryFromReader
2129
+ );
2091
2130
  msg.setIf(value);
2092
2131
  break;
2093
2132
  case 2:
2094
2133
  var value = new proto.aggregator.ConditionJump();
2095
- reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader);
2134
+ reader.readMessage(
2135
+ value,
2136
+ proto.aggregator.ConditionJump.deserializeBinaryFromReader
2137
+ );
2096
2138
  msg.addElseifs(value);
2097
2139
  break;
2098
2140
  case 3:
2099
2141
  var value = new proto.aggregator.ConditionJump();
2100
- reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader);
2142
+ reader.readMessage(
2143
+ value,
2144
+ proto.aggregator.ConditionJump.deserializeBinaryFromReader
2145
+ );
2101
2146
  msg.setElse(value);
2102
2147
  break;
2103
2148
  default:
@@ -2157,14 +2202,24 @@ var init_avs_pb = __esm({
2157
2202
  proto.aggregator.BranchAction.prototype.getElseifsList = function() {
2158
2203
  return (
2159
2204
  /** @type{!Array<!proto.aggregator.ConditionJump>} */
2160
- jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2)
2205
+ jspb.Message.getRepeatedWrapperField(
2206
+ this,
2207
+ proto.aggregator.ConditionJump,
2208
+ 2
2209
+ )
2161
2210
  );
2162
2211
  };
2163
2212
  proto.aggregator.BranchAction.prototype.setElseifsList = function(value) {
2164
2213
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
2165
2214
  };
2166
2215
  proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) {
2167
- return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index);
2216
+ return jspb.Message.addToRepeatedWrapperField(
2217
+ this,
2218
+ 2,
2219
+ opt_value,
2220
+ proto.aggregator.ConditionJump,
2221
+ opt_index
2222
+ );
2168
2223
  };
2169
2224
  proto.aggregator.BranchAction.prototype.clearElseifsList = function() {
2170
2225
  return this.setElseifsList([]);
@@ -2250,32 +2305,50 @@ var init_avs_pb = __esm({
2250
2305
  break;
2251
2306
  case 10:
2252
2307
  var value = new proto.aggregator.ETHTransfer();
2253
- reader.readMessage(value, proto.aggregator.ETHTransfer.deserializeBinaryFromReader);
2308
+ reader.readMessage(
2309
+ value,
2310
+ proto.aggregator.ETHTransfer.deserializeBinaryFromReader
2311
+ );
2254
2312
  msg.setEthTransfer(value);
2255
2313
  break;
2256
2314
  case 11:
2257
2315
  var value = new proto.aggregator.ContractExecution();
2258
- reader.readMessage(value, proto.aggregator.ContractExecution.deserializeBinaryFromReader);
2316
+ reader.readMessage(
2317
+ value,
2318
+ proto.aggregator.ContractExecution.deserializeBinaryFromReader
2319
+ );
2259
2320
  msg.setContractExecution(value);
2260
2321
  break;
2261
2322
  case 12:
2262
2323
  var value = new proto.aggregator.GraphQLDataQuery();
2263
- reader.readMessage(value, proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader);
2324
+ reader.readMessage(
2325
+ value,
2326
+ proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader
2327
+ );
2264
2328
  msg.setGraphqlDataQuery(value);
2265
2329
  break;
2266
2330
  case 13:
2267
2331
  var value = new proto.aggregator.HTTPAPICall();
2268
- reader.readMessage(value, proto.aggregator.HTTPAPICall.deserializeBinaryFromReader);
2332
+ reader.readMessage(
2333
+ value,
2334
+ proto.aggregator.HTTPAPICall.deserializeBinaryFromReader
2335
+ );
2269
2336
  msg.setHttpDataQuery(value);
2270
2337
  break;
2271
2338
  case 14:
2272
2339
  var value = new proto.aggregator.CustomCode();
2273
- reader.readMessage(value, proto.aggregator.CustomCode.deserializeBinaryFromReader);
2340
+ reader.readMessage(
2341
+ value,
2342
+ proto.aggregator.CustomCode.deserializeBinaryFromReader
2343
+ );
2274
2344
  msg.setCustomCode(value);
2275
2345
  break;
2276
2346
  case 15:
2277
2347
  var value = new proto.aggregator.BranchAction();
2278
- reader.readMessage(value, proto.aggregator.BranchAction.deserializeBinaryFromReader);
2348
+ reader.readMessage(
2349
+ value,
2350
+ proto.aggregator.BranchAction.deserializeBinaryFromReader
2351
+ );
2279
2352
  msg.setBranch(value);
2280
2353
  break;
2281
2354
  default:
@@ -2294,31 +2367,19 @@ var init_avs_pb = __esm({
2294
2367
  var f = void 0;
2295
2368
  f = message.getTaskType();
2296
2369
  if (f !== 0) {
2297
- writer.writeEnum(
2298
- 1,
2299
- f
2300
- );
2370
+ writer.writeEnum(1, f);
2301
2371
  }
2302
2372
  f = message.getId();
2303
2373
  if (f.length > 0) {
2304
- writer.writeString(
2305
- 2,
2306
- f
2307
- );
2374
+ writer.writeString(2, f);
2308
2375
  }
2309
2376
  f = message.getName();
2310
2377
  if (f.length > 0) {
2311
- writer.writeString(
2312
- 3,
2313
- f
2314
- );
2378
+ writer.writeString(3, f);
2315
2379
  }
2316
2380
  f = message.getNextList();
2317
2381
  if (f.length > 0) {
2318
- writer.writeRepeatedString(
2319
- 4,
2320
- f
2321
- );
2382
+ writer.writeRepeatedString(4, f);
2322
2383
  }
2323
2384
  f = message.getEthTransfer();
2324
2385
  if (f != null) {
@@ -2566,24 +2627,15 @@ var init_avs_pb = __esm({
2566
2627
  var f = void 0;
2567
2628
  f = message.getEpoch();
2568
2629
  if (f !== 0) {
2569
- writer.writeInt64(
2570
- 1,
2571
- f
2572
- );
2630
+ writer.writeInt64(1, f);
2573
2631
  }
2574
2632
  f = message.getUserOpHash();
2575
2633
  if (f.length > 0) {
2576
- writer.writeString(
2577
- 2,
2578
- f
2579
- );
2634
+ writer.writeString(2, f);
2580
2635
  }
2581
2636
  f = message.getError();
2582
2637
  if (f.length > 0) {
2583
- writer.writeString(
2584
- 3,
2585
- f
2586
- );
2638
+ writer.writeString(3, f);
2587
2639
  }
2588
2640
  };
2589
2641
  proto.aggregator.Execution.prototype.getEpoch = function() {
@@ -2661,7 +2713,10 @@ var init_avs_pb = __esm({
2661
2713
  switch (field) {
2662
2714
  case 1:
2663
2715
  var value = new proto.aggregator.UUID();
2664
- reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader);
2716
+ reader.readMessage(
2717
+ value,
2718
+ proto.aggregator.UUID.deserializeBinaryFromReader
2719
+ );
2665
2720
  msg.setId(value);
2666
2721
  break;
2667
2722
  case 2:
@@ -2680,12 +2735,18 @@ var init_avs_pb = __esm({
2680
2735
  break;
2681
2736
  case 4:
2682
2737
  var value = new proto.aggregator.TaskTrigger();
2683
- reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader);
2738
+ reader.readMessage(
2739
+ value,
2740
+ proto.aggregator.TaskTrigger.deserializeBinaryFromReader
2741
+ );
2684
2742
  msg.setTrigger(value);
2685
2743
  break;
2686
2744
  case 5:
2687
2745
  var value = new proto.aggregator.TaskAction();
2688
- reader.readMessage(value, proto.aggregator.TaskAction.deserializeBinaryFromReader);
2746
+ reader.readMessage(
2747
+ value,
2748
+ proto.aggregator.TaskAction.deserializeBinaryFromReader
2749
+ );
2689
2750
  msg.addNodes(value);
2690
2751
  break;
2691
2752
  case 6:
@@ -2732,7 +2793,10 @@ var init_avs_pb = __esm({
2732
2793
  break;
2733
2794
  case 12:
2734
2795
  var value = new proto.aggregator.Execution();
2735
- reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader);
2796
+ reader.readMessage(
2797
+ value,
2798
+ proto.aggregator.Execution.deserializeBinaryFromReader
2799
+ );
2736
2800
  msg.addExecutions(value);
2737
2801
  break;
2738
2802
  default:
@@ -2751,25 +2815,15 @@ var init_avs_pb = __esm({
2751
2815
  var f = void 0;
2752
2816
  f = message.getId();
2753
2817
  if (f != null) {
2754
- writer.writeMessage(
2755
- 1,
2756
- f,
2757
- proto.aggregator.UUID.serializeBinaryToWriter
2758
- );
2818
+ writer.writeMessage(1, f, proto.aggregator.UUID.serializeBinaryToWriter);
2759
2819
  }
2760
2820
  f = message.getOwner();
2761
2821
  if (f.length > 0) {
2762
- writer.writeString(
2763
- 2,
2764
- f
2765
- );
2822
+ writer.writeString(2, f);
2766
2823
  }
2767
2824
  f = message.getSmartAccountAddress();
2768
2825
  if (f.length > 0) {
2769
- writer.writeString(
2770
- 3,
2771
- f
2772
- );
2826
+ writer.writeString(3, f);
2773
2827
  }
2774
2828
  f = message.getTrigger();
2775
2829
  if (f != null) {
@@ -2789,45 +2843,27 @@ var init_avs_pb = __esm({
2789
2843
  }
2790
2844
  f = message.getStartAt();
2791
2845
  if (f !== 0) {
2792
- writer.writeInt64(
2793
- 6,
2794
- f
2795
- );
2846
+ writer.writeInt64(6, f);
2796
2847
  }
2797
2848
  f = message.getExpiredAt();
2798
2849
  if (f !== 0) {
2799
- writer.writeInt64(
2800
- 7,
2801
- f
2802
- );
2850
+ writer.writeInt64(7, f);
2803
2851
  }
2804
2852
  f = message.getMemo();
2805
2853
  if (f.length > 0) {
2806
- writer.writeString(
2807
- 8,
2808
- f
2809
- );
2854
+ writer.writeString(8, f);
2810
2855
  }
2811
2856
  f = message.getCompletedAt();
2812
2857
  if (f !== 0) {
2813
- writer.writeInt64(
2814
- 9,
2815
- f
2816
- );
2858
+ writer.writeInt64(9, f);
2817
2859
  }
2818
2860
  f = message.getStatus();
2819
2861
  if (f !== 0) {
2820
- writer.writeEnum(
2821
- 10,
2822
- f
2823
- );
2862
+ writer.writeEnum(10, f);
2824
2863
  }
2825
2864
  f = message.getRepeatable();
2826
2865
  if (f) {
2827
- writer.writeBool(
2828
- 11,
2829
- f
2830
- );
2866
+ writer.writeBool(11, f);
2831
2867
  }
2832
2868
  f = message.getExecutionsList();
2833
2869
  if (f.length > 0) {
@@ -2896,7 +2932,13 @@ var init_avs_pb = __esm({
2896
2932
  return jspb.Message.setRepeatedWrapperField(this, 5, value);
2897
2933
  };
2898
2934
  proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) {
2899
- return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.aggregator.TaskAction, opt_index);
2935
+ return jspb.Message.addToRepeatedWrapperField(
2936
+ this,
2937
+ 5,
2938
+ opt_value,
2939
+ proto.aggregator.TaskAction,
2940
+ opt_index
2941
+ );
2900
2942
  };
2901
2943
  proto.aggregator.Task.prototype.clearNodesList = function() {
2902
2944
  return this.setNodesList([]);
@@ -2965,7 +3007,13 @@ var init_avs_pb = __esm({
2965
3007
  return jspb.Message.setRepeatedWrapperField(this, 12, value);
2966
3008
  };
2967
3009
  proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) {
2968
- return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.Execution, opt_index);
3010
+ return jspb.Message.addToRepeatedWrapperField(
3011
+ this,
3012
+ 12,
3013
+ opt_value,
3014
+ proto.aggregator.Execution,
3015
+ opt_index
3016
+ );
2969
3017
  };
2970
3018
  proto.aggregator.Task.prototype.clearExecutionsList = function() {
2971
3019
  return this.setExecutionsList([]);
@@ -2997,7 +3045,10 @@ var init_avs_pb = __esm({
2997
3045
  proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) {
2998
3046
  var reader = new jspb.BinaryReader(bytes);
2999
3047
  var msg = new proto.aggregator.CreateTaskReq();
3000
- return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader);
3048
+ return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(
3049
+ msg,
3050
+ reader
3051
+ );
3001
3052
  };
3002
3053
  proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) {
3003
3054
  while (reader.nextField()) {
@@ -3008,12 +3059,18 @@ var init_avs_pb = __esm({
3008
3059
  switch (field) {
3009
3060
  case 1:
3010
3061
  var value = new proto.aggregator.TaskTrigger();
3011
- reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader);
3062
+ reader.readMessage(
3063
+ value,
3064
+ proto.aggregator.TaskTrigger.deserializeBinaryFromReader
3065
+ );
3012
3066
  msg.setTrigger(value);
3013
3067
  break;
3014
3068
  case 2:
3015
3069
  var value = new proto.aggregator.TaskAction();
3016
- reader.readMessage(value, proto.aggregator.TaskAction.deserializeBinaryFromReader);
3070
+ reader.readMessage(
3071
+ value,
3072
+ proto.aggregator.TaskAction.deserializeBinaryFromReader
3073
+ );
3017
3074
  msg.addActions(value);
3018
3075
  break;
3019
3076
  case 3:
@@ -3076,31 +3133,19 @@ var init_avs_pb = __esm({
3076
3133
  }
3077
3134
  f = message.getStartAt();
3078
3135
  if (f !== 0) {
3079
- writer.writeInt64(
3080
- 3,
3081
- f
3082
- );
3136
+ writer.writeInt64(3, f);
3083
3137
  }
3084
3138
  f = message.getExpiredAt();
3085
3139
  if (f !== 0) {
3086
- writer.writeInt64(
3087
- 4,
3088
- f
3089
- );
3140
+ writer.writeInt64(4, f);
3090
3141
  }
3091
3142
  f = message.getMemo();
3092
3143
  if (f.length > 0) {
3093
- writer.writeString(
3094
- 5,
3095
- f
3096
- );
3144
+ writer.writeString(5, f);
3097
3145
  }
3098
3146
  f = message.getRepeatable();
3099
3147
  if (f) {
3100
- writer.writeBool(
3101
- 6,
3102
- f
3103
- );
3148
+ writer.writeBool(6, f);
3104
3149
  }
3105
3150
  };
3106
3151
  proto.aggregator.CreateTaskReq.prototype.getTrigger = function() {
@@ -3128,7 +3173,13 @@ var init_avs_pb = __esm({
3128
3173
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
3129
3174
  };
3130
3175
  proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) {
3131
- return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.TaskAction, opt_index);
3176
+ return jspb.Message.addToRepeatedWrapperField(
3177
+ this,
3178
+ 2,
3179
+ opt_value,
3180
+ proto.aggregator.TaskAction,
3181
+ opt_index
3182
+ );
3132
3183
  };
3133
3184
  proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() {
3134
3185
  return this.setActionsList([]);
@@ -3186,7 +3237,10 @@ var init_avs_pb = __esm({
3186
3237
  proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) {
3187
3238
  var reader = new jspb.BinaryReader(bytes);
3188
3239
  var msg = new proto.aggregator.CreateTaskResp();
3189
- return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader);
3240
+ return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(
3241
+ msg,
3242
+ reader
3243
+ );
3190
3244
  };
3191
3245
  proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) {
3192
3246
  while (reader.nextField()) {
@@ -3218,10 +3272,7 @@ var init_avs_pb = __esm({
3218
3272
  var f = void 0;
3219
3273
  f = message.getId();
3220
3274
  if (f.length > 0) {
3221
- writer.writeString(
3222
- 1,
3223
- f
3224
- );
3275
+ writer.writeString(1, f);
3225
3276
  }
3226
3277
  };
3227
3278
  proto.aggregator.CreateTaskResp.prototype.getId = function() {
@@ -3282,10 +3333,7 @@ var init_avs_pb = __esm({
3282
3333
  var f = void 0;
3283
3334
  f = message.getOwner();
3284
3335
  if (f.length > 0) {
3285
- writer.writeString(
3286
- 1,
3287
- f
3288
- );
3336
+ writer.writeString(1, f);
3289
3337
  }
3290
3338
  };
3291
3339
  proto.aggregator.NonceRequest.prototype.getOwner = function() {
@@ -3346,10 +3394,7 @@ var init_avs_pb = __esm({
3346
3394
  var f = void 0;
3347
3395
  f = message.getNonce();
3348
3396
  if (f.length > 0) {
3349
- writer.writeString(
3350
- 1,
3351
- f
3352
- );
3397
+ writer.writeString(1, f);
3353
3398
  }
3354
3399
  };
3355
3400
  proto.aggregator.NonceResp.prototype.getNonce = function() {
@@ -3378,7 +3423,10 @@ var init_avs_pb = __esm({
3378
3423
  proto.aggregator.AddressRequest.deserializeBinary = function(bytes) {
3379
3424
  var reader = new jspb.BinaryReader(bytes);
3380
3425
  var msg = new proto.aggregator.AddressRequest();
3381
- return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader);
3426
+ return proto.aggregator.AddressRequest.deserializeBinaryFromReader(
3427
+ msg,
3428
+ reader
3429
+ );
3382
3430
  };
3383
3431
  proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) {
3384
3432
  while (reader.nextField()) {
@@ -3410,10 +3458,7 @@ var init_avs_pb = __esm({
3410
3458
  var f = void 0;
3411
3459
  f = message.getOwner();
3412
3460
  if (f.length > 0) {
3413
- writer.writeString(
3414
- 1,
3415
- f
3416
- );
3461
+ writer.writeString(1, f);
3417
3462
  }
3418
3463
  };
3419
3464
  proto.aggregator.AddressRequest.prototype.getOwner = function() {
@@ -3482,17 +3527,11 @@ var init_avs_pb = __esm({
3482
3527
  var f = void 0;
3483
3528
  f = message.getSmartAccountAddress();
3484
3529
  if (f.length > 0) {
3485
- writer.writeString(
3486
- 1,
3487
- f
3488
- );
3530
+ writer.writeString(1, f);
3489
3531
  }
3490
3532
  f = message.getNonce();
3491
3533
  if (f.length > 0) {
3492
- writer.writeString(
3493
- 2,
3494
- f
3495
- );
3534
+ writer.writeString(2, f);
3496
3535
  }
3497
3536
  };
3498
3537
  proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() {
@@ -3574,7 +3613,10 @@ var init_avs_pb = __esm({
3574
3613
  proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) {
3575
3614
  var reader = new jspb.BinaryReader(bytes);
3576
3615
  var msg = new proto.aggregator.ListTasksResp();
3577
- return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader);
3616
+ return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(
3617
+ msg,
3618
+ reader
3619
+ );
3578
3620
  };
3579
3621
  proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) {
3580
3622
  while (reader.nextField()) {
@@ -3585,7 +3627,10 @@ var init_avs_pb = __esm({
3585
3627
  switch (field) {
3586
3628
  case 1:
3587
3629
  var value = new proto.aggregator.ListTasksResp.TaskItemResp();
3588
- reader.readMessage(value, proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader);
3630
+ reader.readMessage(
3631
+ value,
3632
+ proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader
3633
+ );
3589
3634
  msg.addTasks(value);
3590
3635
  break;
3591
3636
  default:
@@ -3613,7 +3658,10 @@ var init_avs_pb = __esm({
3613
3658
  };
3614
3659
  if (jspb.Message.GENERATE_TO_OBJECT) {
3615
3660
  proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) {
3616
- return proto.aggregator.ListTasksResp.TaskItemResp.toObject(opt_includeInstance, this);
3661
+ return proto.aggregator.ListTasksResp.TaskItemResp.toObject(
3662
+ opt_includeInstance,
3663
+ this
3664
+ );
3617
3665
  };
3618
3666
  proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) {
3619
3667
  var f, obj = {
@@ -3629,7 +3677,10 @@ var init_avs_pb = __esm({
3629
3677
  proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) {
3630
3678
  var reader = new jspb.BinaryReader(bytes);
3631
3679
  var msg = new proto.aggregator.ListTasksResp.TaskItemResp();
3632
- return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader(msg, reader);
3680
+ return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader(
3681
+ msg,
3682
+ reader
3683
+ );
3633
3684
  };
3634
3685
  proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) {
3635
3686
  while (reader.nextField()) {
@@ -3661,24 +3712,21 @@ var init_avs_pb = __esm({
3661
3712
  };
3662
3713
  proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() {
3663
3714
  var writer = new jspb.BinaryWriter();
3664
- proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(this, writer);
3715
+ proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(
3716
+ this,
3717
+ writer
3718
+ );
3665
3719
  return writer.getResultBuffer();
3666
3720
  };
3667
3721
  proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) {
3668
3722
  var f = void 0;
3669
3723
  f = message.getId();
3670
3724
  if (f.length > 0) {
3671
- writer.writeString(
3672
- 1,
3673
- f
3674
- );
3725
+ writer.writeString(1, f);
3675
3726
  }
3676
3727
  f = message.getStatus();
3677
3728
  if (f !== 0) {
3678
- writer.writeEnum(
3679
- 2,
3680
- f
3681
- );
3729
+ writer.writeEnum(2, f);
3682
3730
  }
3683
3731
  };
3684
3732
  proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() {
@@ -3702,14 +3750,24 @@ var init_avs_pb = __esm({
3702
3750
  proto.aggregator.ListTasksResp.prototype.getTasksList = function() {
3703
3751
  return (
3704
3752
  /** @type{!Array<!proto.aggregator.ListTasksResp.TaskItemResp>} */
3705
- jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ListTasksResp.TaskItemResp, 1)
3753
+ jspb.Message.getRepeatedWrapperField(
3754
+ this,
3755
+ proto.aggregator.ListTasksResp.TaskItemResp,
3756
+ 1
3757
+ )
3706
3758
  );
3707
3759
  };
3708
3760
  proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) {
3709
3761
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
3710
3762
  };
3711
3763
  proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) {
3712
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ListTasksResp.TaskItemResp, opt_index);
3764
+ return jspb.Message.addToRepeatedWrapperField(
3765
+ this,
3766
+ 1,
3767
+ opt_value,
3768
+ proto.aggregator.ListTasksResp.TaskItemResp,
3769
+ opt_index
3770
+ );
3713
3771
  };
3714
3772
  proto.aggregator.ListTasksResp.prototype.clearTasksList = function() {
3715
3773
  return this.setTasksList([]);
@@ -3779,24 +3837,15 @@ var init_avs_pb = __esm({
3779
3837
  var f = void 0;
3780
3838
  f = message.getOwner();
3781
3839
  if (f.length > 0) {
3782
- writer.writeString(
3783
- 1,
3784
- f
3785
- );
3840
+ writer.writeString(1, f);
3786
3841
  }
3787
3842
  f = message.getExpiredAt();
3788
3843
  if (f !== 0) {
3789
- writer.writeInt64(
3790
- 2,
3791
- f
3792
- );
3844
+ writer.writeInt64(2, f);
3793
3845
  }
3794
3846
  f = message.getSignature();
3795
3847
  if (f.length > 0) {
3796
- writer.writeString(
3797
- 3,
3798
- f
3799
- );
3848
+ writer.writeString(3, f);
3800
3849
  }
3801
3850
  };
3802
3851
  proto.aggregator.GetKeyReq.prototype.getOwner = function() {
@@ -3875,10 +3924,7 @@ var init_avs_pb = __esm({
3875
3924
  var f = void 0;
3876
3925
  f = message.getKey();
3877
3926
  if (f.length > 0) {
3878
- writer.writeString(
3879
- 1,
3880
- f
3881
- );
3927
+ writer.writeString(1, f);
3882
3928
  }
3883
3929
  };
3884
3930
  proto.aggregator.KeyResp.prototype.getKey = function() {
@@ -3910,7 +3956,10 @@ var init_avs_pb = __esm({
3910
3956
  proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) {
3911
3957
  var reader = new jspb.BinaryReader(bytes);
3912
3958
  var msg = new proto.aggregator.UpdateChecksReq();
3913
- return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader);
3959
+ return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(
3960
+ msg,
3961
+ reader
3962
+ );
3914
3963
  };
3915
3964
  proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) {
3916
3965
  while (reader.nextField()) {
@@ -3956,24 +4005,15 @@ var init_avs_pb = __esm({
3956
4005
  var f = void 0;
3957
4006
  f = message.getAddress();
3958
4007
  if (f.length > 0) {
3959
- writer.writeString(
3960
- 1,
3961
- f
3962
- );
4008
+ writer.writeString(1, f);
3963
4009
  }
3964
4010
  f = message.getSignature();
3965
4011
  if (f.length > 0) {
3966
- writer.writeString(
3967
- 2,
3968
- f
3969
- );
4012
+ writer.writeString(2, f);
3970
4013
  }
3971
4014
  f = message.getIdList();
3972
4015
  if (f.length > 0) {
3973
- writer.writeRepeatedString(
3974
- 3,
3975
- f
3976
- );
4016
+ writer.writeRepeatedString(3, f);
3977
4017
  }
3978
4018
  };
3979
4019
  proto.aggregator.UpdateChecksReq.prototype.getAddress = function() {
@@ -4011,7 +4051,10 @@ var init_avs_pb = __esm({
4011
4051
  };
4012
4052
  if (jspb.Message.GENERATE_TO_OBJECT) {
4013
4053
  proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) {
4014
- return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this);
4054
+ return proto.aggregator.UpdateChecksResp.toObject(
4055
+ opt_includeInstance,
4056
+ this
4057
+ );
4015
4058
  };
4016
4059
  proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) {
4017
4060
  var f, obj = {
@@ -4026,7 +4069,10 @@ var init_avs_pb = __esm({
4026
4069
  proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) {
4027
4070
  var reader = new jspb.BinaryReader(bytes);
4028
4071
  var msg = new proto.aggregator.UpdateChecksResp();
4029
- return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader);
4072
+ return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(
4073
+ msg,
4074
+ reader
4075
+ );
4030
4076
  };
4031
4077
  proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) {
4032
4078
  while (reader.nextField()) {
@@ -4037,7 +4083,10 @@ var init_avs_pb = __esm({
4037
4083
  switch (field) {
4038
4084
  case 1:
4039
4085
  var value = new google_protobuf_timestamp_pb.Timestamp();
4040
- reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
4086
+ reader.readMessage(
4087
+ value,
4088
+ google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader
4089
+ );
4041
4090
  msg.setUpdatedAt(value);
4042
4091
  break;
4043
4092
  default:
@@ -4066,7 +4115,11 @@ var init_avs_pb = __esm({
4066
4115
  proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() {
4067
4116
  return (
4068
4117
  /** @type{?proto.google.protobuf.Timestamp} */
4069
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)
4118
+ jspb.Message.getWrapperField(
4119
+ this,
4120
+ google_protobuf_timestamp_pb.Timestamp,
4121
+ 1
4122
+ )
4070
4123
  );
4071
4124
  };
4072
4125
  proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) {
@@ -4102,7 +4155,27 @@ var init_avs_pb = __esm({
4102
4155
  JAVASCRIPT: 0
4103
4156
  };
4104
4157
  goog.object.extend(exports, proto.aggregator);
4105
- ({ Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp } = proto.aggregator);
4158
+ ({
4159
+ Task,
4160
+ CreateTaskReq,
4161
+ CreateTaskResp,
4162
+ GetKeyReq,
4163
+ KeyResp,
4164
+ UpdateChecksReq,
4165
+ UpdateChecksResp,
4166
+ AddressResp,
4167
+ AddressRequest,
4168
+ ListTasksReq,
4169
+ ListTasksResp,
4170
+ TaskTrigger,
4171
+ TriggerType,
4172
+ ExpressionCondition,
4173
+ TaskAction,
4174
+ ActionType,
4175
+ ContractExecution,
4176
+ TaskType,
4177
+ UUID
4178
+ } = proto.aggregator);
4106
4179
  }
4107
4180
  });
4108
4181
 
@@ -4113,7 +4186,10 @@ __export(src_exports, {
4113
4186
  getKeyRequestMessage: () => getKeyRequestMessage
4114
4187
  });
4115
4188
  module.exports = __toCommonJS(src_exports);
4189
+ var import_lodash = __toESM(require("lodash"));
4190
+ var import_ethers = require("ethers");
4116
4191
  var grpc2 = __toESM(require("@grpc/grpc-js"));
4192
+ var import_grpc_js = require("@grpc/grpc-js");
4117
4193
 
4118
4194
  // src/auth.ts
4119
4195
  var getKeyRequestMessage = (address, expiredAt) => {
@@ -4427,17 +4503,46 @@ var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService);
4427
4503
 
4428
4504
  // src/index.ts
4429
4505
  init_avs_pb();
4506
+
4507
+ // src/task.ts
4508
+ var Task2 = class {
4509
+ // result?: any;
4510
+ // error?: string;
4511
+ constructor(task) {
4512
+ this.id = task.getId();
4513
+ this.status = task.getStatus().toString();
4514
+ console.log("task.constructor:", task.toObject());
4515
+ }
4516
+ };
4517
+ var task_default = Task2;
4518
+
4519
+ // src/index.ts
4430
4520
  var metadata = new grpc2.Metadata();
4431
4521
  var BaseClient = class {
4432
- // protected wallet?: any;
4433
4522
  constructor(opts) {
4434
4523
  this.endpoint = opts.endpoint;
4435
4524
  this.rpcClient = new AggregatorClient(
4436
4525
  this.endpoint,
4437
- // TODO: switch to the TLS after we're able to update all the operator
4438
4526
  grpc2.credentials.createInsecure()
4439
4527
  );
4440
- console.log("this.rpcClient:", this.rpcClient);
4528
+ this.metadata = new import_grpc_js.Metadata();
4529
+ }
4530
+ setAuthKey(jwtToken) {
4531
+ metadata.add("authkey", jwtToken);
4532
+ }
4533
+ isAuthenticated() {
4534
+ if (!metadata.get("authkey")) {
4535
+ return false;
4536
+ }
4537
+ try {
4538
+ const [, payload] = metadata.get("authkey")[0].toString().split(".");
4539
+ const decodedPayload = JSON.parse(atob(payload));
4540
+ const currentTimestamp = Math.floor(Date.now() / 1e3);
4541
+ return decodedPayload.exp > currentTimestamp;
4542
+ } catch (error) {
4543
+ console.error("Error validating JWT token:", error);
4544
+ return false;
4545
+ }
4441
4546
  }
4442
4547
  // async authWithJwtToken(
4443
4548
  // address: string,
@@ -4456,7 +4561,7 @@ var BaseClient = class {
4456
4561
  // expired_at: expirationTime,
4457
4562
  // signature: jwtToken,
4458
4563
  // });
4459
- // this.authkey = result.getKey();
4564
+ // this.jwtToken = result.getKey();
4460
4565
  // return { key: result.getKey() };
4461
4566
  // }
4462
4567
  // This flow can be used where the signature is generate from outside, such as in front-end and pass in
@@ -4475,12 +4580,8 @@ var BaseClient = class {
4475
4580
  "getKey",
4476
4581
  request
4477
4582
  );
4478
- console.log("result:", result);
4479
- this.authkey = result.getKey();
4480
- return { key: result.getKey() };
4481
- }
4482
- isAuthenticated() {
4483
- return !!this.authkey;
4583
+ this.setAuthKey(result.getKey());
4584
+ return { jwtToken: result.getKey() };
4484
4585
  }
4485
4586
  _callRPC(method, request) {
4486
4587
  return new Promise((resolve, reject) => {
@@ -4499,6 +4600,95 @@ var Client = class extends BaseClient {
4499
4600
  constructor(config) {
4500
4601
  super(config);
4501
4602
  }
4603
+ async getAddresses(address) {
4604
+ const request = new AddressRequest();
4605
+ request.setOwner(address);
4606
+ const result = await this._callRPC("getSmartAccountAddress", request);
4607
+ console.log("getAddresses.result:", result);
4608
+ return {
4609
+ owner: address,
4610
+ smart_account_address: result.getSmartAccountAddress()
4611
+ };
4612
+ }
4613
+ async createTask({
4614
+ address,
4615
+ oracleContract,
4616
+ tokenContract
4617
+ }) {
4618
+ const trigger = new TaskTrigger();
4619
+ trigger.setTriggerType(TriggerType.EXPRESSIONTRIGGER);
4620
+ trigger.setExpression(
4621
+ new ExpressionCondition().setExpression(`
4622
+ bigCmp(
4623
+ priceChainlink("${oracleContract}"),
4624
+ toBigInt("10000")
4625
+ ) > 0`)
4626
+ );
4627
+ const action = new TaskAction();
4628
+ action.setTaskType(TaskType.CONTRACTEXECUTIONTASK);
4629
+ action.setId("transfer_erc20_1");
4630
+ action.setName("Transfer Test Token");
4631
+ const execution = new ContractExecution();
4632
+ execution.setContractAddress(tokenContract);
4633
+ let ABI = ["function transfer(address to, uint amount)"];
4634
+ let iface = new import_ethers.ethers.Interface(ABI);
4635
+ const callData = iface.encodeFunctionData("transfer", [
4636
+ address,
4637
+ import_ethers.ethers.parseUnits("12", 18)
4638
+ ]);
4639
+ execution.setCallData(callData);
4640
+ console.log("execution:", execution.toObject());
4641
+ action.setContractExecution(execution);
4642
+ const request = new CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6);
4643
+ const result = await this._callRPC("createTask", request);
4644
+ console.log("createTask.result:", result.toObject());
4645
+ return {
4646
+ id: result.getId()
4647
+ };
4648
+ }
4649
+ async listTasks(address) {
4650
+ const request = new ListTasksReq();
4651
+ const result = await this._callRPC("listTasks", request);
4652
+ console.log("listTasks.result:", result.toObject());
4653
+ const tasks = import_lodash.default.map(
4654
+ result.getTasksList(),
4655
+ (obj) => new task_default(obj)
4656
+ );
4657
+ console.log("listTasks.tasks:", tasks);
4658
+ return {
4659
+ tasks
4660
+ };
4661
+ }
4662
+ // TODO: specify the return type to match client’s requirements
4663
+ // Right now we simply return the original object from the server
4664
+ async getTask(id) {
4665
+ const request = new UUID();
4666
+ request.setBytes(id);
4667
+ const result = await this._callRPC(
4668
+ "getTask",
4669
+ request
4670
+ );
4671
+ console.log("getTask.result:", result.toObject());
4672
+ return result.toObject();
4673
+ }
4674
+ async cancelTask(id) {
4675
+ const request = new UUID();
4676
+ request.setBytes(id);
4677
+ const result = await this._callRPC(
4678
+ "cancelTask",
4679
+ request
4680
+ );
4681
+ return result.getValue();
4682
+ }
4683
+ async deleteTask(id) {
4684
+ const request = new UUID();
4685
+ request.setBytes(id);
4686
+ const result = await this._callRPC(
4687
+ "deleteTask",
4688
+ request
4689
+ );
4690
+ return result.getValue();
4691
+ }
4502
4692
  };
4503
4693
  // Annotate the CommonJS export names for ESM import in node:
4504
4694
  0 && (module.exports = {