@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/SwapsApi.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# CoboWaas2.SwapsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**createSwapActivity**](SwapsApi.md#createSwapActivity) | **POST** /swaps/swap | Create Swap Activity
|
|
8
|
+
[**createSwapQuote**](SwapsApi.md#createSwapQuote) | **POST** /swaps/quote | Create Swap Quote
|
|
9
|
+
[**getSwapActivity**](SwapsApi.md#getSwapActivity) | **GET** /swaps/activities/{activity_id} | Get Swap Activity Details
|
|
10
|
+
[**getSwapQuote**](SwapsApi.md#getSwapQuote) | **GET** /swaps/quote | Get Current Swap Rate
|
|
11
|
+
[**listEnableTokenPairs**](SwapsApi.md#listEnableTokenPairs) | **GET** /swaps/enabled_pairs | List Supported Token Pairs
|
|
12
|
+
[**listSwapActivities**](SwapsApi.md#listSwapActivities) | **GET** /swaps/activities | List Swap Activities
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## createSwapActivity
|
|
17
|
+
|
|
18
|
+
> SwapActivity createSwapActivity(CreateSwapActivityRequest)
|
|
19
|
+
|
|
20
|
+
Create Swap Activity
|
|
21
|
+
|
|
22
|
+
This operation to create a swap activity.
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
28
|
+
// Initialize the API client
|
|
29
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
30
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
31
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
32
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
33
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
34
|
+
// Call the API
|
|
35
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
36
|
+
const CreateSwapActivityRequest = new CoboWaas2.CreateSwapActivityRequest();
|
|
37
|
+
apiInstance.createSwapActivity(CreateSwapActivityRequest).then((data) => {
|
|
38
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
39
|
+
}, (error) => {
|
|
40
|
+
console.error(error);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Name | Type | Description | Notes
|
|
49
|
+
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**CreateSwapActivityRequest** | [**CreateSwapActivityRequest**](CreateSwapActivityRequest.md)| The request body for creating a swap activity. |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**SwapActivity**](SwapActivity.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[OAuth2](../README.md#OAuth2)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: application/json
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## createSwapQuote
|
|
67
|
+
|
|
68
|
+
> CreateSwapQuote201Response createSwapQuote(CreateSwapQuoteRequest)
|
|
69
|
+
|
|
70
|
+
Create Swap Quote
|
|
71
|
+
|
|
72
|
+
This operation retrieves a quote for swapping between two tokens. Either pay_amount or receive_amount must be provided.
|
|
73
|
+
|
|
74
|
+
### Example
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
78
|
+
// Initialize the API client
|
|
79
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
80
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
81
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
82
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
83
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
84
|
+
// Call the API
|
|
85
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
86
|
+
const CreateSwapQuoteRequest = new CoboWaas2.CreateSwapQuoteRequest();
|
|
87
|
+
apiInstance.createSwapQuote(CreateSwapQuoteRequest).then((data) => {
|
|
88
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
89
|
+
}, (error) => {
|
|
90
|
+
console.error(error);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
Name | Type | Description | Notes
|
|
99
|
+
------------- | ------------- | ------------- | -------------
|
|
100
|
+
**CreateSwapQuoteRequest** | [**CreateSwapQuoteRequest**](CreateSwapQuoteRequest.md)| The request body for creating a swap activity. |
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
[**CreateSwapQuote201Response**](CreateSwapQuote201Response.md)
|
|
105
|
+
|
|
106
|
+
### Authorization
|
|
107
|
+
|
|
108
|
+
[OAuth2](../README.md#OAuth2)
|
|
109
|
+
|
|
110
|
+
### HTTP request headers
|
|
111
|
+
|
|
112
|
+
- **Content-Type**: application/json
|
|
113
|
+
- **Accept**: application/json
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## getSwapActivity
|
|
117
|
+
|
|
118
|
+
> SwapActivity getSwapActivity(activity_id)
|
|
119
|
+
|
|
120
|
+
Get Swap Activity Details
|
|
121
|
+
|
|
122
|
+
This operation retrieves the details of a swap activity.
|
|
123
|
+
|
|
124
|
+
### Example
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
128
|
+
// Initialize the API client
|
|
129
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
130
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
131
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
132
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
133
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
134
|
+
// Call the API
|
|
135
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
136
|
+
const activity_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
137
|
+
apiInstance.getSwapActivity(activity_id).then((data) => {
|
|
138
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
139
|
+
}, (error) => {
|
|
140
|
+
console.error(error);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
Name | Type | Description | Notes
|
|
149
|
+
------------- | ------------- | ------------- | -------------
|
|
150
|
+
**activity_id** | **String**| The unique id of the activity. |
|
|
151
|
+
|
|
152
|
+
### Return type
|
|
153
|
+
|
|
154
|
+
[**SwapActivity**](SwapActivity.md)
|
|
155
|
+
|
|
156
|
+
### Authorization
|
|
157
|
+
|
|
158
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
159
|
+
|
|
160
|
+
### HTTP request headers
|
|
161
|
+
|
|
162
|
+
- **Content-Type**: Not defined
|
|
163
|
+
- **Accept**: application/json
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## getSwapQuote
|
|
167
|
+
|
|
168
|
+
> SwapQuote getSwapQuote(wallet_id, pay_token_id, receive_token_id, opts)
|
|
169
|
+
|
|
170
|
+
Get Current Swap Rate
|
|
171
|
+
|
|
172
|
+
This operation retrieves the current market exchange rate and estimated amount for swapping between two tokens. Either pay_amount or receive_amount must be provided.
|
|
173
|
+
|
|
174
|
+
### Example
|
|
175
|
+
|
|
176
|
+
```javascript
|
|
177
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
178
|
+
// Initialize the API client
|
|
179
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
180
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
181
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
182
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
183
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
184
|
+
// Call the API
|
|
185
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
186
|
+
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
187
|
+
const pay_token_id = "ETH";
|
|
188
|
+
const receive_token_id = "USDT";
|
|
189
|
+
const opts = {
|
|
190
|
+
'pay_amount': "1.5",
|
|
191
|
+
'receive_amount': "2000"
|
|
192
|
+
};
|
|
193
|
+
apiInstance.getSwapQuote(wallet_id, pay_token_id, receive_token_id, opts).then((data) => {
|
|
194
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
195
|
+
}, (error) => {
|
|
196
|
+
console.error(error);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
Name | Type | Description | Notes
|
|
205
|
+
------------- | ------------- | ------------- | -------------
|
|
206
|
+
**wallet_id** | **String**| The wallet ID. |
|
|
207
|
+
**pay_token_id** | **String**| Unique id of the token to pay. |
|
|
208
|
+
**receive_token_id** | **String**| Unique id of the token to receive. |
|
|
209
|
+
**pay_amount** | **String**| The amount of pay token to swap. | [optional]
|
|
210
|
+
**receive_amount** | **String**| The amount of token to receive. | [optional]
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**SwapQuote**](SwapQuote.md)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: application/json
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## listEnableTokenPairs
|
|
227
|
+
|
|
228
|
+
> ListEnableTokenPairs200Response listEnableTokenPairs(opts)
|
|
229
|
+
|
|
230
|
+
List Supported Token Pairs
|
|
231
|
+
|
|
232
|
+
This operation retrieves all supported token pairs for swaps in a specified wallet.
|
|
233
|
+
|
|
234
|
+
### Example
|
|
235
|
+
|
|
236
|
+
```javascript
|
|
237
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
238
|
+
// Initialize the API client
|
|
239
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
240
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
241
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
242
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
243
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
244
|
+
// Call the API
|
|
245
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
246
|
+
const opts = {
|
|
247
|
+
'limit': 10,
|
|
248
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
249
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
250
|
+
};
|
|
251
|
+
apiInstance.listEnableTokenPairs(opts).then((data) => {
|
|
252
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
253
|
+
}, (error) => {
|
|
254
|
+
console.error(error);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Parameters
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
Name | Type | Description | Notes
|
|
263
|
+
------------- | ------------- | ------------- | -------------
|
|
264
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
265
|
+
**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]
|
|
266
|
+
**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]
|
|
267
|
+
|
|
268
|
+
### Return type
|
|
269
|
+
|
|
270
|
+
[**ListEnableTokenPairs200Response**](ListEnableTokenPairs200Response.md)
|
|
271
|
+
|
|
272
|
+
### Authorization
|
|
273
|
+
|
|
274
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
275
|
+
|
|
276
|
+
### HTTP request headers
|
|
277
|
+
|
|
278
|
+
- **Content-Type**: Not defined
|
|
279
|
+
- **Accept**: application/json
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
## listSwapActivities
|
|
283
|
+
|
|
284
|
+
> ListSwapActivities200Response listSwapActivities(opts)
|
|
285
|
+
|
|
286
|
+
List Swap Activities
|
|
287
|
+
|
|
288
|
+
This operation retrieves a list of swap activities.
|
|
289
|
+
|
|
290
|
+
### Example
|
|
291
|
+
|
|
292
|
+
```javascript
|
|
293
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
294
|
+
// Initialize the API client
|
|
295
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
296
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
297
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
298
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
299
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
300
|
+
// Call the API
|
|
301
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
302
|
+
const opts = {
|
|
303
|
+
'status': "Success",
|
|
304
|
+
'min_updated_timestamp': 1635744000000,
|
|
305
|
+
'max_updated_timestamp': 1635744000000,
|
|
306
|
+
'initiator': "steve@example.com",
|
|
307
|
+
'limit': 10,
|
|
308
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
309
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
310
|
+
'sort_by': "timestamp",
|
|
311
|
+
'direction': "ASC"
|
|
312
|
+
};
|
|
313
|
+
apiInstance.listSwapActivities(opts).then((data) => {
|
|
314
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
315
|
+
}, (error) => {
|
|
316
|
+
console.error(error);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Parameters
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
Name | Type | Description | Notes
|
|
325
|
+
------------- | ------------- | ------------- | -------------
|
|
326
|
+
**status** | **String**| | [optional]
|
|
327
|
+
**min_updated_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]
|
|
328
|
+
**max_updated_timestamp** | **Number**| The end time of the query. All staking activities updated before the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
329
|
+
**initiator** | **String**| The activity initiator, which is your API key by default. You can also specify the initiator when creating the activity. | [optional]
|
|
330
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
331
|
+
**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]
|
|
332
|
+
**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]
|
|
333
|
+
**sort_by** | **String**| The field used for sorting. | [optional] [default to '']
|
|
334
|
+
**direction** | **String**| The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. | [optional] [default to '']
|
|
335
|
+
|
|
336
|
+
### Return type
|
|
337
|
+
|
|
338
|
+
[**ListSwapActivities200Response**](ListSwapActivities200Response.md)
|
|
339
|
+
|
|
340
|
+
### Authorization
|
|
341
|
+
|
|
342
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
343
|
+
|
|
344
|
+
### HTTP request headers
|
|
345
|
+
|
|
346
|
+
- **Content-Type**: Not defined
|
|
347
|
+
- **Accept**: application/json
|
|
348
|
+
|
|
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**selected_utxos** | [**[TransactionSelectedUtxo]**](TransactionSelectedUtxo.md) | The selected UTXOs to be consumed in the transaction. | [optional]
|
|
9
9
|
**raw_tx** | **String** | The raw transaction data. | [optional]
|
|
10
10
|
**unsigned_raw_tx** | **String** | The unsigned raw transaction data. | [optional]
|
|
11
|
+
**utxo_change** | [**TransactionUtxoChange**](TransactionUtxoChange.md) | | [optional]
|
|
11
12
|
|
|
12
13
|
|
|
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**address** | **String** | The wallet address. If you want to specify the UTXOs to be used, please provide the `included_utxos` property. If you specify both the `address` and `included_utxos` properties, the specified included UTXOs must belong to the address. It is recommended to specify no more than 100 included UTXOs to ensure optimal transaction processing. You need to provide either the `address` or `included_utxos` property. If neither property is provided, the transfer will fail. | [optional]
|
|
10
10
|
**included_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
|
|
11
11
|
**excluded_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
|
|
12
|
+
**mpc_used_key_share_holder_group** | [**MpcSigningGroup**](MpcSigningGroup.md) | | [optional]
|
|
12
13
|
|
|
13
14
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TransactionUtxoChange
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**address** | **String** | The receiving address of the UTXO change output. | [optional]
|
|
8
|
+
**value** | **String** | The amount of the UTXO change output. | [optional]
|
|
9
|
+
|
|
10
|
+
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -629,7 +629,7 @@ Name | Type | Description | Notes
|
|
|
629
629
|
|
|
630
630
|
Resend transaction
|
|
631
631
|
|
|
632
|
-
This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
632
|
+
This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). A transaction can be resent if its status is `failed`. <Note>This operation only applies to transactions from MPC Wallets in the SOL token.</Note>
|
|
633
633
|
|
|
634
634
|
### Example
|
|
635
635
|
|
|
@@ -733,7 +733,7 @@ Name | Type | Description | Notes
|
|
|
733
733
|
|
|
734
734
|
Speed up transaction
|
|
735
735
|
|
|
736
|
-
This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
|
|
736
|
+
This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. For more details about speeding up a transaction, refer to [Speed up a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#speed-up-a-transaction). You can use the `address` or `included_utxos` properties in the request body to specify the address or UTXOs that will cover the transaction fee. Generally, the transaction fee is paid by the original transaction's source. If that source's balance is insufficient, the specified address or UTXOs can be used to cover the fee. A transaction can be sped up only if its status is `Broadcasting`. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
|
|
737
737
|
|
|
738
738
|
### Example
|
|
739
739
|
|
package/docs/TransferSource.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**address** | **String** | The wallet address. |
|
|
10
10
|
**included_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
|
|
11
11
|
**excluded_utxos** | [**[TransactionUtxo]**](TransactionUtxo.md) | | [optional]
|
|
12
|
+
**mpc_used_key_share_holder_group** | [**MpcSigningGroup**](MpcSigningGroup.md) | | [optional]
|
|
12
13
|
**delegate** | [**CoboSafeDelegate**](CoboSafeDelegate.md) | |
|
|
13
14
|
**trading_account_type** | **String** | The trading account type. |
|
|
14
15
|
|
package/docs/WebhookEventData.md
CHANGED
|
@@ -36,7 +36,7 @@ Name | Type | Description | Notes
|
|
|
36
36
|
**tss_request_id** | **String** | The TSS request ID. | [optional]
|
|
37
37
|
**source_key_share_holder_group** | [**SourceGroup**](SourceGroup.md) | | [optional]
|
|
38
38
|
**target_key_share_holder_group_id** | **String** | The target key share holder group ID. | [optional]
|
|
39
|
-
**addresses** | [**[
|
|
39
|
+
**addresses** | [**[AddressesEventDataAllOfAddresses]**](AddressesEventDataAllOfAddresses.md) | A list of addresses. | [optional]
|
|
40
40
|
**wallet** | [**WalletInfo**](WalletInfo.md) | | [optional]
|
|
41
41
|
**vault_id** | **String** | The vault ID. | [optional]
|
|
42
42
|
**project_id** | **String** | The project ID. | [optional]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo
|
|
3
|
+
"version": "1.10.0",
|
|
4
|
+
"description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's WaaS API offering. It enables you to access Cobo's full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo's [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ",
|
|
5
5
|
"license": "GPL 2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
package/docs/SwapSummary.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# CoboWaas2.SwapSummary
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
Name | Type | Description | Notes
|
|
6
|
-
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**total_usd_value** | **String** | The total USD value of the swap activities, represented as a string. |
|
|
8
|
-
**activity_count** | **Number** | The total number of swap activities. |
|
|
9
|
-
|
|
10
|
-
|