@cobo/cobo-waas2 1.23.0 → 1.25.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 +68 -6
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/ComplianceApi.js +132 -2
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +246 -56
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +336 -14
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +305 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateMerchantRequest.js +15 -8
- package/dist/model/CreateOrderLinkRequest.js +129 -0
- package/dist/model/CreatePaymentOrderRequest.js +27 -1
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSettlement.js +3 -29
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedFILFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedSOLFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
- package/dist/model/FeeStationGasStationType.js +61 -0
- package/dist/model/FundsStatusType.js +111 -0
- package/dist/model/KytScreeningsDecisionsType.js +71 -0
- package/dist/model/KytScreeningsEventData.js +155 -0
- package/dist/model/KytScreeningsReviewType.js +61 -0
- package/dist/model/KytScreeningsTransaction.js +144 -0
- package/dist/model/KytScreeningsTransactionType.js +61 -0
- package/dist/model/Link.js +125 -0
- package/dist/model/LinkDisplayInfo.js +100 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
- package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +12 -3
- package/dist/model/MerchantBalance.js +3 -3
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/Order.js +13 -0
- package/dist/model/OrderLinkBusinessInfo.js +261 -0
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +125 -0
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +108 -0
- package/dist/model/PaymentEstimateFeeRequest.js +137 -0
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentOrderEventData.js +26 -3
- package/dist/model/PaymentRefundEventData.js +30 -5
- package/dist/model/PaymentSettlementEvent.js +70 -9
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +3 -3
- package/dist/model/Refund.js +17 -1
- package/dist/model/ReviewStatusType.js +91 -0
- package/dist/model/SettleRequestStatus.js +5 -0
- package/dist/model/Settlement.js +45 -3
- package/dist/model/SettlementDetail.js +33 -1
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
- package/dist/model/SolContractCallDestination.js +30 -0
- package/dist/model/StellarContractCallContractParam.js +164 -0
- package/dist/model/StellarContractCallContractType.js +56 -0
- package/dist/model/StellarContractCallDestination.js +125 -0
- package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
- package/dist/model/StellarContractCallTrustLineParam.js +133 -0
- package/dist/model/SubmitKytResponse.js +122 -0
- package/dist/model/SubmitKytScreeningsDecisionsBody.js +122 -0
- package/dist/model/{RawMessageSignDestination.js → SubmitKytScreeningsReviewBody.js} +36 -36
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +9 -9
- package/dist/model/SwapActivityApprovers.js +1 -1
- package/dist/model/SwapActivityDetail.js +34 -18
- package/dist/model/SwapActivitySigners.js +2 -2
- package/dist/model/SwapActivityTimeline.js +5 -5
- package/dist/model/SwapEstimateFee.js +147 -0
- package/dist/model/SwapQuote.js +18 -31
- package/dist/model/SwapReceivingTransaction.js +133 -0
- package/dist/model/SwapToken.js +9 -9
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionDestination.js +48 -8
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionEvmLegacyFee.js +1 -1
- package/dist/model/TransactionFILFee.js +1 -1
- package/dist/model/TransactionFixedFee.js +1 -1
- package/dist/model/TransactionFuelingInfo.js +13 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFILFee.js +1 -1
- package/dist/model/TransactionRequestSOLFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSOLFee.js +1 -1
- package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
- package/dist/model/TransactionSolContractDestination.js +30 -0
- package/dist/model/TransactionStellarContractParam.js +164 -0
- package/dist/model/TransactionStellarContractType.js +56 -0
- package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
- package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
- package/dist/model/TransactionStellarTrustLineParam.js +133 -0
- package/dist/model/TransactionUtxoFee.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +81 -11
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BridgingFee.md +11 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/CommissionFee.md +9 -0
- package/docs/ComplianceApi.md +158 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +57 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateMerchantRequest.md +3 -2
- package/docs/CreateOrderLinkRequest.md +10 -0
- package/docs/CreatePaymentOrderRequest.md +3 -1
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +2 -4
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/FeeStationApi.md +53 -0
- package/docs/FeeStationCheckFeeStationUsage.md +14 -0
- package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
- package/docs/FeeStationGasStationType.md +12 -0
- package/docs/FundsStatusType.md +32 -0
- package/docs/KytScreeningsDecisionsType.md +16 -0
- package/docs/KytScreeningsEventData.md +13 -0
- package/docs/KytScreeningsReviewType.md +12 -0
- package/docs/KytScreeningsTransaction.md +12 -0
- package/docs/KytScreeningsTransactionType.md +12 -0
- package/docs/Link.md +10 -0
- package/docs/LinkDisplayInfo.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/MerchantBalance.md +3 -3
- package/docs/MessageSignDestination.md +0 -1
- package/docs/Order.md +1 -0
- package/docs/OrderLinkBusinessInfo.md +19 -0
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +10 -0
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +253 -25
- package/docs/PaymentEstimateFee.md +10 -0
- package/docs/PaymentEstimateFee201Response.md +9 -0
- package/docs/PaymentEstimateFeeRequest.md +10 -0
- package/docs/PaymentEstimatedFee.md +13 -0
- package/docs/PaymentFeeType.md +16 -0
- package/docs/PaymentOrderEventData.md +4 -1
- package/docs/PaymentRefundEventData.md +5 -2
- package/docs/PaymentSettlementEvent.md +9 -4
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +3 -3
- package/docs/Refund.md +2 -1
- package/docs/ReviewStatusType.md +24 -0
- package/docs/SettleRequestStatus.md +2 -0
- package/docs/Settlement.md +6 -3
- package/docs/SettlementDetail.md +3 -1
- package/docs/SettlementInfo.md +6 -6
- package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
- package/docs/SolContractCallDestination.md +1 -0
- package/docs/StellarContractCallContractParam.md +11 -0
- package/docs/StellarContractCallContractType.md +10 -0
- package/docs/StellarContractCallDestination.md +10 -0
- package/docs/StellarContractCallTrustLineOperationType.md +10 -0
- package/docs/StellarContractCallTrustLineParam.md +11 -0
- package/docs/SubmitKytResponse.md +10 -0
- package/docs/SubmitKytScreeningsDecisionsBody.md +10 -0
- package/docs/SubmitKytScreeningsReviewBody.md +10 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +9 -9
- package/docs/SwapActivityDetail.md +10 -9
- package/docs/SwapActivitySigners.md +1 -1
- package/docs/SwapActivityTimeline.md +3 -3
- package/docs/SwapEstimateFee.md +12 -0
- package/docs/SwapQuote.md +10 -11
- package/docs/SwapReceivingTransaction.md +11 -0
- package/docs/SwapToken.md +6 -6
- package/docs/SwapsApi.md +356 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionDestination.md +2 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionFuelingInfo.md +1 -0
- package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
- package/docs/TransactionSolContractDestination.md +1 -0
- package/docs/TransactionStellarContractParam.md +11 -0
- package/docs/TransactionStellarContractType.md +10 -0
- package/docs/TransactionStellarDestination.md +10 -0
- package/docs/TransactionStellarTrustLineOperationType.md +10 -0
- package/docs/TransactionStellarTrustLineParam.md +11 -0
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WebhookEventData.md +12 -3
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
package/docs/SwapsApi.md
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# CoboWaas2.SwapsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**createSwapActivity**](SwapsApi.md#createSwapActivity) | **POST** /swaps/swap | Create swap activity
|
|
8
|
+
[**estimateSwapFee**](SwapsApi.md#estimateSwapFee) | **POST** /swaps/estimate_fee | Estimate swap fee
|
|
9
|
+
[**getSwapActivity**](SwapsApi.md#getSwapActivity) | **GET** /swaps/activities/{activity_id} | Get swap activity
|
|
10
|
+
[**getSwapQuote**](SwapsApi.md#getSwapQuote) | **GET** /swaps/quote | Get swap quote
|
|
11
|
+
[**listSwapActivities**](SwapsApi.md#listSwapActivities) | **GET** /swaps/activities | List swap activities
|
|
12
|
+
[**listSwapEnabledTokens**](SwapsApi.md#listSwapEnabledTokens) | **GET** /swaps/enabled_tokens | List enabled tokens for swap
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## createSwapActivity
|
|
17
|
+
|
|
18
|
+
> SwapActivityDetail createSwapActivity(CreateSwapActivityRequest)
|
|
19
|
+
|
|
20
|
+
Create swap activity
|
|
21
|
+
|
|
22
|
+
This operation creates a swap activity. A swap activity can be either a bridge (cross-chain transfer) or an exchange (token-to-token swap on the same chain).
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
28
|
+
// Initialize the API client
|
|
29
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
30
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
31
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
32
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
33
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
34
|
+
// Call the API
|
|
35
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
36
|
+
const CreateSwapActivityRequest = new CoboWaas2.CreateSwapActivityRequest();
|
|
37
|
+
apiInstance.createSwapActivity(CreateSwapActivityRequest).then((data) => {
|
|
38
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
39
|
+
}, (error) => {
|
|
40
|
+
console.error(error);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Name | Type | Description | Notes
|
|
49
|
+
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**CreateSwapActivityRequest** | [**CreateSwapActivityRequest**](CreateSwapActivityRequest.md)| The request body for creating a swap activity. |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**SwapActivityDetail**](SwapActivityDetail.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: application/json
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## estimateSwapFee
|
|
67
|
+
|
|
68
|
+
> EstimatedFee estimateSwapFee(SwapEstimateFee)
|
|
69
|
+
|
|
70
|
+
Estimate swap fee
|
|
71
|
+
|
|
72
|
+
This operation estimates the network fee of a swap activity. You can use this operation to estimate the network fee before initiating swap activities from MPC Wallets or Web3 Wallets. It requires a valid `wallet_id` and `quote_id`, so you need to [get a swap quote](https://www.cobo.com/developers/v2/api-references/swaps/get-swap-quote) first.
|
|
73
|
+
|
|
74
|
+
### Example
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
78
|
+
// Initialize the API client
|
|
79
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
80
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
81
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
82
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
83
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
84
|
+
// Call the API
|
|
85
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
86
|
+
const SwapEstimateFee = new CoboWaas2.SwapEstimateFee();
|
|
87
|
+
apiInstance.estimateSwapFee(SwapEstimateFee).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
|
+
**SwapEstimateFee** | [**SwapEstimateFee**](SwapEstimateFee.md)| The request body for estimating the network fee of a swap activity. |
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
[**EstimatedFee**](EstimatedFee.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
|
+
## getSwapActivity
|
|
117
|
+
|
|
118
|
+
> SwapActivityDetail getSwapActivity(activity_id)
|
|
119
|
+
|
|
120
|
+
Get swap activity
|
|
121
|
+
|
|
122
|
+
This operation retrieves detailed information about a specified swap activity.
|
|
123
|
+
|
|
124
|
+
### Example
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
128
|
+
// Initialize the API client
|
|
129
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
130
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
131
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
132
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
133
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
134
|
+
// Call the API
|
|
135
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
136
|
+
const activity_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
137
|
+
apiInstance.getSwapActivity(activity_id).then((data) => {
|
|
138
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
139
|
+
}, (error) => {
|
|
140
|
+
console.error(error);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
Name | Type | Description | Notes
|
|
149
|
+
------------- | ------------- | ------------- | -------------
|
|
150
|
+
**activity_id** | **String**| The unique identifier of the swap activity. |
|
|
151
|
+
|
|
152
|
+
### Return type
|
|
153
|
+
|
|
154
|
+
[**SwapActivityDetail**](SwapActivityDetail.md)
|
|
155
|
+
|
|
156
|
+
### Authorization
|
|
157
|
+
|
|
158
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
159
|
+
|
|
160
|
+
### HTTP request headers
|
|
161
|
+
|
|
162
|
+
- **Content-Type**: Not defined
|
|
163
|
+
- **Accept**: application/json
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## getSwapQuote
|
|
167
|
+
|
|
168
|
+
> SwapQuote getSwapQuote(wallet_id, pay_token_id, receive_token_id, opts)
|
|
169
|
+
|
|
170
|
+
Get swap quote
|
|
171
|
+
|
|
172
|
+
This operation retrieves the current market exchange rate and estimated service fee. You need to provide `wallet_id`, `pay_token_id`, and `receive_token_id`, along with either `pay_amount` or `receive_amount`.
|
|
173
|
+
|
|
174
|
+
### Example
|
|
175
|
+
|
|
176
|
+
```javascript
|
|
177
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
178
|
+
// Initialize the API client
|
|
179
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
180
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
181
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
182
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
183
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
184
|
+
// Call the API
|
|
185
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
186
|
+
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
187
|
+
const pay_token_id = "ETH";
|
|
188
|
+
const receive_token_id = "USDT";
|
|
189
|
+
const opts = {
|
|
190
|
+
'pay_amount': "1.5",
|
|
191
|
+
'receive_amount': "2000"
|
|
192
|
+
};
|
|
193
|
+
apiInstance.getSwapQuote(wallet_id, pay_token_id, receive_token_id, opts).then((data) => {
|
|
194
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
195
|
+
}, (error) => {
|
|
196
|
+
console.error(error);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
Name | Type | Description | Notes
|
|
205
|
+
------------- | ------------- | ------------- | -------------
|
|
206
|
+
**wallet_id** | **String**| The wallet ID. |
|
|
207
|
+
**pay_token_id** | **String**| The ID of the token to pay. |
|
|
208
|
+
**receive_token_id** | **String**| The ID of the token to receive. |
|
|
209
|
+
**pay_amount** | **String**| The amount of the token to pay. | [optional]
|
|
210
|
+
**receive_amount** | **String**| The amount of the token to receive. | [optional]
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**SwapQuote**](SwapQuote.md)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: application/json
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## listSwapActivities
|
|
227
|
+
|
|
228
|
+
> ListSwapActivities200Response listSwapActivities(opts)
|
|
229
|
+
|
|
230
|
+
List swap activities
|
|
231
|
+
|
|
232
|
+
This operation retrieves a list of swap activities. You can filter the results by swap type, status, initiator, and time range.
|
|
233
|
+
|
|
234
|
+
### Example
|
|
235
|
+
|
|
236
|
+
```javascript
|
|
237
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
238
|
+
// Initialize the API client
|
|
239
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
240
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
241
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
242
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
243
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
244
|
+
// Call the API
|
|
245
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
246
|
+
const opts = {
|
|
247
|
+
'type': new CoboWaas2.SwapType(),
|
|
248
|
+
'status': new CoboWaas2.SwapActivityStatus(),
|
|
249
|
+
'min_updated_timestamp': 1635744000000,
|
|
250
|
+
'max_updated_timestamp': 1635744000000,
|
|
251
|
+
'initiator': "steve@example.com",
|
|
252
|
+
'limit': 10,
|
|
253
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
254
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
255
|
+
'sort_by': "created_timestamp",
|
|
256
|
+
'direction': "ASC"
|
|
257
|
+
};
|
|
258
|
+
apiInstance.listSwapActivities(opts).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
|
+
**type** | [**SwapType**](.md)| | [optional]
|
|
272
|
+
**status** | [**SwapActivityStatus**](.md)| | [optional]
|
|
273
|
+
**min_updated_timestamp** | **Number**| The start time of the query. All swap activities updated after the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
274
|
+
**max_updated_timestamp** | **Number**| The end time of the query. All swap activities updated before the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
275
|
+
**initiator** | **String**| The initiator of the swap activity. It is optional when creating the activity and defaults to your API key if not specified. | [optional]
|
|
276
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
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
|
+
**sort_by** | **String**| The field to sort the results by. Possible values include: - `created_timestamp`: Sort by the time when the data was created. - `updated_timestamp`: Sort by the time when the data was last updated. | [optional]
|
|
280
|
+
**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']
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
[**ListSwapActivities200Response**](ListSwapActivities200Response.md)
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: Not defined
|
|
293
|
+
- **Accept**: application/json
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## listSwapEnabledTokens
|
|
297
|
+
|
|
298
|
+
> ListSwapEnabledTokens200Response listSwapEnabledTokens(opts)
|
|
299
|
+
|
|
300
|
+
List enabled tokens for swap
|
|
301
|
+
|
|
302
|
+
This operation retrieves a list of tokens that are enabled for the swap feature. You can filter the results by swap type, asset ID, and chain ID.
|
|
303
|
+
|
|
304
|
+
### Example
|
|
305
|
+
|
|
306
|
+
```javascript
|
|
307
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
308
|
+
// Initialize the API client
|
|
309
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
310
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
311
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
312
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
313
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
314
|
+
// Call the API
|
|
315
|
+
const apiInstance = new CoboWaas2.SwapsApi();
|
|
316
|
+
const opts = {
|
|
317
|
+
'type': new CoboWaas2.SwapType(),
|
|
318
|
+
'asset_id': "USDT",
|
|
319
|
+
'chain_id': "ETH",
|
|
320
|
+
'limit': 10,
|
|
321
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
322
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
323
|
+
};
|
|
324
|
+
apiInstance.listSwapEnabledTokens(opts).then((data) => {
|
|
325
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
326
|
+
}, (error) => {
|
|
327
|
+
console.error(error);
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Parameters
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
Name | Type | Description | Notes
|
|
336
|
+
------------- | ------------- | ------------- | -------------
|
|
337
|
+
**type** | [**SwapType**](.md)| | [optional]
|
|
338
|
+
**asset_id** | **String**| (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account. | [optional]
|
|
339
|
+
**chain_id** | **String**| The chain ID, which is the unique identifier of a blockchain. 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). | [optional]
|
|
340
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
341
|
+
**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]
|
|
342
|
+
**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]
|
|
343
|
+
|
|
344
|
+
### Return type
|
|
345
|
+
|
|
346
|
+
[**ListSwapEnabledTokens200Response**](ListSwapEnabledTokens200Response.md)
|
|
347
|
+
|
|
348
|
+
### Authorization
|
|
349
|
+
|
|
350
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
351
|
+
|
|
352
|
+
### HTTP request headers
|
|
353
|
+
|
|
354
|
+
- **Content-Type**: Not defined
|
|
355
|
+
- **Accept**: application/json
|
|
356
|
+
|
|
@@ -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. - `ComplianceDisposition`: The compliance disposition 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data. |
|
|
8
8
|
**tss_request_id** | **String** | The TSS request ID. | [optional]
|
|
9
9
|
**source_key_share_holder_group** | [**SourceGroup**](SourceGroup.md) | | [optional]
|
|
10
10
|
**target_key_share_holder_group_id** | **String** | The target key share holder group ID. | [optional]
|
|
@@ -50,6 +50,8 @@ Name | Type | Description | Notes
|
|
|
50
50
|
|
|
51
51
|
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
52
52
|
|
|
53
|
+
* `ComplianceKytScreenings` (value: `"ComplianceKytScreenings"`)
|
|
54
|
+
|
|
53
55
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
54
56
|
|
|
55
57
|
|
|
@@ -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. - `ComplianceDisposition`: The compliance disposition 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data. |
|
|
8
8
|
**request_id** | **String** | The unique identifier of the token listing request. |
|
|
9
9
|
**chain_id** | **String** | The ID of the blockchain where the token is deployed. |
|
|
10
10
|
**contract_address** | **String** | The token's contract address on the specified blockchain. |
|
|
@@ -54,6 +54,8 @@ Name | Type | Description | Notes
|
|
|
54
54
|
|
|
55
55
|
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
56
56
|
|
|
57
|
+
* `ComplianceKytScreenings` (value: `"ComplianceKytScreenings"`)
|
|
58
|
+
|
|
57
59
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
58
60
|
|
|
59
61
|
|
package/docs/TokensEventData.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. - `ComplianceDisposition`: The compliance disposition 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data. |
|
|
8
8
|
**tokens** | [**[TokenInfo]**](TokenInfo.md) | The enabled tokens. |
|
|
9
9
|
**wallet_type** | [**WalletType**](WalletType.md) | | [optional]
|
|
10
10
|
**wallet_subtypes** | [**[WalletSubtype]**](WalletSubtype.md) | | [optional]
|
|
@@ -46,6 +46,8 @@ Name | Type | Description | Notes
|
|
|
46
46
|
|
|
47
47
|
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
48
48
|
|
|
49
|
+
* `ComplianceKytScreenings` (value: `"ComplianceKytScreenings"`)
|
|
50
|
+
|
|
49
51
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
50
52
|
|
|
51
53
|
|
|
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
|
|
|
19
19
|
**calldata** | **String** | The data used to invoke a specific function or method within the specified contract at the destination address, with a maximum length of 65,000 characters. |
|
|
20
20
|
**calldata_info** | [**TransactionEvmCalldataInfo**](TransactionEvmCalldataInfo.md) | | [optional]
|
|
21
21
|
**instructions** | [**[TransactionSolContractInstruction]**](TransactionSolContractInstruction.md) | | [optional]
|
|
22
|
+
**address_lookup_table_accounts** | [**[TransactionSolContractAddressLookupTableAccount]**](TransactionSolContractAddressLookupTableAccount.md) | | [optional]
|
|
22
23
|
**cosmos_messages** | [**[TransactionCosmosMessage]**](TransactionCosmosMessage.md) | |
|
|
23
24
|
**message** | **String** | The raw data of the message to be signed, encoded in Base64 format. |
|
|
24
25
|
**raw_structured_data** | **String** | The raw structured data to be signed, formatted as a JSON string. | [optional]
|
|
@@ -32,5 +33,6 @@ Name | Type | Description | Notes
|
|
|
32
33
|
**message_bip137** | **String** | Message to be signed, in hexadecimal format. |
|
|
33
34
|
**message_bip322** | **String** | Message to be signed, in hexadecimal format. |
|
|
34
35
|
**message_cosmos_adr36** | **String** | Message to be signed, in hexadecimal format. |
|
|
36
|
+
**contract_param** | [**TransactionStellarContractParam**](TransactionStellarContractParam.md) | |
|
|
35
37
|
|
|
36
38
|
|
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**request_id** | **String** | The request ID of the transaction. | [optional]
|
|
8
8
|
**transaction_id** | **String** | The transaction ID. | [optional]
|
|
9
|
+
**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 Fee Station; omit for main transactions. | [optional]
|
|
9
10
|
|
|
10
11
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TransactionSolContractAddressLookupTableAccount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**alt_account_key** | **String** | The on-chain public key of the Address Lookup Table (ALT) account, identifying the specific lookup table. |
|
|
8
|
+
**addresses** | **[String]** | An array of stored account addresses within the lookup table, which can be referenced in transactions by index. |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**destination_type** | [**TransactionDestinationType**](TransactionDestinationType.md) | |
|
|
8
8
|
**instructions** | [**[TransactionSolContractInstruction]**](TransactionSolContractInstruction.md) | | [optional]
|
|
9
|
+
**address_lookup_table_accounts** | [**[TransactionSolContractAddressLookupTableAccount]**](TransactionSolContractAddressLookupTableAccount.md) | | [optional]
|
|
9
10
|
|
|
10
11
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.TransactionStellarContractParam
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**contract_type** | [**TransactionStellarContractType**](TransactionStellarContractType.md) | |
|
|
8
|
+
**token_id** | **String** | The token ID, which is the unique identifier of a token. |
|
|
9
|
+
**operation_type** | [**TransactionStellarTrustLineOperationType**](TransactionStellarTrustLineOperationType.md) | |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TransactionStellarDestination
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**destination_type** | [**TransactionDestinationType**](TransactionDestinationType.md) | |
|
|
8
|
+
**contract_param** | [**TransactionStellarContractParam**](TransactionStellarContractParam.md) | |
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.TransactionStellarTrustLineParam
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**contract_type** | [**TransactionStellarContractType**](TransactionStellarContractType.md) | |
|
|
8
|
+
**token_id** | **String** | The token ID, which is the unique identifier of a token. |
|
|
9
|
+
**operation_type** | [**TransactionStellarTrustLineOperationType**](TransactionStellarTrustLineOperationType.md) | |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -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. - `ComplianceDisposition`: The compliance disposition 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data. |
|
|
8
8
|
**transaction_id** | **String** | The transaction ID. |
|
|
9
9
|
**cobo_id** | **String** | The Cobo ID, which can be used to track a transaction. | [optional]
|
|
10
10
|
**request_id** | **String** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | [optional]
|
|
@@ -74,6 +74,8 @@ Name | Type | Description | Notes
|
|
|
74
74
|
|
|
75
75
|
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
76
76
|
|
|
77
|
+
* `ComplianceKytScreenings` (value: `"ComplianceKytScreenings"`)
|
|
78
|
+
|
|
77
79
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
78
80
|
|
|
79
81
|
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -186,7 +186,7 @@ Name | Type | Description | Notes
|
|
|
186
186
|
|
|
187
187
|
Call smart contract
|
|
188
188
|
|
|
189
|
-
This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to
|
|
189
|
+
This operation creates a transaction to interact with a smart contract on the blockchain. You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation. <Note>Currently, this operation only applies to transactions from Custodial Wallets (Web3 Wallets), MPC Wallets, or Smart Contract Wallets on EVM-compatible chains and Solana.</Note> <Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>
|
|
190
190
|
|
|
191
191
|
### Example
|
|
192
192
|
|
|
@@ -238,7 +238,7 @@ Name | Type | Description | Notes
|
|
|
238
238
|
|
|
239
239
|
Sign message
|
|
240
240
|
|
|
241
|
-
This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](https://www.cobo.com/developers/v2/api-references/transactions/get-transaction-information). <Note> This operation only supports message signing transactions from the following wallets and chains: - MPC Wallets: BTC, EVM-compatible chains,
|
|
241
|
+
This operation creates a transaction to sign the provided message using cryptographic techniques. In some scenarios, you want to sign a message for identity authentication or transaction approval. You need to provide details such as the source address, destination address, and the message to be signed. A transaction request for tracking is returned upon successful operation. You can get the signature result by calling [Get transaction information](https://www.cobo.com/developers/v2/api-references/transactions/get-transaction-information). <Note> This operation only supports message signing transactions from the following wallets and chains: - MPC Wallets: BTC, EVM-compatible chains, and Cosmos. - Web3 Wallets: EVM-compatible chains. </Note>
|
|
242
242
|
|
|
243
243
|
### Example
|
|
244
244
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CoboWaas2.UpdateBankAccountByIdRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**info** | **{String: Object}** | JSON-formatted bank account details. The object should include the following fields: - beneficiary_name: Name of the account holder - beneficiary_address: Address of the account holder - account_number: Bank account number - bank_name: Name of the bank - bank_address: Address of the bank - iban: (Optional) International Bank Account Number - swift_or_bic: SWIFT or BIC code of the bank |
|
|
8
|
+
|
|
9
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**merchant_id** | **String** | The merchant ID. |
|
|
7
|
+
**merchant_id** | **String** | The merchant ID. | [optional]
|
|
8
8
|
**token_id** | **String** | The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
9
9
|
**custom_payer_id** | **String** | A unique identifier assigned by the developer to track and identify individual payers in their system. |
|
|
10
10
|
|
|
@@ -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. - `ComplianceDisposition`: The compliance disposition 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data. |
|
|
8
8
|
**wallet** | [**WalletInfo**](WalletInfo.md) | | [optional]
|
|
9
9
|
|
|
10
10
|
|
|
@@ -44,6 +44,8 @@ Name | Type | Description | Notes
|
|
|
44
44
|
|
|
45
45
|
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
46
46
|
|
|
47
|
+
* `ComplianceKytScreenings` (value: `"ComplianceKytScreenings"`)
|
|
48
|
+
|
|
47
49
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
48
50
|
|
|
49
51
|
|