@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.
- package/README.md +16 -3
- package/dist/ApiClient.js +1 -1
- package/dist/api/OAuthApi.js +16 -15
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +123 -12
- package/dist/api/WalletsExchangeWalletApi.js +254 -0
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/index.js +56 -0
- package/dist/model/AddressInfo.js +1 -1
- package/dist/model/AddressTransferDestination.js +3 -3
- package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/AssetInfo.js +2 -2
- package/dist/model/BabylonStakeExtra.js +9 -0
- package/dist/model/CheckAddressValidity200Response.js +2 -2
- package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
- package/dist/model/ContractCallDestination.js +1 -1
- package/dist/model/CreateStakeActivity.js +14 -1
- package/dist/model/CreateStakeActivityExtra.js +6 -0
- package/dist/model/CreateTssRequestRequest.js +13 -0
- package/dist/model/CreateUnstakeActivity.js +13 -0
- package/dist/model/CreateWithdrawActivity.js +13 -0
- package/dist/model/CreatedWalletInfo.js +12 -0
- package/dist/model/EstimateStakeFee.js +19 -1
- package/dist/model/EstimateUnstakeFee.js +18 -0
- package/dist/model/EstimateWithdrawFee.js +18 -0
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/ExchangeId.js +5 -0
- package/dist/model/ExchangeTransferDestination.js +16 -16
- package/dist/model/ExchangeTransferSource.js +14 -14
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +13 -0
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
- package/dist/model/ListExchanges200ResponseInner.js +122 -0
- package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
- package/dist/model/MPCWalletInfo.js +26 -0
- package/dist/model/RefreshToken200Response.js +135 -0
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SmartContractWalletType.js +2 -2
- package/dist/model/SubWalletAssetBalance.js +10 -10
- package/dist/model/TSSRequest.js +23 -1
- package/dist/model/TSSRequestWebhookEventData.js +263 -0
- package/dist/model/TransactionDepositFromWalletSource.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +2 -2
- package/dist/model/TransactionDepositToWalletDestination.js +9 -9
- package/dist/model/TransactionDestination.js +5 -5
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +6 -6
- package/dist/model/TransactionMPCWalletSource.js +13 -0
- package/dist/model/TransactionSource.js +8 -2
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +9 -9
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +6 -6
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/TransferSource.js +3 -3
- package/dist/model/WalletInfo.js +12 -0
- package/dist/model/WebhookEventData.js +49 -15
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +24 -4
- package/docs/AddressInfo.md +1 -1
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AssetInfo.md +1 -1
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/CheckAddressValidity200Response.md +1 -1
- package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +1 -0
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTssRequestRequest.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateWithdrawActivity.md +1 -0
- package/docs/CreatedWalletInfo.md +2 -0
- package/docs/DevelopersWebhooksApi.md +78 -69
- package/docs/EstimateStakeFee.md +1 -0
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimateWithdrawFee.md +1 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeId.md +2 -0
- package/docs/ExchangeTransferDestination.md +2 -2
- package/docs/ExchangeTransferSource.md +1 -1
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -0
- package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
- package/docs/ListExchanges200ResponseInner.md +10 -0
- package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
- package/docs/MPCWalletInfo.md +2 -0
- package/docs/OAuthApi.md +26 -24
- package/docs/RefreshToken200Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SmartContractWalletType.md +1 -1
- package/docs/SubWalletAssetBalance.md +2 -2
- package/docs/TSSRequest.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +29 -0
- package/docs/TransactionDepositFromWalletSource.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +2 -2
- package/docs/TransactionDestination.md +3 -3
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionExchangeWalletSource.md +1 -1
- package/docs/TransactionMPCWalletSource.md +1 -0
- package/docs/TransactionSource.md +2 -1
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +98 -88
- package/docs/TransferDestination.md +4 -4
- package/docs/TransferParams.md +1 -1
- package/docs/TransferSource.md +1 -1
- package/docs/WalletInfo.md +2 -0
- package/docs/WalletsApi.md +316 -187
- package/docs/WalletsExchangeWalletApi.md +230 -0
- package/docs/WalletsMPCWalletsApi.md +153 -135
- package/docs/WebhookEventData.md +10 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +12 -4
- package/package.json +1 -1
|
@@ -28,15 +28,16 @@ This operation registers a new webhook endpoint for your organization.
|
|
|
28
28
|
|
|
29
29
|
```javascript
|
|
30
30
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
31
|
-
//
|
|
31
|
+
// Initialize the API client
|
|
32
32
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
34
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
35
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
36
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
37
|
+
// Call the API
|
|
37
38
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
38
39
|
const opts = {
|
|
39
|
-
'CreateWebhookEndpointRequest': new CoboWaas2.CreateWebhookEndpointRequest()
|
|
40
|
+
'CreateWebhookEndpointRequest': new CoboWaas2.CreateWebhookEndpointRequest()
|
|
40
41
|
};
|
|
41
42
|
apiInstance.createWebhookEndpoint(opts).then((data) => {
|
|
42
43
|
console.log('API called successfully. Returned data: ' + data);
|
|
@@ -79,14 +80,15 @@ This operation retrieves the information of a specified webhook endpoint.
|
|
|
79
80
|
|
|
80
81
|
```javascript
|
|
81
82
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
82
|
-
//
|
|
83
|
+
// Initialize the API client
|
|
83
84
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
86
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
87
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
88
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
89
|
+
// Call the API
|
|
88
90
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
89
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
91
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
90
92
|
apiInstance.getWebhookEndpointById(endpoint_id).then((data) => {
|
|
91
93
|
console.log('API called successfully. Returned data: ' + data);
|
|
92
94
|
}, (error) => {
|
|
@@ -128,15 +130,16 @@ This operation retrieves the information of a webhook event by the event ID.
|
|
|
128
130
|
|
|
129
131
|
```javascript
|
|
130
132
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
131
|
-
//
|
|
133
|
+
// Initialize the API client
|
|
132
134
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
136
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
137
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
138
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
139
|
+
// Call the API
|
|
137
140
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
138
|
-
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
139
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
141
|
+
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
142
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
140
143
|
apiInstance.getWebhookEventById(event_id, endpoint_id).then((data) => {
|
|
141
144
|
console.log('API called successfully. Returned data: ' + data);
|
|
142
145
|
}, (error) => {
|
|
@@ -179,19 +182,20 @@ This operation retrieves the information of all webhook endpoints registered und
|
|
|
179
182
|
|
|
180
183
|
```javascript
|
|
181
184
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
182
|
-
//
|
|
185
|
+
// Initialize the API client
|
|
183
186
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
188
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
189
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
190
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
191
|
+
// Call the API
|
|
188
192
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
189
193
|
const opts = {
|
|
190
|
-
'status': new CoboWaas2.WebhookEndpointStatus(),
|
|
191
|
-
'event_type': new CoboWaas2.WebhookEventType(),
|
|
192
|
-
'limit': 10,
|
|
193
|
-
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
194
|
-
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
194
|
+
'status': new CoboWaas2.WebhookEndpointStatus(),
|
|
195
|
+
'event_type': new CoboWaas2.WebhookEventType(),
|
|
196
|
+
'limit': 10,
|
|
197
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
198
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
195
199
|
};
|
|
196
200
|
apiInstance.listWebhookEndpoints(opts).then((data) => {
|
|
197
201
|
console.log('API called successfully. Returned data: ' + data);
|
|
@@ -238,12 +242,13 @@ This operation retrieves all supported webhook event types.
|
|
|
238
242
|
|
|
239
243
|
```javascript
|
|
240
244
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
241
|
-
//
|
|
245
|
+
// Initialize the API client
|
|
242
246
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
243
|
-
//
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
248
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
249
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
250
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
251
|
+
// Call the API
|
|
247
252
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
248
253
|
apiInstance.listWebhookEventDefinitions().then((data) => {
|
|
249
254
|
console.log('API called successfully. Returned data: ' + data);
|
|
@@ -283,19 +288,20 @@ This operation retrieves a list of webhook event logs by event ID. Each retry wi
|
|
|
283
288
|
|
|
284
289
|
```javascript
|
|
285
290
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
286
|
-
//
|
|
291
|
+
// Initialize the API client
|
|
287
292
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
293
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
294
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
295
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
296
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
297
|
+
// Call the API
|
|
292
298
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
293
|
-
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
294
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
299
|
+
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
300
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
295
301
|
const opts = {
|
|
296
|
-
'limit': 10,
|
|
297
|
-
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
298
|
-
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
302
|
+
'limit': 10,
|
|
303
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
304
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
299
305
|
};
|
|
300
306
|
apiInstance.listWebhookEventLogs(event_id, endpoint_id, opts).then((data) => {
|
|
301
307
|
console.log('API called successfully. Returned data: ' + data);
|
|
@@ -342,20 +348,21 @@ This operation retrieves a list of webhook events that have occurred within the
|
|
|
342
348
|
|
|
343
349
|
```javascript
|
|
344
350
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
345
|
-
//
|
|
351
|
+
// Initialize the API client
|
|
346
352
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
347
|
-
//
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
353
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
354
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
355
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
356
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
357
|
+
// Call the API
|
|
351
358
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
352
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
359
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
353
360
|
const opts = {
|
|
354
|
-
'status': new CoboWaas2.WebhookEventStatus(),
|
|
355
|
-
'type': new CoboWaas2.WebhookEventType(),
|
|
356
|
-
'limit': 10,
|
|
357
|
-
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
358
|
-
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
361
|
+
'status': new CoboWaas2.WebhookEventStatus(),
|
|
362
|
+
'type': new CoboWaas2.WebhookEventType(),
|
|
363
|
+
'limit': 10,
|
|
364
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
365
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
359
366
|
};
|
|
360
367
|
apiInstance.listWebhookEvents(endpoint_id, opts).then((data) => {
|
|
361
368
|
console.log('API called successfully. Returned data: ' + data);
|
|
@@ -403,15 +410,16 @@ This operation retries delivering a webhook event with the specified event ID. Y
|
|
|
403
410
|
|
|
404
411
|
```javascript
|
|
405
412
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
406
|
-
//
|
|
413
|
+
// Initialize the API client
|
|
407
414
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
408
|
-
//
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
415
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
416
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
417
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
418
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
419
|
+
// Call the API
|
|
412
420
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
413
|
-
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
414
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
421
|
+
const event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
422
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
415
423
|
apiInstance.retryWebhookEventById(event_id, endpoint_id).then((data) => {
|
|
416
424
|
console.log('API called successfully. Returned data: ' + data);
|
|
417
425
|
}, (error) => {
|
|
@@ -454,16 +462,17 @@ This operation updates the information of a specified webhook endpoint.
|
|
|
454
462
|
|
|
455
463
|
```javascript
|
|
456
464
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
457
|
-
//
|
|
465
|
+
// Initialize the API client
|
|
458
466
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
459
|
-
//
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
467
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
468
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
469
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
470
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
471
|
+
// Call the API
|
|
463
472
|
const apiInstance = new CoboWaas2.DevelopersWebhooksApi();
|
|
464
|
-
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
473
|
+
const endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
465
474
|
const opts = {
|
|
466
|
-
'UpdateWebhookEndpointByIdRequest': new CoboWaas2.UpdateWebhookEndpointByIdRequest()
|
|
475
|
+
'UpdateWebhookEndpointByIdRequest': new CoboWaas2.UpdateWebhookEndpointByIdRequest()
|
|
467
476
|
};
|
|
468
477
|
apiInstance.updateWebhookEndpointById(endpoint_id, opts).then((data) => {
|
|
469
478
|
console.log('API called successfully. Returned data: ' + data);
|
package/docs/EstimateStakeFee.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**activity_type** | [**ActivityType**](ActivityType.md) | |
|
|
8
|
+
**request_id** | **String** | The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
8
9
|
**source** | [**StakingSource**](StakingSource.md) | | [optional]
|
|
9
10
|
**pool_id** | **String** | The id of the staking pool |
|
|
10
11
|
**amount** | **String** | The amount to stake |
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**activity_type** | [**ActivityType**](ActivityType.md) | |
|
|
8
|
+
**request_id** | **String** | The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
8
9
|
**staking_id** | **String** | The id of the related staking. |
|
|
9
10
|
**amount** | **String** | The amount to stake | [optional]
|
|
10
11
|
**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional]
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**activity_type** | [**ActivityType**](ActivityType.md) | |
|
|
8
|
+
**request_id** | **String** | The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
8
9
|
**staking_id** | **String** | The id of the related staking. |
|
|
9
10
|
**amount** | **String** | The amount to stake | [optional]
|
|
10
11
|
**address** | **String** | The withdraw to address. | [optional]
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**destination_type** | [**ContractCallDestinationType**](ContractCallDestinationType.md) | |
|
|
8
8
|
**address** | **String** | The destination address. |
|
|
9
|
-
**value** | **String** | The
|
|
9
|
+
**value** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. | [optional]
|
|
10
10
|
**calldata** | **Blob** | The data that is used to invoke a specific function or method within the specified contract at the destination address. |
|
|
11
11
|
|
|
12
12
|
|
package/docs/ExchangeId.md
CHANGED
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**destination_type** | [**TransferDestinationType**](TransferDestinationType.md) | |
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
|
-
**
|
|
10
|
-
**amount** | **String** | The
|
|
9
|
+
**trading_account_type** | **String** | The trading account type. |
|
|
10
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. |
|
|
11
11
|
|
|
12
12
|
|
|
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**source_type** | [**WalletSubtype**](WalletSubtype.md) | |
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
|
-
**
|
|
9
|
+
**trading_account_type** | **String** | The trading account type. |
|
|
10
10
|
|
|
11
11
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**access_token** | **String** | The access token
|
|
8
|
-
**token_type** | **String** | The type of the tokens. | [optional]
|
|
9
|
-
**scope** | **String** | The scope of the access token.
|
|
7
|
+
**access_token** | **String** | The access token. | [optional]
|
|
8
|
+
**token_type** | **String** | The type of the tokens, which is Bearer. | [optional]
|
|
9
|
+
**scope** | **String** | The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. | [optional]
|
|
10
10
|
**expires_in** | **Number** | The time in seconds in which the access token expires. | [optional]
|
|
11
|
-
**refresh_token** | **String** | The refresh token, used
|
|
11
|
+
**refresh_token** | **String** | The refresh token, used to obtain a new access token when the current access token expires. | [optional]
|
|
12
12
|
|
|
13
13
|
|
package/docs/KeyShareHolder.md
CHANGED
|
@@ -10,5 +10,6 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**online** | **Boolean** | Whether the key share holder's TSS Node is online. - `true`: The TSS Node is online. - `false`: The TSS Node is offline. | [optional]
|
|
11
11
|
**signer** | **Boolean** | Whether the key share holder's TSS Node is a designated transaction signer. - `true`: The TSS Node is a designated transaction signer. - `false`: The TSS Node is not a designated transaction signer. | [optional]
|
|
12
12
|
**status** | [**KeyShareHolderStatus**](KeyShareHolderStatus.md) | | [optional]
|
|
13
|
+
**account_id** | **String** | The key share holder's Cobo Portal account ID. | [optional]
|
|
13
14
|
|
|
14
15
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListAssetBalancesForExchangeWallet200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[SubWalletAssetBalance]**](SubWalletAssetBalance.md) | | [optional]
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListExchanges200ResponseInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**exchange_id** | [**ExchangeId**](ExchangeId.md) | |
|
|
8
|
+
**supported_trading_account_types** | **[String]** | The supported trading account types of this exchange. |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListSupportedAssetsForExchange200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[AssetInfo]**](AssetInfo.md) | | [optional]
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
|
package/docs/MPCWalletInfo.md
CHANGED
|
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**name** | **String** | The wallet name. |
|
|
11
11
|
**org_id** | **String** | The ID of the owning organization. |
|
|
12
12
|
**project_id** | **String** | The project ID. | [optional]
|
|
13
|
+
**project_name** | **String** | The project name. | [optional]
|
|
13
14
|
**vault_id** | **String** | The ID of the owning vault. |
|
|
15
|
+
**vault_name** | **String** | The vault name. | [optional]
|
|
14
16
|
|
|
15
17
|
|
package/docs/OAuthApi.md
CHANGED
|
@@ -4,8 +4,8 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
-
[**getToken**](OAuthApi.md#getToken) | **GET** /oauth/token | Get
|
|
8
|
-
[**refreshToken**](OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh
|
|
7
|
+
[**getToken**](OAuthApi.md#getToken) | **GET** /oauth/token | Get access token
|
|
8
|
+
[**refreshToken**](OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh access token
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -13,24 +13,25 @@ Method | HTTP request | Description
|
|
|
13
13
|
|
|
14
14
|
> GetToken200Response getToken(client_id, org_id, grant_type)
|
|
15
15
|
|
|
16
|
-
Get
|
|
16
|
+
Get access token
|
|
17
17
|
|
|
18
|
-
<Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
18
|
+
<Note>This operation is only applicable to Cobo Portal App developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to get an access token and a refresh token with a specified App ID, Organization ID, and grant type. Access tokens allow the app to signal to the WaaS service that it has received permission to access specific resources of the app user's [organization](https://manuals.cobo.com/en/portal/organization/introduction). Once the app has been granted permission by the organization's admin, it can use this operation to obtain both an access token and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call [Refresh token](/v2/api-references/oauth/refresh-access-token) to get a new access token and a new refresh token.
|
|
19
19
|
|
|
20
20
|
### Example
|
|
21
21
|
|
|
22
22
|
```javascript
|
|
23
23
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
24
|
-
//
|
|
24
|
+
// Initialize the API client
|
|
25
25
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
27
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
28
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
29
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
30
|
+
// Call the API
|
|
30
31
|
const apiInstance = new CoboWaas2.OAuthApi();
|
|
31
|
-
const client_id = "pvSwS8iFrfK0oZrB0ugG54XPDOLEv0Ij";
|
|
32
|
-
const org_id = "e3986401-4aec-480a-973d-e775a4518413";
|
|
33
|
-
const grant_type = "org_implicit";
|
|
32
|
+
const client_id = "pvSwS8iFrfK0oZrB0ugG54XPDOLEv0Ij";
|
|
33
|
+
const org_id = "e3986401-4aec-480a-973d-e775a4518413";
|
|
34
|
+
const grant_type = "org_implicit";
|
|
34
35
|
apiInstance.getToken(client_id, org_id, grant_type).then((data) => {
|
|
35
36
|
console.log('API called successfully. Returned data: ' + data);
|
|
36
37
|
}, (error) => {
|
|
@@ -45,8 +46,8 @@ apiInstance.getToken(client_id, org_id, grant_type).then((data) => {
|
|
|
45
46
|
Name | Type | Description | Notes
|
|
46
47
|
------------- | ------------- | ------------- | -------------
|
|
47
48
|
**client_id** | **String**| The App ID, a unique identifier to distinguish Cobo Portal Apps. You can get the App ID by retrieving the Manifest file after receiving the notification of app launch approval. |
|
|
48
|
-
**org_id** | **String**|
|
|
49
|
-
**grant_type** | **String**| The
|
|
49
|
+
**org_id** | **String**| Organization ID, a unique identifier to distinguish different organizations. You can get the Organization ID by retrieving the Manifest file after receiving the notification of app launch approval. |
|
|
50
|
+
**grant_type** | **String**| The OAuth grant type. Set the value as `org_implicit`. |
|
|
50
51
|
|
|
51
52
|
### Return type
|
|
52
53
|
|
|
@@ -64,24 +65,25 @@ Name | Type | Description | Notes
|
|
|
64
65
|
|
|
65
66
|
## refreshToken
|
|
66
67
|
|
|
67
|
-
>
|
|
68
|
+
> RefreshToken200Response refreshToken(RefreshTokenRequest)
|
|
68
69
|
|
|
69
|
-
Refresh
|
|
70
|
+
Refresh access token
|
|
70
71
|
|
|
71
|
-
<Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an
|
|
72
|
+
<Note>This operation is only applicable to Cobo Portal Apps developers. To call this operation, you need to use the OAuth authentication method that requires an app key.</Note> This operation allows Cobo Portal Apps to obtain a new access token with a specified App ID, grant type and a refresh token. For security purposes, access tokens expire after a certain period. Once they expire, the app needs to call this operation to get a new access token and a new refresh token.
|
|
72
73
|
|
|
73
74
|
### Example
|
|
74
75
|
|
|
75
76
|
```javascript
|
|
76
77
|
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
77
|
-
//
|
|
78
|
+
// Initialize the API client
|
|
78
79
|
const apiClient = CoboWaas2.ApiClient.instance
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
81
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
82
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
83
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
84
|
+
// Call the API
|
|
83
85
|
const apiInstance = new CoboWaas2.OAuthApi();
|
|
84
|
-
const RefreshTokenRequest = new CoboWaas2.RefreshTokenRequest();
|
|
86
|
+
const RefreshTokenRequest = new CoboWaas2.RefreshTokenRequest();
|
|
85
87
|
apiInstance.refreshToken(RefreshTokenRequest).then((data) => {
|
|
86
88
|
console.log('API called successfully. Returned data: ' + data);
|
|
87
89
|
}, (error) => {
|
|
@@ -99,7 +101,7 @@ Name | Type | Description | Notes
|
|
|
99
101
|
|
|
100
102
|
### Return type
|
|
101
103
|
|
|
102
|
-
[**
|
|
104
|
+
[**RefreshToken200Response**](RefreshToken200Response.md)
|
|
103
105
|
|
|
104
106
|
### Authorization
|
|
105
107
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.RefreshToken200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**access_token** | **String** | The new access token. | [optional]
|
|
8
|
+
**token_type** | **String** | The type of the tokens, which is Bearer. | [optional]
|
|
9
|
+
**scope** | **String** | The scope of the access token to limit the app's access to the organization's resources. **Note**: Currently this property value is empty. The scope of the access token is based on the permissions granted when the app user installs the app. | [optional]
|
|
10
|
+
**expires_in** | **Number** | The time in seconds in which the new access token expires. | [optional]
|
|
11
|
+
**refresh_token** | **String** | The refresh token, used to obtain another access token when the new access token expires. | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**client_id** | **String** | The App ID, a unique identifier to distinguish Cobo Portal Apps. You can get the App ID by retrieving the Manifest file after receiving the notification of app launch approval. | [optional]
|
|
8
|
-
**grant_type** | **String** | The
|
|
9
|
-
**refresh_token** | **String** | The refresh token of the
|
|
8
|
+
**grant_type** | **String** | The OAuth grant type. Set the value as `refresh_token`. | [optional]
|
|
9
|
+
**refresh_token** | **String** | The refresh token of the current access token. | [optional]
|
|
10
10
|
|
|
11
11
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**
|
|
8
|
-
**asset_id** | **String** |
|
|
7
|
+
**trading_account_type** | **String** | The trading account type. | [optional]
|
|
8
|
+
**asset_id** | **String** | The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account. |
|
|
9
9
|
**balance** | [**TokenBalanceBalance**](TokenBalanceBalance.md) | |
|
|
10
10
|
|
|
11
11
|
|
package/docs/TSSRequest.md
CHANGED
|
@@ -9,5 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**target_key_share_holder_group_id** | **String** | The target key share holder group ID. | [optional]
|
|
10
10
|
**type** | [**TSSRequestType**](TSSRequestType.md) | | [optional]
|
|
11
11
|
**status** | [**TSSRequestStatus**](TSSRequestStatus.md) | | [optional]
|
|
12
|
+
**description** | **String** | The description of the TSS request. | [optional]
|
|
13
|
+
**created_timestamp** | **Number** | The TSS request's creation time in Unix timestamp format, measured in milliseconds. | [optional]
|
|
12
14
|
|
|
13
15
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# CoboWaas2.TSSRequestWebhookEventData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data_type** | **String** | The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. |
|
|
8
|
+
**tss_request_id** | **String** | The TSS request ID. | [optional]
|
|
9
|
+
**source_key_share_holder_group** | [**SourceGroup**](SourceGroup.md) | | [optional]
|
|
10
|
+
**target_key_share_holder_group_id** | **String** | The target key share holder group ID. | [optional]
|
|
11
|
+
**type** | [**TSSRequestType**](TSSRequestType.md) | | [optional]
|
|
12
|
+
**status** | [**TSSRequestStatus**](TSSRequestStatus.md) | | [optional]
|
|
13
|
+
**description** | **String** | The description of the TSS request. | [optional]
|
|
14
|
+
**created_timestamp** | **Number** | The TSS request's creation time in Unix timestamp format, measured in milliseconds. | [optional]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Enum: DataTypeEnum
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
* `Transaction` (value: `"Transaction"`)
|
|
22
|
+
|
|
23
|
+
* `TSSRequest` (value: `"TSSRequest"`)
|
|
24
|
+
|
|
25
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
@@ -8,6 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
9
|
**wallet_type** | [**WalletType**](WalletType.md) | |
|
|
10
10
|
**wallet_subtype** | [**WalletSubtype**](WalletSubtype.md) | |
|
|
11
|
-
**
|
|
11
|
+
**trading_account_type** | **String** | The exchange trading account or a sub-wallet ID. | [optional]
|
|
12
12
|
|
|
13
13
|
|
|
@@ -10,6 +10,6 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**wallet_subtype** | [**WalletSubtype**](WalletSubtype.md) | | [optional]
|
|
11
11
|
**address** | **String** | The destination address. |
|
|
12
12
|
**memo** | **String** | The memo that identifies a transaction in order to credit the correct account. For transfers out of Cobo Portal, it is highly recommended to include a memo for the chains such as XRP, EOS, XLM, IOST, BNB_BNB, ATOM, LUNA, and TON. | [optional]
|
|
13
|
-
**amount** | **String** | The
|
|
13
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. |
|
|
14
14
|
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
9
|
**wallet_type** | [**WalletType**](WalletType.md) | |
|
|
10
10
|
**wallet_subtype** | [**WalletSubtype**](WalletSubtype.md) | |
|
|
11
|
-
**
|
|
11
|
+
**trading_account_type** | **String** | The trading account type. | [optional]
|
|
12
12
|
**exchange_id** | [**ExchangeId**](ExchangeId.md) | | [optional]
|
|
13
|
-
**amount** | **String** | The
|
|
13
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. |
|
|
14
14
|
|
|
15
15
|
|
|
@@ -11,11 +11,11 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**force_internal** | **Boolean** | Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. | [optional]
|
|
12
12
|
**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. | [optional]
|
|
13
13
|
**wallet_id** | **String** | The wallet ID. |
|
|
14
|
-
**
|
|
14
|
+
**trading_account_type** | **String** | The trading account type. | [optional]
|
|
15
15
|
**exchange_id** | [**ExchangeId**](ExchangeId.md) | | [optional]
|
|
16
|
-
**amount** | **String** | The
|
|
16
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. |
|
|
17
17
|
**address** | **String** | The destination address. |
|
|
18
|
-
**value** | **String** | The
|
|
18
|
+
**value** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. | [optional]
|
|
19
19
|
**calldata** | **Blob** | The data that is used to invoke a specific function or method within the specified contract at the destination address. |
|
|
20
20
|
**message** | **String** | The raw data of the message to be signed, encoded in Base64 format. |
|
|
21
21
|
**structured_data** | **{String: Object}** | The structured data to be signed, formatted as a JSON object according to the EIP-712 standard. |
|