@cobo/cobo-waas2 1.9.0 → 1.10.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 +40 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/DevelopersApi.js +4 -4
- package/dist/api/StakingsApi.js +400 -6
- package/dist/api/SwapsApi.js +360 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +164 -3
- package/dist/model/AddressesEventData.js +4 -4
- package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
- package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
- package/dist/model/BabylonAirdropPop.js +186 -0
- package/dist/model/BabylonAirdropRegistration.js +172 -0
- package/dist/model/BabylonEligibleAirdrop.js +157 -0
- package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
- package/dist/model/BabylonRegistrationStatus.js +66 -0
- package/dist/model/BabylonStakingRegistration.js +185 -0
- package/dist/model/ContractCallSource.js +6 -0
- package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
- package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
- package/dist/model/CreateSwapActivityRequest.js +153 -0
- package/dist/model/CreateSwapQuote201Response.js +264 -0
- package/dist/model/CreateSwapQuoteRequest.js +166 -0
- package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
- package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
- package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
- package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/MessageSignSource.js +6 -0
- package/dist/model/MpcContractCallSource.js +16 -0
- package/dist/model/MpcMessageSignSource.js +16 -0
- package/dist/model/MpcSigningGroup.js +27 -4
- package/dist/model/MpcTransferSource.js +16 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
- package/dist/model/StakingPoolId.js +30 -0
- package/dist/model/StakingPoolType.js +15 -0
- package/dist/model/SwapQuote.js +203 -0
- package/dist/model/TransactionDestination.js +4 -4
- package/dist/model/TransactionRawTxInfo.js +16 -0
- package/dist/model/TransactionRbfSource.js +6 -0
- package/dist/model/TransactionUtxoChange.js +101 -0
- package/dist/model/TransferSource.js +6 -0
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/AddressesEventData.md +1 -1
- package/docs/AddressesEventDataAllOfAddresses.md +19 -0
- package/docs/BabylonAirdropPop.md +14 -0
- package/docs/BabylonAirdropRegistration.md +16 -0
- package/docs/BabylonEligibleAirdrop.md +14 -0
- package/docs/BabylonRegistrationRequestStatus.md +14 -0
- package/docs/BabylonRegistrationStatus.md +14 -0
- package/docs/BabylonStakingRegistration.md +17 -0
- package/docs/ContractCallSource.md +1 -0
- package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
- package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
- package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
- package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
- package/docs/CreateSwapActivityRequest.md +12 -0
- package/docs/CreateSwapQuote201Response.md +17 -0
- package/docs/CreateSwapQuoteRequest.md +13 -0
- package/docs/DevelopersApi.md +2 -2
- package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
- package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
- package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
- package/docs/ListEnableTokenPairs200Response.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/MessageSignSource.md +1 -0
- package/docs/MpcContractCallSource.md +1 -0
- package/docs/MpcMessageSignSource.md +1 -0
- package/docs/MpcSigningGroup.md +1 -1
- package/docs/MpcTransferSource.md +1 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
- package/docs/StakingPoolId.md +12 -0
- package/docs/StakingPoolType.md +6 -0
- package/docs/StakingsApi.md +449 -1
- package/docs/SwapQuote.md +16 -0
- package/docs/SwapsApi.md +348 -0
- package/docs/TransactionRawTxInfo.md +1 -0
- package/docs/TransactionRbfSource.md +1 -0
- package/docs/TransactionUtxoChange.md +10 -0
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferSource.md +1 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/docs/SwapSummary.md +0 -10
package/docs/StakingsApi.md
CHANGED
|
@@ -4,21 +4,133 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**createBabylonAirdropRegistration**](StakingsApi.md#createBabylonAirdropRegistration) | **POST** /stakings/protocols/babylon/airdrops/registrations | Register for Babylon airdrop
|
|
8
|
+
[**createBabylonStakingRegistration**](StakingsApi.md#createBabylonStakingRegistration) | **POST** /stakings/protocols/babylon/stakings/registrations | Register for Babylon Phase-2
|
|
7
9
|
[**createClaimActivity**](StakingsApi.md#createClaimActivity) | **POST** /stakings/activities/claim | Create claim activity
|
|
8
10
|
[**createStakeActivity**](StakingsApi.md#createStakeActivity) | **POST** /stakings/activities/stake | Create stake activity
|
|
9
11
|
[**createUnstakeActivity**](StakingsApi.md#createUnstakeActivity) | **POST** /stakings/activities/unstake | Create unstake activity
|
|
10
12
|
[**createWithdrawActivity**](StakingsApi.md#createWithdrawActivity) | **POST** /stakings/activities/withdraw | Create withdraw activity
|
|
13
|
+
[**getBabylonAirdropRegistrationById**](StakingsApi.md#getBabylonAirdropRegistrationById) | **GET** /stakings/protocols/babylon/airdrops/registrations/{registration_id} | Get Babylon airdrop registration details
|
|
14
|
+
[**getBabylonStakingRegistrationById**](StakingsApi.md#getBabylonStakingRegistrationById) | **GET** /stakings/protocols/babylon/stakings/registrations/{registration_id} | Get Babylon Phase-2 registration details
|
|
11
15
|
[**getStakingActivityById**](StakingsApi.md#getStakingActivityById) | **GET** /stakings/activities/{activity_id} | Get staking activity details
|
|
12
16
|
[**getStakingById**](StakingsApi.md#getStakingById) | **GET** /stakings/{staking_id} | Get staking position details
|
|
13
17
|
[**getStakingEstimationFee**](StakingsApi.md#getStakingEstimationFee) | **POST** /stakings/estimate_fee | Estimate staking fees
|
|
14
18
|
[**getStakingEstimationFeeV2**](StakingsApi.md#getStakingEstimationFeeV2) | **POST** /stakings/estimate_fee_v2 | Estimate staking fees v2
|
|
15
19
|
[**getStakingPoolById**](StakingsApi.md#getStakingPoolById) | **GET** /stakings/pools/{pool_id} | Get staking pool details
|
|
20
|
+
[**listBabylonAirdropRegistrations**](StakingsApi.md#listBabylonAirdropRegistrations) | **GET** /stakings/protocols/babylon/airdrops/registrations | List Babylon airdrop registrations
|
|
21
|
+
[**listBabylonEligibleAirdrops**](StakingsApi.md#listBabylonEligibleAirdrops) | **GET** /stakings/protocols/babylon/airdrops/eligibles | List wallets eligible for Babylon airdrop
|
|
22
|
+
[**listBabylonEligibleStakings**](StakingsApi.md#listBabylonEligibleStakings) | **GET** /stakings/protocols/babylon/stakings/eligibles | List staking positions eligible for Babylon Phase-2
|
|
23
|
+
[**listBabylonStakingRegistrations**](StakingsApi.md#listBabylonStakingRegistrations) | **GET** /stakings/protocols/babylon/stakings/registrations | List Babylon Phase-2 registrations
|
|
16
24
|
[**listStakingActivities**](StakingsApi.md#listStakingActivities) | **GET** /stakings/activities | List staking activities
|
|
17
25
|
[**listStakingPools**](StakingsApi.md#listStakingPools) | **GET** /stakings/pools | List staking pools
|
|
18
26
|
[**listStakings**](StakingsApi.md#listStakings) | **GET** /stakings | List staking positions
|
|
19
27
|
|
|
20
28
|
|
|
21
29
|
|
|
30
|
+
## createBabylonAirdropRegistration
|
|
31
|
+
|
|
32
|
+
> CreateBabylonAirdropRegistration201Response createBabylonAirdropRegistration(opts)
|
|
33
|
+
|
|
34
|
+
Register for Babylon airdrop
|
|
35
|
+
|
|
36
|
+
This operation initiates a Babylon airdrop registration request. Before calling this operation, please ensure the following: - The Bitcoin (BTC) address is eligible for the Babylon airdrop and has not been registered. You can call the [List wallets eligible for Babylon airdrop](https://www.cobo.com/developers/v2/api-references/stakings/list-wallets-eligible-for-babylon-airdrop) operation to check the registration status. - The Babylon address has enough asset to pay for the registration fee. - The Babylon address must be a Babylon address in an MPC Wallet in your organization. The system first checks whether the provided address is eligible for the Babylon airdrop. If eligible, it creates a unique registration ID, which can be used to track the status. The registration is processed asynchronously and may take some time to complete. It is recommended that you regularly call the [Get Babylon airdrop registration details](https://www.cobo.com/developers/v2/api-references/stakings/get-babylon-airdrop-registration-details) operation to check the status and handle registration accordingly. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
37
|
+
|
|
38
|
+
### Example
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
42
|
+
// Initialize the API client
|
|
43
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
44
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
45
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
46
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
47
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
48
|
+
// Call the API
|
|
49
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
50
|
+
const opts = {
|
|
51
|
+
'CreateBabylonAirdropRegistrationRequest': new CoboWaas2.CreateBabylonAirdropRegistrationRequest()
|
|
52
|
+
};
|
|
53
|
+
apiInstance.createBabylonAirdropRegistration(opts).then((data) => {
|
|
54
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
55
|
+
}, (error) => {
|
|
56
|
+
console.error(error);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Parameters
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Name | Type | Description | Notes
|
|
65
|
+
------------- | ------------- | ------------- | -------------
|
|
66
|
+
**CreateBabylonAirdropRegistrationRequest** | [**CreateBabylonAirdropRegistrationRequest**](CreateBabylonAirdropRegistrationRequest.md)| The request body to register for the Babylon airdrop. | [optional]
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**CreateBabylonAirdropRegistration201Response**](CreateBabylonAirdropRegistration201Response.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: application/json
|
|
79
|
+
- **Accept**: application/json
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## createBabylonStakingRegistration
|
|
83
|
+
|
|
84
|
+
> CreateBabylonStakingRegistration201Response createBabylonStakingRegistration(opts)
|
|
85
|
+
|
|
86
|
+
Register for Babylon Phase-2
|
|
87
|
+
|
|
88
|
+
This operation initiates a Babylon Phase-2 registration request. Before calling this operation, please ensure the following: - The staking position is eligible for the Babylon Phase-2 and has not been registered. You can call the [List staking positions eligible for Babylon Phase-2](https://www.cobo.com/developers/v2/api-references/stakings/list-eligible-staking-positions-for-babylon-phase-2) operation to check the registration status. - The Babylon address has enough asset to pay for the registration fee. - The Babylon address must be a Babylon address in an MPC Wallet in your organization. The system first checks whether the provided address is eligible for Phase-2. If eligible, it creates a unique registration ID, which can be used to track the status. The registration is processed asynchronously and may take some time to complete. It is recommended that you regularly call the [Get Babylon Phase-2 registration details](https://www.cobo.com/developers/v2/api-references/stakings/get-babylon-phase-2-registration-details) operation to check the status and handle registration accordingly. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
89
|
+
|
|
90
|
+
### Example
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
94
|
+
// Initialize the API client
|
|
95
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
96
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
97
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
98
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
99
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
100
|
+
// Call the API
|
|
101
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
102
|
+
const opts = {
|
|
103
|
+
'CreateBabylonStakingRegistrationRequest': new CoboWaas2.CreateBabylonStakingRegistrationRequest()
|
|
104
|
+
};
|
|
105
|
+
apiInstance.createBabylonStakingRegistration(opts).then((data) => {
|
|
106
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
107
|
+
}, (error) => {
|
|
108
|
+
console.error(error);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Parameters
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
Name | Type | Description | Notes
|
|
117
|
+
------------- | ------------- | ------------- | -------------
|
|
118
|
+
**CreateBabylonStakingRegistrationRequest** | [**CreateBabylonStakingRegistrationRequest**](CreateBabylonStakingRegistrationRequest.md)| The request body to transit Babylon BTC staking to phase 2 | [optional]
|
|
119
|
+
|
|
120
|
+
### Return type
|
|
121
|
+
|
|
122
|
+
[**CreateBabylonStakingRegistration201Response**](CreateBabylonStakingRegistration201Response.md)
|
|
123
|
+
|
|
124
|
+
### Authorization
|
|
125
|
+
|
|
126
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
127
|
+
|
|
128
|
+
### HTTP request headers
|
|
129
|
+
|
|
130
|
+
- **Content-Type**: application/json
|
|
131
|
+
- **Accept**: application/json
|
|
132
|
+
|
|
133
|
+
|
|
22
134
|
## createClaimActivity
|
|
23
135
|
|
|
24
136
|
> CreateStakeActivity201Response createClaimActivity(opts)
|
|
@@ -227,6 +339,106 @@ Name | Type | Description | Notes
|
|
|
227
339
|
- **Accept**: application/json
|
|
228
340
|
|
|
229
341
|
|
|
342
|
+
## getBabylonAirdropRegistrationById
|
|
343
|
+
|
|
344
|
+
> BabylonAirdropRegistration getBabylonAirdropRegistrationById(registration_id)
|
|
345
|
+
|
|
346
|
+
Get Babylon airdrop registration details
|
|
347
|
+
|
|
348
|
+
This operation returns the details of a specific Babylon airdrop registration, including registration status, Bitcoin (BTC) and Babylon addresses, airdrop amount, and error messages (if any). Please note that registration is an asynchronous process and may take several minutes to complete. It is recommended to call this operation at regular intervals to track the status. If the registration request fails, please check the error message and resolve the issues before resubmitting the registration request. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
349
|
+
|
|
350
|
+
### Example
|
|
351
|
+
|
|
352
|
+
```javascript
|
|
353
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
354
|
+
// Initialize the API client
|
|
355
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
356
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
357
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
358
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
359
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
360
|
+
// Call the API
|
|
361
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
362
|
+
const registration_id = "registration_id_example";
|
|
363
|
+
apiInstance.getBabylonAirdropRegistrationById(registration_id).then((data) => {
|
|
364
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
365
|
+
}, (error) => {
|
|
366
|
+
console.error(error);
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Parameters
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
Name | Type | Description | Notes
|
|
375
|
+
------------- | ------------- | ------------- | -------------
|
|
376
|
+
**registration_id** | **String**| The Babylon airdrop or Babylon Phase-2 registration ID. You can use the [Register for Babylon airdrop](https://www.cobo.com/developers/v2/api-references/stakings/register-for-babylon-airdrop) or the [Register for Babylon Phase-2](https://www.cobo.com/developers/v2/api-references/stakings/register-for-babylon-phase-2) operation to get this information. |
|
|
377
|
+
|
|
378
|
+
### Return type
|
|
379
|
+
|
|
380
|
+
[**BabylonAirdropRegistration**](BabylonAirdropRegistration.md)
|
|
381
|
+
|
|
382
|
+
### Authorization
|
|
383
|
+
|
|
384
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
385
|
+
|
|
386
|
+
### HTTP request headers
|
|
387
|
+
|
|
388
|
+
- **Content-Type**: Not defined
|
|
389
|
+
- **Accept**: application/json
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
## getBabylonStakingRegistrationById
|
|
393
|
+
|
|
394
|
+
> BabylonStakingRegistration getBabylonStakingRegistrationById(registration_id)
|
|
395
|
+
|
|
396
|
+
Get Babylon Phase-2 registration details
|
|
397
|
+
|
|
398
|
+
This operation returns the details of a specific Babylon Phase-2 registration, including registration status, Bitcoin (BTC) and Babylon addresses, staked amount, and error messages (if any). Please note that registration is an asynchronous process and may take several minutes to complete. It is recommended to call this operation at regular intervals to track the status. If the registration request fails, please check the error message and resolve the issues before resubmitting the registration request. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
399
|
+
|
|
400
|
+
### Example
|
|
401
|
+
|
|
402
|
+
```javascript
|
|
403
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
404
|
+
// Initialize the API client
|
|
405
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
406
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
407
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
408
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
409
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
410
|
+
// Call the API
|
|
411
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
412
|
+
const registration_id = "registration_id_example";
|
|
413
|
+
apiInstance.getBabylonStakingRegistrationById(registration_id).then((data) => {
|
|
414
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
415
|
+
}, (error) => {
|
|
416
|
+
console.error(error);
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Parameters
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
Name | Type | Description | Notes
|
|
425
|
+
------------- | ------------- | ------------- | -------------
|
|
426
|
+
**registration_id** | **String**| The Babylon airdrop or Babylon Phase-2 registration ID. You can use the [Register for Babylon airdrop](https://www.cobo.com/developers/v2/api-references/stakings/register-for-babylon-airdrop) or the [Register for Babylon Phase-2](https://www.cobo.com/developers/v2/api-references/stakings/register-for-babylon-phase-2) operation to get this information. |
|
|
427
|
+
|
|
428
|
+
### Return type
|
|
429
|
+
|
|
430
|
+
[**BabylonStakingRegistration**](BabylonStakingRegistration.md)
|
|
431
|
+
|
|
432
|
+
### Authorization
|
|
433
|
+
|
|
434
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
435
|
+
|
|
436
|
+
### HTTP request headers
|
|
437
|
+
|
|
438
|
+
- **Content-Type**: Not defined
|
|
439
|
+
- **Accept**: application/json
|
|
440
|
+
|
|
441
|
+
|
|
230
442
|
## getStakingActivityById
|
|
231
443
|
|
|
232
444
|
> Activity getStakingActivityById(activity_id)
|
|
@@ -481,6 +693,242 @@ Name | Type | Description | Notes
|
|
|
481
693
|
- **Accept**: application/json
|
|
482
694
|
|
|
483
695
|
|
|
696
|
+
## listBabylonAirdropRegistrations
|
|
697
|
+
|
|
698
|
+
> ListBabylonAirdropRegistrations200Response listBabylonAirdropRegistrations(opts)
|
|
699
|
+
|
|
700
|
+
List Babylon airdrop registrations
|
|
701
|
+
|
|
702
|
+
This operation lists all Babylon airdrop registration records within your organization. You can filter the results by request status and Bitcoin (BTC) address. The registration is processed asynchronously and may take some time to complete. It is recommended to implement automatic monitoring and handle the registration on time. If the registration request fails, please check the error message and resolve the issues before resubmitting the registration request. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
703
|
+
|
|
704
|
+
### Example
|
|
705
|
+
|
|
706
|
+
```javascript
|
|
707
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
708
|
+
// Initialize the API client
|
|
709
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
710
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
711
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
712
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
713
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
714
|
+
// Call the API
|
|
715
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
716
|
+
const opts = {
|
|
717
|
+
'status': "Processing",
|
|
718
|
+
'btc_address': "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
|
|
719
|
+
'limit': 10,
|
|
720
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
721
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
722
|
+
};
|
|
723
|
+
apiInstance.listBabylonAirdropRegistrations(opts).then((data) => {
|
|
724
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
725
|
+
}, (error) => {
|
|
726
|
+
console.error(error);
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
### Parameters
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
Name | Type | Description | Notes
|
|
735
|
+
------------- | ------------- | ------------- | -------------
|
|
736
|
+
**status** | **String**| The registration request status. | [optional]
|
|
737
|
+
**btc_address** | **String**| The Bitcoin (BTC) address used for staking. | [optional]
|
|
738
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
739
|
+
**before** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - 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 it to `infinity`, the last page of data is returned. | [optional]
|
|
740
|
+
**after** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - 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. | [optional]
|
|
741
|
+
|
|
742
|
+
### Return type
|
|
743
|
+
|
|
744
|
+
[**ListBabylonAirdropRegistrations200Response**](ListBabylonAirdropRegistrations200Response.md)
|
|
745
|
+
|
|
746
|
+
### Authorization
|
|
747
|
+
|
|
748
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
749
|
+
|
|
750
|
+
### HTTP request headers
|
|
751
|
+
|
|
752
|
+
- **Content-Type**: Not defined
|
|
753
|
+
- **Accept**: application/json
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
## listBabylonEligibleAirdrops
|
|
757
|
+
|
|
758
|
+
> ListBabylonEligibleAirdrops200Response listBabylonEligibleAirdrops(opts)
|
|
759
|
+
|
|
760
|
+
List wallets eligible for Babylon airdrop
|
|
761
|
+
|
|
762
|
+
This operation lists all wallets that are eligible for the Babylon airdrop. If an eligible wallet's status is `Unregistered`, you can initiate an airdrop registration for it. You can filter the results by airdrop registration status. You can use this operation to: - Check which wallets are eligible for airdrop registrations - Estimate airdrop amounts before claiming - Monitor available airdrop As registration is an asynchronous process and might take some time to complete, it is recommended that you regularly call this operation to check wallet eligibility and register eligible wallets on time. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
763
|
+
|
|
764
|
+
### Example
|
|
765
|
+
|
|
766
|
+
```javascript
|
|
767
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
768
|
+
// Initialize the API client
|
|
769
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
770
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
771
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
772
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
773
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
774
|
+
// Call the API
|
|
775
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
776
|
+
const opts = {
|
|
777
|
+
'status': "Registered",
|
|
778
|
+
'limit': 10,
|
|
779
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
780
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
781
|
+
};
|
|
782
|
+
apiInstance.listBabylonEligibleAirdrops(opts).then((data) => {
|
|
783
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
784
|
+
}, (error) => {
|
|
785
|
+
console.error(error);
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
### Parameters
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
Name | Type | Description | Notes
|
|
794
|
+
------------- | ------------- | ------------- | -------------
|
|
795
|
+
**status** | **String**| The status of Babylon airdrop or Phase-2 registration. Possible values are: - `Registered`: Registered for Babylon airdrop or Phase-2. - `Unregistered`: Not registered for any Babylon airdrop or Phase-2. - `Registering`: The Babylon airdrop or Phase-2 registration is in progress but not yet completed. | [optional]
|
|
796
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
797
|
+
**before** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - 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 it to `infinity`, the last page of data is returned. | [optional]
|
|
798
|
+
**after** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - 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. | [optional]
|
|
799
|
+
|
|
800
|
+
### Return type
|
|
801
|
+
|
|
802
|
+
[**ListBabylonEligibleAirdrops200Response**](ListBabylonEligibleAirdrops200Response.md)
|
|
803
|
+
|
|
804
|
+
### Authorization
|
|
805
|
+
|
|
806
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
807
|
+
|
|
808
|
+
### HTTP request headers
|
|
809
|
+
|
|
810
|
+
- **Content-Type**: Not defined
|
|
811
|
+
- **Accept**: application/json
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
## listBabylonEligibleStakings
|
|
815
|
+
|
|
816
|
+
> ListBabylonEligibleStakings200Response listBabylonEligibleStakings(opts)
|
|
817
|
+
|
|
818
|
+
List staking positions eligible for Babylon Phase-2
|
|
819
|
+
|
|
820
|
+
This operation lists all staking positions that are eligible for Babylon Phase-2. If an eligible staking position's status is `Unregistered`, you can initiate a registration for it. You can filter the results by registration status. You can use this operation to: - Check which staking positions can be registered - Get staking details before initiating registration - Monitor available positions for registration As registration is an asynchronous process and might take some time to complete, it is recommended that you regularly call this operation to check staking position eligibility and register eligible positions on time. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
821
|
+
|
|
822
|
+
### Example
|
|
823
|
+
|
|
824
|
+
```javascript
|
|
825
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
826
|
+
// Initialize the API client
|
|
827
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
828
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
829
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
830
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
831
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
832
|
+
// Call the API
|
|
833
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
834
|
+
const opts = {
|
|
835
|
+
'status': "Registered",
|
|
836
|
+
'limit': 10,
|
|
837
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
838
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
839
|
+
};
|
|
840
|
+
apiInstance.listBabylonEligibleStakings(opts).then((data) => {
|
|
841
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
842
|
+
}, (error) => {
|
|
843
|
+
console.error(error);
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
### Parameters
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
Name | Type | Description | Notes
|
|
852
|
+
------------- | ------------- | ------------- | -------------
|
|
853
|
+
**status** | **String**| The status of Babylon airdrop or Phase-2 registration. Possible values are: - `Registered`: Registered for Babylon airdrop or Phase-2. - `Unregistered`: Not registered for any Babylon airdrop or Phase-2. - `Registering`: The Babylon airdrop or Phase-2 registration is in progress but not yet completed. | [optional]
|
|
854
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
855
|
+
**before** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - 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 it to `infinity`, the last page of data is returned. | [optional]
|
|
856
|
+
**after** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - 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. | [optional]
|
|
857
|
+
|
|
858
|
+
### Return type
|
|
859
|
+
|
|
860
|
+
[**ListBabylonEligibleStakings200Response**](ListBabylonEligibleStakings200Response.md)
|
|
861
|
+
|
|
862
|
+
### Authorization
|
|
863
|
+
|
|
864
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
865
|
+
|
|
866
|
+
### HTTP request headers
|
|
867
|
+
|
|
868
|
+
- **Content-Type**: Not defined
|
|
869
|
+
- **Accept**: application/json
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
## listBabylonStakingRegistrations
|
|
873
|
+
|
|
874
|
+
> ListBabylonStakingRegistrations200Response listBabylonStakingRegistrations(opts)
|
|
875
|
+
|
|
876
|
+
List Babylon Phase-2 registrations
|
|
877
|
+
|
|
878
|
+
This operation lists all Babylon Phase-2 registration records within your organization. You can filter the results by request status and staking position ID. The registration is processed asynchronously and may take some time to complete. It is recommended to implement automatic monitoring and handle the registration on time. If the registration request fails, please check the error message and resolve the issues before resubmitting the registration request. For more information, refer to [Babylon's official doc](https://github.com/babylonlabs-io/babylon/tree/main/docs).
|
|
879
|
+
|
|
880
|
+
### Example
|
|
881
|
+
|
|
882
|
+
```javascript
|
|
883
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
884
|
+
// Initialize the API client
|
|
885
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
886
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
887
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
888
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
889
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
890
|
+
// Call the API
|
|
891
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
892
|
+
const opts = {
|
|
893
|
+
'status': "Processing",
|
|
894
|
+
'staking_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
895
|
+
'limit': 10,
|
|
896
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
897
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
898
|
+
};
|
|
899
|
+
apiInstance.listBabylonStakingRegistrations(opts).then((data) => {
|
|
900
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
901
|
+
}, (error) => {
|
|
902
|
+
console.error(error);
|
|
903
|
+
});
|
|
904
|
+
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
### Parameters
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
Name | Type | Description | Notes
|
|
911
|
+
------------- | ------------- | ------------- | -------------
|
|
912
|
+
**status** | **String**| The registration request status. | [optional]
|
|
913
|
+
**staking_id** | **String**| The ID of the Phase-1 BTC staking position. | [optional]
|
|
914
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
915
|
+
**before** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data before the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `before` to the ID of Object C (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object A. **Notes**: - 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 it to `infinity`, the last page of data is returned. | [optional]
|
|
916
|
+
**after** | **String**| This parameter specifies an object ID as a starting point for pagination, retrieving data after the specified object relative to the current dataset. Suppose the current data is ordered as Object A, Object B, and Object C. If you set `after` to the ID of Object A (`RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`), the response will include Object B and Object C. **Notes**: - 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. | [optional]
|
|
917
|
+
|
|
918
|
+
### Return type
|
|
919
|
+
|
|
920
|
+
[**ListBabylonStakingRegistrations200Response**](ListBabylonStakingRegistrations200Response.md)
|
|
921
|
+
|
|
922
|
+
### Authorization
|
|
923
|
+
|
|
924
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
925
|
+
|
|
926
|
+
### HTTP request headers
|
|
927
|
+
|
|
928
|
+
- **Content-Type**: Not defined
|
|
929
|
+
- **Accept**: application/json
|
|
930
|
+
|
|
931
|
+
|
|
484
932
|
## listStakingActivities
|
|
485
933
|
|
|
486
934
|
> ListStakingActivities200Response listStakingActivities(opts)
|
|
@@ -528,7 +976,7 @@ apiInstance.listStakingActivities(opts).then((data) => {
|
|
|
528
976
|
Name | Type | Description | Notes
|
|
529
977
|
------------- | ------------- | ------------- | -------------
|
|
530
978
|
**pool_id** | **String**| The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token. You can call [List staking pools](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-pools) to retrieve a list of staking pools. | [optional]
|
|
531
|
-
**staking_id** | **String**| The position
|
|
979
|
+
**staking_id** | **String**| The ID of the Phase-1 BTC staking position. | [optional]
|
|
532
980
|
**activity_type** | [**ActivityType**](.md)| | [optional]
|
|
533
981
|
**activity_status** | [**ActivityStatus**](.md)| | [optional]
|
|
534
982
|
**min_modified_timestamp** | **Number**| The start time of the query. All staking activities updated after the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CoboWaas2.SwapQuote
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**pay_amount** | **String** | The amount of tokens to pay. |
|
|
8
|
+
**receive_amount** | **String** | The amount of tokens to receive. |
|
|
9
|
+
**fee_amount** | **String** | The amount of tokens to pay for fee. |
|
|
10
|
+
**min_pay_amount** | **String** | The minimum amount of tokens to pay. | [optional]
|
|
11
|
+
**max_pay_amount** | **String** | The maximum amount of tokens to pay. | [optional]
|
|
12
|
+
**min_receive_amount** | **String** | The minimum amount of tokens to receive. | [optional]
|
|
13
|
+
**max_receive_amount** | **String** | The maximum amount of tokens to receive. | [optional]
|
|
14
|
+
**quote_expired_timestamp** | **Number** | The time when the quote will expire, in Unix timestamp format, measured in milliseconds. |
|
|
15
|
+
|
|
16
|
+
|