@cobo/cobo-waas2 1.5.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 (166) hide show
  1. package/README.md +31 -5
  2. package/dist/ApiClient.js +56 -6
  3. package/dist/ServerDemo.js +80 -0
  4. package/dist/api/DevelopersApi.js +79 -0
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/OAuthApi.js +8 -8
  7. package/dist/api/StakingsApi.js +91 -7
  8. package/dist/api/TransactionsApi.js +4 -4
  9. package/dist/api/WalletsApi.js +58 -57
  10. package/dist/crypto/Ed25519Signer.js +36 -0
  11. package/dist/crypto/Secp256k1Signer.js +36 -0
  12. package/dist/index.js +153 -13
  13. package/dist/model/Activity.js +4 -8
  14. package/dist/model/ActivityAction.js +20 -0
  15. package/dist/model/ActivityType.js +5 -0
  16. package/dist/model/AddressTransferDestination.js +2 -2
  17. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
  18. package/dist/model/AutoFuelType.js +61 -0
  19. package/dist/model/BabylonStakeEstimatedFee.js +118 -0
  20. package/dist/model/BabylonValidator.js +9 -12
  21. package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
  22. package/dist/model/ContractCallParams.js +9 -0
  23. package/dist/model/CoreStakeExtra.js +170 -0
  24. package/dist/model/CoreStakingExtra.js +187 -0
  25. package/dist/model/CreateClaimActivity.js +139 -0
  26. package/dist/model/CreateClaimActivityRequest.js +182 -0
  27. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  28. package/dist/model/CreateStakeActivity.js +4 -8
  29. package/dist/model/CreateStakeActivityExtra.js +94 -8
  30. package/dist/model/CreateStakeActivityRequest.js +5 -10
  31. package/dist/model/CreateUnstakeActivity.js +16 -0
  32. package/dist/model/CreateUnstakeActivityExtra.js +159 -0
  33. package/dist/model/CreateUnstakeActivityRequest.js +20 -0
  34. package/dist/model/CreateWithdrawActivity.js +0 -13
  35. package/dist/model/CreateWithdrawActivityRequest.js +0 -18
  36. package/dist/model/EstimateClaimFee.js +145 -0
  37. package/dist/model/EstimateContractCallFeeParams.js +6 -8
  38. package/dist/model/EstimateFeeParams.js +1 -1
  39. package/dist/model/EstimateStakeFee.js +5 -10
  40. package/dist/model/EstimateTransferFeeParams.js +4 -8
  41. package/dist/model/EstimateUnstakeFee.js +20 -0
  42. package/dist/model/EstimateWithdrawFee.js +0 -18
  43. package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
  44. package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
  45. package/dist/model/EstimatedFee.js +1 -1
  46. package/dist/model/EstimatedFixedFee.js +4 -4
  47. package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
  48. package/dist/model/EthStakeEstimatedFee.js +112 -0
  49. package/dist/model/EthStakeExtra.js +131 -0
  50. package/dist/model/EthStakingExtra.js +162 -0
  51. package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
  52. package/dist/model/EthUnstakeExtra.js +131 -0
  53. package/dist/model/FeeAmount.js +1 -1
  54. package/dist/model/FeeGasLimit.js +1 -2
  55. package/dist/model/FeeRate.js +1 -1
  56. package/dist/model/FixedFeeRate.js +2 -2
  57. package/dist/model/GetApiKeyInfo200Response.js +251 -0
  58. package/dist/model/GetStakingEstimationFee201Response.js +144 -43
  59. package/dist/model/GetStakingEstimationFeeRequest.js +41 -19
  60. package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
  61. package/dist/model/GetToken4XXResponse.js +12 -10
  62. package/dist/model/MPCDelegate.js +1 -1
  63. package/dist/model/MPCProject.js +4 -4
  64. package/dist/model/MpcTransferSource.js +2 -2
  65. package/dist/model/Pagination.js +2 -2
  66. package/dist/model/{RefreshToken201Response.js → RefreshToken2XXResponse.js} +21 -21
  67. package/dist/model/RoleScopes.js +128 -0
  68. package/dist/model/Scopes.js +142 -0
  69. package/dist/model/SmartContractWalletInfo.js +1 -1
  70. package/dist/model/StakingPoolId.js +81 -0
  71. package/dist/model/StakingPoolType.js +10 -0
  72. package/dist/model/Stakings.js +10 -14
  73. package/dist/model/StakingsExtra.js +95 -8
  74. package/dist/model/TransactionEvmEip1559Fee.js +2 -4
  75. package/dist/model/TransactionEvmLegacyFee.js +2 -4
  76. package/dist/model/TransactionFee.js +1 -2
  77. package/dist/model/TransactionRbf.js +9 -0
  78. package/dist/model/TransactionRbfSource.js +1 -1
  79. package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -3
  80. package/dist/model/TransactionRequestEvmLegacyFee.js +2 -3
  81. package/dist/model/TransactionRequestFee.js +1 -2
  82. package/dist/model/TransactionRequestFixedFee.js +1 -1
  83. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  84. package/dist/model/TransactionSource.js +1 -1
  85. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
  86. package/dist/model/TransferDestination.js +2 -2
  87. package/dist/model/TransferParams.js +9 -0
  88. package/docs/Activity.md +1 -1
  89. package/docs/ActivityAction.md +8 -0
  90. package/docs/ActivityType.md +2 -0
  91. package/docs/AddressTransferDestination.md +2 -2
  92. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
  93. package/docs/AutoFuelType.md +12 -0
  94. package/docs/BabylonStakeEstimatedFee.md +12 -0
  95. package/docs/BabylonValidator.md +6 -4
  96. package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
  97. package/docs/ContractCallParams.md +1 -0
  98. package/docs/CoreStakeExtra.md +13 -0
  99. package/docs/CoreStakingExtra.md +14 -0
  100. package/docs/CreateClaimActivity.md +11 -0
  101. package/docs/CreateClaimActivityRequest.md +12 -0
  102. package/docs/CreateStakeActivity.md +1 -1
  103. package/docs/CreateStakeActivityExtra.md +5 -0
  104. package/docs/CreateStakeActivityRequest.md +1 -1
  105. package/docs/CreateUnstakeActivity.md +1 -0
  106. package/docs/CreateUnstakeActivityExtra.md +10 -0
  107. package/docs/CreateUnstakeActivityRequest.md +1 -0
  108. package/docs/CreateWithdrawActivity.md +0 -1
  109. package/docs/CreateWithdrawActivityRequest.md +0 -1
  110. package/docs/DevelopersApi.md +55 -0
  111. package/docs/DevelopersWebhooksApi.md +1 -1
  112. package/docs/EstimateClaimFee.md +11 -0
  113. package/docs/EstimateContractCallFeeParams.md +2 -2
  114. package/docs/EstimateFeeParams.md +2 -2
  115. package/docs/EstimateStakeFee.md +1 -1
  116. package/docs/EstimateTransferFeeParams.md +2 -2
  117. package/docs/EstimateUnstakeFee.md +1 -0
  118. package/docs/EstimateWithdrawFee.md +0 -1
  119. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
  120. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
  121. package/docs/EstimatedFee.md +1 -1
  122. package/docs/EstimatedFixedFee.md +1 -1
  123. package/docs/EstimatedUtxoFeeSlow.md +1 -1
  124. package/docs/EthStakeEstimatedFee.md +11 -0
  125. package/docs/EthStakeExtra.md +10 -0
  126. package/docs/EthStakingExtra.md +11 -0
  127. package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
  128. package/docs/EthUnstakeExtra.md +10 -0
  129. package/docs/FeeAmount.md +1 -1
  130. package/docs/FeeGasLimit.md +1 -1
  131. package/docs/FeeRate.md +1 -1
  132. package/docs/FixedFeeRate.md +1 -1
  133. package/docs/GetApiKeyInfo200Response.md +30 -0
  134. package/docs/GetStakingEstimationFee201Response.md +3 -0
  135. package/docs/GetStakingEstimationFeeRequest.md +3 -4
  136. package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
  137. package/docs/GetToken4XXResponse.md +1 -1
  138. package/docs/MPCProject.md +1 -1
  139. package/docs/MpcTransferSource.md +1 -1
  140. package/docs/OAuthApi.md +4 -4
  141. package/docs/Pagination.md +1 -1
  142. package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -4
  143. package/docs/{RefreshToken201Response.md → RefreshToken2XXResponse.md} +1 -1
  144. package/docs/RoleScopes.md +10 -0
  145. package/docs/Scopes.md +13 -0
  146. package/docs/StakingPoolId.md +20 -0
  147. package/docs/StakingPoolType.md +4 -0
  148. package/docs/Stakings.md +2 -2
  149. package/docs/StakingsApi.md +108 -2
  150. package/docs/StakingsExtra.md +5 -0
  151. package/docs/TransactionEvmEip1559Fee.md +1 -1
  152. package/docs/TransactionEvmLegacyFee.md +1 -1
  153. package/docs/TransactionFee.md +1 -1
  154. package/docs/TransactionRbf.md +1 -0
  155. package/docs/TransactionRbfSource.md +1 -1
  156. package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
  157. package/docs/TransactionRequestEvmLegacyFee.md +1 -1
  158. package/docs/TransactionRequestFee.md +1 -1
  159. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
  160. package/docs/TransactionsApi.md +2 -2
  161. package/docs/TransferDestination.md +2 -2
  162. package/docs/TransferParams.md +1 -0
  163. package/docs/WalletsApi.md +54 -54
  164. package/package.json +4 -2
  165. package/dist/model/StakingsValidatorInfo.js +0 -140
  166. package/docs/StakingsValidatorInfo.md +0 -13
@@ -0,0 +1,118 @@
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 _FeeType = _interopRequireDefault(require("./FeeType"));
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ 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); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ 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); } /**
17
+ * Cobo Wallet as a Service 2.0
18
+ *
19
+ * Contact: help@cobo.com
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The BabylonStakeEstimatedFee model module.
28
+ * @module model/BabylonStakeEstimatedFee
29
+ */
30
+ var BabylonStakeEstimatedFee = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>BabylonStakeEstimatedFee</code>.
33
+ * @alias module:model/BabylonStakeEstimatedFee
34
+ */
35
+ function BabylonStakeEstimatedFee() {
36
+ _classCallCheck(this, BabylonStakeEstimatedFee);
37
+ BabylonStakeEstimatedFee.initialize(this);
38
+ }
39
+
40
+ /**
41
+ * Initializes the fields of this object.
42
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
43
+ * Only for internal use.
44
+ */
45
+ return _createClass(BabylonStakeEstimatedFee, null, [{
46
+ key: "initialize",
47
+ value: function initialize(obj) {}
48
+
49
+ /**
50
+ * Constructs a <code>BabylonStakeEstimatedFee</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
52
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
53
+ * @param {module:model/BabylonStakeEstimatedFee} obj Optional instance to populate.
54
+ * @return {module:model/BabylonStakeEstimatedFee} The populated <code>BabylonStakeEstimatedFee</code> instance.
55
+ */
56
+ }, {
57
+ key: "constructFromObject",
58
+ value: function constructFromObject(data, obj) {
59
+ if (data) {
60
+ obj = obj || new BabylonStakeEstimatedFee();
61
+ if (data.hasOwnProperty('pool_type')) {
62
+ obj['pool_type'] = _StakingPoolType["default"].constructFromObject(data['pool_type']);
63
+ }
64
+ if (data.hasOwnProperty('fee_type')) {
65
+ obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
66
+ }
67
+ if (data.hasOwnProperty('fee_amount')) {
68
+ obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('token_id')) {
71
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>BabylonStakeEstimatedFee</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonStakeEstimatedFee</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // ensure the json data is a string
86
+ if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
87
+ throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
88
+ }
89
+ // ensure the json data is a string
90
+ if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
91
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
92
+ }
93
+ return true;
94
+ }
95
+ }]);
96
+ }();
97
+ /**
98
+ * @member {module:model/StakingPoolType} pool_type
99
+ */
100
+ BabylonStakeEstimatedFee.prototype['pool_type'] = undefined;
101
+
102
+ /**
103
+ * @member {module:model/FeeType} fee_type
104
+ */
105
+ BabylonStakeEstimatedFee.prototype['fee_type'] = undefined;
106
+
107
+ /**
108
+ * The amount of the estimated fee.
109
+ * @member {String} fee_amount
110
+ */
111
+ BabylonStakeEstimatedFee.prototype['fee_amount'] = undefined;
112
+
113
+ /**
114
+ * The token ID of the staking fee.
115
+ * @member {String} token_id
116
+ */
117
+ BabylonStakeEstimatedFee.prototype['token_id'] = undefined;
118
+ var _default = exports["default"] = BabylonStakeEstimatedFee;
@@ -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
@@ -210,6 +202,11 @@ BabylonValidator['SupportedPosChainsEnum'] = {
210
202
  * @const
211
203
  */
212
204
  "Cosmos": "Cosmos",
205
+ /**
206
+ * value: "Ethereum"
207
+ * @const
208
+ */
209
+ "Ethereum": "Ethereum",
213
210
  /**
214
211
  * value: "unknown_default_open_api"
215
212
  * @const
@@ -0,0 +1,121 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The CheckAddressChainsValidity200ResponseInner model module.
29
+ * @module model/CheckAddressChainsValidity200ResponseInner
30
+ */
31
+ var CheckAddressChainsValidity200ResponseInner = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CheckAddressChainsValidity200ResponseInner</code>.
34
+ * @alias module:model/CheckAddressChainsValidity200ResponseInner
35
+ * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain.
36
+ * @param validity {Boolean} Whether the address is valid for the specified chain. - `true`: The address is valid. - `false`: The address is invalid.
37
+ */
38
+ function CheckAddressChainsValidity200ResponseInner(chain_id, validity) {
39
+ _classCallCheck(this, CheckAddressChainsValidity200ResponseInner);
40
+ CheckAddressChainsValidity200ResponseInner.initialize(this, chain_id, validity);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(CheckAddressChainsValidity200ResponseInner, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, chain_id, validity) {
51
+ obj['chain_id'] = chain_id;
52
+ obj['validity'] = validity;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>CheckAddressChainsValidity200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/CheckAddressChainsValidity200ResponseInner} obj Optional instance to populate.
60
+ * @return {module:model/CheckAddressChainsValidity200ResponseInner} The populated <code>CheckAddressChainsValidity200ResponseInner</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new CheckAddressChainsValidity200ResponseInner();
67
+ if (data.hasOwnProperty('chain_id')) {
68
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('validity')) {
71
+ obj['validity'] = _ApiClient["default"].convertToType(data['validity'], 'Boolean');
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>CheckAddressChainsValidity200ResponseInner</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CheckAddressChainsValidity200ResponseInner</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // check to make sure all required properties are present in the JSON string
86
+ var _iterator = _createForOfIteratorHelper(CheckAddressChainsValidity200ResponseInner.RequiredProperties),
87
+ _step;
88
+ try {
89
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
90
+ var property = _step.value;
91
+ if (!data.hasOwnProperty(property)) {
92
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
93
+ }
94
+ }
95
+ // ensure the json data is a string
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
102
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
103
+ }
104
+ return true;
105
+ }
106
+ }]);
107
+ }();
108
+ CheckAddressChainsValidity200ResponseInner.RequiredProperties = ["chain_id", "validity"];
109
+
110
+ /**
111
+ * The chain ID, which is the unique identifier of a blockchain.
112
+ * @member {String} chain_id
113
+ */
114
+ CheckAddressChainsValidity200ResponseInner.prototype['chain_id'] = undefined;
115
+
116
+ /**
117
+ * Whether the address is valid for the specified chain. - `true`: The address is valid. - `false`: The address is invalid.
118
+ * @member {Boolean} validity
119
+ */
120
+ CheckAddressChainsValidity200ResponseInner.prototype['validity'] = undefined;
121
+ var _default = exports["default"] = CheckAddressChainsValidity200ResponseInner;
@@ -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;