@cobo/cobo-waas2 1.9.0 → 1.11.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 (148) hide show
  1. package/README.md +47 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +1 -1
  4. package/dist/api/DevelopersApi.js +7 -7
  5. package/dist/api/DevelopersWebhooksApi.js +8 -8
  6. package/dist/api/StakingsApi.js +412 -18
  7. package/dist/api/SwapsApi.js +360 -0
  8. package/dist/api/TransactionsApi.js +18 -18
  9. package/dist/api/TravelRuleApi.js +4 -4
  10. package/dist/api/WalletsApi.js +19 -19
  11. package/dist/api/WalletsExchangeWalletApi.js +1 -1
  12. package/dist/api/WalletsMPCWalletsApi.js +19 -19
  13. package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
  14. package/dist/index.js +213 -3
  15. package/dist/model/AddressesEventData.js +4 -4
  16. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  17. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  18. package/dist/model/BabylonAirdropPop.js +186 -0
  19. package/dist/model/BabylonAirdropRegistration.js +172 -0
  20. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  21. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  22. package/dist/model/BabylonRegistrationStatus.js +66 -0
  23. package/dist/model/BabylonStakingRegistration.js +185 -0
  24. package/dist/model/ChainInfo.js +2 -2
  25. package/dist/model/ContractCallDestination.js +42 -8
  26. package/dist/model/ContractCallDestinationType.js +5 -0
  27. package/dist/model/ContractCallSource.js +6 -0
  28. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  29. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  30. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  31. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  32. package/dist/model/CreateSwapActivityRequest.js +153 -0
  33. package/dist/model/CreateSwapQuote201Response.js +264 -0
  34. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  35. package/dist/model/EstimatedEvmEip1559FeeSlow.js +23 -0
  36. package/dist/model/EstimatedEvmLegacyFeeSlow.js +23 -0
  37. package/dist/model/ExtendedTokenInfo.js +3 -3
  38. package/dist/model/FeeReserved.js +87 -0
  39. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  40. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  41. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  42. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  43. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  44. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  45. package/dist/model/ListSwapActivities200Response.js +123 -0
  46. package/dist/model/MaxFeeAmount.js +1 -1
  47. package/dist/model/MessageSignSource.js +6 -0
  48. package/dist/model/MpcContractCallSource.js +16 -0
  49. package/dist/model/MpcMessageSignSource.js +16 -0
  50. package/dist/model/MpcSigningGroup.js +27 -4
  51. package/dist/model/MpcTransferSource.js +16 -0
  52. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  53. package/dist/model/SolContractCallAccount.js +133 -0
  54. package/dist/model/SolContractCallDestination.js +139 -0
  55. package/dist/model/SolContractCallInstruction.js +158 -0
  56. package/dist/model/StakingPoolId.js +30 -0
  57. package/dist/model/StakingPoolType.js +15 -0
  58. package/dist/model/SwapQuote.js +203 -0
  59. package/dist/model/TokenInfo.js +2 -2
  60. package/dist/model/TransactionDestination.js +45 -11
  61. package/dist/model/TransactionDestinationType.js +5 -0
  62. package/dist/model/TransactionFee.js +1 -1
  63. package/dist/model/TransactionFixedFee.js +2 -2
  64. package/dist/model/TransactionRawTxInfo.js +16 -0
  65. package/dist/model/TransactionRbfSource.js +6 -0
  66. package/dist/model/TransactionRequestFee.js +1 -1
  67. package/dist/model/TransactionRequestFixedFee.js +2 -2
  68. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  69. package/dist/model/TransactionSolContractAccount.js +106 -0
  70. package/dist/model/TransactionSolContractDestination.js +137 -0
  71. package/dist/model/TransactionSolContractInstruction.js +134 -0
  72. package/dist/model/TransactionTokeApproval.js +3 -3
  73. package/dist/model/TransactionUtxoChange.js +101 -0
  74. package/dist/model/TransferSource.js +6 -0
  75. package/dist/model/WebhookEventData.js +2 -2
  76. package/docs/AddressBooksApi.md +1 -1
  77. package/docs/AddressesEventData.md +1 -1
  78. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  79. package/docs/BabylonAirdropPop.md +14 -0
  80. package/docs/BabylonAirdropRegistration.md +16 -0
  81. package/docs/BabylonEligibleAirdrop.md +14 -0
  82. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  83. package/docs/BabylonRegistrationStatus.md +14 -0
  84. package/docs/BabylonStakingRegistration.md +17 -0
  85. package/docs/ChainInfo.md +1 -1
  86. package/docs/ContractCallDestination.md +1 -0
  87. package/docs/ContractCallDestinationType.md +2 -0
  88. package/docs/ContractCallSource.md +1 -0
  89. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  90. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  91. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  92. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  93. package/docs/CreateSwapActivityRequest.md +12 -0
  94. package/docs/CreateSwapQuote201Response.md +17 -0
  95. package/docs/CreateSwapQuoteRequest.md +13 -0
  96. package/docs/DevelopersApi.md +5 -5
  97. package/docs/DevelopersWebhooksApi.md +8 -8
  98. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -0
  99. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -0
  100. package/docs/ExtendedTokenInfo.md +1 -1
  101. package/docs/FeeReserved.md +9 -0
  102. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  103. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  104. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  105. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  106. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  107. package/docs/ListEnableTokenPairs200Response.md +10 -0
  108. package/docs/ListSwapActivities200Response.md +10 -0
  109. package/docs/MaxFeeAmount.md +1 -1
  110. package/docs/MessageSignSource.md +1 -0
  111. package/docs/MpcContractCallSource.md +1 -0
  112. package/docs/MpcMessageSignSource.md +1 -0
  113. package/docs/MpcSigningGroup.md +1 -1
  114. package/docs/MpcTransferSource.md +1 -0
  115. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  116. package/docs/SolContractCallAccount.md +11 -0
  117. package/docs/SolContractCallDestination.md +10 -0
  118. package/docs/SolContractCallInstruction.md +11 -0
  119. package/docs/StakingPoolId.md +12 -0
  120. package/docs/StakingPoolType.md +6 -0
  121. package/docs/StakingsApi.md +461 -13
  122. package/docs/SwapQuote.md +16 -0
  123. package/docs/SwapsApi.md +348 -0
  124. package/docs/TokenInfo.md +1 -1
  125. package/docs/TransactionDestination.md +1 -0
  126. package/docs/TransactionDestinationType.md +2 -0
  127. package/docs/TransactionFee.md +1 -1
  128. package/docs/TransactionFixedFee.md +1 -1
  129. package/docs/TransactionRawTxInfo.md +1 -0
  130. package/docs/TransactionRbfSource.md +1 -0
  131. package/docs/TransactionRequestFee.md +1 -1
  132. package/docs/TransactionRequestFixedFee.md +1 -1
  133. package/docs/TransactionRequestUtxoFee.md +1 -1
  134. package/docs/TransactionSolContractAccount.md +11 -0
  135. package/docs/TransactionSolContractDestination.md +10 -0
  136. package/docs/TransactionSolContractInstruction.md +11 -0
  137. package/docs/TransactionTokeApproval.md +1 -1
  138. package/docs/TransactionUtxoChange.md +10 -0
  139. package/docs/TransactionsApi.md +16 -16
  140. package/docs/TransferSource.md +1 -0
  141. package/docs/TravelRuleApi.md +4 -4
  142. package/docs/WalletsApi.md +16 -16
  143. package/docs/WalletsExchangeWalletApi.md +1 -1
  144. package/docs/WalletsMPCWalletsApi.md +19 -19
  145. package/docs/WalletsSmartContractWalletsApi.md +1 -1
  146. package/docs/WebhookEventData.md +1 -1
  147. package/package.json +2 -2
  148. package/docs/SwapSummary.md +0 -10
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _EvmEip1559FeeBasePrice = _interopRequireDefault(require("./EvmEip1559FeeBasePrice"));
9
9
  var _FeeGasLimit = _interopRequireDefault(require("./FeeGasLimit"));
10
+ var _FeeReserved = _interopRequireDefault(require("./FeeReserved"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
12
  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
13
  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; } } }; }
@@ -36,6 +37,7 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
36
37
  * @alias module:model/EstimatedEvmEip1559FeeSlow
37
38
  * @implements module:model/EvmEip1559FeeBasePrice
38
39
  * @implements module:model/FeeGasLimit
40
+ * @implements module:model/FeeReserved
39
41
  * @param max_fee_per_gas {String} The maximum gas fee per gas unit used on the chain, in wei.
40
42
  * @param max_priority_fee_per_gas {String} The maximum priority fee per gas unit used, in wei. The maximum priority fee represents the highest amount of miner tips that you are willing to pay for your transaction.
41
43
  * @param gas_limit {String} The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
@@ -44,6 +46,7 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
44
46
  _classCallCheck(this, EstimatedEvmEip1559FeeSlow);
45
47
  _EvmEip1559FeeBasePrice["default"].initialize(this);
46
48
  _FeeGasLimit["default"].initialize(this);
49
+ _FeeReserved["default"].initialize(this);
47
50
  EstimatedEvmEip1559FeeSlow.initialize(this, max_fee_per_gas, max_priority_fee_per_gas, gas_limit);
48
51
  }
49
52
 
@@ -74,6 +77,7 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
74
77
  obj = obj || new EstimatedEvmEip1559FeeSlow();
75
78
  _EvmEip1559FeeBasePrice["default"].constructFromObject(data, obj);
76
79
  _FeeGasLimit["default"].constructFromObject(data, obj);
80
+ _FeeReserved["default"].constructFromObject(data, obj);
77
81
  if (data.hasOwnProperty('max_fee_per_gas')) {
78
82
  obj['max_fee_per_gas'] = _ApiClient["default"].convertToType(data['max_fee_per_gas'], 'String');
79
83
  }
@@ -83,6 +87,9 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
83
87
  if (data.hasOwnProperty('gas_limit')) {
84
88
  obj['gas_limit'] = _ApiClient["default"].convertToType(data['gas_limit'], 'String');
85
89
  }
90
+ if (data.hasOwnProperty('reserved_fee')) {
91
+ obj['reserved_fee'] = _ApiClient["default"].convertToType(data['reserved_fee'], 'String');
92
+ }
86
93
  }
87
94
  return obj;
88
95
  }
@@ -122,6 +129,10 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
122
129
  if (data['gas_limit'] && !(typeof data['gas_limit'] === 'string' || data['gas_limit'] instanceof String)) {
123
130
  throw new Error("Expected the field `gas_limit` to be a primitive type in the JSON string but got " + data['gas_limit']);
124
131
  }
132
+ // ensure the json data is a string
133
+ if (data['reserved_fee'] && !(typeof data['reserved_fee'] === 'string' || data['reserved_fee'] instanceof String)) {
134
+ throw new Error("Expected the field `reserved_fee` to be a primitive type in the JSON string but got " + data['reserved_fee']);
135
+ }
125
136
  return true;
126
137
  }
127
138
  }]);
@@ -146,6 +157,12 @@ EstimatedEvmEip1559FeeSlow.prototype['max_priority_fee_per_gas'] = undefined;
146
157
  */
147
158
  EstimatedEvmEip1559FeeSlow.prototype['gas_limit'] = undefined;
148
159
 
160
+ /**
161
+ * The estimated fee required for submitting the transaction data to L1 (Layer 1), measured in wei.
162
+ * @member {String} reserved_fee
163
+ */
164
+ EstimatedEvmEip1559FeeSlow.prototype['reserved_fee'] = undefined;
165
+
149
166
  // Implement EvmEip1559FeeBasePrice interface:
150
167
  /**
151
168
  * The maximum gas fee per gas unit used on the chain, in wei.
@@ -163,4 +180,10 @@ _EvmEip1559FeeBasePrice["default"].prototype['max_priority_fee_per_gas'] = undef
163
180
  * @member {String} gas_limit
164
181
  */
165
182
  _FeeGasLimit["default"].prototype['gas_limit'] = undefined;
183
+ // Implement FeeReserved interface:
184
+ /**
185
+ * The estimated fee required for submitting the transaction data to L1 (Layer 1), measured in wei.
186
+ * @member {String} reserved_fee
187
+ */
188
+ _FeeReserved["default"].prototype['reserved_fee'] = undefined;
166
189
  var _default = exports["default"] = EstimatedEvmEip1559FeeSlow;
@@ -7,6 +7,7 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _EvmLegacyFeeBasePrice = _interopRequireDefault(require("./EvmLegacyFeeBasePrice"));
9
9
  var _FeeGasLimit = _interopRequireDefault(require("./FeeGasLimit"));
10
+ var _FeeReserved = _interopRequireDefault(require("./FeeReserved"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
12
  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
13
  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; } } }; }
@@ -36,6 +37,7 @@ var EstimatedEvmLegacyFeeSlow = /*#__PURE__*/function () {
36
37
  * @alias module:model/EstimatedEvmLegacyFeeSlow
37
38
  * @implements module:model/EvmLegacyFeeBasePrice
38
39
  * @implements module:model/FeeGasLimit
40
+ * @implements module:model/FeeReserved
39
41
  * @param gas_price {String} The gas price, in wei. The gas price represents the amount of ETH that must be paid to validators for processing transactions per gas unit used.
40
42
  * @param gas_limit {String} The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
41
43
  */
@@ -43,6 +45,7 @@ var EstimatedEvmLegacyFeeSlow = /*#__PURE__*/function () {
43
45
  _classCallCheck(this, EstimatedEvmLegacyFeeSlow);
44
46
  _EvmLegacyFeeBasePrice["default"].initialize(this);
45
47
  _FeeGasLimit["default"].initialize(this);
48
+ _FeeReserved["default"].initialize(this);
46
49
  EstimatedEvmLegacyFeeSlow.initialize(this, gas_price, gas_limit);
47
50
  }
48
51
 
@@ -72,12 +75,16 @@ var EstimatedEvmLegacyFeeSlow = /*#__PURE__*/function () {
72
75
  obj = obj || new EstimatedEvmLegacyFeeSlow();
73
76
  _EvmLegacyFeeBasePrice["default"].constructFromObject(data, obj);
74
77
  _FeeGasLimit["default"].constructFromObject(data, obj);
78
+ _FeeReserved["default"].constructFromObject(data, obj);
75
79
  if (data.hasOwnProperty('gas_price')) {
76
80
  obj['gas_price'] = _ApiClient["default"].convertToType(data['gas_price'], 'String');
77
81
  }
78
82
  if (data.hasOwnProperty('gas_limit')) {
79
83
  obj['gas_limit'] = _ApiClient["default"].convertToType(data['gas_limit'], 'String');
80
84
  }
85
+ if (data.hasOwnProperty('reserved_fee')) {
86
+ obj['reserved_fee'] = _ApiClient["default"].convertToType(data['reserved_fee'], 'String');
87
+ }
81
88
  }
82
89
  return obj;
83
90
  }
@@ -113,6 +120,10 @@ var EstimatedEvmLegacyFeeSlow = /*#__PURE__*/function () {
113
120
  if (data['gas_limit'] && !(typeof data['gas_limit'] === 'string' || data['gas_limit'] instanceof String)) {
114
121
  throw new Error("Expected the field `gas_limit` to be a primitive type in the JSON string but got " + data['gas_limit']);
115
122
  }
123
+ // ensure the json data is a string
124
+ if (data['reserved_fee'] && !(typeof data['reserved_fee'] === 'string' || data['reserved_fee'] instanceof String)) {
125
+ throw new Error("Expected the field `reserved_fee` to be a primitive type in the JSON string but got " + data['reserved_fee']);
126
+ }
116
127
  return true;
117
128
  }
118
129
  }]);
@@ -131,6 +142,12 @@ EstimatedEvmLegacyFeeSlow.prototype['gas_price'] = undefined;
131
142
  */
132
143
  EstimatedEvmLegacyFeeSlow.prototype['gas_limit'] = undefined;
133
144
 
145
+ /**
146
+ * The estimated fee required for submitting the transaction data to L1 (Layer 1), measured in wei.
147
+ * @member {String} reserved_fee
148
+ */
149
+ EstimatedEvmLegacyFeeSlow.prototype['reserved_fee'] = undefined;
150
+
134
151
  // Implement EvmLegacyFeeBasePrice interface:
135
152
  /**
136
153
  * The gas price, in wei. The gas price represents the amount of ETH that must be paid to validators for processing transactions per gas unit used.
@@ -143,4 +160,10 @@ _EvmLegacyFeeBasePrice["default"].prototype['gas_price'] = undefined;
143
160
  * @member {String} gas_limit
144
161
  */
145
162
  _FeeGasLimit["default"].prototype['gas_limit'] = undefined;
163
+ // Implement FeeReserved interface:
164
+ /**
165
+ * The estimated fee required for submitting the transaction data to L1 (Layer 1), measured in wei.
166
+ * @member {String} reserved_fee
167
+ */
168
+ _FeeReserved["default"].prototype['reserved_fee'] = undefined;
146
169
  var _default = exports["default"] = EstimatedEvmLegacyFeeSlow;
@@ -36,7 +36,7 @@ var ExtendedTokenInfo = /*#__PURE__*/function () {
36
36
  * The token information, including whether the token can be deposited or withdrawn.
37
37
  * @alias module:model/ExtendedTokenInfo
38
38
  * @implements module:model/TokenInfo
39
- * @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
39
+ * @param token_id {String} The token ID, which is the unique identifier of a token.
40
40
  * @param chain_id {String} The ID of the chain on which the token operates.
41
41
  */
42
42
  function ExtendedTokenInfo(token_id, chain_id) {
@@ -186,7 +186,7 @@ var ExtendedTokenInfo = /*#__PURE__*/function () {
186
186
  ExtendedTokenInfo.RequiredProperties = ["token_id", "chain_id"];
187
187
 
188
188
  /**
189
- * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
189
+ * The token ID, which is the unique identifier of a token.
190
190
  * @member {String} token_id
191
191
  */
192
192
  ExtendedTokenInfo.prototype['token_id'] = undefined;
@@ -272,7 +272,7 @@ ExtendedTokenInfo.prototype['asset_model_type'] = undefined;
272
272
 
273
273
  // Implement TokenInfo interface:
274
274
  /**
275
- * The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
275
+ * The token ID, which is the unique identifier of a token.
276
276
  * @member {String} token_id
277
277
  */
278
278
  _TokenInfo["default"].prototype['token_id'] = undefined;
@@ -0,0 +1,87 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: help@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The FeeReserved model module.
26
+ * @module model/FeeReserved
27
+ */
28
+ var FeeReserved = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>FeeReserved</code>.
31
+ * @alias module:model/FeeReserved
32
+ */
33
+ function FeeReserved() {
34
+ _classCallCheck(this, FeeReserved);
35
+ FeeReserved.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(FeeReserved, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>FeeReserved</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/FeeReserved} obj Optional instance to populate.
52
+ * @return {module:model/FeeReserved} The populated <code>FeeReserved</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new FeeReserved();
59
+ if (data.hasOwnProperty('reserved_fee')) {
60
+ obj['reserved_fee'] = _ApiClient["default"].convertToType(data['reserved_fee'], 'String');
61
+ }
62
+ }
63
+ return obj;
64
+ }
65
+
66
+ /**
67
+ * Validates the JSON data with respect to <code>FeeReserved</code>.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>FeeReserved</code>.
70
+ */
71
+ }, {
72
+ key: "validateJSON",
73
+ value: function validateJSON(data) {
74
+ // ensure the json data is a string
75
+ if (data['reserved_fee'] && !(typeof data['reserved_fee'] === 'string' || data['reserved_fee'] instanceof String)) {
76
+ throw new Error("Expected the field `reserved_fee` to be a primitive type in the JSON string but got " + data['reserved_fee']);
77
+ }
78
+ return true;
79
+ }
80
+ }]);
81
+ }();
82
+ /**
83
+ * The estimated fee required for submitting the transaction data to L1 (Layer 1), measured in wei.
84
+ * @member {String} reserved_fee
85
+ */
86
+ FeeReserved.prototype['reserved_fee'] = undefined;
87
+ var _default = exports["default"] = FeeReserved;
@@ -0,0 +1,123 @@
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 _BabylonAirdropRegistration = _interopRequireDefault(require("./BabylonAirdropRegistration"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
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 ListBabylonAirdropRegistrations200Response model module.
31
+ * @module model/ListBabylonAirdropRegistrations200Response
32
+ */
33
+ var ListBabylonAirdropRegistrations200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListBabylonAirdropRegistrations200Response</code>.
36
+ * @alias module:model/ListBabylonAirdropRegistrations200Response
37
+ */
38
+ function ListBabylonAirdropRegistrations200Response() {
39
+ _classCallCheck(this, ListBabylonAirdropRegistrations200Response);
40
+ ListBabylonAirdropRegistrations200Response.initialize(this);
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(ListBabylonAirdropRegistrations200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListBabylonAirdropRegistrations200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListBabylonAirdropRegistrations200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListBabylonAirdropRegistrations200Response} The populated <code>ListBabylonAirdropRegistrations200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListBabylonAirdropRegistrations200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BabylonAirdropRegistration["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListBabylonAirdropRegistrations200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonAirdropRegistrations200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _BabylonAirdropRegistration["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/BabylonAirdropRegistration>} data
116
+ */
117
+ ListBabylonAirdropRegistrations200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListBabylonAirdropRegistrations200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListBabylonAirdropRegistrations200Response;
@@ -0,0 +1,123 @@
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 _BabylonEligibleAirdrop = _interopRequireDefault(require("./BabylonEligibleAirdrop"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
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 ListBabylonEligibleAirdrops200Response model module.
31
+ * @module model/ListBabylonEligibleAirdrops200Response
32
+ */
33
+ var ListBabylonEligibleAirdrops200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListBabylonEligibleAirdrops200Response</code>.
36
+ * @alias module:model/ListBabylonEligibleAirdrops200Response
37
+ */
38
+ function ListBabylonEligibleAirdrops200Response() {
39
+ _classCallCheck(this, ListBabylonEligibleAirdrops200Response);
40
+ ListBabylonEligibleAirdrops200Response.initialize(this);
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(ListBabylonEligibleAirdrops200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListBabylonEligibleAirdrops200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListBabylonEligibleAirdrops200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListBabylonEligibleAirdrops200Response} The populated <code>ListBabylonEligibleAirdrops200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListBabylonEligibleAirdrops200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BabylonEligibleAirdrop["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListBabylonEligibleAirdrops200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonEligibleAirdrops200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _BabylonEligibleAirdrop["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/BabylonEligibleAirdrop>} data
116
+ */
117
+ ListBabylonEligibleAirdrops200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListBabylonEligibleAirdrops200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListBabylonEligibleAirdrops200Response;
@@ -0,0 +1,123 @@
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 _ListBabylonEligibleStakings200ResponseDataInner = _interopRequireDefault(require("./ListBabylonEligibleStakings200ResponseDataInner"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
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 ListBabylonEligibleStakings200Response model module.
31
+ * @module model/ListBabylonEligibleStakings200Response
32
+ */
33
+ var ListBabylonEligibleStakings200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListBabylonEligibleStakings200Response</code>.
36
+ * @alias module:model/ListBabylonEligibleStakings200Response
37
+ */
38
+ function ListBabylonEligibleStakings200Response() {
39
+ _classCallCheck(this, ListBabylonEligibleStakings200Response);
40
+ ListBabylonEligibleStakings200Response.initialize(this);
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(ListBabylonEligibleStakings200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListBabylonEligibleStakings200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListBabylonEligibleStakings200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListBabylonEligibleStakings200Response} The populated <code>ListBabylonEligibleStakings200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListBabylonEligibleStakings200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListBabylonEligibleStakings200ResponseDataInner["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListBabylonEligibleStakings200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonEligibleStakings200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _ListBabylonEligibleStakings200ResponseDataInner["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/ListBabylonEligibleStakings200ResponseDataInner>} data
116
+ */
117
+ ListBabylonEligibleStakings200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListBabylonEligibleStakings200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListBabylonEligibleStakings200Response;