@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/dist/api/StakingsApi.js
CHANGED
|
@@ -8,6 +8,12 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _Activity = _interopRequireDefault(require("../model/Activity"));
|
|
9
9
|
var _ActivityStatus = _interopRequireDefault(require("../model/ActivityStatus"));
|
|
10
10
|
var _ActivityType = _interopRequireDefault(require("../model/ActivityType"));
|
|
11
|
+
var _BabylonAirdropRegistration = _interopRequireDefault(require("../model/BabylonAirdropRegistration"));
|
|
12
|
+
var _BabylonStakingRegistration = _interopRequireDefault(require("../model/BabylonStakingRegistration"));
|
|
13
|
+
var _CreateBabylonAirdropRegistration201Response = _interopRequireDefault(require("../model/CreateBabylonAirdropRegistration201Response"));
|
|
14
|
+
var _CreateBabylonAirdropRegistrationRequest = _interopRequireDefault(require("../model/CreateBabylonAirdropRegistrationRequest"));
|
|
15
|
+
var _CreateBabylonStakingRegistration201Response = _interopRequireDefault(require("../model/CreateBabylonStakingRegistration201Response"));
|
|
16
|
+
var _CreateBabylonStakingRegistrationRequest = _interopRequireDefault(require("../model/CreateBabylonStakingRegistrationRequest"));
|
|
11
17
|
var _CreateClaimActivityRequest = _interopRequireDefault(require("../model/CreateClaimActivityRequest"));
|
|
12
18
|
var _CreateStakeActivity201Response = _interopRequireDefault(require("../model/CreateStakeActivity201Response"));
|
|
13
19
|
var _CreateStakeActivityRequest = _interopRequireDefault(require("../model/CreateStakeActivityRequest"));
|
|
@@ -17,6 +23,10 @@ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
|
17
23
|
var _EthStakeEstimatedFee = _interopRequireDefault(require("../model/EthStakeEstimatedFee"));
|
|
18
24
|
var _GetStakingEstimationFee201Response = _interopRequireDefault(require("../model/GetStakingEstimationFee201Response"));
|
|
19
25
|
var _GetStakingEstimationFeeRequest = _interopRequireDefault(require("../model/GetStakingEstimationFeeRequest"));
|
|
26
|
+
var _ListBabylonAirdropRegistrations200Response = _interopRequireDefault(require("../model/ListBabylonAirdropRegistrations200Response"));
|
|
27
|
+
var _ListBabylonEligibleAirdrops200Response = _interopRequireDefault(require("../model/ListBabylonEligibleAirdrops200Response"));
|
|
28
|
+
var _ListBabylonEligibleStakings200Response = _interopRequireDefault(require("../model/ListBabylonEligibleStakings200Response"));
|
|
29
|
+
var _ListBabylonStakingRegistrations200Response = _interopRequireDefault(require("../model/ListBabylonStakingRegistrations200Response"));
|
|
20
30
|
var _ListStakingActivities200Response = _interopRequireDefault(require("../model/ListStakingActivities200Response"));
|
|
21
31
|
var _ListStakingPools200Response = _interopRequireDefault(require("../model/ListStakingPools200Response"));
|
|
22
32
|
var _ListStakings200Response = _interopRequireDefault(require("../model/ListStakings200Response"));
|
|
@@ -56,13 +66,95 @@ var StakingsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
/**
|
|
59
|
-
*
|
|
60
|
-
* This operation
|
|
69
|
+
* Register for Babylon airdrop
|
|
70
|
+
* 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).
|
|
61
71
|
* @param {Object} opts Optional parameters
|
|
62
|
-
* @param {module:model/
|
|
63
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/
|
|
72
|
+
* @param {module:model/CreateBabylonAirdropRegistrationRequest} [CreateBabylonAirdropRegistrationRequest] The request body to register for the Babylon airdrop.
|
|
73
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateBabylonAirdropRegistration201Response} and HTTP response
|
|
64
74
|
*/
|
|
65
75
|
return _createClass(StakingsApi, [{
|
|
76
|
+
key: "createBabylonAirdropRegistrationWithHttpInfo",
|
|
77
|
+
value: function createBabylonAirdropRegistrationWithHttpInfo(opts) {
|
|
78
|
+
opts = opts || {};
|
|
79
|
+
var postBody = opts['CreateBabylonAirdropRegistrationRequest'];
|
|
80
|
+
if (postBody && postBody.toJSON) {
|
|
81
|
+
postBody = postBody.toJSON();
|
|
82
|
+
}
|
|
83
|
+
var pathParams = {};
|
|
84
|
+
var queryParams = {};
|
|
85
|
+
var headerParams = {};
|
|
86
|
+
var formParams = {};
|
|
87
|
+
var authNames = ['CoboAuth'];
|
|
88
|
+
var contentTypes = ['application/json'];
|
|
89
|
+
var accepts = ['application/json'];
|
|
90
|
+
var returnType = _CreateBabylonAirdropRegistration201Response["default"];
|
|
91
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/airdrops/registrations', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Register for Babylon airdrop
|
|
96
|
+
* 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).
|
|
97
|
+
* @param {Object} opts Optional parameters
|
|
98
|
+
* @param {module:model/CreateBabylonAirdropRegistrationRequest} opts.CreateBabylonAirdropRegistrationRequest The request body to register for the Babylon airdrop.
|
|
99
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateBabylonAirdropRegistration201Response}
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "createBabylonAirdropRegistration",
|
|
103
|
+
value: function createBabylonAirdropRegistration(opts) {
|
|
104
|
+
return this.createBabylonAirdropRegistrationWithHttpInfo(opts).then(function (response_and_data) {
|
|
105
|
+
return response_and_data.data;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Register for Babylon Phase-2
|
|
111
|
+
* 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).
|
|
112
|
+
* @param {Object} opts Optional parameters
|
|
113
|
+
* @param {module:model/CreateBabylonStakingRegistrationRequest} [CreateBabylonStakingRegistrationRequest] The request body to transit Babylon BTC staking to phase 2
|
|
114
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateBabylonStakingRegistration201Response} and HTTP response
|
|
115
|
+
*/
|
|
116
|
+
}, {
|
|
117
|
+
key: "createBabylonStakingRegistrationWithHttpInfo",
|
|
118
|
+
value: function createBabylonStakingRegistrationWithHttpInfo(opts) {
|
|
119
|
+
opts = opts || {};
|
|
120
|
+
var postBody = opts['CreateBabylonStakingRegistrationRequest'];
|
|
121
|
+
if (postBody && postBody.toJSON) {
|
|
122
|
+
postBody = postBody.toJSON();
|
|
123
|
+
}
|
|
124
|
+
var pathParams = {};
|
|
125
|
+
var queryParams = {};
|
|
126
|
+
var headerParams = {};
|
|
127
|
+
var formParams = {};
|
|
128
|
+
var authNames = ['CoboAuth'];
|
|
129
|
+
var contentTypes = ['application/json'];
|
|
130
|
+
var accepts = ['application/json'];
|
|
131
|
+
var returnType = _CreateBabylonStakingRegistration201Response["default"];
|
|
132
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/stakings/registrations', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Register for Babylon Phase-2
|
|
137
|
+
* 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).
|
|
138
|
+
* @param {Object} opts Optional parameters
|
|
139
|
+
* @param {module:model/CreateBabylonStakingRegistrationRequest} opts.CreateBabylonStakingRegistrationRequest The request body to transit Babylon BTC staking to phase 2
|
|
140
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateBabylonStakingRegistration201Response}
|
|
141
|
+
*/
|
|
142
|
+
}, {
|
|
143
|
+
key: "createBabylonStakingRegistration",
|
|
144
|
+
value: function createBabylonStakingRegistration(opts) {
|
|
145
|
+
return this.createBabylonStakingRegistrationWithHttpInfo(opts).then(function (response_and_data) {
|
|
146
|
+
return response_and_data.data;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Create claim activity
|
|
152
|
+
* This operation creates a claim request. <Note>Currently, only the Ethereum Beacon protocol supports this operation.</Note> For some protocols, you can use the `fee` property in the request body to specify the maximum fee you are willing to pay. The transaction will fail if the actual fee exceeds the specified maximum fee.
|
|
153
|
+
* @param {Object} opts Optional parameters
|
|
154
|
+
* @param {module:model/CreateClaimActivityRequest} [CreateClaimActivityRequest] The request body to create a staking request.
|
|
155
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateStakeActivity201Response} and HTTP response
|
|
156
|
+
*/
|
|
157
|
+
}, {
|
|
66
158
|
key: "createClaimActivityWithHttpInfo",
|
|
67
159
|
value: function createClaimActivityWithHttpInfo(opts) {
|
|
68
160
|
opts = opts || {};
|
|
@@ -219,6 +311,94 @@ var StakingsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
219
311
|
});
|
|
220
312
|
}
|
|
221
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Get Babylon airdrop registration details
|
|
316
|
+
* 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).
|
|
317
|
+
* @param {String} registration_id 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.
|
|
318
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BabylonAirdropRegistration} and HTTP response
|
|
319
|
+
*/
|
|
320
|
+
}, {
|
|
321
|
+
key: "getBabylonAirdropRegistrationByIdWithHttpInfo",
|
|
322
|
+
value: function getBabylonAirdropRegistrationByIdWithHttpInfo(registration_id) {
|
|
323
|
+
var postBody = null;
|
|
324
|
+
if (postBody && postBody.toJSON) {
|
|
325
|
+
postBody = postBody.toJSON();
|
|
326
|
+
}
|
|
327
|
+
// verify the required parameter 'registration_id' is set
|
|
328
|
+
if (registration_id === undefined || registration_id === null) {
|
|
329
|
+
throw new Error("Missing the required parameter 'registration_id' when calling getBabylonAirdropRegistrationById");
|
|
330
|
+
}
|
|
331
|
+
var pathParams = {
|
|
332
|
+
'registration_id': registration_id
|
|
333
|
+
};
|
|
334
|
+
var queryParams = {};
|
|
335
|
+
var headerParams = {};
|
|
336
|
+
var formParams = {};
|
|
337
|
+
var authNames = ['CoboAuth'];
|
|
338
|
+
var contentTypes = [];
|
|
339
|
+
var accepts = ['application/json'];
|
|
340
|
+
var returnType = _BabylonAirdropRegistration["default"];
|
|
341
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/airdrops/registrations/{registration_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Get Babylon airdrop registration details
|
|
346
|
+
* 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).
|
|
347
|
+
* @param {String} registration_id 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.
|
|
348
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BabylonAirdropRegistration}
|
|
349
|
+
*/
|
|
350
|
+
}, {
|
|
351
|
+
key: "getBabylonAirdropRegistrationById",
|
|
352
|
+
value: function getBabylonAirdropRegistrationById(registration_id) {
|
|
353
|
+
return this.getBabylonAirdropRegistrationByIdWithHttpInfo(registration_id).then(function (response_and_data) {
|
|
354
|
+
return response_and_data.data;
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Get Babylon Phase-2 registration details
|
|
360
|
+
* 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).
|
|
361
|
+
* @param {String} registration_id 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.
|
|
362
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BabylonStakingRegistration} and HTTP response
|
|
363
|
+
*/
|
|
364
|
+
}, {
|
|
365
|
+
key: "getBabylonStakingRegistrationByIdWithHttpInfo",
|
|
366
|
+
value: function getBabylonStakingRegistrationByIdWithHttpInfo(registration_id) {
|
|
367
|
+
var postBody = null;
|
|
368
|
+
if (postBody && postBody.toJSON) {
|
|
369
|
+
postBody = postBody.toJSON();
|
|
370
|
+
}
|
|
371
|
+
// verify the required parameter 'registration_id' is set
|
|
372
|
+
if (registration_id === undefined || registration_id === null) {
|
|
373
|
+
throw new Error("Missing the required parameter 'registration_id' when calling getBabylonStakingRegistrationById");
|
|
374
|
+
}
|
|
375
|
+
var pathParams = {
|
|
376
|
+
'registration_id': registration_id
|
|
377
|
+
};
|
|
378
|
+
var queryParams = {};
|
|
379
|
+
var headerParams = {};
|
|
380
|
+
var formParams = {};
|
|
381
|
+
var authNames = ['CoboAuth'];
|
|
382
|
+
var contentTypes = [];
|
|
383
|
+
var accepts = ['application/json'];
|
|
384
|
+
var returnType = _BabylonStakingRegistration["default"];
|
|
385
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/stakings/registrations/{registration_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Get Babylon Phase-2 registration details
|
|
390
|
+
* 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).
|
|
391
|
+
* @param {String} registration_id 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.
|
|
392
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BabylonStakingRegistration}
|
|
393
|
+
*/
|
|
394
|
+
}, {
|
|
395
|
+
key: "getBabylonStakingRegistrationById",
|
|
396
|
+
value: function getBabylonStakingRegistrationById(registration_id) {
|
|
397
|
+
return this.getBabylonStakingRegistrationByIdWithHttpInfo(registration_id).then(function (response_and_data) {
|
|
398
|
+
return response_and_data.data;
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
222
402
|
/**
|
|
223
403
|
* Get staking activity details
|
|
224
404
|
* This operation retrieves the details of a specified staking activity.
|
|
@@ -433,12 +613,226 @@ var StakingsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
433
613
|
});
|
|
434
614
|
}
|
|
435
615
|
|
|
616
|
+
/**
|
|
617
|
+
* List Babylon airdrop registrations
|
|
618
|
+
* 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).
|
|
619
|
+
* @param {Object} opts Optional parameters
|
|
620
|
+
* @param {module:model/String} [status] The registration request status.
|
|
621
|
+
* @param {String} [btc_address] The Bitcoin (BTC) address used for staking.
|
|
622
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
623
|
+
* @param {String} [before] 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.
|
|
624
|
+
* @param {String} [after] 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.
|
|
625
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBabylonAirdropRegistrations200Response} and HTTP response
|
|
626
|
+
*/
|
|
627
|
+
}, {
|
|
628
|
+
key: "listBabylonAirdropRegistrationsWithHttpInfo",
|
|
629
|
+
value: function listBabylonAirdropRegistrationsWithHttpInfo(opts) {
|
|
630
|
+
opts = opts || {};
|
|
631
|
+
var postBody = null;
|
|
632
|
+
if (postBody && postBody.toJSON) {
|
|
633
|
+
postBody = postBody.toJSON();
|
|
634
|
+
}
|
|
635
|
+
var pathParams = {};
|
|
636
|
+
var queryParams = {
|
|
637
|
+
'status': opts['status'],
|
|
638
|
+
'btc_address': opts['btc_address'],
|
|
639
|
+
'limit': opts['limit'],
|
|
640
|
+
'before': opts['before'],
|
|
641
|
+
'after': opts['after']
|
|
642
|
+
};
|
|
643
|
+
var headerParams = {};
|
|
644
|
+
var formParams = {};
|
|
645
|
+
var authNames = ['CoboAuth'];
|
|
646
|
+
var contentTypes = [];
|
|
647
|
+
var accepts = ['application/json'];
|
|
648
|
+
var returnType = _ListBabylonAirdropRegistrations200Response["default"];
|
|
649
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/airdrops/registrations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* List Babylon airdrop registrations
|
|
654
|
+
* 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).
|
|
655
|
+
* @param {Object} opts Optional parameters
|
|
656
|
+
* @param {module:model/String} opts.status The registration request status.
|
|
657
|
+
* @param {String} opts.btc_address The Bitcoin (BTC) address used for staking.
|
|
658
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
659
|
+
* @param {String} opts.before 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.
|
|
660
|
+
* @param {String} opts.after 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.
|
|
661
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBabylonAirdropRegistrations200Response}
|
|
662
|
+
*/
|
|
663
|
+
}, {
|
|
664
|
+
key: "listBabylonAirdropRegistrations",
|
|
665
|
+
value: function listBabylonAirdropRegistrations(opts) {
|
|
666
|
+
return this.listBabylonAirdropRegistrationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
667
|
+
return response_and_data.data;
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* List wallets eligible for Babylon airdrop
|
|
673
|
+
* 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).
|
|
674
|
+
* @param {Object} opts Optional parameters
|
|
675
|
+
* @param {module:model/String} [status] 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.
|
|
676
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
677
|
+
* @param {String} [before] 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.
|
|
678
|
+
* @param {String} [after] 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.
|
|
679
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBabylonEligibleAirdrops200Response} and HTTP response
|
|
680
|
+
*/
|
|
681
|
+
}, {
|
|
682
|
+
key: "listBabylonEligibleAirdropsWithHttpInfo",
|
|
683
|
+
value: function listBabylonEligibleAirdropsWithHttpInfo(opts) {
|
|
684
|
+
opts = opts || {};
|
|
685
|
+
var postBody = null;
|
|
686
|
+
if (postBody && postBody.toJSON) {
|
|
687
|
+
postBody = postBody.toJSON();
|
|
688
|
+
}
|
|
689
|
+
var pathParams = {};
|
|
690
|
+
var queryParams = {
|
|
691
|
+
'status': opts['status'],
|
|
692
|
+
'limit': opts['limit'],
|
|
693
|
+
'before': opts['before'],
|
|
694
|
+
'after': opts['after']
|
|
695
|
+
};
|
|
696
|
+
var headerParams = {};
|
|
697
|
+
var formParams = {};
|
|
698
|
+
var authNames = ['CoboAuth'];
|
|
699
|
+
var contentTypes = [];
|
|
700
|
+
var accepts = ['application/json'];
|
|
701
|
+
var returnType = _ListBabylonEligibleAirdrops200Response["default"];
|
|
702
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/airdrops/eligibles', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* List wallets eligible for Babylon airdrop
|
|
707
|
+
* 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).
|
|
708
|
+
* @param {Object} opts Optional parameters
|
|
709
|
+
* @param {module:model/String} opts.status 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.
|
|
710
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
711
|
+
* @param {String} opts.before 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.
|
|
712
|
+
* @param {String} opts.after 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.
|
|
713
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBabylonEligibleAirdrops200Response}
|
|
714
|
+
*/
|
|
715
|
+
}, {
|
|
716
|
+
key: "listBabylonEligibleAirdrops",
|
|
717
|
+
value: function listBabylonEligibleAirdrops(opts) {
|
|
718
|
+
return this.listBabylonEligibleAirdropsWithHttpInfo(opts).then(function (response_and_data) {
|
|
719
|
+
return response_and_data.data;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* List staking positions eligible for Babylon Phase-2
|
|
725
|
+
* 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).
|
|
726
|
+
* @param {Object} opts Optional parameters
|
|
727
|
+
* @param {module:model/String} [status] 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.
|
|
728
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
729
|
+
* @param {String} [before] 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.
|
|
730
|
+
* @param {String} [after] 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.
|
|
731
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBabylonEligibleStakings200Response} and HTTP response
|
|
732
|
+
*/
|
|
733
|
+
}, {
|
|
734
|
+
key: "listBabylonEligibleStakingsWithHttpInfo",
|
|
735
|
+
value: function listBabylonEligibleStakingsWithHttpInfo(opts) {
|
|
736
|
+
opts = opts || {};
|
|
737
|
+
var postBody = null;
|
|
738
|
+
if (postBody && postBody.toJSON) {
|
|
739
|
+
postBody = postBody.toJSON();
|
|
740
|
+
}
|
|
741
|
+
var pathParams = {};
|
|
742
|
+
var queryParams = {
|
|
743
|
+
'status': opts['status'],
|
|
744
|
+
'limit': opts['limit'],
|
|
745
|
+
'before': opts['before'],
|
|
746
|
+
'after': opts['after']
|
|
747
|
+
};
|
|
748
|
+
var headerParams = {};
|
|
749
|
+
var formParams = {};
|
|
750
|
+
var authNames = ['CoboAuth'];
|
|
751
|
+
var contentTypes = [];
|
|
752
|
+
var accepts = ['application/json'];
|
|
753
|
+
var returnType = _ListBabylonEligibleStakings200Response["default"];
|
|
754
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/stakings/eligibles', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* List staking positions eligible for Babylon Phase-2
|
|
759
|
+
* 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).
|
|
760
|
+
* @param {Object} opts Optional parameters
|
|
761
|
+
* @param {module:model/String} opts.status 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.
|
|
762
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
763
|
+
* @param {String} opts.before 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.
|
|
764
|
+
* @param {String} opts.after 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.
|
|
765
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBabylonEligibleStakings200Response}
|
|
766
|
+
*/
|
|
767
|
+
}, {
|
|
768
|
+
key: "listBabylonEligibleStakings",
|
|
769
|
+
value: function listBabylonEligibleStakings(opts) {
|
|
770
|
+
return this.listBabylonEligibleStakingsWithHttpInfo(opts).then(function (response_and_data) {
|
|
771
|
+
return response_and_data.data;
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* List Babylon Phase-2 registrations
|
|
777
|
+
* 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).
|
|
778
|
+
* @param {Object} opts Optional parameters
|
|
779
|
+
* @param {module:model/String} [status] The registration request status.
|
|
780
|
+
* @param {String} [staking_id] The ID of the Phase-1 BTC staking position.
|
|
781
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
782
|
+
* @param {String} [before] 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.
|
|
783
|
+
* @param {String} [after] 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.
|
|
784
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListBabylonStakingRegistrations200Response} and HTTP response
|
|
785
|
+
*/
|
|
786
|
+
}, {
|
|
787
|
+
key: "listBabylonStakingRegistrationsWithHttpInfo",
|
|
788
|
+
value: function listBabylonStakingRegistrationsWithHttpInfo(opts) {
|
|
789
|
+
opts = opts || {};
|
|
790
|
+
var postBody = null;
|
|
791
|
+
if (postBody && postBody.toJSON) {
|
|
792
|
+
postBody = postBody.toJSON();
|
|
793
|
+
}
|
|
794
|
+
var pathParams = {};
|
|
795
|
+
var queryParams = {
|
|
796
|
+
'status': opts['status'],
|
|
797
|
+
'staking_id': opts['staking_id'],
|
|
798
|
+
'limit': opts['limit'],
|
|
799
|
+
'before': opts['before'],
|
|
800
|
+
'after': opts['after']
|
|
801
|
+
};
|
|
802
|
+
var headerParams = {};
|
|
803
|
+
var formParams = {};
|
|
804
|
+
var authNames = ['CoboAuth'];
|
|
805
|
+
var contentTypes = [];
|
|
806
|
+
var accepts = ['application/json'];
|
|
807
|
+
var returnType = _ListBabylonStakingRegistrations200Response["default"];
|
|
808
|
+
return this.apiClient.callApi('/stakings/protocols/babylon/stakings/registrations', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* List Babylon Phase-2 registrations
|
|
813
|
+
* 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).
|
|
814
|
+
* @param {Object} opts Optional parameters
|
|
815
|
+
* @param {module:model/String} opts.status The registration request status.
|
|
816
|
+
* @param {String} opts.staking_id The ID of the Phase-1 BTC staking position.
|
|
817
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
818
|
+
* @param {String} opts.before 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.
|
|
819
|
+
* @param {String} opts.after 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.
|
|
820
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListBabylonStakingRegistrations200Response}
|
|
821
|
+
*/
|
|
822
|
+
}, {
|
|
823
|
+
key: "listBabylonStakingRegistrations",
|
|
824
|
+
value: function listBabylonStakingRegistrations(opts) {
|
|
825
|
+
return this.listBabylonStakingRegistrationsWithHttpInfo(opts).then(function (response_and_data) {
|
|
826
|
+
return response_and_data.data;
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
|
|
436
830
|
/**
|
|
437
831
|
* List staking activities
|
|
438
832
|
* This operation retrieves a list of staking activities.
|
|
439
833
|
* @param {Object} opts Optional parameters
|
|
440
834
|
* @param {String} [pool_id] 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.
|
|
441
|
-
* @param {String} [staking_id] The position
|
|
835
|
+
* @param {String} [staking_id] The ID of the Phase-1 BTC staking position.
|
|
442
836
|
* @param {module:model/ActivityType} [activity_type]
|
|
443
837
|
* @param {module:model/ActivityStatus} [activity_status]
|
|
444
838
|
* @param {Number} [min_modified_timestamp] 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.
|
|
@@ -486,7 +880,7 @@ var StakingsApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
486
880
|
* This operation retrieves a list of staking activities.
|
|
487
881
|
* @param {Object} opts Optional parameters
|
|
488
882
|
* @param {String} opts.pool_id 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.
|
|
489
|
-
* @param {String} opts.staking_id The position
|
|
883
|
+
* @param {String} opts.staking_id The ID of the Phase-1 BTC staking position.
|
|
490
884
|
* @param {module:model/ActivityType} opts.activity_type
|
|
491
885
|
* @param {module:model/ActivityStatus} opts.activity_status
|
|
492
886
|
* @param {Number} opts.min_modified_timestamp 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.
|