@cobo/cobo-waas2 1.30.0 → 1.32.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 +9 -36
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/FeeStationApi.js +4 -4
- package/dist/api/PaymentApi.js +76 -929
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/api/WalletsApi.js +83 -0
- package/dist/index.js +35 -105
- package/dist/model/Balance.js +14 -0
- package/dist/model/BridgingFee.js +9 -0
- package/dist/model/ContractCallParams.js +16 -0
- package/dist/model/CreateDestinationBankAccount.js +26 -0
- package/dist/model/CreatePaymentOrderRequest.js +4 -3
- package/dist/model/CreateTopUpAddresses.js +2 -2
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/DestinationBankAccount.js +26 -0
- package/dist/model/DestinationBankAccountDetail.js +26 -0
- package/dist/model/IntermediaryBankInfo.js +4 -6
- package/dist/model/MerchantBalance.js +4 -6
- package/dist/model/PaymentBridgeStatus.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +9 -9
- package/dist/model/PaymentPayout.js +35 -4
- package/dist/model/PaymentPayoutDetail.js +49 -13
- package/dist/model/PaymentPayoutEvent.js +49 -13
- package/dist/model/PreCheck.js +89 -0
- package/dist/model/ReportType.js +5 -0
- package/dist/model/SkipCheckType.js +56 -0
- package/dist/model/SupportedToken.js +17 -17
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +26 -0
- package/dist/model/TransactionRawTxInfo.js +32 -1
- package/dist/model/TransactionSelectedUtxo.js +39 -0
- package/dist/model/TransactionUtxoChange.js +13 -0
- package/dist/model/TransferParams.js +16 -0
- package/dist/model/TriggerTestPaymentWebhookEventResponse.js +83 -0
- package/dist/model/{QueryDestinationWhitelistEnabled200Response.js → TriggerTestPaymentsWebhookEventRequest.js} +35 -26
- package/dist/model/UTXO.js +48 -0
- package/dist/model/UpdateDestinationBankAccount.js +26 -0
- package/dist/model/WebhookEventData.js +6 -0
- package/dist/model/WebhookEventType.js +25 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/Balance.md +1 -0
- package/docs/BridgingFee.md +1 -0
- package/docs/ContractCallParams.md +1 -0
- package/docs/CreateDestinationBankAccount.md +2 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateTopUpAddresses.md +1 -1
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/DestinationBankAccount.md +2 -0
- package/docs/DestinationBankAccountDetail.md +2 -0
- package/docs/FeeStationApi.md +2 -2
- package/docs/IntermediaryBankInfo.md +1 -1
- package/docs/MerchantBalance.md +1 -1
- package/docs/PaymentApi.md +185 -1153
- package/docs/PaymentBridgeStatus.md +12 -0
- package/docs/PaymentBulkSendItem.md +5 -5
- package/docs/PaymentPayout.md +2 -1
- package/docs/PaymentPayoutDetail.md +2 -1
- package/docs/PaymentPayoutEvent.md +2 -1
- package/docs/PreCheck.md +9 -0
- package/docs/ReportType.md +2 -0
- package/docs/SkipCheckType.md +10 -0
- package/docs/SupportedToken.md +10 -10
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +2 -0
- package/docs/TransactionRawTxInfo.md +2 -1
- package/docs/TransactionSelectedUtxo.md +3 -0
- package/docs/TransactionUtxoChange.md +1 -0
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferParams.md +1 -0
- package/docs/TriggerTestPaymentWebhookEventResponse.md +9 -0
- package/docs/TriggerTestPaymentsWebhookEventRequest.md +10 -0
- package/docs/UTXO.md +4 -0
- package/docs/UpdateDestinationBankAccount.md +2 -0
- package/docs/WalletsApi.md +71 -0
- package/docs/WebhookEventData.md +1 -0
- package/docs/WebhookEventType.md +10 -0
- package/package.json +1 -1
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +0 -140
- package/dist/model/CreateDestinationBankAccountRequest.js +0 -272
- package/dist/model/CreateDestinationWalletAddressRequest.js +0 -140
- package/dist/model/DeleteCounterparty200Response.js +0 -110
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +0 -110
- package/dist/model/DeleteDestination200Response.js +0 -110
- package/dist/model/DeleteDestinationBankAccount200Response.js +0 -110
- package/dist/model/DeleteDestinationWalletAddress200Response.js +0 -110
- package/dist/model/EnableDestinationWhitelistRequest.js +0 -106
- package/dist/model/ListCounterpartyWalletAddress200Response.js +0 -123
- package/dist/model/ListDestinationBankAccounts200Response.js +0 -123
- package/dist/model/ListDestinationWalletAddresses200Response.js +0 -123
- package/dist/model/UpdateCounterpartyByIdRequest.js +0 -160
- package/dist/model/UpdateDestinationByIdRequest.js +0 -173
- package/docs/CreateCounterpartyWalletAddressRequest.md +0 -11
- package/docs/CreateDestinationBankAccountRequest.md +0 -20
- package/docs/CreateDestinationWalletAddressRequest.md +0 -11
- package/docs/DeleteCounterparty200Response.md +0 -9
- package/docs/DeleteCounterpartyWalletAddress200Response.md +0 -9
- package/docs/DeleteDestination200Response.md +0 -9
- package/docs/DeleteDestinationBankAccount200Response.md +0 -9
- package/docs/DeleteDestinationWalletAddress200Response.md +0 -9
- package/docs/EnableDestinationWhitelistRequest.md +0 -9
- package/docs/ListCounterpartyWalletAddress200Response.md +0 -10
- package/docs/ListDestinationBankAccounts200Response.md +0 -10
- package/docs/ListDestinationWalletAddresses200Response.md +0 -10
- package/docs/QueryDestinationWhitelistEnabled200Response.md +0 -9
- package/docs/UpdateCounterpartyByIdRequest.md +0 -13
- package/docs/UpdateDestinationByIdRequest.md +0 -14
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**bulk_send_item_id** | **String** | The
|
|
8
|
-
**token_id** | **String** | The token ID of the
|
|
9
|
-
**receiving_address** | **String** | The receiving address
|
|
10
|
-
**amount** | **String** | The amount of the
|
|
11
|
-
**description** | **String** |
|
|
7
|
+
**bulk_send_item_id** | **String** | The bulk send item ID. |
|
|
8
|
+
**token_id** | **String** | The token ID of the cryptocurrency to be sent to the recipient. |
|
|
9
|
+
**receiving_address** | **String** | The receiving address. |
|
|
10
|
+
**amount** | **String** | The amount of the cryptocurrency to be sent to the recipient. |
|
|
11
|
+
**description** | **String** | A note or comment about the bulk send item. | [optional]
|
|
12
12
|
**status** | [**PaymentBulkSendItemStatus**](PaymentBulkSendItemStatus.md) | |
|
|
13
13
|
**validation_status** | [**PaymentBulkSendItemValidationStatus**](PaymentBulkSendItemValidationStatus.md) | |
|
|
14
14
|
|
package/docs/PaymentPayout.md
CHANGED
|
@@ -12,8 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
13
13
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
14
14
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
15
|
-
**
|
|
15
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
16
16
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
17
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
17
18
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
18
19
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
|
|
@@ -12,8 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
13
13
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
14
14
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
15
|
-
**
|
|
15
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
16
16
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
17
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
17
18
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
18
19
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional]
|
|
@@ -13,8 +13,9 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
14
14
|
**initiator** | **String** | The initiator of this payout, usually the user's API key. | [optional]
|
|
15
15
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
16
|
-
**
|
|
16
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
17
17
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
18
|
+
**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | |
|
|
18
19
|
**created_timestamp** | **Number** | The created time of the payout, represented as a UNIX timestamp in seconds. |
|
|
19
20
|
**updated_timestamp** | **Number** | The updated time of the payout, represented as a UNIX timestamp in seconds. |
|
|
20
21
|
**transactions** | [**[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional]
|
package/docs/PreCheck.md
ADDED
package/docs/ReportType.md
CHANGED
package/docs/SupportedToken.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**token_id** | **String** |
|
|
8
|
-
**name** | **String** |
|
|
9
|
-
**symbol** | **String** |
|
|
10
|
-
**decimal** | **Number** |
|
|
11
|
-
**token_address** | **String** |
|
|
12
|
-
**chain_id** | **String** |
|
|
13
|
-
**chain_symbol** | **String** |
|
|
14
|
-
**chain_icon_url** | **String** | URL
|
|
15
|
-
**token_icon_url** | **String** | URL
|
|
16
|
-
**can_off_ramp** | **Boolean** | Whether the token
|
|
7
|
+
**token_id** | **String** | The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`. |
|
|
8
|
+
**name** | **String** | The full name of the token. |
|
|
9
|
+
**symbol** | **String** | The symbol of the token. |
|
|
10
|
+
**decimal** | **Number** | The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value. |
|
|
11
|
+
**token_address** | **String** | The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum). |
|
|
12
|
+
**chain_id** | **String** | The ID of the chain on which the token exists. |
|
|
13
|
+
**chain_symbol** | **String** | The symbol of the chain on which the token exists. |
|
|
14
|
+
**chain_icon_url** | **String** | The URL of the chain icon image. | [optional]
|
|
15
|
+
**token_icon_url** | **String** | The URL of the token icon image. | [optional]
|
|
16
|
+
**can_off_ramp** | **Boolean** | Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp. | [optional]
|
|
17
17
|
|
|
18
18
|
|
|
@@ -5,5 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**vout_n** | **Number** | The output index of the UTXO. | [optional]
|
|
8
|
+
**object_id** | **String** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional]
|
|
9
|
+
**version** | **String** | Object version number. | [optional]
|
|
8
10
|
|
|
9
11
|
|
|
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**selected_utxos** | [**[TransactionSelectedUtxo]**](TransactionSelectedUtxo.md) | The selected UTXOs to be consumed in the transaction. | [optional]
|
|
9
9
|
**raw_tx** | **String** | The raw transaction data. | [optional]
|
|
10
10
|
**unsigned_raw_tx** | **String** | The unsigned raw transaction data. | [optional]
|
|
11
|
-
**utxo_change** | [**TransactionUtxoChange**](TransactionUtxoChange.md) |
|
|
11
|
+
**utxo_change** | [**TransactionUtxoChange**](TransactionUtxoChange.md) | Deprecated. Use `utxo_changes` instead. | [optional]
|
|
12
|
+
**utxo_changes** | [**[TransactionUtxoChange]**](TransactionUtxoChange.md) | The UTXO change outputs in the transaction. | [optional]
|
|
12
13
|
|
|
13
14
|
|
|
@@ -6,9 +6,12 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**tx_hash** | **String** | The transaction hash of the UTXO. | [optional]
|
|
8
8
|
**vout_n** | **Number** | The output index of the UTXO. | [optional]
|
|
9
|
+
**token_id** | **String** | The token ID of the UTXO. | [optional]
|
|
9
10
|
**address** | **String** | The address of the UTXO. | [optional]
|
|
10
11
|
**value** | **String** | The value of the UTXO. | [optional]
|
|
11
12
|
**redeem_script** | **String** | The redeem script used in P2SH and P2WSH transactions. | [optional]
|
|
12
13
|
**revealed_script** | **String** | The revealed script used for Taproot script-path spend transaction. | [optional]
|
|
14
|
+
**object_id** | **String** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional]
|
|
15
|
+
**version** | **String** | Object version number. | [optional]
|
|
13
16
|
|
|
14
17
|
|
|
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**address** | **String** | The receiving address of the UTXO change output. | [optional]
|
|
8
8
|
**value** | **String** | The amount of the UTXO change output. | [optional]
|
|
9
|
+
**token_id** | **String** | The token ID of the UTXO change output. | [optional]
|
|
9
10
|
|
|
10
11
|
|
package/docs/TransactionsApi.md
CHANGED
|
@@ -775,8 +775,8 @@ Name | Type | Description | Notes
|
|
|
775
775
|
**wallet_type** | [**WalletType**](.md)| The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) | [optional]
|
|
776
776
|
**wallet_subtype** | [**WalletSubtype**](.md)| The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional]
|
|
777
777
|
**project_id** | **String**| (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). | [optional]
|
|
778
|
-
**min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
|
|
779
|
-
**max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional]
|
|
778
|
+
**min_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional]
|
|
779
|
+
**max_created_timestamp** | **Number**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional]
|
|
780
780
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
781
781
|
**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]
|
|
782
782
|
**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]
|
package/docs/TransferParams.md
CHANGED
|
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional]
|
|
14
14
|
**transaction_process_type** | [**TransactionProcessType**](TransactionProcessType.md) | | [optional]
|
|
15
15
|
**auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional]
|
|
16
|
+
**pre_check** | [**PreCheck**](PreCheck.md) | | [optional]
|
|
16
17
|
|
|
17
18
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CoboWaas2.TriggerTestPaymentWebhookEventResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**triggered** | **Boolean** | Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered. | [optional]
|
|
8
|
+
|
|
9
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.TriggerTestPaymentsWebhookEventRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**event_type** | [**WebhookEventType**](WebhookEventType.md) | |
|
|
8
|
+
**override_data** | **Object** | An optional object to customize the webhook event payload. Include only the fields you want to override. The provided fields must match the webhook event data structure for the specified event type. For the full event data structure, refer to the `data.data` property in the response of [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). If this property is omitted, a default payload is returned. | [optional]
|
|
9
|
+
|
|
10
|
+
|
package/docs/UTXO.md
CHANGED
|
@@ -13,5 +13,9 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**is_locked** | **Boolean** | Whether the UTXO is locked. | [optional]
|
|
14
14
|
**confirmed_number** | **Number** | The number of confirmations for the UTXO. | [optional]
|
|
15
15
|
**is_frozen** | **Boolean** | Whether the UTXO is frozen. | [optional]
|
|
16
|
+
**is_change** | **Boolean** | Whether the UTXO is a change output of a transaction. | [optional]
|
|
17
|
+
**chain_id** | **String** | The chain ID, which is the unique identifier of a blockchain. | [optional]
|
|
18
|
+
**object_id** | **String** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional]
|
|
19
|
+
**version** | **String** | Object version number. | [optional]
|
|
16
20
|
|
|
17
21
|
|
|
@@ -15,5 +15,7 @@ Name | Type | Description | Notes
|
|
|
15
15
|
**iban_code** | **String** | The IBAN code of the bank account. | [optional]
|
|
16
16
|
**further_credit** | **String** | The further credit of the bank account. | [optional]
|
|
17
17
|
**intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional]
|
|
18
|
+
**country** | **String** | Beneficiary's country, in ISO 3166-1 alpha-3 format. | [optional]
|
|
19
|
+
**city** | **String** | Beneficiary's city. | [optional]
|
|
18
20
|
|
|
19
21
|
|
package/docs/WalletsApi.md
CHANGED
|
@@ -27,6 +27,7 @@ Method | HTTP request | Description
|
|
|
27
27
|
[**listTokenBalancesForAddress**](WalletsApi.md#listTokenBalancesForAddress) | **GET** /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address
|
|
28
28
|
[**listTokenBalancesForWallet**](WalletsApi.md#listTokenBalancesForWallet) | **GET** /wallets/{wallet_id}/tokens | List token balances by wallet
|
|
29
29
|
[**listTokenListingRequests**](WalletsApi.md#listTokenListingRequests) | **GET** /wallets/tokens/listing_requests | List token listing requests
|
|
30
|
+
[**listTransactionUtxos**](WalletsApi.md#listTransactionUtxos) | **GET** /wallets/{wallet_id}/transaction_utxos | List transaction UTXOs
|
|
30
31
|
[**listUtxos**](WalletsApi.md#listUtxos) | **GET** /wallets/{wallet_id}/utxos | List UTXOs
|
|
31
32
|
[**listWallets**](WalletsApi.md#listWallets) | **GET** /wallets | List all wallets
|
|
32
33
|
[**lockUtxos**](WalletsApi.md#lockUtxos) | **POST** /wallets/{wallet_id}/utxos/lock | Lock UTXOs
|
|
@@ -1320,6 +1321,76 @@ Name | Type | Description | Notes
|
|
|
1320
1321
|
- **Accept**: application/json
|
|
1321
1322
|
|
|
1322
1323
|
|
|
1324
|
+
## listTransactionUtxos
|
|
1325
|
+
|
|
1326
|
+
> ListUtxos200Response listTransactionUtxos(wallet_id, chain_id, tx_hash, opts)
|
|
1327
|
+
|
|
1328
|
+
List transaction UTXOs
|
|
1329
|
+
|
|
1330
|
+
The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. <Note>This operation is applicable to MPC and Custodial Web3 Wallets.</Note>
|
|
1331
|
+
|
|
1332
|
+
### Example
|
|
1333
|
+
|
|
1334
|
+
```javascript
|
|
1335
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1336
|
+
// Initialize the API client
|
|
1337
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1338
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1339
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1340
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1341
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1342
|
+
// Call the API
|
|
1343
|
+
const apiInstance = new CoboWaas2.WalletsApi();
|
|
1344
|
+
const wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
1345
|
+
const chain_id = "ETH";
|
|
1346
|
+
const tx_hash = "dd7e1cecf6bbde1844ee1815b780711a1e306a718bcd23cd64401b48ef88eb83";
|
|
1347
|
+
const opts = {
|
|
1348
|
+
'is_change': false,
|
|
1349
|
+
'vout_n': 0,
|
|
1350
|
+
'token_id': "ETH_USDT",
|
|
1351
|
+
'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
|
|
1352
|
+
'limit': 10,
|
|
1353
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
1354
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
1355
|
+
};
|
|
1356
|
+
apiInstance.listTransactionUtxos(wallet_id, chain_id, tx_hash, opts).then((data) => {
|
|
1357
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1358
|
+
}, (error) => {
|
|
1359
|
+
console.error(error);
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1362
|
+
```
|
|
1363
|
+
|
|
1364
|
+
### Parameters
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
Name | Type | Description | Notes
|
|
1368
|
+
------------- | ------------- | ------------- | -------------
|
|
1369
|
+
**wallet_id** | **String**| The wallet ID. |
|
|
1370
|
+
**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). |
|
|
1371
|
+
**tx_hash** | **String**| The transaction hash to filter UTXOs by. |
|
|
1372
|
+
**is_change** | **Boolean**| Filter UTXOs by whether they are change outputs. | [optional]
|
|
1373
|
+
**vout_n** | **Number**| The output index of the UTXO to filter by. | [optional]
|
|
1374
|
+
**token_id** | **String**| The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional]
|
|
1375
|
+
**address** | **String**| | [optional]
|
|
1376
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
1377
|
+
**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]
|
|
1378
|
+
**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]
|
|
1379
|
+
|
|
1380
|
+
### Return type
|
|
1381
|
+
|
|
1382
|
+
[**ListUtxos200Response**](ListUtxos200Response.md)
|
|
1383
|
+
|
|
1384
|
+
### Authorization
|
|
1385
|
+
|
|
1386
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1387
|
+
|
|
1388
|
+
### HTTP request headers
|
|
1389
|
+
|
|
1390
|
+
- **Content-Type**: Not defined
|
|
1391
|
+
- **Accept**: application/json
|
|
1392
|
+
|
|
1393
|
+
|
|
1323
1394
|
## listUtxos
|
|
1324
1395
|
|
|
1325
1396
|
> ListUtxos200Response listUtxos(wallet_id, token_id, opts)
|
package/docs/WebhookEventData.md
CHANGED
|
@@ -101,6 +101,7 @@ Name | Type | Description | Notes
|
|
|
101
101
|
**payout_items** | [**[PaymentPayoutItem]**](PaymentPayoutItem.md) | required | [optional]
|
|
102
102
|
**recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional]
|
|
103
103
|
**actual_payout_amount** | **String** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional]
|
|
104
|
+
**commission_fees** | [**[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional]
|
|
104
105
|
**remark** | **String** | A note or comment about the payout. | [optional]
|
|
105
106
|
**bulk_send_id** | **String** | The bulk send ID. |
|
|
106
107
|
**execution_mode** | [**PaymentBulkSendExecutionMode**](PaymentBulkSendExecutionMode.md) | |
|
package/docs/WebhookEventType.md
CHANGED
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
|
|
66
66
|
* `payment.status.updated` (value: `"payment.status.updated"`)
|
|
67
67
|
|
|
68
|
+
* `payment.order.status.updated` (value: `"payment.order.status.updated"`)
|
|
69
|
+
|
|
68
70
|
* `payment.refund.status.updated` (value: `"payment.refund.status.updated"`)
|
|
69
71
|
|
|
70
72
|
* `payment.settlement.status.updated` (value: `"payment.settlement.status.updated"`)
|
|
@@ -79,6 +81,14 @@
|
|
|
79
81
|
|
|
80
82
|
* `payment.bulk_send.status.updated` (value: `"payment.bulk_send.status.updated"`)
|
|
81
83
|
|
|
84
|
+
* `payment.transaction.external.created` (value: `"payment.transaction.external.created"`)
|
|
85
|
+
|
|
86
|
+
* `payment.transaction.external.completed` (value: `"payment.transaction.external.completed"`)
|
|
87
|
+
|
|
88
|
+
* `payment.transaction.settlement_network.created` (value: `"payment.transaction.settlement_network.created"`)
|
|
89
|
+
|
|
90
|
+
* `payment.transaction.settlement_network.completed` (value: `"payment.transaction.settlement_network.completed"`)
|
|
91
|
+
|
|
82
92
|
* `compliance.disposition.status.updated` (value: `"compliance.disposition.status.updated"`)
|
|
83
93
|
|
|
84
94
|
* `compliance.kyt.screenings.status.updated` (value: `"compliance.kyt.screenings.status.updated"`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's WaaS API offering. It enables you to access Cobo's full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features: - A unified API for Cobo's [all four wallet types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform) - Support for 80+ chains and 3000+ tokens - A comprehensive selection of webhook events - Flexible usage models for MPC Wallets, including [Organization-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction) and [User-Controlled Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction) - Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls - Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction). ",
|
|
5
5
|
"license": "GPL 2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
-
* Cobo Wallet as a Service 2.0
|
|
19
|
-
*
|
|
20
|
-
* Contact: help@cobo.com
|
|
21
|
-
*
|
|
22
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
-
* https://openapi-generator.tech
|
|
24
|
-
* Do not edit the class manually.
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* The CreateCounterpartyWalletAddressRequest model module.
|
|
29
|
-
* @module model/CreateCounterpartyWalletAddressRequest
|
|
30
|
-
*/
|
|
31
|
-
var CreateCounterpartyWalletAddressRequest = /*#__PURE__*/function () {
|
|
32
|
-
/**
|
|
33
|
-
* Constructs a new <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
34
|
-
* @alias module:model/CreateCounterpartyWalletAddressRequest
|
|
35
|
-
* @param counterparty_id {String} The counterparty ID.
|
|
36
|
-
* @param address {String} The wallet address.
|
|
37
|
-
* @param chain_id {String} The chain ID of the cryptocurrency.
|
|
38
|
-
*/
|
|
39
|
-
function CreateCounterpartyWalletAddressRequest(counterparty_id, address, chain_id) {
|
|
40
|
-
_classCallCheck(this, CreateCounterpartyWalletAddressRequest);
|
|
41
|
-
CreateCounterpartyWalletAddressRequest.initialize(this, counterparty_id, address, chain_id);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Initializes the fields of this object.
|
|
46
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
-
* Only for internal use.
|
|
48
|
-
*/
|
|
49
|
-
return _createClass(CreateCounterpartyWalletAddressRequest, null, [{
|
|
50
|
-
key: "initialize",
|
|
51
|
-
value: function initialize(obj, counterparty_id, address, chain_id) {
|
|
52
|
-
obj['counterparty_id'] = counterparty_id;
|
|
53
|
-
obj['address'] = address;
|
|
54
|
-
obj['chain_id'] = chain_id;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Constructs a <code>CreateCounterpartyWalletAddressRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @param {module:model/CreateCounterpartyWalletAddressRequest} obj Optional instance to populate.
|
|
62
|
-
* @return {module:model/CreateCounterpartyWalletAddressRequest} The populated <code>CreateCounterpartyWalletAddressRequest</code> instance.
|
|
63
|
-
*/
|
|
64
|
-
}, {
|
|
65
|
-
key: "constructFromObject",
|
|
66
|
-
value: function constructFromObject(data, obj) {
|
|
67
|
-
if (data) {
|
|
68
|
-
obj = obj || new CreateCounterpartyWalletAddressRequest();
|
|
69
|
-
if (data.hasOwnProperty('counterparty_id')) {
|
|
70
|
-
obj['counterparty_id'] = _ApiClient["default"].convertToType(data['counterparty_id'], 'String');
|
|
71
|
-
}
|
|
72
|
-
if (data.hasOwnProperty('address')) {
|
|
73
|
-
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
74
|
-
}
|
|
75
|
-
if (data.hasOwnProperty('chain_id')) {
|
|
76
|
-
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return obj;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Validates the JSON data with respect to <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
84
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateCounterpartyWalletAddressRequest</code>.
|
|
86
|
-
*/
|
|
87
|
-
}, {
|
|
88
|
-
key: "validateJSON",
|
|
89
|
-
value: function validateJSON(data) {
|
|
90
|
-
// check to make sure all required properties are present in the JSON string
|
|
91
|
-
var _iterator = _createForOfIteratorHelper(CreateCounterpartyWalletAddressRequest.RequiredProperties),
|
|
92
|
-
_step;
|
|
93
|
-
try {
|
|
94
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
95
|
-
var property = _step.value;
|
|
96
|
-
if (!data.hasOwnProperty(property)) {
|
|
97
|
-
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// ensure the json data is a string
|
|
101
|
-
} catch (err) {
|
|
102
|
-
_iterator.e(err);
|
|
103
|
-
} finally {
|
|
104
|
-
_iterator.f();
|
|
105
|
-
}
|
|
106
|
-
if (data['counterparty_id'] && !(typeof data['counterparty_id'] === 'string' || data['counterparty_id'] instanceof String)) {
|
|
107
|
-
throw new Error("Expected the field `counterparty_id` to be a primitive type in the JSON string but got " + data['counterparty_id']);
|
|
108
|
-
}
|
|
109
|
-
// ensure the json data is a string
|
|
110
|
-
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
111
|
-
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
112
|
-
}
|
|
113
|
-
// ensure the json data is a string
|
|
114
|
-
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
115
|
-
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
116
|
-
}
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
}]);
|
|
120
|
-
}();
|
|
121
|
-
CreateCounterpartyWalletAddressRequest.RequiredProperties = ["counterparty_id", "address", "chain_id"];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The counterparty ID.
|
|
125
|
-
* @member {String} counterparty_id
|
|
126
|
-
*/
|
|
127
|
-
CreateCounterpartyWalletAddressRequest.prototype['counterparty_id'] = undefined;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* The wallet address.
|
|
131
|
-
* @member {String} address
|
|
132
|
-
*/
|
|
133
|
-
CreateCounterpartyWalletAddressRequest.prototype['address'] = undefined;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* The chain ID of the cryptocurrency.
|
|
137
|
-
* @member {String} chain_id
|
|
138
|
-
*/
|
|
139
|
-
CreateCounterpartyWalletAddressRequest.prototype['chain_id'] = undefined;
|
|
140
|
-
var _default = exports["default"] = CreateCounterpartyWalletAddressRequest;
|