@cobo/cobo-waas2 1.6.0 → 1.7.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.
Files changed (97) hide show
  1. package/README.md +17 -2
  2. package/dist/ApiClient.js +56 -6
  3. package/dist/api/DevelopersWebhooksApi.js +2 -2
  4. package/dist/api/StakingsApi.js +91 -7
  5. package/dist/api/TransactionsApi.js +4 -4
  6. package/dist/crypto/Ed25519Signer.js +36 -0
  7. package/dist/crypto/Secp256k1Signer.js +36 -0
  8. package/dist/index.js +70 -7
  9. package/dist/model/Activity.js +4 -8
  10. package/dist/model/ActivityAction.js +20 -0
  11. package/dist/model/ActivityType.js +5 -0
  12. package/dist/model/AutoFuelType.js +61 -0
  13. package/dist/model/BabylonValidator.js +4 -12
  14. package/dist/model/ContractCallParams.js +9 -0
  15. package/dist/model/CoreStakeExtra.js +170 -0
  16. package/dist/model/CoreStakingExtra.js +187 -0
  17. package/dist/model/CreateClaimActivity.js +139 -0
  18. package/dist/model/CreateClaimActivityRequest.js +182 -0
  19. package/dist/model/CreateStakeActivity.js +4 -8
  20. package/dist/model/CreateStakeActivityExtra.js +60 -8
  21. package/dist/model/CreateStakeActivityRequest.js +5 -10
  22. package/dist/model/CreateWithdrawActivity.js +0 -13
  23. package/dist/model/CreateWithdrawActivityRequest.js +0 -18
  24. package/dist/model/EstimateClaimFee.js +145 -0
  25. package/dist/model/EstimateContractCallFeeParams.js +2 -2
  26. package/dist/model/EstimateFeeParams.js +1 -1
  27. package/dist/model/EstimateStakeFee.js +5 -10
  28. package/dist/model/EstimateWithdrawFee.js +0 -18
  29. package/dist/model/EstimatedFee.js +1 -1
  30. package/dist/model/EstimatedFixedFee.js +4 -4
  31. package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
  32. package/dist/model/EthStakingExtra.js +31 -0
  33. package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
  34. package/dist/model/FeeAmount.js +1 -1
  35. package/dist/model/FeeRate.js +1 -1
  36. package/dist/model/FixedFeeRate.js +2 -2
  37. package/dist/model/GetStakingEstimationFeeRequest.js +39 -17
  38. package/dist/model/MPCProject.js +4 -4
  39. package/dist/model/MpcTransferSource.js +1 -1
  40. package/dist/model/Pagination.js +2 -2
  41. package/dist/model/StakingPoolId.js +81 -0
  42. package/dist/model/StakingPoolType.js +5 -0
  43. package/dist/model/Stakings.js +10 -14
  44. package/dist/model/StakingsExtra.js +67 -8
  45. package/dist/model/TransactionRbf.js +9 -0
  46. package/dist/model/TransactionRbfSource.js +1 -1
  47. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
  48. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
  49. package/dist/model/TransactionRequestFixedFee.js +1 -1
  50. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  51. package/dist/model/TransferParams.js +9 -0
  52. package/docs/Activity.md +1 -1
  53. package/docs/ActivityAction.md +8 -0
  54. package/docs/ActivityType.md +2 -0
  55. package/docs/AutoFuelType.md +12 -0
  56. package/docs/BabylonValidator.md +4 -4
  57. package/docs/ContractCallParams.md +1 -0
  58. package/docs/CoreStakeExtra.md +13 -0
  59. package/docs/CoreStakingExtra.md +14 -0
  60. package/docs/CreateClaimActivity.md +11 -0
  61. package/docs/CreateClaimActivityRequest.md +12 -0
  62. package/docs/CreateStakeActivity.md +1 -1
  63. package/docs/CreateStakeActivityExtra.md +4 -0
  64. package/docs/CreateStakeActivityRequest.md +1 -1
  65. package/docs/CreateWithdrawActivity.md +0 -1
  66. package/docs/CreateWithdrawActivityRequest.md +0 -1
  67. package/docs/DevelopersWebhooksApi.md +1 -1
  68. package/docs/EstimateClaimFee.md +11 -0
  69. package/docs/EstimateContractCallFeeParams.md +1 -1
  70. package/docs/EstimateFeeParams.md +1 -1
  71. package/docs/EstimateStakeFee.md +1 -1
  72. package/docs/EstimateWithdrawFee.md +0 -1
  73. package/docs/EstimatedFee.md +1 -1
  74. package/docs/EstimatedFixedFee.md +1 -1
  75. package/docs/EstimatedUtxoFeeSlow.md +1 -1
  76. package/docs/EthStakingExtra.md +1 -0
  77. package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
  78. package/docs/FeeAmount.md +1 -1
  79. package/docs/FeeRate.md +1 -1
  80. package/docs/FixedFeeRate.md +1 -1
  81. package/docs/GetStakingEstimationFeeRequest.md +2 -3
  82. package/docs/MPCProject.md +1 -1
  83. package/docs/MpcTransferSource.md +1 -1
  84. package/docs/Pagination.md +1 -1
  85. package/docs/PoolDetailsAllOfValidatorsInfo.md +4 -4
  86. package/docs/StakingPoolId.md +20 -0
  87. package/docs/StakingPoolType.md +2 -0
  88. package/docs/Stakings.md +2 -2
  89. package/docs/StakingsApi.md +108 -2
  90. package/docs/StakingsExtra.md +5 -0
  91. package/docs/TransactionRbf.md +1 -0
  92. package/docs/TransactionRbfSource.md +1 -1
  93. package/docs/TransactionsApi.md +2 -2
  94. package/docs/TransferParams.md +1 -0
  95. package/package.json +3 -2
  96. package/dist/model/StakingsValidatorInfo.js +0 -140
  97. package/docs/StakingsValidatorInfo.md +0 -13
package/dist/index.js CHANGED
@@ -123,6 +123,12 @@ Object.defineProperty(exports, "AssetInfo", {
123
123
  return _AssetInfo["default"];
124
124
  }
125
125
  });
126
+ Object.defineProperty(exports, "AutoFuelType", {
127
+ enumerable: true,
128
+ get: function get() {
129
+ return _AutoFuelType["default"];
130
+ }
131
+ });
126
132
  Object.defineProperty(exports, "BabylonStakeEstimatedFee", {
127
133
  enumerable: true,
128
134
  get: function get() {
@@ -255,12 +261,36 @@ Object.defineProperty(exports, "ContractCallSourceType", {
255
261
  return _ContractCallSourceType["default"];
256
262
  }
257
263
  });
264
+ Object.defineProperty(exports, "CoreStakeExtra", {
265
+ enumerable: true,
266
+ get: function get() {
267
+ return _CoreStakeExtra["default"];
268
+ }
269
+ });
270
+ Object.defineProperty(exports, "CoreStakingExtra", {
271
+ enumerable: true,
272
+ get: function get() {
273
+ return _CoreStakingExtra["default"];
274
+ }
275
+ });
258
276
  Object.defineProperty(exports, "CreateAddressRequest", {
259
277
  enumerable: true,
260
278
  get: function get() {
261
279
  return _CreateAddressRequest["default"];
262
280
  }
263
281
  });
282
+ Object.defineProperty(exports, "CreateClaimActivity", {
283
+ enumerable: true,
284
+ get: function get() {
285
+ return _CreateClaimActivity["default"];
286
+ }
287
+ });
288
+ Object.defineProperty(exports, "CreateClaimActivityRequest", {
289
+ enumerable: true,
290
+ get: function get() {
291
+ return _CreateClaimActivityRequest["default"];
292
+ }
293
+ });
264
294
  Object.defineProperty(exports, "CreateCustodialWalletParams", {
265
295
  enumerable: true,
266
296
  get: function get() {
@@ -441,6 +471,12 @@ Object.defineProperty(exports, "DevelopersWebhooksApi", {
441
471
  return _DevelopersWebhooksApi["default"];
442
472
  }
443
473
  });
474
+ Object.defineProperty(exports, "Ed25519Signer", {
475
+ enumerable: true,
476
+ get: function get() {
477
+ return _Ed25519Signer["default"];
478
+ }
479
+ });
444
480
  Object.defineProperty(exports, "EigenLayerLstStakeExtra", {
445
481
  enumerable: true,
446
482
  get: function get() {
@@ -471,6 +507,12 @@ Object.defineProperty(exports, "ErrorResponse", {
471
507
  return _ErrorResponse["default"];
472
508
  }
473
509
  });
510
+ Object.defineProperty(exports, "EstimateClaimFee", {
511
+ enumerable: true,
512
+ get: function get() {
513
+ return _EstimateClaimFee["default"];
514
+ }
515
+ });
474
516
  Object.defineProperty(exports, "EstimateContractCallFeeParams", {
475
517
  enumerable: true,
476
518
  get: function get() {
@@ -579,6 +621,12 @@ Object.defineProperty(exports, "EthStakingExtra", {
579
621
  return _EthStakingExtra["default"];
580
622
  }
581
623
  });
624
+ Object.defineProperty(exports, "EthStakingExtraAllOfBeaconValidators", {
625
+ enumerable: true,
626
+ get: function get() {
627
+ return _EthStakingExtraAllOfBeaconValidators["default"];
628
+ }
629
+ });
582
630
  Object.defineProperty(exports, "EthUnstakeExtra", {
583
631
  enumerable: true,
584
632
  get: function get() {
@@ -1119,6 +1167,12 @@ Object.defineProperty(exports, "Scopes", {
1119
1167
  return _Scopes["default"];
1120
1168
  }
1121
1169
  });
1170
+ Object.defineProperty(exports, "Secp256k1Signer", {
1171
+ enumerable: true,
1172
+ get: function get() {
1173
+ return _Secp256k1Signer["default"];
1174
+ }
1175
+ });
1122
1176
  Object.defineProperty(exports, "SmartContractInitiator", {
1123
1177
  enumerable: true,
1124
1178
  get: function get() {
@@ -1155,6 +1209,12 @@ Object.defineProperty(exports, "StakeSourceType", {
1155
1209
  return _StakeSourceType["default"];
1156
1210
  }
1157
1211
  });
1212
+ Object.defineProperty(exports, "StakingPoolId", {
1213
+ enumerable: true,
1214
+ get: function get() {
1215
+ return _StakingPoolId["default"];
1216
+ }
1217
+ });
1158
1218
  Object.defineProperty(exports, "StakingPoolType", {
1159
1219
  enumerable: true,
1160
1220
  get: function get() {
@@ -1185,12 +1245,6 @@ Object.defineProperty(exports, "StakingsExtra", {
1185
1245
  return _StakingsExtra["default"];
1186
1246
  }
1187
1247
  });
1188
- Object.defineProperty(exports, "StakingsValidatorInfo", {
1189
- enumerable: true,
1190
- get: function get() {
1191
- return _StakingsValidatorInfo["default"];
1192
- }
1193
- });
1194
1248
  Object.defineProperty(exports, "SubWalletAssetBalance", {
1195
1249
  enumerable: true,
1196
1250
  get: function get() {
@@ -1804,6 +1858,8 @@ Object.defineProperty(exports, "WebhookEventType", {
1804
1858
  }
1805
1859
  });
1806
1860
  var _Env = _interopRequireDefault(require("./Env"));
1861
+ var _Ed25519Signer = _interopRequireDefault(require("./crypto/Ed25519Signer"));
1862
+ var _Secp256k1Signer = _interopRequireDefault(require("./crypto/Secp256k1Signer"));
1807
1863
  var _ApiClient = _interopRequireDefault(require("./ApiClient"));
1808
1864
  var _Activity = _interopRequireDefault(require("./model/Activity"));
1809
1865
  var _ActivityAction = _interopRequireDefault(require("./model/ActivityAction"));
@@ -1823,6 +1879,7 @@ var _ApiLogDetails = _interopRequireDefault(require("./model/ApiLogDetails"));
1823
1879
  var _ApiLogSummary = _interopRequireDefault(require("./model/ApiLogSummary"));
1824
1880
  var _AssetBalance = _interopRequireDefault(require("./model/AssetBalance"));
1825
1881
  var _AssetInfo = _interopRequireDefault(require("./model/AssetInfo"));
1882
+ var _AutoFuelType = _interopRequireDefault(require("./model/AutoFuelType"));
1826
1883
  var _BabylonStakeEstimatedFee = _interopRequireDefault(require("./model/BabylonStakeEstimatedFee"));
1827
1884
  var _BabylonStakeExtra = _interopRequireDefault(require("./model/BabylonStakeExtra"));
1828
1885
  var _BabylonStakingExtra = _interopRequireDefault(require("./model/BabylonStakingExtra"));
@@ -1845,7 +1902,11 @@ var _ContractCallDestinationType = _interopRequireDefault(require("./model/Contr
1845
1902
  var _ContractCallParams = _interopRequireDefault(require("./model/ContractCallParams"));
1846
1903
  var _ContractCallSource = _interopRequireDefault(require("./model/ContractCallSource"));
1847
1904
  var _ContractCallSourceType = _interopRequireDefault(require("./model/ContractCallSourceType"));
1905
+ var _CoreStakeExtra = _interopRequireDefault(require("./model/CoreStakeExtra"));
1906
+ var _CoreStakingExtra = _interopRequireDefault(require("./model/CoreStakingExtra"));
1848
1907
  var _CreateAddressRequest = _interopRequireDefault(require("./model/CreateAddressRequest"));
1908
+ var _CreateClaimActivity = _interopRequireDefault(require("./model/CreateClaimActivity"));
1909
+ var _CreateClaimActivityRequest = _interopRequireDefault(require("./model/CreateClaimActivityRequest"));
1849
1910
  var _CreateCustodialWalletParams = _interopRequireDefault(require("./model/CreateCustodialWalletParams"));
1850
1911
  var _CreateExchangeWalletParams = _interopRequireDefault(require("./model/CreateExchangeWalletParams"));
1851
1912
  var _CreateKeyShareHolder = _interopRequireDefault(require("./model/CreateKeyShareHolder"));
@@ -1878,6 +1939,7 @@ var _EigenLayerLstStakeExtra = _interopRequireDefault(require("./model/EigenLaye
1878
1939
  var _EigenLayerNativeStakeExtra = _interopRequireDefault(require("./model/EigenLayerNativeStakeExtra"));
1879
1940
  var _EigenlayerValidator = _interopRequireDefault(require("./model/EigenlayerValidator"));
1880
1941
  var _ErrorResponse = _interopRequireDefault(require("./model/ErrorResponse"));
1942
+ var _EstimateClaimFee = _interopRequireDefault(require("./model/EstimateClaimFee"));
1881
1943
  var _EstimateContractCallFeeParams = _interopRequireDefault(require("./model/EstimateContractCallFeeParams"));
1882
1944
  var _EstimateFeeParams = _interopRequireDefault(require("./model/EstimateFeeParams"));
1883
1945
  var _EstimateFeeRequestType = _interopRequireDefault(require("./model/EstimateFeeRequestType"));
@@ -1896,6 +1958,7 @@ var _EstimatedUtxoFeeSlow = _interopRequireDefault(require("./model/EstimatedUtx
1896
1958
  var _EthStakeEstimatedFee = _interopRequireDefault(require("./model/EthStakeEstimatedFee"));
1897
1959
  var _EthStakeExtra = _interopRequireDefault(require("./model/EthStakeExtra"));
1898
1960
  var _EthStakingExtra = _interopRequireDefault(require("./model/EthStakingExtra"));
1961
+ var _EthStakingExtraAllOfBeaconValidators = _interopRequireDefault(require("./model/EthStakingExtraAllOfBeaconValidators"));
1899
1962
  var _EthUnstakeExtra = _interopRequireDefault(require("./model/EthUnstakeExtra"));
1900
1963
  var _EvmContractCallDestination = _interopRequireDefault(require("./model/EvmContractCallDestination"));
1901
1964
  var _EvmEIP191MessageSignDestination = _interopRequireDefault(require("./model/EvmEIP191MessageSignDestination"));
@@ -1991,11 +2054,11 @@ var _SmartContractWalletOperationType = _interopRequireDefault(require("./model/
1991
2054
  var _SmartContractWalletType = _interopRequireDefault(require("./model/SmartContractWalletType"));
1992
2055
  var _SourceGroup = _interopRequireDefault(require("./model/SourceGroup"));
1993
2056
  var _StakeSourceType = _interopRequireDefault(require("./model/StakeSourceType"));
2057
+ var _StakingPoolId = _interopRequireDefault(require("./model/StakingPoolId"));
1994
2058
  var _StakingPoolType = _interopRequireDefault(require("./model/StakingPoolType"));
1995
2059
  var _StakingSource = _interopRequireDefault(require("./model/StakingSource"));
1996
2060
  var _Stakings = _interopRequireDefault(require("./model/Stakings"));
1997
2061
  var _StakingsExtra = _interopRequireDefault(require("./model/StakingsExtra"));
1998
- var _StakingsValidatorInfo = _interopRequireDefault(require("./model/StakingsValidatorInfo"));
1999
2062
  var _SubWalletAssetBalance = _interopRequireDefault(require("./model/SubWalletAssetBalance"));
2000
2063
  var _TSSGroups = _interopRequireDefault(require("./model/TSSGroups"));
2001
2064
  var _TSSRequest = _interopRequireDefault(require("./model/TSSRequest"));
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ActivityStatus = _interopRequireDefault(require("./ActivityStatus"));
9
9
  var _ActivityTimeline = _interopRequireDefault(require("./ActivityTimeline"));
10
10
  var _ActivityType = _interopRequireDefault(require("./ActivityType"));
11
+ var _StakingPoolId = _interopRequireDefault(require("./StakingPoolId"));
11
12
  var _TransactionInitiatorType = _interopRequireDefault(require("./TransactionInitiatorType"));
12
13
  var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -38,7 +39,7 @@ var Activity = /*#__PURE__*/function () {
38
39
  * Constructs a new <code>Activity</code>.
39
40
  * The staking activity.
40
41
  * @alias module:model/Activity
41
- * @param pool_id {String} The ID of the staking pool.
42
+ * @param pool_id {module:model/StakingPoolId}
42
43
  * @param token_id {String} The token ID.
43
44
  * @param amount {String} The staking amount.
44
45
  * @param status {module:model/ActivityStatus}
@@ -93,7 +94,7 @@ var Activity = /*#__PURE__*/function () {
93
94
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
94
95
  }
95
96
  if (data.hasOwnProperty('pool_id')) {
96
- obj['pool_id'] = _ApiClient["default"].convertToType(data['pool_id'], 'String');
97
+ obj['pool_id'] = _StakingPoolId["default"].constructFromObject(data['pool_id']);
97
98
  }
98
99
  if (data.hasOwnProperty('token_id')) {
99
100
  obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
@@ -166,10 +167,6 @@ var Activity = /*#__PURE__*/function () {
166
167
  throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
167
168
  }
168
169
  // ensure the json data is a string
169
- if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
170
- throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
171
- }
172
- // ensure the json data is a string
173
170
  if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
174
171
  throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
175
172
  }
@@ -254,8 +251,7 @@ Activity.prototype['wallet_id'] = undefined;
254
251
  Activity.prototype['address'] = undefined;
255
252
 
256
253
  /**
257
- * The ID of the staking pool.
258
- * @member {String} pool_id
254
+ * @member {module:model/StakingPoolId} pool_id
259
255
  */
260
256
  Activity.prototype['pool_id'] = undefined;
261
257
 
@@ -45,6 +45,26 @@ var ActivityAction = exports["default"] = /*#__PURE__*/function () {
45
45
  * @const
46
46
  */
47
47
  _defineProperty(this, "BabylonConfirmation", "BabylonConfirmation");
48
+ /**
49
+ * value: "DepositETH"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "DepositETH", "DepositETH");
53
+ /**
54
+ * value: "ClaimRewards"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "ClaimRewards", "ClaimRewards");
58
+ /**
59
+ * value: "ActivateValidator"
60
+ * @const
61
+ */
62
+ _defineProperty(this, "ActivateValidator", "ActivateValidator");
63
+ /**
64
+ * value: "UnstakeETH"
65
+ * @const
66
+ */
67
+ _defineProperty(this, "UnstakeETH", "UnstakeETH");
48
68
  /**
49
69
  * value: "unknown_default_open_api"
50
70
  * @const
@@ -45,6 +45,11 @@ var ActivityType = exports["default"] = /*#__PURE__*/function () {
45
45
  * @const
46
46
  */
47
47
  _defineProperty(this, "Withdraw", "Withdraw");
48
+ /**
49
+ * value: "Claim"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "Claim", "Claim");
48
53
  /**
49
54
  * value: "unknown_default_open_api"
50
55
  * @const
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * Cobo Wallet as a Service 2.0
17
+ *
18
+ * Contact: help@cobo.com
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * Enum class AutoFuelType.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var AutoFuelType = exports["default"] = /*#__PURE__*/function () {
31
+ function AutoFuelType() {
32
+ _classCallCheck(this, AutoFuelType);
33
+ /**
34
+ * value: "PassiveAutoFuel"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "PassiveAutoFuel", "PassiveAutoFuel");
38
+ /**
39
+ * value: "ProActiveAutoFuel"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "ProActiveAutoFuel", "ProActiveAutoFuel");
43
+ /**
44
+ * value: "unknown_default_open_api"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
48
+ }
49
+ return _createClass(AutoFuelType, null, [{
50
+ key: "constructFromObject",
51
+ value:
52
+ /**
53
+ * Returns a <code>AutoFuelType</code> enum value from a Javascript object name.
54
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
55
+ * @return {module:model/AutoFuelType} The enum <code>AutoFuelType</code> value.
56
+ */
57
+ function constructFromObject(object) {
58
+ return object;
59
+ }
60
+ }]);
61
+ }();
@@ -36,16 +36,12 @@ var BabylonValidator = /*#__PURE__*/function () {
36
36
  * @alias module:model/BabylonValidator
37
37
  * @implements module:model/BaseStakeExtra
38
38
  * @param pool_type {module:model/StakingPoolType}
39
- * @param icon_url {String} The URL of the validator's icon.
40
39
  * @param name {String} The validator's name.
41
- * @param public_key {String} The public key of the validator.
42
- * @param commission_rate {Number} The commission rate of the validator.
43
- * @param supported_pos_chains {Array.<module:model/BabylonValidator.SupportedPosChainsEnum>} A list of supported Proof-of-Stake (PoS) chains.
44
40
  */
45
- function BabylonValidator(pool_type, icon_url, name, public_key, commission_rate, supported_pos_chains) {
41
+ function BabylonValidator(pool_type, name) {
46
42
  _classCallCheck(this, BabylonValidator);
47
43
  _BaseStakeExtra["default"].initialize(this, pool_type);
48
- BabylonValidator.initialize(this, pool_type, icon_url, name, public_key, commission_rate, supported_pos_chains);
44
+ BabylonValidator.initialize(this, pool_type, name);
49
45
  }
50
46
 
51
47
  /**
@@ -55,13 +51,9 @@ var BabylonValidator = /*#__PURE__*/function () {
55
51
  */
56
52
  return _createClass(BabylonValidator, null, [{
57
53
  key: "initialize",
58
- value: function initialize(obj, pool_type, icon_url, name, public_key, commission_rate, supported_pos_chains) {
54
+ value: function initialize(obj, pool_type, name) {
59
55
  obj['pool_type'] = pool_type;
60
- obj['icon_url'] = icon_url;
61
56
  obj['name'] = name;
62
- obj['public_key'] = public_key;
63
- obj['commission_rate'] = commission_rate;
64
- obj['supported_pos_chains'] = supported_pos_chains;
65
57
  }
66
58
 
67
59
  /**
@@ -145,7 +137,7 @@ var BabylonValidator = /*#__PURE__*/function () {
145
137
  }
146
138
  }]);
147
139
  }();
148
- BabylonValidator.RequiredProperties = ["pool_type", "icon_url", "name", "public_key", "commission_rate", "supported_pos_chains"];
140
+ BabylonValidator.RequiredProperties = ["pool_type", "name"];
149
141
 
150
142
  /**
151
143
  * @member {module:model/StakingPoolType} pool_type
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AutoFuelType = _interopRequireDefault(require("./AutoFuelType"));
8
9
  var _ContractCallDestination = _interopRequireDefault(require("./ContractCallDestination"));
9
10
  var _ContractCallSource = _interopRequireDefault(require("./ContractCallSource"));
10
11
  var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
@@ -93,6 +94,9 @@ var ContractCallParams = /*#__PURE__*/function () {
93
94
  if (data.hasOwnProperty('fee')) {
94
95
  obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
95
96
  }
97
+ if (data.hasOwnProperty('auto_fuel')) {
98
+ obj['auto_fuel'] = _AutoFuelType["default"].constructFromObject(data['auto_fuel']);
99
+ }
96
100
  }
97
101
  return obj;
98
102
  }
@@ -201,4 +205,9 @@ ContractCallParams.prototype['category_names'] = undefined;
201
205
  * @member {module:model/TransactionRequestFee} fee
202
206
  */
203
207
  ContractCallParams.prototype['fee'] = undefined;
208
+
209
+ /**
210
+ * @member {module:model/AutoFuelType} auto_fuel
211
+ */
212
+ ContractCallParams.prototype['auto_fuel'] = undefined;
204
213
  var _default = exports["default"] = ContractCallParams;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BaseStakeExtra = _interopRequireDefault(require("./BaseStakeExtra"));
9
+ var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The CoreStakeExtra model module.
31
+ * @module model/CoreStakeExtra
32
+ */
33
+ var CoreStakeExtra = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>CoreStakeExtra</code>.
36
+ * @alias module:model/CoreStakeExtra
37
+ * @implements module:model/BaseStakeExtra
38
+ * @param pool_type {module:model/StakingPoolType}
39
+ * @param timelock {Number} The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
40
+ * @param validator_address {String} The validator's EVM address.
41
+ * @param reward_address {String} The EVM address to receive staking rewards.
42
+ */
43
+ function CoreStakeExtra(pool_type, timelock, validator_address, reward_address) {
44
+ _classCallCheck(this, CoreStakeExtra);
45
+ _BaseStakeExtra["default"].initialize(this, pool_type);
46
+ CoreStakeExtra.initialize(this, pool_type, timelock, validator_address, reward_address);
47
+ }
48
+
49
+ /**
50
+ * Initializes the fields of this object.
51
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
+ * Only for internal use.
53
+ */
54
+ return _createClass(CoreStakeExtra, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, pool_type, timelock, validator_address, reward_address) {
57
+ obj['pool_type'] = pool_type;
58
+ obj['timelock'] = timelock;
59
+ obj['validator_address'] = validator_address;
60
+ obj['reward_address'] = reward_address;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>CoreStakeExtra</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @param {module:model/CoreStakeExtra} obj Optional instance to populate.
68
+ * @return {module:model/CoreStakeExtra} The populated <code>CoreStakeExtra</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new CoreStakeExtra();
75
+ _BaseStakeExtra["default"].constructFromObject(data, obj);
76
+ if (data.hasOwnProperty('pool_type')) {
77
+ obj['pool_type'] = _StakingPoolType["default"].constructFromObject(data['pool_type']);
78
+ }
79
+ if (data.hasOwnProperty('timelock')) {
80
+ obj['timelock'] = _ApiClient["default"].convertToType(data['timelock'], 'Number');
81
+ }
82
+ if (data.hasOwnProperty('change_address')) {
83
+ obj['change_address'] = _ApiClient["default"].convertToType(data['change_address'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('validator_address')) {
86
+ obj['validator_address'] = _ApiClient["default"].convertToType(data['validator_address'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('reward_address')) {
89
+ obj['reward_address'] = _ApiClient["default"].convertToType(data['reward_address'], 'String');
90
+ }
91
+ }
92
+ return obj;
93
+ }
94
+
95
+ /**
96
+ * Validates the JSON data with respect to <code>CoreStakeExtra</code>.
97
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
98
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CoreStakeExtra</code>.
99
+ */
100
+ }, {
101
+ key: "validateJSON",
102
+ value: function validateJSON(data) {
103
+ // check to make sure all required properties are present in the JSON string
104
+ var _iterator = _createForOfIteratorHelper(CoreStakeExtra.RequiredProperties),
105
+ _step;
106
+ try {
107
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
108
+ var property = _step.value;
109
+ if (!data.hasOwnProperty(property)) {
110
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
111
+ }
112
+ }
113
+ // ensure the json data is a string
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ if (data['change_address'] && !(typeof data['change_address'] === 'string' || data['change_address'] instanceof String)) {
120
+ throw new Error("Expected the field `change_address` to be a primitive type in the JSON string but got " + data['change_address']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['validator_address'] && !(typeof data['validator_address'] === 'string' || data['validator_address'] instanceof String)) {
124
+ throw new Error("Expected the field `validator_address` to be a primitive type in the JSON string but got " + data['validator_address']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['reward_address'] && !(typeof data['reward_address'] === 'string' || data['reward_address'] instanceof String)) {
128
+ throw new Error("Expected the field `reward_address` to be a primitive type in the JSON string but got " + data['reward_address']);
129
+ }
130
+ return true;
131
+ }
132
+ }]);
133
+ }();
134
+ CoreStakeExtra.RequiredProperties = ["pool_type", "timelock", "validator_address", "reward_address"];
135
+
136
+ /**
137
+ * @member {module:model/StakingPoolType} pool_type
138
+ */
139
+ CoreStakeExtra.prototype['pool_type'] = undefined;
140
+
141
+ /**
142
+ * The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
143
+ * @member {Number} timelock
144
+ */
145
+ CoreStakeExtra.prototype['timelock'] = undefined;
146
+
147
+ /**
148
+ * The change address on the Bitcoin chain. If not provided, the source wallet's address will be used as the change address.
149
+ * @member {String} change_address
150
+ */
151
+ CoreStakeExtra.prototype['change_address'] = undefined;
152
+
153
+ /**
154
+ * The validator's EVM address.
155
+ * @member {String} validator_address
156
+ */
157
+ CoreStakeExtra.prototype['validator_address'] = undefined;
158
+
159
+ /**
160
+ * The EVM address to receive staking rewards.
161
+ * @member {String} reward_address
162
+ */
163
+ CoreStakeExtra.prototype['reward_address'] = undefined;
164
+
165
+ // Implement BaseStakeExtra interface:
166
+ /**
167
+ * @member {module:model/StakingPoolType} pool_type
168
+ */
169
+ _BaseStakeExtra["default"].prototype['pool_type'] = undefined;
170
+ var _default = exports["default"] = CoreStakeExtra;