@cobo/cobo-waas2 1.16.0 → 1.18.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 +46 -6
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +27 -33
- package/dist/api/AppWorkflowsApi.js +22 -22
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/OAuthApi.js +93 -6
- package/dist/api/OrganizationsApi.js +79 -0
- package/dist/api/PaymentApi.js +265 -55
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/api/WalletsApi.js +11 -8
- package/dist/index.js +252 -14
- package/dist/model/Account.js +174 -0
- package/dist/model/AcquiringType.js +61 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AppWorkflow.js +7 -7
- package/dist/model/AppWorkflowField.js +5 -5
- package/dist/model/AppWorkflowPolicy.js +1 -1
- package/dist/model/ApprovalEntry.js +1 -1
- package/dist/model/ApprovalRequest.js +5 -3
- package/dist/model/ApprovalRequestDetail.js +2 -1
- package/dist/model/ApprovalUser.js +4 -4
- package/dist/model/BalanceUpdateInfo.js +170 -0
- package/dist/model/BalanceUpdateInfoEventData.js +297 -0
- package/dist/model/BankAccount.js +2 -2
- package/dist/model/ChainInfo.js +1 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CreateApprovalRequest201Response.js +2 -1
- package/dist/model/CreateMerchantRequest.js +13 -0
- package/dist/model/CreatePaymentOrderRequest.js +14 -5
- package/dist/model/CreateRefundRequest.js +41 -8
- package/dist/model/CreateSettlement.js +28 -12
- package/dist/model/CreateSettlementRequestRequest.js +27 -0
- package/dist/model/CryptoAddress.js +171 -0
- package/dist/model/CustodialTransferDestination.js +137 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimatedFILFee.js +170 -0
- package/dist/model/EstimatedFILFeeSlow.js +186 -0
- package/dist/model/EstimatedFee.js +68 -12
- package/dist/model/EstimatedSOLFee.js +170 -0
- package/dist/model/EstimatedSOLFeeSlow.js +184 -0
- package/dist/model/ExchangePermissionToken201Response.js +122 -0
- package/dist/model/{CreateBankAccountRequest.js → ExchangePermissionTokenRequest.js} +30 -28
- package/dist/model/FILBase.js +88 -0
- package/dist/model/FILPrice.js +114 -0
- package/dist/model/FeeType.js +10 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/GraphQLError.js +135 -0
- package/dist/model/GraphQLErrorLocationsInner.js +92 -0
- package/dist/model/{TransactionMessageSignBTCEIP191Destination.js → GraphQLRequest.js} +49 -36
- package/dist/model/GraphQLResponse.js +119 -0
- package/dist/model/ListTopUpPayers200Response.js +123 -0
- package/dist/model/ListTopUpPayers200ResponseDataInner.js +189 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +15 -2
- package/dist/model/Order.js +16 -7
- package/dist/model/PayerAccount.js +189 -0
- package/dist/model/PaymentOrderEventData.js +33 -15
- package/dist/model/PaymentRefundEventData.js +66 -11
- package/dist/model/PaymentSettlementEvent.js +14 -9
- package/dist/model/PayoutChannel.js +61 -0
- package/dist/model/PolicyAction.js +1 -1
- package/dist/model/PolicyActionContent.js +6 -4
- package/dist/model/PolicyCondition.js +5 -5
- package/dist/model/RefreshPermissionTokenRequest.js +110 -0
- package/dist/model/Refund.js +39 -4
- package/dist/model/RefundStatus.js +5 -0
- package/dist/model/RequestApproval.js +9 -9
- package/dist/model/RevokeApprovalRequest201Response.js +2 -1
- package/dist/model/RevokeApprovalRequestRequest.js +2 -2
- package/dist/model/SOLBase.js +101 -0
- package/dist/model/SOLComputeUnit.js +101 -0
- package/dist/model/Settlement.js +3 -3
- package/dist/model/SettlementDetail.js +24 -6
- package/dist/model/SettlementInfo.js +11 -2
- package/dist/model/SupportedToken.js +222 -0
- package/dist/model/SwapActivityDetail.js +30 -0
- package/dist/model/SwapActivitySigners.js +110 -0
- package/dist/model/SwapQuote.js +17 -4
- package/dist/model/SwapSingingStatus.js +71 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TopUpAddress.js +230 -0
- package/dist/model/TransactionCoboCategory.js +20 -0
- package/dist/model/TransactionDestination.js +14 -38
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmCalldataInfo.js +1 -1
- package/dist/model/TransactionFILFee.js +229 -0
- package/dist/model/TransactionFee.js +107 -9
- package/dist/model/TransactionRequestFILFee.js +186 -0
- package/dist/model/TransactionRequestFee.js +89 -9
- package/dist/model/TransactionRequestSOLFee.js +168 -0
- package/dist/model/TransactionSOLFee.js +229 -0
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/TransferDestination.js +44 -16
- package/dist/model/TransferDestinationType.js +5 -0
- package/dist/model/UpdateMerchantByIdRequest.js +13 -0
- package/dist/model/UpdateRefundByIdRequest.js +110 -0
- package/dist/model/UpdateTopUpAddress.js +141 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEvent.js +2 -2
- package/dist/model/WebhookEventData.js +83 -13
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventLog.js +2 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/Account.md +14 -0
- package/docs/AcquiringType.md +12 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressesEventData.md +3 -1
- package/docs/AppWorkflow.md +3 -3
- package/docs/AppWorkflowField.md +2 -2
- package/docs/AppWorkflowsApi.md +12 -12
- package/docs/ApprovalRequest.md +2 -2
- package/docs/ApprovalRequestDetail.md +1 -1
- package/docs/ApprovalUser.md +2 -2
- package/docs/BalanceUpdateInfo.md +13 -0
- package/docs/BalanceUpdateInfoEventData.md +47 -0
- package/docs/BankAccount.md +2 -2
- package/docs/ChainInfo.md +1 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CreateApprovalRequest201Response.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -1
- package/docs/CreateRefundRequest.md +5 -2
- package/docs/CreateSettlement.md +7 -6
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CryptoAddress.md +14 -0
- package/docs/CustodialTransferDestination.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimatedFILFee.md +13 -0
- package/docs/EstimatedFILFeeSlow.md +12 -0
- package/docs/EstimatedFee.md +3 -3
- package/docs/EstimatedSOLFee.md +13 -0
- package/docs/EstimatedSOLFeeSlow.md +12 -0
- package/docs/ExchangePermissionToken201Response.md +12 -0
- package/docs/ExchangePermissionTokenRequest.md +9 -0
- package/docs/FILBase.md +9 -0
- package/docs/FILPrice.md +11 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/FeeType.md +4 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/GraphQLError.md +11 -0
- package/docs/GraphQLErrorLocationsInner.md +10 -0
- package/docs/GraphQLRequest.md +11 -0
- package/docs/GraphQLResponse.md +10 -0
- package/docs/ListTopUpPayers200Response.md +10 -0
- package/docs/ListTopUpPayers200ResponseDataInner.md +14 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/OAuthApi.md +102 -0
- package/docs/Order.md +6 -5
- package/docs/OrganizationsApi.md +55 -0
- package/docs/PayerAccount.md +14 -0
- package/docs/PaymentApi.md +247 -29
- package/docs/PaymentOrderEventData.md +9 -6
- package/docs/PaymentRefundEventData.md +10 -5
- package/docs/PaymentSettlementEvent.md +6 -4
- package/docs/PayoutChannel.md +12 -0
- package/docs/PolicyActionContent.md +4 -4
- package/docs/PolicyCondition.md +2 -2
- package/docs/RefreshPermissionTokenRequest.md +9 -0
- package/docs/Refund.md +7 -4
- package/docs/RefundStatus.md +2 -0
- package/docs/RequestApproval.md +4 -4
- package/docs/RevokeApprovalRequest201Response.md +1 -1
- package/docs/RevokeApprovalRequestRequest.md +1 -1
- package/docs/SOLBase.md +10 -0
- package/docs/SOLComputeUnit.md +10 -0
- package/docs/Settlement.md +3 -3
- package/docs/SettlementDetail.md +8 -6
- package/docs/SettlementInfo.md +3 -2
- package/docs/SupportedToken.md +17 -0
- package/docs/SwapActivityDetail.md +1 -0
- package/docs/SwapActivitySigners.md +11 -0
- package/docs/SwapQuote.md +3 -2
- package/docs/SwapSingingStatus.md +16 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TopUpAddress.md +18 -0
- package/docs/TransactionCoboCategory.md +8 -0
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionEvmCalldataInfo.md +1 -1
- package/docs/TransactionFILFee.md +16 -0
- package/docs/TransactionFee.md +8 -1
- package/docs/TransactionRequestFILFee.md +13 -0
- package/docs/TransactionRequestFee.md +5 -1
- package/docs/TransactionRequestSOLFee.md +12 -0
- package/docs/TransactionSOLFee.md +16 -0
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TransferDestination.md +3 -3
- package/docs/TransferDestinationType.md +2 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -0
- package/docs/UpdateRefundByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +11 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +6 -4
- package/docs/WebhookEvent.md +1 -1
- package/docs/WebhookEventData.md +14 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventLog.md +1 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/docs/CreateBankAccountRequest.md +0 -9
- package/docs/TransactionMessageSignBTCEIP191Destination.md +0 -10
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**name** | **String** | The merchant name. |
|
|
8
8
|
**wallet_id** | **String** | The ID of the wallet linked to the merchant. |
|
|
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. | [optional]
|
|
9
10
|
|
|
10
11
|
|
|
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**fee_amount** | **String** | The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge. For example, if order_amount is \"100.00\" and fee_amount is \"2.00\", the customer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant and \"2.00\" settled to the developer. Values must be greater than 0 and contain two decimal places. |
|
|
12
12
|
**merchant_order_code** | **String** | A unique reference code assigned by the merchant to identify this order in their system. | [optional]
|
|
13
13
|
**psp_order_code** | **String** | A unique reference code assigned by the developer to identify this order in their system. |
|
|
14
|
-
**
|
|
14
|
+
**expired_in** | **Number** | The number of seconds after which the pay-in order will expire. 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]
|
|
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
16
|
|
|
16
17
|
|
|
@@ -6,10 +6,13 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**request_id** | **String** | The request ID that is used to track a refund request. The request ID is provided by you and must be unique. |
|
|
8
8
|
**merchant_id** | **String** | The merchant ID. | [optional]
|
|
9
|
-
**payable_amount** | **String** | The amount to refund in cryptocurrency. |
|
|
10
|
-
**to_address** | **String** | The address where the refunded cryptocurrency will be sent. |
|
|
9
|
+
**payable_amount** | **String** | The amount to refund in cryptocurrency. The amount must be a positive integer with up to two decimal places. |
|
|
10
|
+
**to_address** | **String** | The address where the refunded cryptocurrency will be sent. | [optional]
|
|
11
11
|
**token_id** | **String** | The ID of the cryptocurrency used for refund. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
12
12
|
**refund_type** | [**RefundType**](RefundType.md) | |
|
|
13
13
|
**order_id** | **String** | The ID of the original pay-in order associated with this refund. Use this to track refunds against specific payments. | [optional]
|
|
14
|
+
**charge_merchant_fee** | **Boolean** | Whether to charge developer fee to the merchant. - `true`: The fee amount (specified in `merchant_fee_amount`) will be deducted from the merchant's balance and added to the developer's balance - `false`: The merchant is not charged any developer fee When enabled, ensure both `merchant_fee_amount` and `merchant_fee_token_id` are properly specified. | [optional]
|
|
15
|
+
**merchant_fee_amount** | **String** | The developer fee amount to charge the merchant, denominated in the cryptocurrency specified by `merchant_fee_token_id`. Required when `charge_merchant_fee` is `true`. Must be: - A positive integer with up to two decimal places. - Less than the refund amount | [optional]
|
|
16
|
+
**merchant_fee_token_id** | **String** | The ID of the cryptocurrency used for the developer fee. It must be the same as `token_id`. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | [optional]
|
|
14
17
|
|
|
15
18
|
|
package/docs/CreateSettlement.md
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**merchant_id** | **String** | The merchant ID. | [optional]
|
|
8
|
-
**token_id** | **String** | The ID of the cryptocurrency you want to settle. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | [optional]
|
|
9
|
-
**currency** | **String** | The fiat currency for settling the cryptocurrency. Currently, only `USD` is supported.
|
|
10
|
-
**amount** | **String** | The settlement amount. - If `
|
|
11
|
-
**bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. | [optional]
|
|
12
|
-
**
|
|
7
|
+
**merchant_id** | **String** | The merchant ID. Specify this field when `settlement_type` is set to `Merchant`. | [optional]
|
|
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_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | [optional]
|
|
9
|
+
**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
|
+
**amount** | **String** | The settlement amount. - If `payout_channel` is set to `Crypto`, this represents the settlement amount in the specified cryptocurrency. - If `payout_channel` is set to `OffRamp`, this represents the settlement amount in the specified fiat currency. | [optional]
|
|
11
|
+
**bank_account_id** | **String** | The ID of the bank account where the settled funds will be deposited. 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]
|
|
13
|
+
**order_ids** | **[String]** | A list of order IDs to be included in this settlement. If provided, the settlement request will settle the merchant funds received from the specified orders, and the `amount` field will be ignored. This field is only applicable when `settlement_type` is set to `Merchant`. | [optional]
|
|
13
14
|
|
|
14
15
|
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**request_id** | **String** | The request ID that is used to track a settlement request. The request ID is provided by you and must be unique. |
|
|
8
|
+
**acquiring_type** | [**AcquiringType**](AcquiringType.md) | | [optional]
|
|
9
|
+
**payout_channel** | [**PayoutChannel**](PayoutChannel.md) | | [optional]
|
|
10
|
+
**settlement_type** | [**SettlementType**](SettlementType.md) | | [optional]
|
|
8
11
|
**settlements** | [**[CreateSettlement]**](CreateSettlement.md) | |
|
|
9
12
|
|
|
10
13
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.CryptoAddress
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**token_id** | **String** | The token identifier (e.g., ETH_USDT, TRON_USDT) that this address is associated with. |
|
|
8
|
+
**address_id** | **String** | A unique identifier for this crypto address, automatically generated by Cobo. Use this ID (not the raw blockchain address) when submitting a settlement request. |
|
|
9
|
+
**address** | **String** | The blockchain address in its native format. This is the actual destination address where funds will be sent. Note: When submitting a settlement request, use the address ID rather than this raw address. |
|
|
10
|
+
**label** | **String** | A label to help identify the address's purpose. | [optional]
|
|
11
|
+
**created_timestamp** | **Number** | The creation time of the crypto address, represented as a UNIX timestamp in seconds. | [optional]
|
|
12
|
+
**updated_timestamp** | **Number** | The last update time of the crypto address, represented as a UNIX timestamp in seconds. | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.CustodialTransferDestination
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**destination_type** | [**TransferDestinationType**](TransferDestinationType.md) | |
|
|
8
|
+
**wallet_id** | **String** | The wallet ID. |
|
|
9
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`. |
|
|
10
|
+
|
|
11
|
+
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
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]
|
|
8
8
|
**request_type** | [**EstimateFeeRequestType**](EstimateFeeRequestType.md) | |
|
|
9
|
-
**chain_id** | **String** | The chain ID of the chain on which the smart contract is
|
|
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) | |
|
|
11
11
|
**destination** | [**ContractCallDestination**](ContractCallDestination.md) | |
|
|
12
12
|
**fee_type** | [**FeeType**](FeeType.md) | | [optional]
|
|
@@ -11,6 +11,6 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**destination** | [**ContractCallDestination**](ContractCallDestination.md) | |
|
|
12
12
|
**fee_type** | [**FeeType**](FeeType.md) | | [optional]
|
|
13
13
|
**replaced_transaction_id** | **String** | The ID of the transaction that this transaction replaced. | [optional]
|
|
14
|
-
**chain_id** | **String** | The chain ID of the chain on which the smart contract is
|
|
14
|
+
**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). |
|
|
15
15
|
|
|
16
16
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.EstimatedFILFee
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**fee_type** | [**FeeType**](FeeType.md) | |
|
|
8
|
+
**token_id** | **String** | The token ID of the transaction fee. |
|
|
9
|
+
**slow** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | | [optional]
|
|
10
|
+
**recommended** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | |
|
|
11
|
+
**fast** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CoboWaas2.EstimatedFILFeeSlow
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**gas_premium** | **String** | An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee. |
|
|
8
|
+
**gas_fee_cap** | **String** | The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas. |
|
|
9
|
+
**gas_limit** | **String** | This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources. |
|
|
10
|
+
**gas_base** | **String** | This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time. |
|
|
11
|
+
|
|
12
|
+
|
package/docs/EstimatedFee.md
CHANGED
|
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**token_id** | **String** | The token ID of the transaction fee. |
|
|
9
9
|
**is_loop** | **Boolean** | Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer. | [optional]
|
|
10
10
|
**fee_amount** | **String** | The transaction fee that you need to pay for the transaction. |
|
|
11
|
-
**slow** | [**
|
|
12
|
-
**recommended** | [**
|
|
13
|
-
**fast** | [**
|
|
11
|
+
**slow** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | | [optional]
|
|
12
|
+
**recommended** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | |
|
|
13
|
+
**fast** | [**EstimatedFILFeeSlow**](EstimatedFILFeeSlow.md) | | [optional]
|
|
14
14
|
|
|
15
15
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.EstimatedSOLFee
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**fee_type** | [**FeeType**](FeeType.md) | |
|
|
8
|
+
**token_id** | **String** | The token ID of the transaction fee. |
|
|
9
|
+
**slow** | [**EstimatedSOLFeeSlow**](EstimatedSOLFeeSlow.md) | | [optional]
|
|
10
|
+
**recommended** | [**EstimatedSOLFeeSlow**](EstimatedSOLFeeSlow.md) | |
|
|
11
|
+
**fast** | [**EstimatedSOLFeeSlow**](EstimatedSOLFeeSlow.md) | | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CoboWaas2.EstimatedSOLFeeSlow
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**compute_unit_price** | **String** | The cost per compute unit. Transactions consume computational resources measured in compute units, and this price helps determine the cost of executing transactions, especially complex ones involving smart contracts. |
|
|
8
|
+
**compute_unit_limit** | **String** | The maximum number of compute units allowed for a transaction. This limits the resources any single transaction can consume, preventing excessive resource usage that could impact network performance negatively. |
|
|
9
|
+
**base_fee** | **String** | The fundamental fee required for each transaction. It is charged to prevent spam transactions and network congestion, ensuring that only meaningful transactions consume network resources. |
|
|
10
|
+
**rent_amount** | **String** | The fee charged as rent for maintaining the state of accounts on the blockchain. This rent ensures accounts are stored on-chain over the long term and that there's sufficient balance to sustain the account state. | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CoboWaas2.ExchangePermissionToken201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**access_token** | **String** | The Access Token. | [optional]
|
|
8
|
+
**token_type** | **String** | The token type. This is always `Bearer`. | [optional]
|
|
9
|
+
**expires_in** | **Number** | The time in seconds until the Access Token expires. This is always `3600`, indicating the token expires 1 hour after issuance. | [optional]
|
|
10
|
+
**refresh_token** | **String** | The Refresh Token. Use it to obtain a new Access Token when the current one expires. The Refresh Token is valid for 7 days. | [optional]
|
|
11
|
+
|
|
12
|
+
|
package/docs/FILBase.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CoboWaas2.FILBase
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**gas_base** | **String** | This is the minimum fee required to include a transaction in a block. It is determined by the network's congestion level, which adjusts to maintain a target block utilization rate. The base fee is burned, reducing the total supply of Filecoin over time. | [optional]
|
|
8
|
+
|
|
9
|
+
|
package/docs/FILPrice.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.FILPrice
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**gas_premium** | **String** | An optional additional fee that users can include to prioritize their transactions over others. It acts like a tip to incentivize miners to select and include your transaction over transactions with only the base fee. | [optional]
|
|
8
|
+
**gas_fee_cap** | **String** | The gas_fee_cap is a user-defined limit on how much they are willing to pay per unit of gas. | [optional]
|
|
9
|
+
**gas_limit** | **String** | This defines the maximum amount of computational effort that a transaction is allowed to consume. It's a way to cap the resources that a transaction can use, ensuring it doesn't consume excessive network resources. | [optional]
|
|
10
|
+
|
|
11
|
+
|
package/docs/FeeStationApi.md
CHANGED
|
@@ -238,7 +238,7 @@ Name | Type | Description | Notes
|
|
|
238
238
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
239
239
|
**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]
|
|
240
240
|
**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]
|
|
241
|
-
**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 '
|
|
241
|
+
**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']
|
|
242
242
|
|
|
243
243
|
### Return type
|
|
244
244
|
|
package/docs/FeeType.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**token_id** | **String** | The token ID, which
|
|
7
|
+
**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}`. |
|
|
8
8
|
**currency** | **String** | The fiat currency. |
|
|
9
9
|
**rate** | **String** | The current exchange rate between the specified currency pair. Expressed as the amount of fiat currency per one unit of cryptocurrency. For example, if the cryptocurrency is USDT and the fiat currency is USD, a rate of \"0.99\" means 1 USDT = 0.99 USD. |
|
|
10
10
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.GraphQLError
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**message** | **String** | The error message. | [optional]
|
|
8
|
+
**locations** | [**[GraphQLErrorLocationsInner]**](GraphQLErrorLocationsInner.md) | The locations in the query where the error occurred. | [optional]
|
|
9
|
+
**path** | **[String]** | The path in the response where the error occurred. | [optional]
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.GraphQLErrorLocationsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**line** | **Number** | The line number in the query where the error occurred. | [optional]
|
|
8
|
+
**column** | **Number** | The column number in the query where the error occurred. | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CoboWaas2.GraphQLRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**query** | **String** | The GraphQL query or mutation as a string. |
|
|
8
|
+
**variables** | **{String: Object}** | Variables to use in the GraphQL operation. Can include dynamic values required for the query or mutation. | [optional]
|
|
9
|
+
**operationName** | **String** | The operation name in case of multiple operations in the same query or mutation. | [optional]
|
|
10
|
+
|
|
11
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.GraphQLResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | **{String: Object}** | The response data for the GraphQL operation. | [optional]
|
|
8
|
+
**errors** | [**[GraphQLError]**](GraphQLError.md) | Any errors that occurred during the GraphQL operation. | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.ListTopUpPayers200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**[ListTopUpPayers200ResponseDataInner]**](ListTopUpPayers200ResponseDataInner.md) | | [optional]
|
|
8
|
+
**pagination** | [**Pagination**](Pagination.md) | | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.ListTopUpPayers200ResponseDataInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**merchant_id** | **String** | The merchant ID. |
|
|
8
|
+
**payer_id** | **String** | A unique identifier assigned by Cobo to track and identify individual payers. |
|
|
9
|
+
**developer_fee_rate** | **String** | The developer fee rate applied to top-up transactions made by this payer. Expressed as a decimal string where \"0.1\" represents 10%. |
|
|
10
|
+
**created_timestamp** | **Number** | The creation time of the payer, represented as a UNIX timestamp in seconds. | [optional]
|
|
11
|
+
**updated_timestamp** | **Number** | The last update time of the payer, represented as a UNIX timestamp in seconds. | [optional]
|
|
12
|
+
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of top-up transactions associated with this payer. | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -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. |
|
|
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. - `BalanceUpdateInfo`: The balance update event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. |
|
|
8
8
|
**vault_id** | **String** | The vault ID. | [optional]
|
|
9
9
|
**project_id** | **String** | The project ID. | [optional]
|
|
10
10
|
**name** | **String** | The vault name. | [optional]
|
|
@@ -33,6 +33,8 @@ Name | Type | Description | Notes
|
|
|
33
33
|
|
|
34
34
|
* `TokenListing` (value: `"TokenListing"`)
|
|
35
35
|
|
|
36
|
+
* `BalanceUpdateInfo` (value: `"BalanceUpdateInfo"`)
|
|
37
|
+
|
|
36
38
|
* `PaymentOrder` (value: `"PaymentOrder"`)
|
|
37
39
|
|
|
38
40
|
* `PaymentRefund` (value: `"PaymentRefund"`)
|
package/docs/Merchant.md
CHANGED
|
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
|
|
|
7
7
|
**merchant_id** | **String** | The merchant ID. |
|
|
8
8
|
**name** | **String** | The merchant name. |
|
|
9
9
|
**wallet_id** | **String** | The ID of the linked wallet. |
|
|
10
|
-
**
|
|
11
|
-
**
|
|
10
|
+
**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. | [optional]
|
|
11
|
+
**created_timestamp** | **Number** | The creation time of the merchant, represented as a UNIX timestamp in seconds. | [optional]
|
|
12
|
+
**updated_timestamp** | **Number** | The last update time of the merchant, represented as a UNIX timestamp in seconds. | [optional]
|
|
12
13
|
|
|
13
14
|
|
package/docs/OAuthApi.md
CHANGED
|
@@ -4,11 +4,63 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**exchangePermissionToken**](OAuthApi.md#exchangePermissionToken) | **POST** /oauth/permission_token/exchange | Get Access Token
|
|
7
8
|
[**getToken**](OAuthApi.md#getToken) | **GET** /oauth/token | Get Org Access Token
|
|
9
|
+
[**refreshPermissionToken**](OAuthApi.md#refreshPermissionToken) | **POST** /oauth/permission_token/refresh | Refresh Access Token
|
|
8
10
|
[**refreshToken**](OAuthApi.md#refreshToken) | **POST** /oauth/token | Refresh Org Access Token
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
|
|
14
|
+
## exchangePermissionToken
|
|
15
|
+
|
|
16
|
+
> ExchangePermissionToken201Response exchangePermissionToken(ExchangePermissionTokenRequest)
|
|
17
|
+
|
|
18
|
+
Get Access Token
|
|
19
|
+
|
|
20
|
+
This operation acquires an Access Token and a Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call the [Refresh Access Token](/v2/api-references/oauth/refresh-access-token) operation to get a new Access Token and a new Refresh Token.
|
|
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.OAuthApi();
|
|
34
|
+
const ExchangePermissionTokenRequest = new CoboWaas2.ExchangePermissionTokenRequest();
|
|
35
|
+
apiInstance.exchangePermissionToken(ExchangePermissionTokenRequest).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
|
+
**ExchangePermissionTokenRequest** | [**ExchangePermissionTokenRequest**](ExchangePermissionTokenRequest.md)| The request body to acquire an Access Token. |
|
|
49
|
+
|
|
50
|
+
### Return type
|
|
51
|
+
|
|
52
|
+
[**ExchangePermissionToken201Response**](ExchangePermissionToken201Response.md)
|
|
53
|
+
|
|
54
|
+
### Authorization
|
|
55
|
+
|
|
56
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
57
|
+
|
|
58
|
+
### HTTP request headers
|
|
59
|
+
|
|
60
|
+
- **Content-Type**: application/json
|
|
61
|
+
- **Accept**: application/json
|
|
62
|
+
|
|
63
|
+
|
|
12
64
|
## getToken
|
|
13
65
|
|
|
14
66
|
> GetToken2XXResponse getToken(client_id, org_id, grant_type)
|
|
@@ -63,6 +115,56 @@ Name | Type | Description | Notes
|
|
|
63
115
|
- **Accept**: application/json
|
|
64
116
|
|
|
65
117
|
|
|
118
|
+
## refreshPermissionToken
|
|
119
|
+
|
|
120
|
+
> ExchangePermissionToken201Response refreshPermissionToken(RefreshPermissionTokenRequest)
|
|
121
|
+
|
|
122
|
+
Refresh Access Token
|
|
123
|
+
|
|
124
|
+
This operation refreshes the Access Token and Refresh Token for the Checkout SDK. For security purposes, an Access Token expires after a certain period. Once it expires, you need to call this operation to get a new Access Token and Refresh Token.
|
|
125
|
+
|
|
126
|
+
### Example
|
|
127
|
+
|
|
128
|
+
```javascript
|
|
129
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
130
|
+
// Initialize the API client
|
|
131
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
132
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
133
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
134
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
135
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
136
|
+
// Call the API
|
|
137
|
+
const apiInstance = new CoboWaas2.OAuthApi();
|
|
138
|
+
const RefreshPermissionTokenRequest = new CoboWaas2.RefreshPermissionTokenRequest();
|
|
139
|
+
apiInstance.refreshPermissionToken(RefreshPermissionTokenRequest).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
|
+
**RefreshPermissionTokenRequest** | [**RefreshPermissionTokenRequest**](RefreshPermissionTokenRequest.md)| The request body to refresh the Access Token and the Refresh Token. |
|
|
153
|
+
|
|
154
|
+
### Return type
|
|
155
|
+
|
|
156
|
+
[**ExchangePermissionToken201Response**](ExchangePermissionToken201Response.md)
|
|
157
|
+
|
|
158
|
+
### Authorization
|
|
159
|
+
|
|
160
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
161
|
+
|
|
162
|
+
### HTTP request headers
|
|
163
|
+
|
|
164
|
+
- **Content-Type**: application/json
|
|
165
|
+
- **Accept**: application/json
|
|
166
|
+
|
|
167
|
+
|
|
66
168
|
## refreshToken
|
|
67
169
|
|
|
68
170
|
> RefreshToken2XXResponse refreshToken(RefreshTokenRequest)
|
package/docs/Order.md
CHANGED
|
@@ -6,8 +6,8 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**order_id** | **String** | The order ID. |
|
|
8
8
|
**merchant_id** | **String** | The merchant ID. | [optional]
|
|
9
|
-
**token_id** | **String** |
|
|
10
|
-
**chain_id** | **String** |
|
|
9
|
+
**token_id** | **String** | The ID of the cryptocurrency used for payment. Supported tokens: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
10
|
+
**chain_id** | **String** | The ID of the blockchain network where the payment transaction should be made. Supported chains: - USDC: `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC` - USDT: `TRON`, `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC` |
|
|
11
11
|
**payable_amount** | **String** | The cryptocurrency amount to be paid for this order. |
|
|
12
12
|
**receive_address** | **String** | The recipient wallet address to be used for the payment transaction. |
|
|
13
13
|
**currency** | **String** | The fiat currency of the order. |
|
|
@@ -19,8 +19,9 @@ Name | Type | Description | Notes
|
|
|
19
19
|
**psp_order_code** | **String** | A unique reference code assigned by the developer to identify this order in their system. |
|
|
20
20
|
**status** | [**OrderStatus**](OrderStatus.md) | |
|
|
21
21
|
**received_token_amount** | **String** | The total cryptocurrency amount received for this order. Updates until the expiration time. Precision matches the token standard (e.g., 6 decimals for USDT). |
|
|
22
|
-
**created_timestamp** | **Number** | The
|
|
23
|
-
**updated_timestamp** | **Number** | The
|
|
24
|
-
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the
|
|
22
|
+
**created_timestamp** | **Number** | The creation time of the order, represented as a UNIX timestamp in seconds. | [optional]
|
|
23
|
+
**updated_timestamp** | **Number** | The last update time of the order, represented as a UNIX timestamp in seconds. | [optional]
|
|
24
|
+
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process. | [optional]
|
|
25
|
+
**settlement_status** | [**SettleStatus**](SettleStatus.md) | | [optional]
|
|
25
26
|
|
|
26
27
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# CoboWaas2.OrganizationsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**getOrgInfo**](OrganizationsApi.md#getOrgInfo) | **GET** /organizations/info | Get organization information
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## getOrgInfo
|
|
12
|
+
|
|
13
|
+
> OrgInfo getOrgInfo()
|
|
14
|
+
|
|
15
|
+
Get organization information
|
|
16
|
+
|
|
17
|
+
This operation retrieves the detailed information about the organization associated with the current API key.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
23
|
+
// Initialize the API client
|
|
24
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
25
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
26
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
27
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
28
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
29
|
+
// Call the API
|
|
30
|
+
const apiInstance = new CoboWaas2.OrganizationsApi();
|
|
31
|
+
apiInstance.getOrgInfo().then((data) => {
|
|
32
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
33
|
+
}, (error) => {
|
|
34
|
+
console.error(error);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Parameters
|
|
40
|
+
|
|
41
|
+
This endpoint does not need any parameter.
|
|
42
|
+
|
|
43
|
+
### Return type
|
|
44
|
+
|
|
45
|
+
[**OrgInfo**](OrgInfo.md)
|
|
46
|
+
|
|
47
|
+
### Authorization
|
|
48
|
+
|
|
49
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
50
|
+
|
|
51
|
+
### HTTP request headers
|
|
52
|
+
|
|
53
|
+
- **Content-Type**: Not defined
|
|
54
|
+
- **Accept**: application/json
|
|
55
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.PayerAccount
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**merchant_id** | **String** | The merchant ID. |
|
|
8
|
+
**payer_id** | **String** | A unique identifier assigned by Cobo to track and identify individual payers. |
|
|
9
|
+
**developer_fee_rate** | **String** | The developer fee rate applied to the top-up transactions made by the payer. Expressed as a decimal string where \"0.1\" represents 10%. |
|
|
10
|
+
**created_timestamp** | **Number** | The creation time of the payer, represented as a UNIX timestamp in seconds. | [optional]
|
|
11
|
+
**updated_timestamp** | **Number** | The last update time of the payer, represented as a UNIX timestamp in seconds. | [optional]
|
|
12
|
+
**accounts** | [**[Account]**](Account.md) | An array of accounts associated with this payer. | [optional]
|
|
13
|
+
|
|
14
|
+
|