@cobo/cobo-waas2 1.14.0 → 1.16.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 +70 -5
- package/dist/ApiClient.js +2 -3
- package/dist/PreRequestScript.js +1 -1
- package/dist/api/AddressBooksApi.js +4 -4
- package/dist/api/AppWorkflowsApi.js +275 -0
- package/dist/api/DevelopersApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +12 -12
- package/dist/api/FeeStationApi.js +26 -26
- package/dist/api/PaymentApi.js +16 -16
- package/dist/api/StakingsApi.js +28 -28
- package/dist/api/TransactionsApi.js +16 -8
- package/dist/api/WalletsApi.js +121 -70
- package/dist/api/WalletsExchangeWalletApi.js +8 -8
- package/dist/api/WalletsMPCWalletsApi.js +20 -20
- package/dist/crypto/ApiSigner.js +1 -2
- package/dist/index.js +420 -0
- package/dist/model/AddressBook.js +18 -0
- package/dist/model/AppWorkflow.js +173 -0
- package/dist/model/AppWorkflowField.js +137 -0
- package/dist/model/AppWorkflowPolicy.js +144 -0
- package/dist/model/ApprovalEntry.js +148 -0
- package/dist/model/ApprovalRequest.js +178 -0
- package/dist/model/ApprovalRequestDetail.js +176 -0
- package/dist/model/ApprovalStatus.js +71 -0
- package/dist/model/ApprovalUser.js +146 -0
- package/dist/model/BabylonStakeExtra.js +16 -0
- package/dist/model/BankAccount.js +18 -0
- package/dist/model/BatchCheckUtxo201Response.js +107 -0
- package/dist/model/BatchCheckUtxoRequest.js +142 -0
- package/dist/model/BatchUTXOParam.js +123 -0
- package/dist/model/ChainInfo.js +9 -0
- package/dist/model/CreateApprovalRequest201Response.js +109 -0
- package/dist/model/CreateSettlement.js +4 -29
- package/dist/model/CreateStakeActivityExtra.js +6 -0
- package/dist/model/CreateTokenListingRequest201Response.js +2 -2
- package/dist/model/CreateTokenListingRequestRequest.js +4 -4
- package/dist/model/CustodialWeb3TransferSource.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +13 -0
- package/dist/model/EstimateFeeParams.js +6 -0
- package/dist/model/EstimateTransferFeeParams.js +13 -0
- package/dist/model/FeeStationTransfer.js +1 -1
- package/dist/model/ListApprovalRequests200Response.js +123 -0
- package/dist/model/Merchant.js +18 -0
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/Order.js +49 -0
- package/dist/model/PaymentOrderEventData.js +64 -0
- package/dist/model/PaymentRefundEventData.js +77 -0
- package/dist/model/PaymentSettlementEvent.js +46 -0
- package/dist/model/PaymentTransaction.js +13 -0
- package/dist/model/PolicyAction.js +123 -0
- package/dist/model/PolicyActionContent.js +167 -0
- package/dist/model/PolicyActionType.js +66 -0
- package/dist/model/PolicyCondition.js +148 -0
- package/dist/model/PolicyFieldOperator.js +76 -0
- package/dist/model/PolicyFieldValueType.js +61 -0
- package/dist/model/Refund.js +53 -0
- package/dist/model/RequestApproval.js +188 -0
- package/dist/model/RevokeApprovalRequest201Response.js +118 -0
- package/dist/model/RevokeApprovalRequestRequest.js +110 -0
- package/dist/model/Settlement.js +31 -0
- package/dist/model/SettlementDetail.js +57 -0
- package/dist/model/SettlementInfo.js +31 -0
- package/dist/model/SwapActivity.js +3 -3
- package/dist/model/SwapActivityApprovers.js +122 -0
- package/dist/model/SwapActivityDetail.js +36 -6
- package/dist/model/SwapApproversStatus.js +66 -0
- package/dist/model/SwapQuote.js +49 -4
- package/dist/model/SwapToken.js +2 -2
- package/dist/model/TSSBaseRequestEventData.js +163 -0
- package/dist/model/TSSCallbackActionType.js +61 -0
- package/dist/model/TSSCallbackRequest.js +122 -0
- package/dist/model/TSSCallbackRequestType.js +76 -0
- package/dist/model/TSSCallbackResponse.js +118 -0
- package/dist/model/TSSCurve.js +61 -0
- package/dist/model/TSSCurveType.js +61 -0
- package/dist/model/TSSEvent.js +158 -0
- package/dist/model/TSSEventData.js +278 -0
- package/dist/model/TSSEventDataType.js +71 -0
- package/dist/model/TSSEventType.js +136 -0
- package/dist/model/TSSGroup.js +221 -0
- package/dist/model/TSSGroupType.js +61 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSKeyGenEventData.js +228 -0
- package/dist/model/TSSKeyGenExtra.js +154 -0
- package/dist/model/TSSKeyGenRequest.js +130 -0
- package/dist/model/TSSKeyReshareEventData.js +228 -0
- package/dist/model/TSSKeyReshareExtra.js +169 -0
- package/dist/model/TSSKeyReshareRequest.js +177 -0
- package/dist/model/TSSKeyShareSignDetail.js +100 -0
- package/dist/model/TSSKeyShareSignEventData.js +228 -0
- package/dist/model/TSSKeyShareSignExtra.js +171 -0
- package/dist/model/TSSKeyShareSignRequest.js +146 -0
- package/dist/model/TSSKeyShareSignSignature.js +126 -0
- package/dist/model/TSSKeyShareSignSignatures.js +107 -0
- package/dist/model/TSSKeySignEventData.js +228 -0
- package/dist/model/TSSKeySignExtra.js +203 -0
- package/dist/model/TSSKeySignRequest.js +192 -0
- package/dist/model/TSSParticipant.js +113 -0
- package/dist/model/TSSProtocol.js +66 -0
- package/dist/model/TSSRequestTypeEenum.js +71 -0
- package/dist/model/TSSSignature.js +139 -0
- package/dist/model/TSSSignatureType.js +66 -0
- package/dist/model/TSSSignatures.js +125 -0
- package/dist/model/TSSStatus.js +96 -0
- package/dist/model/TokenListing.js +10 -10
- package/dist/model/TokenListingEventData.js +15 -15
- package/dist/model/TransactionCoboCategory.js +102 -7
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionSubStatus.js +35 -0
- package/dist/model/UTXO.js +9 -0
- package/dist/model/WebhookEventData.js +15 -9
- package/docs/AddressBook.md +2 -0
- package/docs/AddressBooksApi.md +2 -2
- package/docs/AppWorkflow.md +12 -0
- package/docs/AppWorkflowField.md +11 -0
- package/docs/AppWorkflowPolicy.md +10 -0
- package/docs/AppWorkflowsApi.md +273 -0
- package/docs/ApprovalEntry.md +11 -0
- package/docs/ApprovalRequest.md +13 -0
- package/docs/ApprovalRequestDetail.md +13 -0
- package/docs/ApprovalStatus.md +16 -0
- package/docs/ApprovalUser.md +12 -0
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/BankAccount.md +2 -0
- package/docs/BatchCheckUtxo201Response.md +9 -0
- package/docs/BatchCheckUtxoRequest.md +10 -0
- package/docs/BatchUTXOParam.md +10 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CreateApprovalRequest201Response.md +9 -0
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTokenListingRequest201Response.md +1 -1
- package/docs/CreateTokenListingRequestRequest.md +2 -2
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/DevelopersApi.md +2 -2
- package/docs/DevelopersWebhooksApi.md +6 -6
- package/docs/EstimateContractCallFeeParams.md +1 -0
- package/docs/EstimateFeeParams.md +1 -0
- package/docs/EstimateTransferFeeParams.md +1 -0
- package/docs/FeeStationApi.md +14 -14
- package/docs/ListApprovalRequests200Response.md +10 -0
- package/docs/Merchant.md +2 -0
- package/docs/MpcTransferSource.md +1 -1
- package/docs/Order.md +3 -0
- package/docs/PaymentApi.md +8 -8
- package/docs/PaymentOrderEventData.md +3 -0
- package/docs/PaymentRefundEventData.md +5 -0
- package/docs/PaymentSettlementEvent.md +3 -0
- package/docs/PaymentTransaction.md +1 -0
- package/docs/PolicyAction.md +10 -0
- package/docs/PolicyActionContent.md +25 -0
- package/docs/PolicyActionType.md +14 -0
- package/docs/PolicyCondition.md +12 -0
- package/docs/PolicyFieldOperator.md +18 -0
- package/docs/PolicyFieldValueType.md +12 -0
- package/docs/Refund.md +5 -0
- package/docs/RequestApproval.md +13 -0
- package/docs/RevokeApprovalRequest201Response.md +10 -0
- package/docs/RevokeApprovalRequestRequest.md +9 -0
- package/docs/Settlement.md +3 -0
- package/docs/SettlementDetail.md +5 -0
- package/docs/SettlementInfo.md +3 -0
- package/docs/StakingsApi.md +14 -14
- package/docs/SwapActivity.md +3 -3
- package/docs/SwapActivityApprovers.md +10 -0
- package/docs/SwapActivityDetail.md +4 -3
- package/docs/SwapApproversStatus.md +14 -0
- package/docs/SwapQuote.md +3 -0
- package/docs/SwapToken.md +2 -2
- package/docs/TSSBaseRequestEventData.md +14 -0
- package/docs/TSSCallbackActionType.md +12 -0
- package/docs/TSSCallbackRequest.md +12 -0
- package/docs/TSSCallbackRequestType.md +18 -0
- package/docs/TSSCallbackResponse.md +12 -0
- package/docs/TSSCurve.md +12 -0
- package/docs/TSSCurveType.md +12 -0
- package/docs/TSSEvent.md +13 -0
- package/docs/TSSEventData.md +16 -0
- package/docs/TSSEventDataType.md +16 -0
- package/docs/TSSEventType.md +42 -0
- package/docs/TSSGroup.md +19 -0
- package/docs/TSSGroupType.md +12 -0
- package/docs/TSSKeyGenEventData.md +16 -0
- package/docs/TSSKeyGenExtra.md +13 -0
- package/docs/TSSKeyGenRequest.md +13 -0
- package/docs/TSSKeyReshareEventData.md +16 -0
- package/docs/TSSKeyReshareExtra.md +14 -0
- package/docs/TSSKeyReshareRequest.md +17 -0
- package/docs/TSSKeyShareSignDetail.md +10 -0
- package/docs/TSSKeyShareSignEventData.md +16 -0
- package/docs/TSSKeyShareSignExtra.md +13 -0
- package/docs/TSSKeyShareSignRequest.md +12 -0
- package/docs/TSSKeyShareSignSignature.md +12 -0
- package/docs/TSSKeyShareSignSignatures.md +9 -0
- package/docs/TSSKeySignEventData.md +16 -0
- package/docs/TSSKeySignExtra.md +15 -0
- package/docs/TSSKeySignRequest.md +18 -0
- package/docs/TSSParticipant.md +11 -0
- package/docs/TSSProtocol.md +14 -0
- package/docs/TSSRequestTypeEenum.md +16 -0
- package/docs/TSSSignature.md +13 -0
- package/docs/TSSSignatureType.md +14 -0
- package/docs/TSSSignatures.md +11 -0
- package/docs/TSSStatus.md +26 -0
- package/docs/TokenListing.md +6 -6
- package/docs/TokenListingEventData.md +6 -6
- package/docs/TransactionCoboCategory.md +41 -3
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionSubStatus.md +14 -0
- package/docs/TransactionsApi.md +8 -4
- package/docs/UTXO.md +1 -0
- package/docs/WalletsApi.md +91 -36
- package/docs/WalletsExchangeWalletApi.md +4 -4
- package/docs/WalletsMPCWalletsApi.md +10 -10
- package/docs/WebhookEventData.md +8 -7
- package/package.json +1 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# CoboWaas2.AppWorkflowsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**createApprovalRequest**](AppWorkflowsApi.md#createApprovalRequest) | **POST** /app/workflows/approval_requests | Request workflow approval
|
|
8
|
+
[**getApprovalRequestById**](AppWorkflowsApi.md#getApprovalRequestById) | **GET** /app/workflows/approval_requests/{approval_id} | Get approval request details
|
|
9
|
+
[**listAppWorkflows**](AppWorkflowsApi.md#listAppWorkflows) | **GET** /app/workflows | list app workflows
|
|
10
|
+
[**listApprovalRequests**](AppWorkflowsApi.md#listApprovalRequests) | **GET** /app/workflows/approval_requests | List approval requests
|
|
11
|
+
[**revokeApprovalRequest**](AppWorkflowsApi.md#revokeApprovalRequest) | **POST** /app/workflows/approval_requests/{approval_id}/revoke | Revoke approval request
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## createApprovalRequest
|
|
16
|
+
|
|
17
|
+
> CreateApprovalRequest201Response createApprovalRequest(opts)
|
|
18
|
+
|
|
19
|
+
Request workflow approval
|
|
20
|
+
|
|
21
|
+
This operation is request approval from app workflow with idempotency checks.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
27
|
+
// Initialize the API client
|
|
28
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
29
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
30
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
31
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
32
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
33
|
+
// Call the API
|
|
34
|
+
const apiInstance = new CoboWaas2.AppWorkflowsApi();
|
|
35
|
+
const opts = {
|
|
36
|
+
'RequestApproval': new CoboWaas2.RequestApproval()
|
|
37
|
+
};
|
|
38
|
+
apiInstance.createApprovalRequest(opts).then((data) => {
|
|
39
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
40
|
+
}, (error) => {
|
|
41
|
+
console.error(error);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Name | Type | Description | Notes
|
|
50
|
+
------------- | ------------- | ------------- | -------------
|
|
51
|
+
**RequestApproval** | [**RequestApproval**](RequestApproval.md)| The request body to app workflow approval. | [optional]
|
|
52
|
+
|
|
53
|
+
### Return type
|
|
54
|
+
|
|
55
|
+
[**CreateApprovalRequest201Response**](CreateApprovalRequest201Response.md)
|
|
56
|
+
|
|
57
|
+
### Authorization
|
|
58
|
+
|
|
59
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
60
|
+
|
|
61
|
+
### HTTP request headers
|
|
62
|
+
|
|
63
|
+
- **Content-Type**: application/json
|
|
64
|
+
- **Accept**: application/json
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## getApprovalRequestById
|
|
68
|
+
|
|
69
|
+
> ApprovalRequestDetail getApprovalRequestById(approval_id)
|
|
70
|
+
|
|
71
|
+
Get approval request details
|
|
72
|
+
|
|
73
|
+
This operation is retrieves approval request from app workflow.
|
|
74
|
+
|
|
75
|
+
### Example
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
79
|
+
// Initialize the API client
|
|
80
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
81
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
82
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
83
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
84
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
85
|
+
// Call the API
|
|
86
|
+
const apiInstance = new CoboWaas2.AppWorkflowsApi();
|
|
87
|
+
const approval_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
88
|
+
apiInstance.getApprovalRequestById(approval_id).then((data) => {
|
|
89
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
90
|
+
}, (error) => {
|
|
91
|
+
console.error(error);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Parameters
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Name | Type | Description | Notes
|
|
100
|
+
------------- | ------------- | ------------- | -------------
|
|
101
|
+
**approval_id** | **String**| The approval ID that is used to track a workflow approval request. |
|
|
102
|
+
|
|
103
|
+
### Return type
|
|
104
|
+
|
|
105
|
+
[**ApprovalRequestDetail**](ApprovalRequestDetail.md)
|
|
106
|
+
|
|
107
|
+
### Authorization
|
|
108
|
+
|
|
109
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
110
|
+
|
|
111
|
+
### HTTP request headers
|
|
112
|
+
|
|
113
|
+
- **Content-Type**: Not defined
|
|
114
|
+
- **Accept**: application/json
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## listAppWorkflows
|
|
118
|
+
|
|
119
|
+
> [AppWorkflow] listAppWorkflows()
|
|
120
|
+
|
|
121
|
+
list app workflows
|
|
122
|
+
|
|
123
|
+
This operation is list app workflows of app.
|
|
124
|
+
|
|
125
|
+
### Example
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
129
|
+
// Initialize the API client
|
|
130
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
131
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
132
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
133
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
134
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
135
|
+
// Call the API
|
|
136
|
+
const apiInstance = new CoboWaas2.AppWorkflowsApi();
|
|
137
|
+
apiInstance.listAppWorkflows().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
|
+
This endpoint does not need any parameter.
|
|
148
|
+
|
|
149
|
+
### Return type
|
|
150
|
+
|
|
151
|
+
[**[AppWorkflow]**](AppWorkflow.md)
|
|
152
|
+
|
|
153
|
+
### Authorization
|
|
154
|
+
|
|
155
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
156
|
+
|
|
157
|
+
### HTTP request headers
|
|
158
|
+
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: application/json
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## listApprovalRequests
|
|
164
|
+
|
|
165
|
+
> ListApprovalRequests200Response listApprovalRequests(operation_id, opts)
|
|
166
|
+
|
|
167
|
+
List approval requests
|
|
168
|
+
|
|
169
|
+
This operation is retrieves list approval requests from app workflow.
|
|
170
|
+
|
|
171
|
+
### Example
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
175
|
+
// Initialize the API client
|
|
176
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
177
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
178
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
179
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
180
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
181
|
+
// Call the API
|
|
182
|
+
const apiInstance = new CoboWaas2.AppWorkflowsApi();
|
|
183
|
+
const operation_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
184
|
+
const opts = {
|
|
185
|
+
'limit': 10,
|
|
186
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
187
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
188
|
+
};
|
|
189
|
+
apiInstance.listApprovalRequests(operation_id, opts).then((data) => {
|
|
190
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
191
|
+
}, (error) => {
|
|
192
|
+
console.error(error);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Parameters
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
Name | Type | Description | Notes
|
|
201
|
+
------------- | ------------- | ------------- | -------------
|
|
202
|
+
**operation_id** | **String**| The operation ID that is used to track a workflow. The operation ID is provided by you and must be unique within your app. |
|
|
203
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
204
|
+
**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]
|
|
205
|
+
**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]
|
|
206
|
+
|
|
207
|
+
### Return type
|
|
208
|
+
|
|
209
|
+
[**ListApprovalRequests200Response**](ListApprovalRequests200Response.md)
|
|
210
|
+
|
|
211
|
+
### Authorization
|
|
212
|
+
|
|
213
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
214
|
+
|
|
215
|
+
### HTTP request headers
|
|
216
|
+
|
|
217
|
+
- **Content-Type**: Not defined
|
|
218
|
+
- **Accept**: application/json
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
## revokeApprovalRequest
|
|
222
|
+
|
|
223
|
+
> RevokeApprovalRequest201Response revokeApprovalRequest(approval_id, opts)
|
|
224
|
+
|
|
225
|
+
Revoke approval request
|
|
226
|
+
|
|
227
|
+
This operation is revoke approval request from app workflow.
|
|
228
|
+
|
|
229
|
+
### Example
|
|
230
|
+
|
|
231
|
+
```javascript
|
|
232
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
233
|
+
// Initialize the API client
|
|
234
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
235
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
236
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
237
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
238
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
239
|
+
// Call the API
|
|
240
|
+
const apiInstance = new CoboWaas2.AppWorkflowsApi();
|
|
241
|
+
const approval_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
242
|
+
const opts = {
|
|
243
|
+
'RevokeApprovalRequestRequest': new CoboWaas2.RevokeApprovalRequestRequest()
|
|
244
|
+
};
|
|
245
|
+
apiInstance.revokeApprovalRequest(approval_id, opts).then((data) => {
|
|
246
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
247
|
+
}, (error) => {
|
|
248
|
+
console.error(error);
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Parameters
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
Name | Type | Description | Notes
|
|
257
|
+
------------- | ------------- | ------------- | -------------
|
|
258
|
+
**approval_id** | **String**| The approval ID that is used to track a workflow approval request. |
|
|
259
|
+
**RevokeApprovalRequestRequest** | [**RevokeApprovalRequestRequest**](RevokeApprovalRequestRequest.md)| The revoke request body to app workflow approval. | [optional]
|
|
260
|
+
|
|
261
|
+
### Return type
|
|
262
|
+
|
|
263
|
+
[**RevokeApprovalRequest201Response**](RevokeApprovalRequest201Response.md)
|
|
264
|
+
|
|
265
|
+
### Authorization
|
|
266
|
+
|
|
267
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
268
|
+
|
|
269
|
+
### HTTP request headers
|
|
270
|
+
|
|
271
|
+
- **Content-Type**: application/json
|
|
272
|
+
- **Accept**: application/json
|
|
273
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.ApprovalEntry
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**status** | [**ApprovalStatus**](ApprovalStatus.md) | |
|
|
8
|
+
**created_timestamp** | **Number** | The time when the approval was created, in Unix timestamp format, measured in milliseconds. |
|
|
9
|
+
**approval_users** | [**[ApprovalUser]**](ApprovalUser.md) | | [optional]
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.ApprovalRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**approval_id** | **String** | |
|
|
8
|
+
**request_id** | **String** | |
|
|
9
|
+
**fields** | [**[AppWorkflowField]**](AppWorkflowField.md) | |
|
|
10
|
+
**status** | [**ApprovalStatus**](ApprovalStatus.md) | |
|
|
11
|
+
**initiated_timestamp** | **Number** | The time when the approval was initiated, in Unix timestamp format, measured in milliseconds. |
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.ApprovalRequestDetail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**approval_id** | **String** | | [optional]
|
|
8
|
+
**initiator** | [**ApprovalUser**](ApprovalUser.md) | |
|
|
9
|
+
**approved_list** | [**[ApprovalEntry]**](ApprovalEntry.md) | | [optional]
|
|
10
|
+
**status** | [**ApprovalStatus**](ApprovalStatus.md) | |
|
|
11
|
+
**modified_timestamp** | **Number** | The time when the approval was modified, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CoboWaas2.ApprovalStatus
|
|
2
|
+
|
|
3
|
+
## Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* `Pending` (value: `"Pending"`)
|
|
7
|
+
|
|
8
|
+
* `Completed` (value: `"Completed"`)
|
|
9
|
+
|
|
10
|
+
* `Failed` (value: `"Failed"`)
|
|
11
|
+
|
|
12
|
+
* `Revoked` (value: `"Revoked"`)
|
|
13
|
+
|
|
14
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CoboWaas2.ApprovalUser
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**email** | **String** | The approval user email. |
|
|
8
|
+
**name** | **String** | The approval user name. | [optional]
|
|
9
|
+
**status** | [**ApprovalStatus**](ApprovalStatus.md) | |
|
|
10
|
+
**created_timestamp** | **Number** | The time when the approval was created, in Unix timestamp format, measured in milliseconds. |
|
|
11
|
+
|
|
12
|
+
|
|
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**finality_provider_public_key** | **String** | The public key of the finality provider. |
|
|
9
9
|
**stake_block_time** | **Number** | The number of blocks that need to be processed before the locked tokens are unlocked and become accessible. |
|
|
10
10
|
**auto_broadcast** | **Boolean** | Whether to automatically broadcast the transaction. The default value is `true`. - `true`: Automatically broadcast the transaction. - `false`: The transaction will not be submitted to the blockchain automatically. You can call [Broadcast signed transactions](https://www.cobo.com/developers/v2/api-references/transactions/broadcast-signed-transactions) to broadcast the transaction to the blockchain, or retrieve the signed raw transaction data `raw_tx` by calling [Get transaction information](https://www.cobo.com/developers/v2/api-references/transactions/get-transaction-information) and broadcast it yourself. | [optional]
|
|
11
|
+
**babylon_address** | [**StakingSource**](StakingSource.md) | | [optional]
|
|
11
12
|
|
|
12
13
|
|
package/docs/BankAccount.md
CHANGED
|
@@ -6,5 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**bank_account_id** | **String** | The bank account ID. |
|
|
8
8
|
**info** | **{String: Object}** | JSON-formatted bank account details. |
|
|
9
|
+
**created_timestamp** | **Number** | The created time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
|
|
10
|
+
**updated_timestamp** | **Number** | The updated time of the bank account, represented as a UNIX timestamp in seconds. | [optional]
|
|
9
11
|
|
|
10
12
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.BatchCheckUtxoRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**token_id** | **String** | The token ID, which is the unique identifier of a token. 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). |
|
|
8
|
+
**utxos** | [**[BatchUTXOParam]**](BatchUTXOParam.md) | |
|
|
9
|
+
|
|
10
|
+
|
package/docs/ChainInfo.md
CHANGED
|
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**explorer_address_url** | **String** | The address URL pattern on the blockchain explorer. You can use it to concatenate the address URLs. | [optional]
|
|
12
12
|
**require_memo** | **Boolean** | Whether the chain requires a memo. | [optional]
|
|
13
13
|
**confirming_threshold** | **Number** | The number of confirmations required for an on-chain transaction, such as 64 for Ethereum. | [optional]
|
|
14
|
+
**coinbase_maturity** | **Number** | The number of confirmations required for a coinbase transaction to be mature, such as 100 for BTC. | [optional]
|
|
14
15
|
|
|
15
16
|
|
package/docs/CreateSettlement.md
CHANGED
|
@@ -7,8 +7,8 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**merchant_id** | **String** | The merchant ID. | [optional]
|
|
8
8
|
**token_id** | **String** | The ID of the cryptocurrency you want to settle. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | [optional]
|
|
9
9
|
**currency** | **String** | The fiat currency for settling the cryptocurrency. Currently, only `USD` is supported. | [optional] [default to 'USD']
|
|
10
|
-
**amount** | **String** | The settlement amount. - If `token_id` is specified, this represents the settlement amount in the specified cryptocurrency. - If `token_id` is not specified, this represents the settlement amount in the specified fiat currency. |
|
|
11
|
-
**bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. |
|
|
10
|
+
**amount** | **String** | The settlement amount. - If `token_id` is specified, this represents the settlement amount in the specified cryptocurrency. - If `token_id` is not specified, this represents the settlement amount in the specified fiat currency. | [optional]
|
|
11
|
+
**bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. | [optional]
|
|
12
12
|
**settlement_type** | [**SettlementType**](SettlementType.md) | | [optional]
|
|
13
13
|
|
|
14
14
|
|
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**finality_provider_public_key** | **String** | The public key of the finality provider. |
|
|
9
9
|
**stake_block_time** | **Number** | The number of blocks that need to be processed before the locked tokens are unlocked and become accessible. |
|
|
10
10
|
**auto_broadcast** | **Boolean** | Whether to automatically broadcast the transaction. The default value is `true`. - `true`: Automatically broadcast the transaction. - `false`: The transaction will not be submitted to the blockchain automatically. You can call [Broadcast signed transactions](https://www.cobo.com/developers/v2/api-references/transactions/broadcast-signed-transactions) to broadcast the transaction to the blockchain, or retrieve the signed raw transaction data `raw_tx` by calling [Get transaction information](https://www.cobo.com/developers/v2/api-references/transactions/get-transaction-information) and broadcast it yourself. | [optional]
|
|
11
|
+
**babylon_address** | [**StakingSource**](StakingSource.md) | | [optional]
|
|
11
12
|
**provider_name** | **String** | The name of the provider. |
|
|
12
13
|
**timelock** | **Number** | The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal. |
|
|
13
14
|
**change_address** | **String** | The change address on the Bitcoin chain. If not provided, the source wallet's address will be used as the change address. | [optional]
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**request_id** | **String** |
|
|
7
|
+
**request_id** | **String** | The unique identifier for the token listing request. You can use it to track the request status with the [Get token listing request](https://www.cobo.com/developers/v2/api-references/wallets/get-token-listing-request) operation. |
|
|
8
8
|
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**wallet_type** | [**WalletType**](WalletType.md) | |
|
|
8
8
|
**wallet_subtype** | [**WalletSubtype**](WalletSubtype.md) | |
|
|
9
|
-
**chain_id** | **String** | ID of the blockchain where the token
|
|
10
|
-
**contract_address** | **String** |
|
|
9
|
+
**chain_id** | **String** | The ID of the blockchain where the token is deployed. |
|
|
10
|
+
**contract_address** | **String** | The token's contract address on the specified blockchain. |
|
|
11
11
|
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**source_type** | [**WalletSubtype**](WalletSubtype.md) | |
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
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]
|
|
9
|
+
**address** | **String** | The wallet address. If you want to specify the UTXOs to be used, please provide the `included_utxos` property. When `included_utxos` is specified, only these specified UTXOs will be used for the transaction. 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
12
|
|
package/docs/DevelopersApi.md
CHANGED
|
@@ -105,8 +105,8 @@ Name | Type | Description | Notes
|
|
|
105
105
|
**wallet_ids** | **String**| A list of wallet IDs, separated by commas. | [optional]
|
|
106
106
|
**status** | **String**| The callback message status. Possible values include `Approved`, `Denied`, and `Failed`. | [optional]
|
|
107
107
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
108
|
-
**before** | **String**|
|
|
109
|
-
**after** | **String**|
|
|
108
|
+
**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]
|
|
109
|
+
**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]
|
|
110
110
|
|
|
111
111
|
### Return type
|
|
112
112
|
|
|
@@ -214,8 +214,8 @@ Name | Type | Description | Notes
|
|
|
214
214
|
**status** | [**WebhookEndpointStatus**](.md)| | [optional]
|
|
215
215
|
**event_type** | [**WebhookEventType**](.md)| | [optional]
|
|
216
216
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
217
|
-
**before** | **String**|
|
|
218
|
-
**after** | **String**|
|
|
217
|
+
**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]
|
|
218
|
+
**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]
|
|
219
219
|
|
|
220
220
|
### Return type
|
|
221
221
|
|
|
@@ -320,8 +320,8 @@ Name | Type | Description | Notes
|
|
|
320
320
|
**event_id** | **String**| The event ID. You can obtain a list of event IDs by calling [List all events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-events). |
|
|
321
321
|
**endpoint_id** | **String**| The webhook endpoint ID. You can retrieve a list of webhook endpoint IDs by calling [List webhook endpoints](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-webhook-endpoints). |
|
|
322
322
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
323
|
-
**before** | **String**|
|
|
324
|
-
**after** | **String**|
|
|
323
|
+
**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]
|
|
324
|
+
**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]
|
|
325
325
|
|
|
326
326
|
### Return type
|
|
327
327
|
|
|
@@ -382,8 +382,8 @@ Name | Type | Description | Notes
|
|
|
382
382
|
**status** | [**WebhookEventStatus**](.md)| | [optional]
|
|
383
383
|
**type** | [**WebhookEventType**](.md)| | [optional]
|
|
384
384
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
385
|
-
**before** | **String**|
|
|
386
|
-
**after** | **String**|
|
|
385
|
+
**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]
|
|
386
|
+
**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]
|
|
387
387
|
|
|
388
388
|
### Return type
|
|
389
389
|
|
|
@@ -10,5 +10,6 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**source** | [**ContractCallSource**](ContractCallSource.md) | |
|
|
11
11
|
**destination** | [**ContractCallDestination**](ContractCallDestination.md) | |
|
|
12
12
|
**fee_type** | [**FeeType**](FeeType.md) | | [optional]
|
|
13
|
+
**replaced_transaction_id** | **String** | The ID of the transaction that this transaction replaced. | [optional]
|
|
13
14
|
|
|
14
15
|
|
|
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**token_id** | **String** | The token ID of the transferred token. 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). |
|
|
11
11
|
**destination** | [**ContractCallDestination**](ContractCallDestination.md) | |
|
|
12
12
|
**fee_type** | [**FeeType**](FeeType.md) | | [optional]
|
|
13
|
+
**replaced_transaction_id** | **String** | The ID of the transaction that this transaction replaced. | [optional]
|
|
13
14
|
**chain_id** | **String** | The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). |
|
|
14
15
|
|
|
15
16
|
|
|
@@ -10,5 +10,6 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**token_id** | **String** | The token ID of the transferred token. 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). |
|
|
11
11
|
**destination** | [**TransferDestination**](TransferDestination.md) | | [optional]
|
|
12
12
|
**fee_type** | [**FeeType**](FeeType.md) | | [optional]
|
|
13
|
+
**replaced_transaction_id** | **String** | The ID of the transaction that this transaction replaced. | [optional]
|
|
13
14
|
|
|
14
15
|
|