@avaprotocol/sdk-js 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -53,6 +53,8 @@ var require_avs_pb = __commonJS({
53
53
  }.call(null);
54
54
  var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js");
55
55
  goog.object.extend(proto, google_protobuf_wrappers_pb);
56
+ var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js");
57
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
56
58
  goog.exportSymbol("proto.aggregator.BlockCondition", null, global);
57
59
  goog.exportSymbol("proto.aggregator.BranchNode", null, global);
58
60
  goog.exportSymbol("proto.aggregator.Condition", null, global);
@@ -66,6 +68,7 @@ var require_avs_pb = __commonJS({
66
68
  goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global);
67
69
  goog.exportSymbol("proto.aggregator.Error", null, global);
68
70
  goog.exportSymbol("proto.aggregator.EventCondition", null, global);
71
+ goog.exportSymbol("proto.aggregator.EventCondition.Matcher", null, global);
69
72
  goog.exportSymbol("proto.aggregator.Execution", null, global);
70
73
  goog.exportSymbol("proto.aggregator.Execution.Step", null, global);
71
74
  goog.exportSymbol("proto.aggregator.ExecutionReq", null, global);
@@ -132,12 +135,19 @@ var require_avs_pb = __commonJS({
132
135
  proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition";
133
136
  }
134
137
  proto.aggregator.EventCondition = function(opt_data) {
135
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
138
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventCondition.repeatedFields_, null);
136
139
  };
137
140
  goog.inherits(proto.aggregator.EventCondition, jspb.Message);
138
141
  if (goog.DEBUG && !COMPILED) {
139
142
  proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition";
140
143
  }
144
+ proto.aggregator.EventCondition.Matcher = function(opt_data) {
145
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EventCondition.Matcher.repeatedFields_, null);
146
+ };
147
+ goog.inherits(proto.aggregator.EventCondition.Matcher, jspb.Message);
148
+ if (goog.DEBUG && !COMPILED) {
149
+ proto.aggregator.EventCondition.Matcher.displayName = "proto.aggregator.EventCondition.Matcher";
150
+ }
141
151
  proto.aggregator.TaskTrigger = function(opt_data) {
142
152
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_);
143
153
  };
@@ -669,13 +679,19 @@ var require_avs_pb = __commonJS({
669
679
  proto.aggregator.BlockCondition.prototype.setInterval = function(value) {
670
680
  return jspb.Message.setProto3IntField(this, 1, value);
671
681
  };
682
+ proto.aggregator.EventCondition.repeatedFields_ = [1];
672
683
  if (jspb.Message.GENERATE_TO_OBJECT) {
673
684
  proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) {
674
685
  return proto.aggregator.EventCondition.toObject(opt_includeInstance, this);
675
686
  };
676
687
  proto.aggregator.EventCondition.toObject = function(includeInstance, msg) {
677
688
  var f, obj = {
678
- expression: jspb.Message.getFieldWithDefault(msg, 1, "")
689
+ matcherList: jspb.Message.toObjectList(
690
+ msg.getMatcherList(),
691
+ proto.aggregator.EventCondition.Matcher.toObject,
692
+ includeInstance
693
+ ),
694
+ expression: jspb.Message.getFieldWithDefault(msg, 2, "")
679
695
  };
680
696
  if (includeInstance) {
681
697
  obj.$jspbMessageInstance = msg;
@@ -696,6 +712,11 @@ var require_avs_pb = __commonJS({
696
712
  var field = reader.getFieldNumber();
697
713
  switch (field) {
698
714
  case 1:
715
+ var value = new proto.aggregator.EventCondition.Matcher();
716
+ reader.readMessage(value, proto.aggregator.EventCondition.Matcher.deserializeBinaryFromReader);
717
+ msg.addMatcher(value);
718
+ break;
719
+ case 2:
699
720
  var value = (
700
721
  /** @type {string} */
701
722
  reader.readString()
@@ -716,23 +737,141 @@ var require_avs_pb = __commonJS({
716
737
  };
717
738
  proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) {
718
739
  var f = void 0;
740
+ f = message.getMatcherList();
741
+ if (f.length > 0) {
742
+ writer.writeRepeatedMessage(
743
+ 1,
744
+ f,
745
+ proto.aggregator.EventCondition.Matcher.serializeBinaryToWriter
746
+ );
747
+ }
719
748
  f = message.getExpression();
749
+ if (f.length > 0) {
750
+ writer.writeString(
751
+ 2,
752
+ f
753
+ );
754
+ }
755
+ };
756
+ proto.aggregator.EventCondition.Matcher.repeatedFields_ = [2];
757
+ if (jspb.Message.GENERATE_TO_OBJECT) {
758
+ proto.aggregator.EventCondition.Matcher.prototype.toObject = function(opt_includeInstance) {
759
+ return proto.aggregator.EventCondition.Matcher.toObject(opt_includeInstance, this);
760
+ };
761
+ proto.aggregator.EventCondition.Matcher.toObject = function(includeInstance, msg) {
762
+ var f, obj = {
763
+ type: jspb.Message.getFieldWithDefault(msg, 1, ""),
764
+ valueList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? void 0 : f
765
+ };
766
+ if (includeInstance) {
767
+ obj.$jspbMessageInstance = msg;
768
+ }
769
+ return obj;
770
+ };
771
+ }
772
+ proto.aggregator.EventCondition.Matcher.deserializeBinary = function(bytes) {
773
+ var reader = new jspb.BinaryReader(bytes);
774
+ var msg = new proto.aggregator.EventCondition.Matcher();
775
+ return proto.aggregator.EventCondition.Matcher.deserializeBinaryFromReader(msg, reader);
776
+ };
777
+ proto.aggregator.EventCondition.Matcher.deserializeBinaryFromReader = function(msg, reader) {
778
+ while (reader.nextField()) {
779
+ if (reader.isEndGroup()) {
780
+ break;
781
+ }
782
+ var field = reader.getFieldNumber();
783
+ switch (field) {
784
+ case 1:
785
+ var value = (
786
+ /** @type {string} */
787
+ reader.readString()
788
+ );
789
+ msg.setType(value);
790
+ break;
791
+ case 2:
792
+ var value = (
793
+ /** @type {string} */
794
+ reader.readString()
795
+ );
796
+ msg.addValue(value);
797
+ break;
798
+ default:
799
+ reader.skipField();
800
+ break;
801
+ }
802
+ }
803
+ return msg;
804
+ };
805
+ proto.aggregator.EventCondition.Matcher.prototype.serializeBinary = function() {
806
+ var writer = new jspb.BinaryWriter();
807
+ proto.aggregator.EventCondition.Matcher.serializeBinaryToWriter(this, writer);
808
+ return writer.getResultBuffer();
809
+ };
810
+ proto.aggregator.EventCondition.Matcher.serializeBinaryToWriter = function(message, writer) {
811
+ var f = void 0;
812
+ f = message.getType();
720
813
  if (f.length > 0) {
721
814
  writer.writeString(
722
815
  1,
723
816
  f
724
817
  );
725
818
  }
819
+ f = message.getValueList();
820
+ if (f.length > 0) {
821
+ writer.writeRepeatedString(
822
+ 2,
823
+ f
824
+ );
825
+ }
726
826
  };
727
- proto.aggregator.EventCondition.prototype.getExpression = function() {
827
+ proto.aggregator.EventCondition.Matcher.prototype.getType = function() {
728
828
  return (
729
829
  /** @type {string} */
730
830
  jspb.Message.getFieldWithDefault(this, 1, "")
731
831
  );
732
832
  };
733
- proto.aggregator.EventCondition.prototype.setExpression = function(value) {
833
+ proto.aggregator.EventCondition.Matcher.prototype.setType = function(value) {
734
834
  return jspb.Message.setProto3StringField(this, 1, value);
735
835
  };
836
+ proto.aggregator.EventCondition.Matcher.prototype.getValueList = function() {
837
+ return (
838
+ /** @type {!Array<string>} */
839
+ jspb.Message.getRepeatedField(this, 2)
840
+ );
841
+ };
842
+ proto.aggregator.EventCondition.Matcher.prototype.setValueList = function(value) {
843
+ return jspb.Message.setField(this, 2, value || []);
844
+ };
845
+ proto.aggregator.EventCondition.Matcher.prototype.addValue = function(value, opt_index) {
846
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
847
+ };
848
+ proto.aggregator.EventCondition.Matcher.prototype.clearValueList = function() {
849
+ return this.setValueList([]);
850
+ };
851
+ proto.aggregator.EventCondition.prototype.getMatcherList = function() {
852
+ return (
853
+ /** @type{!Array<!proto.aggregator.EventCondition.Matcher>} */
854
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.EventCondition.Matcher, 1)
855
+ );
856
+ };
857
+ proto.aggregator.EventCondition.prototype.setMatcherList = function(value) {
858
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
859
+ };
860
+ proto.aggregator.EventCondition.prototype.addMatcher = function(opt_value, opt_index) {
861
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.EventCondition.Matcher, opt_index);
862
+ };
863
+ proto.aggregator.EventCondition.prototype.clearMatcherList = function() {
864
+ return this.setMatcherList([]);
865
+ };
866
+ proto.aggregator.EventCondition.prototype.getExpression = function() {
867
+ return (
868
+ /** @type {string} */
869
+ jspb.Message.getFieldWithDefault(this, 2, "")
870
+ );
871
+ };
872
+ proto.aggregator.EventCondition.prototype.setExpression = function(value) {
873
+ return jspb.Message.setProto3StringField(this, 2, value);
874
+ };
736
875
  proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]];
737
876
  proto.aggregator.TaskTrigger.TriggerTypeCase = {
738
877
  TRIGGER_TYPE_NOT_SET: 0,
@@ -759,7 +898,8 @@ var require_avs_pb = __commonJS({
759
898
  fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedTimeCondition.toObject(includeInstance, f),
760
899
  cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f),
761
900
  block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f),
762
- event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f)
901
+ event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f),
902
+ id: jspb.Message.getFieldWithDefault(msg, 7, "")
763
903
  };
764
904
  if (includeInstance) {
765
905
  obj.$jspbMessageInstance = msg;
@@ -813,6 +953,13 @@ var require_avs_pb = __commonJS({
813
953
  reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader);
814
954
  msg.setEvent(value);
815
955
  break;
956
+ case 7:
957
+ var value = (
958
+ /** @type {string} */
959
+ reader.readString()
960
+ );
961
+ msg.setId(value);
962
+ break;
816
963
  default:
817
964
  reader.skipField();
818
965
  break;
@@ -874,6 +1021,13 @@ var require_avs_pb = __commonJS({
874
1021
  proto.aggregator.EventCondition.serializeBinaryToWriter
875
1022
  );
876
1023
  }
1024
+ f = message.getId();
1025
+ if (f.length > 0) {
1026
+ writer.writeString(
1027
+ 7,
1028
+ f
1029
+ );
1030
+ }
877
1031
  };
878
1032
  proto.aggregator.TaskTrigger.prototype.getName = function() {
879
1033
  return (
@@ -959,6 +1113,15 @@ var require_avs_pb = __commonJS({
959
1113
  proto.aggregator.TaskTrigger.prototype.hasEvent = function() {
960
1114
  return jspb.Message.getField(this, 6) != null;
961
1115
  };
1116
+ proto.aggregator.TaskTrigger.prototype.getId = function() {
1117
+ return (
1118
+ /** @type {string} */
1119
+ jspb.Message.getFieldWithDefault(this, 7, "")
1120
+ );
1121
+ };
1122
+ proto.aggregator.TaskTrigger.prototype.setId = function(value) {
1123
+ return jspb.Message.setProto3StringField(this, 7, value);
1124
+ };
962
1125
  if (jspb.Message.GENERATE_TO_OBJECT) {
963
1126
  proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) {
964
1127
  return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this);
@@ -1827,7 +1990,8 @@ var require_avs_pb = __commonJS({
1827
1990
  };
1828
1991
  proto.aggregator.FilterNode.toObject = function(includeInstance, msg) {
1829
1992
  var f, obj = {
1830
- expression: jspb.Message.getFieldWithDefault(msg, 1, "")
1993
+ expression: jspb.Message.getFieldWithDefault(msg, 1, ""),
1994
+ input: jspb.Message.getFieldWithDefault(msg, 2, "")
1831
1995
  };
1832
1996
  if (includeInstance) {
1833
1997
  obj.$jspbMessageInstance = msg;
@@ -1854,6 +2018,13 @@ var require_avs_pb = __commonJS({
1854
2018
  );
1855
2019
  msg.setExpression(value);
1856
2020
  break;
2021
+ case 2:
2022
+ var value = (
2023
+ /** @type {string} */
2024
+ reader.readString()
2025
+ );
2026
+ msg.setInput(value);
2027
+ break;
1857
2028
  default:
1858
2029
  reader.skipField();
1859
2030
  break;
@@ -1875,6 +2046,13 @@ var require_avs_pb = __commonJS({
1875
2046
  f
1876
2047
  );
1877
2048
  }
2049
+ f = message.getInput();
2050
+ if (f.length > 0) {
2051
+ writer.writeString(
2052
+ 2,
2053
+ f
2054
+ );
2055
+ }
1878
2056
  };
1879
2057
  proto.aggregator.FilterNode.prototype.getExpression = function() {
1880
2058
  return (
@@ -1885,6 +2063,15 @@ var require_avs_pb = __commonJS({
1885
2063
  proto.aggregator.FilterNode.prototype.setExpression = function(value) {
1886
2064
  return jspb.Message.setProto3StringField(this, 1, value);
1887
2065
  };
2066
+ proto.aggregator.FilterNode.prototype.getInput = function() {
2067
+ return (
2068
+ /** @type {string} */
2069
+ jspb.Message.getFieldWithDefault(this, 2, "")
2070
+ );
2071
+ };
2072
+ proto.aggregator.FilterNode.prototype.setInput = function(value) {
2073
+ return jspb.Message.setProto3StringField(this, 2, value);
2074
+ };
1888
2075
  proto.aggregator.LoopNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15]];
1889
2076
  proto.aggregator.LoopNode.RunnerCase = {
1890
2077
  RUNNER_NOT_SET: 0,
@@ -3134,7 +3321,7 @@ var require_avs_pb = __commonJS({
3134
3321
  smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
3135
3322
  startAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
3136
3323
  expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
3137
- memo: jspb.Message.getFieldWithDefault(msg, 6, ""),
3324
+ name: jspb.Message.getFieldWithDefault(msg, 6, ""),
3138
3325
  completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
3139
3326
  maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0),
3140
3327
  totalExecution: jspb.Message.getFieldWithDefault(msg, 9, 0),
@@ -3210,7 +3397,7 @@ var require_avs_pb = __commonJS({
3210
3397
  /** @type {string} */
3211
3398
  reader.readString()
3212
3399
  );
3213
- msg.setMemo(value);
3400
+ msg.setName(value);
3214
3401
  break;
3215
3402
  case 7:
3216
3403
  var value = (
@@ -3311,7 +3498,7 @@ var require_avs_pb = __commonJS({
3311
3498
  f
3312
3499
  );
3313
3500
  }
3314
- f = message.getMemo();
3501
+ f = message.getName();
3315
3502
  if (f.length > 0) {
3316
3503
  writer.writeString(
3317
3504
  6,
@@ -3423,13 +3610,13 @@ var require_avs_pb = __commonJS({
3423
3610
  proto.aggregator.Task.prototype.setExpiredAt = function(value) {
3424
3611
  return jspb.Message.setProto3IntField(this, 5, value);
3425
3612
  };
3426
- proto.aggregator.Task.prototype.getMemo = function() {
3613
+ proto.aggregator.Task.prototype.getName = function() {
3427
3614
  return (
3428
3615
  /** @type {string} */
3429
3616
  jspb.Message.getFieldWithDefault(this, 6, "")
3430
3617
  );
3431
3618
  };
3432
- proto.aggregator.Task.prototype.setMemo = function(value) {
3619
+ proto.aggregator.Task.prototype.setName = function(value) {
3433
3620
  return jspb.Message.setProto3StringField(this, 6, value);
3434
3621
  };
3435
3622
  proto.aggregator.Task.prototype.getCompletedAt = function() {
@@ -3534,7 +3721,7 @@ var require_avs_pb = __commonJS({
3534
3721
  expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0),
3535
3722
  maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0),
3536
3723
  smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""),
3537
- memo: jspb.Message.getFieldWithDefault(msg, 6, ""),
3724
+ name: jspb.Message.getFieldWithDefault(msg, 6, ""),
3538
3725
  nodesList: jspb.Message.toObjectList(
3539
3726
  msg.getNodesList(),
3540
3727
  proto.aggregator.TaskNode.toObject,
@@ -3602,7 +3789,7 @@ var require_avs_pb = __commonJS({
3602
3789
  /** @type {string} */
3603
3790
  reader.readString()
3604
3791
  );
3605
- msg.setMemo(value);
3792
+ msg.setName(value);
3606
3793
  break;
3607
3794
  case 7:
3608
3795
  var value = new proto.aggregator.TaskNode();
@@ -3664,7 +3851,7 @@ var require_avs_pb = __commonJS({
3664
3851
  f
3665
3852
  );
3666
3853
  }
3667
- f = message.getMemo();
3854
+ f = message.getName();
3668
3855
  if (f.length > 0) {
3669
3856
  writer.writeString(
3670
3857
  6,
@@ -3739,13 +3926,13 @@ var require_avs_pb = __commonJS({
3739
3926
  proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) {
3740
3927
  return jspb.Message.setProto3StringField(this, 5, value);
3741
3928
  };
3742
- proto.aggregator.CreateTaskReq.prototype.getMemo = function() {
3929
+ proto.aggregator.CreateTaskReq.prototype.getName = function() {
3743
3930
  return (
3744
3931
  /** @type {string} */
3745
3932
  jspb.Message.getFieldWithDefault(this, 6, "")
3746
3933
  );
3747
3934
  };
3748
- proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) {
3935
+ proto.aggregator.CreateTaskReq.prototype.setName = function(value) {
3749
3936
  return jspb.Message.setProto3StringField(this, 6, value);
3750
3937
  };
3751
3938
  proto.aggregator.CreateTaskReq.prototype.getNodesList = function() {
@@ -4463,7 +4650,7 @@ var require_avs_pb = __commonJS({
4463
4650
  smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
4464
4651
  startAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
4465
4652
  expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
4466
- memo: jspb.Message.getFieldWithDefault(msg, 6, ""),
4653
+ name: jspb.Message.getFieldWithDefault(msg, 6, ""),
4467
4654
  completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
4468
4655
  maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0),
4469
4656
  totalExecution: jspb.Message.getFieldWithDefault(msg, 9, 0),
@@ -4529,7 +4716,7 @@ var require_avs_pb = __commonJS({
4529
4716
  /** @type {string} */
4530
4717
  reader.readString()
4531
4718
  );
4532
- msg.setMemo(value);
4719
+ msg.setName(value);
4533
4720
  break;
4534
4721
  case 7:
4535
4722
  var value = (
@@ -4620,7 +4807,7 @@ var require_avs_pb = __commonJS({
4620
4807
  f
4621
4808
  );
4622
4809
  }
4623
- f = message.getMemo();
4810
+ f = message.getName();
4624
4811
  if (f.length > 0) {
4625
4812
  writer.writeString(
4626
4813
  6,
@@ -4716,13 +4903,13 @@ var require_avs_pb = __commonJS({
4716
4903
  proto.aggregator.ListTasksResp.Item.prototype.setExpiredAt = function(value) {
4717
4904
  return jspb.Message.setProto3IntField(this, 5, value);
4718
4905
  };
4719
- proto.aggregator.ListTasksResp.Item.prototype.getMemo = function() {
4906
+ proto.aggregator.ListTasksResp.Item.prototype.getName = function() {
4720
4907
  return (
4721
4908
  /** @type {string} */
4722
4909
  jspb.Message.getFieldWithDefault(this, 6, "")
4723
4910
  );
4724
4911
  };
4725
- proto.aggregator.ListTasksResp.Item.prototype.setMemo = function(value) {
4912
+ proto.aggregator.ListTasksResp.Item.prototype.setName = function(value) {
4726
4913
  return jspb.Message.setProto3StringField(this, 6, value);
4727
4914
  };
4728
4915
  proto.aggregator.ListTasksResp.Item.prototype.getCompletedAt = function() {
@@ -5218,8 +5405,10 @@ var require_avs_pb = __commonJS({
5218
5405
  proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) {
5219
5406
  var f, obj = {
5220
5407
  owner: jspb.Message.getFieldWithDefault(msg, 1, ""),
5221
- expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0),
5222
- signature: jspb.Message.getFieldWithDefault(msg, 3, "")
5408
+ chainId: jspb.Message.getFieldWithDefault(msg, 2, 0),
5409
+ issuedAt: (f = msg.getIssuedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
5410
+ expiredAt: (f = msg.getExpiredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
5411
+ signature: jspb.Message.getFieldWithDefault(msg, 5, "")
5223
5412
  };
5224
5413
  if (includeInstance) {
5225
5414
  obj.$jspbMessageInstance = msg;
@@ -5251,9 +5440,19 @@ var require_avs_pb = __commonJS({
5251
5440
  /** @type {number} */
5252
5441
  reader.readInt64()
5253
5442
  );
5254
- msg.setExpiredAt(value);
5443
+ msg.setChainId(value);
5255
5444
  break;
5256
5445
  case 3:
5446
+ var value = new google_protobuf_timestamp_pb.Timestamp();
5447
+ reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
5448
+ msg.setIssuedAt(value);
5449
+ break;
5450
+ case 4:
5451
+ var value = new google_protobuf_timestamp_pb.Timestamp();
5452
+ reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
5453
+ msg.setExpiredAt(value);
5454
+ break;
5455
+ case 5:
5257
5456
  var value = (
5258
5457
  /** @type {string} */
5259
5458
  reader.readString()
@@ -5281,17 +5480,33 @@ var require_avs_pb = __commonJS({
5281
5480
  f
5282
5481
  );
5283
5482
  }
5284
- f = message.getExpiredAt();
5483
+ f = message.getChainId();
5285
5484
  if (f !== 0) {
5286
5485
  writer.writeInt64(
5287
5486
  2,
5288
5487
  f
5289
5488
  );
5290
5489
  }
5490
+ f = message.getIssuedAt();
5491
+ if (f != null) {
5492
+ writer.writeMessage(
5493
+ 3,
5494
+ f,
5495
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
5496
+ );
5497
+ }
5498
+ f = message.getExpiredAt();
5499
+ if (f != null) {
5500
+ writer.writeMessage(
5501
+ 4,
5502
+ f,
5503
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
5504
+ );
5505
+ }
5291
5506
  f = message.getSignature();
5292
5507
  if (f.length > 0) {
5293
5508
  writer.writeString(
5294
- 3,
5509
+ 5,
5295
5510
  f
5296
5511
  );
5297
5512
  }
@@ -5305,23 +5520,53 @@ var require_avs_pb = __commonJS({
5305
5520
  proto.aggregator.GetKeyReq.prototype.setOwner = function(value) {
5306
5521
  return jspb.Message.setProto3StringField(this, 1, value);
5307
5522
  };
5308
- proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() {
5523
+ proto.aggregator.GetKeyReq.prototype.getChainId = function() {
5309
5524
  return (
5310
5525
  /** @type {number} */
5311
5526
  jspb.Message.getFieldWithDefault(this, 2, 0)
5312
5527
  );
5313
5528
  };
5314
- proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) {
5529
+ proto.aggregator.GetKeyReq.prototype.setChainId = function(value) {
5315
5530
  return jspb.Message.setProto3IntField(this, 2, value);
5316
5531
  };
5532
+ proto.aggregator.GetKeyReq.prototype.getIssuedAt = function() {
5533
+ return (
5534
+ /** @type{?proto.google.protobuf.Timestamp} */
5535
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)
5536
+ );
5537
+ };
5538
+ proto.aggregator.GetKeyReq.prototype.setIssuedAt = function(value) {
5539
+ return jspb.Message.setWrapperField(this, 3, value);
5540
+ };
5541
+ proto.aggregator.GetKeyReq.prototype.clearIssuedAt = function() {
5542
+ return this.setIssuedAt(void 0);
5543
+ };
5544
+ proto.aggregator.GetKeyReq.prototype.hasIssuedAt = function() {
5545
+ return jspb.Message.getField(this, 3) != null;
5546
+ };
5547
+ proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() {
5548
+ return (
5549
+ /** @type{?proto.google.protobuf.Timestamp} */
5550
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)
5551
+ );
5552
+ };
5553
+ proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) {
5554
+ return jspb.Message.setWrapperField(this, 4, value);
5555
+ };
5556
+ proto.aggregator.GetKeyReq.prototype.clearExpiredAt = function() {
5557
+ return this.setExpiredAt(void 0);
5558
+ };
5559
+ proto.aggregator.GetKeyReq.prototype.hasExpiredAt = function() {
5560
+ return jspb.Message.getField(this, 4) != null;
5561
+ };
5317
5562
  proto.aggregator.GetKeyReq.prototype.getSignature = function() {
5318
5563
  return (
5319
5564
  /** @type {string} */
5320
- jspb.Message.getFieldWithDefault(this, 3, "")
5565
+ jspb.Message.getFieldWithDefault(this, 5, "")
5321
5566
  );
5322
5567
  };
5323
5568
  proto.aggregator.GetKeyReq.prototype.setSignature = function(value) {
5324
- return jspb.Message.setProto3StringField(this, 3, value);
5569
+ return jspb.Message.setProto3StringField(this, 5, value);
5325
5570
  };
5326
5571
  if (jspb.Message.GENERATE_TO_OBJECT) {
5327
5572
  proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) {
@@ -5996,6 +6241,7 @@ var require_avs_grpc_pb = __commonJS({
5996
6241
  var grpc2 = require("@grpc/grpc-js");
5997
6242
  var avs_pb20 = require_avs_pb();
5998
6243
  var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js");
6244
+ var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js");
5999
6245
  function serialize_aggregator_CreateTaskReq(arg) {
6000
6246
  if (!(arg instanceof avs_pb20.CreateTaskReq)) {
6001
6247
  throw new Error("Expected argument of type aggregator.CreateTaskReq");
@@ -6382,13 +6628,21 @@ var grpc = __toESM(require("@grpc/grpc-js"));
6382
6628
  var import_grpc_js = require("@grpc/grpc-js");
6383
6629
 
6384
6630
  // src/auth.ts
6385
- var getKeyRequestMessage = (address, expiredAt) => {
6386
- return `key request for ${address} expired at ${expiredAt}`;
6631
+ var getKeyRequestMessage = (chainId, address, issuedAt, expiredAt) => {
6632
+ return `Please sign the below text for ownership verification.
6633
+
6634
+ URI: https://app.avaprotocol.org
6635
+ Chain ID: ${chainId}
6636
+ Version: 1
6637
+ Issued At: ${issuedAt.toISOString()}
6638
+ Expire At: ${expiredAt.toISOString()}
6639
+ Wallet: ${address}`;
6387
6640
  };
6388
6641
 
6389
6642
  // src/index.ts
6390
6643
  var import_avs_grpc_pb = __toESM(require_avs_grpc_pb());
6391
6644
  var avs_pb19 = __toESM(require_avs_pb());
6645
+ var import_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb");
6392
6646
 
6393
6647
  // src/models/workflow.ts
6394
6648
  var import_lodash3 = __toESM(require("lodash"));
@@ -6425,6 +6679,7 @@ var Trigger = class {
6425
6679
  * @param props
6426
6680
  */
6427
6681
  constructor(props) {
6682
+ this.id = props.id;
6428
6683
  this.name = props.name;
6429
6684
  this.type = props.type;
6430
6685
  this.data = props.data;
@@ -6466,6 +6721,7 @@ var BlockTrigger = class _BlockTrigger extends interface_default {
6466
6721
  toRequest() {
6467
6722
  const request = new avs_pb3.TaskTrigger();
6468
6723
  request.setName(this.name);
6724
+ request.setId(this.id);
6469
6725
  if (!this.data) {
6470
6726
  throw new Error(`Trigger data is missing for ${this.type}`);
6471
6727
  }
@@ -6499,6 +6755,7 @@ var CronTrigger = class _CronTrigger extends interface_default {
6499
6755
  toRequest() {
6500
6756
  const request = new avs_pb4.TaskTrigger();
6501
6757
  request.setName(this.name);
6758
+ request.setId(this.id);
6502
6759
  if (!this.data) {
6503
6760
  throw new Error(`Trigger data is missing for ${this.type}`);
6504
6761
  }
@@ -6534,11 +6791,25 @@ var EventTrigger = class _EventTrigger extends interface_default {
6534
6791
  toRequest() {
6535
6792
  const request = new avs_pb5.TaskTrigger();
6536
6793
  request.setName(this.name);
6794
+ request.setId(this.id);
6537
6795
  if (!this.data) {
6538
6796
  throw new Error(`Trigger data is missing for ${this.type}`);
6539
6797
  }
6540
6798
  const condition = new avs_pb5.EventCondition();
6541
- condition.setExpression(this.data.expression);
6799
+ const expression = this.data.expression;
6800
+ const matcher = this.data.matcher;
6801
+ if (expression && expression != "") {
6802
+ condition.setExpression(expression);
6803
+ }
6804
+ if (matcher && matcher.length >= 1) {
6805
+ console.log("hit here", matcher);
6806
+ condition.setMatcherList(matcher.map((element) => {
6807
+ const m = new avs_pb5.EventCondition.Matcher();
6808
+ m.setType(element["type"]);
6809
+ m.setValueList(element["value"]);
6810
+ return m;
6811
+ }));
6812
+ }
6542
6813
  request.setEvent(condition);
6543
6814
  console.log("EventTrigger.toRequest.request:", request.toObject());
6544
6815
  return request;
@@ -6546,10 +6817,22 @@ var EventTrigger = class _EventTrigger extends interface_default {
6546
6817
  static fromResponse(raw) {
6547
6818
  const obj = raw.toObject();
6548
6819
  console.log("EventTrigger.fromResponse.obj:", obj);
6820
+ let data = {};
6821
+ if (raw.getEvent().getExpression()) {
6822
+ data.expression = raw.getEvent().getExpression();
6823
+ }
6824
+ if (raw.getEvent().getMatcherList()) {
6825
+ data.matcher = raw.getEvent().getMatcherList().map((item) => {
6826
+ return {
6827
+ type: item.getType(),
6828
+ value: item.getValueList()
6829
+ };
6830
+ });
6831
+ }
6549
6832
  return new _EventTrigger({
6550
6833
  ...obj,
6551
6834
  type: "event" /* Event */,
6552
- data: raw.getEvent().toObject()
6835
+ data
6553
6836
  });
6554
6837
  }
6555
6838
  };
@@ -6569,6 +6852,7 @@ var FixedTimeTrigger = class _FixedTimeTrigger extends interface_default {
6569
6852
  toRequest() {
6570
6853
  const request = new avs_pb6.TaskTrigger();
6571
6854
  request.setName(this.name);
6855
+ request.setId(this.id);
6572
6856
  if (!this.data) {
6573
6857
  throw new Error(`Trigger data is missing for ${this.type}`);
6574
6858
  }
@@ -6962,7 +7246,7 @@ var Workflow = class _Workflow {
6962
7246
  this.maxExecution = props.maxExecution;
6963
7247
  this.id = props.id;
6964
7248
  this.owner = props.owner;
6965
- this.memo = props.memo;
7249
+ this.name = props.name;
6966
7250
  this.status = props.status;
6967
7251
  this.completedAt = props.completedAt;
6968
7252
  this.totalExecution = props.totalExecution;
@@ -6993,7 +7277,7 @@ var Workflow = class _Workflow {
6993
7277
  startAt: obj.getStartAt(),
6994
7278
  expiredAt: obj.getExpiredAt(),
6995
7279
  maxExecution: obj.getMaxExecution(),
6996
- memo: obj.getMemo(),
7280
+ name: obj.getName(),
6997
7281
  status: convertStatusToString(obj.getStatus()),
6998
7282
  completedAt: obj.getCompletedAt(),
6999
7283
  totalExecution: obj.getTotalExecution(),
@@ -7022,7 +7306,7 @@ var Workflow = class _Workflow {
7022
7306
  edges: [],
7023
7307
  completedAt: obj.getCompletedAt(),
7024
7308
  status: convertStatusToString(obj.getStatus()),
7025
- memo: obj.getMemo(),
7309
+ name: obj.getName(),
7026
7310
  totalExecution: obj.getTotalExecution(),
7027
7311
  lastRanAt: obj.getLastRanAt()
7028
7312
  });
@@ -7036,8 +7320,8 @@ var Workflow = class _Workflow {
7036
7320
  request.setStartAt(this.startAt);
7037
7321
  request.setExpiredAt(this.expiredAt);
7038
7322
  request.setMaxExecution(this.maxExecution);
7039
- if (this.memo) {
7040
- request.setMemo(this.memo);
7323
+ if (this.name) {
7324
+ request.setName(this.name);
7041
7325
  }
7042
7326
  return request;
7043
7327
  }
@@ -7253,10 +7537,20 @@ var BaseClient = class {
7253
7537
  * @param expiredAtEpoch - The expiration epoch
7254
7538
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
7255
7539
  */
7256
- async authWithAPIKey(address, apiKey, expiredAtEpoch) {
7540
+ async authWithAPIKey({
7541
+ chainId,
7542
+ address,
7543
+ issuedAt,
7544
+ expiredAt,
7545
+ apiKey
7546
+ }) {
7257
7547
  const request = new avs_pb19.GetKeyReq();
7548
+ request.setChainId(chainId);
7258
7549
  request.setOwner(address);
7259
- request.setExpiredAt(expiredAtEpoch);
7550
+ const issueTs = import_timestamp_pb.Timestamp.fromDate(issuedAt);
7551
+ const expiredTs = import_timestamp_pb.Timestamp.fromDate(expiredAt);
7552
+ request.setIssuedAt(issueTs);
7553
+ request.setExpiredAt(expiredTs);
7260
7554
  request.setSignature(apiKey);
7261
7555
  const result = await this.sendGrpcRequest("getKey", request);
7262
7556
  return { authKey: result.getKey() };
@@ -7268,10 +7562,20 @@ var BaseClient = class {
7268
7562
  * @param expiredAtEpoch - The expiration epoch
7269
7563
  * @returns {Promise<GetKeyResponse>} - The response from the auth call
7270
7564
  */
7271
- async authWithSignature(address, signature, expiredAtEpoch) {
7565
+ async authWithSignature({
7566
+ chainId,
7567
+ address,
7568
+ issuedAt,
7569
+ expiredAt,
7570
+ signature
7571
+ }) {
7272
7572
  const request = new avs_pb19.GetKeyReq();
7573
+ request.setChainId(chainId);
7273
7574
  request.setOwner(address);
7274
- request.setExpiredAt(expiredAtEpoch);
7575
+ const issueTs = import_timestamp_pb.Timestamp.fromDate(issuedAt);
7576
+ const expiredTs = import_timestamp_pb.Timestamp.fromDate(expiredAt);
7577
+ request.setIssuedAt(issueTs);
7578
+ request.setExpiredAt(expiredTs);
7275
7579
  request.setSignature(signature);
7276
7580
  const result = await this.sendGrpcRequest(
7277
7581
  "getKey",