@cobo/cobo-waas2 1.33.0 → 1.34.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 +6 -1
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +48 -4
- package/dist/api/FeeStationApi.js +63 -0
- package/dist/index.js +21 -0
- package/dist/model/CreateAutoSweepTask.js +13 -0
- package/dist/model/FeeStationFiatTransaction.js +234 -0
- package/dist/model/FeeStationFiatTransactionType.js +61 -0
- package/dist/model/ListFeeStationFiatTransactions200Response.js +123 -0
- package/dist/model/PaymentEstimateFeeRequest.js +9 -0
- package/dist/model/PaymentPayoutRecipientInfo.js +9 -0
- package/dist/model/RefundLinkBusinessInfo.js +18 -7
- package/docs/AutoSweepApi.md +51 -0
- package/docs/CreateAutoSweepTask.md +1 -0
- package/docs/FeeStationApi.md +65 -0
- package/docs/FeeStationFiatTransaction.md +30 -0
- package/docs/FeeStationFiatTransactionType.md +12 -0
- package/docs/ListFeeStationFiatTransactions200Response.md +10 -0
- package/docs/PaymentEstimateFeeRequest.md +1 -0
- package/docs/PaymentPayoutRecipientInfo.md +1 -0
- package/docs/RefundLinkBusinessInfo.md +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http
|
|
|
15
15
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
16
16
|
|
|
17
17
|
- API version: v2
|
|
18
|
-
- Package version: 1.
|
|
18
|
+
- Package version: 1.34.0
|
|
19
19
|
- Generator version: 7.6.0
|
|
20
20
|
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
21
21
|
For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas)
|
|
@@ -77,6 +77,7 @@ Class | Method | HTTP request | Description
|
|
|
77
77
|
*CoboWaas2.AppWorkflowsApi* | [**listAppWorkflows**](docs/AppWorkflowsApi.md#listAppWorkflows) | **GET** /app/workflows | List app workflows
|
|
78
78
|
*CoboWaas2.AppWorkflowsApi* | [**listApprovalRequests**](docs/AppWorkflowsApi.md#listApprovalRequests) | **GET** /app/workflows/approval_requests | List approval requests
|
|
79
79
|
*CoboWaas2.AppWorkflowsApi* | [**revokeApprovalRequest**](docs/AppWorkflowsApi.md#revokeApprovalRequest) | **POST** /app/workflows/approval_requests/{approval_id}/revoke | Revoke approval request
|
|
80
|
+
*CoboWaas2.AutoSweepApi* | [**cancelAutoSweepTaskById**](docs/AutoSweepApi.md#cancelAutoSweepTaskById) | **POST** /auto_sweep/tasks/{task_id}/cancel | Cancel auto sweep task
|
|
80
81
|
*CoboWaas2.AutoSweepApi* | [**createAutoSweepTask**](docs/AutoSweepApi.md#createAutoSweepTask) | **POST** /auto_sweep/tasks | Create auto-sweep task
|
|
81
82
|
*CoboWaas2.AutoSweepApi* | [**createWalletSweepToAddresses**](docs/AutoSweepApi.md#createWalletSweepToAddresses) | **POST** /auto_sweep/sweep_to_addresses | Create sweep-to address
|
|
82
83
|
*CoboWaas2.AutoSweepApi* | [**getAutoSweepTaskById**](docs/AutoSweepApi.md#getAutoSweepTaskById) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details
|
|
@@ -109,6 +110,7 @@ Class | Method | HTTP request | Description
|
|
|
109
110
|
*CoboWaas2.FeeStationApi* | [**estimateFeeStationFee**](docs/FeeStationApi.md#estimateFeeStationFee) | **POST** /fee_station/transactions/estimate_fee | Estimate transaction fee
|
|
110
111
|
*CoboWaas2.FeeStationApi* | [**getFeeStationTransactionById**](docs/FeeStationApi.md#getFeeStationTransactionById) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information
|
|
111
112
|
*CoboWaas2.FeeStationApi* | [**listFeeStationAddresses**](docs/FeeStationApi.md#listFeeStationAddresses) | **GET** /fee_station/addresses | List Fee Station addresses
|
|
113
|
+
*CoboWaas2.FeeStationApi* | [**listFeeStationFiatTransactions**](docs/FeeStationApi.md#listFeeStationFiatTransactions) | **GET** /fee_station/fiat_transactions | List Fee Station fiat transactions
|
|
112
114
|
*CoboWaas2.FeeStationApi* | [**listFeeStationTransactions**](docs/FeeStationApi.md#listFeeStationTransactions) | **GET** /fee_station/transactions | List all Fee Station transactions
|
|
113
115
|
*CoboWaas2.FeeStationApi* | [**listTokenBalancesForFeeStation**](docs/FeeStationApi.md#listTokenBalancesForFeeStation) | **GET** /fee_station/tokens | List Fee Station token balances
|
|
114
116
|
*CoboWaas2.GraphQLApi* | [**executeGraphql**](docs/GraphQLApi.md#executeGraphql) | **POST** /graphql | Execute a GraphQL query or mutation
|
|
@@ -576,6 +578,8 @@ Class | Method | HTTP request | Description
|
|
|
576
578
|
- [CoboWaas2.FeeStationCheckFeeStationUsage](docs/FeeStationCheckFeeStationUsage.md)
|
|
577
579
|
- [CoboWaas2.FeeStationCheckFeeStationUsageResponse](docs/FeeStationCheckFeeStationUsageResponse.md)
|
|
578
580
|
- [CoboWaas2.FeeStationDestination](docs/FeeStationDestination.md)
|
|
581
|
+
- [CoboWaas2.FeeStationFiatTransaction](docs/FeeStationFiatTransaction.md)
|
|
582
|
+
- [CoboWaas2.FeeStationFiatTransactionType](docs/FeeStationFiatTransactionType.md)
|
|
579
583
|
- [CoboWaas2.FeeStationGasStationType](docs/FeeStationGasStationType.md)
|
|
580
584
|
- [CoboWaas2.FeeStationSponsorTransactionDescription](docs/FeeStationSponsorTransactionDescription.md)
|
|
581
585
|
- [CoboWaas2.FeeStationTransactionType](docs/FeeStationTransactionType.md)
|
|
@@ -648,6 +652,7 @@ Class | Method | HTTP request | Description
|
|
|
648
652
|
- [CoboWaas2.ListDestinationEntries200Response](docs/ListDestinationEntries200Response.md)
|
|
649
653
|
- [CoboWaas2.ListDestinations200Response](docs/ListDestinations200Response.md)
|
|
650
654
|
- [CoboWaas2.ListExchanges200ResponseInner](docs/ListExchanges200ResponseInner.md)
|
|
655
|
+
- [CoboWaas2.ListFeeStationFiatTransactions200Response](docs/ListFeeStationFiatTransactions200Response.md)
|
|
651
656
|
- [CoboWaas2.ListForcedSweepRequests200Response](docs/ListForcedSweepRequests200Response.md)
|
|
652
657
|
- [CoboWaas2.ListKeyShareHolderGroups200Response](docs/ListKeyShareHolderGroups200Response.md)
|
|
653
658
|
- [CoboWaas2.ListKeyShareHolders200Response](docs/ListKeyShareHolders200Response.md)
|
package/dist/ApiClient.js
CHANGED
package/dist/api/AutoSweepApi.js
CHANGED
|
@@ -46,13 +46,57 @@ var AutoSweepApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
* This operation
|
|
51
|
-
* @param {
|
|
52
|
-
* @param {module:model/CreateAutoSweepTask} [CreateAutoSweepTask] The request body to create an auto-sweep task.
|
|
49
|
+
* Cancel auto sweep task
|
|
50
|
+
* This operation cancels an in-progress auto sweep task by its ID. Only tasks with the `Submitted` status can be cancelled. Tasks that have already been processed (status `TransactionCreated`) cannot be cancelled.
|
|
51
|
+
* @param {String} task_id The auto sweep task ID.
|
|
53
52
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutoSweepTask} and HTTP response
|
|
54
53
|
*/
|
|
55
54
|
return _createClass(AutoSweepApi, [{
|
|
55
|
+
key: "cancelAutoSweepTaskByIdWithHttpInfo",
|
|
56
|
+
value: function cancelAutoSweepTaskByIdWithHttpInfo(task_id) {
|
|
57
|
+
var postBody = null;
|
|
58
|
+
if (postBody && postBody.toJSON) {
|
|
59
|
+
postBody = postBody.toJSON();
|
|
60
|
+
}
|
|
61
|
+
// verify the required parameter 'task_id' is set
|
|
62
|
+
if (task_id === undefined || task_id === null) {
|
|
63
|
+
throw new Error("Missing the required parameter 'task_id' when calling cancelAutoSweepTaskById");
|
|
64
|
+
}
|
|
65
|
+
var pathParams = {
|
|
66
|
+
'task_id': task_id
|
|
67
|
+
};
|
|
68
|
+
var queryParams = {};
|
|
69
|
+
var headerParams = {};
|
|
70
|
+
var formParams = {};
|
|
71
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
72
|
+
var contentTypes = [];
|
|
73
|
+
var accepts = ['application/json'];
|
|
74
|
+
var returnType = _AutoSweepTask["default"];
|
|
75
|
+
return this.apiClient.callApi('/auto_sweep/tasks/{task_id}/cancel', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Cancel auto sweep task
|
|
80
|
+
* This operation cancels an in-progress auto sweep task by its ID. Only tasks with the `Submitted` status can be cancelled. Tasks that have already been processed (status `TransactionCreated`) cannot be cancelled.
|
|
81
|
+
* @param {String} task_id The auto sweep task ID.
|
|
82
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutoSweepTask}
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "cancelAutoSweepTaskById",
|
|
86
|
+
value: function cancelAutoSweepTaskById(task_id) {
|
|
87
|
+
return this.cancelAutoSweepTaskByIdWithHttpInfo(task_id).then(function (response_and_data) {
|
|
88
|
+
return response_and_data.data;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Create auto-sweep task
|
|
94
|
+
* This operation creates an auto-sweep task for the specified wallet and token. The task triggers transactions to sweep the full balance of the specified token to the configured sweep-to address.
|
|
95
|
+
* @param {Object} opts Optional parameters
|
|
96
|
+
* @param {module:model/CreateAutoSweepTask} [CreateAutoSweepTask] The request body to create an auto-sweep task.
|
|
97
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutoSweepTask} and HTTP response
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
56
100
|
key: "createAutoSweepTaskWithHttpInfo",
|
|
57
101
|
value: function createAutoSweepTaskWithHttpInfo(opts) {
|
|
58
102
|
opts = opts || {};
|
|
@@ -9,8 +9,10 @@ var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
|
9
9
|
var _EstimatedFixedFee = _interopRequireDefault(require("../model/EstimatedFixedFee"));
|
|
10
10
|
var _FeeStationCheckFeeStationUsage = _interopRequireDefault(require("../model/FeeStationCheckFeeStationUsage"));
|
|
11
11
|
var _FeeStationCheckFeeStationUsageResponse = _interopRequireDefault(require("../model/FeeStationCheckFeeStationUsageResponse"));
|
|
12
|
+
var _FeeStationFiatTransactionType = _interopRequireDefault(require("../model/FeeStationFiatTransactionType"));
|
|
12
13
|
var _FeeStationTransfer = _interopRequireDefault(require("../model/FeeStationTransfer"));
|
|
13
14
|
var _ListAddresses200Response = _interopRequireDefault(require("../model/ListAddresses200Response"));
|
|
15
|
+
var _ListFeeStationFiatTransactions200Response = _interopRequireDefault(require("../model/ListFeeStationFiatTransactions200Response"));
|
|
14
16
|
var _ListTokenBalancesForFeeStation200Response = _interopRequireDefault(require("../model/ListTokenBalancesForFeeStation200Response"));
|
|
15
17
|
var _ListTransactions200Response = _interopRequireDefault(require("../model/ListTransactions200Response"));
|
|
16
18
|
var _TransactionDetail = _interopRequireDefault(require("../model/TransactionDetail"));
|
|
@@ -228,6 +230,67 @@ var FeeStationApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
228
230
|
});
|
|
229
231
|
}
|
|
230
232
|
|
|
233
|
+
/**
|
|
234
|
+
* List Fee Station fiat transactions
|
|
235
|
+
* This operation retrieves all Fee Station fiat transactions under your organization. You can filter the results by request IDs, transaction IDs, transaction type, and created timestamp. You can also paginate your query results.
|
|
236
|
+
* @param {Object} opts Optional parameters
|
|
237
|
+
* @param {String} [transaction_ids] A list of transaction IDs, separated by comma.
|
|
238
|
+
* @param {module:model/FeeStationFiatTransactionType} [transaction_type] The type of the fiat transaction. Possible values include: - `deposit`: A deposit transaction. - `transfer`: A transfer transaction.
|
|
239
|
+
* @param {Number} [min_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
|
|
240
|
+
* @param {Number} [max_created_timestamp] The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
|
|
241
|
+
* @param {String} [before] A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
242
|
+
* @param {String} [after] A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
243
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
244
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListFeeStationFiatTransactions200Response} and HTTP response
|
|
245
|
+
*/
|
|
246
|
+
}, {
|
|
247
|
+
key: "listFeeStationFiatTransactionsWithHttpInfo",
|
|
248
|
+
value: function listFeeStationFiatTransactionsWithHttpInfo(opts) {
|
|
249
|
+
opts = opts || {};
|
|
250
|
+
var postBody = null;
|
|
251
|
+
if (postBody && postBody.toJSON) {
|
|
252
|
+
postBody = postBody.toJSON();
|
|
253
|
+
}
|
|
254
|
+
var pathParams = {};
|
|
255
|
+
var queryParams = {
|
|
256
|
+
'transaction_ids': opts['transaction_ids'],
|
|
257
|
+
'transaction_type': opts['transaction_type'],
|
|
258
|
+
'min_created_timestamp': opts['min_created_timestamp'],
|
|
259
|
+
'max_created_timestamp': opts['max_created_timestamp'],
|
|
260
|
+
'before': opts['before'],
|
|
261
|
+
'after': opts['after'],
|
|
262
|
+
'limit': opts['limit']
|
|
263
|
+
};
|
|
264
|
+
var headerParams = {};
|
|
265
|
+
var formParams = {};
|
|
266
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
267
|
+
var contentTypes = [];
|
|
268
|
+
var accepts = ['application/json'];
|
|
269
|
+
var returnType = _ListFeeStationFiatTransactions200Response["default"];
|
|
270
|
+
return this.apiClient.callApi('/fee_station/fiat_transactions', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* List Fee Station fiat transactions
|
|
275
|
+
* This operation retrieves all Fee Station fiat transactions under your organization. You can filter the results by request IDs, transaction IDs, transaction type, and created timestamp. You can also paginate your query results.
|
|
276
|
+
* @param {Object} opts Optional parameters
|
|
277
|
+
* @param {String} opts.transaction_ids A list of transaction IDs, separated by comma.
|
|
278
|
+
* @param {module:model/FeeStationFiatTransactionType} opts.transaction_type The type of the fiat transaction. Possible values include: - `deposit`: A deposit transaction. - `transfer`: A transfer transaction.
|
|
279
|
+
* @param {Number} opts.min_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change.
|
|
280
|
+
* @param {Number} opts.max_created_timestamp The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change.
|
|
281
|
+
* @param {String} opts.before A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response.
|
|
282
|
+
* @param {String} opts.after A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response.
|
|
283
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
284
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListFeeStationFiatTransactions200Response}
|
|
285
|
+
*/
|
|
286
|
+
}, {
|
|
287
|
+
key: "listFeeStationFiatTransactions",
|
|
288
|
+
value: function listFeeStationFiatTransactions(opts) {
|
|
289
|
+
return this.listFeeStationFiatTransactionsWithHttpInfo(opts).then(function (response_and_data) {
|
|
290
|
+
return response_and_data.data;
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
231
294
|
/**
|
|
232
295
|
* List all Fee Station transactions
|
|
233
296
|
* This operation retrieves all Fee Station transactions under your organization. You can filter the results by request ID, Cobo ID, transaction ID, transaction hash, type, status, and timestamp. You can also paginate and sort your query results.
|
package/dist/index.js
CHANGED
|
@@ -1581,6 +1581,18 @@ Object.defineProperty(exports, "FeeStationDestination", {
|
|
|
1581
1581
|
return _FeeStationDestination["default"];
|
|
1582
1582
|
}
|
|
1583
1583
|
});
|
|
1584
|
+
Object.defineProperty(exports, "FeeStationFiatTransaction", {
|
|
1585
|
+
enumerable: true,
|
|
1586
|
+
get: function get() {
|
|
1587
|
+
return _FeeStationFiatTransaction["default"];
|
|
1588
|
+
}
|
|
1589
|
+
});
|
|
1590
|
+
Object.defineProperty(exports, "FeeStationFiatTransactionType", {
|
|
1591
|
+
enumerable: true,
|
|
1592
|
+
get: function get() {
|
|
1593
|
+
return _FeeStationFiatTransactionType["default"];
|
|
1594
|
+
}
|
|
1595
|
+
});
|
|
1584
1596
|
Object.defineProperty(exports, "FeeStationGasStationType", {
|
|
1585
1597
|
enumerable: true,
|
|
1586
1598
|
get: function get() {
|
|
@@ -2019,6 +2031,12 @@ Object.defineProperty(exports, "ListExchanges200ResponseInner", {
|
|
|
2019
2031
|
return _ListExchanges200ResponseInner["default"];
|
|
2020
2032
|
}
|
|
2021
2033
|
});
|
|
2034
|
+
Object.defineProperty(exports, "ListFeeStationFiatTransactions200Response", {
|
|
2035
|
+
enumerable: true,
|
|
2036
|
+
get: function get() {
|
|
2037
|
+
return _ListFeeStationFiatTransactions200Response["default"];
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2022
2040
|
Object.defineProperty(exports, "ListForcedSweepRequests200Response", {
|
|
2023
2041
|
enumerable: true,
|
|
2024
2042
|
get: function get() {
|
|
@@ -5276,6 +5294,8 @@ var _FeeReserved = _interopRequireDefault(require("./model/FeeReserved"));
|
|
|
5276
5294
|
var _FeeStationCheckFeeStationUsage = _interopRequireDefault(require("./model/FeeStationCheckFeeStationUsage"));
|
|
5277
5295
|
var _FeeStationCheckFeeStationUsageResponse = _interopRequireDefault(require("./model/FeeStationCheckFeeStationUsageResponse"));
|
|
5278
5296
|
var _FeeStationDestination = _interopRequireDefault(require("./model/FeeStationDestination"));
|
|
5297
|
+
var _FeeStationFiatTransaction = _interopRequireDefault(require("./model/FeeStationFiatTransaction"));
|
|
5298
|
+
var _FeeStationFiatTransactionType = _interopRequireDefault(require("./model/FeeStationFiatTransactionType"));
|
|
5279
5299
|
var _FeeStationGasStationType = _interopRequireDefault(require("./model/FeeStationGasStationType"));
|
|
5280
5300
|
var _FeeStationSponsorTransactionDescription = _interopRequireDefault(require("./model/FeeStationSponsorTransactionDescription"));
|
|
5281
5301
|
var _FeeStationTransactionType = _interopRequireDefault(require("./model/FeeStationTransactionType"));
|
|
@@ -5348,6 +5368,7 @@ var _ListCounterpartyEntries200Response = _interopRequireDefault(require("./mode
|
|
|
5348
5368
|
var _ListDestinationEntries200Response = _interopRequireDefault(require("./model/ListDestinationEntries200Response"));
|
|
5349
5369
|
var _ListDestinations200Response = _interopRequireDefault(require("./model/ListDestinations200Response"));
|
|
5350
5370
|
var _ListExchanges200ResponseInner = _interopRequireDefault(require("./model/ListExchanges200ResponseInner"));
|
|
5371
|
+
var _ListFeeStationFiatTransactions200Response = _interopRequireDefault(require("./model/ListFeeStationFiatTransactions200Response"));
|
|
5351
5372
|
var _ListForcedSweepRequests200Response = _interopRequireDefault(require("./model/ListForcedSweepRequests200Response"));
|
|
5352
5373
|
var _ListKeyShareHolderGroups200Response = _interopRequireDefault(require("./model/ListKeyShareHolderGroups200Response"));
|
|
5353
5374
|
var _ListKeyShareHolders200Response = _interopRequireDefault(require("./model/ListKeyShareHolders200Response"));
|
|
@@ -71,6 +71,9 @@ var CreateAutoSweepTask = /*#__PURE__*/function () {
|
|
|
71
71
|
if (data.hasOwnProperty('token_id')) {
|
|
72
72
|
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
73
73
|
}
|
|
74
|
+
if (data.hasOwnProperty('min_balance_threshold')) {
|
|
75
|
+
obj['min_balance_threshold'] = _ApiClient["default"].convertToType(data['min_balance_threshold'], 'String');
|
|
76
|
+
}
|
|
74
77
|
}
|
|
75
78
|
return obj;
|
|
76
79
|
}
|
|
@@ -106,6 +109,10 @@ var CreateAutoSweepTask = /*#__PURE__*/function () {
|
|
|
106
109
|
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
107
110
|
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
108
111
|
}
|
|
112
|
+
// ensure the json data is a string
|
|
113
|
+
if (data['min_balance_threshold'] && !(typeof data['min_balance_threshold'] === 'string' || data['min_balance_threshold'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `min_balance_threshold` to be a primitive type in the JSON string but got " + data['min_balance_threshold']);
|
|
115
|
+
}
|
|
109
116
|
return true;
|
|
110
117
|
}
|
|
111
118
|
}]);
|
|
@@ -123,4 +130,10 @@ CreateAutoSweepTask.prototype['wallet_id'] = undefined;
|
|
|
123
130
|
* @member {String} token_id
|
|
124
131
|
*/
|
|
125
132
|
CreateAutoSweepTask.prototype['token_id'] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The minimum token balance threshold for auto sweep. If the token balance of an address is less than this threshold, the address will not be swept.
|
|
136
|
+
* @member {String} min_balance_threshold
|
|
137
|
+
*/
|
|
138
|
+
CreateAutoSweepTask.prototype['min_balance_threshold'] = undefined;
|
|
126
139
|
var _default = exports["default"] = CreateAutoSweepTask;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _FeeStationFiatTransactionType = _interopRequireDefault(require("./FeeStationFiatTransactionType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The FeeStationFiatTransaction model module.
|
|
30
|
+
* @module model/FeeStationFiatTransaction
|
|
31
|
+
*/
|
|
32
|
+
var FeeStationFiatTransaction = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>FeeStationFiatTransaction</code>.
|
|
35
|
+
* The information about a fiat transaction.
|
|
36
|
+
* @alias module:model/FeeStationFiatTransaction
|
|
37
|
+
* @param transaction_id {String} The transaction ID.
|
|
38
|
+
* @param transaction_type {module:model/FeeStationFiatTransactionType}
|
|
39
|
+
* @param amount {String} The transaction amount.
|
|
40
|
+
* @param fiat_currency {String} The fiat currency of the transaction. Possible values include: - `USD`: US Dollar.
|
|
41
|
+
* @param status {module:model/FeeStationFiatTransaction.StatusEnum} The status of the fiat transaction. Possible values include: - `Created`: The transaction has been created. - `Succeeded`: The transaction has been completed successfully.
|
|
42
|
+
*/
|
|
43
|
+
function FeeStationFiatTransaction(transaction_id, transaction_type, amount, fiat_currency, status) {
|
|
44
|
+
_classCallCheck(this, FeeStationFiatTransaction);
|
|
45
|
+
FeeStationFiatTransaction.initialize(this, transaction_id, transaction_type, amount, fiat_currency, status);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(FeeStationFiatTransaction, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, transaction_id, transaction_type, amount, fiat_currency, status) {
|
|
56
|
+
obj['transaction_id'] = transaction_id;
|
|
57
|
+
obj['transaction_type'] = transaction_type;
|
|
58
|
+
obj['amount'] = amount;
|
|
59
|
+
obj['fiat_currency'] = fiat_currency;
|
|
60
|
+
obj['status'] = status;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Constructs a <code>FeeStationFiatTransaction</code> from a plain JavaScript object, optionally creating a new instance.
|
|
65
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
66
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
67
|
+
* @param {module:model/FeeStationFiatTransaction} obj Optional instance to populate.
|
|
68
|
+
* @return {module:model/FeeStationFiatTransaction} The populated <code>FeeStationFiatTransaction</code> instance.
|
|
69
|
+
*/
|
|
70
|
+
}, {
|
|
71
|
+
key: "constructFromObject",
|
|
72
|
+
value: function constructFromObject(data, obj) {
|
|
73
|
+
if (data) {
|
|
74
|
+
obj = obj || new FeeStationFiatTransaction();
|
|
75
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
76
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('main_transaction_id')) {
|
|
79
|
+
obj['main_transaction_id'] = _ApiClient["default"].convertToType(data['main_transaction_id'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('transaction_type')) {
|
|
82
|
+
obj['transaction_type'] = _FeeStationFiatTransactionType["default"].constructFromObject(data['transaction_type']);
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('amount')) {
|
|
85
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('fiat_currency')) {
|
|
88
|
+
obj['fiat_currency'] = _ApiClient["default"].convertToType(data['fiat_currency'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('status')) {
|
|
91
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('cobo_category')) {
|
|
94
|
+
obj['cobo_category'] = _ApiClient["default"].convertToType(data['cobo_category'], ['String']);
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
97
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('modified_timestamp')) {
|
|
100
|
+
obj['modified_timestamp'] = _ApiClient["default"].convertToType(data['modified_timestamp'], 'Number');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return obj;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Validates the JSON data with respect to <code>FeeStationFiatTransaction</code>.
|
|
108
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
109
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>FeeStationFiatTransaction</code>.
|
|
110
|
+
*/
|
|
111
|
+
}, {
|
|
112
|
+
key: "validateJSON",
|
|
113
|
+
value: function validateJSON(data) {
|
|
114
|
+
// check to make sure all required properties are present in the JSON string
|
|
115
|
+
var _iterator = _createForOfIteratorHelper(FeeStationFiatTransaction.RequiredProperties),
|
|
116
|
+
_step;
|
|
117
|
+
try {
|
|
118
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
119
|
+
var property = _step.value;
|
|
120
|
+
if (!data.hasOwnProperty(property)) {
|
|
121
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
} catch (err) {
|
|
126
|
+
_iterator.e(err);
|
|
127
|
+
} finally {
|
|
128
|
+
_iterator.f();
|
|
129
|
+
}
|
|
130
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['main_transaction_id'] && !(typeof data['main_transaction_id'] === 'string' || data['main_transaction_id'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `main_transaction_id` to be a primitive type in the JSON string but got " + data['main_transaction_id']);
|
|
136
|
+
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
if (data['fiat_currency'] && !(typeof data['fiat_currency'] === 'string' || data['fiat_currency'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `fiat_currency` to be a primitive type in the JSON string but got " + data['fiat_currency']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is an array
|
|
150
|
+
if (!Array.isArray(data['cobo_category'])) {
|
|
151
|
+
throw new Error("Expected the field `cobo_category` to be an array in the JSON data but got " + data['cobo_category']);
|
|
152
|
+
}
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
}]);
|
|
156
|
+
}();
|
|
157
|
+
FeeStationFiatTransaction.RequiredProperties = ["transaction_id", "transaction_type", "amount", "fiat_currency", "status"];
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The transaction ID.
|
|
161
|
+
* @member {String} transaction_id
|
|
162
|
+
*/
|
|
163
|
+
FeeStationFiatTransaction.prototype['transaction_id'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The UUID of the parent (main) transaction that this record is associated with. Set only when the current record is a gas/fee transaction initiated by FeeStation; omit for main transactions.
|
|
167
|
+
* @member {String} main_transaction_id
|
|
168
|
+
*/
|
|
169
|
+
FeeStationFiatTransaction.prototype['main_transaction_id'] = undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @member {module:model/FeeStationFiatTransactionType} transaction_type
|
|
173
|
+
*/
|
|
174
|
+
FeeStationFiatTransaction.prototype['transaction_type'] = undefined;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The transaction amount.
|
|
178
|
+
* @member {String} amount
|
|
179
|
+
*/
|
|
180
|
+
FeeStationFiatTransaction.prototype['amount'] = undefined;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The fiat currency of the transaction. Possible values include: - `USD`: US Dollar.
|
|
184
|
+
* @member {String} fiat_currency
|
|
185
|
+
*/
|
|
186
|
+
FeeStationFiatTransaction.prototype['fiat_currency'] = undefined;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The status of the fiat transaction. Possible values include: - `Created`: The transaction has been created. - `Succeeded`: The transaction has been completed successfully.
|
|
190
|
+
* @member {module:model/FeeStationFiatTransaction.StatusEnum} status
|
|
191
|
+
*/
|
|
192
|
+
FeeStationFiatTransaction.prototype['status'] = undefined;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The Cobo category of the transaction.
|
|
196
|
+
* @member {Array.<String>} cobo_category
|
|
197
|
+
*/
|
|
198
|
+
FeeStationFiatTransaction.prototype['cobo_category'] = undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The time when the transaction was created, in Unix timestamp format, measured in milliseconds.
|
|
202
|
+
* @member {Number} created_timestamp
|
|
203
|
+
*/
|
|
204
|
+
FeeStationFiatTransaction.prototype['created_timestamp'] = undefined;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The time when the transaction was last modified, in Unix timestamp format, measured in milliseconds.
|
|
208
|
+
* @member {Number} modified_timestamp
|
|
209
|
+
*/
|
|
210
|
+
FeeStationFiatTransaction.prototype['modified_timestamp'] = undefined;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Allowed values for the <code>status</code> property.
|
|
214
|
+
* @enum {String}
|
|
215
|
+
* @readonly
|
|
216
|
+
*/
|
|
217
|
+
FeeStationFiatTransaction['StatusEnum'] = {
|
|
218
|
+
/**
|
|
219
|
+
* value: "Created"
|
|
220
|
+
* @const
|
|
221
|
+
*/
|
|
222
|
+
"Created": "Created",
|
|
223
|
+
/**
|
|
224
|
+
* value: "Succeeded"
|
|
225
|
+
* @const
|
|
226
|
+
*/
|
|
227
|
+
"Succeeded": "Succeeded",
|
|
228
|
+
/**
|
|
229
|
+
* value: "unknown_default_open_api"
|
|
230
|
+
* @const
|
|
231
|
+
*/
|
|
232
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
233
|
+
};
|
|
234
|
+
var _default = exports["default"] = FeeStationFiatTransaction;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class FeeStationFiatTransactionType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var FeeStationFiatTransactionType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function FeeStationFiatTransactionType() {
|
|
32
|
+
_classCallCheck(this, FeeStationFiatTransactionType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "deposit"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "deposit", "deposit");
|
|
38
|
+
/**
|
|
39
|
+
* value: "transfer"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "transfer", "transfer");
|
|
43
|
+
/**
|
|
44
|
+
* value: "unknown_default_open_api"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
48
|
+
}
|
|
49
|
+
return _createClass(FeeStationFiatTransactionType, null, [{
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value:
|
|
52
|
+
/**
|
|
53
|
+
* Returns a <code>FeeStationFiatTransactionType</code> enum value from a Javascript object name.
|
|
54
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
55
|
+
* @return {module:model/FeeStationFiatTransactionType} The enum <code>FeeStationFiatTransactionType</code> value.
|
|
56
|
+
*/
|
|
57
|
+
function constructFromObject(object) {
|
|
58
|
+
return object;
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
}();
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _FeeStationFiatTransaction = _interopRequireDefault(require("./FeeStationFiatTransaction"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The ListFeeStationFiatTransactions200Response model module.
|
|
31
|
+
* @module model/ListFeeStationFiatTransactions200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListFeeStationFiatTransactions200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListFeeStationFiatTransactions200Response</code>.
|
|
36
|
+
* @alias module:model/ListFeeStationFiatTransactions200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListFeeStationFiatTransactions200Response() {
|
|
39
|
+
_classCallCheck(this, ListFeeStationFiatTransactions200Response);
|
|
40
|
+
ListFeeStationFiatTransactions200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListFeeStationFiatTransactions200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListFeeStationFiatTransactions200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListFeeStationFiatTransactions200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListFeeStationFiatTransactions200Response} The populated <code>ListFeeStationFiatTransactions200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListFeeStationFiatTransactions200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_FeeStationFiatTransaction["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListFeeStationFiatTransactions200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListFeeStationFiatTransactions200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_FeeStationFiatTransaction["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/FeeStationFiatTransaction>} data
|
|
116
|
+
*/
|
|
117
|
+
ListFeeStationFiatTransactions200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListFeeStationFiatTransactions200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListFeeStationFiatTransactions200Response;
|
|
@@ -73,6 +73,9 @@ var PaymentEstimateFeeRequest = /*#__PURE__*/function () {
|
|
|
73
73
|
if (data.hasOwnProperty('recipient_token_id')) {
|
|
74
74
|
obj['recipient_token_id'] = _ApiClient["default"].convertToType(data['recipient_token_id'], 'String');
|
|
75
75
|
}
|
|
76
|
+
if (data.hasOwnProperty('transfer_via_va')) {
|
|
77
|
+
obj['transfer_via_va'] = _ApiClient["default"].convertToType(data['transfer_via_va'], 'Boolean');
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
return obj;
|
|
78
81
|
}
|
|
@@ -147,4 +150,10 @@ PaymentEstimateFeeRequest.prototype['estimate_fees'] = undefined;
|
|
|
147
150
|
* @member {String} recipient_token_id
|
|
148
151
|
*/
|
|
149
152
|
PaymentEstimateFeeRequest.prototype['recipient_token_id'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account.
|
|
156
|
+
* @member {Boolean} transfer_via_va
|
|
157
|
+
*/
|
|
158
|
+
PaymentEstimateFeeRequest.prototype['transfer_via_va'] = undefined;
|
|
150
159
|
var _default = exports["default"] = PaymentEstimateFeeRequest;
|
|
@@ -68,6 +68,9 @@ var PaymentPayoutRecipientInfo = /*#__PURE__*/function () {
|
|
|
68
68
|
if (data.hasOwnProperty('bank_account_id')) {
|
|
69
69
|
obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
|
|
70
70
|
}
|
|
71
|
+
if (data.hasOwnProperty('transfer_via_va')) {
|
|
72
|
+
obj['transfer_via_va'] = _ApiClient["default"].convertToType(data['transfer_via_va'], 'Boolean');
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
return obj;
|
|
73
76
|
}
|
|
@@ -123,4 +126,10 @@ PaymentPayoutRecipientInfo.prototype['currency'] = undefined;
|
|
|
123
126
|
* @member {String} bank_account_id
|
|
124
127
|
*/
|
|
125
128
|
PaymentPayoutRecipientInfo.prototype['bank_account_id'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account.
|
|
132
|
+
* @member {Boolean} transfer_via_va
|
|
133
|
+
*/
|
|
134
|
+
PaymentPayoutRecipientInfo.prototype['transfer_via_va'] = undefined;
|
|
126
135
|
var _default = exports["default"] = PaymentPayoutRecipientInfo;
|
|
@@ -33,13 +33,12 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>RefundLinkBusinessInfo</code>.
|
|
35
35
|
* @alias module:model/RefundLinkBusinessInfo
|
|
36
|
-
* @param transaction_id {String} The transaction ID of the original order payment or top-up. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction.
|
|
37
36
|
* @param amount {String} The amount to refund, denominated in the cryptocurrency of the original payment transaction. The amount must be a positive number and can have up to two decimal places.
|
|
38
37
|
* @param refund_source {module:model/RefundType}
|
|
39
38
|
*/
|
|
40
|
-
function RefundLinkBusinessInfo(
|
|
39
|
+
function RefundLinkBusinessInfo(amount, refund_source) {
|
|
41
40
|
_classCallCheck(this, RefundLinkBusinessInfo);
|
|
42
|
-
RefundLinkBusinessInfo.initialize(this,
|
|
41
|
+
RefundLinkBusinessInfo.initialize(this, amount, refund_source);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
@@ -49,8 +48,7 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
49
48
|
*/
|
|
50
49
|
return _createClass(RefundLinkBusinessInfo, null, [{
|
|
51
50
|
key: "initialize",
|
|
52
|
-
value: function initialize(obj,
|
|
53
|
-
obj['transaction_id'] = transaction_id;
|
|
51
|
+
value: function initialize(obj, amount, refund_source) {
|
|
54
52
|
obj['amount'] = amount;
|
|
55
53
|
obj['refund_source'] = refund_source;
|
|
56
54
|
}
|
|
@@ -67,6 +65,9 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
67
65
|
value: function constructFromObject(data, obj) {
|
|
68
66
|
if (data) {
|
|
69
67
|
obj = obj || new RefundLinkBusinessInfo();
|
|
68
|
+
if (data.hasOwnProperty('order_id')) {
|
|
69
|
+
obj['order_id'] = _ApiClient["default"].convertToType(data['order_id'], 'String');
|
|
70
|
+
}
|
|
70
71
|
if (data.hasOwnProperty('transaction_id')) {
|
|
71
72
|
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
72
73
|
}
|
|
@@ -110,6 +111,10 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
110
111
|
} finally {
|
|
111
112
|
_iterator.f();
|
|
112
113
|
}
|
|
114
|
+
if (data['order_id'] && !(typeof data['order_id'] === 'string' || data['order_id'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `order_id` to be a primitive type in the JSON string but got " + data['order_id']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
113
118
|
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
114
119
|
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
115
120
|
}
|
|
@@ -129,10 +134,16 @@ var RefundLinkBusinessInfo = /*#__PURE__*/function () {
|
|
|
129
134
|
}
|
|
130
135
|
}]);
|
|
131
136
|
}();
|
|
132
|
-
RefundLinkBusinessInfo.RequiredProperties = ["
|
|
137
|
+
RefundLinkBusinessInfo.RequiredProperties = ["amount", "refund_source"];
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The id of the order to refund. Specify either `order_id` or `transaction_id`, but not both.
|
|
141
|
+
* @member {String} order_id
|
|
142
|
+
*/
|
|
143
|
+
RefundLinkBusinessInfo.prototype['order_id'] = undefined;
|
|
133
144
|
|
|
134
145
|
/**
|
|
135
|
-
* The transaction ID of the original order payment or top-up.
|
|
146
|
+
* The transaction ID of the original order payment or top-up. Specify either `order_id` or `transaction_id`, but not both. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction.
|
|
136
147
|
* @member {String} transaction_id
|
|
137
148
|
*/
|
|
138
149
|
RefundLinkBusinessInfo.prototype['transaction_id'] = undefined;
|
package/docs/AutoSweepApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**cancelAutoSweepTaskById**](AutoSweepApi.md#cancelAutoSweepTaskById) | **POST** /auto_sweep/tasks/{task_id}/cancel | Cancel auto sweep task
|
|
7
8
|
[**createAutoSweepTask**](AutoSweepApi.md#createAutoSweepTask) | **POST** /auto_sweep/tasks | Create auto-sweep task
|
|
8
9
|
[**createWalletSweepToAddresses**](AutoSweepApi.md#createWalletSweepToAddresses) | **POST** /auto_sweep/sweep_to_addresses | Create sweep-to address
|
|
9
10
|
[**getAutoSweepTaskById**](AutoSweepApi.md#getAutoSweepTaskById) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details
|
|
@@ -12,6 +13,56 @@ Method | HTTP request | Description
|
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
16
|
+
## cancelAutoSweepTaskById
|
|
17
|
+
|
|
18
|
+
> AutoSweepTask cancelAutoSweepTaskById(task_id)
|
|
19
|
+
|
|
20
|
+
Cancel auto sweep task
|
|
21
|
+
|
|
22
|
+
This operation cancels an in-progress auto sweep task by its ID. Only tasks with the `Submitted` status can be cancelled. Tasks that have already been processed (status `TransactionCreated`) cannot be cancelled.
|
|
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.AutoSweepApi();
|
|
36
|
+
const task_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
37
|
+
apiInstance.cancelAutoSweepTaskById(task_id).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
|
+
**task_id** | **String**| The auto sweep task ID. |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**AutoSweepTask**](AutoSweepTask.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: Not defined
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
15
66
|
## createAutoSweepTask
|
|
16
67
|
|
|
17
68
|
> AutoSweepTask createAutoSweepTask(opts)
|
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**wallet_id** | **String** | ID of the wallet where the token will be swept. |
|
|
8
8
|
**token_id** | **String** | ID of the token to be swept. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
|
|
9
|
+
**min_balance_threshold** | **String** | The minimum token balance threshold for auto sweep. If the token balance of an address is less than this threshold, the address will not be swept. | [optional]
|
|
9
10
|
|
|
10
11
|
|
package/docs/FeeStationApi.md
CHANGED
|
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**estimateFeeStationFee**](FeeStationApi.md#estimateFeeStationFee) | **POST** /fee_station/transactions/estimate_fee | Estimate transaction fee
|
|
9
9
|
[**getFeeStationTransactionById**](FeeStationApi.md#getFeeStationTransactionById) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information
|
|
10
10
|
[**listFeeStationAddresses**](FeeStationApi.md#listFeeStationAddresses) | **GET** /fee_station/addresses | List Fee Station addresses
|
|
11
|
+
[**listFeeStationFiatTransactions**](FeeStationApi.md#listFeeStationFiatTransactions) | **GET** /fee_station/fiat_transactions | List Fee Station fiat transactions
|
|
11
12
|
[**listFeeStationTransactions**](FeeStationApi.md#listFeeStationTransactions) | **GET** /fee_station/transactions | List all Fee Station transactions
|
|
12
13
|
[**listTokenBalancesForFeeStation**](FeeStationApi.md#listTokenBalancesForFeeStation) | **GET** /fee_station/tokens | List Fee Station token balances
|
|
13
14
|
|
|
@@ -227,6 +228,70 @@ Name | Type | Description | Notes
|
|
|
227
228
|
- **Accept**: application/json
|
|
228
229
|
|
|
229
230
|
|
|
231
|
+
## listFeeStationFiatTransactions
|
|
232
|
+
|
|
233
|
+
> ListFeeStationFiatTransactions200Response listFeeStationFiatTransactions(opts)
|
|
234
|
+
|
|
235
|
+
List Fee Station fiat transactions
|
|
236
|
+
|
|
237
|
+
This operation retrieves all Fee Station fiat transactions under your organization. You can filter the results by request IDs, transaction IDs, transaction type, and created timestamp. You can also paginate your query results.
|
|
238
|
+
|
|
239
|
+
### Example
|
|
240
|
+
|
|
241
|
+
```javascript
|
|
242
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
243
|
+
// Initialize the API client
|
|
244
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
245
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
246
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
247
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
248
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
249
|
+
// Call the API
|
|
250
|
+
const apiInstance = new CoboWaas2.FeeStationApi();
|
|
251
|
+
const opts = {
|
|
252
|
+
'transaction_ids': "f47ac10b-58cc-4372-a567-0e02b2c3d479,557918d2-632a-4fe1-932f-315711f05fe3",
|
|
253
|
+
'transaction_type': new CoboWaas2.FeeStationFiatTransactionType(),
|
|
254
|
+
'min_created_timestamp': 1635744000000,
|
|
255
|
+
'max_created_timestamp': 1635744000000,
|
|
256
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
257
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
258
|
+
'limit': 10
|
|
259
|
+
};
|
|
260
|
+
apiInstance.listFeeStationFiatTransactions(opts).then((data) => {
|
|
261
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
262
|
+
}, (error) => {
|
|
263
|
+
console.error(error);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Parameters
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
Name | Type | Description | Notes
|
|
272
|
+
------------- | ------------- | ------------- | -------------
|
|
273
|
+
**transaction_ids** | **String**| A list of transaction IDs, separated by comma. | [optional]
|
|
274
|
+
**transaction_type** | [**FeeStationFiatTransactionType**](.md)| The type of the fiat transaction. Possible values include: - `deposit`: A deposit transaction. - `transfer`: A transfer transaction. | [optional]
|
|
275
|
+
**min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
|
|
276
|
+
**max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional]
|
|
277
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
278
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
279
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
280
|
+
|
|
281
|
+
### Return type
|
|
282
|
+
|
|
283
|
+
[**ListFeeStationFiatTransactions200Response**](ListFeeStationFiatTransactions200Response.md)
|
|
284
|
+
|
|
285
|
+
### Authorization
|
|
286
|
+
|
|
287
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
288
|
+
|
|
289
|
+
### HTTP request headers
|
|
290
|
+
|
|
291
|
+
- **Content-Type**: Not defined
|
|
292
|
+
- **Accept**: application/json
|
|
293
|
+
|
|
294
|
+
|
|
230
295
|
## listFeeStationTransactions
|
|
231
296
|
|
|
232
297
|
> ListTransactions200Response listFeeStationTransactions(opts)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# CoboWaas2.FeeStationFiatTransaction
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**transaction_id** | **String** | The transaction ID. |
|
|
8
|
+
**main_transaction_id** | **String** | The UUID of the parent (main) transaction that this record is associated with. Set only when the current record is a gas/fee transaction initiated by FeeStation; omit for main transactions. | [optional]
|
|
9
|
+
**transaction_type** | [**FeeStationFiatTransactionType**](FeeStationFiatTransactionType.md) | |
|
|
10
|
+
**amount** | **String** | The transaction amount. |
|
|
11
|
+
**fiat_currency** | **String** | The fiat currency of the transaction. Possible values include: - `USD`: US Dollar. |
|
|
12
|
+
**status** | **String** | The status of the fiat transaction. Possible values include: - `Created`: The transaction has been created. - `Succeeded`: The transaction has been completed successfully. |
|
|
13
|
+
**cobo_category** | **[String]** | The Cobo category of the transaction. | [optional]
|
|
14
|
+
**created_timestamp** | **Number** | The time when the transaction was created, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
15
|
+
**modified_timestamp** | **Number** | The time when the transaction was last modified, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Enum: StatusEnum
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* `Created` (value: `"Created"`)
|
|
23
|
+
|
|
24
|
+
* `Succeeded` (value: `"Succeeded"`)
|
|
25
|
+
|
|
26
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListFeeStationFiatTransactions200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[FeeStationFiatTransaction]**](FeeStationFiatTransaction.md) | | [optional]
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -7,5 +7,6 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**fee_type** | [**PaymentFeeType**](PaymentFeeType.md) | | [optional]
|
|
8
8
|
**estimate_fees** | [**[PaymentEstimateFee]**](PaymentEstimateFee.md) | A list of token IDs and amounts for which fees will be calculated. |
|
|
9
9
|
**recipient_token_id** | **String** | The token ID that the recipient will receive. Required only when `fee_type` is `CryptoPayoutBridge`. | [optional]
|
|
10
|
+
**transfer_via_va** | **Boolean** | For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account. | [optional]
|
|
10
11
|
|
|
11
12
|
|
|
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**token_id** | **String** | The token ID for the cryptocurrency to be sent to the recipient. If `recipient_info.token_id` is on a different chain than `payout_param.token_id`, the token will be automatically bridged to the chain specified in `recipient_info.token_id`. | [optional]
|
|
9
9
|
**currency** | **String** | The fiat currency of the bank account to which the payout will be sent. | [optional]
|
|
10
10
|
**bank_account_id** | **String** | The ID of the bank account to which the payout will be sent. You can retrieve the bank account ID by calling [List destination entries](https://www.cobo.com/payments/en/api-references/payment/list-destination-entries). | [optional]
|
|
11
|
+
**transfer_via_va** | **Boolean** | For OffRamp payout, whether the payout is transferred to a registered bank account via a virtual account (VA) or directly. - `true`: The payout is transferred to a registered bank account via a VA (virtual account). - `false`: The payout is transferred directly to a registered bank account. | [optional]
|
|
11
12
|
|
|
12
13
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**
|
|
7
|
+
**order_id** | **String** | The id of the order to refund. Specify either `order_id` or `transaction_id`, but not both. | [optional]
|
|
8
|
+
**transaction_id** | **String** | The transaction ID of the original order payment or top-up. Specify either `order_id` or `transaction_id`, but not both. On the refund page, the from address of this transaction will be pre-filled as the default refund address. The refund will be processed in the same token and on the same blockchain as this transaction. | [optional]
|
|
8
9
|
**amount** | **String** | The amount to refund, denominated in the cryptocurrency of the original payment transaction. The amount must be a positive number and can have up to two decimal places. |
|
|
9
10
|
**refund_source** | [**RefundType**](RefundType.md) | |
|
|
10
11
|
**merchant_id** | **String** | The merchant ID, required if `refund_source` is `Merchant`. The fund will be deducted from the specified merchant's balance. | [optional]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
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",
|