@avaprotocol/sdk-js 2.14.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -53,7 +53,6 @@ var require_avs_pb = __commonJS({
53
53
  }.call(null);
54
54
  var google_protobuf_struct_pb4 = require("google-protobuf/google/protobuf/struct_pb.js");
55
55
  goog.object.extend(proto, google_protobuf_struct_pb4);
56
- goog.exportSymbol("proto.aggregator.AutomationFee", null, global);
57
56
  goog.exportSymbol("proto.aggregator.BalanceNode", null, global);
58
57
  goog.exportSymbol("proto.aggregator.BalanceNode.Config", null, global);
59
58
  goog.exportSymbol("proto.aggregator.BalanceNode.Output", null, global);
@@ -107,6 +106,8 @@ var require_avs_pb = __commonJS({
107
106
  goog.exportSymbol("proto.aggregator.ExecutionReq", null, global);
108
107
  goog.exportSymbol("proto.aggregator.ExecutionStatus", null, global);
109
108
  goog.exportSymbol("proto.aggregator.ExecutionStatusResp", null, global);
109
+ goog.exportSymbol("proto.aggregator.ExecutionTier", null, global);
110
+ goog.exportSymbol("proto.aggregator.Fee", null, global);
110
111
  goog.exportSymbol("proto.aggregator.FeeAmount", null, global);
111
112
  goog.exportSymbol("proto.aggregator.FeeDiscount", null, global);
112
113
  goog.exportSymbol("proto.aggregator.FilterNode", null, global);
@@ -151,6 +152,8 @@ var require_avs_pb = __commonJS({
151
152
  goog.exportSymbol("proto.aggregator.ManualTrigger", null, global);
152
153
  goog.exportSymbol("proto.aggregator.ManualTrigger.Config", null, global);
153
154
  goog.exportSymbol("proto.aggregator.ManualTrigger.Output", null, global);
155
+ goog.exportSymbol("proto.aggregator.NativeToken", null, global);
156
+ goog.exportSymbol("proto.aggregator.NodeCOGS", null, global);
154
157
  goog.exportSymbol("proto.aggregator.NodeType", null, global);
155
158
  goog.exportSymbol("proto.aggregator.NonceRequest", null, global);
156
159
  goog.exportSymbol("proto.aggregator.NonceResp", null, global);
@@ -184,6 +187,7 @@ var require_avs_pb = __commonJS({
184
187
  goog.exportSymbol("proto.aggregator.TriggerTaskResp", null, global);
185
188
  goog.exportSymbol("proto.aggregator.TriggerType", null, global);
186
189
  goog.exportSymbol("proto.aggregator.UpdateSecretResp", null, global);
190
+ goog.exportSymbol("proto.aggregator.ValueFee", null, global);
187
191
  goog.exportSymbol("proto.aggregator.WithdrawFundsReq", null, global);
188
192
  goog.exportSymbol("proto.aggregator.WithdrawFundsResp", null, global);
189
193
  proto.aggregator.TokenMetadata = function(opt_data) {
@@ -991,12 +995,33 @@ var require_avs_pb = __commonJS({
991
995
  if (goog.DEBUG && !COMPILED) {
992
996
  proto.aggregator.SmartWalletCreationFee.displayName = "proto.aggregator.SmartWalletCreationFee";
993
997
  }
994
- proto.aggregator.AutomationFee = function(opt_data) {
998
+ proto.aggregator.Fee = function(opt_data) {
995
999
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
996
1000
  };
997
- goog.inherits(proto.aggregator.AutomationFee, jspb.Message);
1001
+ goog.inherits(proto.aggregator.Fee, jspb.Message);
998
1002
  if (goog.DEBUG && !COMPILED) {
999
- proto.aggregator.AutomationFee.displayName = "proto.aggregator.AutomationFee";
1003
+ proto.aggregator.Fee.displayName = "proto.aggregator.Fee";
1004
+ }
1005
+ proto.aggregator.NativeToken = function(opt_data) {
1006
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1007
+ };
1008
+ goog.inherits(proto.aggregator.NativeToken, jspb.Message);
1009
+ if (goog.DEBUG && !COMPILED) {
1010
+ proto.aggregator.NativeToken.displayName = "proto.aggregator.NativeToken";
1011
+ }
1012
+ proto.aggregator.NodeCOGS = function(opt_data) {
1013
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1014
+ };
1015
+ goog.inherits(proto.aggregator.NodeCOGS, jspb.Message);
1016
+ if (goog.DEBUG && !COMPILED) {
1017
+ proto.aggregator.NodeCOGS.displayName = "proto.aggregator.NodeCOGS";
1018
+ }
1019
+ proto.aggregator.ValueFee = function(opt_data) {
1020
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1021
+ };
1022
+ goog.inherits(proto.aggregator.ValueFee, jspb.Message);
1023
+ if (goog.DEBUG && !COMPILED) {
1024
+ proto.aggregator.ValueFee.displayName = "proto.aggregator.ValueFee";
1000
1025
  }
1001
1026
  proto.aggregator.FeeDiscount = function(opt_data) {
1002
1027
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
@@ -7572,7 +7597,7 @@ var require_avs_pb = __commonJS({
7572
7597
  proto.aggregator.TaskNode.prototype.hasBalance = function() {
7573
7598
  return jspb.Message.getField(this, 19) != null;
7574
7599
  };
7575
- proto.aggregator.Execution.repeatedFields_ = [8];
7600
+ proto.aggregator.Execution.repeatedFields_ = [9, 8];
7576
7601
  if (jspb.Message.GENERATE_TO_OBJECT) {
7577
7602
  proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) {
7578
7603
  return proto.aggregator.Execution.toObject(opt_includeInstance, this);
@@ -7585,8 +7610,13 @@ var require_avs_pb = __commonJS({
7585
7610
  status: jspb.Message.getFieldWithDefault(msg, 4, 0),
7586
7611
  error: jspb.Message.getFieldWithDefault(msg, 5, ""),
7587
7612
  index: jspb.Message.getFieldWithDefault(msg, 6, 0),
7588
- totalGasCost: jspb.Message.getFieldWithDefault(msg, 7, ""),
7589
- automationFee: (f = msg.getAutomationFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
7613
+ executionFee: (f = msg.getExecutionFee()) && proto.aggregator.Fee.toObject(includeInstance, f),
7614
+ cogsList: jspb.Message.toObjectList(
7615
+ msg.getCogsList(),
7616
+ proto.aggregator.NodeCOGS.toObject,
7617
+ includeInstance
7618
+ ),
7619
+ valueFee: (f = msg.getValueFee()) && proto.aggregator.ValueFee.toObject(includeInstance, f),
7590
7620
  stepsList: jspb.Message.toObjectList(
7591
7621
  msg.getStepsList(),
7592
7622
  proto.aggregator.Execution.Step.toObject,
@@ -7654,16 +7684,19 @@ var require_avs_pb = __commonJS({
7654
7684
  msg.setIndex(value);
7655
7685
  break;
7656
7686
  case 7:
7657
- var value = (
7658
- /** @type {string} */
7659
- reader.readString()
7660
- );
7661
- msg.setTotalGasCost(value);
7687
+ var value = new proto.aggregator.Fee();
7688
+ reader.readMessage(value, proto.aggregator.Fee.deserializeBinaryFromReader);
7689
+ msg.setExecutionFee(value);
7662
7690
  break;
7663
7691
  case 9:
7664
- var value = new proto.aggregator.FeeAmount();
7665
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
7666
- msg.setAutomationFee(value);
7692
+ var value = new proto.aggregator.NodeCOGS();
7693
+ reader.readMessage(value, proto.aggregator.NodeCOGS.deserializeBinaryFromReader);
7694
+ msg.addCogs(value);
7695
+ break;
7696
+ case 10:
7697
+ var value = new proto.aggregator.ValueFee();
7698
+ reader.readMessage(value, proto.aggregator.ValueFee.deserializeBinaryFromReader);
7699
+ msg.setValueFee(value);
7667
7700
  break;
7668
7701
  case 8:
7669
7702
  var value = new proto.aggregator.Execution.Step();
@@ -7726,19 +7759,28 @@ var require_avs_pb = __commonJS({
7726
7759
  f
7727
7760
  );
7728
7761
  }
7729
- f = message.getTotalGasCost();
7730
- if (f.length > 0) {
7731
- writer.writeString(
7762
+ f = message.getExecutionFee();
7763
+ if (f != null) {
7764
+ writer.writeMessage(
7732
7765
  7,
7733
- f
7766
+ f,
7767
+ proto.aggregator.Fee.serializeBinaryToWriter
7734
7768
  );
7735
7769
  }
7736
- f = message.getAutomationFee();
7770
+ f = message.getCogsList();
7771
+ if (f.length > 0) {
7772
+ writer.writeRepeatedMessage(
7773
+ 9,
7774
+ f,
7775
+ proto.aggregator.NodeCOGS.serializeBinaryToWriter
7776
+ );
7777
+ }
7778
+ f = message.getValueFee();
7737
7779
  if (f != null) {
7738
7780
  writer.writeMessage(
7739
- 9,
7781
+ 10,
7740
7782
  f,
7741
- proto.aggregator.FeeAmount.serializeBinaryToWriter
7783
+ proto.aggregator.ValueFee.serializeBinaryToWriter
7742
7784
  );
7743
7785
  }
7744
7786
  f = message.getStepsList();
@@ -8710,29 +8752,50 @@ var require_avs_pb = __commonJS({
8710
8752
  proto.aggregator.Execution.prototype.setIndex = function(value) {
8711
8753
  return jspb.Message.setProto3IntField(this, 6, value);
8712
8754
  };
8713
- proto.aggregator.Execution.prototype.getTotalGasCost = function() {
8755
+ proto.aggregator.Execution.prototype.getExecutionFee = function() {
8714
8756
  return (
8715
- /** @type {string} */
8716
- jspb.Message.getFieldWithDefault(this, 7, "")
8757
+ /** @type{?proto.aggregator.Fee} */
8758
+ jspb.Message.getWrapperField(this, proto.aggregator.Fee, 7)
8717
8759
  );
8718
8760
  };
8719
- proto.aggregator.Execution.prototype.setTotalGasCost = function(value) {
8720
- return jspb.Message.setProto3StringField(this, 7, value);
8761
+ proto.aggregator.Execution.prototype.setExecutionFee = function(value) {
8762
+ return jspb.Message.setWrapperField(this, 7, value);
8763
+ };
8764
+ proto.aggregator.Execution.prototype.clearExecutionFee = function() {
8765
+ return this.setExecutionFee(void 0);
8766
+ };
8767
+ proto.aggregator.Execution.prototype.hasExecutionFee = function() {
8768
+ return jspb.Message.getField(this, 7) != null;
8721
8769
  };
8722
- proto.aggregator.Execution.prototype.getAutomationFee = function() {
8770
+ proto.aggregator.Execution.prototype.getCogsList = function() {
8723
8771
  return (
8724
- /** @type{?proto.aggregator.FeeAmount} */
8725
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 9)
8772
+ /** @type{!Array<!proto.aggregator.NodeCOGS>} */
8773
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.NodeCOGS, 9)
8726
8774
  );
8727
8775
  };
8728
- proto.aggregator.Execution.prototype.setAutomationFee = function(value) {
8729
- return jspb.Message.setWrapperField(this, 9, value);
8776
+ proto.aggregator.Execution.prototype.setCogsList = function(value) {
8777
+ return jspb.Message.setRepeatedWrapperField(this, 9, value);
8730
8778
  };
8731
- proto.aggregator.Execution.prototype.clearAutomationFee = function() {
8732
- return this.setAutomationFee(void 0);
8779
+ proto.aggregator.Execution.prototype.addCogs = function(opt_value, opt_index) {
8780
+ return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.aggregator.NodeCOGS, opt_index);
8733
8781
  };
8734
- proto.aggregator.Execution.prototype.hasAutomationFee = function() {
8735
- return jspb.Message.getField(this, 9) != null;
8782
+ proto.aggregator.Execution.prototype.clearCogsList = function() {
8783
+ return this.setCogsList([]);
8784
+ };
8785
+ proto.aggregator.Execution.prototype.getValueFee = function() {
8786
+ return (
8787
+ /** @type{?proto.aggregator.ValueFee} */
8788
+ jspb.Message.getWrapperField(this, proto.aggregator.ValueFee, 10)
8789
+ );
8790
+ };
8791
+ proto.aggregator.Execution.prototype.setValueFee = function(value) {
8792
+ return jspb.Message.setWrapperField(this, 10, value);
8793
+ };
8794
+ proto.aggregator.Execution.prototype.clearValueFee = function() {
8795
+ return this.setValueFee(void 0);
8796
+ };
8797
+ proto.aggregator.Execution.prototype.hasValueFee = function() {
8798
+ return jspb.Message.getField(this, 10) != null;
8736
8799
  };
8737
8800
  proto.aggregator.Execution.prototype.getStepsList = function() {
8738
8801
  return (
@@ -16903,18 +16966,13 @@ var require_avs_pb = __commonJS({
16903
16966
  return jspb.Message.setProto3StringField(this, 4, value);
16904
16967
  };
16905
16968
  if (jspb.Message.GENERATE_TO_OBJECT) {
16906
- proto.aggregator.AutomationFee.prototype.toObject = function(opt_includeInstance) {
16907
- return proto.aggregator.AutomationFee.toObject(opt_includeInstance, this);
16969
+ proto.aggregator.Fee.prototype.toObject = function(opt_includeInstance) {
16970
+ return proto.aggregator.Fee.toObject(opt_includeInstance, this);
16908
16971
  };
16909
- proto.aggregator.AutomationFee.toObject = function(includeInstance, msg) {
16972
+ proto.aggregator.Fee.toObject = function(includeInstance, msg) {
16910
16973
  var f, obj = {
16911
- baseFee: (f = msg.getBaseFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16912
- monitoringFee: (f = msg.getMonitoringFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16913
- executionFee: (f = msg.getExecutionFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16914
- triggerType: jspb.Message.getFieldWithDefault(msg, 4, ""),
16915
- estimatedExecutions: jspb.Message.getFieldWithDefault(msg, 5, 0),
16916
- durationMinutes: jspb.Message.getFieldWithDefault(msg, 6, 0),
16917
- feeCalculationMethod: jspb.Message.getFieldWithDefault(msg, 7, "")
16974
+ amount: jspb.Message.getFieldWithDefault(msg, 1, ""),
16975
+ unit: jspb.Message.getFieldWithDefault(msg, 2, "")
16918
16976
  };
16919
16977
  if (includeInstance) {
16920
16978
  obj.$jspbMessageInstance = msg;
@@ -16922,12 +16980,12 @@ var require_avs_pb = __commonJS({
16922
16980
  return obj;
16923
16981
  };
16924
16982
  }
16925
- proto.aggregator.AutomationFee.deserializeBinary = function(bytes) {
16983
+ proto.aggregator.Fee.deserializeBinary = function(bytes) {
16926
16984
  var reader = new jspb.BinaryReader(bytes);
16927
- var msg = new proto.aggregator.AutomationFee();
16928
- return proto.aggregator.AutomationFee.deserializeBinaryFromReader(msg, reader);
16985
+ var msg = new proto.aggregator.Fee();
16986
+ return proto.aggregator.Fee.deserializeBinaryFromReader(msg, reader);
16929
16987
  };
16930
- proto.aggregator.AutomationFee.deserializeBinaryFromReader = function(msg, reader) {
16988
+ proto.aggregator.Fee.deserializeBinaryFromReader = function(msg, reader) {
16931
16989
  while (reader.nextField()) {
16932
16990
  if (reader.isEndGroup()) {
16933
16991
  break;
@@ -16935,47 +16993,18 @@ var require_avs_pb = __commonJS({
16935
16993
  var field = reader.getFieldNumber();
16936
16994
  switch (field) {
16937
16995
  case 1:
16938
- var value = new proto.aggregator.FeeAmount();
16939
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16940
- msg.setBaseFee(value);
16941
- break;
16942
- case 2:
16943
- var value = new proto.aggregator.FeeAmount();
16944
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16945
- msg.setMonitoringFee(value);
16946
- break;
16947
- case 3:
16948
- var value = new proto.aggregator.FeeAmount();
16949
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16950
- msg.setExecutionFee(value);
16951
- break;
16952
- case 4:
16953
16996
  var value = (
16954
16997
  /** @type {string} */
16955
16998
  reader.readString()
16956
16999
  );
16957
- msg.setTriggerType(value);
16958
- break;
16959
- case 5:
16960
- var value = (
16961
- /** @type {number} */
16962
- reader.readInt64()
16963
- );
16964
- msg.setEstimatedExecutions(value);
16965
- break;
16966
- case 6:
16967
- var value = (
16968
- /** @type {number} */
16969
- reader.readInt64()
16970
- );
16971
- msg.setDurationMinutes(value);
17000
+ msg.setAmount(value);
16972
17001
  break;
16973
- case 7:
17002
+ case 2:
16974
17003
  var value = (
16975
17004
  /** @type {string} */
16976
17005
  reader.readString()
16977
17006
  );
16978
- msg.setFeeCalculationMethod(value);
17007
+ msg.setUnit(value);
16979
17008
  break;
16980
17009
  default:
16981
17010
  reader.skipField();
@@ -16984,160 +17013,54 @@ var require_avs_pb = __commonJS({
16984
17013
  }
16985
17014
  return msg;
16986
17015
  };
16987
- proto.aggregator.AutomationFee.prototype.serializeBinary = function() {
17016
+ proto.aggregator.Fee.prototype.serializeBinary = function() {
16988
17017
  var writer = new jspb.BinaryWriter();
16989
- proto.aggregator.AutomationFee.serializeBinaryToWriter(this, writer);
17018
+ proto.aggregator.Fee.serializeBinaryToWriter(this, writer);
16990
17019
  return writer.getResultBuffer();
16991
17020
  };
16992
- proto.aggregator.AutomationFee.serializeBinaryToWriter = function(message, writer) {
17021
+ proto.aggregator.Fee.serializeBinaryToWriter = function(message, writer) {
16993
17022
  var f = void 0;
16994
- f = message.getBaseFee();
16995
- if (f != null) {
16996
- writer.writeMessage(
16997
- 1,
16998
- f,
16999
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17000
- );
17001
- }
17002
- f = message.getMonitoringFee();
17003
- if (f != null) {
17004
- writer.writeMessage(
17005
- 2,
17006
- f,
17007
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17008
- );
17009
- }
17010
- f = message.getExecutionFee();
17011
- if (f != null) {
17012
- writer.writeMessage(
17013
- 3,
17014
- f,
17015
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17016
- );
17017
- }
17018
- f = message.getTriggerType();
17023
+ f = message.getAmount();
17019
17024
  if (f.length > 0) {
17020
17025
  writer.writeString(
17021
- 4,
17022
- f
17023
- );
17024
- }
17025
- f = message.getEstimatedExecutions();
17026
- if (f !== 0) {
17027
- writer.writeInt64(
17028
- 5,
17029
- f
17030
- );
17031
- }
17032
- f = message.getDurationMinutes();
17033
- if (f !== 0) {
17034
- writer.writeInt64(
17035
- 6,
17026
+ 1,
17036
17027
  f
17037
17028
  );
17038
17029
  }
17039
- f = message.getFeeCalculationMethod();
17030
+ f = message.getUnit();
17040
17031
  if (f.length > 0) {
17041
17032
  writer.writeString(
17042
- 7,
17033
+ 2,
17043
17034
  f
17044
17035
  );
17045
17036
  }
17046
17037
  };
17047
- proto.aggregator.AutomationFee.prototype.getBaseFee = function() {
17048
- return (
17049
- /** @type{?proto.aggregator.FeeAmount} */
17050
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 1)
17051
- );
17052
- };
17053
- proto.aggregator.AutomationFee.prototype.setBaseFee = function(value) {
17054
- return jspb.Message.setWrapperField(this, 1, value);
17055
- };
17056
- proto.aggregator.AutomationFee.prototype.clearBaseFee = function() {
17057
- return this.setBaseFee(void 0);
17058
- };
17059
- proto.aggregator.AutomationFee.prototype.hasBaseFee = function() {
17060
- return jspb.Message.getField(this, 1) != null;
17061
- };
17062
- proto.aggregator.AutomationFee.prototype.getMonitoringFee = function() {
17063
- return (
17064
- /** @type{?proto.aggregator.FeeAmount} */
17065
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 2)
17066
- );
17067
- };
17068
- proto.aggregator.AutomationFee.prototype.setMonitoringFee = function(value) {
17069
- return jspb.Message.setWrapperField(this, 2, value);
17070
- };
17071
- proto.aggregator.AutomationFee.prototype.clearMonitoringFee = function() {
17072
- return this.setMonitoringFee(void 0);
17073
- };
17074
- proto.aggregator.AutomationFee.prototype.hasMonitoringFee = function() {
17075
- return jspb.Message.getField(this, 2) != null;
17076
- };
17077
- proto.aggregator.AutomationFee.prototype.getExecutionFee = function() {
17078
- return (
17079
- /** @type{?proto.aggregator.FeeAmount} */
17080
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 3)
17081
- );
17082
- };
17083
- proto.aggregator.AutomationFee.prototype.setExecutionFee = function(value) {
17084
- return jspb.Message.setWrapperField(this, 3, value);
17085
- };
17086
- proto.aggregator.AutomationFee.prototype.clearExecutionFee = function() {
17087
- return this.setExecutionFee(void 0);
17088
- };
17089
- proto.aggregator.AutomationFee.prototype.hasExecutionFee = function() {
17090
- return jspb.Message.getField(this, 3) != null;
17091
- };
17092
- proto.aggregator.AutomationFee.prototype.getTriggerType = function() {
17038
+ proto.aggregator.Fee.prototype.getAmount = function() {
17093
17039
  return (
17094
17040
  /** @type {string} */
17095
- jspb.Message.getFieldWithDefault(this, 4, "")
17096
- );
17097
- };
17098
- proto.aggregator.AutomationFee.prototype.setTriggerType = function(value) {
17099
- return jspb.Message.setProto3StringField(this, 4, value);
17100
- };
17101
- proto.aggregator.AutomationFee.prototype.getEstimatedExecutions = function() {
17102
- return (
17103
- /** @type {number} */
17104
- jspb.Message.getFieldWithDefault(this, 5, 0)
17105
- );
17106
- };
17107
- proto.aggregator.AutomationFee.prototype.setEstimatedExecutions = function(value) {
17108
- return jspb.Message.setProto3IntField(this, 5, value);
17109
- };
17110
- proto.aggregator.AutomationFee.prototype.getDurationMinutes = function() {
17111
- return (
17112
- /** @type {number} */
17113
- jspb.Message.getFieldWithDefault(this, 6, 0)
17041
+ jspb.Message.getFieldWithDefault(this, 1, "")
17114
17042
  );
17115
17043
  };
17116
- proto.aggregator.AutomationFee.prototype.setDurationMinutes = function(value) {
17117
- return jspb.Message.setProto3IntField(this, 6, value);
17044
+ proto.aggregator.Fee.prototype.setAmount = function(value) {
17045
+ return jspb.Message.setProto3StringField(this, 1, value);
17118
17046
  };
17119
- proto.aggregator.AutomationFee.prototype.getFeeCalculationMethod = function() {
17047
+ proto.aggregator.Fee.prototype.getUnit = function() {
17120
17048
  return (
17121
17049
  /** @type {string} */
17122
- jspb.Message.getFieldWithDefault(this, 7, "")
17050
+ jspb.Message.getFieldWithDefault(this, 2, "")
17123
17051
  );
17124
17052
  };
17125
- proto.aggregator.AutomationFee.prototype.setFeeCalculationMethod = function(value) {
17126
- return jspb.Message.setProto3StringField(this, 7, value);
17053
+ proto.aggregator.Fee.prototype.setUnit = function(value) {
17054
+ return jspb.Message.setProto3StringField(this, 2, value);
17127
17055
  };
17128
17056
  if (jspb.Message.GENERATE_TO_OBJECT) {
17129
- proto.aggregator.FeeDiscount.prototype.toObject = function(opt_includeInstance) {
17130
- return proto.aggregator.FeeDiscount.toObject(opt_includeInstance, this);
17057
+ proto.aggregator.NativeToken.prototype.toObject = function(opt_includeInstance) {
17058
+ return proto.aggregator.NativeToken.toObject(opt_includeInstance, this);
17131
17059
  };
17132
- proto.aggregator.FeeDiscount.toObject = function(includeInstance, msg) {
17060
+ proto.aggregator.NativeToken.toObject = function(includeInstance, msg) {
17133
17061
  var f, obj = {
17134
- discountType: jspb.Message.getFieldWithDefault(msg, 1, ""),
17135
- discountName: jspb.Message.getFieldWithDefault(msg, 2, ""),
17136
- appliesTo: jspb.Message.getFieldWithDefault(msg, 3, ""),
17137
- discountPercentage: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0),
17138
- discountAmount: (f = msg.getDiscountAmount()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
17139
- expiryDate: jspb.Message.getFieldWithDefault(msg, 6, ""),
17140
- terms: jspb.Message.getFieldWithDefault(msg, 7, "")
17062
+ symbol: jspb.Message.getFieldWithDefault(msg, 1, ""),
17063
+ decimals: jspb.Message.getFieldWithDefault(msg, 2, 0)
17141
17064
  };
17142
17065
  if (includeInstance) {
17143
17066
  obj.$jspbMessageInstance = msg;
@@ -17145,12 +17068,12 @@ var require_avs_pb = __commonJS({
17145
17068
  return obj;
17146
17069
  };
17147
17070
  }
17148
- proto.aggregator.FeeDiscount.deserializeBinary = function(bytes) {
17071
+ proto.aggregator.NativeToken.deserializeBinary = function(bytes) {
17149
17072
  var reader = new jspb.BinaryReader(bytes);
17150
- var msg = new proto.aggregator.FeeDiscount();
17151
- return proto.aggregator.FeeDiscount.deserializeBinaryFromReader(msg, reader);
17073
+ var msg = new proto.aggregator.NativeToken();
17074
+ return proto.aggregator.NativeToken.deserializeBinaryFromReader(msg, reader);
17152
17075
  };
17153
- proto.aggregator.FeeDiscount.deserializeBinaryFromReader = function(msg, reader) {
17076
+ proto.aggregator.NativeToken.deserializeBinaryFromReader = function(msg, reader) {
17154
17077
  while (reader.nextField()) {
17155
17078
  if (reader.isEndGroup()) {
17156
17079
  break;
@@ -17162,47 +17085,14 @@ var require_avs_pb = __commonJS({
17162
17085
  /** @type {string} */
17163
17086
  reader.readString()
17164
17087
  );
17165
- msg.setDiscountType(value);
17088
+ msg.setSymbol(value);
17166
17089
  break;
17167
17090
  case 2:
17168
- var value = (
17169
- /** @type {string} */
17170
- reader.readString()
17171
- );
17172
- msg.setDiscountName(value);
17173
- break;
17174
- case 3:
17175
- var value = (
17176
- /** @type {string} */
17177
- reader.readString()
17178
- );
17179
- msg.setAppliesTo(value);
17180
- break;
17181
- case 4:
17182
17091
  var value = (
17183
17092
  /** @type {number} */
17184
- reader.readFloat()
17185
- );
17186
- msg.setDiscountPercentage(value);
17187
- break;
17188
- case 5:
17189
- var value = new proto.aggregator.FeeAmount();
17190
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
17191
- msg.setDiscountAmount(value);
17192
- break;
17193
- case 6:
17194
- var value = (
17195
- /** @type {string} */
17196
- reader.readString()
17093
+ reader.readInt32()
17197
17094
  );
17198
- msg.setExpiryDate(value);
17199
- break;
17200
- case 7:
17201
- var value = (
17202
- /** @type {string} */
17203
- reader.readString()
17204
- );
17205
- msg.setTerms(value);
17095
+ msg.setDecimals(value);
17206
17096
  break;
17207
17097
  default:
17208
17098
  reader.skipField();
@@ -17211,60 +17101,486 @@ var require_avs_pb = __commonJS({
17211
17101
  }
17212
17102
  return msg;
17213
17103
  };
17214
- proto.aggregator.FeeDiscount.prototype.serializeBinary = function() {
17104
+ proto.aggregator.NativeToken.prototype.serializeBinary = function() {
17215
17105
  var writer = new jspb.BinaryWriter();
17216
- proto.aggregator.FeeDiscount.serializeBinaryToWriter(this, writer);
17106
+ proto.aggregator.NativeToken.serializeBinaryToWriter(this, writer);
17217
17107
  return writer.getResultBuffer();
17218
17108
  };
17219
- proto.aggregator.FeeDiscount.serializeBinaryToWriter = function(message, writer) {
17109
+ proto.aggregator.NativeToken.serializeBinaryToWriter = function(message, writer) {
17220
17110
  var f = void 0;
17221
- f = message.getDiscountType();
17111
+ f = message.getSymbol();
17222
17112
  if (f.length > 0) {
17223
17113
  writer.writeString(
17224
17114
  1,
17225
17115
  f
17226
17116
  );
17227
17117
  }
17228
- f = message.getDiscountName();
17229
- if (f.length > 0) {
17230
- writer.writeString(
17231
- 2,
17232
- f
17233
- );
17234
- }
17235
- f = message.getAppliesTo();
17236
- if (f.length > 0) {
17237
- writer.writeString(
17238
- 3,
17239
- f
17240
- );
17241
- }
17242
- f = message.getDiscountPercentage();
17118
+ f = message.getDecimals();
17243
17119
  if (f !== 0) {
17244
- writer.writeFloat(
17245
- 4,
17120
+ writer.writeInt32(
17121
+ 2,
17246
17122
  f
17247
17123
  );
17248
17124
  }
17249
- f = message.getDiscountAmount();
17250
- if (f != null) {
17251
- writer.writeMessage(
17252
- 5,
17253
- f,
17254
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17255
- );
17256
- }
17257
- f = message.getExpiryDate();
17258
- if (f.length > 0) {
17125
+ };
17126
+ proto.aggregator.NativeToken.prototype.getSymbol = function() {
17127
+ return (
17128
+ /** @type {string} */
17129
+ jspb.Message.getFieldWithDefault(this, 1, "")
17130
+ );
17131
+ };
17132
+ proto.aggregator.NativeToken.prototype.setSymbol = function(value) {
17133
+ return jspb.Message.setProto3StringField(this, 1, value);
17134
+ };
17135
+ proto.aggregator.NativeToken.prototype.getDecimals = function() {
17136
+ return (
17137
+ /** @type {number} */
17138
+ jspb.Message.getFieldWithDefault(this, 2, 0)
17139
+ );
17140
+ };
17141
+ proto.aggregator.NativeToken.prototype.setDecimals = function(value) {
17142
+ return jspb.Message.setProto3IntField(this, 2, value);
17143
+ };
17144
+ if (jspb.Message.GENERATE_TO_OBJECT) {
17145
+ proto.aggregator.NodeCOGS.prototype.toObject = function(opt_includeInstance) {
17146
+ return proto.aggregator.NodeCOGS.toObject(opt_includeInstance, this);
17147
+ };
17148
+ proto.aggregator.NodeCOGS.toObject = function(includeInstance, msg) {
17149
+ var f, obj = {
17150
+ nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""),
17151
+ costType: jspb.Message.getFieldWithDefault(msg, 2, ""),
17152
+ fee: (f = msg.getFee()) && proto.aggregator.Fee.toObject(includeInstance, f),
17153
+ gasUnits: jspb.Message.getFieldWithDefault(msg, 4, "")
17154
+ };
17155
+ if (includeInstance) {
17156
+ obj.$jspbMessageInstance = msg;
17157
+ }
17158
+ return obj;
17159
+ };
17160
+ }
17161
+ proto.aggregator.NodeCOGS.deserializeBinary = function(bytes) {
17162
+ var reader = new jspb.BinaryReader(bytes);
17163
+ var msg = new proto.aggregator.NodeCOGS();
17164
+ return proto.aggregator.NodeCOGS.deserializeBinaryFromReader(msg, reader);
17165
+ };
17166
+ proto.aggregator.NodeCOGS.deserializeBinaryFromReader = function(msg, reader) {
17167
+ while (reader.nextField()) {
17168
+ if (reader.isEndGroup()) {
17169
+ break;
17170
+ }
17171
+ var field = reader.getFieldNumber();
17172
+ switch (field) {
17173
+ case 1:
17174
+ var value = (
17175
+ /** @type {string} */
17176
+ reader.readString()
17177
+ );
17178
+ msg.setNodeId(value);
17179
+ break;
17180
+ case 2:
17181
+ var value = (
17182
+ /** @type {string} */
17183
+ reader.readString()
17184
+ );
17185
+ msg.setCostType(value);
17186
+ break;
17187
+ case 3:
17188
+ var value = new proto.aggregator.Fee();
17189
+ reader.readMessage(value, proto.aggregator.Fee.deserializeBinaryFromReader);
17190
+ msg.setFee(value);
17191
+ break;
17192
+ case 4:
17193
+ var value = (
17194
+ /** @type {string} */
17195
+ reader.readString()
17196
+ );
17197
+ msg.setGasUnits(value);
17198
+ break;
17199
+ default:
17200
+ reader.skipField();
17201
+ break;
17202
+ }
17203
+ }
17204
+ return msg;
17205
+ };
17206
+ proto.aggregator.NodeCOGS.prototype.serializeBinary = function() {
17207
+ var writer = new jspb.BinaryWriter();
17208
+ proto.aggregator.NodeCOGS.serializeBinaryToWriter(this, writer);
17209
+ return writer.getResultBuffer();
17210
+ };
17211
+ proto.aggregator.NodeCOGS.serializeBinaryToWriter = function(message, writer) {
17212
+ var f = void 0;
17213
+ f = message.getNodeId();
17214
+ if (f.length > 0) {
17215
+ writer.writeString(
17216
+ 1,
17217
+ f
17218
+ );
17219
+ }
17220
+ f = message.getCostType();
17221
+ if (f.length > 0) {
17222
+ writer.writeString(
17223
+ 2,
17224
+ f
17225
+ );
17226
+ }
17227
+ f = message.getFee();
17228
+ if (f != null) {
17229
+ writer.writeMessage(
17230
+ 3,
17231
+ f,
17232
+ proto.aggregator.Fee.serializeBinaryToWriter
17233
+ );
17234
+ }
17235
+ f = message.getGasUnits();
17236
+ if (f.length > 0) {
17237
+ writer.writeString(
17238
+ 4,
17239
+ f
17240
+ );
17241
+ }
17242
+ };
17243
+ proto.aggregator.NodeCOGS.prototype.getNodeId = function() {
17244
+ return (
17245
+ /** @type {string} */
17246
+ jspb.Message.getFieldWithDefault(this, 1, "")
17247
+ );
17248
+ };
17249
+ proto.aggregator.NodeCOGS.prototype.setNodeId = function(value) {
17250
+ return jspb.Message.setProto3StringField(this, 1, value);
17251
+ };
17252
+ proto.aggregator.NodeCOGS.prototype.getCostType = function() {
17253
+ return (
17254
+ /** @type {string} */
17255
+ jspb.Message.getFieldWithDefault(this, 2, "")
17256
+ );
17257
+ };
17258
+ proto.aggregator.NodeCOGS.prototype.setCostType = function(value) {
17259
+ return jspb.Message.setProto3StringField(this, 2, value);
17260
+ };
17261
+ proto.aggregator.NodeCOGS.prototype.getFee = function() {
17262
+ return (
17263
+ /** @type{?proto.aggregator.Fee} */
17264
+ jspb.Message.getWrapperField(this, proto.aggregator.Fee, 3)
17265
+ );
17266
+ };
17267
+ proto.aggregator.NodeCOGS.prototype.setFee = function(value) {
17268
+ return jspb.Message.setWrapperField(this, 3, value);
17269
+ };
17270
+ proto.aggregator.NodeCOGS.prototype.clearFee = function() {
17271
+ return this.setFee(void 0);
17272
+ };
17273
+ proto.aggregator.NodeCOGS.prototype.hasFee = function() {
17274
+ return jspb.Message.getField(this, 3) != null;
17275
+ };
17276
+ proto.aggregator.NodeCOGS.prototype.getGasUnits = function() {
17277
+ return (
17278
+ /** @type {string} */
17279
+ jspb.Message.getFieldWithDefault(this, 4, "")
17280
+ );
17281
+ };
17282
+ proto.aggregator.NodeCOGS.prototype.setGasUnits = function(value) {
17283
+ return jspb.Message.setProto3StringField(this, 4, value);
17284
+ };
17285
+ if (jspb.Message.GENERATE_TO_OBJECT) {
17286
+ proto.aggregator.ValueFee.prototype.toObject = function(opt_includeInstance) {
17287
+ return proto.aggregator.ValueFee.toObject(opt_includeInstance, this);
17288
+ };
17289
+ proto.aggregator.ValueFee.toObject = function(includeInstance, msg) {
17290
+ var f, obj = {
17291
+ fee: (f = msg.getFee()) && proto.aggregator.Fee.toObject(includeInstance, f),
17292
+ tier: jspb.Message.getFieldWithDefault(msg, 2, 0),
17293
+ valueBase: jspb.Message.getFieldWithDefault(msg, 3, ""),
17294
+ classificationMethod: jspb.Message.getFieldWithDefault(msg, 4, ""),
17295
+ confidence: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0),
17296
+ reason: jspb.Message.getFieldWithDefault(msg, 6, "")
17297
+ };
17298
+ if (includeInstance) {
17299
+ obj.$jspbMessageInstance = msg;
17300
+ }
17301
+ return obj;
17302
+ };
17303
+ }
17304
+ proto.aggregator.ValueFee.deserializeBinary = function(bytes) {
17305
+ var reader = new jspb.BinaryReader(bytes);
17306
+ var msg = new proto.aggregator.ValueFee();
17307
+ return proto.aggregator.ValueFee.deserializeBinaryFromReader(msg, reader);
17308
+ };
17309
+ proto.aggregator.ValueFee.deserializeBinaryFromReader = function(msg, reader) {
17310
+ while (reader.nextField()) {
17311
+ if (reader.isEndGroup()) {
17312
+ break;
17313
+ }
17314
+ var field = reader.getFieldNumber();
17315
+ switch (field) {
17316
+ case 1:
17317
+ var value = new proto.aggregator.Fee();
17318
+ reader.readMessage(value, proto.aggregator.Fee.deserializeBinaryFromReader);
17319
+ msg.setFee(value);
17320
+ break;
17321
+ case 2:
17322
+ var value = (
17323
+ /** @type {!proto.aggregator.ExecutionTier} */
17324
+ reader.readEnum()
17325
+ );
17326
+ msg.setTier(value);
17327
+ break;
17328
+ case 3:
17329
+ var value = (
17330
+ /** @type {string} */
17331
+ reader.readString()
17332
+ );
17333
+ msg.setValueBase(value);
17334
+ break;
17335
+ case 4:
17336
+ var value = (
17337
+ /** @type {string} */
17338
+ reader.readString()
17339
+ );
17340
+ msg.setClassificationMethod(value);
17341
+ break;
17342
+ case 5:
17343
+ var value = (
17344
+ /** @type {number} */
17345
+ reader.readFloat()
17346
+ );
17347
+ msg.setConfidence(value);
17348
+ break;
17349
+ case 6:
17350
+ var value = (
17351
+ /** @type {string} */
17352
+ reader.readString()
17353
+ );
17354
+ msg.setReason(value);
17355
+ break;
17356
+ default:
17357
+ reader.skipField();
17358
+ break;
17359
+ }
17360
+ }
17361
+ return msg;
17362
+ };
17363
+ proto.aggregator.ValueFee.prototype.serializeBinary = function() {
17364
+ var writer = new jspb.BinaryWriter();
17365
+ proto.aggregator.ValueFee.serializeBinaryToWriter(this, writer);
17366
+ return writer.getResultBuffer();
17367
+ };
17368
+ proto.aggregator.ValueFee.serializeBinaryToWriter = function(message, writer) {
17369
+ var f = void 0;
17370
+ f = message.getFee();
17371
+ if (f != null) {
17372
+ writer.writeMessage(
17373
+ 1,
17374
+ f,
17375
+ proto.aggregator.Fee.serializeBinaryToWriter
17376
+ );
17377
+ }
17378
+ f = message.getTier();
17379
+ if (f !== 0) {
17380
+ writer.writeEnum(
17381
+ 2,
17382
+ f
17383
+ );
17384
+ }
17385
+ f = message.getValueBase();
17386
+ if (f.length > 0) {
17387
+ writer.writeString(
17388
+ 3,
17389
+ f
17390
+ );
17391
+ }
17392
+ f = message.getClassificationMethod();
17393
+ if (f.length > 0) {
17394
+ writer.writeString(
17395
+ 4,
17396
+ f
17397
+ );
17398
+ }
17399
+ f = message.getConfidence();
17400
+ if (f !== 0) {
17401
+ writer.writeFloat(
17402
+ 5,
17403
+ f
17404
+ );
17405
+ }
17406
+ f = message.getReason();
17407
+ if (f.length > 0) {
17408
+ writer.writeString(
17409
+ 6,
17410
+ f
17411
+ );
17412
+ }
17413
+ };
17414
+ proto.aggregator.ValueFee.prototype.getFee = function() {
17415
+ return (
17416
+ /** @type{?proto.aggregator.Fee} */
17417
+ jspb.Message.getWrapperField(this, proto.aggregator.Fee, 1)
17418
+ );
17419
+ };
17420
+ proto.aggregator.ValueFee.prototype.setFee = function(value) {
17421
+ return jspb.Message.setWrapperField(this, 1, value);
17422
+ };
17423
+ proto.aggregator.ValueFee.prototype.clearFee = function() {
17424
+ return this.setFee(void 0);
17425
+ };
17426
+ proto.aggregator.ValueFee.prototype.hasFee = function() {
17427
+ return jspb.Message.getField(this, 1) != null;
17428
+ };
17429
+ proto.aggregator.ValueFee.prototype.getTier = function() {
17430
+ return (
17431
+ /** @type {!proto.aggregator.ExecutionTier} */
17432
+ jspb.Message.getFieldWithDefault(this, 2, 0)
17433
+ );
17434
+ };
17435
+ proto.aggregator.ValueFee.prototype.setTier = function(value) {
17436
+ return jspb.Message.setProto3EnumField(this, 2, value);
17437
+ };
17438
+ proto.aggregator.ValueFee.prototype.getValueBase = function() {
17439
+ return (
17440
+ /** @type {string} */
17441
+ jspb.Message.getFieldWithDefault(this, 3, "")
17442
+ );
17443
+ };
17444
+ proto.aggregator.ValueFee.prototype.setValueBase = function(value) {
17445
+ return jspb.Message.setProto3StringField(this, 3, value);
17446
+ };
17447
+ proto.aggregator.ValueFee.prototype.getClassificationMethod = function() {
17448
+ return (
17449
+ /** @type {string} */
17450
+ jspb.Message.getFieldWithDefault(this, 4, "")
17451
+ );
17452
+ };
17453
+ proto.aggregator.ValueFee.prototype.setClassificationMethod = function(value) {
17454
+ return jspb.Message.setProto3StringField(this, 4, value);
17455
+ };
17456
+ proto.aggregator.ValueFee.prototype.getConfidence = function() {
17457
+ return (
17458
+ /** @type {number} */
17459
+ jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0)
17460
+ );
17461
+ };
17462
+ proto.aggregator.ValueFee.prototype.setConfidence = function(value) {
17463
+ return jspb.Message.setProto3FloatField(this, 5, value);
17464
+ };
17465
+ proto.aggregator.ValueFee.prototype.getReason = function() {
17466
+ return (
17467
+ /** @type {string} */
17468
+ jspb.Message.getFieldWithDefault(this, 6, "")
17469
+ );
17470
+ };
17471
+ proto.aggregator.ValueFee.prototype.setReason = function(value) {
17472
+ return jspb.Message.setProto3StringField(this, 6, value);
17473
+ };
17474
+ if (jspb.Message.GENERATE_TO_OBJECT) {
17475
+ proto.aggregator.FeeDiscount.prototype.toObject = function(opt_includeInstance) {
17476
+ return proto.aggregator.FeeDiscount.toObject(opt_includeInstance, this);
17477
+ };
17478
+ proto.aggregator.FeeDiscount.toObject = function(includeInstance, msg) {
17479
+ var f, obj = {
17480
+ discountType: jspb.Message.getFieldWithDefault(msg, 1, ""),
17481
+ discountName: jspb.Message.getFieldWithDefault(msg, 2, ""),
17482
+ discount: (f = msg.getDiscount()) && proto.aggregator.Fee.toObject(includeInstance, f),
17483
+ expiryDate: jspb.Message.getFieldWithDefault(msg, 4, ""),
17484
+ terms: jspb.Message.getFieldWithDefault(msg, 5, "")
17485
+ };
17486
+ if (includeInstance) {
17487
+ obj.$jspbMessageInstance = msg;
17488
+ }
17489
+ return obj;
17490
+ };
17491
+ }
17492
+ proto.aggregator.FeeDiscount.deserializeBinary = function(bytes) {
17493
+ var reader = new jspb.BinaryReader(bytes);
17494
+ var msg = new proto.aggregator.FeeDiscount();
17495
+ return proto.aggregator.FeeDiscount.deserializeBinaryFromReader(msg, reader);
17496
+ };
17497
+ proto.aggregator.FeeDiscount.deserializeBinaryFromReader = function(msg, reader) {
17498
+ while (reader.nextField()) {
17499
+ if (reader.isEndGroup()) {
17500
+ break;
17501
+ }
17502
+ var field = reader.getFieldNumber();
17503
+ switch (field) {
17504
+ case 1:
17505
+ var value = (
17506
+ /** @type {string} */
17507
+ reader.readString()
17508
+ );
17509
+ msg.setDiscountType(value);
17510
+ break;
17511
+ case 2:
17512
+ var value = (
17513
+ /** @type {string} */
17514
+ reader.readString()
17515
+ );
17516
+ msg.setDiscountName(value);
17517
+ break;
17518
+ case 3:
17519
+ var value = new proto.aggregator.Fee();
17520
+ reader.readMessage(value, proto.aggregator.Fee.deserializeBinaryFromReader);
17521
+ msg.setDiscount(value);
17522
+ break;
17523
+ case 4:
17524
+ var value = (
17525
+ /** @type {string} */
17526
+ reader.readString()
17527
+ );
17528
+ msg.setExpiryDate(value);
17529
+ break;
17530
+ case 5:
17531
+ var value = (
17532
+ /** @type {string} */
17533
+ reader.readString()
17534
+ );
17535
+ msg.setTerms(value);
17536
+ break;
17537
+ default:
17538
+ reader.skipField();
17539
+ break;
17540
+ }
17541
+ }
17542
+ return msg;
17543
+ };
17544
+ proto.aggregator.FeeDiscount.prototype.serializeBinary = function() {
17545
+ var writer = new jspb.BinaryWriter();
17546
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter(this, writer);
17547
+ return writer.getResultBuffer();
17548
+ };
17549
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter = function(message, writer) {
17550
+ var f = void 0;
17551
+ f = message.getDiscountType();
17552
+ if (f.length > 0) {
17553
+ writer.writeString(
17554
+ 1,
17555
+ f
17556
+ );
17557
+ }
17558
+ f = message.getDiscountName();
17559
+ if (f.length > 0) {
17560
+ writer.writeString(
17561
+ 2,
17562
+ f
17563
+ );
17564
+ }
17565
+ f = message.getDiscount();
17566
+ if (f != null) {
17567
+ writer.writeMessage(
17568
+ 3,
17569
+ f,
17570
+ proto.aggregator.Fee.serializeBinaryToWriter
17571
+ );
17572
+ }
17573
+ f = message.getExpiryDate();
17574
+ if (f.length > 0) {
17259
17575
  writer.writeString(
17260
- 6,
17576
+ 4,
17261
17577
  f
17262
17578
  );
17263
17579
  }
17264
17580
  f = message.getTerms();
17265
17581
  if (f.length > 0) {
17266
17582
  writer.writeString(
17267
- 7,
17583
+ 5,
17268
17584
  f
17269
17585
  );
17270
17586
  }
@@ -17287,58 +17603,40 @@ var require_avs_pb = __commonJS({
17287
17603
  proto.aggregator.FeeDiscount.prototype.setDiscountName = function(value) {
17288
17604
  return jspb.Message.setProto3StringField(this, 2, value);
17289
17605
  };
17290
- proto.aggregator.FeeDiscount.prototype.getAppliesTo = function() {
17291
- return (
17292
- /** @type {string} */
17293
- jspb.Message.getFieldWithDefault(this, 3, "")
17294
- );
17295
- };
17296
- proto.aggregator.FeeDiscount.prototype.setAppliesTo = function(value) {
17297
- return jspb.Message.setProto3StringField(this, 3, value);
17298
- };
17299
- proto.aggregator.FeeDiscount.prototype.getDiscountPercentage = function() {
17300
- return (
17301
- /** @type {number} */
17302
- jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0)
17303
- );
17304
- };
17305
- proto.aggregator.FeeDiscount.prototype.setDiscountPercentage = function(value) {
17306
- return jspb.Message.setProto3FloatField(this, 4, value);
17307
- };
17308
- proto.aggregator.FeeDiscount.prototype.getDiscountAmount = function() {
17606
+ proto.aggregator.FeeDiscount.prototype.getDiscount = function() {
17309
17607
  return (
17310
- /** @type{?proto.aggregator.FeeAmount} */
17311
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 5)
17608
+ /** @type{?proto.aggregator.Fee} */
17609
+ jspb.Message.getWrapperField(this, proto.aggregator.Fee, 3)
17312
17610
  );
17313
17611
  };
17314
- proto.aggregator.FeeDiscount.prototype.setDiscountAmount = function(value) {
17315
- return jspb.Message.setWrapperField(this, 5, value);
17612
+ proto.aggregator.FeeDiscount.prototype.setDiscount = function(value) {
17613
+ return jspb.Message.setWrapperField(this, 3, value);
17316
17614
  };
17317
- proto.aggregator.FeeDiscount.prototype.clearDiscountAmount = function() {
17318
- return this.setDiscountAmount(void 0);
17615
+ proto.aggregator.FeeDiscount.prototype.clearDiscount = function() {
17616
+ return this.setDiscount(void 0);
17319
17617
  };
17320
- proto.aggregator.FeeDiscount.prototype.hasDiscountAmount = function() {
17321
- return jspb.Message.getField(this, 5) != null;
17618
+ proto.aggregator.FeeDiscount.prototype.hasDiscount = function() {
17619
+ return jspb.Message.getField(this, 3) != null;
17322
17620
  };
17323
17621
  proto.aggregator.FeeDiscount.prototype.getExpiryDate = function() {
17324
17622
  return (
17325
17623
  /** @type {string} */
17326
- jspb.Message.getFieldWithDefault(this, 6, "")
17624
+ jspb.Message.getFieldWithDefault(this, 4, "")
17327
17625
  );
17328
17626
  };
17329
17627
  proto.aggregator.FeeDiscount.prototype.setExpiryDate = function(value) {
17330
- return jspb.Message.setProto3StringField(this, 6, value);
17628
+ return jspb.Message.setProto3StringField(this, 4, value);
17331
17629
  };
17332
17630
  proto.aggregator.FeeDiscount.prototype.getTerms = function() {
17333
17631
  return (
17334
17632
  /** @type {string} */
17335
- jspb.Message.getFieldWithDefault(this, 7, "")
17633
+ jspb.Message.getFieldWithDefault(this, 5, "")
17336
17634
  );
17337
17635
  };
17338
17636
  proto.aggregator.FeeDiscount.prototype.setTerms = function(value) {
17339
- return jspb.Message.setProto3StringField(this, 7, value);
17637
+ return jspb.Message.setProto3StringField(this, 5, value);
17340
17638
  };
17341
- proto.aggregator.EstimateFeesResp.repeatedFields_ = [8, 15, 16];
17639
+ proto.aggregator.EstimateFeesResp.repeatedFields_ = [7, 9, 11];
17342
17640
  if (jspb.Message.GENERATE_TO_OBJECT) {
17343
17641
  proto.aggregator.EstimateFeesResp.prototype.toObject = function(opt_includeInstance) {
17344
17642
  return proto.aggregator.EstimateFeesResp.toObject(opt_includeInstance, this);
@@ -17348,23 +17646,22 @@ var require_avs_pb = __commonJS({
17348
17646
  success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
17349
17647
  error: jspb.Message.getFieldWithDefault(msg, 2, ""),
17350
17648
  errorCode: jspb.Message.getFieldWithDefault(msg, 3, 0),
17351
- gasFees: (f = msg.getGasFees()) && proto.aggregator.GasFeeBreakdown.toObject(includeInstance, f),
17352
- automationFees: (f = msg.getAutomationFees()) && proto.aggregator.AutomationFee.toObject(includeInstance, f),
17353
- creationFees: (f = msg.getCreationFees()) && proto.aggregator.SmartWalletCreationFee.toObject(includeInstance, f),
17354
- totalFees: (f = msg.getTotalFees()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
17649
+ chainId: jspb.Message.getFieldWithDefault(msg, 4, ""),
17650
+ nativeToken: (f = msg.getNativeToken()) && proto.aggregator.NativeToken.toObject(includeInstance, f),
17651
+ executionFee: (f = msg.getExecutionFee()) && proto.aggregator.Fee.toObject(includeInstance, f),
17652
+ cogsList: jspb.Message.toObjectList(
17653
+ msg.getCogsList(),
17654
+ proto.aggregator.NodeCOGS.toObject,
17655
+ includeInstance
17656
+ ),
17657
+ valueFee: (f = msg.getValueFee()) && proto.aggregator.ValueFee.toObject(includeInstance, f),
17355
17658
  discountsList: jspb.Message.toObjectList(
17356
17659
  msg.getDiscountsList(),
17357
17660
  proto.aggregator.FeeDiscount.toObject,
17358
17661
  includeInstance
17359
17662
  ),
17360
- totalDiscounts: (f = msg.getTotalDiscounts()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
17361
- finalTotal: (f = msg.getFinalTotal()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
17362
- estimatedAt: jspb.Message.getFieldWithDefault(msg, 11, 0),
17363
- chainId: jspb.Message.getFieldWithDefault(msg, 12, ""),
17364
- priceDataSource: jspb.Message.getFieldWithDefault(msg, 13, ""),
17365
- priceDataAgeSeconds: jspb.Message.getFieldWithDefault(msg, 14, 0),
17366
- warningsList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? void 0 : f,
17367
- recommendationsList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? void 0 : f
17663
+ pricingModel: jspb.Message.getFieldWithDefault(msg, 10, ""),
17664
+ warningsList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? void 0 : f
17368
17665
  };
17369
17666
  if (includeInstance) {
17370
17667
  obj.$jspbMessageInstance = msg;
@@ -17406,82 +17703,51 @@ var require_avs_pb = __commonJS({
17406
17703
  msg.setErrorCode(value);
17407
17704
  break;
17408
17705
  case 4:
17409
- var value = new proto.aggregator.GasFeeBreakdown();
17410
- reader.readMessage(value, proto.aggregator.GasFeeBreakdown.deserializeBinaryFromReader);
17411
- msg.setGasFees(value);
17706
+ var value = (
17707
+ /** @type {string} */
17708
+ reader.readString()
17709
+ );
17710
+ msg.setChainId(value);
17412
17711
  break;
17413
17712
  case 5:
17414
- var value = new proto.aggregator.AutomationFee();
17415
- reader.readMessage(value, proto.aggregator.AutomationFee.deserializeBinaryFromReader);
17416
- msg.setAutomationFees(value);
17713
+ var value = new proto.aggregator.NativeToken();
17714
+ reader.readMessage(value, proto.aggregator.NativeToken.deserializeBinaryFromReader);
17715
+ msg.setNativeToken(value);
17417
17716
  break;
17418
17717
  case 6:
17419
- var value = new proto.aggregator.SmartWalletCreationFee();
17420
- reader.readMessage(value, proto.aggregator.SmartWalletCreationFee.deserializeBinaryFromReader);
17421
- msg.setCreationFees(value);
17718
+ var value = new proto.aggregator.Fee();
17719
+ reader.readMessage(value, proto.aggregator.Fee.deserializeBinaryFromReader);
17720
+ msg.setExecutionFee(value);
17422
17721
  break;
17423
17722
  case 7:
17424
- var value = new proto.aggregator.FeeAmount();
17425
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
17426
- msg.setTotalFees(value);
17723
+ var value = new proto.aggregator.NodeCOGS();
17724
+ reader.readMessage(value, proto.aggregator.NodeCOGS.deserializeBinaryFromReader);
17725
+ msg.addCogs(value);
17427
17726
  break;
17428
17727
  case 8:
17728
+ var value = new proto.aggregator.ValueFee();
17729
+ reader.readMessage(value, proto.aggregator.ValueFee.deserializeBinaryFromReader);
17730
+ msg.setValueFee(value);
17731
+ break;
17732
+ case 9:
17429
17733
  var value = new proto.aggregator.FeeDiscount();
17430
17734
  reader.readMessage(value, proto.aggregator.FeeDiscount.deserializeBinaryFromReader);
17431
17735
  msg.addDiscounts(value);
17432
17736
  break;
17433
- case 9:
17434
- var value = new proto.aggregator.FeeAmount();
17435
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
17436
- msg.setTotalDiscounts(value);
17437
- break;
17438
17737
  case 10:
17439
- var value = new proto.aggregator.FeeAmount();
17440
- reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
17441
- msg.setFinalTotal(value);
17442
- break;
17443
- case 11:
17444
- var value = (
17445
- /** @type {number} */
17446
- reader.readInt64()
17447
- );
17448
- msg.setEstimatedAt(value);
17449
- break;
17450
- case 12:
17451
- var value = (
17452
- /** @type {string} */
17453
- reader.readString()
17454
- );
17455
- msg.setChainId(value);
17456
- break;
17457
- case 13:
17458
17738
  var value = (
17459
17739
  /** @type {string} */
17460
17740
  reader.readString()
17461
17741
  );
17462
- msg.setPriceDataSource(value);
17463
- break;
17464
- case 14:
17465
- var value = (
17466
- /** @type {number} */
17467
- reader.readInt64()
17468
- );
17469
- msg.setPriceDataAgeSeconds(value);
17742
+ msg.setPricingModel(value);
17470
17743
  break;
17471
- case 15:
17744
+ case 11:
17472
17745
  var value = (
17473
17746
  /** @type {string} */
17474
17747
  reader.readString()
17475
17748
  );
17476
17749
  msg.addWarnings(value);
17477
17750
  break;
17478
- case 16:
17479
- var value = (
17480
- /** @type {string} */
17481
- reader.readString()
17482
- );
17483
- msg.addRecommendations(value);
17484
- break;
17485
17751
  default:
17486
17752
  reader.skipField();
17487
17753
  break;
@@ -17517,101 +17783,64 @@ var require_avs_pb = __commonJS({
17517
17783
  f
17518
17784
  );
17519
17785
  }
17520
- f = message.getGasFees();
17521
- if (f != null) {
17522
- writer.writeMessage(
17786
+ f = message.getChainId();
17787
+ if (f.length > 0) {
17788
+ writer.writeString(
17523
17789
  4,
17524
- f,
17525
- proto.aggregator.GasFeeBreakdown.serializeBinaryToWriter
17790
+ f
17526
17791
  );
17527
17792
  }
17528
- f = message.getAutomationFees();
17793
+ f = message.getNativeToken();
17529
17794
  if (f != null) {
17530
17795
  writer.writeMessage(
17531
17796
  5,
17532
17797
  f,
17533
- proto.aggregator.AutomationFee.serializeBinaryToWriter
17798
+ proto.aggregator.NativeToken.serializeBinaryToWriter
17534
17799
  );
17535
17800
  }
17536
- f = message.getCreationFees();
17801
+ f = message.getExecutionFee();
17537
17802
  if (f != null) {
17538
17803
  writer.writeMessage(
17539
17804
  6,
17540
17805
  f,
17541
- proto.aggregator.SmartWalletCreationFee.serializeBinaryToWriter
17542
- );
17543
- }
17544
- f = message.getTotalFees();
17545
- if (f != null) {
17546
- writer.writeMessage(
17547
- 7,
17548
- f,
17549
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17806
+ proto.aggregator.Fee.serializeBinaryToWriter
17550
17807
  );
17551
17808
  }
17552
- f = message.getDiscountsList();
17809
+ f = message.getCogsList();
17553
17810
  if (f.length > 0) {
17554
17811
  writer.writeRepeatedMessage(
17555
- 8,
17556
- f,
17557
- proto.aggregator.FeeDiscount.serializeBinaryToWriter
17558
- );
17559
- }
17560
- f = message.getTotalDiscounts();
17561
- if (f != null) {
17562
- writer.writeMessage(
17563
- 9,
17812
+ 7,
17564
17813
  f,
17565
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17814
+ proto.aggregator.NodeCOGS.serializeBinaryToWriter
17566
17815
  );
17567
17816
  }
17568
- f = message.getFinalTotal();
17817
+ f = message.getValueFee();
17569
17818
  if (f != null) {
17570
17819
  writer.writeMessage(
17571
- 10,
17820
+ 8,
17572
17821
  f,
17573
- proto.aggregator.FeeAmount.serializeBinaryToWriter
17574
- );
17575
- }
17576
- f = message.getEstimatedAt();
17577
- if (f !== 0) {
17578
- writer.writeInt64(
17579
- 11,
17580
- f
17822
+ proto.aggregator.ValueFee.serializeBinaryToWriter
17581
17823
  );
17582
17824
  }
17583
- f = message.getChainId();
17825
+ f = message.getDiscountsList();
17584
17826
  if (f.length > 0) {
17585
- writer.writeString(
17586
- 12,
17587
- f
17827
+ writer.writeRepeatedMessage(
17828
+ 9,
17829
+ f,
17830
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter
17588
17831
  );
17589
17832
  }
17590
- f = message.getPriceDataSource();
17833
+ f = message.getPricingModel();
17591
17834
  if (f.length > 0) {
17592
17835
  writer.writeString(
17593
- 13,
17594
- f
17595
- );
17596
- }
17597
- f = message.getPriceDataAgeSeconds();
17598
- if (f !== 0) {
17599
- writer.writeInt64(
17600
- 14,
17836
+ 10,
17601
17837
  f
17602
17838
  );
17603
17839
  }
17604
17840
  f = message.getWarningsList();
17605
17841
  if (f.length > 0) {
17606
17842
  writer.writeRepeatedString(
17607
- 15,
17608
- f
17609
- );
17610
- }
17611
- f = message.getRecommendationsList();
17612
- if (f.length > 0) {
17613
- writer.writeRepeatedString(
17614
- 16,
17843
+ 11,
17615
17844
  f
17616
17845
  );
17617
17846
  }
@@ -17643,177 +17872,114 @@ var require_avs_pb = __commonJS({
17643
17872
  proto.aggregator.EstimateFeesResp.prototype.setErrorCode = function(value) {
17644
17873
  return jspb.Message.setProto3EnumField(this, 3, value);
17645
17874
  };
17646
- proto.aggregator.EstimateFeesResp.prototype.getGasFees = function() {
17875
+ proto.aggregator.EstimateFeesResp.prototype.getChainId = function() {
17647
17876
  return (
17648
- /** @type{?proto.aggregator.GasFeeBreakdown} */
17649
- jspb.Message.getWrapperField(this, proto.aggregator.GasFeeBreakdown, 4)
17877
+ /** @type {string} */
17878
+ jspb.Message.getFieldWithDefault(this, 4, "")
17650
17879
  );
17651
17880
  };
17652
- proto.aggregator.EstimateFeesResp.prototype.setGasFees = function(value) {
17653
- return jspb.Message.setWrapperField(this, 4, value);
17654
- };
17655
- proto.aggregator.EstimateFeesResp.prototype.clearGasFees = function() {
17656
- return this.setGasFees(void 0);
17657
- };
17658
- proto.aggregator.EstimateFeesResp.prototype.hasGasFees = function() {
17659
- return jspb.Message.getField(this, 4) != null;
17881
+ proto.aggregator.EstimateFeesResp.prototype.setChainId = function(value) {
17882
+ return jspb.Message.setProto3StringField(this, 4, value);
17660
17883
  };
17661
- proto.aggregator.EstimateFeesResp.prototype.getAutomationFees = function() {
17884
+ proto.aggregator.EstimateFeesResp.prototype.getNativeToken = function() {
17662
17885
  return (
17663
- /** @type{?proto.aggregator.AutomationFee} */
17664
- jspb.Message.getWrapperField(this, proto.aggregator.AutomationFee, 5)
17886
+ /** @type{?proto.aggregator.NativeToken} */
17887
+ jspb.Message.getWrapperField(this, proto.aggregator.NativeToken, 5)
17665
17888
  );
17666
17889
  };
17667
- proto.aggregator.EstimateFeesResp.prototype.setAutomationFees = function(value) {
17890
+ proto.aggregator.EstimateFeesResp.prototype.setNativeToken = function(value) {
17668
17891
  return jspb.Message.setWrapperField(this, 5, value);
17669
17892
  };
17670
- proto.aggregator.EstimateFeesResp.prototype.clearAutomationFees = function() {
17671
- return this.setAutomationFees(void 0);
17893
+ proto.aggregator.EstimateFeesResp.prototype.clearNativeToken = function() {
17894
+ return this.setNativeToken(void 0);
17672
17895
  };
17673
- proto.aggregator.EstimateFeesResp.prototype.hasAutomationFees = function() {
17896
+ proto.aggregator.EstimateFeesResp.prototype.hasNativeToken = function() {
17674
17897
  return jspb.Message.getField(this, 5) != null;
17675
17898
  };
17676
- proto.aggregator.EstimateFeesResp.prototype.getCreationFees = function() {
17899
+ proto.aggregator.EstimateFeesResp.prototype.getExecutionFee = function() {
17677
17900
  return (
17678
- /** @type{?proto.aggregator.SmartWalletCreationFee} */
17679
- jspb.Message.getWrapperField(this, proto.aggregator.SmartWalletCreationFee, 6)
17901
+ /** @type{?proto.aggregator.Fee} */
17902
+ jspb.Message.getWrapperField(this, proto.aggregator.Fee, 6)
17680
17903
  );
17681
17904
  };
17682
- proto.aggregator.EstimateFeesResp.prototype.setCreationFees = function(value) {
17905
+ proto.aggregator.EstimateFeesResp.prototype.setExecutionFee = function(value) {
17683
17906
  return jspb.Message.setWrapperField(this, 6, value);
17684
17907
  };
17685
- proto.aggregator.EstimateFeesResp.prototype.clearCreationFees = function() {
17686
- return this.setCreationFees(void 0);
17908
+ proto.aggregator.EstimateFeesResp.prototype.clearExecutionFee = function() {
17909
+ return this.setExecutionFee(void 0);
17687
17910
  };
17688
- proto.aggregator.EstimateFeesResp.prototype.hasCreationFees = function() {
17911
+ proto.aggregator.EstimateFeesResp.prototype.hasExecutionFee = function() {
17689
17912
  return jspb.Message.getField(this, 6) != null;
17690
17913
  };
17691
- proto.aggregator.EstimateFeesResp.prototype.getTotalFees = function() {
17692
- return (
17693
- /** @type{?proto.aggregator.FeeAmount} */
17694
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 7)
17695
- );
17696
- };
17697
- proto.aggregator.EstimateFeesResp.prototype.setTotalFees = function(value) {
17698
- return jspb.Message.setWrapperField(this, 7, value);
17699
- };
17700
- proto.aggregator.EstimateFeesResp.prototype.clearTotalFees = function() {
17701
- return this.setTotalFees(void 0);
17702
- };
17703
- proto.aggregator.EstimateFeesResp.prototype.hasTotalFees = function() {
17704
- return jspb.Message.getField(this, 7) != null;
17705
- };
17706
- proto.aggregator.EstimateFeesResp.prototype.getDiscountsList = function() {
17707
- return (
17708
- /** @type{!Array<!proto.aggregator.FeeDiscount>} */
17709
- jspb.Message.getRepeatedWrapperField(this, proto.aggregator.FeeDiscount, 8)
17710
- );
17711
- };
17712
- proto.aggregator.EstimateFeesResp.prototype.setDiscountsList = function(value) {
17713
- return jspb.Message.setRepeatedWrapperField(this, 8, value);
17714
- };
17715
- proto.aggregator.EstimateFeesResp.prototype.addDiscounts = function(opt_value, opt_index) {
17716
- return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.FeeDiscount, opt_index);
17717
- };
17718
- proto.aggregator.EstimateFeesResp.prototype.clearDiscountsList = function() {
17719
- return this.setDiscountsList([]);
17720
- };
17721
- proto.aggregator.EstimateFeesResp.prototype.getTotalDiscounts = function() {
17914
+ proto.aggregator.EstimateFeesResp.prototype.getCogsList = function() {
17722
17915
  return (
17723
- /** @type{?proto.aggregator.FeeAmount} */
17724
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 9)
17916
+ /** @type{!Array<!proto.aggregator.NodeCOGS>} */
17917
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.NodeCOGS, 7)
17725
17918
  );
17726
17919
  };
17727
- proto.aggregator.EstimateFeesResp.prototype.setTotalDiscounts = function(value) {
17728
- return jspb.Message.setWrapperField(this, 9, value);
17920
+ proto.aggregator.EstimateFeesResp.prototype.setCogsList = function(value) {
17921
+ return jspb.Message.setRepeatedWrapperField(this, 7, value);
17729
17922
  };
17730
- proto.aggregator.EstimateFeesResp.prototype.clearTotalDiscounts = function() {
17731
- return this.setTotalDiscounts(void 0);
17923
+ proto.aggregator.EstimateFeesResp.prototype.addCogs = function(opt_value, opt_index) {
17924
+ return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.NodeCOGS, opt_index);
17732
17925
  };
17733
- proto.aggregator.EstimateFeesResp.prototype.hasTotalDiscounts = function() {
17734
- return jspb.Message.getField(this, 9) != null;
17926
+ proto.aggregator.EstimateFeesResp.prototype.clearCogsList = function() {
17927
+ return this.setCogsList([]);
17735
17928
  };
17736
- proto.aggregator.EstimateFeesResp.prototype.getFinalTotal = function() {
17929
+ proto.aggregator.EstimateFeesResp.prototype.getValueFee = function() {
17737
17930
  return (
17738
- /** @type{?proto.aggregator.FeeAmount} */
17739
- jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 10)
17931
+ /** @type{?proto.aggregator.ValueFee} */
17932
+ jspb.Message.getWrapperField(this, proto.aggregator.ValueFee, 8)
17740
17933
  );
17741
17934
  };
17742
- proto.aggregator.EstimateFeesResp.prototype.setFinalTotal = function(value) {
17743
- return jspb.Message.setWrapperField(this, 10, value);
17935
+ proto.aggregator.EstimateFeesResp.prototype.setValueFee = function(value) {
17936
+ return jspb.Message.setWrapperField(this, 8, value);
17744
17937
  };
17745
- proto.aggregator.EstimateFeesResp.prototype.clearFinalTotal = function() {
17746
- return this.setFinalTotal(void 0);
17938
+ proto.aggregator.EstimateFeesResp.prototype.clearValueFee = function() {
17939
+ return this.setValueFee(void 0);
17747
17940
  };
17748
- proto.aggregator.EstimateFeesResp.prototype.hasFinalTotal = function() {
17749
- return jspb.Message.getField(this, 10) != null;
17941
+ proto.aggregator.EstimateFeesResp.prototype.hasValueFee = function() {
17942
+ return jspb.Message.getField(this, 8) != null;
17750
17943
  };
17751
- proto.aggregator.EstimateFeesResp.prototype.getEstimatedAt = function() {
17944
+ proto.aggregator.EstimateFeesResp.prototype.getDiscountsList = function() {
17752
17945
  return (
17753
- /** @type {number} */
17754
- jspb.Message.getFieldWithDefault(this, 11, 0)
17946
+ /** @type{!Array<!proto.aggregator.FeeDiscount>} */
17947
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.FeeDiscount, 9)
17755
17948
  );
17756
17949
  };
17757
- proto.aggregator.EstimateFeesResp.prototype.setEstimatedAt = function(value) {
17758
- return jspb.Message.setProto3IntField(this, 11, value);
17950
+ proto.aggregator.EstimateFeesResp.prototype.setDiscountsList = function(value) {
17951
+ return jspb.Message.setRepeatedWrapperField(this, 9, value);
17759
17952
  };
17760
- proto.aggregator.EstimateFeesResp.prototype.getChainId = function() {
17761
- return (
17762
- /** @type {string} */
17763
- jspb.Message.getFieldWithDefault(this, 12, "")
17764
- );
17953
+ proto.aggregator.EstimateFeesResp.prototype.addDiscounts = function(opt_value, opt_index) {
17954
+ return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.aggregator.FeeDiscount, opt_index);
17765
17955
  };
17766
- proto.aggregator.EstimateFeesResp.prototype.setChainId = function(value) {
17767
- return jspb.Message.setProto3StringField(this, 12, value);
17956
+ proto.aggregator.EstimateFeesResp.prototype.clearDiscountsList = function() {
17957
+ return this.setDiscountsList([]);
17768
17958
  };
17769
- proto.aggregator.EstimateFeesResp.prototype.getPriceDataSource = function() {
17959
+ proto.aggregator.EstimateFeesResp.prototype.getPricingModel = function() {
17770
17960
  return (
17771
17961
  /** @type {string} */
17772
- jspb.Message.getFieldWithDefault(this, 13, "")
17773
- );
17774
- };
17775
- proto.aggregator.EstimateFeesResp.prototype.setPriceDataSource = function(value) {
17776
- return jspb.Message.setProto3StringField(this, 13, value);
17777
- };
17778
- proto.aggregator.EstimateFeesResp.prototype.getPriceDataAgeSeconds = function() {
17779
- return (
17780
- /** @type {number} */
17781
- jspb.Message.getFieldWithDefault(this, 14, 0)
17962
+ jspb.Message.getFieldWithDefault(this, 10, "")
17782
17963
  );
17783
17964
  };
17784
- proto.aggregator.EstimateFeesResp.prototype.setPriceDataAgeSeconds = function(value) {
17785
- return jspb.Message.setProto3IntField(this, 14, value);
17965
+ proto.aggregator.EstimateFeesResp.prototype.setPricingModel = function(value) {
17966
+ return jspb.Message.setProto3StringField(this, 10, value);
17786
17967
  };
17787
17968
  proto.aggregator.EstimateFeesResp.prototype.getWarningsList = function() {
17788
17969
  return (
17789
17970
  /** @type {!Array<string>} */
17790
- jspb.Message.getRepeatedField(this, 15)
17971
+ jspb.Message.getRepeatedField(this, 11)
17791
17972
  );
17792
17973
  };
17793
17974
  proto.aggregator.EstimateFeesResp.prototype.setWarningsList = function(value) {
17794
- return jspb.Message.setField(this, 15, value || []);
17975
+ return jspb.Message.setField(this, 11, value || []);
17795
17976
  };
17796
17977
  proto.aggregator.EstimateFeesResp.prototype.addWarnings = function(value, opt_index) {
17797
- return jspb.Message.addToRepeatedField(this, 15, value, opt_index);
17978
+ return jspb.Message.addToRepeatedField(this, 11, value, opt_index);
17798
17979
  };
17799
17980
  proto.aggregator.EstimateFeesResp.prototype.clearWarningsList = function() {
17800
17981
  return this.setWarningsList([]);
17801
17982
  };
17802
- proto.aggregator.EstimateFeesResp.prototype.getRecommendationsList = function() {
17803
- return (
17804
- /** @type {!Array<string>} */
17805
- jspb.Message.getRepeatedField(this, 16)
17806
- );
17807
- };
17808
- proto.aggregator.EstimateFeesResp.prototype.setRecommendationsList = function(value) {
17809
- return jspb.Message.setField(this, 16, value || []);
17810
- };
17811
- proto.aggregator.EstimateFeesResp.prototype.addRecommendations = function(value, opt_index) {
17812
- return jspb.Message.addToRepeatedField(this, 16, value, opt_index);
17813
- };
17814
- proto.aggregator.EstimateFeesResp.prototype.clearRecommendationsList = function() {
17815
- return this.setRecommendationsList([]);
17816
- };
17817
17983
  if (jspb.Message.GENERATE_TO_OBJECT) {
17818
17984
  proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) {
17819
17985
  return proto.aggregator.EventCondition.toObject(opt_includeInstance, this);
@@ -17971,6 +18137,12 @@ var require_avs_pb = __commonJS({
17971
18137
  NODE_TYPE_LOOP: 9,
17972
18138
  NODE_TYPE_BALANCE: 10
17973
18139
  };
18140
+ proto.aggregator.ExecutionTier = {
18141
+ EXECUTION_TIER_UNSPECIFIED: 0,
18142
+ EXECUTION_TIER_1: 1,
18143
+ EXECUTION_TIER_2: 2,
18144
+ EXECUTION_TIER_3: 3
18145
+ };
17974
18146
  proto.aggregator.ExecutionMode = {
17975
18147
  EXECUTION_MODE_SEQUENTIAL: 0,
17976
18148
  EXECUTION_MODE_PARALLEL: 1
@@ -18021,7 +18193,8 @@ var require_avs_pb = __commonJS({
18021
18193
  SMART_WALLET_RPC_ERROR: 8e3,
18022
18194
  SMART_WALLET_NOT_FOUND: 8001,
18023
18195
  SMART_WALLET_DEPLOYMENT_ERROR: 8002,
18024
- INSUFFICIENT_BALANCE: 8003
18196
+ INSUFFICIENT_BALANCE: 8003,
18197
+ INSUFFICIENT_CREDIT: 8004
18025
18198
  };
18026
18199
  proto.aggregator.TaskStatus = {
18027
18200
  ENABLED: 0,
@@ -21124,6 +21297,35 @@ function convertProtobufExecutionStatusToTypes(protobufStatus) {
21124
21297
  return import_types21.ExecutionStatus.Unspecified;
21125
21298
  }
21126
21299
  }
21300
+ function convertFee(feePb) {
21301
+ if (!feePb) return void 0;
21302
+ return {
21303
+ amount: feePb.getAmount(),
21304
+ unit: feePb.getUnit()
21305
+ };
21306
+ }
21307
+ function convertNodeCOGS(cogsPb) {
21308
+ return {
21309
+ nodeId: cogsPb.getNodeId(),
21310
+ costType: cogsPb.getCostType(),
21311
+ fee: convertFee(cogsPb.getFee()) || { amount: "0", unit: "WEI" },
21312
+ gasUnits: cogsPb.getGasUnits() || void 0
21313
+ };
21314
+ }
21315
+ function convertExecutionTier(tier) {
21316
+ return avs_pb22.ExecutionTier[tier] ?? tier.toString();
21317
+ }
21318
+ function convertValueFee(valuePb) {
21319
+ if (!valuePb) return void 0;
21320
+ return {
21321
+ fee: convertFee(valuePb.getFee()) || { amount: "0", unit: "PERCENTAGE" },
21322
+ tier: convertExecutionTier(valuePb.getTier()),
21323
+ valueBase: valuePb.getValueBase() || void 0,
21324
+ classificationMethod: valuePb.getClassificationMethod(),
21325
+ confidence: valuePb.getConfidence(),
21326
+ reason: valuePb.getReason()
21327
+ };
21328
+ }
21127
21329
  var Execution2 = class _Execution {
21128
21330
  constructor(props) {
21129
21331
  this.id = props.id;
@@ -21133,13 +21335,10 @@ var Execution2 = class _Execution {
21133
21335
  this.error = props.error;
21134
21336
  this.index = props.index;
21135
21337
  this.steps = props.steps.map((s) => new step_default(s));
21136
- this.totalGasCost = props.totalGasCost;
21137
- this.automationFee = props.automationFee;
21338
+ this.executionFee = props.executionFee;
21339
+ this.cogs = props.cogs || [];
21340
+ this.valueFee = props.valueFee;
21138
21341
  }
21139
- /**
21140
- * Convert Execution instance to plain object (ExecutionProps)
21141
- * This is useful for serialization, especially with Next.js Server Components
21142
- */
21143
21342
  toJson() {
21144
21343
  return {
21145
21344
  id: this.id,
@@ -21149,13 +21348,12 @@ var Execution2 = class _Execution {
21149
21348
  error: this.error,
21150
21349
  index: this.index,
21151
21350
  steps: this.steps.map((step) => step.toJson()),
21152
- ...this.totalGasCost && { totalGasCost: this.totalGasCost },
21153
- ...this.automationFee && { automationFee: this.automationFee }
21351
+ ...this.executionFee && { executionFee: this.executionFee },
21352
+ cogs: this.cogs,
21353
+ ...this.valueFee && { valueFee: this.valueFee }
21154
21354
  };
21155
21355
  }
21156
21356
  static fromResponse(execution) {
21157
- const automationFeePb = typeof execution.getAutomationFee === "function" ? execution.getAutomationFee() : void 0;
21158
- const automationFee = automationFeePb ? automationFeePb.toObject() : void 0;
21159
21357
  return new _Execution({
21160
21358
  id: execution.getId(),
21161
21359
  startAt: execution.getStartAt(),
@@ -21163,12 +21361,12 @@ var Execution2 = class _Execution {
21163
21361
  status: convertProtobufExecutionStatusToTypes(execution.getStatus()),
21164
21362
  error: execution.getError(),
21165
21363
  index: execution.getIndex(),
21166
- totalGasCost: execution.getTotalGasCost() || void 0,
21167
- automationFee,
21364
+ executionFee: convertFee(execution.getExecutionFee()),
21365
+ cogs: execution.getCogsList().map(convertNodeCOGS),
21366
+ valueFee: convertValueFee(execution.getValueFee()),
21168
21367
  steps: execution.getStepsList().map((step) => step_default.fromResponse(step))
21169
21368
  });
21170
21369
  }
21171
- // Client side does not generate the execution, so there's no toRequest() method
21172
21370
  };
21173
21371
  var execution_default = Execution2;
21174
21372
 
@@ -22258,129 +22456,54 @@ var Client = class extends BaseClient {
22258
22456
  * @private
22259
22457
  */
22260
22458
  convertEstimateFeesResponse(result) {
22261
- const response = {
22262
- success: result.getSuccess(),
22263
- error: result.getError() || void 0,
22264
- errorCode: result.getErrorCode().toString() || void 0
22265
- };
22266
- const gasFees = result.getGasFees();
22267
- if (gasFees) {
22268
- response.gasFees = {
22269
- nodeGasFees: gasFees.getOperationsList().map((operation) => ({
22270
- nodeId: operation.getNodeId(),
22271
- operationType: operation.getOperationType(),
22272
- methodName: operation.getMethodName() || void 0,
22273
- gasUnits: operation.getGasUnits(),
22274
- gasPrice: gasFees.getGasPriceGwei() || "",
22275
- // Use parent gas price
22276
- totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(),
22277
- success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
22278
- // Check if operation has valid gas cost
22279
- error: void 0
22280
- })),
22281
- totalGasCost: this.convertFeeAmount(gasFees.getTotalGasFees()),
22282
- estimationAccurate: gasFees.getEstimationAccurate(),
22283
- estimationMethod: gasFees.getEstimationMethod(),
22284
- averageGasPrice: gasFees.getGasPriceGwei(),
22285
- notes: []
22286
- // Not available in current protobuf
22459
+ const nativeTokenPb = result.getNativeToken();
22460
+ const nativeToken = nativeTokenPb ? { symbol: nativeTokenPb.getSymbol(), decimals: nativeTokenPb.getDecimals() } : void 0;
22461
+ const execFeePb = result.getExecutionFee();
22462
+ const executionFee = execFeePb ? { amount: execFeePb.getAmount(), unit: execFeePb.getUnit() } : void 0;
22463
+ const cogs = result.getCogsList().map((cogsPb) => {
22464
+ const feePb = cogsPb.getFee();
22465
+ return {
22466
+ nodeId: cogsPb.getNodeId(),
22467
+ costType: cogsPb.getCostType(),
22468
+ fee: feePb ? { amount: feePb.getAmount(), unit: feePb.getUnit() } : { amount: "0", unit: "WEI" },
22469
+ gasUnits: cogsPb.getGasUnits() || void 0
22287
22470
  };
22288
- }
22289
- const automationFees = result.getAutomationFees();
22290
- if (automationFees) {
22291
- const baseFee = automationFees.getBaseFee();
22292
- const executionFee = automationFees.getExecutionFee();
22293
- const totalFee = baseFee || this.createMockFeeAmount();
22294
- response.automationFees = {
22295
- triggerType: automationFees.getTriggerType(),
22296
- durationMinutes: automationFees.getDurationMinutes(),
22297
- baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(),
22298
- executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(),
22299
- estimatedExecutions: automationFees.getEstimatedExecutions(),
22300
- totalFee: this.convertFeeAmount(totalFee),
22301
- breakdown: []
22302
- // Not available in current protobuf structure
22471
+ });
22472
+ const valueFeePb = result.getValueFee();
22473
+ let valueFee;
22474
+ if (valueFeePb) {
22475
+ const vfFeePb = valueFeePb.getFee();
22476
+ valueFee = {
22477
+ fee: vfFeePb ? { amount: vfFeePb.getAmount(), unit: vfFeePb.getUnit() } : { amount: "0", unit: "PERCENTAGE" },
22478
+ tier: avs_pb24.ExecutionTier[valueFeePb.getTier()] ?? valueFeePb.getTier().toString(),
22479
+ valueBase: valueFeePb.getValueBase() || void 0,
22480
+ classificationMethod: valueFeePb.getClassificationMethod(),
22481
+ confidence: valueFeePb.getConfidence(),
22482
+ reason: valueFeePb.getReason()
22303
22483
  };
22304
22484
  }
22305
- const creationFees = result.getCreationFees();
22306
- if (creationFees) {
22307
- response.creationFees = {
22308
- creationRequired: creationFees.getCreationRequired(),
22309
- walletAddress: creationFees.getWalletAddress(),
22310
- creationFee: creationFees.getCreationFee() ? this.convertFeeAmount(creationFees.getCreationFee()) : void 0,
22311
- initialFunding: creationFees.getInitialFunding() ? this.convertFeeAmount(creationFees.getInitialFunding()) : void 0
22485
+ const discounts = result.getDiscountsList().map((discountPb) => {
22486
+ const dFeePb = discountPb.getDiscount();
22487
+ return {
22488
+ discountType: discountPb.getDiscountType(),
22489
+ discountName: discountPb.getDiscountName(),
22490
+ discount: dFeePb ? { amount: dFeePb.getAmount(), unit: dFeePb.getUnit() } : { amount: "0", unit: "USD" },
22491
+ expiryDate: discountPb.getExpiryDate() || void 0,
22492
+ terms: discountPb.getTerms() || void 0
22312
22493
  };
22313
- }
22314
- if (result.getTotalFees()) {
22315
- response.totalFees = this.convertFeeAmount(result.getTotalFees());
22316
- }
22317
- if (result.getTotalDiscounts()) {
22318
- response.totalDiscounts = this.convertFeeAmount(
22319
- result.getTotalDiscounts()
22320
- );
22321
- }
22322
- if (result.getFinalTotal()) {
22323
- response.finalTotal = this.convertFeeAmount(result.getFinalTotal());
22324
- }
22325
- response.discounts = result.getDiscountsList().map((discount, index) => ({
22326
- discountId: `auto-${index}`,
22327
- // Synthesized unique ID since not available in FeeDiscount
22328
- discountType: discount.getDiscountType(),
22329
- discountName: discount.getDiscountName(),
22330
- appliesTo: discount.getAppliesTo(),
22331
- discountPercentage: discount.getDiscountPercentage(),
22332
- discountAmount: this.convertFeeAmount(discount.getDiscountAmount()),
22333
- expiryDate: discount.getExpiryDate() || void 0,
22334
- terms: discount.getTerms() || void 0
22335
- }));
22336
- response.estimatedAt = result.getEstimatedAt() || void 0;
22337
- response.chainId = result.getChainId() || void 0;
22338
- response.priceDataSource = result.getPriceDataSource() || void 0;
22339
- response.priceDataAgeSeconds = result.getPriceDataAgeSeconds() || void 0;
22340
- response.warnings = result.getWarningsList();
22341
- response.recommendations = result.getRecommendationsList();
22342
- return response;
22343
- }
22344
- /**
22345
- * Create a mock fee amount object that mimics protobuf FeeAmount interface
22346
- * @private
22347
- */
22348
- createMockFeeAmount() {
22349
- const getNativeTokenSymbol = () => {
22350
- return "ETH";
22351
- };
22352
- return {
22353
- getNativeTokenAmount: () => "0",
22354
- getNativeTokenSymbol: () => getNativeTokenSymbol(),
22355
- getUsdAmount: () => "0",
22356
- getApTokenAmount: () => "0"
22357
- };
22358
- }
22359
- /**
22360
- * Create a zero fee amount
22361
- * @private
22362
- */
22363
- createZeroFeeAmount() {
22364
- const getNativeTokenSymbol = () => {
22365
- return "ETH";
22366
- };
22367
- return {
22368
- nativeTokenAmount: "0",
22369
- nativeTokenSymbol: getNativeTokenSymbol(),
22370
- usdAmount: "0",
22371
- apTokenAmount: "0"
22372
- };
22373
- }
22374
- /**
22375
- * Convert protobuf FeeAmount to TypeScript FeeAmount
22376
- * @private
22377
- */
22378
- convertFeeAmount(feeAmount) {
22494
+ });
22379
22495
  return {
22380
- nativeTokenAmount: feeAmount.getNativeTokenAmount(),
22381
- nativeTokenSymbol: feeAmount.getNativeTokenSymbol(),
22382
- usdAmount: feeAmount.getUsdAmount(),
22383
- apTokenAmount: feeAmount.getApTokenAmount()
22496
+ success: result.getSuccess(),
22497
+ error: result.getError() || void 0,
22498
+ errorCode: result.getErrorCode().toString() || void 0,
22499
+ chainId: result.getChainId() || void 0,
22500
+ nativeToken,
22501
+ executionFee,
22502
+ cogs,
22503
+ valueFee,
22504
+ discounts,
22505
+ pricingModel: result.getPricingModel() || void 0,
22506
+ warnings: result.getWarningsList()
22384
22507
  };
22385
22508
  }
22386
22509
  };