@cobo/cobo-waas2 1.1.1 → 1.2.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 (183) hide show
  1. package/README.md +16 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/OAuthApi.js +16 -15
  4. package/dist/api/TransactionsApi.js +18 -18
  5. package/dist/api/WalletsApi.js +123 -12
  6. package/dist/api/WalletsExchangeWalletApi.js +254 -0
  7. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  8. package/dist/index.js +56 -0
  9. package/dist/model/Activity.js +3 -1
  10. package/dist/model/AddressInfo.js +1 -1
  11. package/dist/model/AddressTransferDestination.js +6 -4
  12. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  13. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  14. package/dist/model/AssetBalance.js +3 -1
  15. package/dist/model/AssetInfo.js +2 -2
  16. package/dist/model/BabylonStakeExtra.js +9 -0
  17. package/dist/model/CheckAddressValidity200Response.js +2 -2
  18. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  19. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  20. package/dist/model/CoboSafeDelegate.js +3 -3
  21. package/dist/model/ContractCallDestination.js +4 -4
  22. package/dist/model/ContractCallParams.js +9 -3
  23. package/dist/model/ContractCallSource.js +6 -6
  24. package/dist/model/CreateSafeWalletParams.js +3 -1
  25. package/dist/model/CreateSmartContractWalletParams.js +3 -3
  26. package/dist/model/CreateStakeActivity.js +23 -4
  27. package/dist/model/CreateStakeActivityExtra.js +15 -9
  28. package/dist/model/CreateTssRequestRequest.js +16 -1
  29. package/dist/model/CreateUnstakeActivity.js +16 -1
  30. package/dist/model/CreateWalletParams.js +9 -9
  31. package/dist/model/CreateWithdrawActivity.js +16 -1
  32. package/dist/model/CreatedWalletInfo.js +21 -9
  33. package/dist/model/EstimateContractCallFeeParams.js +6 -2
  34. package/dist/model/EstimateFeeParams.js +6 -6
  35. package/dist/model/EstimateStakeFee.js +28 -4
  36. package/dist/model/EstimateTransferFeeParams.js +6 -2
  37. package/dist/model/EstimateUnstakeFee.js +21 -1
  38. package/dist/model/EstimateWithdrawFee.js +21 -1
  39. package/dist/model/EstimatedEvmEip1559Fee.js +9 -3
  40. package/dist/model/EstimatedEvmLegacyFee.js +9 -3
  41. package/dist/model/EstimatedFee.js +12 -12
  42. package/dist/model/EstimatedUtxoFee.js +9 -3
  43. package/dist/model/EvmContractCallDestination.js +1 -1
  44. package/dist/model/EvmEip1559FeeRate.js +9 -3
  45. package/dist/model/EvmLegacyFeeRate.js +9 -3
  46. package/dist/model/ExchangeId.js +5 -0
  47. package/dist/model/ExchangeTransferDestination.js +16 -16
  48. package/dist/model/ExchangeTransferSource.js +14 -14
  49. package/dist/model/FeeRate.js +12 -12
  50. package/dist/model/GetToken200Response.js +4 -4
  51. package/dist/model/KeyShareHolder.js +13 -0
  52. package/dist/model/ListAddresses200Response.js +3 -1
  53. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  54. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  55. package/dist/model/ListKeyShareHolderGroups200Response.js +3 -1
  56. package/dist/model/ListMpcProjects200Response.js +3 -1
  57. package/dist/model/ListMpcVaults200Response.js +3 -1
  58. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  59. package/dist/model/ListSupportedChains200Response.js +3 -1
  60. package/dist/model/ListSupportedTokens200Response.js +3 -1
  61. package/dist/model/ListTokenBalancesForAddress200Response.js +3 -1
  62. package/dist/model/ListTransactions200Response.js +3 -1
  63. package/dist/model/ListTssRequests200Response.js +3 -1
  64. package/dist/model/ListUtxos200Response.js +3 -1
  65. package/dist/model/ListWallets200Response.js +3 -1
  66. package/dist/model/ListWebhookEndpoints200Response.js +3 -1
  67. package/dist/model/ListWebhookEventLogs200Response.js +3 -1
  68. package/dist/model/ListWebhookEvents200Response.js +3 -1
  69. package/dist/model/MPCWalletInfo.js +26 -0
  70. package/dist/model/MaxTransferableValue.js +3 -1
  71. package/dist/model/MessageSignDestination.js +6 -6
  72. package/dist/model/MessageSignParams.js +6 -2
  73. package/dist/model/MessageSignSource.js +3 -3
  74. package/dist/model/PoolDetailsAllOfValidatorsInfo.js +6 -6
  75. package/dist/model/RefreshToken200Response.js +135 -0
  76. package/dist/model/RefreshTokenRequest.js +2 -2
  77. package/dist/model/SafeContractCallSource.js +3 -1
  78. package/dist/model/SafeTransferSource.js +3 -1
  79. package/dist/model/SafeWallet.js +3 -1
  80. package/dist/model/SmartContractWalletInfo.js +3 -3
  81. package/dist/model/SmartContractWalletType.js +2 -2
  82. package/dist/model/StakingSource.js +6 -6
  83. package/dist/model/Stakings.js +3 -1
  84. package/dist/model/SubWalletAssetBalance.js +13 -11
  85. package/dist/model/TSSRequest.js +26 -2
  86. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  87. package/dist/model/TokenBalance.js +3 -1
  88. package/dist/model/Transaction.js +21 -7
  89. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  90. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  91. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  92. package/dist/model/TransactionDestination.js +26 -26
  93. package/dist/model/TransactionDetail.js +21 -7
  94. package/dist/model/TransactionDetails.js +24 -8
  95. package/dist/model/TransactionEvmContractDestination.js +1 -1
  96. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  97. package/dist/model/TransactionFee.js +12 -12
  98. package/dist/model/TransactionMPCWalletSource.js +13 -0
  99. package/dist/model/TransactionRbf.js +6 -2
  100. package/dist/model/TransactionRbfSource.js +3 -3
  101. package/dist/model/TransactionRequestFee.js +12 -12
  102. package/dist/model/TransactionResult.js +3 -3
  103. package/dist/model/TransactionSmartContractSafeWalletSource.js +3 -1
  104. package/dist/model/TransactionSource.js +29 -23
  105. package/dist/model/TransactionSubStatus.js +5 -0
  106. package/dist/model/TransactionTransferToAddressDestination.js +3 -1
  107. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  108. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  109. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  110. package/dist/model/TransactionWebhookEventData.js +29 -10
  111. package/dist/model/TransferDestination.js +12 -12
  112. package/dist/model/TransferParams.js +11 -5
  113. package/dist/model/TransferSource.js +15 -15
  114. package/dist/model/UpdateWalletParams.js +12 -12
  115. package/dist/model/UtxoFeeRate.js +9 -3
  116. package/dist/model/WalletInfo.js +24 -12
  117. package/dist/model/WebhookEvent.js +3 -1
  118. package/dist/model/WebhookEventData.js +52 -18
  119. package/dist/model/WebhookEventDataType.js +7 -2
  120. package/dist/model/WebhookEventLog.js +3 -1
  121. package/dist/model/WebhookEventType.js +24 -4
  122. package/docs/AddressInfo.md +1 -1
  123. package/docs/AddressTransferDestination.md +2 -2
  124. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  125. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  126. package/docs/AssetInfo.md +1 -1
  127. package/docs/BabylonStakeExtra.md +1 -0
  128. package/docs/CheckAddressValidity200Response.md +1 -1
  129. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  130. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  131. package/docs/ContractCallDestination.md +1 -1
  132. package/docs/CreateStakeActivity.md +1 -0
  133. package/docs/CreateStakeActivityExtra.md +1 -0
  134. package/docs/CreateTssRequestRequest.md +1 -0
  135. package/docs/CreateUnstakeActivity.md +1 -0
  136. package/docs/CreateWithdrawActivity.md +1 -0
  137. package/docs/CreatedWalletInfo.md +2 -0
  138. package/docs/DevelopersWebhooksApi.md +78 -69
  139. package/docs/EstimateStakeFee.md +1 -0
  140. package/docs/EstimateUnstakeFee.md +1 -0
  141. package/docs/EstimateWithdrawFee.md +1 -0
  142. package/docs/EvmContractCallDestination.md +1 -1
  143. package/docs/ExchangeId.md +2 -0
  144. package/docs/ExchangeTransferDestination.md +2 -2
  145. package/docs/ExchangeTransferSource.md +1 -1
  146. package/docs/GetToken200Response.md +4 -4
  147. package/docs/KeyShareHolder.md +1 -0
  148. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  149. package/docs/ListExchanges200ResponseInner.md +10 -0
  150. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  151. package/docs/MPCWalletInfo.md +2 -0
  152. package/docs/OAuthApi.md +26 -24
  153. package/docs/RefreshToken200Response.md +13 -0
  154. package/docs/RefreshTokenRequest.md +2 -2
  155. package/docs/SmartContractWalletType.md +1 -1
  156. package/docs/SubWalletAssetBalance.md +2 -2
  157. package/docs/TSSRequest.md +2 -0
  158. package/docs/TSSRequestWebhookEventData.md +29 -0
  159. package/docs/TransactionDepositFromWalletSource.md +1 -1
  160. package/docs/TransactionDepositToAddressDestination.md +1 -1
  161. package/docs/TransactionDepositToWalletDestination.md +2 -2
  162. package/docs/TransactionDestination.md +3 -3
  163. package/docs/TransactionEvmContractDestination.md +1 -1
  164. package/docs/TransactionExchangeWalletSource.md +1 -1
  165. package/docs/TransactionMPCWalletSource.md +1 -0
  166. package/docs/TransactionSource.md +2 -1
  167. package/docs/TransactionSubStatus.md +2 -0
  168. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  169. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  170. package/docs/TransactionTransferToWalletDestination.md +2 -2
  171. package/docs/TransactionWebhookEventData.md +3 -1
  172. package/docs/TransactionsApi.md +98 -88
  173. package/docs/TransferDestination.md +4 -4
  174. package/docs/TransferParams.md +1 -1
  175. package/docs/TransferSource.md +1 -1
  176. package/docs/WalletInfo.md +2 -0
  177. package/docs/WalletsApi.md +316 -187
  178. package/docs/WalletsExchangeWalletApi.md +230 -0
  179. package/docs/WalletsMPCWalletsApi.md +153 -135
  180. package/docs/WebhookEventData.md +10 -5
  181. package/docs/WebhookEventDataType.md +3 -1
  182. package/docs/WebhookEventType.md +12 -4
  183. package/package.json +1 -1
@@ -8,6 +8,8 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _AddressInfo = _interopRequireDefault(require("../model/AddressInfo"));
9
9
  var _ChainInfo = _interopRequireDefault(require("../model/ChainInfo"));
10
10
  var _CheckAddressValidity200Response = _interopRequireDefault(require("../model/CheckAddressValidity200Response"));
11
+ var _CheckAddressesValidity200ResponseInner = _interopRequireDefault(require("../model/CheckAddressesValidity200ResponseInner"));
12
+ var _CheckLoopTransfers200ResponseInner = _interopRequireDefault(require("../model/CheckLoopTransfers200ResponseInner"));
11
13
  var _CreateAddressRequest = _interopRequireDefault(require("../model/CreateAddressRequest"));
12
14
  var _CreateWalletParams = _interopRequireDefault(require("../model/CreateWalletParams"));
13
15
  var _CreatedWalletInfo = _interopRequireDefault(require("../model/CreatedWalletInfo"));
@@ -111,6 +113,115 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
111
113
  });
112
114
  }
113
115
 
116
+ /**
117
+ * Check addresses validity
118
+ * This operation verifies if given addresses are valid for a specific chain.
119
+ * @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
120
+ * @param {String} addresses A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses.
121
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CheckAddressesValidity200ResponseInner>} and HTTP response
122
+ */
123
+ }, {
124
+ key: "checkAddressesValidityWithHttpInfo",
125
+ value: function checkAddressesValidityWithHttpInfo(chain_id, addresses) {
126
+ var postBody = null;
127
+ if (postBody && postBody.toJSON) {
128
+ postBody = postBody.toJSON();
129
+ }
130
+ // verify the required parameter 'chain_id' is set
131
+ if (chain_id === undefined || chain_id === null) {
132
+ throw new Error("Missing the required parameter 'chain_id' when calling checkAddressesValidity");
133
+ }
134
+ // verify the required parameter 'addresses' is set
135
+ if (addresses === undefined || addresses === null) {
136
+ throw new Error("Missing the required parameter 'addresses' when calling checkAddressesValidity");
137
+ }
138
+ var pathParams = {};
139
+ var queryParams = {
140
+ 'chain_id': chain_id,
141
+ 'addresses': addresses
142
+ };
143
+ var headerParams = {};
144
+ var formParams = {};
145
+ var authNames = ['CoboAuth'];
146
+ var contentTypes = [];
147
+ var accepts = ['application/json'];
148
+ var returnType = [_CheckAddressesValidity200ResponseInner["default"]];
149
+ return this.apiClient.callApi('/wallets/check_addresses_validity', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
150
+ }
151
+
152
+ /**
153
+ * Check addresses validity
154
+ * This operation verifies if given addresses are valid for a specific chain.
155
+ * @param {String} chain_id The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
156
+ * @param {String} addresses A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses.
157
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CheckAddressesValidity200ResponseInner>}
158
+ */
159
+ }, {
160
+ key: "checkAddressesValidity",
161
+ value: function checkAddressesValidity(chain_id, addresses) {
162
+ return this.checkAddressesValidityWithHttpInfo(chain_id, addresses).then(function (response_and_data) {
163
+ return response_and_data.data;
164
+ });
165
+ }
166
+
167
+ /**
168
+ * Check Loop transfers
169
+ * This operation verifies if the transactions from a given source wallet to a list of destination addresses can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
170
+ * @param {String} token_id 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](/v2/api-references/wallets/list-enabled-tokens).
171
+ * @param {String} source_wallet_id The source wallet ID.
172
+ * @param {String} destination_addresses A list of destination wallet addresses, separated by comma.
173
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CheckLoopTransfers200ResponseInner>} and HTTP response
174
+ */
175
+ }, {
176
+ key: "checkLoopTransfersWithHttpInfo",
177
+ value: function checkLoopTransfersWithHttpInfo(token_id, source_wallet_id, destination_addresses) {
178
+ var postBody = null;
179
+ if (postBody && postBody.toJSON) {
180
+ postBody = postBody.toJSON();
181
+ }
182
+ // verify the required parameter 'token_id' is set
183
+ if (token_id === undefined || token_id === null) {
184
+ throw new Error("Missing the required parameter 'token_id' when calling checkLoopTransfers");
185
+ }
186
+ // verify the required parameter 'source_wallet_id' is set
187
+ if (source_wallet_id === undefined || source_wallet_id === null) {
188
+ throw new Error("Missing the required parameter 'source_wallet_id' when calling checkLoopTransfers");
189
+ }
190
+ // verify the required parameter 'destination_addresses' is set
191
+ if (destination_addresses === undefined || destination_addresses === null) {
192
+ throw new Error("Missing the required parameter 'destination_addresses' when calling checkLoopTransfers");
193
+ }
194
+ var pathParams = {};
195
+ var queryParams = {
196
+ 'token_id': token_id,
197
+ 'source_wallet_id': source_wallet_id,
198
+ 'destination_addresses': destination_addresses
199
+ };
200
+ var headerParams = {};
201
+ var formParams = {};
202
+ var authNames = ['CoboAuth'];
203
+ var contentTypes = [];
204
+ var accepts = ['application/json'];
205
+ var returnType = [_CheckLoopTransfers200ResponseInner["default"]];
206
+ return this.apiClient.callApi('/wallets/check_loop_transfers', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
207
+ }
208
+
209
+ /**
210
+ * Check Loop transfers
211
+ * This operation verifies if the transactions from a given source wallet to a list of destination addresses can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
212
+ * @param {String} token_id 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](/v2/api-references/wallets/list-enabled-tokens).
213
+ * @param {String} source_wallet_id The source wallet ID.
214
+ * @param {String} destination_addresses A list of destination wallet addresses, separated by comma.
215
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CheckLoopTransfers200ResponseInner>}
216
+ */
217
+ }, {
218
+ key: "checkLoopTransfers",
219
+ value: function checkLoopTransfers(token_id, source_wallet_id, destination_addresses) {
220
+ return this.checkLoopTransfersWithHttpInfo(token_id, source_wallet_id, destination_addresses).then(function (response_and_data) {
221
+ return response_and_data.data;
222
+ });
223
+ }
224
+
114
225
  /**
115
226
  * Create addresses in wallet
116
227
  * This operation generates one or more addresses within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
@@ -162,7 +273,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
162
273
 
163
274
  /**
164
275
  * Create wallet
165
- * This operation creates a wallet with the provided information.
276
+ * This operation creates a wallet with the provided information. <Note>This operation is not applicable to Smart Contract Wallets.</Note>
166
277
  * @param {Object} opts Optional parameters
167
278
  * @param {module:model/CreateWalletParams} [CreateWalletParams] The request body to create a wallet
168
279
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreatedWalletInfo} and HTTP response
@@ -188,7 +299,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
188
299
 
189
300
  /**
190
301
  * Create wallet
191
- * This operation creates a wallet with the provided information.
302
+ * This operation creates a wallet with the provided information. <Note>This operation is not applicable to Smart Contract Wallets.</Note>
192
303
  * @param {Object} opts Optional parameters
193
304
  * @param {module:model/CreateWalletParams} opts.CreateWalletParams The request body to create a wallet
194
305
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreatedWalletInfo}
@@ -678,7 +789,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
678
789
 
679
790
  /**
680
791
  * List supported chains
681
- * This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
792
+ * This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported chains [here](https://www.cobo.com/chains). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
682
793
  * @param {Object} opts Optional parameters
683
794
  * @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
684
795
  * @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
@@ -716,7 +827,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
716
827
 
717
828
  /**
718
829
  * List supported chains
719
- * This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
830
+ * This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported chains [here](https://www.cobo.com/chains). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
720
831
  * @param {Object} opts Optional parameters
721
832
  * @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
722
833
  * @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
@@ -736,7 +847,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
736
847
 
737
848
  /**
738
849
  * List supported tokens
739
- * This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
850
+ * This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported tokens [here](https://www.cobo.com/tokens). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
740
851
  * @param {Object} opts Optional parameters
741
852
  * @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
742
853
  * @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
@@ -776,7 +887,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
776
887
 
777
888
  /**
778
889
  * List supported tokens
779
- * This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
890
+ * This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions. Cobo Portal currently supports over 80 blockchains and more than 3,000 tokens. In addition to this operation, you can also view the full list of supported tokens [here](https://www.cobo.com/tokens). We regularly update the list with new additions. If you want to request support for a specific chain or token, please [contact us](https://www.cobo.com/contact).
780
891
  * @param {Object} opts Optional parameters
781
892
  * @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
782
893
  * @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
@@ -797,7 +908,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
797
908
 
798
909
  /**
799
910
  * List token balances by address
800
- * The operation retrieves a list of token balances for a specified address within an MPC Wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
911
+ * The operation retrieves a list of token balances for a specified address within a wallet. <Note>This operation is applicable to MPC Wallets and Smart Contract Wallets only.</Note>
801
912
  * @param {String} wallet_id The wallet ID.
802
913
  * @param {String} address The wallet address.
803
914
  * @param {Object} opts Optional parameters
@@ -844,7 +955,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
844
955
 
845
956
  /**
846
957
  * List token balances by address
847
- * The operation retrieves a list of token balances for a specified address within an MPC Wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
958
+ * The operation retrieves a list of token balances for a specified address within a wallet. <Note>This operation is applicable to MPC Wallets and Smart Contract Wallets only.</Note>
848
959
  * @param {String} wallet_id The wallet ID.
849
960
  * @param {String} address The wallet address.
850
961
  * @param {Object} opts Optional parameters
@@ -864,7 +975,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
864
975
 
865
976
  /**
866
977
  * List token balances by wallet
867
- * The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
978
+ * The operation retrieves a list of token balances within a specified wallet. <Note>This operation is not applicable to Exchange Wallets.</Note>
868
979
  * @param {String} wallet_id The wallet ID.
869
980
  * @param {Object} opts Optional parameters
870
981
  * @param {String} [token_ids] A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
@@ -905,7 +1016,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
905
1016
 
906
1017
  /**
907
1018
  * List token balances by wallet
908
- * The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
1019
+ * The operation retrieves a list of token balances within a specified wallet. <Note>This operation is not applicable to Exchange Wallets.</Note>
909
1020
  * @param {String} wallet_id The wallet ID.
910
1021
  * @param {Object} opts Optional parameters
911
1022
  * @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
@@ -996,7 +1107,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
996
1107
  * @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
997
1108
  * @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
998
1109
  * @param {String} [project_id] The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
999
- * @param {String} [vault_id] (This parameter is applicable to MPC Wallets only) The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
1110
+ * @param {String} [vault_id] The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
1000
1111
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
1001
1112
  * @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
1002
1113
  * @param {String} [after] An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
@@ -1036,7 +1147,7 @@ var WalletsApi = exports["default"] = /*#__PURE__*/function () {
1036
1147
  * @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
1037
1148
  * @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
1038
1149
  * @param {String} opts.project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
1039
- * @param {String} opts.vault_id (This parameter is applicable to MPC Wallets only) The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
1150
+ * @param {String} opts.vault_id The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
1040
1151
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
1041
1152
  * @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
1042
1153
  * @param {String} opts.after An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
@@ -0,0 +1,254 @@
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 _ChainInfo = _interopRequireDefault(require("../model/ChainInfo"));
9
+ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
10
+ var _ExchangeId = _interopRequireDefault(require("../model/ExchangeId"));
11
+ var _ListAssetBalancesForExchangeWallet200Response = _interopRequireDefault(require("../model/ListAssetBalancesForExchangeWallet200Response"));
12
+ var _ListExchanges200ResponseInner = _interopRequireDefault(require("../model/ListExchanges200ResponseInner"));
13
+ var _ListSupportedAssetsForExchange200Response = _interopRequireDefault(require("../model/ListSupportedAssetsForExchange200Response"));
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
+ 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); }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ 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); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ 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); } /**
21
+ * Cobo Wallet as a Service 2.0
22
+ *
23
+ * Contact: support@cobo.com
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * WalletsExchangeWallet service.
32
+ * @module api/WalletsExchangeWalletApi
33
+ */
34
+ var WalletsExchangeWalletApi = exports["default"] = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new WalletsExchangeWalletApi.
37
+ * @alias module:api/WalletsExchangeWalletApi
38
+ * @class
39
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
40
+ * default to {@link module:ApiClient#instance} if unspecified.
41
+ */
42
+ function WalletsExchangeWalletApi(apiClient) {
43
+ _classCallCheck(this, WalletsExchangeWalletApi);
44
+ this.apiClient = apiClient || _ApiClient["default"].instance;
45
+ }
46
+
47
+ /**
48
+ * List asset balances
49
+ * This operation retrieves the asset balances in a specified Exchange Wallet. You can filter the results by trading account type or asset ID.
50
+ * @param {String} wallet_id The wallet ID.
51
+ * @param {Object} opts Optional parameters
52
+ * @param {String} [trading_account_types] A list of trading account types, separated by comma. You can get the the supported trading account types of an exchange by calling [List supported exchanges](/v2/api-references/wallets--exchange-wallet/list-supported-exchanges).
53
+ * @param {String} [asset_ids] (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
54
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
55
+ * @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
56
+ * @param {String} [after] An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
57
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAssetBalancesForExchangeWallet200Response} and HTTP response
58
+ */
59
+ return _createClass(WalletsExchangeWalletApi, [{
60
+ key: "listAssetBalancesForExchangeWalletWithHttpInfo",
61
+ value: function listAssetBalancesForExchangeWalletWithHttpInfo(wallet_id, opts) {
62
+ opts = opts || {};
63
+ var postBody = null;
64
+ if (postBody && postBody.toJSON) {
65
+ postBody = postBody.toJSON();
66
+ }
67
+ // verify the required parameter 'wallet_id' is set
68
+ if (wallet_id === undefined || wallet_id === null) {
69
+ throw new Error("Missing the required parameter 'wallet_id' when calling listAssetBalancesForExchangeWallet");
70
+ }
71
+ var pathParams = {
72
+ 'wallet_id': wallet_id
73
+ };
74
+ var queryParams = {
75
+ 'trading_account_types': opts['trading_account_types'],
76
+ 'asset_ids': opts['asset_ids'],
77
+ 'limit': opts['limit'],
78
+ 'before': opts['before'],
79
+ 'after': opts['after']
80
+ };
81
+ var headerParams = {};
82
+ var formParams = {};
83
+ var authNames = ['CoboAuth'];
84
+ var contentTypes = [];
85
+ var accepts = ['application/json'];
86
+ var returnType = _ListAssetBalancesForExchangeWallet200Response["default"];
87
+ return this.apiClient.callApi('/wallets/{wallet_id}/exchanges/assets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
88
+ }
89
+
90
+ /**
91
+ * List asset balances
92
+ * This operation retrieves the asset balances in a specified Exchange Wallet. You can filter the results by trading account type or asset ID.
93
+ * @param {String} wallet_id The wallet ID.
94
+ * @param {Object} opts Optional parameters
95
+ * @param {String} opts.trading_account_types A list of trading account types, separated by comma. You can get the the supported trading account types of an exchange by calling [List supported exchanges](/v2/api-references/wallets--exchange-wallet/list-supported-exchanges).
96
+ * @param {String} opts.asset_ids (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.
97
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
98
+ * @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
99
+ * @param {String} opts.after An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
100
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAssetBalancesForExchangeWallet200Response}
101
+ */
102
+ }, {
103
+ key: "listAssetBalancesForExchangeWallet",
104
+ value: function listAssetBalancesForExchangeWallet(wallet_id, opts) {
105
+ return this.listAssetBalancesForExchangeWalletWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
106
+ return response_and_data.data;
107
+ });
108
+ }
109
+
110
+ /**
111
+ * List supported exchanges
112
+ * This operation retrieves the information about the exchanges supported by Cobo's Exchange Wallets, including exchange IDs and trading account types.
113
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ListExchanges200ResponseInner>} and HTTP response
114
+ */
115
+ }, {
116
+ key: "listExchangesWithHttpInfo",
117
+ value: function listExchangesWithHttpInfo() {
118
+ var postBody = null;
119
+ if (postBody && postBody.toJSON) {
120
+ postBody = postBody.toJSON();
121
+ }
122
+ var pathParams = {};
123
+ var queryParams = {};
124
+ var headerParams = {};
125
+ var formParams = {};
126
+ var authNames = ['CoboAuth'];
127
+ var contentTypes = [];
128
+ var accepts = ['application/json'];
129
+ var returnType = [_ListExchanges200ResponseInner["default"]];
130
+ return this.apiClient.callApi('/wallets/exchanges', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
131
+ }
132
+
133
+ /**
134
+ * List supported exchanges
135
+ * This operation retrieves the information about the exchanges supported by Cobo's Exchange Wallets, including exchange IDs and trading account types.
136
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ListExchanges200ResponseInner>}
137
+ */
138
+ }, {
139
+ key: "listExchanges",
140
+ value: function listExchanges() {
141
+ return this.listExchangesWithHttpInfo().then(function (response_and_data) {
142
+ return response_and_data.data;
143
+ });
144
+ }
145
+
146
+ /**
147
+ * List supported assets
148
+ * This operation retrieves all the assets supported by a specified exchange.
149
+ * @param {module:model/ExchangeId} exchange_id The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget'`: Bitget
150
+ * @param {Object} opts Optional parameters
151
+ * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
152
+ * @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
153
+ * @param {String} [after] An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
154
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSupportedAssetsForExchange200Response} and HTTP response
155
+ */
156
+ }, {
157
+ key: "listSupportedAssetsForExchangeWithHttpInfo",
158
+ value: function listSupportedAssetsForExchangeWithHttpInfo(exchange_id, opts) {
159
+ opts = opts || {};
160
+ var postBody = null;
161
+ if (postBody && postBody.toJSON) {
162
+ postBody = postBody.toJSON();
163
+ }
164
+ // verify the required parameter 'exchange_id' is set
165
+ if (exchange_id === undefined || exchange_id === null) {
166
+ throw new Error("Missing the required parameter 'exchange_id' when calling listSupportedAssetsForExchange");
167
+ }
168
+ var pathParams = {
169
+ 'exchange_id': exchange_id
170
+ };
171
+ var queryParams = {
172
+ 'limit': opts['limit'],
173
+ 'before': opts['before'],
174
+ 'after': opts['after']
175
+ };
176
+ var headerParams = {};
177
+ var formParams = {};
178
+ var authNames = ['CoboAuth'];
179
+ var contentTypes = [];
180
+ var accepts = ['application/json'];
181
+ var returnType = _ListSupportedAssetsForExchange200Response["default"];
182
+ return this.apiClient.callApi('/wallets/exchanges/{exchange_id}/assets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
183
+ }
184
+
185
+ /**
186
+ * List supported assets
187
+ * This operation retrieves all the assets supported by a specified exchange.
188
+ * @param {module:model/ExchangeId} exchange_id The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget'`: Bitget
189
+ * @param {Object} opts Optional parameters
190
+ * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
191
+ * @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
192
+ * @param {String} opts.after An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned.
193
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupportedAssetsForExchange200Response}
194
+ */
195
+ }, {
196
+ key: "listSupportedAssetsForExchange",
197
+ value: function listSupportedAssetsForExchange(exchange_id, opts) {
198
+ return this.listSupportedAssetsForExchangeWithHttpInfo(exchange_id, opts).then(function (response_and_data) {
199
+ return response_and_data.data;
200
+ });
201
+ }
202
+
203
+ /**
204
+ * List supported chains
205
+ * This operation retrieves all the chains supported by a specified exchange for a given asset. You can use this operation to confirm whether you can transfer an asset from or to your Exchange Wallet when using a specific chain.
206
+ * @param {module:model/ExchangeId} exchange_id The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget'`: Bitget
207
+ * @param {String} asset_id (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account. You can get the ID of the assets supported by an exchanges by calling [List supported assets](/v2/api-references/wallets--exchange-wallet/list-supported-assets).
208
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ChainInfo>} and HTTP response
209
+ */
210
+ }, {
211
+ key: "listSupportedChainsForExchangeWithHttpInfo",
212
+ value: function listSupportedChainsForExchangeWithHttpInfo(exchange_id, asset_id) {
213
+ var postBody = null;
214
+ if (postBody && postBody.toJSON) {
215
+ postBody = postBody.toJSON();
216
+ }
217
+ // verify the required parameter 'exchange_id' is set
218
+ if (exchange_id === undefined || exchange_id === null) {
219
+ throw new Error("Missing the required parameter 'exchange_id' when calling listSupportedChainsForExchange");
220
+ }
221
+ // verify the required parameter 'asset_id' is set
222
+ if (asset_id === undefined || asset_id === null) {
223
+ throw new Error("Missing the required parameter 'asset_id' when calling listSupportedChainsForExchange");
224
+ }
225
+ var pathParams = {
226
+ 'exchange_id': exchange_id,
227
+ 'asset_id': asset_id
228
+ };
229
+ var queryParams = {};
230
+ var headerParams = {};
231
+ var formParams = {};
232
+ var authNames = ['CoboAuth'];
233
+ var contentTypes = [];
234
+ var accepts = ['application/json'];
235
+ var returnType = [_ChainInfo["default"]];
236
+ return this.apiClient.callApi('/wallets/exchanges/{exchange_id}/assets/{asset_id}/chains', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
237
+ }
238
+
239
+ /**
240
+ * List supported chains
241
+ * This operation retrieves all the chains supported by a specified exchange for a given asset. You can use this operation to confirm whether you can transfer an asset from or to your Exchange Wallet when using a specific chain.
242
+ * @param {module:model/ExchangeId} exchange_id The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget'`: Bitget
243
+ * @param {String} asset_id (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account. You can get the ID of the assets supported by an exchanges by calling [List supported assets](/v2/api-references/wallets--exchange-wallet/list-supported-assets).
244
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ChainInfo>}
245
+ */
246
+ }, {
247
+ key: "listSupportedChainsForExchange",
248
+ value: function listSupportedChainsForExchange(exchange_id, asset_id) {
249
+ return this.listSupportedChainsForExchangeWithHttpInfo(exchange_id, asset_id).then(function (response_and_data) {
250
+ return response_and_data.data;
251
+ });
252
+ }
253
+ }]);
254
+ }();
@@ -160,7 +160,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
160
160
 
161
161
  /**
162
162
  * Create project
163
- * This operation creates a project. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
163
+ * This operation creates a project. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
164
164
  * @param {Object} opts Optional parameters
165
165
  * @param {module:model/CreateMpcProjectRequest} [CreateMpcProjectRequest] The request body to create a project.
166
166
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MPCProject} and HTTP response
@@ -186,7 +186,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
186
186
 
187
187
  /**
188
188
  * Create project
189
- * This operation creates a project. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
189
+ * This operation creates a project. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
190
190
  * @param {Object} opts Optional parameters
191
191
  * @param {module:model/CreateMpcProjectRequest} opts.CreateMpcProjectRequest The request body to create a project.
192
192
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MPCProject}
@@ -393,7 +393,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
393
393
 
394
394
  /**
395
395
  * Get project information
396
- * This operation retrieves detailed information about a project. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
396
+ * This operation retrieves detailed information about a project. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
397
397
  * @param {String} project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
398
398
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MPCProject} and HTTP response
399
399
  */
@@ -423,7 +423,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
423
423
 
424
424
  /**
425
425
  * Get project information
426
- * This operation retrieves detailed information about a project. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
426
+ * This operation retrieves detailed information about a project. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
427
427
  * @param {String} project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
428
428
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MPCProject}
429
429
  */
@@ -628,7 +628,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
628
628
 
629
629
  /**
630
630
  * List all projects
631
- * This operation retrieves a list of all projects. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
631
+ * This operation retrieves a list of all projects. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
632
632
  * @param {Object} opts Optional parameters
633
633
  * @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
634
634
  * @param {String} [before] An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
@@ -660,7 +660,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
660
660
 
661
661
  /**
662
662
  * List all projects
663
- * This operation retrieves a list of all projects. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
663
+ * This operation retrieves a list of all projects. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
664
664
  * @param {Object} opts Optional parameters
665
665
  * @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
666
666
  * @param {String} opts.before An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned.
@@ -856,7 +856,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
856
856
 
857
857
  /**
858
858
  * Update project name
859
- * This operation updates a project's name. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
859
+ * This operation updates a project's name. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
860
860
  * @param {String} project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
861
861
  * @param {Object} opts Optional parameters
862
862
  * @param {module:model/UpdateMpcProjectByIdRequest} [UpdateMpcProjectByIdRequest] The request body to update a project's name.
@@ -889,7 +889,7 @@ var WalletsMPCWalletsApi = exports["default"] = /*#__PURE__*/function () {
889
889
 
890
890
  /**
891
891
  * Update project name
892
- * This operation updates a project's name. <Info>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Info>
892
+ * This operation updates a project's name. <Note>This operation applies to MPC Wallets (User-Controlled Wallets) only.</Note>
893
893
  * @param {String} project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
894
894
  * @param {Object} opts Optional parameters
895
895
  * @param {module:model/UpdateMpcProjectByIdRequest} opts.UpdateMpcProjectByIdRequest The request body to update a project's name.