@cobo/cobo-waas2 1.1.2 → 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 (125) 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/AddressInfo.js +1 -1
  10. package/dist/model/AddressTransferDestination.js +3 -3
  11. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  12. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  13. package/dist/model/AssetInfo.js +2 -2
  14. package/dist/model/BabylonStakeExtra.js +9 -0
  15. package/dist/model/CheckAddressValidity200Response.js +2 -2
  16. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  17. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  18. package/dist/model/ContractCallDestination.js +1 -1
  19. package/dist/model/CreateStakeActivity.js +14 -1
  20. package/dist/model/CreateStakeActivityExtra.js +6 -0
  21. package/dist/model/CreateTssRequestRequest.js +13 -0
  22. package/dist/model/CreateUnstakeActivity.js +13 -0
  23. package/dist/model/CreateWithdrawActivity.js +13 -0
  24. package/dist/model/CreatedWalletInfo.js +12 -0
  25. package/dist/model/EstimateStakeFee.js +19 -1
  26. package/dist/model/EstimateUnstakeFee.js +18 -0
  27. package/dist/model/EstimateWithdrawFee.js +18 -0
  28. package/dist/model/EvmContractCallDestination.js +1 -1
  29. package/dist/model/ExchangeId.js +5 -0
  30. package/dist/model/ExchangeTransferDestination.js +16 -16
  31. package/dist/model/ExchangeTransferSource.js +14 -14
  32. package/dist/model/GetToken200Response.js +4 -4
  33. package/dist/model/KeyShareHolder.js +13 -0
  34. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  35. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  36. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  37. package/dist/model/MPCWalletInfo.js +26 -0
  38. package/dist/model/RefreshToken200Response.js +135 -0
  39. package/dist/model/RefreshTokenRequest.js +2 -2
  40. package/dist/model/SmartContractWalletType.js +2 -2
  41. package/dist/model/SubWalletAssetBalance.js +10 -10
  42. package/dist/model/TSSRequest.js +23 -1
  43. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  44. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  45. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  46. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  47. package/dist/model/TransactionDestination.js +5 -5
  48. package/dist/model/TransactionEvmContractDestination.js +1 -1
  49. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  50. package/dist/model/TransactionMPCWalletSource.js +13 -0
  51. package/dist/model/TransactionSource.js +8 -2
  52. package/dist/model/TransactionSubStatus.js +5 -0
  53. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  54. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  55. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  56. package/dist/model/TransactionWebhookEventData.js +8 -3
  57. package/dist/model/TransferDestination.js +6 -6
  58. package/dist/model/TransferParams.js +2 -2
  59. package/dist/model/TransferSource.js +3 -3
  60. package/dist/model/WalletInfo.js +12 -0
  61. package/dist/model/WebhookEventData.js +49 -15
  62. package/dist/model/WebhookEventDataType.js +7 -2
  63. package/dist/model/WebhookEventType.js +24 -4
  64. package/docs/AddressInfo.md +1 -1
  65. package/docs/AddressTransferDestination.md +2 -2
  66. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  67. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  68. package/docs/AssetInfo.md +1 -1
  69. package/docs/BabylonStakeExtra.md +1 -0
  70. package/docs/CheckAddressValidity200Response.md +1 -1
  71. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  72. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  73. package/docs/ContractCallDestination.md +1 -1
  74. package/docs/CreateStakeActivity.md +1 -0
  75. package/docs/CreateStakeActivityExtra.md +1 -0
  76. package/docs/CreateTssRequestRequest.md +1 -0
  77. package/docs/CreateUnstakeActivity.md +1 -0
  78. package/docs/CreateWithdrawActivity.md +1 -0
  79. package/docs/CreatedWalletInfo.md +2 -0
  80. package/docs/DevelopersWebhooksApi.md +78 -69
  81. package/docs/EstimateStakeFee.md +1 -0
  82. package/docs/EstimateUnstakeFee.md +1 -0
  83. package/docs/EstimateWithdrawFee.md +1 -0
  84. package/docs/EvmContractCallDestination.md +1 -1
  85. package/docs/ExchangeId.md +2 -0
  86. package/docs/ExchangeTransferDestination.md +2 -2
  87. package/docs/ExchangeTransferSource.md +1 -1
  88. package/docs/GetToken200Response.md +4 -4
  89. package/docs/KeyShareHolder.md +1 -0
  90. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  91. package/docs/ListExchanges200ResponseInner.md +10 -0
  92. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  93. package/docs/MPCWalletInfo.md +2 -0
  94. package/docs/OAuthApi.md +26 -24
  95. package/docs/RefreshToken200Response.md +13 -0
  96. package/docs/RefreshTokenRequest.md +2 -2
  97. package/docs/SmartContractWalletType.md +1 -1
  98. package/docs/SubWalletAssetBalance.md +2 -2
  99. package/docs/TSSRequest.md +2 -0
  100. package/docs/TSSRequestWebhookEventData.md +29 -0
  101. package/docs/TransactionDepositFromWalletSource.md +1 -1
  102. package/docs/TransactionDepositToAddressDestination.md +1 -1
  103. package/docs/TransactionDepositToWalletDestination.md +2 -2
  104. package/docs/TransactionDestination.md +3 -3
  105. package/docs/TransactionEvmContractDestination.md +1 -1
  106. package/docs/TransactionExchangeWalletSource.md +1 -1
  107. package/docs/TransactionMPCWalletSource.md +1 -0
  108. package/docs/TransactionSource.md +2 -1
  109. package/docs/TransactionSubStatus.md +2 -0
  110. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  111. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  112. package/docs/TransactionTransferToWalletDestination.md +2 -2
  113. package/docs/TransactionWebhookEventData.md +3 -1
  114. package/docs/TransactionsApi.md +98 -88
  115. package/docs/TransferDestination.md +4 -4
  116. package/docs/TransferParams.md +1 -1
  117. package/docs/TransferSource.md +1 -1
  118. package/docs/WalletInfo.md +2 -0
  119. package/docs/WalletsApi.md +316 -187
  120. package/docs/WalletsExchangeWalletApi.md +230 -0
  121. package/docs/WalletsMPCWalletsApi.md +153 -135
  122. package/docs/WebhookEventData.md +10 -5
  123. package/docs/WebhookEventDataType.md +3 -1
  124. package/docs/WebhookEventType.md +12 -4
  125. package/package.json +1 -1
@@ -0,0 +1,230 @@
1
+ # CoboWaas2.WalletsExchangeWalletApi
2
+
3
+ All URIs are relative to *https://api.dev.cobo.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**listAssetBalancesForExchangeWallet**](WalletsExchangeWalletApi.md#listAssetBalancesForExchangeWallet) | **GET** /wallets/{wallet_id}/exchanges/assets | List asset balances
8
+ [**listExchanges**](WalletsExchangeWalletApi.md#listExchanges) | **GET** /wallets/exchanges | List supported exchanges
9
+ [**listSupportedAssetsForExchange**](WalletsExchangeWalletApi.md#listSupportedAssetsForExchange) | **GET** /wallets/exchanges/{exchange_id}/assets | List supported assets
10
+ [**listSupportedChainsForExchange**](WalletsExchangeWalletApi.md#listSupportedChainsForExchange) | **GET** /wallets/exchanges/{exchange_id}/assets/{asset_id}/chains | List supported chains
11
+
12
+
13
+
14
+ ## listAssetBalancesForExchangeWallet
15
+
16
+ > ListAssetBalancesForExchangeWallet200Response listAssetBalancesForExchangeWallet(wallet_id, opts)
17
+
18
+ List asset balances
19
+
20
+ This operation retrieves the asset balances in a specified Exchange Wallet. You can filter the results by trading account type or asset ID.
21
+
22
+ ### Example
23
+
24
+ ```javascript
25
+ const CoboWaas2 = require('@cobo/cobo-waas2');
26
+ // Initialize the API client
27
+ const apiClient = CoboWaas2.ApiClient.instance
28
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
29
+ apiClient.setEnv(CoboWaas2.Env.DEV);
30
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
31
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
32
+ // Call the API
33
+ const apiInstance = new CoboWaas2.WalletsExchangeWalletApi();
34
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
35
+ const opts = {
36
+ 'trading_account_types': "Trading,Funding",
37
+ 'asset_ids': "USDT,USDC",
38
+ 'limit': 10,
39
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
40
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
41
+ };
42
+ apiInstance.listAssetBalancesForExchangeWallet(wallet_id, opts).then((data) => {
43
+ console.log('API called successfully. Returned data: ' + data);
44
+ }, (error) => {
45
+ console.error(error);
46
+ });
47
+
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **wallet_id** | **String**| The wallet ID. |
56
+ **trading_account_types** | **String**| 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). | [optional]
57
+ **asset_ids** | **String**| (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. | [optional]
58
+ **limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
59
+ **before** | **String**| An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify &#x60;before&#x60; as &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1&#x60;, the request will retrieve a list of data objects that end before the object with the object ID &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1&#x60;. You can set this parameter to the value of &#x60;pagination.before&#x60; in the response of the previous request. - If you set both &#x60;after&#x60; and &#x60;before&#x60;, an error will occur. - If you leave both &#x60;before&#x60; and &#x60;after&#x60; empty, the first page of data is returned. - If you set &#x60;before&#x60; to &#x60;infinity&#x60;, the last page of data is returned. | [optional]
60
+ **after** | **String**| An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify &#x60;after&#x60; as &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk&#x60;, the request will retrieve a list of data objects that start after the object with the object ID &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk&#x60;. You can set this parameter to the value of &#x60;pagination.after&#x60; in the response of the previous request. - If you set both &#x60;after&#x60; and &#x60;before&#x60;, an error will occur. - If you leave both &#x60;before&#x60; and &#x60;after&#x60; empty, the first page of data is returned. | [optional]
61
+
62
+ ### Return type
63
+
64
+ [**ListAssetBalancesForExchangeWallet200Response**](ListAssetBalancesForExchangeWallet200Response.md)
65
+
66
+ ### Authorization
67
+
68
+ [CoboAuth](../README.md#CoboAuth)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: Not defined
73
+ - **Accept**: application/json
74
+
75
+
76
+ ## listExchanges
77
+
78
+ > [ListExchanges200ResponseInner] listExchanges()
79
+
80
+ List supported exchanges
81
+
82
+ This operation retrieves the information about the exchanges supported by Cobo&#39;s Exchange Wallets, including exchange IDs and trading account types.
83
+
84
+ ### Example
85
+
86
+ ```javascript
87
+ const CoboWaas2 = require('@cobo/cobo-waas2');
88
+ // Initialize the API client
89
+ const apiClient = CoboWaas2.ApiClient.instance
90
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
91
+ apiClient.setEnv(CoboWaas2.Env.DEV);
92
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
93
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
94
+ // Call the API
95
+ const apiInstance = new CoboWaas2.WalletsExchangeWalletApi();
96
+ apiInstance.listExchanges().then((data) => {
97
+ console.log('API called successfully. Returned data: ' + data);
98
+ }, (error) => {
99
+ console.error(error);
100
+ });
101
+
102
+ ```
103
+
104
+ ### Parameters
105
+
106
+ This endpoint does not need any parameter.
107
+
108
+ ### Return type
109
+
110
+ [**[ListExchanges200ResponseInner]**](ListExchanges200ResponseInner.md)
111
+
112
+ ### Authorization
113
+
114
+ [CoboAuth](../README.md#CoboAuth)
115
+
116
+ ### HTTP request headers
117
+
118
+ - **Content-Type**: Not defined
119
+ - **Accept**: application/json
120
+
121
+
122
+ ## listSupportedAssetsForExchange
123
+
124
+ > ListSupportedAssetsForExchange200Response listSupportedAssetsForExchange(exchange_id, opts)
125
+
126
+ List supported assets
127
+
128
+ This operation retrieves all the assets supported by a specified exchange.
129
+
130
+ ### Example
131
+
132
+ ```javascript
133
+ const CoboWaas2 = require('@cobo/cobo-waas2');
134
+ // Initialize the API client
135
+ const apiClient = CoboWaas2.ApiClient.instance
136
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
137
+ apiClient.setEnv(CoboWaas2.Env.DEV);
138
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
139
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
140
+ // Call the API
141
+ const apiInstance = new CoboWaas2.WalletsExchangeWalletApi();
142
+ const exchange_id = new CoboWaas2.ExchangeId();
143
+ const opts = {
144
+ 'limit': 10,
145
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
146
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
147
+ };
148
+ apiInstance.listSupportedAssetsForExchange(exchange_id, opts).then((data) => {
149
+ console.log('API called successfully. Returned data: ' + data);
150
+ }, (error) => {
151
+ console.error(error);
152
+ });
153
+
154
+ ```
155
+
156
+ ### Parameters
157
+
158
+
159
+ Name | Type | Description | Notes
160
+ ------------- | ------------- | ------------- | -------------
161
+ **exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - &#x60;binance&#x60;: Binance. - &#x60;okx&#x60;: OKX. - &#x60;deribit&#x60;: Deribit. - &#x60;bybit&#x60;: Bybit. - &#x60;gate&#x60;: Gate.io - &#x60;bitget&#39;&#x60;: Bitget |
162
+ **limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
163
+ **before** | **String**| An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify &#x60;before&#x60; as &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1&#x60;, the request will retrieve a list of data objects that end before the object with the object ID &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1&#x60;. You can set this parameter to the value of &#x60;pagination.before&#x60; in the response of the previous request. - If you set both &#x60;after&#x60; and &#x60;before&#x60;, an error will occur. - If you leave both &#x60;before&#x60; and &#x60;after&#x60; empty, the first page of data is returned. - If you set &#x60;before&#x60; to &#x60;infinity&#x60;, the last page of data is returned. | [optional]
164
+ **after** | **String**| An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify &#x60;after&#x60; as &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk&#x60;, the request will retrieve a list of data objects that start after the object with the object ID &#x60;RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk&#x60;. You can set this parameter to the value of &#x60;pagination.after&#x60; in the response of the previous request. - If you set both &#x60;after&#x60; and &#x60;before&#x60;, an error will occur. - If you leave both &#x60;before&#x60; and &#x60;after&#x60; empty, the first page of data is returned. | [optional]
165
+
166
+ ### Return type
167
+
168
+ [**ListSupportedAssetsForExchange200Response**](ListSupportedAssetsForExchange200Response.md)
169
+
170
+ ### Authorization
171
+
172
+ [CoboAuth](../README.md#CoboAuth)
173
+
174
+ ### HTTP request headers
175
+
176
+ - **Content-Type**: Not defined
177
+ - **Accept**: application/json
178
+
179
+
180
+ ## listSupportedChainsForExchange
181
+
182
+ > [ChainInfo] listSupportedChainsForExchange(exchange_id, asset_id)
183
+
184
+ List supported chains
185
+
186
+ 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.
187
+
188
+ ### Example
189
+
190
+ ```javascript
191
+ const CoboWaas2 = require('@cobo/cobo-waas2');
192
+ // Initialize the API client
193
+ const apiClient = CoboWaas2.ApiClient.instance
194
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
195
+ apiClient.setEnv(CoboWaas2.Env.DEV);
196
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
197
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
198
+ // Call the API
199
+ const apiInstance = new CoboWaas2.WalletsExchangeWalletApi();
200
+ const exchange_id = new CoboWaas2.ExchangeId();
201
+ const asset_id = "USDT";
202
+ apiInstance.listSupportedChainsForExchange(exchange_id, asset_id).then((data) => {
203
+ console.log('API called successfully. Returned data: ' + data);
204
+ }, (error) => {
205
+ console.error(error);
206
+ });
207
+
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+
213
+ Name | Type | Description | Notes
214
+ ------------- | ------------- | ------------- | -------------
215
+ **exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - &#x60;binance&#x60;: Binance. - &#x60;okx&#x60;: OKX. - &#x60;deribit&#x60;: Deribit. - &#x60;bybit&#x60;: Bybit. - &#x60;gate&#x60;: Gate.io - &#x60;bitget&#39;&#x60;: Bitget |
216
+ **asset_id** | **String**| (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). |
217
+
218
+ ### Return type
219
+
220
+ [**[ChainInfo]**](ChainInfo.md)
221
+
222
+ ### Authorization
223
+
224
+ [CoboAuth](../README.md#CoboAuth)
225
+
226
+ ### HTTP request headers
227
+
228
+ - **Content-Type**: Not defined
229
+ - **Accept**: application/json
230
+