@cobo/cobo-waas2 1.1.2 → 1.2.1

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 (143) hide show
  1. package/README.md +16 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +640 -0
  4. package/dist/api/OAuthApi.js +16 -15
  5. package/dist/api/TransactionsApi.js +18 -18
  6. package/dist/api/WalletsApi.js +123 -12
  7. package/dist/api/WalletsExchangeWalletApi.js +254 -0
  8. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  9. package/dist/index.js +56 -0
  10. package/dist/model/AddressInfo.js +1 -1
  11. package/dist/model/AddressTransferDestination.js +3 -3
  12. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  13. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  14. package/dist/model/AssetInfo.js +2 -2
  15. package/dist/model/BabylonStakeExtra.js +9 -0
  16. package/dist/model/CheckAddressValidity200Response.js +2 -2
  17. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  18. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  19. package/dist/model/CoboSafeDelegate.js +27 -2
  20. package/dist/model/ContractCallDestination.js +24 -3
  21. package/dist/model/ContractCallSource.js +41 -4
  22. package/dist/model/CreateSmartContractWalletParams.js +23 -2
  23. package/dist/model/CreateStakeActivity.js +14 -1
  24. package/dist/model/CreateStakeActivityExtra.js +57 -6
  25. package/dist/model/CreateTssRequestRequest.js +13 -0
  26. package/dist/model/CreateUnstakeActivity.js +13 -0
  27. package/dist/model/CreateWalletParams.js +51 -6
  28. package/dist/model/CreateWithdrawActivity.js +13 -0
  29. package/dist/model/CreatedWalletInfo.js +63 -6
  30. package/dist/model/EstimateFeeParams.js +37 -4
  31. package/dist/model/EstimateStakeFee.js +19 -1
  32. package/dist/model/EstimateUnstakeFee.js +18 -0
  33. package/dist/model/EstimateWithdrawFee.js +18 -0
  34. package/dist/model/EstimatedFee.js +65 -8
  35. package/dist/model/EvmContractCallDestination.js +1 -1
  36. package/dist/model/ExchangeId.js +5 -0
  37. package/dist/model/ExchangeTransferDestination.js +16 -16
  38. package/dist/model/ExchangeTransferSource.js +14 -14
  39. package/dist/model/FeeRate.js +65 -8
  40. package/dist/model/GetToken200Response.js +4 -4
  41. package/dist/model/KeyShareHolder.js +13 -0
  42. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  43. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  44. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  45. package/dist/model/MPCWalletInfo.js +26 -0
  46. package/dist/model/MessageSignDestination.js +37 -4
  47. package/dist/model/MessageSignSource.js +27 -2
  48. package/dist/model/PoolDetailsAllOfValidatorsInfo.js +20 -4
  49. package/dist/model/RefreshToken200Response.js +135 -0
  50. package/dist/model/RefreshTokenRequest.js +2 -2
  51. package/dist/model/SmartContractWalletInfo.js +23 -2
  52. package/dist/model/SmartContractWalletType.js +2 -2
  53. package/dist/model/StakingSource.js +41 -4
  54. package/dist/model/SubWalletAssetBalance.js +10 -10
  55. package/dist/model/TSSRequest.js +23 -1
  56. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  57. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  58. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  59. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  60. package/dist/model/TransactionDestination.js +112 -19
  61. package/dist/model/TransactionEvmContractDestination.js +1 -1
  62. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  63. package/dist/model/TransactionFee.js +65 -8
  64. package/dist/model/TransactionMPCWalletSource.js +13 -0
  65. package/dist/model/TransactionRbfSource.js +27 -2
  66. package/dist/model/TransactionRequestFee.js +65 -8
  67. package/dist/model/TransactionResult.js +23 -2
  68. package/dist/model/TransactionSource.js +123 -16
  69. package/dist/model/TransactionSubStatus.js +5 -0
  70. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  71. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  72. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  73. package/dist/model/TransactionWebhookEventData.js +8 -3
  74. package/dist/model/TransferDestination.js +43 -10
  75. package/dist/model/TransferParams.js +2 -2
  76. package/dist/model/TransferSource.js +76 -11
  77. package/dist/model/UpdateWalletParams.js +65 -8
  78. package/dist/model/WalletInfo.js +77 -8
  79. package/dist/model/WebhookEventData.js +84 -17
  80. package/dist/model/WebhookEventDataType.js +7 -2
  81. package/dist/model/WebhookEventType.js +24 -4
  82. package/docs/AddressInfo.md +1 -1
  83. package/docs/AddressTransferDestination.md +2 -2
  84. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  85. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  86. package/docs/AssetInfo.md +1 -1
  87. package/docs/BabylonStakeExtra.md +1 -0
  88. package/docs/CheckAddressValidity200Response.md +1 -1
  89. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  90. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  91. package/docs/ContractCallDestination.md +1 -1
  92. package/docs/CreateStakeActivity.md +1 -0
  93. package/docs/CreateStakeActivityExtra.md +1 -0
  94. package/docs/CreateTssRequestRequest.md +1 -0
  95. package/docs/CreateUnstakeActivity.md +1 -0
  96. package/docs/CreateWithdrawActivity.md +1 -0
  97. package/docs/CreatedWalletInfo.md +2 -0
  98. package/docs/DevelopersWebhooksApi.md +78 -69
  99. package/docs/EstimateStakeFee.md +1 -0
  100. package/docs/EstimateUnstakeFee.md +1 -0
  101. package/docs/EstimateWithdrawFee.md +1 -0
  102. package/docs/EvmContractCallDestination.md +1 -1
  103. package/docs/ExchangeId.md +2 -0
  104. package/docs/ExchangeTransferDestination.md +2 -2
  105. package/docs/ExchangeTransferSource.md +1 -1
  106. package/docs/GetToken200Response.md +4 -4
  107. package/docs/KeyShareHolder.md +1 -0
  108. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  109. package/docs/ListExchanges200ResponseInner.md +10 -0
  110. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  111. package/docs/MPCWalletInfo.md +2 -0
  112. package/docs/OAuthApi.md +26 -24
  113. package/docs/RefreshToken200Response.md +13 -0
  114. package/docs/RefreshTokenRequest.md +2 -2
  115. package/docs/SmartContractWalletType.md +1 -1
  116. package/docs/SubWalletAssetBalance.md +2 -2
  117. package/docs/TSSRequest.md +2 -0
  118. package/docs/TSSRequestWebhookEventData.md +29 -0
  119. package/docs/TransactionDepositFromWalletSource.md +1 -1
  120. package/docs/TransactionDepositToAddressDestination.md +1 -1
  121. package/docs/TransactionDepositToWalletDestination.md +2 -2
  122. package/docs/TransactionDestination.md +3 -3
  123. package/docs/TransactionEvmContractDestination.md +1 -1
  124. package/docs/TransactionExchangeWalletSource.md +1 -1
  125. package/docs/TransactionMPCWalletSource.md +1 -0
  126. package/docs/TransactionSource.md +2 -1
  127. package/docs/TransactionSubStatus.md +2 -0
  128. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  129. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  130. package/docs/TransactionTransferToWalletDestination.md +2 -2
  131. package/docs/TransactionWebhookEventData.md +3 -1
  132. package/docs/TransactionsApi.md +98 -88
  133. package/docs/TransferDestination.md +4 -4
  134. package/docs/TransferParams.md +1 -1
  135. package/docs/TransferSource.md +1 -1
  136. package/docs/WalletInfo.md +2 -0
  137. package/docs/WalletsApi.md +316 -187
  138. package/docs/WalletsExchangeWalletApi.md +230 -0
  139. package/docs/WalletsMPCWalletsApi.md +153 -135
  140. package/docs/WebhookEventData.md +10 -5
  141. package/docs/WebhookEventDataType.md +3 -1
  142. package/docs/WebhookEventType.md +12 -4
  143. package/package.json +1 -1
@@ -5,6 +5,8 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**checkAddressValidity**](WalletsApi.md#checkAddressValidity) | **GET** /wallets/check_address_validity | Check address validity
8
+ [**checkAddressesValidity**](WalletsApi.md#checkAddressesValidity) | **GET** /wallets/check_addresses_validity | Check addresses validity
9
+ [**checkLoopTransfers**](WalletsApi.md#checkLoopTransfers) | **GET** /wallets/check_loop_transfers | Check Loop transfers
8
10
  [**createAddress**](WalletsApi.md#createAddress) | **POST** /wallets/{wallet_id}/addresses | Create addresses in wallet
9
11
  [**createWallet**](WalletsApi.md#createWallet) | **POST** /wallets | Create wallet
10
12
  [**deleteWalletById**](WalletsApi.md#deleteWalletById) | **POST** /wallets/{wallet_id}/delete | Delete wallet
@@ -40,15 +42,16 @@ This operation verifies if a given address is valid for a specific chain.
40
42
 
41
43
  ```javascript
42
44
  const CoboWaas2 = require('@cobo/cobo-waas2');
43
- // initial default api client
45
+ // Initialize the API client
44
46
  const apiClient = CoboWaas2.ApiClient.instance
45
- // for dev env
46
- // apiClient.setEnv(CoboWaas2.Env.DEV);
47
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
48
- // call api
47
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
48
+ apiClient.setEnv(CoboWaas2.Env.DEV);
49
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
50
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
51
+ // Call the API
49
52
  const apiInstance = new CoboWaas2.WalletsApi();
50
- const chain_id = "ETH"; // String | 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).
51
- const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; // String | The wallet address.
53
+ const chain_id = "ETH";
54
+ const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
52
55
  apiInstance.checkAddressValidity(chain_id, address).then((data) => {
53
56
  console.log('API called successfully. Returned data: ' + data);
54
57
  }, (error) => {
@@ -79,6 +82,112 @@ Name | Type | Description | Notes
79
82
  - **Accept**: application/json
80
83
 
81
84
 
85
+ ## checkAddressesValidity
86
+
87
+ > [CheckAddressesValidity200ResponseInner] checkAddressesValidity(chain_id, addresses)
88
+
89
+ Check addresses validity
90
+
91
+ This operation verifies if given addresses are valid for a specific chain.
92
+
93
+ ### Example
94
+
95
+ ```javascript
96
+ const CoboWaas2 = require('@cobo/cobo-waas2');
97
+ // Initialize the API client
98
+ const apiClient = CoboWaas2.ApiClient.instance
99
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
100
+ apiClient.setEnv(CoboWaas2.Env.DEV);
101
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
102
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
103
+ // Call the API
104
+ const apiInstance = new CoboWaas2.WalletsApi();
105
+ const chain_id = "ETH";
106
+ const addresses = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97";
107
+ apiInstance.checkAddressesValidity(chain_id, addresses).then((data) => {
108
+ console.log('API called successfully. Returned data: ' + data);
109
+ }, (error) => {
110
+ console.error(error);
111
+ });
112
+
113
+ ```
114
+
115
+ ### Parameters
116
+
117
+
118
+ Name | Type | Description | Notes
119
+ ------------- | ------------- | ------------- | -------------
120
+ **chain_id** | **String**| 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). |
121
+ **addresses** | **String**| A list of wallet addresses, separated by comma. You can specify a maximum of 100 addresses. |
122
+
123
+ ### Return type
124
+
125
+ [**[CheckAddressesValidity200ResponseInner]**](CheckAddressesValidity200ResponseInner.md)
126
+
127
+ ### Authorization
128
+
129
+ [CoboAuth](../README.md#CoboAuth)
130
+
131
+ ### HTTP request headers
132
+
133
+ - **Content-Type**: Not defined
134
+ - **Accept**: application/json
135
+
136
+
137
+ ## checkLoopTransfers
138
+
139
+ > [CheckLoopTransfers200ResponseInner] checkLoopTransfers(token_id, source_wallet_id, destination_addresses)
140
+
141
+ Check Loop transfers
142
+
143
+ 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&#39;s website](https://loop.top/).
144
+
145
+ ### Example
146
+
147
+ ```javascript
148
+ const CoboWaas2 = require('@cobo/cobo-waas2');
149
+ // Initialize the API client
150
+ const apiClient = CoboWaas2.ApiClient.instance
151
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
152
+ apiClient.setEnv(CoboWaas2.Env.DEV);
153
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
154
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
155
+ // Call the API
156
+ const apiInstance = new CoboWaas2.WalletsApi();
157
+ const token_id = "ETH_USDT";
158
+ const source_wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
159
+ const destination_addresses = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97";
160
+ apiInstance.checkLoopTransfers(token_id, source_wallet_id, destination_addresses).then((data) => {
161
+ console.log('API called successfully. Returned data: ' + data);
162
+ }, (error) => {
163
+ console.error(error);
164
+ });
165
+
166
+ ```
167
+
168
+ ### Parameters
169
+
170
+
171
+ Name | Type | Description | Notes
172
+ ------------- | ------------- | ------------- | -------------
173
+ **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](/v2/api-references/wallets/list-enabled-tokens). |
174
+ **source_wallet_id** | **String**| The source wallet ID. |
175
+ **destination_addresses** | **String**| A list of destination wallet addresses, separated by comma. |
176
+
177
+ ### Return type
178
+
179
+ [**[CheckLoopTransfers200ResponseInner]**](CheckLoopTransfers200ResponseInner.md)
180
+
181
+ ### Authorization
182
+
183
+ [CoboAuth](../README.md#CoboAuth)
184
+
185
+ ### HTTP request headers
186
+
187
+ - **Content-Type**: Not defined
188
+ - **Accept**: application/json
189
+
190
+
82
191
  ## createAddress
83
192
 
84
193
  > [AddressInfo] createAddress(wallet_id, opts)
@@ -91,16 +200,17 @@ This operation generates one or more addresses within a specified wallet. &lt;N
91
200
 
92
201
  ```javascript
93
202
  const CoboWaas2 = require('@cobo/cobo-waas2');
94
- // initial default api client
203
+ // Initialize the API client
95
204
  const apiClient = CoboWaas2.ApiClient.instance
96
- // for dev env
97
- // apiClient.setEnv(CoboWaas2.Env.DEV);
98
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
99
- // call api
205
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
206
+ apiClient.setEnv(CoboWaas2.Env.DEV);
207
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
208
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
209
+ // Call the API
100
210
  const apiInstance = new CoboWaas2.WalletsApi();
101
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
211
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
102
212
  const opts = {
103
- 'CreateAddressRequest': new CoboWaas2.CreateAddressRequest() // CreateAddressRequest | The request body to generates addresses within a specified wallet.
213
+ 'CreateAddressRequest': new CoboWaas2.CreateAddressRequest()
104
214
  };
105
215
  apiInstance.createAddress(wallet_id, opts).then((data) => {
106
216
  console.log('API called successfully. Returned data: ' + data);
@@ -138,21 +248,22 @@ Name | Type | Description | Notes
138
248
 
139
249
  Create wallet
140
250
 
141
- This operation creates a wallet with the provided information.
251
+ This operation creates a wallet with the provided information. &lt;Note&gt;This operation is not applicable to Smart Contract Wallets.&lt;/Note&gt;
142
252
 
143
253
  ### Example
144
254
 
145
255
  ```javascript
146
256
  const CoboWaas2 = require('@cobo/cobo-waas2');
147
- // initial default api client
257
+ // Initialize the API client
148
258
  const apiClient = CoboWaas2.ApiClient.instance
149
- // for dev env
150
- // apiClient.setEnv(CoboWaas2.Env.DEV);
151
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
152
- // call api
259
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
260
+ apiClient.setEnv(CoboWaas2.Env.DEV);
261
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
262
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
263
+ // Call the API
153
264
  const apiInstance = new CoboWaas2.WalletsApi();
154
265
  const opts = {
155
- 'CreateWalletParams': new CoboWaas2.CreateWalletParams() // CreateWalletParams | The request body to create a wallet
266
+ 'CreateWalletParams': new CoboWaas2.CreateWalletParams()
156
267
  };
157
268
  apiInstance.createWallet(opts).then((data) => {
158
269
  console.log('API called successfully. Returned data: ' + data);
@@ -195,14 +306,15 @@ This operation deletes a specified wallet. &lt;Note&gt;This operation is applic
195
306
 
196
307
  ```javascript
197
308
  const CoboWaas2 = require('@cobo/cobo-waas2');
198
- // initial default api client
309
+ // Initialize the API client
199
310
  const apiClient = CoboWaas2.ApiClient.instance
200
- // for dev env
201
- // apiClient.setEnv(CoboWaas2.Env.DEV);
202
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
203
- // call api
311
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
312
+ apiClient.setEnv(CoboWaas2.Env.DEV);
313
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
314
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
315
+ // Call the API
204
316
  const apiInstance = new CoboWaas2.WalletsApi();
205
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
317
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
206
318
  apiInstance.deleteWalletById(wallet_id).then((data) => {
207
319
  console.log('API called successfully. Returned data: ' + data);
208
320
  }, (error) => {
@@ -244,15 +356,16 @@ This operation retrieves the detailed information about a specified address with
244
356
 
245
357
  ```javascript
246
358
  const CoboWaas2 = require('@cobo/cobo-waas2');
247
- // initial default api client
359
+ // Initialize the API client
248
360
  const apiClient = CoboWaas2.ApiClient.instance
249
- // for dev env
250
- // apiClient.setEnv(CoboWaas2.Env.DEV);
251
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
252
- // call api
361
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
362
+ apiClient.setEnv(CoboWaas2.Env.DEV);
363
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
364
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
365
+ // Call the API
253
366
  const apiInstance = new CoboWaas2.WalletsApi();
254
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
255
- const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; // String | The wallet address.
367
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
368
+ const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
256
369
  apiInstance.getAddress(wallet_id, address).then((data) => {
257
370
  console.log('API called successfully. Returned data: ' + data);
258
371
  }, (error) => {
@@ -295,14 +408,15 @@ This operation retrieves the detailed information about a specified chain.
295
408
 
296
409
  ```javascript
297
410
  const CoboWaas2 = require('@cobo/cobo-waas2');
298
- // initial default api client
411
+ // Initialize the API client
299
412
  const apiClient = CoboWaas2.ApiClient.instance
300
- // for dev env
301
- // apiClient.setEnv(CoboWaas2.Env.DEV);
302
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
303
- // call api
413
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
414
+ apiClient.setEnv(CoboWaas2.Env.DEV);
415
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
416
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
417
+ // Call the API
304
418
  const apiInstance = new CoboWaas2.WalletsApi();
305
- const chain_id = "ETH"; // String | 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).
419
+ const chain_id = "ETH";
306
420
  apiInstance.getChainById(chain_id).then((data) => {
307
421
  console.log('API called successfully. Returned data: ' + data);
308
422
  }, (error) => {
@@ -344,19 +458,20 @@ This operation retrieves the maximum amount that you can transfer from a wallet
344
458
 
345
459
  ```javascript
346
460
  const CoboWaas2 = require('@cobo/cobo-waas2');
347
- // initial default api client
461
+ // Initialize the API client
348
462
  const apiClient = CoboWaas2.ApiClient.instance
349
- // for dev env
350
- // apiClient.setEnv(CoboWaas2.Env.DEV);
351
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
352
- // call api
463
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
464
+ apiClient.setEnv(CoboWaas2.Env.DEV);
465
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
466
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
467
+ // Call the API
353
468
  const apiInstance = new CoboWaas2.WalletsApi();
354
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
355
- const token_id = "ETH_USDT"; // 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](/v2/api-references/wallets/list-enabled-tokens).
356
- const fee_rate = "10"; // String | The fee rate in sats/vByte or gas price in wei.
357
- const to_address = "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE"; // String | The recipient's address.
469
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
470
+ const token_id = "ETH_USDT";
471
+ const fee_rate = "10";
472
+ const to_address = "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE";
358
473
  const opts = {
359
- 'from_address': "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE" // String | The sender's address. For EVM addresses in MPC Wallets, this parameter is required.
474
+ 'from_address': "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE"
360
475
  };
361
476
  apiInstance.getMaxTransferableValue(wallet_id, token_id, fee_rate, to_address, opts).then((data) => {
362
477
  console.log('API called successfully. Returned data: ' + data);
@@ -403,14 +518,15 @@ This operation retrieves the detailed information about a specified token.
403
518
 
404
519
  ```javascript
405
520
  const CoboWaas2 = require('@cobo/cobo-waas2');
406
- // initial default api client
521
+ // Initialize the API client
407
522
  const apiClient = CoboWaas2.ApiClient.instance
408
- // for dev env
409
- // apiClient.setEnv(CoboWaas2.Env.DEV);
410
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
411
- // call api
523
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
524
+ apiClient.setEnv(CoboWaas2.Env.DEV);
525
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
526
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
527
+ // Call the API
412
528
  const apiInstance = new CoboWaas2.WalletsApi();
413
- const token_id = "ETH_USDT"; // 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](/v2/api-references/wallets/list-enabled-tokens).
529
+ const token_id = "ETH_USDT";
414
530
  apiInstance.getTokenById(token_id).then((data) => {
415
531
  console.log('API called successfully. Returned data: ' + data);
416
532
  }, (error) => {
@@ -452,14 +568,15 @@ This operation retrieves the detailed information about a specified wallet.
452
568
 
453
569
  ```javascript
454
570
  const CoboWaas2 = require('@cobo/cobo-waas2');
455
- // initial default api client
571
+ // Initialize the API client
456
572
  const apiClient = CoboWaas2.ApiClient.instance
457
- // for dev env
458
- // apiClient.setEnv(CoboWaas2.Env.DEV);
459
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
460
- // call api
573
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
574
+ apiClient.setEnv(CoboWaas2.Env.DEV);
575
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
576
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
577
+ // Call the API
461
578
  const apiInstance = new CoboWaas2.WalletsApi();
462
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
579
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
463
580
  apiInstance.getWalletById(wallet_id).then((data) => {
464
581
  console.log('API called successfully. Returned data: ' + data);
465
582
  }, (error) => {
@@ -501,20 +618,21 @@ This operation retrieves a list of addresses within a specified wallet.
501
618
 
502
619
  ```javascript
503
620
  const CoboWaas2 = require('@cobo/cobo-waas2');
504
- // initial default api client
621
+ // Initialize the API client
505
622
  const apiClient = CoboWaas2.ApiClient.instance
506
- // for dev env
507
- // apiClient.setEnv(CoboWaas2.Env.DEV);
508
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
509
- // call api
623
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
624
+ apiClient.setEnv(CoboWaas2.Env.DEV);
625
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
626
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
627
+ // Call the API
510
628
  const apiInstance = new CoboWaas2.WalletsApi();
511
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
629
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
512
630
  const opts = {
513
- 'chain_ids': "BTC,ETH", // String | A list of chain IDs, separated by comma. The chain ID 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).
514
- 'addresses': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97", // String | A list of wallet addresses, separated by comma.
515
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
516
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
517
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
631
+ 'chain_ids': "BTC,ETH",
632
+ 'addresses': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
633
+ 'limit': 10,
634
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
635
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
518
636
  };
519
637
  apiInstance.listAddresses(wallet_id, opts).then((data) => {
520
638
  console.log('API called successfully. Returned data: ' + data);
@@ -562,19 +680,20 @@ This operation retrieves all the chains that can be used by your organization.
562
680
 
563
681
  ```javascript
564
682
  const CoboWaas2 = require('@cobo/cobo-waas2');
565
- // initial default api client
683
+ // Initialize the API client
566
684
  const apiClient = CoboWaas2.ApiClient.instance
567
- // for dev env
568
- // apiClient.setEnv(CoboWaas2.Env.DEV);
569
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
570
- // call api
685
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
686
+ apiClient.setEnv(CoboWaas2.Env.DEV);
687
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
688
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
689
+ // Call the API
571
690
  const apiInstance = new CoboWaas2.WalletsApi();
572
691
  const opts = {
573
- 'wallet_type': new CoboWaas2.WalletType(), // WalletType | 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)
574
- 'wallet_subtype': new CoboWaas2.WalletSubtype(), // WalletSubtype | 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})
575
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
576
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
577
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
692
+ 'wallet_type': new CoboWaas2.WalletType(),
693
+ 'wallet_subtype': new CoboWaas2.WalletSubtype(),
694
+ 'limit': 10,
695
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
696
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
578
697
  };
579
698
  apiInstance.listEnabledChains(opts).then((data) => {
580
699
  console.log('API called successfully. Returned data: ' + data);
@@ -621,20 +740,21 @@ This operation retrieves all the tokens that can be used by your organization.
621
740
 
622
741
  ```javascript
623
742
  const CoboWaas2 = require('@cobo/cobo-waas2');
624
- // initial default api client
743
+ // Initialize the API client
625
744
  const apiClient = CoboWaas2.ApiClient.instance
626
- // for dev env
627
- // apiClient.setEnv(CoboWaas2.Env.DEV);
628
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
629
- // call api
745
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
746
+ apiClient.setEnv(CoboWaas2.Env.DEV);
747
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
748
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
749
+ // Call the API
630
750
  const apiInstance = new CoboWaas2.WalletsApi();
631
751
  const opts = {
632
- 'wallet_type': new CoboWaas2.WalletType(), // WalletType | 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)
633
- 'wallet_subtype': new CoboWaas2.WalletSubtype(), // WalletSubtype | 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})
634
- 'chain_ids': "BTC,ETH", // String | A list of chain IDs, separated by comma. The chain ID 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).
635
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
636
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
637
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
752
+ 'wallet_type': new CoboWaas2.WalletType(),
753
+ 'wallet_subtype': new CoboWaas2.WalletSubtype(),
754
+ 'chain_ids': "BTC,ETH",
755
+ 'limit': 10,
756
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
757
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
638
758
  };
639
759
  apiInstance.listEnabledTokens(opts).then((data) => {
640
760
  console.log('API called successfully. Returned data: ' + data);
@@ -676,26 +796,27 @@ Name | Type | Description | Notes
676
796
 
677
797
  List supported chains
678
798
 
679
- 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.
799
+ 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).
680
800
 
681
801
  ### Example
682
802
 
683
803
  ```javascript
684
804
  const CoboWaas2 = require('@cobo/cobo-waas2');
685
- // initial default api client
805
+ // Initialize the API client
686
806
  const apiClient = CoboWaas2.ApiClient.instance
687
- // for dev env
688
- // apiClient.setEnv(CoboWaas2.Env.DEV);
689
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
690
- // call api
807
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
808
+ apiClient.setEnv(CoboWaas2.Env.DEV);
809
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
810
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
811
+ // Call the API
691
812
  const apiInstance = new CoboWaas2.WalletsApi();
692
813
  const opts = {
693
- 'wallet_type': new CoboWaas2.WalletType(), // WalletType | 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)
694
- 'wallet_subtype': new CoboWaas2.WalletSubtype(), // WalletSubtype | 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})
695
- 'chain_ids': "BTC,ETH", // String | A list of chain IDs, separated by comma. The chain ID 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).
696
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
697
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
698
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
814
+ 'wallet_type': new CoboWaas2.WalletType(),
815
+ 'wallet_subtype': new CoboWaas2.WalletSubtype(),
816
+ 'chain_ids': "BTC,ETH",
817
+ 'limit': 10,
818
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
819
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
699
820
  };
700
821
  apiInstance.listSupportedChains(opts).then((data) => {
701
822
  console.log('API called successfully. Returned data: ' + data);
@@ -737,27 +858,28 @@ Name | Type | Description | Notes
737
858
 
738
859
  List supported tokens
739
860
 
740
- 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.
861
+ 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).
741
862
 
742
863
  ### Example
743
864
 
744
865
  ```javascript
745
866
  const CoboWaas2 = require('@cobo/cobo-waas2');
746
- // initial default api client
867
+ // Initialize the API client
747
868
  const apiClient = CoboWaas2.ApiClient.instance
748
- // for dev env
749
- // apiClient.setEnv(CoboWaas2.Env.DEV);
750
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
751
- // call api
869
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
870
+ apiClient.setEnv(CoboWaas2.Env.DEV);
871
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
872
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
873
+ // Call the API
752
874
  const apiInstance = new CoboWaas2.WalletsApi();
753
875
  const opts = {
754
- 'wallet_type': new CoboWaas2.WalletType(), // WalletType | 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)
755
- 'wallet_subtype': new CoboWaas2.WalletSubtype(), // WalletSubtype | 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})
756
- 'chain_ids': "BTC,ETH", // String | A list of chain IDs, separated by comma. The chain ID 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).
757
- 'token_ids': "ETH_USDT,ETH_USDC", // String | 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).
758
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
759
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
760
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
876
+ 'wallet_type': new CoboWaas2.WalletType(),
877
+ 'wallet_subtype': new CoboWaas2.WalletSubtype(),
878
+ 'chain_ids': "BTC,ETH",
879
+ 'token_ids': "ETH_USDT,ETH_USDC",
880
+ 'limit': 10,
881
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
882
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
761
883
  };
762
884
  apiInstance.listSupportedTokens(opts).then((data) => {
763
885
  console.log('API called successfully. Returned data: ' + data);
@@ -800,26 +922,27 @@ Name | Type | Description | Notes
800
922
 
801
923
  List token balances by address
802
924
 
803
- The operation retrieves a list of token balances for a specified address within an MPC Wallet. &lt;Note&gt;This operation is applicable to MPC Wallets only.&lt;/Note&gt;
925
+ The operation retrieves a list of token balances for a specified address within a wallet. &lt;Note&gt;This operation is applicable to MPC Wallets and Smart Contract Wallets only.&lt;/Note&gt;
804
926
 
805
927
  ### Example
806
928
 
807
929
  ```javascript
808
930
  const CoboWaas2 = require('@cobo/cobo-waas2');
809
- // initial default api client
931
+ // Initialize the API client
810
932
  const apiClient = CoboWaas2.ApiClient.instance
811
- // for dev env
812
- // apiClient.setEnv(CoboWaas2.Env.DEV);
813
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
814
- // call api
933
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
934
+ apiClient.setEnv(CoboWaas2.Env.DEV);
935
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
936
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
937
+ // Call the API
815
938
  const apiInstance = new CoboWaas2.WalletsApi();
816
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
817
- const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; // String | The wallet address.
939
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
940
+ const address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";
818
941
  const opts = {
819
- 'token_ids': "ETH_USDT,ETH_USDC", // String | 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).
820
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
821
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
822
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
942
+ 'token_ids': "ETH_USDT,ETH_USDC",
943
+ 'limit': 10,
944
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
945
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
823
946
  };
824
947
  apiInstance.listTokenBalancesForAddress(wallet_id, address, opts).then((data) => {
825
948
  console.log('API called successfully. Returned data: ' + data);
@@ -861,25 +984,26 @@ Name | Type | Description | Notes
861
984
 
862
985
  List token balances by wallet
863
986
 
864
- The operation retrieves a list of token balances within a specified wallet. &lt;Note&gt;This operation is applicable to Custodial Wallets and MPC Wallets only.&lt;/Note&gt;
987
+ The operation retrieves a list of token balances within a specified wallet. &lt;Note&gt;This operation is not applicable to Exchange Wallets.&lt;/Note&gt;
865
988
 
866
989
  ### Example
867
990
 
868
991
  ```javascript
869
992
  const CoboWaas2 = require('@cobo/cobo-waas2');
870
- // initial default api client
993
+ // Initialize the API client
871
994
  const apiClient = CoboWaas2.ApiClient.instance
872
- // for dev env
873
- // apiClient.setEnv(CoboWaas2.Env.DEV);
874
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
875
- // call api
995
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
996
+ apiClient.setEnv(CoboWaas2.Env.DEV);
997
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
998
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
999
+ // Call the API
876
1000
  const apiInstance = new CoboWaas2.WalletsApi();
877
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
1001
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
878
1002
  const opts = {
879
- 'token_ids': "ETH_USDT,ETH_USDC", // String | 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).
880
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
881
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
882
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
1003
+ 'token_ids': "ETH_USDT,ETH_USDC",
1004
+ 'limit': 10,
1005
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
1006
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
883
1007
  };
884
1008
  apiInstance.listTokenBalancesForWallet(wallet_id, opts).then((data) => {
885
1009
  console.log('API called successfully. Returned data: ' + data);
@@ -926,20 +1050,21 @@ The operation retrieves a list of unspent transaction outputs (UTXOs) for a spec
926
1050
 
927
1051
  ```javascript
928
1052
  const CoboWaas2 = require('@cobo/cobo-waas2');
929
- // initial default api client
1053
+ // Initialize the API client
930
1054
  const apiClient = CoboWaas2.ApiClient.instance
931
- // for dev env
932
- // apiClient.setEnv(CoboWaas2.Env.DEV);
933
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
934
- // call api
1055
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
1056
+ apiClient.setEnv(CoboWaas2.Env.DEV);
1057
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
1058
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
1059
+ // Call the API
935
1060
  const apiInstance = new CoboWaas2.WalletsApi();
936
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
937
- const token_id = "ETH_USDT"; // 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](/v2/api-references/wallets/list-enabled-tokens).
1061
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
1062
+ const token_id = "ETH_USDT";
938
1063
  const opts = {
939
- 'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", // String | The wallet address.
940
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
941
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
942
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
1064
+ 'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
1065
+ 'limit': 10,
1066
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
1067
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
943
1068
  };
944
1069
  apiInstance.listUtxos(wallet_id, token_id, opts).then((data) => {
945
1070
  console.log('API called successfully. Returned data: ' + data);
@@ -987,21 +1112,22 @@ This operation retrieves the information of all wallets under your organization.
987
1112
 
988
1113
  ```javascript
989
1114
  const CoboWaas2 = require('@cobo/cobo-waas2');
990
- // initial default api client
1115
+ // Initialize the API client
991
1116
  const apiClient = CoboWaas2.ApiClient.instance
992
- // for dev env
993
- // apiClient.setEnv(CoboWaas2.Env.DEV);
994
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
995
- // call api
1117
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
1118
+ apiClient.setEnv(CoboWaas2.Env.DEV);
1119
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
1120
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
1121
+ // Call the API
996
1122
  const apiInstance = new CoboWaas2.WalletsApi();
997
1123
  const opts = {
998
- 'wallet_type': new CoboWaas2.WalletType(), // WalletType | 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)
999
- 'wallet_subtype': new CoboWaas2.WalletSubtype(), // WalletSubtype | 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})
1000
- 'project_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479", // String | The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
1001
- 'vault_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479", // String | (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).
1002
- 'limit': 10, // Number | The maximum number of objects to return. For most operations, the value range is [1, 50].
1003
- 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1", // String | 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.
1004
- 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk" // String | 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.
1124
+ 'wallet_type': new CoboWaas2.WalletType(),
1125
+ 'wallet_subtype': new CoboWaas2.WalletSubtype(),
1126
+ 'project_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
1127
+ 'vault_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
1128
+ 'limit': 10,
1129
+ 'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
1130
+ 'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
1005
1131
  };
1006
1132
  apiInstance.listWallets(opts).then((data) => {
1007
1133
  console.log('API called successfully. Returned data: ' + data);
@@ -1019,7 +1145,7 @@ Name | Type | Description | Notes
1019
1145
  **wallet_type** | [**WalletType**](.md)| The wallet type. - &#x60;Custodial&#x60;: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - &#x60;MPC&#x60;: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - &#x60;SmartContract&#x60;: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - &#x60;Exchange&#x60;: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) | [optional]
1020
1146
  **wallet_subtype** | [**WalletSubtype**](.md)| The wallet subtype. - &#x60;Asset&#x60;: Custodial Wallets (Asset Wallets) - &#x60;Web3&#x60;: Custodial Wallets (Web3 Wallets) - &#x60;Main&#x60;: Exchange Wallets (Main Account) - &#x60;Sub&#x60;: Exchange Wallets (Sub Account) - &#x60;Org-Controlled&#x60;: MPC Wallets (Organization-Controlled Wallets) - &#x60;User-Controlled&#x60;: MPC Wallets (User-Controlled Wallets) - &#x60;Safe{Wallet}&#x60;: Smart Contract Wallets (Safe{Wallet}) | [optional]
1021
1147
  **project_id** | **String**| The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects). | [optional]
1022
- **vault_id** | **String**| (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). | [optional]
1148
+ **vault_id** | **String**| The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults). | [optional]
1023
1149
  **limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
1024
1150
  **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]
1025
1151
  **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]
@@ -1050,16 +1176,17 @@ This operation locks the UTXOs with specified transaction hashes. Locked UTXOs c
1050
1176
 
1051
1177
  ```javascript
1052
1178
  const CoboWaas2 = require('@cobo/cobo-waas2');
1053
- // initial default api client
1179
+ // Initialize the API client
1054
1180
  const apiClient = CoboWaas2.ApiClient.instance
1055
- // for dev env
1056
- // apiClient.setEnv(CoboWaas2.Env.DEV);
1057
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
1058
- // call api
1181
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
1182
+ apiClient.setEnv(CoboWaas2.Env.DEV);
1183
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
1184
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
1185
+ // Call the API
1059
1186
  const apiInstance = new CoboWaas2.WalletsApi();
1060
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
1187
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
1061
1188
  const opts = {
1062
- 'LockUtxosRequest': new CoboWaas2.LockUtxosRequest() // LockUtxosRequest | The request body of the Lock/Unlock UTXOs operation.
1189
+ 'LockUtxosRequest': new CoboWaas2.LockUtxosRequest()
1063
1190
  };
1064
1191
  apiInstance.lockUtxos(wallet_id, opts).then((data) => {
1065
1192
  console.log('API called successfully. Returned data: ' + data);
@@ -1103,16 +1230,17 @@ This operation unlocks the UTXOs with specified transaction hashes. Locked UTXOs
1103
1230
 
1104
1231
  ```javascript
1105
1232
  const CoboWaas2 = require('@cobo/cobo-waas2');
1106
- // initial default api client
1233
+ // Initialize the API client
1107
1234
  const apiClient = CoboWaas2.ApiClient.instance
1108
- // for dev env
1109
- // apiClient.setEnv(CoboWaas2.Env.DEV);
1110
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
1111
- // call api
1235
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
1236
+ apiClient.setEnv(CoboWaas2.Env.DEV);
1237
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
1238
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
1239
+ // Call the API
1112
1240
  const apiInstance = new CoboWaas2.WalletsApi();
1113
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
1241
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
1114
1242
  const opts = {
1115
- 'LockUtxosRequest': new CoboWaas2.LockUtxosRequest() // LockUtxosRequest | The request body of the Lock/Unlock UTXOs operation.
1243
+ 'LockUtxosRequest': new CoboWaas2.LockUtxosRequest()
1116
1244
  };
1117
1245
  apiInstance.unlockUtxos(wallet_id, opts).then((data) => {
1118
1246
  console.log('API called successfully. Returned data: ' + data);
@@ -1156,16 +1284,17 @@ This operation updates the information of a specified wallet. For Exchange Wall
1156
1284
 
1157
1285
  ```javascript
1158
1286
  const CoboWaas2 = require('@cobo/cobo-waas2');
1159
- // initial default api client
1287
+ // Initialize the API client
1160
1288
  const apiClient = CoboWaas2.ApiClient.instance
1161
- // for dev env
1162
- // apiClient.setEnv(CoboWaas2.Env.DEV);
1163
- apiClient.setPrivateKey("<YOUR_API_PRIVATE_KEY_IN_HEX>");
1164
- // call api
1289
+ // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
1290
+ apiClient.setEnv(CoboWaas2.Env.DEV);
1291
+ // Replace `<YOUR_PRIVATE_KEY>` with your private key
1292
+ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
1293
+ // Call the API
1165
1294
  const apiInstance = new CoboWaas2.WalletsApi();
1166
- const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"; // String | The wallet ID.
1295
+ const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
1167
1296
  const opts = {
1168
- 'UpdateWalletParams': new CoboWaas2.UpdateWalletParams() // UpdateWalletParams | The request body.
1297
+ 'UpdateWalletParams': new CoboWaas2.UpdateWalletParams()
1169
1298
  };
1170
1299
  apiInstance.updateWalletById(wallet_id, opts).then((data) => {
1171
1300
  console.log('API called successfully. Returned data: ' + data);