@avaprotocol/sdk-js 2.7.4 → 2.7.5-dev.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,6 +53,7 @@ var require_avs_pb = __commonJS({
53
53
  }.call(null);
54
54
  var google_protobuf_struct_pb5 = require("google-protobuf/google/protobuf/struct_pb.js");
55
55
  goog.object.extend(proto, google_protobuf_struct_pb5);
56
+ goog.exportSymbol("proto.aggregator.AutomationFee", null, global);
56
57
  goog.exportSymbol("proto.aggregator.BlockTrigger", null, global);
57
58
  goog.exportSymbol("proto.aggregator.BlockTrigger.Config", null, global);
58
59
  goog.exportSymbol("proto.aggregator.BlockTrigger.Output", null, global);
@@ -89,6 +90,8 @@ var require_avs_pb = __commonJS({
89
90
  goog.exportSymbol("proto.aggregator.ETHTransferNode.Config", null, global);
90
91
  goog.exportSymbol("proto.aggregator.ETHTransferNode.Output", null, global);
91
92
  goog.exportSymbol("proto.aggregator.ErrorCode", null, global);
93
+ goog.exportSymbol("proto.aggregator.EstimateFeesReq", null, global);
94
+ goog.exportSymbol("proto.aggregator.EstimateFeesResp", null, global);
92
95
  goog.exportSymbol("proto.aggregator.EventCondition", null, global);
93
96
  goog.exportSymbol("proto.aggregator.EventTrigger", null, global);
94
97
  goog.exportSymbol("proto.aggregator.EventTrigger.Config", null, global);
@@ -103,12 +106,16 @@ var require_avs_pb = __commonJS({
103
106
  goog.exportSymbol("proto.aggregator.ExecutionReq", null, global);
104
107
  goog.exportSymbol("proto.aggregator.ExecutionStatus", null, global);
105
108
  goog.exportSymbol("proto.aggregator.ExecutionStatusResp", null, global);
109
+ goog.exportSymbol("proto.aggregator.FeeAmount", null, global);
110
+ goog.exportSymbol("proto.aggregator.FeeDiscount", null, global);
106
111
  goog.exportSymbol("proto.aggregator.FilterNode", null, global);
107
112
  goog.exportSymbol("proto.aggregator.FilterNode.Config", null, global);
108
113
  goog.exportSymbol("proto.aggregator.FilterNode.Output", null, global);
109
114
  goog.exportSymbol("proto.aggregator.FixedTimeTrigger", null, global);
110
115
  goog.exportSymbol("proto.aggregator.FixedTimeTrigger.Config", null, global);
111
116
  goog.exportSymbol("proto.aggregator.FixedTimeTrigger.Output", null, global);
117
+ goog.exportSymbol("proto.aggregator.GasFeeBreakdown", null, global);
118
+ goog.exportSymbol("proto.aggregator.GasOperationFee", null, global);
112
119
  goog.exportSymbol("proto.aggregator.GetExecutionCountReq", null, global);
113
120
  goog.exportSymbol("proto.aggregator.GetExecutionCountResp", null, global);
114
121
  goog.exportSymbol("proto.aggregator.GetExecutionStatsReq", null, global);
@@ -160,6 +167,7 @@ var require_avs_pb = __commonJS({
160
167
  goog.exportSymbol("proto.aggregator.SetWalletReq", null, global);
161
168
  goog.exportSymbol("proto.aggregator.SimulateTaskReq", null, global);
162
169
  goog.exportSymbol("proto.aggregator.SmartWallet", null, global);
170
+ goog.exportSymbol("proto.aggregator.SmartWalletCreationFee", null, global);
163
171
  goog.exportSymbol("proto.aggregator.Task", null, global);
164
172
  goog.exportSymbol("proto.aggregator.TaskEdge", null, global);
165
173
  goog.exportSymbol("proto.aggregator.TaskNode", null, global);
@@ -924,6 +932,62 @@ var require_avs_pb = __commonJS({
924
932
  if (goog.DEBUG && !COMPILED) {
925
933
  proto.aggregator.SimulateTaskReq.displayName = "proto.aggregator.SimulateTaskReq";
926
934
  }
935
+ proto.aggregator.EstimateFeesReq = function(opt_data) {
936
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EstimateFeesReq.repeatedFields_, null);
937
+ };
938
+ goog.inherits(proto.aggregator.EstimateFeesReq, jspb.Message);
939
+ if (goog.DEBUG && !COMPILED) {
940
+ proto.aggregator.EstimateFeesReq.displayName = "proto.aggregator.EstimateFeesReq";
941
+ }
942
+ proto.aggregator.FeeAmount = function(opt_data) {
943
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
944
+ };
945
+ goog.inherits(proto.aggregator.FeeAmount, jspb.Message);
946
+ if (goog.DEBUG && !COMPILED) {
947
+ proto.aggregator.FeeAmount.displayName = "proto.aggregator.FeeAmount";
948
+ }
949
+ proto.aggregator.GasFeeBreakdown = function(opt_data) {
950
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.GasFeeBreakdown.repeatedFields_, null);
951
+ };
952
+ goog.inherits(proto.aggregator.GasFeeBreakdown, jspb.Message);
953
+ if (goog.DEBUG && !COMPILED) {
954
+ proto.aggregator.GasFeeBreakdown.displayName = "proto.aggregator.GasFeeBreakdown";
955
+ }
956
+ proto.aggregator.GasOperationFee = function(opt_data) {
957
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
958
+ };
959
+ goog.inherits(proto.aggregator.GasOperationFee, jspb.Message);
960
+ if (goog.DEBUG && !COMPILED) {
961
+ proto.aggregator.GasOperationFee.displayName = "proto.aggregator.GasOperationFee";
962
+ }
963
+ proto.aggregator.SmartWalletCreationFee = function(opt_data) {
964
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
965
+ };
966
+ goog.inherits(proto.aggregator.SmartWalletCreationFee, jspb.Message);
967
+ if (goog.DEBUG && !COMPILED) {
968
+ proto.aggregator.SmartWalletCreationFee.displayName = "proto.aggregator.SmartWalletCreationFee";
969
+ }
970
+ proto.aggregator.AutomationFee = function(opt_data) {
971
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
972
+ };
973
+ goog.inherits(proto.aggregator.AutomationFee, jspb.Message);
974
+ if (goog.DEBUG && !COMPILED) {
975
+ proto.aggregator.AutomationFee.displayName = "proto.aggregator.AutomationFee";
976
+ }
977
+ proto.aggregator.FeeDiscount = function(opt_data) {
978
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
979
+ };
980
+ goog.inherits(proto.aggregator.FeeDiscount, jspb.Message);
981
+ if (goog.DEBUG && !COMPILED) {
982
+ proto.aggregator.FeeDiscount.displayName = "proto.aggregator.FeeDiscount";
983
+ }
984
+ proto.aggregator.EstimateFeesResp = function(opt_data) {
985
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.EstimateFeesResp.repeatedFields_, null);
986
+ };
987
+ goog.inherits(proto.aggregator.EstimateFeesResp, jspb.Message);
988
+ if (goog.DEBUG && !COMPILED) {
989
+ proto.aggregator.EstimateFeesResp.displayName = "proto.aggregator.EstimateFeesResp";
990
+ }
927
991
  proto.aggregator.EventCondition = function(opt_data) {
928
992
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
929
993
  };
@@ -7011,7 +7075,7 @@ var require_avs_pb = __commonJS({
7011
7075
  status: jspb.Message.getFieldWithDefault(msg, 4, 0),
7012
7076
  error: jspb.Message.getFieldWithDefault(msg, 5, ""),
7013
7077
  index: jspb.Message.getFieldWithDefault(msg, 6, 0),
7014
- totalGasCost: jspb.Message.getFieldWithDefault(msg, 30, ""),
7078
+ totalGasCost: jspb.Message.getFieldWithDefault(msg, 7, ""),
7015
7079
  stepsList: jspb.Message.toObjectList(
7016
7080
  msg.getStepsList(),
7017
7081
  proto.aggregator.Execution.Step.toObject,
@@ -7078,7 +7142,7 @@ var require_avs_pb = __commonJS({
7078
7142
  );
7079
7143
  msg.setIndex(value);
7080
7144
  break;
7081
- case 30:
7145
+ case 7:
7082
7146
  var value = (
7083
7147
  /** @type {string} */
7084
7148
  reader.readString()
@@ -7149,7 +7213,7 @@ var require_avs_pb = __commonJS({
7149
7213
  f = message.getTotalGasCost();
7150
7214
  if (f.length > 0) {
7151
7215
  writer.writeString(
7152
- 30,
7216
+ 7,
7153
7217
  f
7154
7218
  );
7155
7219
  }
@@ -8071,11 +8135,11 @@ var require_avs_pb = __commonJS({
8071
8135
  proto.aggregator.Execution.prototype.getTotalGasCost = function() {
8072
8136
  return (
8073
8137
  /** @type {string} */
8074
- jspb.Message.getFieldWithDefault(this, 30, "")
8138
+ jspb.Message.getFieldWithDefault(this, 7, "")
8075
8139
  );
8076
8140
  };
8077
8141
  proto.aggregator.Execution.prototype.setTotalGasCost = function(value) {
8078
- return jspb.Message.setProto3StringField(this, 30, value);
8142
+ return jspb.Message.setProto3StringField(this, 7, value);
8079
8143
  };
8080
8144
  proto.aggregator.Execution.prototype.getStepsList = function() {
8081
8145
  return (
@@ -15239,16 +15303,29 @@ var require_avs_pb = __commonJS({
15239
15303
  this.getInputVariablesMap().clear();
15240
15304
  return this;
15241
15305
  };
15306
+ proto.aggregator.EstimateFeesReq.repeatedFields_ = [2, 3];
15242
15307
  if (jspb.Message.GENERATE_TO_OBJECT) {
15243
- proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) {
15244
- return proto.aggregator.EventCondition.toObject(opt_includeInstance, this);
15308
+ proto.aggregator.EstimateFeesReq.prototype.toObject = function(opt_includeInstance) {
15309
+ return proto.aggregator.EstimateFeesReq.toObject(opt_includeInstance, this);
15245
15310
  };
15246
- proto.aggregator.EventCondition.toObject = function(includeInstance, msg) {
15311
+ proto.aggregator.EstimateFeesReq.toObject = function(includeInstance, msg) {
15247
15312
  var f, obj = {
15248
- fieldName: jspb.Message.getFieldWithDefault(msg, 1, ""),
15249
- operator: jspb.Message.getFieldWithDefault(msg, 2, ""),
15250
- value: jspb.Message.getFieldWithDefault(msg, 3, ""),
15251
- fieldType: jspb.Message.getFieldWithDefault(msg, 4, "")
15313
+ trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f),
15314
+ nodesList: jspb.Message.toObjectList(
15315
+ msg.getNodesList(),
15316
+ proto.aggregator.TaskNode.toObject,
15317
+ includeInstance
15318
+ ),
15319
+ edgesList: jspb.Message.toObjectList(
15320
+ msg.getEdgesList(),
15321
+ proto.aggregator.TaskEdge.toObject,
15322
+ includeInstance
15323
+ ),
15324
+ createdAt: jspb.Message.getFieldWithDefault(msg, 4, 0),
15325
+ expireAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
15326
+ maxExecution: jspb.Message.getFieldWithDefault(msg, 6, 0),
15327
+ runner: jspb.Message.getFieldWithDefault(msg, 7, ""),
15328
+ inputVariablesMap: (f = msg.getInputVariablesMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
15252
15329
  };
15253
15330
  if (includeInstance) {
15254
15331
  obj.$jspbMessageInstance = msg;
@@ -15256,12 +15333,12 @@ var require_avs_pb = __commonJS({
15256
15333
  return obj;
15257
15334
  };
15258
15335
  }
15259
- proto.aggregator.EventCondition.deserializeBinary = function(bytes) {
15336
+ proto.aggregator.EstimateFeesReq.deserializeBinary = function(bytes) {
15260
15337
  var reader = new jspb.BinaryReader(bytes);
15261
- var msg = new proto.aggregator.EventCondition();
15262
- return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader);
15338
+ var msg = new proto.aggregator.EstimateFeesReq();
15339
+ return proto.aggregator.EstimateFeesReq.deserializeBinaryFromReader(msg, reader);
15263
15340
  };
15264
- proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) {
15341
+ proto.aggregator.EstimateFeesReq.deserializeBinaryFromReader = function(msg, reader) {
15265
15342
  while (reader.nextField()) {
15266
15343
  if (reader.isEndGroup()) {
15267
15344
  break;
@@ -15269,32 +15346,53 @@ var require_avs_pb = __commonJS({
15269
15346
  var field = reader.getFieldNumber();
15270
15347
  switch (field) {
15271
15348
  case 1:
15349
+ var value = new proto.aggregator.TaskTrigger();
15350
+ reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader);
15351
+ msg.setTrigger(value);
15352
+ break;
15353
+ case 2:
15354
+ var value = new proto.aggregator.TaskNode();
15355
+ reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader);
15356
+ msg.addNodes(value);
15357
+ break;
15358
+ case 3:
15359
+ var value = new proto.aggregator.TaskEdge();
15360
+ reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader);
15361
+ msg.addEdges(value);
15362
+ break;
15363
+ case 4:
15272
15364
  var value = (
15273
- /** @type {string} */
15274
- reader.readString()
15365
+ /** @type {number} */
15366
+ reader.readInt64()
15275
15367
  );
15276
- msg.setFieldName(value);
15368
+ msg.setCreatedAt(value);
15277
15369
  break;
15278
- case 2:
15370
+ case 5:
15279
15371
  var value = (
15280
- /** @type {string} */
15281
- reader.readString()
15372
+ /** @type {number} */
15373
+ reader.readInt64()
15282
15374
  );
15283
- msg.setOperator(value);
15375
+ msg.setExpireAt(value);
15284
15376
  break;
15285
- case 3:
15377
+ case 6:
15286
15378
  var value = (
15287
- /** @type {string} */
15288
- reader.readString()
15379
+ /** @type {number} */
15380
+ reader.readInt64()
15289
15381
  );
15290
- msg.setValue(value);
15382
+ msg.setMaxExecution(value);
15291
15383
  break;
15292
- case 4:
15384
+ case 7:
15293
15385
  var value = (
15294
15386
  /** @type {string} */
15295
15387
  reader.readString()
15296
15388
  );
15297
- msg.setFieldType(value);
15389
+ msg.setRunner(value);
15390
+ break;
15391
+ case 8:
15392
+ var value = msg.getInputVariablesMap();
15393
+ reader.readMessage(value, function(message, reader2) {
15394
+ jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
15395
+ });
15298
15396
  break;
15299
15397
  default:
15300
15398
  reader.skipField();
@@ -15303,132 +15401,1914 @@ var require_avs_pb = __commonJS({
15303
15401
  }
15304
15402
  return msg;
15305
15403
  };
15306
- proto.aggregator.EventCondition.prototype.serializeBinary = function() {
15404
+ proto.aggregator.EstimateFeesReq.prototype.serializeBinary = function() {
15307
15405
  var writer = new jspb.BinaryWriter();
15308
- proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer);
15406
+ proto.aggregator.EstimateFeesReq.serializeBinaryToWriter(this, writer);
15309
15407
  return writer.getResultBuffer();
15310
15408
  };
15311
- proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) {
15409
+ proto.aggregator.EstimateFeesReq.serializeBinaryToWriter = function(message, writer) {
15312
15410
  var f = void 0;
15313
- f = message.getFieldName();
15314
- if (f.length > 0) {
15315
- writer.writeString(
15411
+ f = message.getTrigger();
15412
+ if (f != null) {
15413
+ writer.writeMessage(
15316
15414
  1,
15317
- f
15415
+ f,
15416
+ proto.aggregator.TaskTrigger.serializeBinaryToWriter
15318
15417
  );
15319
15418
  }
15320
- f = message.getOperator();
15419
+ f = message.getNodesList();
15321
15420
  if (f.length > 0) {
15322
- writer.writeString(
15421
+ writer.writeRepeatedMessage(
15323
15422
  2,
15324
- f
15423
+ f,
15424
+ proto.aggregator.TaskNode.serializeBinaryToWriter
15325
15425
  );
15326
15426
  }
15327
- f = message.getValue();
15427
+ f = message.getEdgesList();
15328
15428
  if (f.length > 0) {
15329
- writer.writeString(
15429
+ writer.writeRepeatedMessage(
15330
15430
  3,
15431
+ f,
15432
+ proto.aggregator.TaskEdge.serializeBinaryToWriter
15433
+ );
15434
+ }
15435
+ f = message.getCreatedAt();
15436
+ if (f !== 0) {
15437
+ writer.writeInt64(
15438
+ 4,
15331
15439
  f
15332
15440
  );
15333
15441
  }
15334
- f = message.getFieldType();
15442
+ f = message.getExpireAt();
15443
+ if (f !== 0) {
15444
+ writer.writeInt64(
15445
+ 5,
15446
+ f
15447
+ );
15448
+ }
15449
+ f = message.getMaxExecution();
15450
+ if (f !== 0) {
15451
+ writer.writeInt64(
15452
+ 6,
15453
+ f
15454
+ );
15455
+ }
15456
+ f = message.getRunner();
15335
15457
  if (f.length > 0) {
15336
15458
  writer.writeString(
15337
- 4,
15459
+ 7,
15338
15460
  f
15339
15461
  );
15340
15462
  }
15463
+ f = message.getInputVariablesMap(true);
15464
+ if (f && f.getLength() > 0) {
15465
+ f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
15466
+ }
15341
15467
  };
15342
- proto.aggregator.EventCondition.prototype.getFieldName = function() {
15468
+ proto.aggregator.EstimateFeesReq.prototype.getTrigger = function() {
15343
15469
  return (
15344
- /** @type {string} */
15345
- jspb.Message.getFieldWithDefault(this, 1, "")
15470
+ /** @type{?proto.aggregator.TaskTrigger} */
15471
+ jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)
15346
15472
  );
15347
15473
  };
15348
- proto.aggregator.EventCondition.prototype.setFieldName = function(value) {
15349
- return jspb.Message.setProto3StringField(this, 1, value);
15474
+ proto.aggregator.EstimateFeesReq.prototype.setTrigger = function(value) {
15475
+ return jspb.Message.setWrapperField(this, 1, value);
15350
15476
  };
15351
- proto.aggregator.EventCondition.prototype.getOperator = function() {
15477
+ proto.aggregator.EstimateFeesReq.prototype.clearTrigger = function() {
15478
+ return this.setTrigger(void 0);
15479
+ };
15480
+ proto.aggregator.EstimateFeesReq.prototype.hasTrigger = function() {
15481
+ return jspb.Message.getField(this, 1) != null;
15482
+ };
15483
+ proto.aggregator.EstimateFeesReq.prototype.getNodesList = function() {
15352
15484
  return (
15353
- /** @type {string} */
15354
- jspb.Message.getFieldWithDefault(this, 2, "")
15485
+ /** @type{!Array<!proto.aggregator.TaskNode>} */
15486
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 2)
15355
15487
  );
15356
15488
  };
15357
- proto.aggregator.EventCondition.prototype.setOperator = function(value) {
15358
- return jspb.Message.setProto3StringField(this, 2, value);
15489
+ proto.aggregator.EstimateFeesReq.prototype.setNodesList = function(value) {
15490
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
15359
15491
  };
15360
- proto.aggregator.EventCondition.prototype.getValue = function() {
15492
+ proto.aggregator.EstimateFeesReq.prototype.addNodes = function(opt_value, opt_index) {
15493
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.TaskNode, opt_index);
15494
+ };
15495
+ proto.aggregator.EstimateFeesReq.prototype.clearNodesList = function() {
15496
+ return this.setNodesList([]);
15497
+ };
15498
+ proto.aggregator.EstimateFeesReq.prototype.getEdgesList = function() {
15361
15499
  return (
15362
- /** @type {string} */
15363
- jspb.Message.getFieldWithDefault(this, 3, "")
15500
+ /** @type{!Array<!proto.aggregator.TaskEdge>} */
15501
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 3)
15364
15502
  );
15365
15503
  };
15366
- proto.aggregator.EventCondition.prototype.setValue = function(value) {
15367
- return jspb.Message.setProto3StringField(this, 3, value);
15504
+ proto.aggregator.EstimateFeesReq.prototype.setEdgesList = function(value) {
15505
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
15368
15506
  };
15369
- proto.aggregator.EventCondition.prototype.getFieldType = function() {
15507
+ proto.aggregator.EstimateFeesReq.prototype.addEdges = function(opt_value, opt_index) {
15508
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.aggregator.TaskEdge, opt_index);
15509
+ };
15510
+ proto.aggregator.EstimateFeesReq.prototype.clearEdgesList = function() {
15511
+ return this.setEdgesList([]);
15512
+ };
15513
+ proto.aggregator.EstimateFeesReq.prototype.getCreatedAt = function() {
15370
15514
  return (
15371
- /** @type {string} */
15372
- jspb.Message.getFieldWithDefault(this, 4, "")
15515
+ /** @type {number} */
15516
+ jspb.Message.getFieldWithDefault(this, 4, 0)
15373
15517
  );
15374
15518
  };
15375
- proto.aggregator.EventCondition.prototype.setFieldType = function(value) {
15376
- return jspb.Message.setProto3StringField(this, 4, value);
15519
+ proto.aggregator.EstimateFeesReq.prototype.setCreatedAt = function(value) {
15520
+ return jspb.Message.setProto3IntField(this, 4, value);
15377
15521
  };
15378
- proto.aggregator.TriggerType = {
15379
- TRIGGER_TYPE_UNSPECIFIED: 0,
15380
- TRIGGER_TYPE_MANUAL: 1,
15381
- TRIGGER_TYPE_FIXED_TIME: 2,
15382
- TRIGGER_TYPE_CRON: 3,
15383
- TRIGGER_TYPE_BLOCK: 4,
15384
- TRIGGER_TYPE_EVENT: 5
15522
+ proto.aggregator.EstimateFeesReq.prototype.getExpireAt = function() {
15523
+ return (
15524
+ /** @type {number} */
15525
+ jspb.Message.getFieldWithDefault(this, 5, 0)
15526
+ );
15385
15527
  };
15386
- proto.aggregator.NodeType = {
15387
- NODE_TYPE_UNSPECIFIED: 0,
15388
- NODE_TYPE_ETH_TRANSFER: 1,
15389
- NODE_TYPE_CONTRACT_WRITE: 2,
15390
- NODE_TYPE_CONTRACT_READ: 3,
15391
- NODE_TYPE_GRAPHQL_QUERY: 4,
15392
- NODE_TYPE_REST_API: 5,
15393
- NODE_TYPE_CUSTOM_CODE: 6,
15394
- NODE_TYPE_BRANCH: 7,
15395
- NODE_TYPE_FILTER: 8,
15396
- NODE_TYPE_LOOP: 9
15528
+ proto.aggregator.EstimateFeesReq.prototype.setExpireAt = function(value) {
15529
+ return jspb.Message.setProto3IntField(this, 5, value);
15397
15530
  };
15398
- proto.aggregator.ExecutionMode = {
15399
- EXECUTION_MODE_SEQUENTIAL: 0,
15400
- EXECUTION_MODE_PARALLEL: 1
15531
+ proto.aggregator.EstimateFeesReq.prototype.getMaxExecution = function() {
15532
+ return (
15533
+ /** @type {number} */
15534
+ jspb.Message.getFieldWithDefault(this, 6, 0)
15535
+ );
15401
15536
  };
15402
- proto.aggregator.Lang = {
15403
- JAVASCRIPT: 0
15537
+ proto.aggregator.EstimateFeesReq.prototype.setMaxExecution = function(value) {
15538
+ return jspb.Message.setProto3IntField(this, 6, value);
15404
15539
  };
15405
- proto.aggregator.ErrorCode = {
15406
- ERROR_CODE_UNSPECIFIED: 0,
15407
- UNAUTHORIZED: 1e3,
15408
- FORBIDDEN: 1001,
15409
- INVALID_SIGNATURE: 1002,
15410
- EXPIRED_TOKEN: 1003,
15411
- TASK_NOT_FOUND: 2e3,
15412
- EXECUTION_NOT_FOUND: 2001,
15413
- WALLET_NOT_FOUND: 2002,
15414
- SECRET_NOT_FOUND: 2003,
15415
- TOKEN_METADATA_NOT_FOUND: 2004,
15416
- INVALID_REQUEST: 3e3,
15417
- INVALID_TRIGGER_CONFIG: 3001,
15418
- INVALID_NODE_CONFIG: 3002,
15419
- INVALID_WORKFLOW: 3003,
15420
- INVALID_ADDRESS: 3004,
15421
- INVALID_SIGNATURE_FORMAT: 3005,
15422
- MISSING_REQUIRED_FIELD: 3006,
15423
- TASK_ALREADY_EXISTS: 4e3,
15424
- TASK_ALREADY_COMPLETED: 4001,
15425
- TASK_ALREADY_CANCELLED: 4002,
15426
- EXECUTION_IN_PROGRESS: 4003,
15427
- WALLET_ALREADY_EXISTS: 4004,
15428
- SECRET_ALREADY_EXISTS: 4005,
15429
- RPC_NODE_ERROR: 5e3,
15430
- TENDERLY_API_ERROR: 5001,
15431
- TOKEN_LOOKUP_ERROR: 5002,
15540
+ proto.aggregator.EstimateFeesReq.prototype.getRunner = function() {
15541
+ return (
15542
+ /** @type {string} */
15543
+ jspb.Message.getFieldWithDefault(this, 7, "")
15544
+ );
15545
+ };
15546
+ proto.aggregator.EstimateFeesReq.prototype.setRunner = function(value) {
15547
+ return jspb.Message.setProto3StringField(this, 7, value);
15548
+ };
15549
+ proto.aggregator.EstimateFeesReq.prototype.getInputVariablesMap = function(opt_noLazyCreate) {
15550
+ return (
15551
+ /** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */
15552
+ jspb.Message.getMapField(
15553
+ this,
15554
+ 8,
15555
+ opt_noLazyCreate,
15556
+ proto.google.protobuf.Value
15557
+ )
15558
+ );
15559
+ };
15560
+ proto.aggregator.EstimateFeesReq.prototype.clearInputVariablesMap = function() {
15561
+ this.getInputVariablesMap().clear();
15562
+ return this;
15563
+ };
15564
+ if (jspb.Message.GENERATE_TO_OBJECT) {
15565
+ proto.aggregator.FeeAmount.prototype.toObject = function(opt_includeInstance) {
15566
+ return proto.aggregator.FeeAmount.toObject(opt_includeInstance, this);
15567
+ };
15568
+ proto.aggregator.FeeAmount.toObject = function(includeInstance, msg) {
15569
+ var f, obj = {
15570
+ nativeTokenAmount: jspb.Message.getFieldWithDefault(msg, 1, ""),
15571
+ nativeTokenSymbol: jspb.Message.getFieldWithDefault(msg, 2, ""),
15572
+ usdAmount: jspb.Message.getFieldWithDefault(msg, 3, ""),
15573
+ apTokenAmount: jspb.Message.getFieldWithDefault(msg, 4, "")
15574
+ };
15575
+ if (includeInstance) {
15576
+ obj.$jspbMessageInstance = msg;
15577
+ }
15578
+ return obj;
15579
+ };
15580
+ }
15581
+ proto.aggregator.FeeAmount.deserializeBinary = function(bytes) {
15582
+ var reader = new jspb.BinaryReader(bytes);
15583
+ var msg = new proto.aggregator.FeeAmount();
15584
+ return proto.aggregator.FeeAmount.deserializeBinaryFromReader(msg, reader);
15585
+ };
15586
+ proto.aggregator.FeeAmount.deserializeBinaryFromReader = function(msg, reader) {
15587
+ while (reader.nextField()) {
15588
+ if (reader.isEndGroup()) {
15589
+ break;
15590
+ }
15591
+ var field = reader.getFieldNumber();
15592
+ switch (field) {
15593
+ case 1:
15594
+ var value = (
15595
+ /** @type {string} */
15596
+ reader.readString()
15597
+ );
15598
+ msg.setNativeTokenAmount(value);
15599
+ break;
15600
+ case 2:
15601
+ var value = (
15602
+ /** @type {string} */
15603
+ reader.readString()
15604
+ );
15605
+ msg.setNativeTokenSymbol(value);
15606
+ break;
15607
+ case 3:
15608
+ var value = (
15609
+ /** @type {string} */
15610
+ reader.readString()
15611
+ );
15612
+ msg.setUsdAmount(value);
15613
+ break;
15614
+ case 4:
15615
+ var value = (
15616
+ /** @type {string} */
15617
+ reader.readString()
15618
+ );
15619
+ msg.setApTokenAmount(value);
15620
+ break;
15621
+ default:
15622
+ reader.skipField();
15623
+ break;
15624
+ }
15625
+ }
15626
+ return msg;
15627
+ };
15628
+ proto.aggregator.FeeAmount.prototype.serializeBinary = function() {
15629
+ var writer = new jspb.BinaryWriter();
15630
+ proto.aggregator.FeeAmount.serializeBinaryToWriter(this, writer);
15631
+ return writer.getResultBuffer();
15632
+ };
15633
+ proto.aggregator.FeeAmount.serializeBinaryToWriter = function(message, writer) {
15634
+ var f = void 0;
15635
+ f = message.getNativeTokenAmount();
15636
+ if (f.length > 0) {
15637
+ writer.writeString(
15638
+ 1,
15639
+ f
15640
+ );
15641
+ }
15642
+ f = message.getNativeTokenSymbol();
15643
+ if (f.length > 0) {
15644
+ writer.writeString(
15645
+ 2,
15646
+ f
15647
+ );
15648
+ }
15649
+ f = message.getUsdAmount();
15650
+ if (f.length > 0) {
15651
+ writer.writeString(
15652
+ 3,
15653
+ f
15654
+ );
15655
+ }
15656
+ f = message.getApTokenAmount();
15657
+ if (f.length > 0) {
15658
+ writer.writeString(
15659
+ 4,
15660
+ f
15661
+ );
15662
+ }
15663
+ };
15664
+ proto.aggregator.FeeAmount.prototype.getNativeTokenAmount = function() {
15665
+ return (
15666
+ /** @type {string} */
15667
+ jspb.Message.getFieldWithDefault(this, 1, "")
15668
+ );
15669
+ };
15670
+ proto.aggregator.FeeAmount.prototype.setNativeTokenAmount = function(value) {
15671
+ return jspb.Message.setProto3StringField(this, 1, value);
15672
+ };
15673
+ proto.aggregator.FeeAmount.prototype.getNativeTokenSymbol = function() {
15674
+ return (
15675
+ /** @type {string} */
15676
+ jspb.Message.getFieldWithDefault(this, 2, "")
15677
+ );
15678
+ };
15679
+ proto.aggregator.FeeAmount.prototype.setNativeTokenSymbol = function(value) {
15680
+ return jspb.Message.setProto3StringField(this, 2, value);
15681
+ };
15682
+ proto.aggregator.FeeAmount.prototype.getUsdAmount = function() {
15683
+ return (
15684
+ /** @type {string} */
15685
+ jspb.Message.getFieldWithDefault(this, 3, "")
15686
+ );
15687
+ };
15688
+ proto.aggregator.FeeAmount.prototype.setUsdAmount = function(value) {
15689
+ return jspb.Message.setProto3StringField(this, 3, value);
15690
+ };
15691
+ proto.aggregator.FeeAmount.prototype.getApTokenAmount = function() {
15692
+ return (
15693
+ /** @type {string} */
15694
+ jspb.Message.getFieldWithDefault(this, 4, "")
15695
+ );
15696
+ };
15697
+ proto.aggregator.FeeAmount.prototype.setApTokenAmount = function(value) {
15698
+ return jspb.Message.setProto3StringField(this, 4, value);
15699
+ };
15700
+ proto.aggregator.GasFeeBreakdown.repeatedFields_ = [2];
15701
+ if (jspb.Message.GENERATE_TO_OBJECT) {
15702
+ proto.aggregator.GasFeeBreakdown.prototype.toObject = function(opt_includeInstance) {
15703
+ return proto.aggregator.GasFeeBreakdown.toObject(opt_includeInstance, this);
15704
+ };
15705
+ proto.aggregator.GasFeeBreakdown.toObject = function(includeInstance, msg) {
15706
+ var f, obj = {
15707
+ totalGasFees: (f = msg.getTotalGasFees()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
15708
+ operationsList: jspb.Message.toObjectList(
15709
+ msg.getOperationsList(),
15710
+ proto.aggregator.GasOperationFee.toObject,
15711
+ includeInstance
15712
+ ),
15713
+ gasPriceGwei: jspb.Message.getFieldWithDefault(msg, 3, ""),
15714
+ totalGasUnits: jspb.Message.getFieldWithDefault(msg, 4, ""),
15715
+ estimationAccurate: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
15716
+ estimationMethod: jspb.Message.getFieldWithDefault(msg, 6, "")
15717
+ };
15718
+ if (includeInstance) {
15719
+ obj.$jspbMessageInstance = msg;
15720
+ }
15721
+ return obj;
15722
+ };
15723
+ }
15724
+ proto.aggregator.GasFeeBreakdown.deserializeBinary = function(bytes) {
15725
+ var reader = new jspb.BinaryReader(bytes);
15726
+ var msg = new proto.aggregator.GasFeeBreakdown();
15727
+ return proto.aggregator.GasFeeBreakdown.deserializeBinaryFromReader(msg, reader);
15728
+ };
15729
+ proto.aggregator.GasFeeBreakdown.deserializeBinaryFromReader = function(msg, reader) {
15730
+ while (reader.nextField()) {
15731
+ if (reader.isEndGroup()) {
15732
+ break;
15733
+ }
15734
+ var field = reader.getFieldNumber();
15735
+ switch (field) {
15736
+ case 1:
15737
+ var value = new proto.aggregator.FeeAmount();
15738
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
15739
+ msg.setTotalGasFees(value);
15740
+ break;
15741
+ case 2:
15742
+ var value = new proto.aggregator.GasOperationFee();
15743
+ reader.readMessage(value, proto.aggregator.GasOperationFee.deserializeBinaryFromReader);
15744
+ msg.addOperations(value);
15745
+ break;
15746
+ case 3:
15747
+ var value = (
15748
+ /** @type {string} */
15749
+ reader.readString()
15750
+ );
15751
+ msg.setGasPriceGwei(value);
15752
+ break;
15753
+ case 4:
15754
+ var value = (
15755
+ /** @type {string} */
15756
+ reader.readString()
15757
+ );
15758
+ msg.setTotalGasUnits(value);
15759
+ break;
15760
+ case 5:
15761
+ var value = (
15762
+ /** @type {boolean} */
15763
+ reader.readBool()
15764
+ );
15765
+ msg.setEstimationAccurate(value);
15766
+ break;
15767
+ case 6:
15768
+ var value = (
15769
+ /** @type {string} */
15770
+ reader.readString()
15771
+ );
15772
+ msg.setEstimationMethod(value);
15773
+ break;
15774
+ default:
15775
+ reader.skipField();
15776
+ break;
15777
+ }
15778
+ }
15779
+ return msg;
15780
+ };
15781
+ proto.aggregator.GasFeeBreakdown.prototype.serializeBinary = function() {
15782
+ var writer = new jspb.BinaryWriter();
15783
+ proto.aggregator.GasFeeBreakdown.serializeBinaryToWriter(this, writer);
15784
+ return writer.getResultBuffer();
15785
+ };
15786
+ proto.aggregator.GasFeeBreakdown.serializeBinaryToWriter = function(message, writer) {
15787
+ var f = void 0;
15788
+ f = message.getTotalGasFees();
15789
+ if (f != null) {
15790
+ writer.writeMessage(
15791
+ 1,
15792
+ f,
15793
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
15794
+ );
15795
+ }
15796
+ f = message.getOperationsList();
15797
+ if (f.length > 0) {
15798
+ writer.writeRepeatedMessage(
15799
+ 2,
15800
+ f,
15801
+ proto.aggregator.GasOperationFee.serializeBinaryToWriter
15802
+ );
15803
+ }
15804
+ f = message.getGasPriceGwei();
15805
+ if (f.length > 0) {
15806
+ writer.writeString(
15807
+ 3,
15808
+ f
15809
+ );
15810
+ }
15811
+ f = message.getTotalGasUnits();
15812
+ if (f.length > 0) {
15813
+ writer.writeString(
15814
+ 4,
15815
+ f
15816
+ );
15817
+ }
15818
+ f = message.getEstimationAccurate();
15819
+ if (f) {
15820
+ writer.writeBool(
15821
+ 5,
15822
+ f
15823
+ );
15824
+ }
15825
+ f = message.getEstimationMethod();
15826
+ if (f.length > 0) {
15827
+ writer.writeString(
15828
+ 6,
15829
+ f
15830
+ );
15831
+ }
15832
+ };
15833
+ proto.aggregator.GasFeeBreakdown.prototype.getTotalGasFees = function() {
15834
+ return (
15835
+ /** @type{?proto.aggregator.FeeAmount} */
15836
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 1)
15837
+ );
15838
+ };
15839
+ proto.aggregator.GasFeeBreakdown.prototype.setTotalGasFees = function(value) {
15840
+ return jspb.Message.setWrapperField(this, 1, value);
15841
+ };
15842
+ proto.aggregator.GasFeeBreakdown.prototype.clearTotalGasFees = function() {
15843
+ return this.setTotalGasFees(void 0);
15844
+ };
15845
+ proto.aggregator.GasFeeBreakdown.prototype.hasTotalGasFees = function() {
15846
+ return jspb.Message.getField(this, 1) != null;
15847
+ };
15848
+ proto.aggregator.GasFeeBreakdown.prototype.getOperationsList = function() {
15849
+ return (
15850
+ /** @type{!Array<!proto.aggregator.GasOperationFee>} */
15851
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.GasOperationFee, 2)
15852
+ );
15853
+ };
15854
+ proto.aggregator.GasFeeBreakdown.prototype.setOperationsList = function(value) {
15855
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
15856
+ };
15857
+ proto.aggregator.GasFeeBreakdown.prototype.addOperations = function(opt_value, opt_index) {
15858
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.GasOperationFee, opt_index);
15859
+ };
15860
+ proto.aggregator.GasFeeBreakdown.prototype.clearOperationsList = function() {
15861
+ return this.setOperationsList([]);
15862
+ };
15863
+ proto.aggregator.GasFeeBreakdown.prototype.getGasPriceGwei = function() {
15864
+ return (
15865
+ /** @type {string} */
15866
+ jspb.Message.getFieldWithDefault(this, 3, "")
15867
+ );
15868
+ };
15869
+ proto.aggregator.GasFeeBreakdown.prototype.setGasPriceGwei = function(value) {
15870
+ return jspb.Message.setProto3StringField(this, 3, value);
15871
+ };
15872
+ proto.aggregator.GasFeeBreakdown.prototype.getTotalGasUnits = function() {
15873
+ return (
15874
+ /** @type {string} */
15875
+ jspb.Message.getFieldWithDefault(this, 4, "")
15876
+ );
15877
+ };
15878
+ proto.aggregator.GasFeeBreakdown.prototype.setTotalGasUnits = function(value) {
15879
+ return jspb.Message.setProto3StringField(this, 4, value);
15880
+ };
15881
+ proto.aggregator.GasFeeBreakdown.prototype.getEstimationAccurate = function() {
15882
+ return (
15883
+ /** @type {boolean} */
15884
+ jspb.Message.getBooleanFieldWithDefault(this, 5, false)
15885
+ );
15886
+ };
15887
+ proto.aggregator.GasFeeBreakdown.prototype.setEstimationAccurate = function(value) {
15888
+ return jspb.Message.setProto3BooleanField(this, 5, value);
15889
+ };
15890
+ proto.aggregator.GasFeeBreakdown.prototype.getEstimationMethod = function() {
15891
+ return (
15892
+ /** @type {string} */
15893
+ jspb.Message.getFieldWithDefault(this, 6, "")
15894
+ );
15895
+ };
15896
+ proto.aggregator.GasFeeBreakdown.prototype.setEstimationMethod = function(value) {
15897
+ return jspb.Message.setProto3StringField(this, 6, value);
15898
+ };
15899
+ if (jspb.Message.GENERATE_TO_OBJECT) {
15900
+ proto.aggregator.GasOperationFee.prototype.toObject = function(opt_includeInstance) {
15901
+ return proto.aggregator.GasOperationFee.toObject(opt_includeInstance, this);
15902
+ };
15903
+ proto.aggregator.GasOperationFee.toObject = function(includeInstance, msg) {
15904
+ var f, obj = {
15905
+ operationType: jspb.Message.getFieldWithDefault(msg, 1, ""),
15906
+ nodeId: jspb.Message.getFieldWithDefault(msg, 2, ""),
15907
+ methodName: jspb.Message.getFieldWithDefault(msg, 3, ""),
15908
+ fee: (f = msg.getFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
15909
+ gasUnits: jspb.Message.getFieldWithDefault(msg, 5, "")
15910
+ };
15911
+ if (includeInstance) {
15912
+ obj.$jspbMessageInstance = msg;
15913
+ }
15914
+ return obj;
15915
+ };
15916
+ }
15917
+ proto.aggregator.GasOperationFee.deserializeBinary = function(bytes) {
15918
+ var reader = new jspb.BinaryReader(bytes);
15919
+ var msg = new proto.aggregator.GasOperationFee();
15920
+ return proto.aggregator.GasOperationFee.deserializeBinaryFromReader(msg, reader);
15921
+ };
15922
+ proto.aggregator.GasOperationFee.deserializeBinaryFromReader = function(msg, reader) {
15923
+ while (reader.nextField()) {
15924
+ if (reader.isEndGroup()) {
15925
+ break;
15926
+ }
15927
+ var field = reader.getFieldNumber();
15928
+ switch (field) {
15929
+ case 1:
15930
+ var value = (
15931
+ /** @type {string} */
15932
+ reader.readString()
15933
+ );
15934
+ msg.setOperationType(value);
15935
+ break;
15936
+ case 2:
15937
+ var value = (
15938
+ /** @type {string} */
15939
+ reader.readString()
15940
+ );
15941
+ msg.setNodeId(value);
15942
+ break;
15943
+ case 3:
15944
+ var value = (
15945
+ /** @type {string} */
15946
+ reader.readString()
15947
+ );
15948
+ msg.setMethodName(value);
15949
+ break;
15950
+ case 4:
15951
+ var value = new proto.aggregator.FeeAmount();
15952
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
15953
+ msg.setFee(value);
15954
+ break;
15955
+ case 5:
15956
+ var value = (
15957
+ /** @type {string} */
15958
+ reader.readString()
15959
+ );
15960
+ msg.setGasUnits(value);
15961
+ break;
15962
+ default:
15963
+ reader.skipField();
15964
+ break;
15965
+ }
15966
+ }
15967
+ return msg;
15968
+ };
15969
+ proto.aggregator.GasOperationFee.prototype.serializeBinary = function() {
15970
+ var writer = new jspb.BinaryWriter();
15971
+ proto.aggregator.GasOperationFee.serializeBinaryToWriter(this, writer);
15972
+ return writer.getResultBuffer();
15973
+ };
15974
+ proto.aggregator.GasOperationFee.serializeBinaryToWriter = function(message, writer) {
15975
+ var f = void 0;
15976
+ f = message.getOperationType();
15977
+ if (f.length > 0) {
15978
+ writer.writeString(
15979
+ 1,
15980
+ f
15981
+ );
15982
+ }
15983
+ f = message.getNodeId();
15984
+ if (f.length > 0) {
15985
+ writer.writeString(
15986
+ 2,
15987
+ f
15988
+ );
15989
+ }
15990
+ f = message.getMethodName();
15991
+ if (f.length > 0) {
15992
+ writer.writeString(
15993
+ 3,
15994
+ f
15995
+ );
15996
+ }
15997
+ f = message.getFee();
15998
+ if (f != null) {
15999
+ writer.writeMessage(
16000
+ 4,
16001
+ f,
16002
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16003
+ );
16004
+ }
16005
+ f = message.getGasUnits();
16006
+ if (f.length > 0) {
16007
+ writer.writeString(
16008
+ 5,
16009
+ f
16010
+ );
16011
+ }
16012
+ };
16013
+ proto.aggregator.GasOperationFee.prototype.getOperationType = function() {
16014
+ return (
16015
+ /** @type {string} */
16016
+ jspb.Message.getFieldWithDefault(this, 1, "")
16017
+ );
16018
+ };
16019
+ proto.aggregator.GasOperationFee.prototype.setOperationType = function(value) {
16020
+ return jspb.Message.setProto3StringField(this, 1, value);
16021
+ };
16022
+ proto.aggregator.GasOperationFee.prototype.getNodeId = function() {
16023
+ return (
16024
+ /** @type {string} */
16025
+ jspb.Message.getFieldWithDefault(this, 2, "")
16026
+ );
16027
+ };
16028
+ proto.aggregator.GasOperationFee.prototype.setNodeId = function(value) {
16029
+ return jspb.Message.setProto3StringField(this, 2, value);
16030
+ };
16031
+ proto.aggregator.GasOperationFee.prototype.getMethodName = function() {
16032
+ return (
16033
+ /** @type {string} */
16034
+ jspb.Message.getFieldWithDefault(this, 3, "")
16035
+ );
16036
+ };
16037
+ proto.aggregator.GasOperationFee.prototype.setMethodName = function(value) {
16038
+ return jspb.Message.setProto3StringField(this, 3, value);
16039
+ };
16040
+ proto.aggregator.GasOperationFee.prototype.getFee = function() {
16041
+ return (
16042
+ /** @type{?proto.aggregator.FeeAmount} */
16043
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 4)
16044
+ );
16045
+ };
16046
+ proto.aggregator.GasOperationFee.prototype.setFee = function(value) {
16047
+ return jspb.Message.setWrapperField(this, 4, value);
16048
+ };
16049
+ proto.aggregator.GasOperationFee.prototype.clearFee = function() {
16050
+ return this.setFee(void 0);
16051
+ };
16052
+ proto.aggregator.GasOperationFee.prototype.hasFee = function() {
16053
+ return jspb.Message.getField(this, 4) != null;
16054
+ };
16055
+ proto.aggregator.GasOperationFee.prototype.getGasUnits = function() {
16056
+ return (
16057
+ /** @type {string} */
16058
+ jspb.Message.getFieldWithDefault(this, 5, "")
16059
+ );
16060
+ };
16061
+ proto.aggregator.GasOperationFee.prototype.setGasUnits = function(value) {
16062
+ return jspb.Message.setProto3StringField(this, 5, value);
16063
+ };
16064
+ if (jspb.Message.GENERATE_TO_OBJECT) {
16065
+ proto.aggregator.SmartWalletCreationFee.prototype.toObject = function(opt_includeInstance) {
16066
+ return proto.aggregator.SmartWalletCreationFee.toObject(opt_includeInstance, this);
16067
+ };
16068
+ proto.aggregator.SmartWalletCreationFee.toObject = function(includeInstance, msg) {
16069
+ var f, obj = {
16070
+ creationRequired: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
16071
+ creationFee: (f = msg.getCreationFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16072
+ initialFunding: (f = msg.getInitialFunding()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16073
+ walletAddress: jspb.Message.getFieldWithDefault(msg, 4, "")
16074
+ };
16075
+ if (includeInstance) {
16076
+ obj.$jspbMessageInstance = msg;
16077
+ }
16078
+ return obj;
16079
+ };
16080
+ }
16081
+ proto.aggregator.SmartWalletCreationFee.deserializeBinary = function(bytes) {
16082
+ var reader = new jspb.BinaryReader(bytes);
16083
+ var msg = new proto.aggregator.SmartWalletCreationFee();
16084
+ return proto.aggregator.SmartWalletCreationFee.deserializeBinaryFromReader(msg, reader);
16085
+ };
16086
+ proto.aggregator.SmartWalletCreationFee.deserializeBinaryFromReader = function(msg, reader) {
16087
+ while (reader.nextField()) {
16088
+ if (reader.isEndGroup()) {
16089
+ break;
16090
+ }
16091
+ var field = reader.getFieldNumber();
16092
+ switch (field) {
16093
+ case 1:
16094
+ var value = (
16095
+ /** @type {boolean} */
16096
+ reader.readBool()
16097
+ );
16098
+ msg.setCreationRequired(value);
16099
+ break;
16100
+ case 2:
16101
+ var value = new proto.aggregator.FeeAmount();
16102
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16103
+ msg.setCreationFee(value);
16104
+ break;
16105
+ case 3:
16106
+ var value = new proto.aggregator.FeeAmount();
16107
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16108
+ msg.setInitialFunding(value);
16109
+ break;
16110
+ case 4:
16111
+ var value = (
16112
+ /** @type {string} */
16113
+ reader.readString()
16114
+ );
16115
+ msg.setWalletAddress(value);
16116
+ break;
16117
+ default:
16118
+ reader.skipField();
16119
+ break;
16120
+ }
16121
+ }
16122
+ return msg;
16123
+ };
16124
+ proto.aggregator.SmartWalletCreationFee.prototype.serializeBinary = function() {
16125
+ var writer = new jspb.BinaryWriter();
16126
+ proto.aggregator.SmartWalletCreationFee.serializeBinaryToWriter(this, writer);
16127
+ return writer.getResultBuffer();
16128
+ };
16129
+ proto.aggregator.SmartWalletCreationFee.serializeBinaryToWriter = function(message, writer) {
16130
+ var f = void 0;
16131
+ f = message.getCreationRequired();
16132
+ if (f) {
16133
+ writer.writeBool(
16134
+ 1,
16135
+ f
16136
+ );
16137
+ }
16138
+ f = message.getCreationFee();
16139
+ if (f != null) {
16140
+ writer.writeMessage(
16141
+ 2,
16142
+ f,
16143
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16144
+ );
16145
+ }
16146
+ f = message.getInitialFunding();
16147
+ if (f != null) {
16148
+ writer.writeMessage(
16149
+ 3,
16150
+ f,
16151
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16152
+ );
16153
+ }
16154
+ f = message.getWalletAddress();
16155
+ if (f.length > 0) {
16156
+ writer.writeString(
16157
+ 4,
16158
+ f
16159
+ );
16160
+ }
16161
+ };
16162
+ proto.aggregator.SmartWalletCreationFee.prototype.getCreationRequired = function() {
16163
+ return (
16164
+ /** @type {boolean} */
16165
+ jspb.Message.getBooleanFieldWithDefault(this, 1, false)
16166
+ );
16167
+ };
16168
+ proto.aggregator.SmartWalletCreationFee.prototype.setCreationRequired = function(value) {
16169
+ return jspb.Message.setProto3BooleanField(this, 1, value);
16170
+ };
16171
+ proto.aggregator.SmartWalletCreationFee.prototype.getCreationFee = function() {
16172
+ return (
16173
+ /** @type{?proto.aggregator.FeeAmount} */
16174
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 2)
16175
+ );
16176
+ };
16177
+ proto.aggregator.SmartWalletCreationFee.prototype.setCreationFee = function(value) {
16178
+ return jspb.Message.setWrapperField(this, 2, value);
16179
+ };
16180
+ proto.aggregator.SmartWalletCreationFee.prototype.clearCreationFee = function() {
16181
+ return this.setCreationFee(void 0);
16182
+ };
16183
+ proto.aggregator.SmartWalletCreationFee.prototype.hasCreationFee = function() {
16184
+ return jspb.Message.getField(this, 2) != null;
16185
+ };
16186
+ proto.aggregator.SmartWalletCreationFee.prototype.getInitialFunding = function() {
16187
+ return (
16188
+ /** @type{?proto.aggregator.FeeAmount} */
16189
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 3)
16190
+ );
16191
+ };
16192
+ proto.aggregator.SmartWalletCreationFee.prototype.setInitialFunding = function(value) {
16193
+ return jspb.Message.setWrapperField(this, 3, value);
16194
+ };
16195
+ proto.aggregator.SmartWalletCreationFee.prototype.clearInitialFunding = function() {
16196
+ return this.setInitialFunding(void 0);
16197
+ };
16198
+ proto.aggregator.SmartWalletCreationFee.prototype.hasInitialFunding = function() {
16199
+ return jspb.Message.getField(this, 3) != null;
16200
+ };
16201
+ proto.aggregator.SmartWalletCreationFee.prototype.getWalletAddress = function() {
16202
+ return (
16203
+ /** @type {string} */
16204
+ jspb.Message.getFieldWithDefault(this, 4, "")
16205
+ );
16206
+ };
16207
+ proto.aggregator.SmartWalletCreationFee.prototype.setWalletAddress = function(value) {
16208
+ return jspb.Message.setProto3StringField(this, 4, value);
16209
+ };
16210
+ if (jspb.Message.GENERATE_TO_OBJECT) {
16211
+ proto.aggregator.AutomationFee.prototype.toObject = function(opt_includeInstance) {
16212
+ return proto.aggregator.AutomationFee.toObject(opt_includeInstance, this);
16213
+ };
16214
+ proto.aggregator.AutomationFee.toObject = function(includeInstance, msg) {
16215
+ var f, obj = {
16216
+ baseFee: (f = msg.getBaseFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16217
+ monitoringFee: (f = msg.getMonitoringFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16218
+ executionFee: (f = msg.getExecutionFee()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16219
+ triggerType: jspb.Message.getFieldWithDefault(msg, 4, ""),
16220
+ estimatedExecutions: jspb.Message.getFieldWithDefault(msg, 5, 0),
16221
+ durationMinutes: jspb.Message.getFieldWithDefault(msg, 6, 0),
16222
+ feeCalculationMethod: jspb.Message.getFieldWithDefault(msg, 7, "")
16223
+ };
16224
+ if (includeInstance) {
16225
+ obj.$jspbMessageInstance = msg;
16226
+ }
16227
+ return obj;
16228
+ };
16229
+ }
16230
+ proto.aggregator.AutomationFee.deserializeBinary = function(bytes) {
16231
+ var reader = new jspb.BinaryReader(bytes);
16232
+ var msg = new proto.aggregator.AutomationFee();
16233
+ return proto.aggregator.AutomationFee.deserializeBinaryFromReader(msg, reader);
16234
+ };
16235
+ proto.aggregator.AutomationFee.deserializeBinaryFromReader = function(msg, reader) {
16236
+ while (reader.nextField()) {
16237
+ if (reader.isEndGroup()) {
16238
+ break;
16239
+ }
16240
+ var field = reader.getFieldNumber();
16241
+ switch (field) {
16242
+ case 1:
16243
+ var value = new proto.aggregator.FeeAmount();
16244
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16245
+ msg.setBaseFee(value);
16246
+ break;
16247
+ case 2:
16248
+ var value = new proto.aggregator.FeeAmount();
16249
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16250
+ msg.setMonitoringFee(value);
16251
+ break;
16252
+ case 3:
16253
+ var value = new proto.aggregator.FeeAmount();
16254
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16255
+ msg.setExecutionFee(value);
16256
+ break;
16257
+ case 4:
16258
+ var value = (
16259
+ /** @type {string} */
16260
+ reader.readString()
16261
+ );
16262
+ msg.setTriggerType(value);
16263
+ break;
16264
+ case 5:
16265
+ var value = (
16266
+ /** @type {number} */
16267
+ reader.readInt64()
16268
+ );
16269
+ msg.setEstimatedExecutions(value);
16270
+ break;
16271
+ case 6:
16272
+ var value = (
16273
+ /** @type {number} */
16274
+ reader.readInt64()
16275
+ );
16276
+ msg.setDurationMinutes(value);
16277
+ break;
16278
+ case 7:
16279
+ var value = (
16280
+ /** @type {string} */
16281
+ reader.readString()
16282
+ );
16283
+ msg.setFeeCalculationMethod(value);
16284
+ break;
16285
+ default:
16286
+ reader.skipField();
16287
+ break;
16288
+ }
16289
+ }
16290
+ return msg;
16291
+ };
16292
+ proto.aggregator.AutomationFee.prototype.serializeBinary = function() {
16293
+ var writer = new jspb.BinaryWriter();
16294
+ proto.aggregator.AutomationFee.serializeBinaryToWriter(this, writer);
16295
+ return writer.getResultBuffer();
16296
+ };
16297
+ proto.aggregator.AutomationFee.serializeBinaryToWriter = function(message, writer) {
16298
+ var f = void 0;
16299
+ f = message.getBaseFee();
16300
+ if (f != null) {
16301
+ writer.writeMessage(
16302
+ 1,
16303
+ f,
16304
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16305
+ );
16306
+ }
16307
+ f = message.getMonitoringFee();
16308
+ if (f != null) {
16309
+ writer.writeMessage(
16310
+ 2,
16311
+ f,
16312
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16313
+ );
16314
+ }
16315
+ f = message.getExecutionFee();
16316
+ if (f != null) {
16317
+ writer.writeMessage(
16318
+ 3,
16319
+ f,
16320
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16321
+ );
16322
+ }
16323
+ f = message.getTriggerType();
16324
+ if (f.length > 0) {
16325
+ writer.writeString(
16326
+ 4,
16327
+ f
16328
+ );
16329
+ }
16330
+ f = message.getEstimatedExecutions();
16331
+ if (f !== 0) {
16332
+ writer.writeInt64(
16333
+ 5,
16334
+ f
16335
+ );
16336
+ }
16337
+ f = message.getDurationMinutes();
16338
+ if (f !== 0) {
16339
+ writer.writeInt64(
16340
+ 6,
16341
+ f
16342
+ );
16343
+ }
16344
+ f = message.getFeeCalculationMethod();
16345
+ if (f.length > 0) {
16346
+ writer.writeString(
16347
+ 7,
16348
+ f
16349
+ );
16350
+ }
16351
+ };
16352
+ proto.aggregator.AutomationFee.prototype.getBaseFee = function() {
16353
+ return (
16354
+ /** @type{?proto.aggregator.FeeAmount} */
16355
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 1)
16356
+ );
16357
+ };
16358
+ proto.aggregator.AutomationFee.prototype.setBaseFee = function(value) {
16359
+ return jspb.Message.setWrapperField(this, 1, value);
16360
+ };
16361
+ proto.aggregator.AutomationFee.prototype.clearBaseFee = function() {
16362
+ return this.setBaseFee(void 0);
16363
+ };
16364
+ proto.aggregator.AutomationFee.prototype.hasBaseFee = function() {
16365
+ return jspb.Message.getField(this, 1) != null;
16366
+ };
16367
+ proto.aggregator.AutomationFee.prototype.getMonitoringFee = function() {
16368
+ return (
16369
+ /** @type{?proto.aggregator.FeeAmount} */
16370
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 2)
16371
+ );
16372
+ };
16373
+ proto.aggregator.AutomationFee.prototype.setMonitoringFee = function(value) {
16374
+ return jspb.Message.setWrapperField(this, 2, value);
16375
+ };
16376
+ proto.aggregator.AutomationFee.prototype.clearMonitoringFee = function() {
16377
+ return this.setMonitoringFee(void 0);
16378
+ };
16379
+ proto.aggregator.AutomationFee.prototype.hasMonitoringFee = function() {
16380
+ return jspb.Message.getField(this, 2) != null;
16381
+ };
16382
+ proto.aggregator.AutomationFee.prototype.getExecutionFee = function() {
16383
+ return (
16384
+ /** @type{?proto.aggregator.FeeAmount} */
16385
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 3)
16386
+ );
16387
+ };
16388
+ proto.aggregator.AutomationFee.prototype.setExecutionFee = function(value) {
16389
+ return jspb.Message.setWrapperField(this, 3, value);
16390
+ };
16391
+ proto.aggregator.AutomationFee.prototype.clearExecutionFee = function() {
16392
+ return this.setExecutionFee(void 0);
16393
+ };
16394
+ proto.aggregator.AutomationFee.prototype.hasExecutionFee = function() {
16395
+ return jspb.Message.getField(this, 3) != null;
16396
+ };
16397
+ proto.aggregator.AutomationFee.prototype.getTriggerType = function() {
16398
+ return (
16399
+ /** @type {string} */
16400
+ jspb.Message.getFieldWithDefault(this, 4, "")
16401
+ );
16402
+ };
16403
+ proto.aggregator.AutomationFee.prototype.setTriggerType = function(value) {
16404
+ return jspb.Message.setProto3StringField(this, 4, value);
16405
+ };
16406
+ proto.aggregator.AutomationFee.prototype.getEstimatedExecutions = function() {
16407
+ return (
16408
+ /** @type {number} */
16409
+ jspb.Message.getFieldWithDefault(this, 5, 0)
16410
+ );
16411
+ };
16412
+ proto.aggregator.AutomationFee.prototype.setEstimatedExecutions = function(value) {
16413
+ return jspb.Message.setProto3IntField(this, 5, value);
16414
+ };
16415
+ proto.aggregator.AutomationFee.prototype.getDurationMinutes = function() {
16416
+ return (
16417
+ /** @type {number} */
16418
+ jspb.Message.getFieldWithDefault(this, 6, 0)
16419
+ );
16420
+ };
16421
+ proto.aggregator.AutomationFee.prototype.setDurationMinutes = function(value) {
16422
+ return jspb.Message.setProto3IntField(this, 6, value);
16423
+ };
16424
+ proto.aggregator.AutomationFee.prototype.getFeeCalculationMethod = function() {
16425
+ return (
16426
+ /** @type {string} */
16427
+ jspb.Message.getFieldWithDefault(this, 7, "")
16428
+ );
16429
+ };
16430
+ proto.aggregator.AutomationFee.prototype.setFeeCalculationMethod = function(value) {
16431
+ return jspb.Message.setProto3StringField(this, 7, value);
16432
+ };
16433
+ if (jspb.Message.GENERATE_TO_OBJECT) {
16434
+ proto.aggregator.FeeDiscount.prototype.toObject = function(opt_includeInstance) {
16435
+ return proto.aggregator.FeeDiscount.toObject(opt_includeInstance, this);
16436
+ };
16437
+ proto.aggregator.FeeDiscount.toObject = function(includeInstance, msg) {
16438
+ var f, obj = {
16439
+ discountType: jspb.Message.getFieldWithDefault(msg, 1, ""),
16440
+ discountName: jspb.Message.getFieldWithDefault(msg, 2, ""),
16441
+ appliesTo: jspb.Message.getFieldWithDefault(msg, 3, ""),
16442
+ discountPercentage: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0),
16443
+ discountAmount: (f = msg.getDiscountAmount()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16444
+ expiryDate: jspb.Message.getFieldWithDefault(msg, 6, ""),
16445
+ terms: jspb.Message.getFieldWithDefault(msg, 7, "")
16446
+ };
16447
+ if (includeInstance) {
16448
+ obj.$jspbMessageInstance = msg;
16449
+ }
16450
+ return obj;
16451
+ };
16452
+ }
16453
+ proto.aggregator.FeeDiscount.deserializeBinary = function(bytes) {
16454
+ var reader = new jspb.BinaryReader(bytes);
16455
+ var msg = new proto.aggregator.FeeDiscount();
16456
+ return proto.aggregator.FeeDiscount.deserializeBinaryFromReader(msg, reader);
16457
+ };
16458
+ proto.aggregator.FeeDiscount.deserializeBinaryFromReader = function(msg, reader) {
16459
+ while (reader.nextField()) {
16460
+ if (reader.isEndGroup()) {
16461
+ break;
16462
+ }
16463
+ var field = reader.getFieldNumber();
16464
+ switch (field) {
16465
+ case 1:
16466
+ var value = (
16467
+ /** @type {string} */
16468
+ reader.readString()
16469
+ );
16470
+ msg.setDiscountType(value);
16471
+ break;
16472
+ case 2:
16473
+ var value = (
16474
+ /** @type {string} */
16475
+ reader.readString()
16476
+ );
16477
+ msg.setDiscountName(value);
16478
+ break;
16479
+ case 3:
16480
+ var value = (
16481
+ /** @type {string} */
16482
+ reader.readString()
16483
+ );
16484
+ msg.setAppliesTo(value);
16485
+ break;
16486
+ case 4:
16487
+ var value = (
16488
+ /** @type {number} */
16489
+ reader.readFloat()
16490
+ );
16491
+ msg.setDiscountPercentage(value);
16492
+ break;
16493
+ case 5:
16494
+ var value = new proto.aggregator.FeeAmount();
16495
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16496
+ msg.setDiscountAmount(value);
16497
+ break;
16498
+ case 6:
16499
+ var value = (
16500
+ /** @type {string} */
16501
+ reader.readString()
16502
+ );
16503
+ msg.setExpiryDate(value);
16504
+ break;
16505
+ case 7:
16506
+ var value = (
16507
+ /** @type {string} */
16508
+ reader.readString()
16509
+ );
16510
+ msg.setTerms(value);
16511
+ break;
16512
+ default:
16513
+ reader.skipField();
16514
+ break;
16515
+ }
16516
+ }
16517
+ return msg;
16518
+ };
16519
+ proto.aggregator.FeeDiscount.prototype.serializeBinary = function() {
16520
+ var writer = new jspb.BinaryWriter();
16521
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter(this, writer);
16522
+ return writer.getResultBuffer();
16523
+ };
16524
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter = function(message, writer) {
16525
+ var f = void 0;
16526
+ f = message.getDiscountType();
16527
+ if (f.length > 0) {
16528
+ writer.writeString(
16529
+ 1,
16530
+ f
16531
+ );
16532
+ }
16533
+ f = message.getDiscountName();
16534
+ if (f.length > 0) {
16535
+ writer.writeString(
16536
+ 2,
16537
+ f
16538
+ );
16539
+ }
16540
+ f = message.getAppliesTo();
16541
+ if (f.length > 0) {
16542
+ writer.writeString(
16543
+ 3,
16544
+ f
16545
+ );
16546
+ }
16547
+ f = message.getDiscountPercentage();
16548
+ if (f !== 0) {
16549
+ writer.writeFloat(
16550
+ 4,
16551
+ f
16552
+ );
16553
+ }
16554
+ f = message.getDiscountAmount();
16555
+ if (f != null) {
16556
+ writer.writeMessage(
16557
+ 5,
16558
+ f,
16559
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16560
+ );
16561
+ }
16562
+ f = message.getExpiryDate();
16563
+ if (f.length > 0) {
16564
+ writer.writeString(
16565
+ 6,
16566
+ f
16567
+ );
16568
+ }
16569
+ f = message.getTerms();
16570
+ if (f.length > 0) {
16571
+ writer.writeString(
16572
+ 7,
16573
+ f
16574
+ );
16575
+ }
16576
+ };
16577
+ proto.aggregator.FeeDiscount.prototype.getDiscountType = function() {
16578
+ return (
16579
+ /** @type {string} */
16580
+ jspb.Message.getFieldWithDefault(this, 1, "")
16581
+ );
16582
+ };
16583
+ proto.aggregator.FeeDiscount.prototype.setDiscountType = function(value) {
16584
+ return jspb.Message.setProto3StringField(this, 1, value);
16585
+ };
16586
+ proto.aggregator.FeeDiscount.prototype.getDiscountName = function() {
16587
+ return (
16588
+ /** @type {string} */
16589
+ jspb.Message.getFieldWithDefault(this, 2, "")
16590
+ );
16591
+ };
16592
+ proto.aggregator.FeeDiscount.prototype.setDiscountName = function(value) {
16593
+ return jspb.Message.setProto3StringField(this, 2, value);
16594
+ };
16595
+ proto.aggregator.FeeDiscount.prototype.getAppliesTo = function() {
16596
+ return (
16597
+ /** @type {string} */
16598
+ jspb.Message.getFieldWithDefault(this, 3, "")
16599
+ );
16600
+ };
16601
+ proto.aggregator.FeeDiscount.prototype.setAppliesTo = function(value) {
16602
+ return jspb.Message.setProto3StringField(this, 3, value);
16603
+ };
16604
+ proto.aggregator.FeeDiscount.prototype.getDiscountPercentage = function() {
16605
+ return (
16606
+ /** @type {number} */
16607
+ jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0)
16608
+ );
16609
+ };
16610
+ proto.aggregator.FeeDiscount.prototype.setDiscountPercentage = function(value) {
16611
+ return jspb.Message.setProto3FloatField(this, 4, value);
16612
+ };
16613
+ proto.aggregator.FeeDiscount.prototype.getDiscountAmount = function() {
16614
+ return (
16615
+ /** @type{?proto.aggregator.FeeAmount} */
16616
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 5)
16617
+ );
16618
+ };
16619
+ proto.aggregator.FeeDiscount.prototype.setDiscountAmount = function(value) {
16620
+ return jspb.Message.setWrapperField(this, 5, value);
16621
+ };
16622
+ proto.aggregator.FeeDiscount.prototype.clearDiscountAmount = function() {
16623
+ return this.setDiscountAmount(void 0);
16624
+ };
16625
+ proto.aggregator.FeeDiscount.prototype.hasDiscountAmount = function() {
16626
+ return jspb.Message.getField(this, 5) != null;
16627
+ };
16628
+ proto.aggregator.FeeDiscount.prototype.getExpiryDate = function() {
16629
+ return (
16630
+ /** @type {string} */
16631
+ jspb.Message.getFieldWithDefault(this, 6, "")
16632
+ );
16633
+ };
16634
+ proto.aggregator.FeeDiscount.prototype.setExpiryDate = function(value) {
16635
+ return jspb.Message.setProto3StringField(this, 6, value);
16636
+ };
16637
+ proto.aggregator.FeeDiscount.prototype.getTerms = function() {
16638
+ return (
16639
+ /** @type {string} */
16640
+ jspb.Message.getFieldWithDefault(this, 7, "")
16641
+ );
16642
+ };
16643
+ proto.aggregator.FeeDiscount.prototype.setTerms = function(value) {
16644
+ return jspb.Message.setProto3StringField(this, 7, value);
16645
+ };
16646
+ proto.aggregator.EstimateFeesResp.repeatedFields_ = [8, 15, 16];
16647
+ if (jspb.Message.GENERATE_TO_OBJECT) {
16648
+ proto.aggregator.EstimateFeesResp.prototype.toObject = function(opt_includeInstance) {
16649
+ return proto.aggregator.EstimateFeesResp.toObject(opt_includeInstance, this);
16650
+ };
16651
+ proto.aggregator.EstimateFeesResp.toObject = function(includeInstance, msg) {
16652
+ var f, obj = {
16653
+ success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
16654
+ error: jspb.Message.getFieldWithDefault(msg, 2, ""),
16655
+ errorCode: jspb.Message.getFieldWithDefault(msg, 3, 0),
16656
+ gasFees: (f = msg.getGasFees()) && proto.aggregator.GasFeeBreakdown.toObject(includeInstance, f),
16657
+ automationFees: (f = msg.getAutomationFees()) && proto.aggregator.AutomationFee.toObject(includeInstance, f),
16658
+ creationFees: (f = msg.getCreationFees()) && proto.aggregator.SmartWalletCreationFee.toObject(includeInstance, f),
16659
+ totalFees: (f = msg.getTotalFees()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16660
+ discountsList: jspb.Message.toObjectList(
16661
+ msg.getDiscountsList(),
16662
+ proto.aggregator.FeeDiscount.toObject,
16663
+ includeInstance
16664
+ ),
16665
+ totalDiscounts: (f = msg.getTotalDiscounts()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16666
+ finalTotal: (f = msg.getFinalTotal()) && proto.aggregator.FeeAmount.toObject(includeInstance, f),
16667
+ estimatedAt: jspb.Message.getFieldWithDefault(msg, 11, 0),
16668
+ chainId: jspb.Message.getFieldWithDefault(msg, 12, ""),
16669
+ priceDataSource: jspb.Message.getFieldWithDefault(msg, 13, ""),
16670
+ priceDataAgeSeconds: jspb.Message.getFieldWithDefault(msg, 14, 0),
16671
+ warningsList: (f = jspb.Message.getRepeatedField(msg, 15)) == null ? void 0 : f,
16672
+ recommendationsList: (f = jspb.Message.getRepeatedField(msg, 16)) == null ? void 0 : f
16673
+ };
16674
+ if (includeInstance) {
16675
+ obj.$jspbMessageInstance = msg;
16676
+ }
16677
+ return obj;
16678
+ };
16679
+ }
16680
+ proto.aggregator.EstimateFeesResp.deserializeBinary = function(bytes) {
16681
+ var reader = new jspb.BinaryReader(bytes);
16682
+ var msg = new proto.aggregator.EstimateFeesResp();
16683
+ return proto.aggregator.EstimateFeesResp.deserializeBinaryFromReader(msg, reader);
16684
+ };
16685
+ proto.aggregator.EstimateFeesResp.deserializeBinaryFromReader = function(msg, reader) {
16686
+ while (reader.nextField()) {
16687
+ if (reader.isEndGroup()) {
16688
+ break;
16689
+ }
16690
+ var field = reader.getFieldNumber();
16691
+ switch (field) {
16692
+ case 1:
16693
+ var value = (
16694
+ /** @type {boolean} */
16695
+ reader.readBool()
16696
+ );
16697
+ msg.setSuccess(value);
16698
+ break;
16699
+ case 2:
16700
+ var value = (
16701
+ /** @type {string} */
16702
+ reader.readString()
16703
+ );
16704
+ msg.setError(value);
16705
+ break;
16706
+ case 3:
16707
+ var value = (
16708
+ /** @type {!proto.aggregator.ErrorCode} */
16709
+ reader.readEnum()
16710
+ );
16711
+ msg.setErrorCode(value);
16712
+ break;
16713
+ case 4:
16714
+ var value = new proto.aggregator.GasFeeBreakdown();
16715
+ reader.readMessage(value, proto.aggregator.GasFeeBreakdown.deserializeBinaryFromReader);
16716
+ msg.setGasFees(value);
16717
+ break;
16718
+ case 5:
16719
+ var value = new proto.aggregator.AutomationFee();
16720
+ reader.readMessage(value, proto.aggregator.AutomationFee.deserializeBinaryFromReader);
16721
+ msg.setAutomationFees(value);
16722
+ break;
16723
+ case 6:
16724
+ var value = new proto.aggregator.SmartWalletCreationFee();
16725
+ reader.readMessage(value, proto.aggregator.SmartWalletCreationFee.deserializeBinaryFromReader);
16726
+ msg.setCreationFees(value);
16727
+ break;
16728
+ case 7:
16729
+ var value = new proto.aggregator.FeeAmount();
16730
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16731
+ msg.setTotalFees(value);
16732
+ break;
16733
+ case 8:
16734
+ var value = new proto.aggregator.FeeDiscount();
16735
+ reader.readMessage(value, proto.aggregator.FeeDiscount.deserializeBinaryFromReader);
16736
+ msg.addDiscounts(value);
16737
+ break;
16738
+ case 9:
16739
+ var value = new proto.aggregator.FeeAmount();
16740
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16741
+ msg.setTotalDiscounts(value);
16742
+ break;
16743
+ case 10:
16744
+ var value = new proto.aggregator.FeeAmount();
16745
+ reader.readMessage(value, proto.aggregator.FeeAmount.deserializeBinaryFromReader);
16746
+ msg.setFinalTotal(value);
16747
+ break;
16748
+ case 11:
16749
+ var value = (
16750
+ /** @type {number} */
16751
+ reader.readInt64()
16752
+ );
16753
+ msg.setEstimatedAt(value);
16754
+ break;
16755
+ case 12:
16756
+ var value = (
16757
+ /** @type {string} */
16758
+ reader.readString()
16759
+ );
16760
+ msg.setChainId(value);
16761
+ break;
16762
+ case 13:
16763
+ var value = (
16764
+ /** @type {string} */
16765
+ reader.readString()
16766
+ );
16767
+ msg.setPriceDataSource(value);
16768
+ break;
16769
+ case 14:
16770
+ var value = (
16771
+ /** @type {number} */
16772
+ reader.readInt64()
16773
+ );
16774
+ msg.setPriceDataAgeSeconds(value);
16775
+ break;
16776
+ case 15:
16777
+ var value = (
16778
+ /** @type {string} */
16779
+ reader.readString()
16780
+ );
16781
+ msg.addWarnings(value);
16782
+ break;
16783
+ case 16:
16784
+ var value = (
16785
+ /** @type {string} */
16786
+ reader.readString()
16787
+ );
16788
+ msg.addRecommendations(value);
16789
+ break;
16790
+ default:
16791
+ reader.skipField();
16792
+ break;
16793
+ }
16794
+ }
16795
+ return msg;
16796
+ };
16797
+ proto.aggregator.EstimateFeesResp.prototype.serializeBinary = function() {
16798
+ var writer = new jspb.BinaryWriter();
16799
+ proto.aggregator.EstimateFeesResp.serializeBinaryToWriter(this, writer);
16800
+ return writer.getResultBuffer();
16801
+ };
16802
+ proto.aggregator.EstimateFeesResp.serializeBinaryToWriter = function(message, writer) {
16803
+ var f = void 0;
16804
+ f = message.getSuccess();
16805
+ if (f) {
16806
+ writer.writeBool(
16807
+ 1,
16808
+ f
16809
+ );
16810
+ }
16811
+ f = message.getError();
16812
+ if (f.length > 0) {
16813
+ writer.writeString(
16814
+ 2,
16815
+ f
16816
+ );
16817
+ }
16818
+ f = message.getErrorCode();
16819
+ if (f !== 0) {
16820
+ writer.writeEnum(
16821
+ 3,
16822
+ f
16823
+ );
16824
+ }
16825
+ f = message.getGasFees();
16826
+ if (f != null) {
16827
+ writer.writeMessage(
16828
+ 4,
16829
+ f,
16830
+ proto.aggregator.GasFeeBreakdown.serializeBinaryToWriter
16831
+ );
16832
+ }
16833
+ f = message.getAutomationFees();
16834
+ if (f != null) {
16835
+ writer.writeMessage(
16836
+ 5,
16837
+ f,
16838
+ proto.aggregator.AutomationFee.serializeBinaryToWriter
16839
+ );
16840
+ }
16841
+ f = message.getCreationFees();
16842
+ if (f != null) {
16843
+ writer.writeMessage(
16844
+ 6,
16845
+ f,
16846
+ proto.aggregator.SmartWalletCreationFee.serializeBinaryToWriter
16847
+ );
16848
+ }
16849
+ f = message.getTotalFees();
16850
+ if (f != null) {
16851
+ writer.writeMessage(
16852
+ 7,
16853
+ f,
16854
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16855
+ );
16856
+ }
16857
+ f = message.getDiscountsList();
16858
+ if (f.length > 0) {
16859
+ writer.writeRepeatedMessage(
16860
+ 8,
16861
+ f,
16862
+ proto.aggregator.FeeDiscount.serializeBinaryToWriter
16863
+ );
16864
+ }
16865
+ f = message.getTotalDiscounts();
16866
+ if (f != null) {
16867
+ writer.writeMessage(
16868
+ 9,
16869
+ f,
16870
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16871
+ );
16872
+ }
16873
+ f = message.getFinalTotal();
16874
+ if (f != null) {
16875
+ writer.writeMessage(
16876
+ 10,
16877
+ f,
16878
+ proto.aggregator.FeeAmount.serializeBinaryToWriter
16879
+ );
16880
+ }
16881
+ f = message.getEstimatedAt();
16882
+ if (f !== 0) {
16883
+ writer.writeInt64(
16884
+ 11,
16885
+ f
16886
+ );
16887
+ }
16888
+ f = message.getChainId();
16889
+ if (f.length > 0) {
16890
+ writer.writeString(
16891
+ 12,
16892
+ f
16893
+ );
16894
+ }
16895
+ f = message.getPriceDataSource();
16896
+ if (f.length > 0) {
16897
+ writer.writeString(
16898
+ 13,
16899
+ f
16900
+ );
16901
+ }
16902
+ f = message.getPriceDataAgeSeconds();
16903
+ if (f !== 0) {
16904
+ writer.writeInt64(
16905
+ 14,
16906
+ f
16907
+ );
16908
+ }
16909
+ f = message.getWarningsList();
16910
+ if (f.length > 0) {
16911
+ writer.writeRepeatedString(
16912
+ 15,
16913
+ f
16914
+ );
16915
+ }
16916
+ f = message.getRecommendationsList();
16917
+ if (f.length > 0) {
16918
+ writer.writeRepeatedString(
16919
+ 16,
16920
+ f
16921
+ );
16922
+ }
16923
+ };
16924
+ proto.aggregator.EstimateFeesResp.prototype.getSuccess = function() {
16925
+ return (
16926
+ /** @type {boolean} */
16927
+ jspb.Message.getBooleanFieldWithDefault(this, 1, false)
16928
+ );
16929
+ };
16930
+ proto.aggregator.EstimateFeesResp.prototype.setSuccess = function(value) {
16931
+ return jspb.Message.setProto3BooleanField(this, 1, value);
16932
+ };
16933
+ proto.aggregator.EstimateFeesResp.prototype.getError = function() {
16934
+ return (
16935
+ /** @type {string} */
16936
+ jspb.Message.getFieldWithDefault(this, 2, "")
16937
+ );
16938
+ };
16939
+ proto.aggregator.EstimateFeesResp.prototype.setError = function(value) {
16940
+ return jspb.Message.setProto3StringField(this, 2, value);
16941
+ };
16942
+ proto.aggregator.EstimateFeesResp.prototype.getErrorCode = function() {
16943
+ return (
16944
+ /** @type {!proto.aggregator.ErrorCode} */
16945
+ jspb.Message.getFieldWithDefault(this, 3, 0)
16946
+ );
16947
+ };
16948
+ proto.aggregator.EstimateFeesResp.prototype.setErrorCode = function(value) {
16949
+ return jspb.Message.setProto3EnumField(this, 3, value);
16950
+ };
16951
+ proto.aggregator.EstimateFeesResp.prototype.getGasFees = function() {
16952
+ return (
16953
+ /** @type{?proto.aggregator.GasFeeBreakdown} */
16954
+ jspb.Message.getWrapperField(this, proto.aggregator.GasFeeBreakdown, 4)
16955
+ );
16956
+ };
16957
+ proto.aggregator.EstimateFeesResp.prototype.setGasFees = function(value) {
16958
+ return jspb.Message.setWrapperField(this, 4, value);
16959
+ };
16960
+ proto.aggregator.EstimateFeesResp.prototype.clearGasFees = function() {
16961
+ return this.setGasFees(void 0);
16962
+ };
16963
+ proto.aggregator.EstimateFeesResp.prototype.hasGasFees = function() {
16964
+ return jspb.Message.getField(this, 4) != null;
16965
+ };
16966
+ proto.aggregator.EstimateFeesResp.prototype.getAutomationFees = function() {
16967
+ return (
16968
+ /** @type{?proto.aggregator.AutomationFee} */
16969
+ jspb.Message.getWrapperField(this, proto.aggregator.AutomationFee, 5)
16970
+ );
16971
+ };
16972
+ proto.aggregator.EstimateFeesResp.prototype.setAutomationFees = function(value) {
16973
+ return jspb.Message.setWrapperField(this, 5, value);
16974
+ };
16975
+ proto.aggregator.EstimateFeesResp.prototype.clearAutomationFees = function() {
16976
+ return this.setAutomationFees(void 0);
16977
+ };
16978
+ proto.aggregator.EstimateFeesResp.prototype.hasAutomationFees = function() {
16979
+ return jspb.Message.getField(this, 5) != null;
16980
+ };
16981
+ proto.aggregator.EstimateFeesResp.prototype.getCreationFees = function() {
16982
+ return (
16983
+ /** @type{?proto.aggregator.SmartWalletCreationFee} */
16984
+ jspb.Message.getWrapperField(this, proto.aggregator.SmartWalletCreationFee, 6)
16985
+ );
16986
+ };
16987
+ proto.aggregator.EstimateFeesResp.prototype.setCreationFees = function(value) {
16988
+ return jspb.Message.setWrapperField(this, 6, value);
16989
+ };
16990
+ proto.aggregator.EstimateFeesResp.prototype.clearCreationFees = function() {
16991
+ return this.setCreationFees(void 0);
16992
+ };
16993
+ proto.aggregator.EstimateFeesResp.prototype.hasCreationFees = function() {
16994
+ return jspb.Message.getField(this, 6) != null;
16995
+ };
16996
+ proto.aggregator.EstimateFeesResp.prototype.getTotalFees = function() {
16997
+ return (
16998
+ /** @type{?proto.aggregator.FeeAmount} */
16999
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 7)
17000
+ );
17001
+ };
17002
+ proto.aggregator.EstimateFeesResp.prototype.setTotalFees = function(value) {
17003
+ return jspb.Message.setWrapperField(this, 7, value);
17004
+ };
17005
+ proto.aggregator.EstimateFeesResp.prototype.clearTotalFees = function() {
17006
+ return this.setTotalFees(void 0);
17007
+ };
17008
+ proto.aggregator.EstimateFeesResp.prototype.hasTotalFees = function() {
17009
+ return jspb.Message.getField(this, 7) != null;
17010
+ };
17011
+ proto.aggregator.EstimateFeesResp.prototype.getDiscountsList = function() {
17012
+ return (
17013
+ /** @type{!Array<!proto.aggregator.FeeDiscount>} */
17014
+ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.FeeDiscount, 8)
17015
+ );
17016
+ };
17017
+ proto.aggregator.EstimateFeesResp.prototype.setDiscountsList = function(value) {
17018
+ return jspb.Message.setRepeatedWrapperField(this, 8, value);
17019
+ };
17020
+ proto.aggregator.EstimateFeesResp.prototype.addDiscounts = function(opt_value, opt_index) {
17021
+ return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.FeeDiscount, opt_index);
17022
+ };
17023
+ proto.aggregator.EstimateFeesResp.prototype.clearDiscountsList = function() {
17024
+ return this.setDiscountsList([]);
17025
+ };
17026
+ proto.aggregator.EstimateFeesResp.prototype.getTotalDiscounts = function() {
17027
+ return (
17028
+ /** @type{?proto.aggregator.FeeAmount} */
17029
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 9)
17030
+ );
17031
+ };
17032
+ proto.aggregator.EstimateFeesResp.prototype.setTotalDiscounts = function(value) {
17033
+ return jspb.Message.setWrapperField(this, 9, value);
17034
+ };
17035
+ proto.aggregator.EstimateFeesResp.prototype.clearTotalDiscounts = function() {
17036
+ return this.setTotalDiscounts(void 0);
17037
+ };
17038
+ proto.aggregator.EstimateFeesResp.prototype.hasTotalDiscounts = function() {
17039
+ return jspb.Message.getField(this, 9) != null;
17040
+ };
17041
+ proto.aggregator.EstimateFeesResp.prototype.getFinalTotal = function() {
17042
+ return (
17043
+ /** @type{?proto.aggregator.FeeAmount} */
17044
+ jspb.Message.getWrapperField(this, proto.aggregator.FeeAmount, 10)
17045
+ );
17046
+ };
17047
+ proto.aggregator.EstimateFeesResp.prototype.setFinalTotal = function(value) {
17048
+ return jspb.Message.setWrapperField(this, 10, value);
17049
+ };
17050
+ proto.aggregator.EstimateFeesResp.prototype.clearFinalTotal = function() {
17051
+ return this.setFinalTotal(void 0);
17052
+ };
17053
+ proto.aggregator.EstimateFeesResp.prototype.hasFinalTotal = function() {
17054
+ return jspb.Message.getField(this, 10) != null;
17055
+ };
17056
+ proto.aggregator.EstimateFeesResp.prototype.getEstimatedAt = function() {
17057
+ return (
17058
+ /** @type {number} */
17059
+ jspb.Message.getFieldWithDefault(this, 11, 0)
17060
+ );
17061
+ };
17062
+ proto.aggregator.EstimateFeesResp.prototype.setEstimatedAt = function(value) {
17063
+ return jspb.Message.setProto3IntField(this, 11, value);
17064
+ };
17065
+ proto.aggregator.EstimateFeesResp.prototype.getChainId = function() {
17066
+ return (
17067
+ /** @type {string} */
17068
+ jspb.Message.getFieldWithDefault(this, 12, "")
17069
+ );
17070
+ };
17071
+ proto.aggregator.EstimateFeesResp.prototype.setChainId = function(value) {
17072
+ return jspb.Message.setProto3StringField(this, 12, value);
17073
+ };
17074
+ proto.aggregator.EstimateFeesResp.prototype.getPriceDataSource = function() {
17075
+ return (
17076
+ /** @type {string} */
17077
+ jspb.Message.getFieldWithDefault(this, 13, "")
17078
+ );
17079
+ };
17080
+ proto.aggregator.EstimateFeesResp.prototype.setPriceDataSource = function(value) {
17081
+ return jspb.Message.setProto3StringField(this, 13, value);
17082
+ };
17083
+ proto.aggregator.EstimateFeesResp.prototype.getPriceDataAgeSeconds = function() {
17084
+ return (
17085
+ /** @type {number} */
17086
+ jspb.Message.getFieldWithDefault(this, 14, 0)
17087
+ );
17088
+ };
17089
+ proto.aggregator.EstimateFeesResp.prototype.setPriceDataAgeSeconds = function(value) {
17090
+ return jspb.Message.setProto3IntField(this, 14, value);
17091
+ };
17092
+ proto.aggregator.EstimateFeesResp.prototype.getWarningsList = function() {
17093
+ return (
17094
+ /** @type {!Array<string>} */
17095
+ jspb.Message.getRepeatedField(this, 15)
17096
+ );
17097
+ };
17098
+ proto.aggregator.EstimateFeesResp.prototype.setWarningsList = function(value) {
17099
+ return jspb.Message.setField(this, 15, value || []);
17100
+ };
17101
+ proto.aggregator.EstimateFeesResp.prototype.addWarnings = function(value, opt_index) {
17102
+ return jspb.Message.addToRepeatedField(this, 15, value, opt_index);
17103
+ };
17104
+ proto.aggregator.EstimateFeesResp.prototype.clearWarningsList = function() {
17105
+ return this.setWarningsList([]);
17106
+ };
17107
+ proto.aggregator.EstimateFeesResp.prototype.getRecommendationsList = function() {
17108
+ return (
17109
+ /** @type {!Array<string>} */
17110
+ jspb.Message.getRepeatedField(this, 16)
17111
+ );
17112
+ };
17113
+ proto.aggregator.EstimateFeesResp.prototype.setRecommendationsList = function(value) {
17114
+ return jspb.Message.setField(this, 16, value || []);
17115
+ };
17116
+ proto.aggregator.EstimateFeesResp.prototype.addRecommendations = function(value, opt_index) {
17117
+ return jspb.Message.addToRepeatedField(this, 16, value, opt_index);
17118
+ };
17119
+ proto.aggregator.EstimateFeesResp.prototype.clearRecommendationsList = function() {
17120
+ return this.setRecommendationsList([]);
17121
+ };
17122
+ if (jspb.Message.GENERATE_TO_OBJECT) {
17123
+ proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) {
17124
+ return proto.aggregator.EventCondition.toObject(opt_includeInstance, this);
17125
+ };
17126
+ proto.aggregator.EventCondition.toObject = function(includeInstance, msg) {
17127
+ var f, obj = {
17128
+ fieldName: jspb.Message.getFieldWithDefault(msg, 1, ""),
17129
+ operator: jspb.Message.getFieldWithDefault(msg, 2, ""),
17130
+ value: jspb.Message.getFieldWithDefault(msg, 3, ""),
17131
+ fieldType: jspb.Message.getFieldWithDefault(msg, 4, "")
17132
+ };
17133
+ if (includeInstance) {
17134
+ obj.$jspbMessageInstance = msg;
17135
+ }
17136
+ return obj;
17137
+ };
17138
+ }
17139
+ proto.aggregator.EventCondition.deserializeBinary = function(bytes) {
17140
+ var reader = new jspb.BinaryReader(bytes);
17141
+ var msg = new proto.aggregator.EventCondition();
17142
+ return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader);
17143
+ };
17144
+ proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) {
17145
+ while (reader.nextField()) {
17146
+ if (reader.isEndGroup()) {
17147
+ break;
17148
+ }
17149
+ var field = reader.getFieldNumber();
17150
+ switch (field) {
17151
+ case 1:
17152
+ var value = (
17153
+ /** @type {string} */
17154
+ reader.readString()
17155
+ );
17156
+ msg.setFieldName(value);
17157
+ break;
17158
+ case 2:
17159
+ var value = (
17160
+ /** @type {string} */
17161
+ reader.readString()
17162
+ );
17163
+ msg.setOperator(value);
17164
+ break;
17165
+ case 3:
17166
+ var value = (
17167
+ /** @type {string} */
17168
+ reader.readString()
17169
+ );
17170
+ msg.setValue(value);
17171
+ break;
17172
+ case 4:
17173
+ var value = (
17174
+ /** @type {string} */
17175
+ reader.readString()
17176
+ );
17177
+ msg.setFieldType(value);
17178
+ break;
17179
+ default:
17180
+ reader.skipField();
17181
+ break;
17182
+ }
17183
+ }
17184
+ return msg;
17185
+ };
17186
+ proto.aggregator.EventCondition.prototype.serializeBinary = function() {
17187
+ var writer = new jspb.BinaryWriter();
17188
+ proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer);
17189
+ return writer.getResultBuffer();
17190
+ };
17191
+ proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) {
17192
+ var f = void 0;
17193
+ f = message.getFieldName();
17194
+ if (f.length > 0) {
17195
+ writer.writeString(
17196
+ 1,
17197
+ f
17198
+ );
17199
+ }
17200
+ f = message.getOperator();
17201
+ if (f.length > 0) {
17202
+ writer.writeString(
17203
+ 2,
17204
+ f
17205
+ );
17206
+ }
17207
+ f = message.getValue();
17208
+ if (f.length > 0) {
17209
+ writer.writeString(
17210
+ 3,
17211
+ f
17212
+ );
17213
+ }
17214
+ f = message.getFieldType();
17215
+ if (f.length > 0) {
17216
+ writer.writeString(
17217
+ 4,
17218
+ f
17219
+ );
17220
+ }
17221
+ };
17222
+ proto.aggregator.EventCondition.prototype.getFieldName = function() {
17223
+ return (
17224
+ /** @type {string} */
17225
+ jspb.Message.getFieldWithDefault(this, 1, "")
17226
+ );
17227
+ };
17228
+ proto.aggregator.EventCondition.prototype.setFieldName = function(value) {
17229
+ return jspb.Message.setProto3StringField(this, 1, value);
17230
+ };
17231
+ proto.aggregator.EventCondition.prototype.getOperator = function() {
17232
+ return (
17233
+ /** @type {string} */
17234
+ jspb.Message.getFieldWithDefault(this, 2, "")
17235
+ );
17236
+ };
17237
+ proto.aggregator.EventCondition.prototype.setOperator = function(value) {
17238
+ return jspb.Message.setProto3StringField(this, 2, value);
17239
+ };
17240
+ proto.aggregator.EventCondition.prototype.getValue = function() {
17241
+ return (
17242
+ /** @type {string} */
17243
+ jspb.Message.getFieldWithDefault(this, 3, "")
17244
+ );
17245
+ };
17246
+ proto.aggregator.EventCondition.prototype.setValue = function(value) {
17247
+ return jspb.Message.setProto3StringField(this, 3, value);
17248
+ };
17249
+ proto.aggregator.EventCondition.prototype.getFieldType = function() {
17250
+ return (
17251
+ /** @type {string} */
17252
+ jspb.Message.getFieldWithDefault(this, 4, "")
17253
+ );
17254
+ };
17255
+ proto.aggregator.EventCondition.prototype.setFieldType = function(value) {
17256
+ return jspb.Message.setProto3StringField(this, 4, value);
17257
+ };
17258
+ proto.aggregator.TriggerType = {
17259
+ TRIGGER_TYPE_UNSPECIFIED: 0,
17260
+ TRIGGER_TYPE_MANUAL: 1,
17261
+ TRIGGER_TYPE_FIXED_TIME: 2,
17262
+ TRIGGER_TYPE_CRON: 3,
17263
+ TRIGGER_TYPE_BLOCK: 4,
17264
+ TRIGGER_TYPE_EVENT: 5
17265
+ };
17266
+ proto.aggregator.NodeType = {
17267
+ NODE_TYPE_UNSPECIFIED: 0,
17268
+ NODE_TYPE_ETH_TRANSFER: 1,
17269
+ NODE_TYPE_CONTRACT_WRITE: 2,
17270
+ NODE_TYPE_CONTRACT_READ: 3,
17271
+ NODE_TYPE_GRAPHQL_QUERY: 4,
17272
+ NODE_TYPE_REST_API: 5,
17273
+ NODE_TYPE_CUSTOM_CODE: 6,
17274
+ NODE_TYPE_BRANCH: 7,
17275
+ NODE_TYPE_FILTER: 8,
17276
+ NODE_TYPE_LOOP: 9
17277
+ };
17278
+ proto.aggregator.ExecutionMode = {
17279
+ EXECUTION_MODE_SEQUENTIAL: 0,
17280
+ EXECUTION_MODE_PARALLEL: 1
17281
+ };
17282
+ proto.aggregator.Lang = {
17283
+ JAVASCRIPT: 0
17284
+ };
17285
+ proto.aggregator.ErrorCode = {
17286
+ ERROR_CODE_UNSPECIFIED: 0,
17287
+ UNAUTHORIZED: 1e3,
17288
+ FORBIDDEN: 1001,
17289
+ INVALID_SIGNATURE: 1002,
17290
+ EXPIRED_TOKEN: 1003,
17291
+ TASK_NOT_FOUND: 2e3,
17292
+ EXECUTION_NOT_FOUND: 2001,
17293
+ WALLET_NOT_FOUND: 2002,
17294
+ SECRET_NOT_FOUND: 2003,
17295
+ TOKEN_METADATA_NOT_FOUND: 2004,
17296
+ INVALID_REQUEST: 3e3,
17297
+ INVALID_TRIGGER_CONFIG: 3001,
17298
+ INVALID_NODE_CONFIG: 3002,
17299
+ INVALID_WORKFLOW: 3003,
17300
+ INVALID_ADDRESS: 3004,
17301
+ INVALID_SIGNATURE_FORMAT: 3005,
17302
+ MISSING_REQUIRED_FIELD: 3006,
17303
+ TASK_ALREADY_EXISTS: 4e3,
17304
+ TASK_ALREADY_COMPLETED: 4001,
17305
+ TASK_ALREADY_CANCELLED: 4002,
17306
+ EXECUTION_IN_PROGRESS: 4003,
17307
+ WALLET_ALREADY_EXISTS: 4004,
17308
+ SECRET_ALREADY_EXISTS: 4005,
17309
+ RPC_NODE_ERROR: 5e3,
17310
+ TENDERLY_API_ERROR: 5001,
17311
+ TOKEN_LOOKUP_ERROR: 5002,
15432
17312
  SIMULATION_ERROR: 5003,
15433
17313
  STORAGE_UNAVAILABLE: 6e3,
15434
17314
  STORAGE_WRITE_ERROR: 6001,
@@ -15540,6 +17420,24 @@ var require_avs_grpc_pb = __commonJS({
15540
17420
  function deserialize_aggregator_DeleteTaskResp(buffer_arg) {
15541
17421
  return avs_pb24.DeleteTaskResp.deserializeBinary(new Uint8Array(buffer_arg));
15542
17422
  }
17423
+ function serialize_aggregator_EstimateFeesReq(arg) {
17424
+ if (!(arg instanceof avs_pb24.EstimateFeesReq)) {
17425
+ throw new Error("Expected argument of type aggregator.EstimateFeesReq");
17426
+ }
17427
+ return Buffer.from(arg.serializeBinary());
17428
+ }
17429
+ function deserialize_aggregator_EstimateFeesReq(buffer_arg) {
17430
+ return avs_pb24.EstimateFeesReq.deserializeBinary(new Uint8Array(buffer_arg));
17431
+ }
17432
+ function serialize_aggregator_EstimateFeesResp(arg) {
17433
+ if (!(arg instanceof avs_pb24.EstimateFeesResp)) {
17434
+ throw new Error("Expected argument of type aggregator.EstimateFeesResp");
17435
+ }
17436
+ return Buffer.from(arg.serializeBinary());
17437
+ }
17438
+ function deserialize_aggregator_EstimateFeesResp(buffer_arg) {
17439
+ return avs_pb24.EstimateFeesResp.deserializeBinary(new Uint8Array(buffer_arg));
17440
+ }
15543
17441
  function serialize_aggregator_Execution(arg) {
15544
17442
  if (!(arg instanceof avs_pb24.Execution)) {
15545
17443
  throw new Error("Expected argument of type aggregator.Execution");
@@ -16226,6 +18124,20 @@ var require_avs_grpc_pb = __commonJS({
16226
18124
  requestDeserialize: deserialize_aggregator_GetTokenMetadataReq,
16227
18125
  responseSerialize: serialize_aggregator_GetTokenMetadataResp,
16228
18126
  responseDeserialize: deserialize_aggregator_GetTokenMetadataResp
18127
+ },
18128
+ // EstimateFees provides comprehensive fee estimation for workflow deployment
18129
+ // Includes gas costs, automation fees, smart wallet creation fees, and promotional discounts
18130
+ // Called before CreateTask to help users understand total costs
18131
+ estimateFees: {
18132
+ path: "/aggregator.Aggregator/EstimateFees",
18133
+ requestStream: false,
18134
+ responseStream: false,
18135
+ requestType: avs_pb24.EstimateFeesReq,
18136
+ responseType: avs_pb24.EstimateFeesResp,
18137
+ requestSerialize: serialize_aggregator_EstimateFeesReq,
18138
+ requestDeserialize: deserialize_aggregator_EstimateFeesReq,
18139
+ responseSerialize: serialize_aggregator_EstimateFeesResp,
18140
+ responseDeserialize: deserialize_aggregator_EstimateFeesResp
16229
18141
  }
16230
18142
  };
16231
18143
  exports2.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService, "Aggregator");
@@ -16523,6 +18435,7 @@ function convertProtobufValueToJs(value) {
16523
18435
  }
16524
18436
  }
16525
18437
  function convertJSValueToProtobuf(value) {
18438
+ console.log("\u{1F50D} [DEBUG] convertJSValueToProtobuf called with:", { value, type: typeof value });
16526
18439
  const protobufValue = new import_struct_pb.Value();
16527
18440
  if (value === null || value === void 0) {
16528
18441
  protobufValue.setNullValue(0);
@@ -18088,11 +20001,21 @@ var Workflow = class _Workflow {
18088
20001
  if (this.name) {
18089
20002
  request.setName(this.name);
18090
20003
  }
20004
+ console.log("\u{1F50D} [DEBUG] Workflow.toRequest() inputVariables check:", {
20005
+ hasInputVariables: !!this.inputVariables,
20006
+ inputVariables: this.inputVariables,
20007
+ inputVariablesType: typeof this.inputVariables,
20008
+ inputVariablesKeys: this.inputVariables ? Object.keys(this.inputVariables) : []
20009
+ });
18091
20010
  if (this.inputVariables) {
18092
20011
  const inputVarsMap = request.getInputVariablesMap();
18093
20012
  for (const [key, value] of Object.entries(this.inputVariables)) {
20013
+ console.log("\u{1F50D} [DEBUG] Converting inputVariable:", { key, value, valueType: typeof value });
18094
20014
  inputVarsMap.set(key, convertJSValueToProtobuf(value));
18095
20015
  }
20016
+ console.log("\u{1F50D} [DEBUG] Final inputVarsMap size:", inputVarsMap.getLength());
20017
+ } else {
20018
+ console.log("\u{1F50D} [DEBUG] No inputVariables to add to request");
18096
20019
  }
18097
20020
  return request;
18098
20021
  }
@@ -19456,6 +21379,178 @@ var Client = class extends BaseClient {
19456
21379
  source: result.getSource()
19457
21380
  };
19458
21381
  }
21382
+ /**
21383
+ * Get comprehensive fee estimation for workflow deployment
21384
+ * Provides detailed breakdown of gas fees, automation fees, and smart wallet creation costs
21385
+ * @param {EstimateFeesRequest} params - The fee estimation request parameters
21386
+ * @param {TriggerProps} params.trigger - Trigger configuration for the workflow
21387
+ * @param {NodeProps[]} params.nodes - Array of workflow nodes
21388
+ * @param {string} [params.runner] - Runner address (smart wallet) - optional if in inputVariables
21389
+ * @param {Record<string, any>} [params.inputVariables] - Input variables including workflowContext
21390
+ * @param {number} params.createdAt - Workflow creation timestamp (milliseconds)
21391
+ * @param {number} params.expireAt - Workflow expiration timestamp (milliseconds)
21392
+ * @param {RequestOptions} options - Request options
21393
+ * @returns {Promise<EstimateFeesResponse>} - Comprehensive fee breakdown with gas, automation, and creation costs
21394
+ */
21395
+ async estimateFees({
21396
+ trigger,
21397
+ nodes,
21398
+ runner,
21399
+ inputVariables = {},
21400
+ createdAt,
21401
+ expireAt
21402
+ }, options) {
21403
+ const request = new avs_pb23.EstimateFeesReq();
21404
+ const triggerSdk = factory_default.create(trigger);
21405
+ request.setTrigger(triggerSdk.toRequest());
21406
+ const nodeMessages = nodes.map((node) => {
21407
+ const nodeSdk = factory_default2.create(node);
21408
+ return nodeSdk.toRequest();
21409
+ });
21410
+ request.setNodesList(nodeMessages);
21411
+ if (runner) {
21412
+ request.setRunner(runner);
21413
+ }
21414
+ if (inputVariables && Object.keys(inputVariables).length > 0) {
21415
+ const inputVarsMap = request.getInputVariablesMap();
21416
+ for (const [key, value] of Object.entries(inputVariables)) {
21417
+ inputVarsMap.set(key, convertJSValueToProtobuf(value));
21418
+ }
21419
+ }
21420
+ request.setCreatedAt(createdAt);
21421
+ request.setExpireAt(expireAt);
21422
+ const result = await this.sendGrpcRequest("estimateFees", request, options);
21423
+ return this.convertEstimateFeesResponse(result);
21424
+ }
21425
+ /**
21426
+ * Convert protobuf EstimateFeesResp to TypeScript EstimateFeesResponse
21427
+ * @private
21428
+ */
21429
+ convertEstimateFeesResponse(result) {
21430
+ const response = {
21431
+ success: result.getSuccess(),
21432
+ error: result.getError() || void 0,
21433
+ errorCode: result.getErrorCode().toString() || void 0
21434
+ };
21435
+ const gasFees = result.getGasFees();
21436
+ if (gasFees) {
21437
+ response.gasFees = {
21438
+ nodeGasFees: gasFees.getOperationsList().map((operation) => ({
21439
+ nodeId: operation.getNodeId(),
21440
+ operationType: operation.getOperationType(),
21441
+ methodName: operation.getMethodName() || void 0,
21442
+ gasUnits: operation.getGasUnits(),
21443
+ gasPrice: gasFees.getGasPriceGwei() || "",
21444
+ // Use parent gas price
21445
+ totalCost: operation.getFee() ? this.convertFeeAmount(operation.getFee()) : this.createZeroFeeAmount(result.getChainId()),
21446
+ success: operation.getFee() ? parseFloat(operation.getFee().getNativeTokenAmount()) > 0 : false,
21447
+ // Check if operation has valid gas cost
21448
+ error: void 0
21449
+ })),
21450
+ totalGasCost: this.convertFeeAmount(gasFees.getTotalGasFees()),
21451
+ estimationAccurate: gasFees.getEstimationAccurate(),
21452
+ estimationMethod: gasFees.getEstimationMethod(),
21453
+ averageGasPrice: gasFees.getGasPriceGwei(),
21454
+ notes: []
21455
+ // Not available in current protobuf
21456
+ };
21457
+ }
21458
+ const automationFees = result.getAutomationFees();
21459
+ if (automationFees) {
21460
+ const baseFee = automationFees.getBaseFee();
21461
+ const monitoringFee = automationFees.getMonitoringFee();
21462
+ const executionFee = automationFees.getExecutionFee();
21463
+ const totalFee = baseFee || this.createMockFeeAmount(result.getChainId());
21464
+ response.automationFees = {
21465
+ triggerType: automationFees.getTriggerType(),
21466
+ durationMinutes: automationFees.getDurationMinutes(),
21467
+ baseFee: baseFee ? this.convertFeeAmount(baseFee) : this.createZeroFeeAmount(result.getChainId()),
21468
+ executionFee: executionFee ? this.convertFeeAmount(executionFee) : this.createZeroFeeAmount(result.getChainId()),
21469
+ estimatedExecutions: automationFees.getEstimatedExecutions(),
21470
+ totalFee: this.convertFeeAmount(totalFee),
21471
+ breakdown: []
21472
+ // Not available in current protobuf structure
21473
+ };
21474
+ }
21475
+ const creationFees = result.getCreationFees();
21476
+ if (creationFees) {
21477
+ response.creationFees = {
21478
+ creationRequired: creationFees.getCreationRequired(),
21479
+ walletAddress: creationFees.getWalletAddress(),
21480
+ creationFee: creationFees.getCreationFee() ? this.convertFeeAmount(creationFees.getCreationFee()) : void 0,
21481
+ initialFunding: creationFees.getInitialFunding() ? this.convertFeeAmount(creationFees.getInitialFunding()) : void 0
21482
+ };
21483
+ }
21484
+ if (result.getTotalFees()) {
21485
+ response.totalFees = this.convertFeeAmount(result.getTotalFees());
21486
+ }
21487
+ if (result.getTotalDiscounts()) {
21488
+ response.totalDiscounts = this.convertFeeAmount(result.getTotalDiscounts());
21489
+ }
21490
+ if (result.getFinalTotal()) {
21491
+ response.finalTotal = this.convertFeeAmount(result.getFinalTotal());
21492
+ }
21493
+ response.discounts = result.getDiscountsList().map((discount, index) => ({
21494
+ discountId: `auto-${index}`,
21495
+ // Synthesized unique ID since not available in FeeDiscount
21496
+ discountType: discount.getDiscountType(),
21497
+ discountName: discount.getDiscountName(),
21498
+ appliesTo: discount.getAppliesTo(),
21499
+ discountPercentage: discount.getDiscountPercentage(),
21500
+ discountAmount: this.convertFeeAmount(discount.getDiscountAmount()),
21501
+ expiryDate: discount.getExpiryDate() || void 0,
21502
+ terms: discount.getTerms() || void 0
21503
+ }));
21504
+ response.estimatedAt = result.getEstimatedAt() || void 0;
21505
+ response.chainId = result.getChainId() || void 0;
21506
+ response.priceDataSource = result.getPriceDataSource() || void 0;
21507
+ response.priceDataAgeSeconds = result.getPriceDataAgeSeconds() || void 0;
21508
+ response.warnings = result.getWarningsList();
21509
+ response.recommendations = result.getRecommendationsList();
21510
+ return response;
21511
+ }
21512
+ /**
21513
+ * Create a mock fee amount object that mimics protobuf FeeAmount interface
21514
+ * @private
21515
+ */
21516
+ createMockFeeAmount(chainId) {
21517
+ const getNativeTokenSymbol = (chainId2) => {
21518
+ return "ETH";
21519
+ };
21520
+ return {
21521
+ getNativeTokenAmount: () => "0",
21522
+ getNativeTokenSymbol: () => getNativeTokenSymbol(chainId),
21523
+ getUsdAmount: () => "0",
21524
+ getApTokenAmount: () => "0"
21525
+ };
21526
+ }
21527
+ /**
21528
+ * Create a zero fee amount
21529
+ * @private
21530
+ */
21531
+ createZeroFeeAmount(chainId) {
21532
+ const getNativeTokenSymbol = (chainId2) => {
21533
+ return "ETH";
21534
+ };
21535
+ return {
21536
+ nativeTokenAmount: "0",
21537
+ nativeTokenSymbol: getNativeTokenSymbol(chainId),
21538
+ usdAmount: "0",
21539
+ apTokenAmount: "0"
21540
+ };
21541
+ }
21542
+ /**
21543
+ * Convert protobuf FeeAmount to TypeScript FeeAmount
21544
+ * @private
21545
+ */
21546
+ convertFeeAmount(feeAmount) {
21547
+ return {
21548
+ nativeTokenAmount: feeAmount.getNativeTokenAmount(),
21549
+ nativeTokenSymbol: feeAmount.getNativeTokenSymbol(),
21550
+ usdAmount: feeAmount.getUsdAmount(),
21551
+ apTokenAmount: feeAmount.getApTokenAmount()
21552
+ };
21553
+ }
19459
21554
  };
19460
21555
  // Annotate the CommonJS export names for ESM import in node:
19461
21556
  0 && (module.exports = {