@cobo/cobo-waas2 1.2.0 → 1.3.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 +41 -9
- package/dist/ApiClient.js +2 -2
- package/dist/PreRequestScript.js +640 -0
- package/dist/api/DevelopersWebhooksApi.js +1 -1
- package/dist/api/OAuthApi.js +5 -5
- package/dist/api/StakingsApi.js +538 -0
- package/dist/api/TransactionsApi.js +111 -9
- package/dist/api/WalletsApi.js +1 -60
- package/dist/api/WalletsExchangeWalletApi.js +5 -5
- package/dist/api/WalletsMPCWalletsApi.js +1 -1
- package/dist/index.js +154 -0
- package/dist/model/Activity.js +21 -12
- package/dist/model/ActivityAction.js +1 -1
- package/dist/model/ActivityInitiator.js +8 -8
- package/dist/model/ActivityStatus.js +1 -1
- package/dist/model/ActivityTimeline.js +4 -2
- package/dist/model/ActivityType.js +1 -16
- package/dist/model/AddressEncoding.js +1 -1
- package/dist/model/AddressInfo.js +40 -1
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationAccountOutput.js +3 -3
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +2 -2
- package/dist/model/AmountDetailsInner.js +1 -14
- package/dist/model/AmountStatus.js +1 -1
- package/dist/model/AssetBalance.js +1 -1
- package/dist/model/AssetInfo.js +1 -1
- package/dist/model/BabylonStakeExtra.js +10 -10
- package/dist/model/BabylonStakingExtra.js +175 -0
- package/dist/model/BabylonValidator.js +35 -15
- package/dist/model/BaseContractCallSource.js +2 -2
- package/dist/model/BaseEstimateStakingFee.js +1 -1
- package/dist/model/BaseStakeExtra.js +2 -2
- package/dist/model/BaseStakeSource.js +137 -0
- package/dist/model/BookkeepingRecord.js +243 -0
- package/dist/model/BookkeepingSummary.js +150 -0
- package/dist/model/BroadcastSignedTransactions201ResponseInner.js +125 -0
- package/dist/model/BroadcastSignedTransactionsRequest.js +87 -0
- package/dist/model/ChainInfo.js +10 -1
- package/dist/model/CheckAddressValidity200Response.js +1 -1
- package/dist/model/CheckAddressesValidity200ResponseInner.js +1 -1
- package/dist/model/CheckLoopTransfers200ResponseInner.js +2 -2
- package/dist/model/CoboSafeDelegate.js +28 -3
- package/dist/model/CoboSafeDelegateType.js +1 -1
- package/dist/model/ContractCallDestination.js +25 -4
- package/dist/model/ContractCallDestinationType.js +1 -1
- package/dist/model/ContractCallParams.js +1 -1
- package/dist/model/ContractCallSource.js +42 -5
- package/dist/model/ContractCallSourceType.js +1 -1
- package/dist/model/CreateAddressRequest.js +1 -1
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +1 -1
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateKeyShareHolderGroupRequest.js +1 -1
- package/dist/model/CreateMpcProjectRequest.js +1 -1
- package/dist/model/CreateMpcVaultRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +1 -1
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +24 -3
- package/dist/model/CreateStakeActivity.js +5 -5
- package/dist/model/CreateStakeActivity201Response.js +123 -0
- package/dist/model/CreateStakeActivityExtra.js +37 -60
- package/dist/model/CreateStakeActivityRequest.js +246 -0
- package/dist/model/CreateTransferTransaction201Response.js +1 -1
- package/dist/model/CreateTssRequestRequest.js +1 -1
- package/dist/model/CreateUnstakeActivity.js +4 -4
- package/dist/model/CreateUnstakeActivityRequest.js +200 -0
- package/dist/model/CreateWalletParams.js +52 -7
- package/dist/model/CreateWebhookEndpointRequest.js +1 -1
- package/dist/model/CreateWithdrawActivity.js +5 -5
- package/dist/model/CreateWithdrawActivityRequest.js +220 -0
- package/dist/model/CreatedWalletInfo.js +52 -7
- package/dist/model/CurveType.js +1 -1
- package/dist/model/CustodialTransferSource.js +2 -2
- package/dist/model/CustodialWalletInfo.js +1 -1
- package/dist/model/DeleteKeyShareHolderGroupById201Response.js +1 -1
- package/dist/model/DeleteWalletById201Response.js +1 -1
- package/dist/model/EigenLayerLstStakeExtra.js +2 -2
- package/dist/model/EigenLayerNativeStakeExtra.js +1 -1
- package/dist/model/EigenlayerValidator.js +1 -1
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +38 -5
- package/dist/model/EstimateFeeRequestType.js +1 -1
- package/dist/model/EstimateStakeFee.js +7 -7
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimateUnstakeFee.js +6 -6
- package/dist/model/EstimateWithdrawFee.js +8 -8
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +1 -1
- package/dist/model/EstimatedFee.js +66 -9
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/EstimatedUtxoFeeSlow.js +1 -1
- package/dist/model/EvmContractCallDestination.js +9 -5
- package/dist/model/EvmEIP191MessageSignDestination.js +2 -2
- package/dist/model/EvmEIP712MessageSignDestination.js +2 -2
- package/dist/model/EvmEip1559FeeBasePrice.js +1 -1
- package/dist/model/EvmEip1559FeeRate.js +1 -1
- package/dist/model/EvmLegacyFeeBasePrice.js +1 -1
- package/dist/model/EvmLegacyFeeRate.js +1 -1
- package/dist/model/ExchangeId.js +1 -1
- package/dist/model/ExchangeTransferDestination.js +4 -4
- package/dist/model/ExchangeTransferSource.js +2 -2
- package/dist/model/ExchangeWalletInfo.js +1 -1
- package/dist/model/ExtendedTokenInfo.js +37 -1
- package/dist/model/FeeAmount.js +1 -1
- package/dist/model/FeeGasLimit.js +1 -1
- package/dist/model/FeeRate.js +66 -9
- package/dist/model/FeeType.js +1 -1
- package/dist/model/FixedFeeRate.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +109 -0
- package/dist/model/GetStakingEstimationFeeRequest.js +256 -0
- package/dist/model/GetToken200Response.js +1 -1
- package/dist/model/GetToken4XXResponse.js +1 -1
- package/dist/model/KeyShareHolder.js +1 -1
- package/dist/model/KeyShareHolderGroup.js +1 -1
- package/dist/model/KeyShareHolderGroupStatus.js +1 -1
- package/dist/model/KeyShareHolderGroupType.js +1 -1
- package/dist/model/KeyShareHolderStatus.js +1 -1
- package/dist/model/KeyShareHolderType.js +1 -1
- package/dist/model/ListAddresses200Response.js +1 -1
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +1 -1
- package/dist/model/ListExchanges200ResponseInner.js +1 -1
- package/dist/model/ListKeyShareHolderGroups200Response.js +1 -1
- package/dist/model/ListMpcProjects200Response.js +1 -1
- package/dist/model/ListMpcVaults200Response.js +1 -1
- package/dist/model/ListStakingActivities200Response.js +123 -0
- package/dist/model/ListStakingPools200Response.js +123 -0
- package/dist/model/ListStakings200Response.js +123 -0
- package/dist/model/ListSupportedAssetsForExchange200Response.js +1 -1
- package/dist/model/ListSupportedChains200Response.js +1 -1
- package/dist/model/ListSupportedTokens200Response.js +1 -1
- package/dist/model/ListTokenBalancesForAddress200Response.js +1 -1
- package/dist/model/ListTransactions200Response.js +1 -1
- package/dist/model/ListTssRequests200Response.js +1 -1
- package/dist/model/ListUtxos200Response.js +1 -1
- package/dist/model/ListWallets200Response.js +1 -1
- package/dist/model/ListWebhookEndpoints200Response.js +1 -1
- package/dist/model/ListWebhookEventDefinitions200ResponseInner.js +1 -1
- package/dist/model/ListWebhookEventLogs200Response.js +1 -1
- package/dist/model/ListWebhookEvents200Response.js +1 -1
- package/dist/model/LockUtxos201Response.js +1 -1
- package/dist/model/LockUtxosRequest.js +1 -1
- package/dist/model/LockUtxosRequestUtxosInner.js +1 -1
- package/dist/model/MPCDelegate.js +1 -1
- package/dist/model/MPCProject.js +1 -1
- package/dist/model/MPCVault.js +1 -1
- package/dist/model/MPCVaultType.js +1 -1
- package/dist/model/MPCWalletInfo.js +1 -1
- package/dist/model/MaxFeeAmount.js +1 -1
- package/dist/model/MaxTransferableValue.js +1 -1
- package/dist/model/MessageSignDestination.js +38 -5
- package/dist/model/MessageSignDestinationType.js +1 -1
- package/dist/model/MessageSignParams.js +1 -1
- package/dist/model/MessageSignSource.js +28 -3
- package/dist/model/MessageSignSourceType.js +1 -1
- package/dist/model/MpcContractCallSource.js +1 -1
- package/dist/model/MpcMessageSignSource.js +1 -1
- package/dist/model/MpcSigningGroup.js +1 -1
- package/dist/model/MpcStakeSource.js +156 -0
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Pagination.js +1 -1
- package/dist/model/PoolDetails.js +27 -27
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +45 -40
- package/dist/model/PoolSummary.js +14 -14
- package/dist/model/RawMessageSignDestination.js +122 -0
- package/dist/model/RefreshToken200Response.js +1 -1
- package/dist/model/RefreshTokenRequest.js +1 -1
- package/dist/model/ReplaceType.js +1 -1
- package/dist/model/RetryWebhookEventById201Response.js +1 -1
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SafeContractCallSource.js +2 -2
- package/dist/model/SafeTransferSource.js +2 -2
- package/dist/model/SafeWallet.js +1 -1
- package/dist/model/SmartContractInitiator.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +24 -3
- package/dist/model/SmartContractWalletOperationType.js +1 -1
- package/dist/model/SmartContractWalletType.js +1 -1
- package/dist/model/SourceGroup.js +1 -1
- package/dist/model/StakeSourceType.js +56 -0
- package/dist/model/StakingPoolType.js +1 -11
- package/dist/model/StakingSource.js +39 -46
- package/dist/model/Stakings.js +35 -63
- package/dist/model/StakingsExtra.js +182 -0
- package/dist/model/StakingsValidatorInfo.js +7 -2
- package/dist/model/SubWalletAssetBalance.js +1 -1
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSRequest.js +1 -1
- package/dist/model/TSSRequestStatus.js +1 -1
- package/dist/model/TSSRequestType.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +1 -1
- package/dist/model/TokenBalance.js +1 -1
- package/dist/model/TokenBalanceBalance.js +1 -1
- package/dist/model/TokenInfo.js +27 -1
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionApprover.js +1 -1
- package/dist/model/TransactionBlockInfo.js +1 -1
- package/dist/model/TransactionCustodialAssetWalletSource.js +2 -2
- package/dist/model/TransactionDepositFromAddressSource.js +2 -2
- package/dist/model/TransactionDepositFromLoopSource.js +2 -2
- package/dist/model/TransactionDepositFromWalletSource.js +2 -2
- package/dist/model/TransactionDepositToAddressDestination.js +4 -4
- package/dist/model/TransactionDepositToWalletDestination.js +4 -4
- package/dist/model/TransactionDestination.js +110 -17
- package/dist/model/TransactionDestinationType.js +1 -1
- package/dist/model/TransactionDetail.js +1 -1
- package/dist/model/TransactionDetails.js +1 -1
- package/dist/model/TransactionEvmContractDestination.js +9 -5
- package/dist/model/TransactionEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionEvmLegacyFee.js +2 -2
- package/dist/model/TransactionExchangeWalletSource.js +2 -2
- package/dist/model/TransactionFee.js +66 -9
- package/dist/model/TransactionFeeStationWalletSource.js +1 -1
- package/dist/model/TransactionFixedFee.js +2 -2
- package/dist/model/TransactionInitiatorType.js +1 -1
- package/dist/model/TransactionMPCWalletSource.js +2 -2
- package/dist/model/TransactionMessageSignEIP191Destination.js +2 -2
- package/dist/model/TransactionMessageSignEIP712Destination.js +2 -2
- package/dist/model/TransactionRawTxInfo.js +1 -1
- package/dist/model/TransactionRbf.js +1 -1
- package/dist/model/TransactionRbfSource.js +28 -3
- package/dist/model/TransactionReplacement.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +2 -2
- package/dist/model/TransactionRequestFee.js +66 -9
- package/dist/model/TransactionRequestFixedFee.js +2 -2
- package/dist/model/TransactionRequestUtxoFee.js +2 -2
- package/dist/model/TransactionResend.js +1 -1
- package/dist/model/TransactionResult.js +24 -3
- package/dist/model/TransactionResultType.js +1 -1
- package/dist/model/TransactionSignatureResult.js +1 -1
- package/dist/model/TransactionSigner.js +1 -1
- package/dist/model/TransactionSmartContractSafeWalletSource.js +2 -2
- package/dist/model/TransactionSource.js +116 -15
- package/dist/model/TransactionSourceType.js +1 -1
- package/dist/model/TransactionStatus.js +1 -1
- package/dist/model/TransactionSubStatus.js +1 -1
- package/dist/model/TransactionTimeline.js +1 -1
- package/dist/model/TransactionTokeApproval.js +37 -1
- package/dist/model/TransactionTokenAmount.js +1 -1
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +4 -4
- package/dist/model/TransactionType.js +11 -1
- package/dist/model/TransactionUtxo.js +1 -1
- package/dist/model/TransactionUtxoFee.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +1 -1
- package/dist/model/TransferDestination.js +39 -6
- package/dist/model/TransferDestinationType.js +1 -1
- package/dist/model/TransferParams.js +1 -1
- package/dist/model/TransferSource.js +74 -9
- package/dist/model/UTXO.js +1 -1
- package/dist/model/UpdateCustodialWalletParams.js +1 -1
- package/dist/model/UpdateExchangeWalletParams.js +1 -1
- package/dist/model/UpdateGroupAction.js +1 -1
- package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +1 -1
- package/dist/model/UpdateMpcProjectByIdRequest.js +1 -1
- package/dist/model/UpdateMpcVaultByIdRequest.js +1 -1
- package/dist/model/UpdateMpcWalletParams.js +1 -1
- package/dist/model/UpdateSmartContractWalletParams.js +1 -1
- package/dist/model/UpdateWalletParams.js +66 -9
- package/dist/model/UpdateWebhookEndpointByIdRequest.js +1 -1
- package/dist/model/UtxoFeeBasePrice.js +1 -1
- package/dist/model/UtxoFeeRate.js +1 -1
- package/dist/model/WalletBalanceSnapshot.js +120 -0
- package/dist/model/WalletBalanceSnapshotRecord.js +163 -0
- package/dist/model/WalletInfo.js +66 -9
- package/dist/model/WalletSubtype.js +1 -1
- package/dist/model/WalletType.js +1 -1
- package/dist/model/WebhookEndpoint.js +1 -1
- package/dist/model/WebhookEndpointStatus.js +1 -1
- package/dist/model/WebhookEvent.js +1 -1
- package/dist/model/WebhookEventData.js +38 -5
- package/dist/model/WebhookEventDataType.js +1 -1
- package/dist/model/WebhookEventLog.js +1 -1
- package/dist/model/WebhookEventStatus.js +1 -1
- package/dist/model/WebhookEventType.js +1 -1
- package/docs/Activity.md +9 -8
- package/docs/ActivityInitiator.md +1 -1
- package/docs/ActivityTimeline.md +3 -3
- package/docs/ActivityType.md +0 -6
- package/docs/AddressInfo.md +3 -0
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AmountDetailsInner.md +0 -1
- package/docs/BabylonStakeExtra.md +3 -3
- package/docs/BabylonStakingExtra.md +14 -0
- package/docs/BabylonValidator.md +6 -5
- package/docs/BaseStakeSource.md +11 -0
- package/docs/BookkeepingRecord.md +19 -0
- package/docs/BookkeepingSummary.md +12 -0
- package/docs/BroadcastSignedTransactions201ResponseInner.md +10 -0
- package/docs/BroadcastSignedTransactionsRequest.md +9 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +2 -2
- package/docs/CreateStakeActivity201Response.md +10 -0
- package/docs/CreateStakeActivityExtra.md +3 -5
- package/docs/CreateStakeActivityRequest.md +15 -0
- package/docs/CreateUnstakeActivity.md +2 -2
- package/docs/CreateUnstakeActivityRequest.md +13 -0
- package/docs/CreateWithdrawActivity.md +3 -3
- package/docs/CreateWithdrawActivityRequest.md +14 -0
- package/docs/EigenLayerLstStakeExtra.md +1 -1
- package/docs/EstimateStakeFee.md +2 -2
- package/docs/EstimateUnstakeFee.md +2 -2
- package/docs/EstimateWithdrawFee.md +3 -3
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeTransferDestination.md +1 -1
- package/docs/ExtendedTokenInfo.md +2 -0
- package/docs/GetStakingEstimationFee201Response.md +11 -0
- package/docs/GetStakingEstimationFeeRequest.md +17 -0
- package/docs/ListStakingActivities200Response.md +10 -0
- package/docs/ListStakingPools200Response.md +10 -0
- package/docs/ListStakings200Response.md +10 -0
- package/docs/MpcStakeSource.md +11 -0
- package/docs/OAuthApi.md +2 -2
- package/docs/PoolDetails.md +13 -13
- package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -6
- package/docs/PoolSummary.md +6 -6
- package/docs/RawMessageSignDestination.md +10 -0
- package/docs/StakeSourceType.md +10 -0
- package/docs/StakingPoolType.md +0 -4
- package/docs/StakingSource.md +1 -3
- package/docs/Stakings.md +10 -13
- package/docs/StakingsApi.md +570 -0
- package/docs/StakingsExtra.md +14 -0
- package/docs/StakingsValidatorInfo.md +5 -5
- package/docs/TokenInfo.md +2 -0
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +1 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionTokeApproval.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionType.md +4 -0
- package/docs/TransactionsApi.md +110 -2
- package/docs/TransferDestination.md +1 -1
- package/docs/WalletBalanceSnapshot.md +10 -0
- package/docs/WalletBalanceSnapshotRecord.md +13 -0
- package/docs/WalletsApi.md +0 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/package.json +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**address** | **String** | The destination address. | [optional]
|
|
8
|
-
**amount** | **String** | The transfer amount. For example, if you trade 1.5
|
|
8
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`. | [optional]
|
|
9
9
|
**script** | **String** | The script of the output. It is a programmable code fragment that defines the conditions under which the UTXO can be spent. | [optional]
|
|
10
10
|
|
|
11
11
|
|
|
@@ -8,6 +8,6 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
9
|
**trading_account_type** | **String** | The trading account type. | [optional]
|
|
10
10
|
**exchange_id** | [**ExchangeId**](ExchangeId.md) | | [optional]
|
|
11
|
-
**amount** | **String** | The transfer amount. For example, if you trade 1.5
|
|
11
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`. |
|
|
12
12
|
|
|
13
13
|
|
package/docs/TransactionType.md
CHANGED
package/docs/TransactionsApi.md
CHANGED
|
@@ -4,7 +4,9 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**broadcastSignedTransactions**](TransactionsApi.md#broadcastSignedTransactions) | **POST** /transactions/broadcast | Broadcast signed transactions
|
|
7
8
|
[**cancelTransactionById**](TransactionsApi.md#cancelTransactionById) | **POST** /transactions/{transaction_id}/cancel | Cancel transaction
|
|
9
|
+
[**checkLoopTransfers**](TransactionsApi.md#checkLoopTransfers) | **GET** /transactions/check_loop_transfers | Check Loop transfers
|
|
8
10
|
[**createContractCallTransaction**](TransactionsApi.md#createContractCallTransaction) | **POST** /transactions/contract_call | Call smart contract
|
|
9
11
|
[**createMessageSignTransaction**](TransactionsApi.md#createMessageSignTransaction) | **POST** /transactions/message_sign | Sign message
|
|
10
12
|
[**createTransferTransaction**](TransactionsApi.md#createTransferTransaction) | **POST** /transactions/transfer | Transfer token
|
|
@@ -17,6 +19,58 @@ Method | HTTP request | Description
|
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
|
|
22
|
+
## broadcastSignedTransactions
|
|
23
|
+
|
|
24
|
+
> [BroadcastSignedTransactions201ResponseInner] broadcastSignedTransactions(opts)
|
|
25
|
+
|
|
26
|
+
Broadcast signed transactions
|
|
27
|
+
|
|
28
|
+
<Note>This operation is only applicable to the staking scenarios.</Note> This operation broadcasts a list of signed transactions. If you set `auto_broadcast` to `false` when [creating a staking activity](/v2/api-references/staking/create-stake-activity), the transaction will not be submitted to the blockchain automatically after being signed. In such cases, you can call this operation to broadcast the transaction to the blockchain. A transaction can only be broadcast if its status is `Broadcasting`.
|
|
29
|
+
|
|
30
|
+
### Example
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
34
|
+
// Initialize the API client
|
|
35
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
36
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
37
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
38
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
39
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
40
|
+
// Call the API
|
|
41
|
+
const apiInstance = new CoboWaas2.TransactionsApi();
|
|
42
|
+
const opts = {
|
|
43
|
+
'BroadcastSignedTransactionsRequest': new CoboWaas2.BroadcastSignedTransactionsRequest()
|
|
44
|
+
};
|
|
45
|
+
apiInstance.broadcastSignedTransactions(opts).then((data) => {
|
|
46
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
47
|
+
}, (error) => {
|
|
48
|
+
console.error(error);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Name | Type | Description | Notes
|
|
57
|
+
------------- | ------------- | ------------- | -------------
|
|
58
|
+
**BroadcastSignedTransactionsRequest** | [**BroadcastSignedTransactionsRequest**](BroadcastSignedTransactionsRequest.md)| The request body to broadcast a list of signed transactions. | [optional]
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
[**[BroadcastSignedTransactions201ResponseInner]**](BroadcastSignedTransactions201ResponseInner.md)
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: application/json
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
73
|
+
|
|
20
74
|
## cancelTransactionById
|
|
21
75
|
|
|
22
76
|
> CreateTransferTransaction201Response cancelTransactionById(transaction_id)
|
|
@@ -67,6 +121,60 @@ Name | Type | Description | Notes
|
|
|
67
121
|
- **Accept**: application/json
|
|
68
122
|
|
|
69
123
|
|
|
124
|
+
## checkLoopTransfers
|
|
125
|
+
|
|
126
|
+
> [CheckLoopTransfers200ResponseInner] checkLoopTransfers(token_id, source_wallet_id, destination_addresses)
|
|
127
|
+
|
|
128
|
+
Check Loop transfers
|
|
129
|
+
|
|
130
|
+
This operation verifies if the transactions from a given source wallet to a list of given destinations can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
|
|
131
|
+
|
|
132
|
+
### Example
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
136
|
+
// Initialize the API client
|
|
137
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
138
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
139
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
140
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
141
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
142
|
+
// Call the API
|
|
143
|
+
const apiInstance = new CoboWaas2.TransactionsApi();
|
|
144
|
+
const token_id = "ETH_USDT";
|
|
145
|
+
const source_wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
146
|
+
const destination_addresses = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97";
|
|
147
|
+
apiInstance.checkLoopTransfers(token_id, source_wallet_id, destination_addresses).then((data) => {
|
|
148
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
149
|
+
}, (error) => {
|
|
150
|
+
console.error(error);
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Parameters
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Name | Type | Description | Notes
|
|
159
|
+
------------- | ------------- | ------------- | -------------
|
|
160
|
+
**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](/v2/api-references/wallets/list-enabled-tokens). |
|
|
161
|
+
**source_wallet_id** | **String**| The wallet ID of the transaction source. |
|
|
162
|
+
**destination_addresses** | **String**| A list of destination addresses, separated by comma. |
|
|
163
|
+
|
|
164
|
+
### Return type
|
|
165
|
+
|
|
166
|
+
[**[CheckLoopTransfers200ResponseInner]**](CheckLoopTransfers200ResponseInner.md)
|
|
167
|
+
|
|
168
|
+
### Authorization
|
|
169
|
+
|
|
170
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
171
|
+
|
|
172
|
+
### HTTP request headers
|
|
173
|
+
|
|
174
|
+
- **Content-Type**: Not defined
|
|
175
|
+
- **Accept**: application/json
|
|
176
|
+
|
|
177
|
+
|
|
70
178
|
## createContractCallTransaction
|
|
71
179
|
|
|
72
180
|
> CreateTransferTransaction201Response createContractCallTransaction(opts)
|
|
@@ -229,7 +337,7 @@ Name | Type | Description | Notes
|
|
|
229
337
|
|
|
230
338
|
Drop transaction
|
|
231
339
|
|
|
232
|
-
This operation drops a specified transaction. Dropping a transaction will trigger
|
|
340
|
+
This operation drops a specified transaction. Dropping a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It has a higher transaction fee to incentivize miners to prioritize its confirmation over the original one. A transaction can be dropped if its status is `Broadcasting`. <ul> <li>For EVM chains, this RBF transaction has a transfer amount of `0` and the sending address is the same as the receiving address.</li> <li>For UTXO chains, this RBF transaction has a transfer amount of `0` and the destination address is the same as the change address in the original transaction.</li> </ul> A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you drop a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
|
|
233
341
|
|
|
234
342
|
### Example
|
|
235
343
|
|
|
@@ -523,7 +631,7 @@ Name | Type | Description | Notes
|
|
|
523
631
|
|
|
524
632
|
Speed up transaction
|
|
525
633
|
|
|
526
|
-
This operation accelerates a specified transaction. Speeding up a transaction will trigger
|
|
634
|
+
This operation accelerates a specified transaction. Speeding up a transaction will trigger a Replace-By-Fee (RBF) transaction which is a new version of the original transaction. It shares the same inputs but has a higher transaction fee to incentivize miners to prioritize its confirmation over the previous one. A transaction can be accelerated if its status is `Broadcasting`. A transaction request for tracking is returned upon successful operation. <Note>This operation only applies to transactions from MPC Wallets and Smart Contract Wallets. It does not apply to transactions on the following chains: VET, TRON, TVET, SOL, and TON.</Note> <Info>If you speed up a transaction from a Smart Contract Wallet, two RBF transactions will be triggered, one for the transaction from the Smart Contract Wallet, and the other for the transaction from the Delegate.</Info>
|
|
527
635
|
|
|
528
636
|
### Example
|
|
529
637
|
|
|
@@ -12,6 +12,6 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**force_external** | **Boolean** | Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note> | [optional]
|
|
13
13
|
**wallet_id** | **String** | The wallet ID. |
|
|
14
14
|
**trading_account_type** | **String** | The trading account type. |
|
|
15
|
-
**amount** | **String** | The transfer amount. For example, if you trade 1.5
|
|
15
|
+
**amount** | **String** | The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`. |
|
|
16
16
|
|
|
17
17
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# CoboWaas2.WalletBalanceSnapshot
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**snapshot_id** | **Number** | The snapshot ID. |
|
|
8
|
+
**snapshot_name** | **String** | The snapshot name. | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# CoboWaas2.WalletBalanceSnapshotRecord
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**wallet_id** | **String** | The wallet ID. |
|
|
8
|
+
**wallet_type** | [**WalletType**](WalletType.md) | | [optional]
|
|
9
|
+
**wallet_name** | **String** | The wallet name. | [optional]
|
|
10
|
+
**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](/v2/api-references/wallets/list-enabled-tokens). |
|
|
11
|
+
**balance** | **String** | The balance of the token. |
|
|
12
|
+
|
|
13
|
+
|
package/docs/WalletsApi.md
CHANGED
|
@@ -6,7 +6,6 @@ Method | HTTP request | Description
|
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
7
|
[**checkAddressValidity**](WalletsApi.md#checkAddressValidity) | **GET** /wallets/check_address_validity | Check address validity
|
|
8
8
|
[**checkAddressesValidity**](WalletsApi.md#checkAddressesValidity) | **GET** /wallets/check_addresses_validity | Check addresses validity
|
|
9
|
-
[**checkLoopTransfers**](WalletsApi.md#checkLoopTransfers) | **GET** /wallets/check_loop_transfers | Check Loop transfers
|
|
10
9
|
[**createAddress**](WalletsApi.md#createAddress) | **POST** /wallets/{wallet_id}/addresses | Create addresses in wallet
|
|
11
10
|
[**createWallet**](WalletsApi.md#createWallet) | **POST** /wallets | Create wallet
|
|
12
11
|
[**deleteWalletById**](WalletsApi.md#deleteWalletById) | **POST** /wallets/{wallet_id}/delete | Delete wallet
|
|
@@ -134,60 +133,6 @@ Name | Type | Description | Notes
|
|
|
134
133
|
- **Accept**: application/json
|
|
135
134
|
|
|
136
135
|
|
|
137
|
-
## checkLoopTransfers
|
|
138
|
-
|
|
139
|
-
> [CheckLoopTransfers200ResponseInner] checkLoopTransfers(token_id, source_wallet_id, destination_addresses)
|
|
140
|
-
|
|
141
|
-
Check Loop transfers
|
|
142
|
-
|
|
143
|
-
This operation verifies if the transactions from a given source wallet to a list of destination addresses can be executed as Loop transfers. For more information about Loop, see [Loop's website](https://loop.top/).
|
|
144
|
-
|
|
145
|
-
### Example
|
|
146
|
-
|
|
147
|
-
```javascript
|
|
148
|
-
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
149
|
-
// Initialize the API client
|
|
150
|
-
const apiClient = CoboWaas2.ApiClient.instance
|
|
151
|
-
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
152
|
-
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
153
|
-
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
154
|
-
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
155
|
-
// Call the API
|
|
156
|
-
const apiInstance = new CoboWaas2.WalletsApi();
|
|
157
|
-
const token_id = "ETH_USDT";
|
|
158
|
-
const source_wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
159
|
-
const destination_addresses = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045,0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97";
|
|
160
|
-
apiInstance.checkLoopTransfers(token_id, source_wallet_id, destination_addresses).then((data) => {
|
|
161
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
162
|
-
}, (error) => {
|
|
163
|
-
console.error(error);
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Parameters
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Name | Type | Description | Notes
|
|
172
|
-
------------- | ------------- | ------------- | -------------
|
|
173
|
-
**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](/v2/api-references/wallets/list-enabled-tokens). |
|
|
174
|
-
**source_wallet_id** | **String**| The source wallet ID. |
|
|
175
|
-
**destination_addresses** | **String**| A list of destination wallet addresses, separated by comma. |
|
|
176
|
-
|
|
177
|
-
### Return type
|
|
178
|
-
|
|
179
|
-
[**[CheckLoopTransfers200ResponseInner]**](CheckLoopTransfers200ResponseInner.md)
|
|
180
|
-
|
|
181
|
-
### Authorization
|
|
182
|
-
|
|
183
|
-
[CoboAuth](../README.md#CoboAuth)
|
|
184
|
-
|
|
185
|
-
### HTTP request headers
|
|
186
|
-
|
|
187
|
-
- **Content-Type**: Not defined
|
|
188
|
-
- **Accept**: application/json
|
|
189
|
-
|
|
190
|
-
|
|
191
136
|
## createAddress
|
|
192
137
|
|
|
193
138
|
> [AddressInfo] createAddress(wallet_id, opts)
|
|
@@ -158,7 +158,7 @@ apiInstance.listSupportedAssetsForExchange(exchange_id, opts).then((data) => {
|
|
|
158
158
|
|
|
159
159
|
Name | Type | Description | Notes
|
|
160
160
|
------------- | ------------- | ------------- | -------------
|
|
161
|
-
**exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget&#
|
|
161
|
+
**exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget`: Bitget |
|
|
162
162
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
163
163
|
**before** | **String**| An object ID that serves as a starting point for retrieving data in reverse chronological order. For example, if you specify `before` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`, the request will retrieve a list of data objects that end before the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1`. You can set this parameter to the value of `pagination.before` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. - If you set `before` to `infinity`, the last page of data is returned. | [optional]
|
|
164
164
|
**after** | **String**| An object ID that acts as a starting point for retrieving data in chronological order. For example, if you specify `after` as `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`, the request will retrieve a list of data objects that start after the object with the object ID `RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk`. You can set this parameter to the value of `pagination.after` in the response of the previous request. - If you set both `after` and `before`, an error will occur. - If you leave both `before` and `after` empty, the first page of data is returned. | [optional]
|
|
@@ -212,7 +212,7 @@ apiInstance.listSupportedChainsForExchange(exchange_id, asset_id).then((data) =>
|
|
|
212
212
|
|
|
213
213
|
Name | Type | Description | Notes
|
|
214
214
|
------------- | ------------- | ------------- | -------------
|
|
215
|
-
**exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget&#
|
|
215
|
+
**exchange_id** | [**ExchangeId**](.md)| The ID of the exchange. Possible values include: - `binance`: Binance. - `okx`: OKX. - `deribit`: Deribit. - `bybit`: Bybit. - `gate`: Gate.io - `bitget`: Bitget |
|
|
216
216
|
**asset_id** | **String**| (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account. You can get the ID of the assets supported by an exchanges by calling [List supported assets](/v2/api-references/wallets--exchange-wallet/list-supported-assets). |
|
|
217
217
|
|
|
218
218
|
### Return type
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobo/cobo-waas2",
|
|
3
|
-
"version": "1.
|
|
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
|
|
3
|
+
"version": "1.3.0",
|
|
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",
|
|
7
7
|
"scripts": {
|