@cobo/cobo-waas2 1.2.1 → 1.4.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 +44 -11
- package/dist/ApiClient.js +2 -2
- package/dist/PreRequestScript.js +3 -3
- package/dist/api/DevelopersWebhooksApi.js +1 -1
- package/dist/api/OAuthApi.js +15 -15
- package/dist/api/StakingsApi.js +538 -0
- package/dist/api/TransactionsApi.js +113 -11
- package/dist/api/WalletsApi.js +3 -62
- package/dist/api/WalletsExchangeWalletApi.js +5 -5
- package/dist/api/WalletsMPCWalletsApi.js +3 -3
- package/dist/index.js +161 -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/AddressBook.js +202 -0
- package/dist/model/AddressEncoding.js +1 -1
- package/dist/model/AddressInfo.js +40 -1
- package/dist/model/AddressTransferDestination.js +4 -4
- 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 +1 -1
- package/dist/model/CoboSafeDelegateType.js +1 -1
- package/dist/model/ContractCallDestination.js +3 -3
- package/dist/model/ContractCallDestinationType.js +1 -1
- package/dist/model/ContractCallParams.js +1 -1
- package/dist/model/ContractCallSource.js +1 -7
- 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 +3 -3
- 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 +1 -1
- package/dist/model/CreateStakeActivity.js +5 -5
- package/dist/model/CreateStakeActivity201Response.js +123 -0
- package/dist/model/CreateStakeActivityExtra.js +14 -82
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +5 -5
- package/dist/model/GetToken4XXResponse.js +1 -1
- package/dist/model/KeyShareHolder.js +2 -2
- 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 +3 -3
- package/dist/model/MessageSignDestinationType.js +1 -1
- package/dist/model/MessageSignParams.js +2 -2
- package/dist/model/MessageSignSource.js +1 -1
- package/dist/model/MessageSignSourceType.js +1 -1
- package/dist/model/MpcContractCallSource.js +1 -10
- 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 +35 -46
- package/dist/model/PoolSummary.js +14 -14
- package/dist/model/RawMessageSignDestination.js +122 -0
- package/dist/model/RefreshToken200Response.js +5 -5
- package/dist/model/RefreshTokenRequest.js +3 -3
- 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 +1 -1
- 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 +24 -68
- 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 +6 -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 +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/model/TransactionResultType.js +1 -1
- package/dist/model/TransactionSignatureResult.js +2 -2
- package/dist/model/TransactionSigner.js +1 -1
- package/dist/model/TransactionSmartContractSafeWalletSource.js +2 -2
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionSourceType.js +1 -1
- package/dist/model/TransactionStatus.js +1 -6
- package/dist/model/TransactionSubStatus.js +41 -6
- 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 +4 -4
- package/dist/model/TransferDestinationType.js +1 -1
- package/dist/model/TransferParams.js +1 -1
- package/dist/model/TransferSource.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/AddressBook.md +16 -0
- package/docs/AddressInfo.md +3 -0
- package/docs/AddressTransferDestination.md +2 -2
- 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/ContractCallSource.md +0 -1
- package/docs/CreateKeyShareHolder.md +2 -2
- 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/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -1
- package/docs/ListStakingActivities200Response.md +10 -0
- package/docs/ListStakingPools200Response.md +10 -0
- package/docs/ListStakings200Response.md +10 -0
- package/docs/MessageSignParams.md +1 -1
- package/docs/MpcContractCallSource.md +0 -1
- package/docs/MpcStakeSource.md +11 -0
- package/docs/OAuthApi.md +9 -9
- 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/RefreshToken200Response.md +4 -4
- package/docs/RefreshTokenRequest.md +2 -2
- 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/TSSRequestStatus.md +2 -0
- 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/TransactionStatus.md +0 -2
- package/docs/TransactionSubStatus.md +16 -2
- 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 +111 -3
- package/docs/TransferDestination.md +3 -3
- package/docs/WalletBalanceSnapshot.md +10 -0
- package/docs/WalletBalanceSnapshotRecord.md +13 -0
- package/docs/WalletsApi.md +1 -56
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/package.json +2 -2
package/docs/StakingPoolType.md
CHANGED
package/docs/StakingSource.md
CHANGED
|
@@ -4,10 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**source_type** | [**
|
|
7
|
+
**source_type** | [**StakeSourceType**](StakeSourceType.md) | |
|
|
8
8
|
**wallet_id** | **String** | The wallet ID. |
|
|
9
9
|
**address** | **String** | The wallet address. |
|
|
10
|
-
**nonce** | **Number** | The transaction nonce. | [optional]
|
|
11
|
-
**delegate** | [**CoboSafeDelegate**](CoboSafeDelegate.md) | |
|
|
12
10
|
|
|
13
11
|
|
package/docs/Stakings.md
CHANGED
|
@@ -4,19 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**id** | **String** | The
|
|
8
|
-
**wallet_id** | **String** | The
|
|
9
|
-
**address** | **String** | The staker wallet address. |
|
|
10
|
-
**amounts** | [**[AmountDetailsInner]**](AmountDetailsInner.md) | The staking amount
|
|
11
|
-
**
|
|
12
|
-
**
|
|
13
|
-
**
|
|
14
|
-
**
|
|
15
|
-
**
|
|
16
|
-
**pos_chain** | **String** | The pos chain of the stake. | [optional]
|
|
17
|
-
**rewards_info** | **Object** | The rewards info of the stake. | [optional]
|
|
18
|
-
**created_timestamp** | **Number** | The time when the stake was created. |
|
|
19
|
-
**updated_timestamp** | **Number** | The time when the stake was last updated. |
|
|
7
|
+
**id** | **String** | The ID of the staking position. |
|
|
8
|
+
**wallet_id** | **String** | The staker's wallet ID. |
|
|
9
|
+
**address** | **String** | The staker's wallet address. |
|
|
10
|
+
**amounts** | [**[AmountDetailsInner]**](AmountDetailsInner.md) | The details about the staking amount. |
|
|
11
|
+
**pool_id** | **String** | The ID of the staking pool. |
|
|
12
|
+
**token_id** | **String** | The token ID. |
|
|
13
|
+
**rewards_info** | **Object** | The information about the staking rewards. | [optional]
|
|
14
|
+
**created_timestamp** | **Number** | The time when the staking position was created. |
|
|
15
|
+
**updated_timestamp** | **Number** | The time when the staking position was last updated. |
|
|
20
16
|
**validator_info** | [**StakingsValidatorInfo**](StakingsValidatorInfo.md) | |
|
|
17
|
+
**extra** | [**StakingsExtra**](StakingsExtra.md) | | [optional]
|
|
21
18
|
|
|
22
19
|
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
# CoboWaas2.StakingsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**createStakeActivity**](StakingsApi.md#createStakeActivity) | **POST** /stakings/activities/stake | Create stake activity
|
|
8
|
+
[**createUnstakeActivity**](StakingsApi.md#createUnstakeActivity) | **POST** /stakings/activities/unstake | Create unstake activity
|
|
9
|
+
[**createWithdrawActivity**](StakingsApi.md#createWithdrawActivity) | **POST** /stakings/activities/withdraw | Create withdraw activity
|
|
10
|
+
[**getStakingActivityById**](StakingsApi.md#getStakingActivityById) | **GET** /stakings/activities/{activity_id} | Get staking activity details
|
|
11
|
+
[**getStakingById**](StakingsApi.md#getStakingById) | **GET** /stakings/{staking_id} | Get staking position details
|
|
12
|
+
[**getStakingEstimationFee**](StakingsApi.md#getStakingEstimationFee) | **POST** /stakings/estimate_fee | Estimate staking fees
|
|
13
|
+
[**getStakingPoolById**](StakingsApi.md#getStakingPoolById) | **GET** /stakings/pools/{pool_id} | Get staking pool details
|
|
14
|
+
[**listStakingActivities**](StakingsApi.md#listStakingActivities) | **GET** /stakings/activities | List staking activities
|
|
15
|
+
[**listStakingPools**](StakingsApi.md#listStakingPools) | **GET** /stakings/pools | List staking pools
|
|
16
|
+
[**listStakings**](StakingsApi.md#listStakings) | **GET** /stakings | List staking positions
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## createStakeActivity
|
|
21
|
+
|
|
22
|
+
> CreateStakeActivity201Response createStakeActivity(opts)
|
|
23
|
+
|
|
24
|
+
Create stake activity
|
|
25
|
+
|
|
26
|
+
This operation creates a staking request. For some protocols, you can use the `fee` property in the request body to specify the maximum fee you are willing to pay. The transaction will fail if the actual fee exceeds the specified maximum fee. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
32
|
+
// Initialize the API client
|
|
33
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
34
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
35
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
36
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
37
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
38
|
+
// Call the API
|
|
39
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
40
|
+
const opts = {
|
|
41
|
+
'CreateStakeActivityRequest': new CoboWaas2.CreateStakeActivityRequest()
|
|
42
|
+
};
|
|
43
|
+
apiInstance.createStakeActivity(opts).then((data) => {
|
|
44
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
45
|
+
}, (error) => {
|
|
46
|
+
console.error(error);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Name | Type | Description | Notes
|
|
55
|
+
------------- | ------------- | ------------- | -------------
|
|
56
|
+
**CreateStakeActivityRequest** | [**CreateStakeActivityRequest**](CreateStakeActivityRequest.md)| The request body to create a staking request. | [optional]
|
|
57
|
+
|
|
58
|
+
### Return type
|
|
59
|
+
|
|
60
|
+
[**CreateStakeActivity201Response**](CreateStakeActivity201Response.md)
|
|
61
|
+
|
|
62
|
+
### Authorization
|
|
63
|
+
|
|
64
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
65
|
+
|
|
66
|
+
### HTTP request headers
|
|
67
|
+
|
|
68
|
+
- **Content-Type**: application/json
|
|
69
|
+
- **Accept**: application/json
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## createUnstakeActivity
|
|
73
|
+
|
|
74
|
+
> CreateStakeActivity201Response createUnstakeActivity(opts)
|
|
75
|
+
|
|
76
|
+
Create unstake activity
|
|
77
|
+
|
|
78
|
+
This operation creates an unstaking request. Your staked tokens will be automatically unlocked once the specified locking period ends. If you want to withdraw your tokens beforehand, you can unstake them with this operation. For some protocols, you can use the `fee` property in the request body to specify the maximum fee you are willing to pay. The transaction will fail if the actual fee exceeds the specified maximum fee. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
79
|
+
|
|
80
|
+
### Example
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
84
|
+
// Initialize the API client
|
|
85
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
86
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
87
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
88
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
89
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
90
|
+
// Call the API
|
|
91
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
92
|
+
const opts = {
|
|
93
|
+
'CreateUnstakeActivityRequest': new CoboWaas2.CreateUnstakeActivityRequest()
|
|
94
|
+
};
|
|
95
|
+
apiInstance.createUnstakeActivity(opts).then((data) => {
|
|
96
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
97
|
+
}, (error) => {
|
|
98
|
+
console.error(error);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Parameters
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
Name | Type | Description | Notes
|
|
107
|
+
------------- | ------------- | ------------- | -------------
|
|
108
|
+
**CreateUnstakeActivityRequest** | [**CreateUnstakeActivityRequest**](CreateUnstakeActivityRequest.md)| The request body to create a unstaking request. | [optional]
|
|
109
|
+
|
|
110
|
+
### Return type
|
|
111
|
+
|
|
112
|
+
[**CreateStakeActivity201Response**](CreateStakeActivity201Response.md)
|
|
113
|
+
|
|
114
|
+
### Authorization
|
|
115
|
+
|
|
116
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
117
|
+
|
|
118
|
+
### HTTP request headers
|
|
119
|
+
|
|
120
|
+
- **Content-Type**: application/json
|
|
121
|
+
- **Accept**: application/json
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## createWithdrawActivity
|
|
125
|
+
|
|
126
|
+
> CreateStakeActivity201Response createWithdrawActivity(opts)
|
|
127
|
+
|
|
128
|
+
Create withdraw activity
|
|
129
|
+
|
|
130
|
+
This operation creates a withdrawal request. For some protocols, you can use the `fee` property in the request body to specify the maximum fee you are willing to pay. The transaction will fail if the actual fee exceeds the specified maximum fee. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
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.StakingsApi();
|
|
144
|
+
const opts = {
|
|
145
|
+
'CreateWithdrawActivityRequest': new CoboWaas2.CreateWithdrawActivityRequest()
|
|
146
|
+
};
|
|
147
|
+
apiInstance.createWithdrawActivity(opts).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
|
+
**CreateWithdrawActivityRequest** | [**CreateWithdrawActivityRequest**](CreateWithdrawActivityRequest.md)| The request body to create a withdraw activity. | [optional]
|
|
161
|
+
|
|
162
|
+
### Return type
|
|
163
|
+
|
|
164
|
+
[**CreateStakeActivity201Response**](CreateStakeActivity201Response.md)
|
|
165
|
+
|
|
166
|
+
### Authorization
|
|
167
|
+
|
|
168
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
169
|
+
|
|
170
|
+
### HTTP request headers
|
|
171
|
+
|
|
172
|
+
- **Content-Type**: application/json
|
|
173
|
+
- **Accept**: application/json
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## getStakingActivityById
|
|
177
|
+
|
|
178
|
+
> Activity getStakingActivityById(activity_id)
|
|
179
|
+
|
|
180
|
+
Get staking activity details
|
|
181
|
+
|
|
182
|
+
This operation retrieves the details of a specified staking activity.
|
|
183
|
+
|
|
184
|
+
### Example
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
188
|
+
// Initialize the API client
|
|
189
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
190
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
191
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
192
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
193
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
194
|
+
// Call the API
|
|
195
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
196
|
+
const activity_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
197
|
+
apiInstance.getStakingActivityById(activity_id).then((data) => {
|
|
198
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
199
|
+
}, (error) => {
|
|
200
|
+
console.error(error);
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Parameters
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
Name | Type | Description | Notes
|
|
209
|
+
------------- | ------------- | ------------- | -------------
|
|
210
|
+
**activity_id** | **String**| The activity ID. |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
[**Activity**](Activity.md)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: application/json
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## getStakingById
|
|
227
|
+
|
|
228
|
+
> Stakings getStakingById(staking_id)
|
|
229
|
+
|
|
230
|
+
Get staking position details
|
|
231
|
+
|
|
232
|
+
This operation retrieves the detailed information about a specified staking position.
|
|
233
|
+
|
|
234
|
+
### Example
|
|
235
|
+
|
|
236
|
+
```javascript
|
|
237
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
238
|
+
// Initialize the API client
|
|
239
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
240
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
241
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
242
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
243
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
244
|
+
// Call the API
|
|
245
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
246
|
+
const staking_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
247
|
+
apiInstance.getStakingById(staking_id).then((data) => {
|
|
248
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
249
|
+
}, (error) => {
|
|
250
|
+
console.error(error);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Parameters
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
Name | Type | Description | Notes
|
|
259
|
+
------------- | ------------- | ------------- | -------------
|
|
260
|
+
**staking_id** | **String**| The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-all-stakings). |
|
|
261
|
+
|
|
262
|
+
### Return type
|
|
263
|
+
|
|
264
|
+
[**Stakings**](Stakings.md)
|
|
265
|
+
|
|
266
|
+
### Authorization
|
|
267
|
+
|
|
268
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
269
|
+
|
|
270
|
+
### HTTP request headers
|
|
271
|
+
|
|
272
|
+
- **Content-Type**: Not defined
|
|
273
|
+
- **Accept**: application/json
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
## getStakingEstimationFee
|
|
277
|
+
|
|
278
|
+
> GetStakingEstimationFee201Response getStakingEstimationFee(opts)
|
|
279
|
+
|
|
280
|
+
Estimate staking fees
|
|
281
|
+
|
|
282
|
+
This operation calculates the fee required for a staking activity based on factors such as network congestion and transaction complexity. For some protocols, you can use the `fee.fee_rate` property in the request body to specify the fee rate you are willing to pay. The `fee.max_fee_amount` property in the request body will be ignored. <Note>For the Babylon protocol, you can only select UTXO as the fee model.</Note>
|
|
283
|
+
|
|
284
|
+
### Example
|
|
285
|
+
|
|
286
|
+
```javascript
|
|
287
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
288
|
+
// Initialize the API client
|
|
289
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
290
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
291
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
292
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
293
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
294
|
+
// Call the API
|
|
295
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
296
|
+
const opts = {
|
|
297
|
+
'GetStakingEstimationFeeRequest': new CoboWaas2.GetStakingEstimationFeeRequest()
|
|
298
|
+
};
|
|
299
|
+
apiInstance.getStakingEstimationFee(opts).then((data) => {
|
|
300
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
301
|
+
}, (error) => {
|
|
302
|
+
console.error(error);
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Parameters
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
Name | Type | Description | Notes
|
|
311
|
+
------------- | ------------- | ------------- | -------------
|
|
312
|
+
**GetStakingEstimationFeeRequest** | [**GetStakingEstimationFeeRequest**](GetStakingEstimationFeeRequest.md)| The request body to get the estimated fee of a staking activity. | [optional]
|
|
313
|
+
|
|
314
|
+
### Return type
|
|
315
|
+
|
|
316
|
+
[**GetStakingEstimationFee201Response**](GetStakingEstimationFee201Response.md)
|
|
317
|
+
|
|
318
|
+
### Authorization
|
|
319
|
+
|
|
320
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
321
|
+
|
|
322
|
+
### HTTP request headers
|
|
323
|
+
|
|
324
|
+
- **Content-Type**: application/json
|
|
325
|
+
- **Accept**: application/json
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
## getStakingPoolById
|
|
329
|
+
|
|
330
|
+
> PoolDetails getStakingPoolById(pool_id)
|
|
331
|
+
|
|
332
|
+
Get staking pool details
|
|
333
|
+
|
|
334
|
+
This operation retrieves the detailed information about a specified staking pool.
|
|
335
|
+
|
|
336
|
+
### Example
|
|
337
|
+
|
|
338
|
+
```javascript
|
|
339
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
340
|
+
// Initialize the API client
|
|
341
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
342
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
343
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
344
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
345
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
346
|
+
// Call the API
|
|
347
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
348
|
+
const pool_id = "babylon_btc";
|
|
349
|
+
apiInstance.getStakingPoolById(pool_id).then((data) => {
|
|
350
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
351
|
+
}, (error) => {
|
|
352
|
+
console.error(error);
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Parameters
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
Name | Type | Description | Notes
|
|
361
|
+
------------- | ------------- | ------------- | -------------
|
|
362
|
+
**pool_id** | **String**| The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token. You can call [List staking pools](/v2/api-references/stakings/list-staking-pools) to retrieve a list of staking pools. |
|
|
363
|
+
|
|
364
|
+
### Return type
|
|
365
|
+
|
|
366
|
+
[**PoolDetails**](PoolDetails.md)
|
|
367
|
+
|
|
368
|
+
### Authorization
|
|
369
|
+
|
|
370
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
371
|
+
|
|
372
|
+
### HTTP request headers
|
|
373
|
+
|
|
374
|
+
- **Content-Type**: Not defined
|
|
375
|
+
- **Accept**: application/json
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
## listStakingActivities
|
|
379
|
+
|
|
380
|
+
> ListStakingActivities200Response listStakingActivities(opts)
|
|
381
|
+
|
|
382
|
+
List staking activities
|
|
383
|
+
|
|
384
|
+
This operation retrieves a list of staking activities.
|
|
385
|
+
|
|
386
|
+
### Example
|
|
387
|
+
|
|
388
|
+
```javascript
|
|
389
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
390
|
+
// Initialize the API client
|
|
391
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
392
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
393
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
394
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
395
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
396
|
+
// Call the API
|
|
397
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
398
|
+
const opts = {
|
|
399
|
+
'pool_id': "babylon_btc",
|
|
400
|
+
'staking_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
401
|
+
'activity_type': new CoboWaas2.ActivityType(),
|
|
402
|
+
'activity_status': new CoboWaas2.ActivityStatus(),
|
|
403
|
+
'min_modified_timestamp': 1635744000000,
|
|
404
|
+
'max_modified_timestamp': 1635744000000,
|
|
405
|
+
'initiator': "steve@example.com",
|
|
406
|
+
'limit': 10,
|
|
407
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
408
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
409
|
+
};
|
|
410
|
+
apiInstance.listStakingActivities(opts).then((data) => {
|
|
411
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
412
|
+
}, (error) => {
|
|
413
|
+
console.error(error);
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Parameters
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
Name | Type | Description | Notes
|
|
422
|
+
------------- | ------------- | ------------- | -------------
|
|
423
|
+
**pool_id** | **String**| The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token. You can call [List staking pools](/v2/api-references/stakings/list-staking-pools) to retrieve a list of staking pools. | [optional]
|
|
424
|
+
**staking_id** | **String**| The position ID. | [optional]
|
|
425
|
+
**activity_type** | [**ActivityType**](.md)| | [optional]
|
|
426
|
+
**activity_status** | [**ActivityStatus**](.md)| | [optional]
|
|
427
|
+
**min_modified_timestamp** | **Number**| The start time of the query. All staking activities updated after the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
428
|
+
**max_modified_timestamp** | **Number**| The end time of the query. All staking activities updated before the specified time will be retrieved. The time is in Unix timestamp format, measured in milliseconds. | [optional]
|
|
429
|
+
**initiator** | **String**| The activity initiator, which is your API key by default. You can also specify the initiator when creating the activity. | [optional]
|
|
430
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
431
|
+
**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]
|
|
432
|
+
**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]
|
|
433
|
+
|
|
434
|
+
### Return type
|
|
435
|
+
|
|
436
|
+
[**ListStakingActivities200Response**](ListStakingActivities200Response.md)
|
|
437
|
+
|
|
438
|
+
### Authorization
|
|
439
|
+
|
|
440
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
441
|
+
|
|
442
|
+
### HTTP request headers
|
|
443
|
+
|
|
444
|
+
- **Content-Type**: Not defined
|
|
445
|
+
- **Accept**: application/json
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
## listStakingPools
|
|
449
|
+
|
|
450
|
+
> ListStakingPools200Response listStakingPools(opts)
|
|
451
|
+
|
|
452
|
+
List staking pools
|
|
453
|
+
|
|
454
|
+
This operation retrieves a list of staking pools currently supported.
|
|
455
|
+
|
|
456
|
+
### Example
|
|
457
|
+
|
|
458
|
+
```javascript
|
|
459
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
460
|
+
// Initialize the API client
|
|
461
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
462
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
463
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
464
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
465
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
466
|
+
// Call the API
|
|
467
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
468
|
+
const opts = {
|
|
469
|
+
'chain_id': "ETH",
|
|
470
|
+
'token_id': "ETH_USDT",
|
|
471
|
+
'limit': 10,
|
|
472
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
473
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
474
|
+
};
|
|
475
|
+
apiInstance.listStakingPools(opts).then((data) => {
|
|
476
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
477
|
+
}, (error) => {
|
|
478
|
+
console.error(error);
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### Parameters
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
Name | Type | Description | Notes
|
|
487
|
+
------------- | ------------- | ------------- | -------------
|
|
488
|
+
**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](/v2/api-references/wallets/list-enabled-chains). | [optional]
|
|
489
|
+
**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). | [optional]
|
|
490
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
491
|
+
**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]
|
|
492
|
+
**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]
|
|
493
|
+
|
|
494
|
+
### Return type
|
|
495
|
+
|
|
496
|
+
[**ListStakingPools200Response**](ListStakingPools200Response.md)
|
|
497
|
+
|
|
498
|
+
### Authorization
|
|
499
|
+
|
|
500
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
501
|
+
|
|
502
|
+
### HTTP request headers
|
|
503
|
+
|
|
504
|
+
- **Content-Type**: Not defined
|
|
505
|
+
- **Accept**: application/json
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
## listStakings
|
|
509
|
+
|
|
510
|
+
> ListStakings200Response listStakings(opts)
|
|
511
|
+
|
|
512
|
+
List staking positions
|
|
513
|
+
|
|
514
|
+
This operation retrieves a list of staking positions.
|
|
515
|
+
|
|
516
|
+
### Example
|
|
517
|
+
|
|
518
|
+
```javascript
|
|
519
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
520
|
+
// Initialize the API client
|
|
521
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
522
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
523
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
524
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
525
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
526
|
+
// Call the API
|
|
527
|
+
const apiInstance = new CoboWaas2.StakingsApi();
|
|
528
|
+
const opts = {
|
|
529
|
+
'pool_id': "babylon_btc",
|
|
530
|
+
'statuses': "Active,StakeInProgress,",
|
|
531
|
+
'wallet_id': "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
532
|
+
'token_id': "ETH_USDT",
|
|
533
|
+
'limit': 10,
|
|
534
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
535
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
536
|
+
};
|
|
537
|
+
apiInstance.listStakings(opts).then((data) => {
|
|
538
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
539
|
+
}, (error) => {
|
|
540
|
+
console.error(error);
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Parameters
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
Name | Type | Description | Notes
|
|
549
|
+
------------- | ------------- | ------------- | -------------
|
|
550
|
+
**pool_id** | **String**| The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token. You can call [List staking pools](/v2/api-references/stakings/list-staking-pools) to retrieve a list of staking pools. | [optional]
|
|
551
|
+
**statuses** | **String**| The statuses of the staking amounts, separated by comma. Possible values include: - `StakeInProgress`: The staking request is submitted and is waiting to be confirmed by the staking protocol. - `Active`: The amount has been staked. - `Rejected`: The staking request has been rejected because the signer refuses to sign the transaction. - `LimitExceeded`: The total staking cap of the staking protocol has been reached. - `Invalid`: The staking request is invalid. This is often due to the failure to broadcast the transaction. - `UnstakeInProgress`: The unstaking request is submitted and is waiting to be confirmed by the staking protocol. - `Withdrawable`: The tokens have been unstaked and are ready to be withdrawn. - `WithdrawInProgress`: The withdrawal request is submitted and is waiting to be confirmed on the chain network. - `Closed`: The staking position is closed. | [optional]
|
|
552
|
+
**wallet_id** | **String**| The wallet ID. | [optional]
|
|
553
|
+
**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). | [optional]
|
|
554
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
555
|
+
**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]
|
|
556
|
+
**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]
|
|
557
|
+
|
|
558
|
+
### Return type
|
|
559
|
+
|
|
560
|
+
[**ListStakings200Response**](ListStakings200Response.md)
|
|
561
|
+
|
|
562
|
+
### Authorization
|
|
563
|
+
|
|
564
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
565
|
+
|
|
566
|
+
### HTTP request headers
|
|
567
|
+
|
|
568
|
+
- **Content-Type**: Not defined
|
|
569
|
+
- **Accept**: application/json
|
|
570
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CoboWaas2.StakingsExtra
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**pool_type** | [**StakingPoolType**](StakingPoolType.md) | |
|
|
8
|
+
**pos_chain** | **String** | The Proof-of-Stake (PoS) chain. |
|
|
9
|
+
**unlock_timestamp** | **Number** | The estimated time when the bitcoins will be unlocked, in Unix timestamp format, measured in milliseconds. | [optional]
|
|
10
|
+
**unlock_block_height** | **Number** | The block height at which the bitcoins will be unlocked. | [optional]
|
|
11
|
+
**stake_address** | **String** | The address receiving the staked bitcoins. | [optional]
|
|
12
|
+
**unbond_address** | **String** | The address receiving the unlocked bitcoins. | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**icon_url** | **String** |
|
|
8
|
-
**public_key** | **String** |
|
|
9
|
-
**name** | **String** |
|
|
10
|
-
**address** | **String** |
|
|
11
|
-
**commission_rate** | **String** |
|
|
7
|
+
**icon_url** | **String** | The URL of the validator's icon. | [optional]
|
|
8
|
+
**public_key** | **String** | The validator's public key. | [optional]
|
|
9
|
+
**name** | **String** | The validator's name. | [optional]
|
|
10
|
+
**address** | **String** | The wallet address of the validator. | [optional]
|
|
11
|
+
**commission_rate** | **String** | The commission rate of the validator. | [optional]
|
|
12
12
|
|
|
13
13
|
|
package/docs/TSSRequestStatus.md
CHANGED
package/docs/TokenInfo.md
CHANGED
|
@@ -15,5 +15,7 @@ Name | Type | Description | Notes
|
|
|
15
15
|
**fee_token_id** | **String** | The fee token ID. A fee token is the token with which you pay transaction fees. | [optional]
|
|
16
16
|
**can_deposit** | **Boolean** | Whether deposits are enabled for this token. | [optional]
|
|
17
17
|
**can_withdraw** | **Boolean** | Whether withdrawals are enabled for this token. | [optional]
|
|
18
|
+
**dust_threshold** | **String** | The minimum withdrawal amount for Custodial Wallets. If your withdrawal amount is smaller than this threshold, the withdrawal request will receive an error. Note: [Loop transfers](https://loop.top/) do not have this limitation. | [optional]
|
|
19
|
+
**custodial_minimum_deposit_threshold** | **String** | The minimum deposit amount for Custodial Wallets. If the amount you deposit to a Custodial Wallet is smaller than this threshold, the deposit will not show up on Cobo Portal or trigger any webhook events. Note: [Loop transfers](https://loop.top/) do not have this limitation. | [optional]
|
|
18
20
|
|
|
19
21
|
|