@cobo/cobo-waas2 1.23.0 → 1.24.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.
Files changed (171) hide show
  1. package/README.md +45 -6
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +6 -6
  4. package/dist/api/FeeStationApi.js +47 -4
  5. package/dist/api/PaymentApi.js +194 -47
  6. package/dist/api/SwapsApi.js +374 -0
  7. package/dist/api/TransactionsApi.js +4 -4
  8. package/dist/index.js +224 -14
  9. package/dist/model/AddressInfo.js +13 -0
  10. package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
  11. package/dist/model/BridgingFee.js +136 -0
  12. package/dist/model/CommissionFee.js +110 -0
  13. package/dist/model/ContractCallDestination.js +48 -8
  14. package/dist/model/ContractCallDestinationType.js +5 -0
  15. package/dist/model/CreateMerchantRequest.js +13 -6
  16. package/dist/model/CreatePaymentOrderRequest.js +14 -1
  17. package/dist/model/CreateSettlement.js +2 -2
  18. package/dist/model/CreateSettlementRequestRequest.js +39 -0
  19. package/dist/model/CreateSwapActivityRequest.js +193 -0
  20. package/dist/model/CustodialTransferDestination.js +1 -1
  21. package/dist/model/EstimateContractCallFeeParams.js +1 -1
  22. package/dist/model/EstimateFeeParams.js +1 -1
  23. package/dist/model/EstimateTransferFeeParams.js +1 -1
  24. package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
  25. package/dist/model/EstimatedEvmLegacyFee.js +1 -1
  26. package/dist/model/EstimatedFILFee.js +1 -1
  27. package/dist/model/EstimatedFixedFee.js +1 -1
  28. package/dist/model/EstimatedSOLFee.js +1 -1
  29. package/dist/model/EstimatedUtxoFee.js +1 -1
  30. package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
  31. package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
  32. package/dist/model/FeeStationGasStationType.js +61 -0
  33. package/dist/model/ListSwapActivities200Response.js +123 -0
  34. package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
  35. package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
  36. package/dist/model/Merchant.js +9 -0
  37. package/dist/model/MerchantBalance.js +3 -3
  38. package/dist/model/MessageSignDestination.js +8 -70
  39. package/dist/model/OtcFee.js +123 -0
  40. package/dist/model/PaymentEstimateFee.js +125 -0
  41. package/dist/model/PaymentEstimateFee201Response.js +107 -0
  42. package/dist/model/{RawMessageSignDestination.js → PaymentEstimateFeeRequest.js} +51 -37
  43. package/dist/model/PaymentEstimatedFee.js +173 -0
  44. package/dist/model/PaymentFeeType.js +71 -0
  45. package/dist/model/PaymentRefundEventData.js +22 -2
  46. package/dist/model/PaymentSettlementEvent.js +62 -6
  47. package/dist/model/PspBalance.js +3 -3
  48. package/dist/model/Refund.js +17 -1
  49. package/dist/model/SettleRequestStatus.js +5 -0
  50. package/dist/model/Settlement.js +45 -3
  51. package/dist/model/SettlementDetail.js +33 -1
  52. package/dist/model/SettlementInfo.js +7 -7
  53. package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
  54. package/dist/model/SolContractCallDestination.js +30 -0
  55. package/dist/model/StellarContractCallContractParam.js +164 -0
  56. package/dist/model/StellarContractCallContractType.js +56 -0
  57. package/dist/model/StellarContractCallDestination.js +125 -0
  58. package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
  59. package/dist/model/StellarContractCallTrustLineParam.js +133 -0
  60. package/dist/model/SupportedToken.js +9 -0
  61. package/dist/model/SwapActivity.js +9 -9
  62. package/dist/model/SwapActivityApprovers.js +1 -1
  63. package/dist/model/SwapActivityDetail.js +34 -18
  64. package/dist/model/SwapActivitySigners.js +2 -2
  65. package/dist/model/SwapActivityTimeline.js +5 -5
  66. package/dist/model/SwapEstimateFee.js +147 -0
  67. package/dist/model/SwapQuote.js +18 -31
  68. package/dist/model/SwapReceivingTransaction.js +133 -0
  69. package/dist/model/SwapToken.js +9 -9
  70. package/dist/model/TransactionCoboCategory.js +5 -0
  71. package/dist/model/TransactionDestination.js +48 -8
  72. package/dist/model/TransactionDestinationType.js +5 -0
  73. package/dist/model/TransactionEvmEip1559Fee.js +1 -1
  74. package/dist/model/TransactionEvmLegacyFee.js +1 -1
  75. package/dist/model/TransactionFILFee.js +1 -1
  76. package/dist/model/TransactionFixedFee.js +1 -1
  77. package/dist/model/TransactionFuelingInfo.js +13 -0
  78. package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
  79. package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
  80. package/dist/model/TransactionRequestFILFee.js +1 -1
  81. package/dist/model/TransactionRequestSOLFee.js +1 -1
  82. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  83. package/dist/model/TransactionSOLFee.js +1 -1
  84. package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
  85. package/dist/model/TransactionSolContractDestination.js +30 -0
  86. package/dist/model/TransactionStellarContractParam.js +164 -0
  87. package/dist/model/TransactionStellarContractType.js +56 -0
  88. package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
  89. package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
  90. package/dist/model/TransactionStellarTrustLineParam.js +133 -0
  91. package/dist/model/TransactionUtxoFee.js +1 -1
  92. package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
  93. package/dist/model/UpdateTopUpAddress.js +4 -6
  94. package/dist/model/WalletSetup.js +66 -0
  95. package/dist/model/WebhookEventData.js +19 -1
  96. package/docs/AddressBooksApi.md +3 -3
  97. package/docs/AddressInfo.md +1 -0
  98. package/docs/AddressesEventDataAllOfAddresses.md +1 -0
  99. package/docs/BridgingFee.md +11 -0
  100. package/docs/CommissionFee.md +9 -0
  101. package/docs/ContractCallDestination.md +2 -0
  102. package/docs/ContractCallDestinationType.md +2 -0
  103. package/docs/CreateMerchantRequest.md +2 -1
  104. package/docs/CreatePaymentOrderRequest.md +2 -1
  105. package/docs/CreateSettlement.md +2 -2
  106. package/docs/CreateSettlementRequestRequest.md +3 -0
  107. package/docs/CreateSwapActivityRequest.md +15 -0
  108. package/docs/EstimateContractCallFeeParams.md +1 -1
  109. package/docs/EstimateFeeParams.md +1 -1
  110. package/docs/EstimateTransferFeeParams.md +1 -1
  111. package/docs/FeeStationApi.md +53 -0
  112. package/docs/FeeStationCheckFeeStationUsage.md +14 -0
  113. package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
  114. package/docs/FeeStationGasStationType.md +12 -0
  115. package/docs/ListSwapActivities200Response.md +10 -0
  116. package/docs/ListSwapEnabledTokens200Response.md +10 -0
  117. package/docs/ListTopUpPayerAccounts200Response.md +10 -0
  118. package/docs/Merchant.md +1 -0
  119. package/docs/MerchantBalance.md +3 -3
  120. package/docs/MessageSignDestination.md +0 -1
  121. package/docs/OtcFee.md +10 -0
  122. package/docs/PaymentApi.md +196 -21
  123. package/docs/PaymentEstimateFee.md +10 -0
  124. package/docs/PaymentEstimateFee201Response.md +9 -0
  125. package/docs/PaymentEstimateFeeRequest.md +10 -0
  126. package/docs/PaymentEstimatedFee.md +13 -0
  127. package/docs/PaymentFeeType.md +16 -0
  128. package/docs/PaymentRefundEventData.md +2 -1
  129. package/docs/PaymentSettlementEvent.md +6 -3
  130. package/docs/PspBalance.md +3 -3
  131. package/docs/Refund.md +2 -1
  132. package/docs/SettleRequestStatus.md +2 -0
  133. package/docs/Settlement.md +6 -3
  134. package/docs/SettlementDetail.md +3 -1
  135. package/docs/SettlementInfo.md +6 -6
  136. package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
  137. package/docs/SolContractCallDestination.md +1 -0
  138. package/docs/StellarContractCallContractParam.md +11 -0
  139. package/docs/StellarContractCallContractType.md +10 -0
  140. package/docs/StellarContractCallDestination.md +10 -0
  141. package/docs/StellarContractCallTrustLineOperationType.md +10 -0
  142. package/docs/StellarContractCallTrustLineParam.md +11 -0
  143. package/docs/SupportedToken.md +1 -0
  144. package/docs/SwapActivity.md +9 -9
  145. package/docs/SwapActivityDetail.md +10 -9
  146. package/docs/SwapActivitySigners.md +1 -1
  147. package/docs/SwapActivityTimeline.md +3 -3
  148. package/docs/SwapEstimateFee.md +12 -0
  149. package/docs/SwapQuote.md +10 -11
  150. package/docs/SwapReceivingTransaction.md +11 -0
  151. package/docs/SwapToken.md +6 -6
  152. package/docs/SwapsApi.md +356 -0
  153. package/docs/TransactionCoboCategory.md +2 -0
  154. package/docs/TransactionDestination.md +2 -0
  155. package/docs/TransactionDestinationType.md +2 -0
  156. package/docs/TransactionFuelingInfo.md +1 -0
  157. package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
  158. package/docs/TransactionSolContractDestination.md +1 -0
  159. package/docs/TransactionStellarContractParam.md +11 -0
  160. package/docs/TransactionStellarContractType.md +10 -0
  161. package/docs/TransactionStellarDestination.md +10 -0
  162. package/docs/TransactionStellarTrustLineOperationType.md +10 -0
  163. package/docs/TransactionStellarTrustLineParam.md +11 -0
  164. package/docs/TransactionsApi.md +2 -2
  165. package/docs/UpdateBankAccountByIdRequest.md +9 -0
  166. package/docs/UpdateTopUpAddress.md +1 -1
  167. package/docs/WalletSetup.md +14 -0
  168. package/docs/WebhookEventData.md +4 -1
  169. package/package.json +1 -1
  170. package/docs/BTCEIP191MessageSignDestination.md +0 -10
  171. package/docs/RawMessageSignDestination.md +0 -10
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **root_pubkey** | **String** | The root public key of the address. This property applies to MPC Wallets only. | [optional]
15
15
  **taproot_script_tree_hash** | **String** | The information about the new address. | [optional]
16
16
  **taproot_internal_address** | **String** | The Taproot address before tweaking. | [optional]
17
+ **stellar_trusted_token_ids** | **[String]** | The list of token IDs for which this address has already established trustlines on the Stellar network. | [optional]
17
18
  **wallet_id** | **String** | The wallet ID. |
18
19
 
19
20
 
@@ -0,0 +1,11 @@
1
+ # CoboWaas2.BridgingFee
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **fee_amount** | **String** | The bridging fee amount. |
8
+ **received_token_id** | **String** | The received token id after bridge. | [optional]
9
+ **received_amount** | **String** | The received amount after bridge. | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # CoboWaas2.CommissionFee
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **fee_amount** | **String** | The commission fee amount. |
8
+
9
+
@@ -9,5 +9,7 @@ Name | Type | Description | Notes
9
9
  **value** | **String** | The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`. | [optional]
10
10
  **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. |
11
11
  **instructions** | [**[SolContractCallInstruction]**](SolContractCallInstruction.md) | |
12
+ **address_lookup_table_accounts** | [**[SolContractCallAddressLookupTableAccount]**](SolContractCallAddressLookupTableAccount.md) | | [optional]
13
+ **contract_param** | [**StellarContractCallContractParam**](StellarContractCallContractParam.md) | |
12
14
 
13
15
 
@@ -7,6 +7,8 @@
7
7
 
8
8
  * `SOL_Contract` (value: `"SOL_Contract"`)
9
9
 
10
+ * `STELLAR_Contract` (value: `"STELLAR_Contract"`)
11
+
10
12
  * `unknown_default_open_api` (value: `"unknown_default_open_api"`)
11
13
 
12
14
 
@@ -5,7 +5,8 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **name** | **String** | The merchant name. |
8
- **wallet_id** | **String** | The ID of the wallet linked to the merchant. |
8
+ **wallet_id** | **String** | The ID of the wallet linked to the merchant. | [optional]
9
9
  **developer_fee_rate** | **String** | The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate. | [optional]
10
+ **wallet_setup** | [**WalletSetup**](WalletSetup.md) | | [optional]
10
11
 
11
12
 
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
12
12
  **merchant_order_code** | **String** | A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters. | [optional]
13
13
  **psp_order_code** | **String** | A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters. |
14
14
  **expired_in** | **Number** | The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. | [optional] [default to 1800]
15
- **use_dedicated_address** | **Boolean** | Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used. | [optional]
15
+ **use_dedicated_address** | **Boolean** | This field has been deprecated. | [optional]
16
+ **custom_exchange_rate** | **String** | A custom exchange rate specified by the merchant. - Only effective when `currency` is `\"USD\"`. - Expressed as the amount of USD per 1 unit of the specified cryptocurrency. - If not provided, the system will use the default internal rate. Example: If the cryptocurrency is USDT and `custom_exchange_rate` = `\"0.99\"`, it means 1 USDT = 0.99 USD. | [optional]
16
17
 
17
18
 
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
8
8
  **token_id** | **String** | The ID of the cryptocurrency you want to settle. Specify this field when `payout_channel` is set to `Crypto`. Supported values: - 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
  **currency** | **String** | The fiat currency for settling the cryptocurrency. Currently, only `USD` is supported. Specify this field when `payout_channel` is set to `OffRamp`. | [optional]
10
10
  **amount** | **String** | The amount of cryptocurrency to be settled. When settling merchant balance from orders (`acquiring_type` is `Order` and `settlement_type` is `Merchant`), do not specify this field as the amount will be automatically calculated based on the order amounts. | [optional]
11
- **bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts. | [optional]
12
- **crypto_address_id** | **String** | The ID of the crypto address used for crypto withdrawal. Specify this field when `payout_channel` is set to `Crypto`. Call [List all crypto addresses](/v2/api-references/payments/list-all-crypto-addresses) to retrieve registered crypto addresses. | [optional]
11
+ **bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](https://www.cobo.com/developers/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts. | [optional]
12
+ **crypto_address_id** | **String** | The ID of the crypto address used for crypto payouts. Specify this field when `payout_channel` is set to `Crypto`. Call [List crypto addresses](https://www.cobo.com/developers/v2/api-references/payment/list-crypto-addresses) to retrieve registered crypto addresses. | [optional]
13
13
  **order_ids** | **[String]** | | [optional]
14
14
 
15
15
 
@@ -9,5 +9,8 @@ Name | Type | Description | Notes
9
9
  **payout_channel** | [**PayoutChannel**](PayoutChannel.md) | | [optional]
10
10
  **settlement_type** | [**SettlementType**](SettlementType.md) | | [optional]
11
11
  **settlements** | [**[CreateSettlement]**](CreateSettlement.md) | |
12
+ **bank_account_id** | **String** | | Only used in OffRamp payout channel. The ID of the bank account where the settled funds will be deposited. | [optional]
13
+ **currency** | **String** | The fiat currency for the settlement request. | [optional]
14
+ **remark** | **String** | The remark for the settlement request. | [optional]
12
15
 
13
16
 
@@ -0,0 +1,15 @@
1
+ # CoboWaas2.CreateSwapActivityRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **wallet_id** | **String** | The ID of the wallet used to pay. |
8
+ **address** | **String** | The address of the wallet used to pay. | [optional]
9
+ **quote_id** | **String** | The unique identifier of the swap quote. |
10
+ **app_initiator** | **String** | The initiator of the swap activity. It is optional and defaults to your API key if not specified. | [optional]
11
+ **request_id** | **String** | The request ID of the swap activity. | [optional]
12
+ **receiver_address** | **String** | The destination address of the swap activity. This property is required only when the swap type is `Bridge` and the wallet is not a Custodial Wallet (Asset Wallet). | [optional]
13
+ **fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional]
14
+
15
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **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. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee. | [optional]
7
+ **request_id** | **String** | The request ID that is used to track a transaction request. | [optional]
8
8
  **request_type** | [**EstimateFeeRequestType**](EstimateFeeRequestType.md) | |
9
9
  **chain_id** | **String** | The chain ID of the chain on which the smart contract is issued. 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). |
10
10
  **source** | [**ContractCallSource**](ContractCallSource.md) | |
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **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. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee. | [optional]
7
+ **request_id** | **String** | The request ID that is used to track a transaction request. | [optional]
8
8
  **request_type** | [**EstimateFeeRequestType**](EstimateFeeRequestType.md) | |
9
9
  **source** | [**ContractCallSource**](ContractCallSource.md) | |
10
10
  **token_id** | **String** | The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
@@ -4,7 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **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. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee. | [optional]
7
+ **request_id** | **String** | The request ID that is used to track a transaction request. | [optional]
8
8
  **request_type** | [**EstimateFeeRequestType**](EstimateFeeRequestType.md) | |
9
9
  **source** | [**TransferSource**](TransferSource.md) | |
10
10
  **token_id** | **String** | The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
@@ -4,6 +4,7 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**checkFeeStationUsage**](FeeStationApi.md#checkFeeStationUsage) | **POST** /fee_station/check_fee_station_usage | Check Fee Station usage
7
8
  [**estimateFeeStationFee**](FeeStationApi.md#estimateFeeStationFee) | **POST** /fee_station/transactions/estimate_fee | Estimate fee for Fee Station transaction
8
9
  [**getFeeStationTransactionById**](FeeStationApi.md#getFeeStationTransactionById) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information
9
10
  [**listFeeStationAddresses**](FeeStationApi.md#listFeeStationAddresses) | **GET** /fee_station/addresses | List Fee Station addresses
@@ -12,6 +13,58 @@ Method | HTTP request | Description
12
13
 
13
14
 
14
15
 
16
+ ## checkFeeStationUsage
17
+
18
+ > FeeStationCheckFeeStationUsageResponse checkFeeStationUsage(opts)
19
+
20
+ Check Fee Station usage
21
+
22
+ This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USDT (U).
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.FeeStationApi();
36
+ const opts = {
37
+ 'FeeStationCheckFeeStationUsage': new CoboWaas2.FeeStationCheckFeeStationUsage()
38
+ };
39
+ apiInstance.checkFeeStationUsage(opts).then((data) => {
40
+ console.log('API called successfully. Returned data: ' + data);
41
+ }, (error) => {
42
+ console.error(error);
43
+ });
44
+
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+
50
+ Name | Type | Description | Notes
51
+ ------------- | ------------- | ------------- | -------------
52
+ **FeeStationCheckFeeStationUsage** | [**FeeStationCheckFeeStationUsage**](FeeStationCheckFeeStationUsage.md)| The information for evaluating Fee Station usage. | [optional]
53
+
54
+ ### Return type
55
+
56
+ [**FeeStationCheckFeeStationUsageResponse**](FeeStationCheckFeeStationUsageResponse.md)
57
+
58
+ ### Authorization
59
+
60
+ [OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
61
+
62
+ ### HTTP request headers
63
+
64
+ - **Content-Type**: application/json
65
+ - **Accept**: application/json
66
+
67
+
15
68
  ## estimateFeeStationFee
16
69
 
17
70
  > EstimatedFixedFee estimateFeeStationFee(opts)
@@ -0,0 +1,14 @@
1
+ # CoboWaas2.FeeStationCheckFeeStationUsage
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **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. |
8
+ **amount** | **String** | The amount of tokens to be transferred in this request. |
9
+ **token_id** | **String** | The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
10
+ **estimated_fee_amount** | **String** | The estimated transaction fee required for this transfer, before applying any Fee Station rules. |
11
+ **from_address** | **String** | The blockchain address that initiates the transfer. |
12
+ **from_wallet_id** | **String** | The wallet ID. |
13
+
14
+
@@ -0,0 +1,16 @@
1
+ # CoboWaas2.FeeStationCheckFeeStationUsageResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **token_id** | **String** | The token used to pay the gas fee for this specific transaction. You can retrieve the IDs of all supported tokens by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
8
+ **gas_station_type** | [**FeeStationGasStationType**](FeeStationGasStationType.md) | |
9
+ **is_fee_station_applicable** | **Boolean** | Indicates whether Fee Station is applied for this transfer request. |
10
+ **is_balance_sufficient** | **Boolean** | If Fee Station is used, indicates whether its balance is sufficient to cover the required gas fee. |
11
+ **balance** | **String** | The current token balance available in Fee Station. |
12
+ **total_fee_amount** | **String** | The total gas amount required for this transfer request. |
13
+ **is_sponsor_applicable** | **Boolean** | Indicates whether USDT (U) sponsorship is applied when Fee Station balance is insufficient. |
14
+ **sponsored_fee_amount** | **String** | The amount of gas fee sponsored by USDT (U) when applicable. |
15
+
16
+
@@ -0,0 +1,12 @@
1
+ # CoboWaas2.FeeStationGasStationType
2
+
3
+ ## Enum
4
+
5
+
6
+ * `FeeStation` (value: `"FeeStation"`)
7
+
8
+ * `CoboOperationStation` (value: `"CoboOperationStation"`)
9
+
10
+ * `unknown_default_open_api` (value: `"unknown_default_open_api"`)
11
+
12
+
@@ -0,0 +1,10 @@
1
+ # CoboWaas2.ListSwapActivities200Response
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **data** | [**[SwapActivity]**](SwapActivity.md) | | [optional]
8
+ **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CoboWaas2.ListSwapEnabledTokens200Response
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **data** | [**[SwapToken]**](SwapToken.md) | | [optional]
8
+ **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CoboWaas2.ListTopUpPayerAccounts200Response
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **data** | [**[PayerAccount]**](PayerAccount.md) | | [optional]
8
+ **pagination** | [**Pagination**](Pagination.md) | | [optional]
9
+
10
+
package/docs/Merchant.md CHANGED
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **name** | **String** | The merchant name. |
9
9
  **wallet_id** | **String** | The ID of the linked wallet. |
10
10
  **developer_fee_rate** | **String** | The developer fee rate applied to this merchant. Expressed as a string in decimal format where \&quot;0.1\&quot; represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate. | [optional]
11
+ **wallet_setup** | [**WalletSetup**](WalletSetup.md) | | [optional]
11
12
  **created_timestamp** | **Number** | The creation time of the merchant, represented as a UNIX timestamp in seconds. | [optional]
12
13
  **updated_timestamp** | **Number** | The last update time of the merchant, represented as a UNIX timestamp in seconds. | [optional]
13
14
 
@@ -8,9 +8,9 @@ Name | Type | Description | Notes
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 &#x60;{CHAIN}_{TOKEN}&#x60;. |
9
9
  **acquiring_type** | [**AcquiringType**](AcquiringType.md) | |
10
10
  **total_received_amount** | **String** | The total amount of the token that has been received by the merchant. | [optional]
11
- **settled_amount** | **String** | The total amount of the token that has been settled from the merchant&#39;s balance. | [optional]
11
+ **settled_amount** | **String** | The total amount of the token that has been paid out from the merchant&#39;s balance. | [optional]
12
12
  **refunded_amount** | **String** | The total amount of the token that has been refunded from the merchant&#39;s balance. | [optional]
13
- **total_balance** | **String** | The total balance of the token for the merchant. | [optional]
14
- **available_balance** | **String** | The balance available for settlement or refund, in the specified cryptocurrency. | [optional]
13
+ **total_balance** | **String** | The total balance of the token available for payout or refund for the merchant. &#x60;total_balance&#x60; &#x3D; &#x60;total_received_amount&#x60; - &#x60;settled_amount&#x60; - &#x60;refunded_amount&#x60; For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances) | [optional]
14
+ **available_balance** | **String** | This field has been deprecated. | [optional]
15
15
 
16
16
 
@@ -7,7 +7,6 @@ Name | Type | Description | Notes
7
7
  **destination_type** | [**MessageSignDestinationType**](MessageSignDestinationType.md) | |
8
8
  **message** | **String** | The raw data of the message to be signed, encoded in Base64 format. |
9
9
  **structured_data** | **{String: Object}** | The structured data to be signed, formatted as a JSON object according to the EIP-712 standard. |
10
- **msg_hash** | **String** | Message hash to be signed, in hexadecimal format. |
11
10
  **message_bip137** | **String** | Message to be signed, in hexadecimal format. |
12
11
  **message_bip322** | **String** | Message to be signed, in hexadecimal format. |
13
12
  **message_cosmos_adr36** | **String** | Message to be signed, in hexadecimal format. |
package/docs/OtcFee.md ADDED
@@ -0,0 +1,10 @@
1
+ # CoboWaas2.OtcFee
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **fee_rate** | **String** | The otc fee rate. |
8
+ **token_id** | **String** | The token id in otc. | [optional]
9
+
10
+