@cobo/cobo-waas2 1.21.0 → 1.23.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 +80 -5
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/PaymentApi.js +233 -20
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +105 -4
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +259 -7
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/ApprovalDetail.js +11 -11
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreatePaymentOrderRequest.js +3 -3
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +9 -0
- package/dist/model/CreateSettlement.js +28 -5
- package/dist/model/CreateSmartContractWalletParams.js +6 -0
- package/dist/model/CreateSweepToAddress.js +126 -0
- package/dist/model/CreateWalletParams.js +6 -0
- package/dist/model/CreatedWalletInfo.js +6 -0
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DeleteCryptoAddress201Response.js +2 -2
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/ListAutoSweepTask200Response.js +123 -0
- package/dist/model/ListMerchantBalances200Response.js +107 -0
- package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/Merchant.js +1 -1
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +177 -0
- package/dist/model/PspBalance.js +175 -0
- package/dist/model/ReceivedAmountPerAddress.js +126 -0
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SafeWallet.js +9 -0
- package/dist/model/SettlementDetail.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokenizationActivityInfo.js +8 -4
- package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
- package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
- package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
- package/dist/model/TokenizationBurnTokenRequest.js +13 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationContractCallParamsData.js +43 -9
- package/dist/model/TokenizationContractCallRequest.js +13 -0
- package/dist/model/TokenizationContractCallType.js +5 -0
- package/dist/model/TokenizationERC20TokenParams.js +4 -4
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
- package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
- package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationMintTokenRequest.js +13 -0
- package/dist/model/TokenizationMpcOperationSource.js +2 -2
- package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationPauseTokenRequest.js +13 -0
- package/dist/model/TokenizationSOLTokenParams.js +173 -0
- package/dist/model/TokenizationSolContractCallParams.js +137 -0
- package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationTokenDetailInfo.js +6 -6
- package/dist/model/TokenizationTokenInfo.js +4 -4
- package/dist/model/TokenizationTokenOperationSource.js +1 -1
- package/dist/model/TokenizationTokenPermissionParams.js +1 -1
- package/dist/model/TokenizationTokenPermissionType.js +15 -0
- package/dist/model/TokenizationTokenStandard.js +5 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
- package/dist/model/TokenizationWeb3OperationSource.js +2 -2
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +62 -10
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressesEventData.md +3 -1
- package/docs/ApprovalDetail.md +4 -4
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +285 -0
- package/docs/AutoSweepTask.md +16 -0
- package/docs/AutoSweepTaskStatus.md +12 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +3 -3
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -0
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateSmartContractWalletParams.md +1 -0
- package/docs/CreateSweepToAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -0
- package/docs/CreatedWalletInfo.md +1 -0
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DeleteCryptoAddress201Response.md +1 -1
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/ListAutoSweepTask200Response.md +10 -0
- package/docs/ListMerchantBalances200Response.md +9 -0
- package/docs/ListPaymentWalletBalances200Response.md +9 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/Merchant.md +1 -1
- package/docs/MerchantBalance.md +16 -0
- package/docs/OrgInfo.md +1 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +229 -11
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +14 -0
- package/docs/PspBalance.md +14 -0
- package/docs/ReceivedAmountPerAddress.md +10 -0
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SafeWallet.md +1 -0
- package/docs/SettlementDetail.md +1 -1
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationActivityInfo.md +2 -2
- package/docs/TokenizationAllowlistActivationRequest.md +1 -0
- package/docs/TokenizationAllowlistAddressNote.md +3 -3
- package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
- package/docs/TokenizationApi.md +1069 -0
- package/docs/TokenizationBlocklistAddressNote.md +3 -3
- package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
- package/docs/TokenizationBurnTokenRequest.md +1 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
- package/docs/TokenizationContractCallParamsData.md +2 -1
- package/docs/TokenizationContractCallRequest.md +1 -0
- package/docs/TokenizationContractCallType.md +2 -0
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
- package/docs/TokenizationIssuedTokenRequest.md +2 -1
- package/docs/TokenizationMintEstimateFeeParams.md +1 -0
- package/docs/TokenizationMintTokenRequest.md +1 -0
- package/docs/TokenizationMpcOperationSource.md +1 -1
- package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationPauseTokenRequest.md +1 -0
- package/docs/TokenizationSOLTokenParams.md +14 -0
- package/docs/TokenizationSolContractCallParams.md +10 -0
- package/docs/TokenizationSolTokenPermissionParams.md +13 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
- package/docs/TokenizationTokenDetailInfo.md +1 -1
- package/docs/TokenizationTokenInfo.md +1 -1
- package/docs/TokenizationTokenOperationSource.md +1 -1
- package/docs/TokenizationTokenPermissionType.md +6 -0
- package/docs/TokenizationTokenStandard.md +2 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationUnpauseTokenRequest.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
- package/docs/TokenizationWeb3OperationSource.md +1 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +114 -2
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +8 -2
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
package/docs/ApprovalResult.md
CHANGED
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
## Enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
* `
|
|
6
|
+
* `APPROVED` (value: `"Approved"`)
|
|
7
7
|
|
|
8
|
-
* `
|
|
8
|
+
* `REJECTED` (value: `"Rejected"`)
|
|
9
9
|
|
|
10
|
-
* `
|
|
11
|
-
|
|
12
|
-
* `unknown_default_open_api` (value: `11184809`)
|
|
10
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
13
11
|
|
|
14
12
|
|
package/docs/ApprovalTemplate.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**business_key** | **String** |
|
|
8
|
-
**template_text** | **String** |
|
|
9
|
-
**template_version** | **String** |
|
|
7
|
+
**business_key** | **String** | Business key used to identify the type of approval template. | [optional]
|
|
8
|
+
**template_text** | **String** | Text content defined in the approval template used to generate approval messages shown to users | [optional]
|
|
9
|
+
**template_version** | **String** | Version of the approval template. | [optional]
|
|
10
10
|
|
|
11
11
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
## Enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
* `REJECTED` (value:
|
|
6
|
+
* `REJECTED` (value: `"Rejected"`)
|
|
7
7
|
|
|
8
|
-
* `PENDING` (value: `
|
|
8
|
+
* `PENDING` (value: `"Pending"`)
|
|
9
9
|
|
|
10
|
-
* `APPROVED` (value: `
|
|
10
|
+
* `APPROVED` (value: `"Approved"`)
|
|
11
11
|
|
|
12
|
-
* `unknown_default_open_api` (value: `
|
|
12
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
13
13
|
|
|
14
14
|
|
|
@@ -4,15 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
7
|
+
**name** | **String** | Name of the user who approved the transaction. | [optional]
|
|
8
|
+
**email** | **String** | Email of the user. | [optional]
|
|
9
|
+
**pubkey** | **String** | Public key of the user. | [optional]
|
|
10
|
+
**signature** | **String** | Signature produced by the user for this approval. | [optional]
|
|
11
|
+
**statement_uuid** | **String** | UUID of the statement associated with this approval. | [optional]
|
|
11
12
|
**result** | [**ApprovalResult**](ApprovalResult.md) | | [optional]
|
|
12
|
-
**
|
|
13
|
-
**
|
|
14
|
-
**
|
|
15
|
-
**
|
|
16
|
-
**
|
|
13
|
+
**approval_result_code** | **Number** | Integer value representing the result of the approval. | [optional]
|
|
14
|
+
**created_time** | **Number** | Timestamp when the approval was created. | [optional]
|
|
15
|
+
**template_version** | **String** | Version of the template used for the transaction approval. | [optional]
|
|
16
|
+
**header_title** | **String** | Display title used in the transaction approval. | [optional]
|
|
17
|
+
**is_for_sign** | **Boolean** | Indicates whether this approval requires signing: - `true`: The user must sign the transaction. - `false`: The user only needs to approve or reject without signing. | [optional]
|
|
18
|
+
**show_info** | **String** | Additional information to show for the transaction approval. | [optional]
|
|
19
|
+
**language** | **String** | Language used for the transaction approval. | [optional]
|
|
20
|
+
**message_version** | **String** | Version of the message format used for the transaction approval. | [optional]
|
|
21
|
+
**message** | **String** | Message associated with the transaction approval. | [optional]
|
|
22
|
+
**extra_message** | **String** | Any additional message or information related to the transaction approval. | [optional]
|
|
17
23
|
|
|
18
24
|
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# CoboWaas2.AutoSweepApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**createAutoSweepTask**](AutoSweepApi.md#createAutoSweepTask) | **POST** /auto_sweep/tasks | Create auto-sweep task
|
|
8
|
+
[**createWalletSweepToAddresses**](AutoSweepApi.md#createWalletSweepToAddresses) | **POST** /auto_sweep/sweep_to_addresses | create sweep-to address
|
|
9
|
+
[**getAutoSweepTaskById**](AutoSweepApi.md#getAutoSweepTaskById) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details
|
|
10
|
+
[**listAutoSweepTask**](AutoSweepApi.md#listAutoSweepTask) | **GET** /auto_sweep/tasks | List auto-sweep tasks
|
|
11
|
+
[**listWalletSweepToAddresses**](AutoSweepApi.md#listWalletSweepToAddresses) | **GET** /auto_sweep/sweep_to_addresses | List sweep-to addresses
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## createAutoSweepTask
|
|
16
|
+
|
|
17
|
+
> AutoSweepTask createAutoSweepTask(opts)
|
|
18
|
+
|
|
19
|
+
Create auto-sweep task
|
|
20
|
+
|
|
21
|
+
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.
|
|
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.AutoSweepApi();
|
|
35
|
+
const opts = {
|
|
36
|
+
'CreateAutoSweepTask': new CoboWaas2.CreateAutoSweepTask()
|
|
37
|
+
};
|
|
38
|
+
apiInstance.createAutoSweepTask(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
|
+
**CreateAutoSweepTask** | [**CreateAutoSweepTask**](CreateAutoSweepTask.md)| The request body to create an auto-sweep task. | [optional]
|
|
52
|
+
|
|
53
|
+
### Return type
|
|
54
|
+
|
|
55
|
+
[**AutoSweepTask**](AutoSweepTask.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
|
+
## createWalletSweepToAddresses
|
|
68
|
+
|
|
69
|
+
> SweepToAddress createWalletSweepToAddresses(opts)
|
|
70
|
+
|
|
71
|
+
create sweep-to address
|
|
72
|
+
|
|
73
|
+
This operation creates a new sweep-to address for the specified wallet. The previously sweep-to address for the same token becomes invalid once the new one is created. Use this operation to change the sweep-to address when your setup changes, you switch networks, or the current address is compromised or tainted by suspicious funds. You can withdraw any remaining balances from the old sweep-to addresses to the new address or another designated destination. <Note>Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled.</Note>
|
|
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.AutoSweepApi();
|
|
87
|
+
const opts = {
|
|
88
|
+
'CreateSweepToAddress': new CoboWaas2.CreateSweepToAddress()
|
|
89
|
+
};
|
|
90
|
+
apiInstance.createWalletSweepToAddresses(opts).then((data) => {
|
|
91
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
92
|
+
}, (error) => {
|
|
93
|
+
console.error(error);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Parameters
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
Name | Type | Description | Notes
|
|
102
|
+
------------- | ------------- | ------------- | -------------
|
|
103
|
+
**CreateSweepToAddress** | [**CreateSweepToAddress**](CreateSweepToAddress.md)| The request body to generates a new sweep-to address within a specified wallet. | [optional]
|
|
104
|
+
|
|
105
|
+
### Return type
|
|
106
|
+
|
|
107
|
+
[**SweepToAddress**](SweepToAddress.md)
|
|
108
|
+
|
|
109
|
+
### Authorization
|
|
110
|
+
|
|
111
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
112
|
+
|
|
113
|
+
### HTTP request headers
|
|
114
|
+
|
|
115
|
+
- **Content-Type**: application/json
|
|
116
|
+
- **Accept**: application/json
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## getAutoSweepTaskById
|
|
120
|
+
|
|
121
|
+
> AutoSweepTask getAutoSweepTaskById(task_id)
|
|
122
|
+
|
|
123
|
+
Get auto-sweep task details
|
|
124
|
+
|
|
125
|
+
This operation retrieves detailed information about a specified auto-sweep task.
|
|
126
|
+
|
|
127
|
+
### Example
|
|
128
|
+
|
|
129
|
+
```javascript
|
|
130
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
131
|
+
// Initialize the API client
|
|
132
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
133
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
134
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
135
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
136
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
137
|
+
// Call the API
|
|
138
|
+
const apiInstance = new CoboWaas2.AutoSweepApi();
|
|
139
|
+
const task_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
140
|
+
apiInstance.getAutoSweepTaskById(task_id).then((data) => {
|
|
141
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
142
|
+
}, (error) => {
|
|
143
|
+
console.error(error);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Parameters
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
Name | Type | Description | Notes
|
|
152
|
+
------------- | ------------- | ------------- | -------------
|
|
153
|
+
**task_id** | **String**| The auto sweep task ID. |
|
|
154
|
+
|
|
155
|
+
### Return type
|
|
156
|
+
|
|
157
|
+
[**AutoSweepTask**](AutoSweepTask.md)
|
|
158
|
+
|
|
159
|
+
### Authorization
|
|
160
|
+
|
|
161
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
162
|
+
|
|
163
|
+
### HTTP request headers
|
|
164
|
+
|
|
165
|
+
- **Content-Type**: Not defined
|
|
166
|
+
- **Accept**: application/json
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## listAutoSweepTask
|
|
170
|
+
|
|
171
|
+
> ListAutoSweepTask200Response listAutoSweepTask(wallet_id, opts)
|
|
172
|
+
|
|
173
|
+
List auto-sweep tasks
|
|
174
|
+
|
|
175
|
+
This operation retrieves a list of auto-sweep tasks for the specified wallet. You can filter the results by token ID, task IDs, or a created-time range.
|
|
176
|
+
|
|
177
|
+
### Example
|
|
178
|
+
|
|
179
|
+
```javascript
|
|
180
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
181
|
+
// Initialize the API client
|
|
182
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
183
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
184
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
185
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
186
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
187
|
+
// Call the API
|
|
188
|
+
const apiInstance = new CoboWaas2.AutoSweepApi();
|
|
189
|
+
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
190
|
+
const opts = {
|
|
191
|
+
'token_id': "ETH_USDT",
|
|
192
|
+
'task_ids': "f47ac10b-58cc-4372-a567-0e02b2c3d479,1ddca562-8434-41c9-8809-d437bad9c868",
|
|
193
|
+
'min_created_timestamp': 1635744000000,
|
|
194
|
+
'max_created_timestamp': 1635744000000,
|
|
195
|
+
'limit': 10,
|
|
196
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
197
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
198
|
+
'direction': "ASC"
|
|
199
|
+
};
|
|
200
|
+
apiInstance.listAutoSweepTask(wallet_id, opts).then((data) => {
|
|
201
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
202
|
+
}, (error) => {
|
|
203
|
+
console.error(error);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Parameters
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
Name | Type | Description | Notes
|
|
212
|
+
------------- | ------------- | ------------- | -------------
|
|
213
|
+
**wallet_id** | **String**| The wallet ID. |
|
|
214
|
+
**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). | [optional]
|
|
215
|
+
**task_ids** | **String**| A list of auto-sweep task IDs, separated by comma. | [optional]
|
|
216
|
+
**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 not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
|
|
217
|
+
**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 not provided, the default value is the current time. This default value is subject to change. | [optional]
|
|
218
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
219
|
+
**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]
|
|
220
|
+
**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]
|
|
221
|
+
**direction** | **String**| The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. | [optional] [default to 'ASC']
|
|
222
|
+
|
|
223
|
+
### Return type
|
|
224
|
+
|
|
225
|
+
[**ListAutoSweepTask200Response**](ListAutoSweepTask200Response.md)
|
|
226
|
+
|
|
227
|
+
### Authorization
|
|
228
|
+
|
|
229
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
230
|
+
|
|
231
|
+
### HTTP request headers
|
|
232
|
+
|
|
233
|
+
- **Content-Type**: Not defined
|
|
234
|
+
- **Accept**: application/json
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## listWalletSweepToAddresses
|
|
238
|
+
|
|
239
|
+
> ListWalletSweepToAddresses200Response listWalletSweepToAddresses(wallet_id)
|
|
240
|
+
|
|
241
|
+
List sweep-to addresses
|
|
242
|
+
|
|
243
|
+
This operation retrieves a list of sweep-to addresses within your wallet. <Note>Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled.</Note>
|
|
244
|
+
|
|
245
|
+
### Example
|
|
246
|
+
|
|
247
|
+
```javascript
|
|
248
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
249
|
+
// Initialize the API client
|
|
250
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
251
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
252
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
253
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
254
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
255
|
+
// Call the API
|
|
256
|
+
const apiInstance = new CoboWaas2.AutoSweepApi();
|
|
257
|
+
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
258
|
+
apiInstance.listWalletSweepToAddresses(wallet_id).then((data) => {
|
|
259
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
260
|
+
}, (error) => {
|
|
261
|
+
console.error(error);
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Parameters
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
Name | Type | Description | Notes
|
|
270
|
+
------------- | ------------- | ------------- | -------------
|
|
271
|
+
**wallet_id** | **String**| The wallet ID. |
|
|
272
|
+
|
|
273
|
+
### Return type
|
|
274
|
+
|
|
275
|
+
[**ListWalletSweepToAddresses200Response**](ListWalletSweepToAddresses200Response.md)
|
|
276
|
+
|
|
277
|
+
### Authorization
|
|
278
|
+
|
|
279
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
280
|
+
|
|
281
|
+
### HTTP request headers
|
|
282
|
+
|
|
283
|
+
- **Content-Type**: Not defined
|
|
284
|
+
- **Accept**: application/json
|
|
285
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# CoboWaas2.AutoSweepTask
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**task_id** | **String** | Auto-sweep task ID. |
|
|
8
|
+
**wallet_id** | **String** | Wallet ID. |
|
|
9
|
+
**token_id** | **String** | Token ID of the swept 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). |
|
|
10
|
+
**status** | [**AutoSweepTaskStatus**](AutoSweepTaskStatus.md) | |
|
|
11
|
+
**transaction_ids** | **[String]** | IDs of the transactions triggered by the task. | [optional]
|
|
12
|
+
**failed_reasons** | **[String]** | Reasons why the task creation failed. | [optional]
|
|
13
|
+
**created_timestamp** | **Number** | The time when the task was created, in Unix timestamp format, measured in milliseconds. |
|
|
14
|
+
**updated_timestamp** | **Number** | The time when the task was updated, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
15
|
+
|
|
16
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**data_type** | **String** | The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. |
|
|
7
|
+
**data_type** | **String** | The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. |
|
|
8
8
|
**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). |
|
|
9
9
|
**address** | **String** | The wallet address. |
|
|
10
10
|
**wallet_uuid** | **String** | The wallet ID. |
|
|
@@ -46,6 +46,8 @@ Name | Type | Description | Notes
|
|
|
46
46
|
|
|
47
47
|
* `SuspendedToken` (value: `"SuspendedToken"`)
|
|
48
48
|
|
|
49
|
+
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
50
|
+
|
|
49
51
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
50
52
|
|
|
51
53
|
|
package/docs/ChainInfo.md
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**chain_id** | **String** | The chain ID, which is the unique identifier of a blockchain. |
|
|
8
|
-
**symbol** | **String** | The chain symbol, which is the abbreviated name of a chain. | [optional]
|
|
8
|
+
**symbol** | **String** | The chain symbol for display purposes, which is the abbreviated name of a chain. | [optional]
|
|
9
9
|
**icon_url** | **String** | The URL of the chain icon. | [optional]
|
|
10
|
+
**chain_identifier** | **String** | A functional identifier used to group blockchains with similar execution logic. For example, `ETH` for all EVM-compatible chains (Ethereum, BNB Smart Chain, Polygon). | [optional]
|
|
10
11
|
**explorer_tx_url** | **String** | The transaction URL pattern on the blockchain explorer. You can use it to concatenate the transaction URLs. | [optional]
|
|
11
12
|
**explorer_address_url** | **String** | The address URL pattern on the blockchain explorer. You can use it to concatenate the address URLs. | [optional]
|
|
12
13
|
**require_memo** | **Boolean** | Whether the chain requires a memo. | [optional]
|
package/docs/ChainsEventData.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**data_type** | **String** | The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. |
|
|
7
|
+
**data_type** | **String** | The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. |
|
|
8
8
|
**chains** | [**[ChainInfo]**](ChainInfo.md) | The enabled chains. |
|
|
9
9
|
**wallet_type** | [**WalletType**](WalletType.md) | | [optional]
|
|
10
10
|
**wallet_subtypes** | [**[WalletSubtype]**](WalletSubtype.md) | | [optional]
|
|
@@ -44,6 +44,8 @@ Name | Type | Description | Notes
|
|
|
44
44
|
|
|
45
45
|
* `SuspendedToken` (value: `"SuspendedToken"`)
|
|
46
46
|
|
|
47
|
+
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
48
|
+
|
|
47
49
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
48
50
|
|
|
49
51
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# CoboWaas2.ComplianceApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**getDispositionStatus**](ComplianceApi.md#getDispositionStatus) | **GET** /compliance/funds/disposition | Get disposition status
|
|
8
|
+
[**isolateFunds**](ComplianceApi.md#isolateFunds) | **POST** /compliance/funds/disposition/isolate | Isolate funds
|
|
9
|
+
[**refundFunds**](ComplianceApi.md#refundFunds) | **POST** /compliance/funds/disposition/refund | Refund funds
|
|
10
|
+
[**unfreezeFunds**](ComplianceApi.md#unfreezeFunds) | **POST** /compliance/funds/disposition/unfreeze | Unfreeze frozen funds
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## getDispositionStatus
|
|
15
|
+
|
|
16
|
+
> DispositionQueryResponse getDispositionStatus(transaction_id)
|
|
17
|
+
|
|
18
|
+
Get disposition status
|
|
19
|
+
|
|
20
|
+
This operation retrieves the current status of a disposition request for a specific transaction. You can use this endpoint to check the status of any disposition operation (Refund, Isolate, or Unfreeze) that has been initiated for a transaction. The response includes the disposition type, current status, and the disposition transaction ID if applicable. <Note>Use this endpoint to monitor the progress of disposition operations and verify their completion.</Note>
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
26
|
+
// Initialize the API client
|
|
27
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
28
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
29
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
30
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
31
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
32
|
+
// Call the API
|
|
33
|
+
const apiInstance = new CoboWaas2.ComplianceApi();
|
|
34
|
+
const transaction_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
35
|
+
apiInstance.getDispositionStatus(transaction_id).then((data) => {
|
|
36
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
37
|
+
}, (error) => {
|
|
38
|
+
console.error(error);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Parameters
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Name | Type | Description | Notes
|
|
47
|
+
------------- | ------------- | ------------- | -------------
|
|
48
|
+
**transaction_id** | **String**| The UUID of the transaction to query for disposition status. |
|
|
49
|
+
|
|
50
|
+
### Return type
|
|
51
|
+
|
|
52
|
+
[**DispositionQueryResponse**](DispositionQueryResponse.md)
|
|
53
|
+
|
|
54
|
+
### Authorization
|
|
55
|
+
|
|
56
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
57
|
+
|
|
58
|
+
### HTTP request headers
|
|
59
|
+
|
|
60
|
+
- **Content-Type**: Not defined
|
|
61
|
+
- **Accept**: application/json
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## isolateFunds
|
|
65
|
+
|
|
66
|
+
> DispositionResponse isolateFunds(opts)
|
|
67
|
+
|
|
68
|
+
Isolate funds
|
|
69
|
+
|
|
70
|
+
This operation creates a request to isolate funds for a specific transaction. The funds will be sent to a designated isolation address for compliance purposes. You need to specify the transaction ID to be isolated and the destination address. Optional parameters include custom categories for tracking purposes. <Note>The isolation will initiate a withdrawal transaction from the compliance-managed address to the specified isolation address.</Note>
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
76
|
+
// Initialize the API client
|
|
77
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
78
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
79
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
80
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
81
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
82
|
+
// Call the API
|
|
83
|
+
const apiInstance = new CoboWaas2.ComplianceApi();
|
|
84
|
+
const opts = {
|
|
85
|
+
'IsolateDisposition': new CoboWaas2.IsolateDisposition()
|
|
86
|
+
};
|
|
87
|
+
apiInstance.isolateFunds(opts).then((data) => {
|
|
88
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
89
|
+
}, (error) => {
|
|
90
|
+
console.error(error);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Parameters
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
Name | Type | Description | Notes
|
|
99
|
+
------------- | ------------- | ------------- | -------------
|
|
100
|
+
**IsolateDisposition** | [**IsolateDisposition**](IsolateDisposition.md)| The request body to isolate funds. | [optional]
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
[**DispositionResponse**](DispositionResponse.md)
|
|
105
|
+
|
|
106
|
+
### Authorization
|
|
107
|
+
|
|
108
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
109
|
+
|
|
110
|
+
### HTTP request headers
|
|
111
|
+
|
|
112
|
+
- **Content-Type**: application/json
|
|
113
|
+
- **Accept**: application/json
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## refundFunds
|
|
117
|
+
|
|
118
|
+
> DispositionResponse refundFunds(opts)
|
|
119
|
+
|
|
120
|
+
Refund funds
|
|
121
|
+
|
|
122
|
+
This operation creates a request to refund funds for a specific transaction. The funds will be sent to the specified destination address. You need to specify the transaction ID to be refunded and the destination address. Optional parameters include custom categories for tracking purposes. <Note>The refund will initiate a withdrawal transaction from the compliance-managed address to the specified destination.</Note>
|
|
123
|
+
|
|
124
|
+
### Example
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
128
|
+
// Initialize the API client
|
|
129
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
130
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
131
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
132
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
133
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
134
|
+
// Call the API
|
|
135
|
+
const apiInstance = new CoboWaas2.ComplianceApi();
|
|
136
|
+
const opts = {
|
|
137
|
+
'RefundDisposition': new CoboWaas2.RefundDisposition()
|
|
138
|
+
};
|
|
139
|
+
apiInstance.refundFunds(opts).then((data) => {
|
|
140
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
141
|
+
}, (error) => {
|
|
142
|
+
console.error(error);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
Name | Type | Description | Notes
|
|
151
|
+
------------- | ------------- | ------------- | -------------
|
|
152
|
+
**RefundDisposition** | [**RefundDisposition**](RefundDisposition.md)| The request body to refund funds. | [optional]
|
|
153
|
+
|
|
154
|
+
### Return type
|
|
155
|
+
|
|
156
|
+
[**DispositionResponse**](DispositionResponse.md)
|
|
157
|
+
|
|
158
|
+
### Authorization
|
|
159
|
+
|
|
160
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
161
|
+
|
|
162
|
+
### HTTP request headers
|
|
163
|
+
|
|
164
|
+
- **Content-Type**: application/json
|
|
165
|
+
- **Accept**: application/json
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## unfreezeFunds
|
|
169
|
+
|
|
170
|
+
> DispositionResponse unfreezeFunds(opts)
|
|
171
|
+
|
|
172
|
+
Unfreeze frozen funds
|
|
173
|
+
|
|
174
|
+
This operation creates a request to unfreeze funds for a previously frozen transaction. It releases the frozen funds back to their original state. You only need to specify the transaction ID to be unfrozen. Once unfrozen, the funds will be available for normal operations. <Note>The unfreeze process will release the compliance hold on the transaction, allowing it to proceed normally.</Note>
|
|
175
|
+
|
|
176
|
+
### Example
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
180
|
+
// Initialize the API client
|
|
181
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
182
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
183
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
184
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
185
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
186
|
+
// Call the API
|
|
187
|
+
const apiInstance = new CoboWaas2.ComplianceApi();
|
|
188
|
+
const opts = {
|
|
189
|
+
'UnfreezeDisposition': new CoboWaas2.UnfreezeDisposition()
|
|
190
|
+
};
|
|
191
|
+
apiInstance.unfreezeFunds(opts).then((data) => {
|
|
192
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
193
|
+
}, (error) => {
|
|
194
|
+
console.error(error);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Parameters
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
Name | Type | Description | Notes
|
|
203
|
+
------------- | ------------- | ------------- | -------------
|
|
204
|
+
**UnfreezeDisposition** | [**UnfreezeDisposition**](UnfreezeDisposition.md)| The request body to unfreeze funds. | [optional]
|
|
205
|
+
|
|
206
|
+
### Return type
|
|
207
|
+
|
|
208
|
+
[**DispositionResponse**](DispositionResponse.md)
|
|
209
|
+
|
|
210
|
+
### Authorization
|
|
211
|
+
|
|
212
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
213
|
+
|
|
214
|
+
### HTTP request headers
|
|
215
|
+
|
|
216
|
+
- **Content-Type**: application/json
|
|
217
|
+
- **Accept**: application/json
|
|
218
|
+
|