@cobo/cobo-waas2 1.1.1
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 +414 -0
- package/dist/ApiClient.js +747 -0
- package/dist/Env.js +19 -0
- package/dist/api/DevelopersWebhooksApi.js +508 -0
- package/dist/api/OAuthApi.js +145 -0
- package/dist/api/TransactionsApi.js +542 -0
- package/dist/api/WalletsApi.js +1200 -0
- package/dist/api/WalletsMPCWalletsApi.js +955 -0
- package/dist/crypto/ApiSigner.js +52 -0
- package/dist/index.js +1742 -0
- package/dist/model/Activity.js +302 -0
- package/dist/model/ActivityAction.js +66 -0
- package/dist/model/ActivityInitiator.js +87 -0
- package/dist/model/ActivityStatus.js +66 -0
- package/dist/model/ActivityTimeline.js +140 -0
- package/dist/model/ActivityType.js +81 -0
- package/dist/model/AddressEncoding.js +86 -0
- package/dist/model/AddressInfo.js +174 -0
- package/dist/model/AddressTransferDestination.js +182 -0
- package/dist/model/AddressTransferDestinationAccountOutput.js +138 -0
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +136 -0
- package/dist/model/AmountDetailsInner.js +134 -0
- package/dist/model/AmountStatus.js +96 -0
- package/dist/model/AssetBalance.js +127 -0
- package/dist/model/AssetInfo.js +150 -0
- package/dist/model/BabylonStakeExtra.js +142 -0
- package/dist/model/BabylonValidator.js +199 -0
- package/dist/model/BaseContractCallSource.js +137 -0
- package/dist/model/BaseEstimateStakingFee.js +106 -0
- package/dist/model/BaseStakeExtra.js +107 -0
- package/dist/model/ChainInfo.js +172 -0
- package/dist/model/CheckAddressValidity200Response.js +106 -0
- package/dist/model/CoboSafeDelegate.js +143 -0
- package/dist/model/CoboSafeDelegateType.js +61 -0
- package/dist/model/ContractCallDestination.js +149 -0
- package/dist/model/ContractCallDestinationType.js +56 -0
- package/dist/model/ContractCallParams.js +198 -0
- package/dist/model/ContractCallSource.js +171 -0
- package/dist/model/ContractCallSourceType.js +66 -0
- package/dist/model/CreateAddressRequest.js +131 -0
- package/dist/model/CreateCustodialWalletParams.js +133 -0
- package/dist/model/CreateExchangeWalletParams.js +257 -0
- package/dist/model/CreateKeyShareHolder.js +119 -0
- package/dist/model/CreateKeyShareHolderGroupRequest.js +160 -0
- package/dist/model/CreateMpcProjectRequest.js +132 -0
- package/dist/model/CreateMpcVaultRequest.js +134 -0
- package/dist/model/CreateMpcWalletParams.js +166 -0
- package/dist/model/CreateSafeWalletParams.js +220 -0
- package/dist/model/CreateSmartContractWalletParams.js +185 -0
- package/dist/model/CreateStakeActivity.js +171 -0
- package/dist/model/CreateStakeActivityExtra.js +187 -0
- package/dist/model/CreateTransferTransaction201Response.js +136 -0
- package/dist/model/CreateTssRequestRequest.js +135 -0
- package/dist/model/CreateUnstakeActivity.js +137 -0
- package/dist/model/CreateWalletParams.js +229 -0
- package/dist/model/CreateWebhookEndpointRequest.js +139 -0
- package/dist/model/CreateWithdrawActivity.js +152 -0
- package/dist/model/CreatedWalletInfo.js +217 -0
- package/dist/model/CurveType.js +61 -0
- package/dist/model/CustodialTransferSource.js +122 -0
- package/dist/model/CustodialWalletInfo.js +163 -0
- package/dist/model/DeleteKeyShareHolderGroupById201Response.js +106 -0
- package/dist/model/DeleteWalletById201Response.js +106 -0
- package/dist/model/EigenLayerLstStakeExtra.js +129 -0
- package/dist/model/EigenLayerNativeStakeExtra.js +125 -0
- package/dist/model/EigenlayerValidator.js +159 -0
- package/dist/model/ErrorResponse.js +137 -0
- package/dist/model/EstimateContractCallFeeParams.js +178 -0
- package/dist/model/EstimateFeeParams.js +183 -0
- package/dist/model/EstimateFeeRequestType.js +61 -0
- package/dist/model/EstimateStakeFee.js +219 -0
- package/dist/model/EstimateTransferFeeParams.js +178 -0
- package/dist/model/EstimateUnstakeFee.js +177 -0
- package/dist/model/EstimateWithdrawFee.js +197 -0
- package/dist/model/EstimatedEvmEip1559Fee.js +164 -0
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +168 -0
- package/dist/model/EstimatedEvmLegacyFee.js +164 -0
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +148 -0
- package/dist/model/EstimatedFee.js +213 -0
- package/dist/model/EstimatedFixedFee.js +157 -0
- package/dist/model/EstimatedUtxoFee.js +164 -0
- package/dist/model/EstimatedUtxoFeeSlow.js +146 -0
- package/dist/model/EvmContractCallDestination.js +146 -0
- package/dist/model/EvmEIP191MessageSignDestination.js +122 -0
- package/dist/model/EvmEIP712MessageSignDestination.js +120 -0
- package/dist/model/EvmEip1559FeeBasePrice.js +101 -0
- package/dist/model/EvmEip1559FeeRate.js +164 -0
- package/dist/model/EvmLegacyFeeBasePrice.js +88 -0
- package/dist/model/EvmLegacyFeeRate.js +164 -0
- package/dist/model/ExchangeId.js +76 -0
- package/dist/model/ExchangeTransferDestination.js +152 -0
- package/dist/model/ExchangeTransferSource.js +137 -0
- package/dist/model/ExchangeWalletInfo.js +230 -0
- package/dist/model/ExtendedTokenInfo.js +294 -0
- package/dist/model/FeeAmount.js +88 -0
- package/dist/model/FeeGasLimit.js +88 -0
- package/dist/model/FeeRate.js +207 -0
- package/dist/model/FeeType.js +71 -0
- package/dist/model/FixedFeeRate.js +146 -0
- package/dist/model/GetToken200Response.js +135 -0
- package/dist/model/GetToken4XXResponse.js +124 -0
- package/dist/model/KeyShareHolder.js +137 -0
- package/dist/model/KeyShareHolderGroup.js +196 -0
- package/dist/model/KeyShareHolderGroupStatus.js +66 -0
- package/dist/model/KeyShareHolderGroupType.js +66 -0
- package/dist/model/KeyShareHolderStatus.js +71 -0
- package/dist/model/KeyShareHolderType.js +66 -0
- package/dist/model/ListAddresses200Response.js +121 -0
- package/dist/model/ListKeyShareHolderGroups200Response.js +121 -0
- package/dist/model/ListMpcProjects200Response.js +121 -0
- package/dist/model/ListMpcVaults200Response.js +121 -0
- package/dist/model/ListSupportedChains200Response.js +121 -0
- package/dist/model/ListSupportedTokens200Response.js +121 -0
- package/dist/model/ListTokenBalancesForAddress200Response.js +121 -0
- package/dist/model/ListTransactions200Response.js +121 -0
- package/dist/model/ListTssRequests200Response.js +121 -0
- package/dist/model/ListUtxos200Response.js +121 -0
- package/dist/model/ListWallets200Response.js +121 -0
- package/dist/model/ListWebhookEndpoints200Response.js +121 -0
- package/dist/model/ListWebhookEventDefinitions200ResponseInner.js +96 -0
- package/dist/model/ListWebhookEventLogs200Response.js +121 -0
- package/dist/model/ListWebhookEvents200Response.js +121 -0
- package/dist/model/LockUtxos201Response.js +83 -0
- package/dist/model/LockUtxosRequest.js +127 -0
- package/dist/model/LockUtxosRequestUtxosInner.js +136 -0
- package/dist/model/MPCDelegate.js +137 -0
- package/dist/model/MPCProject.js +141 -0
- package/dist/model/MPCVault.js +165 -0
- package/dist/model/MPCVaultType.js +61 -0
- package/dist/model/MPCWalletInfo.js +219 -0
- package/dist/model/MaxFeeAmount.js +88 -0
- package/dist/model/MaxTransferableValue.js +115 -0
- package/dist/model/MessageSignDestination.js +159 -0
- package/dist/model/MessageSignDestinationType.js +61 -0
- package/dist/model/MessageSignParams.js +184 -0
- package/dist/model/MessageSignSource.js +143 -0
- package/dist/model/MessageSignSourceType.js +61 -0
- package/dist/model/MpcContractCallSource.js +165 -0
- package/dist/model/MpcMessageSignSource.js +136 -0
- package/dist/model/MpcSigningGroup.js +101 -0
- package/dist/model/MpcTransferSource.js +194 -0
- package/dist/model/Pagination.js +137 -0
- package/dist/model/PoolDetails.js +363 -0
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +183 -0
- package/dist/model/PoolSummary.js +214 -0
- package/dist/model/RefreshTokenRequest.js +113 -0
- package/dist/model/ReplaceType.js +66 -0
- package/dist/model/RetryWebhookEventById201Response.js +83 -0
- package/dist/model/RootPubkey.js +97 -0
- package/dist/model/SafeContractCallSource.js +173 -0
- package/dist/model/SafeTransferSource.js +153 -0
- package/dist/model/SafeWallet.js +248 -0
- package/dist/model/SmartContractInitiator.js +126 -0
- package/dist/model/SmartContractWalletInfo.js +197 -0
- package/dist/model/SmartContractWalletOperationType.js +56 -0
- package/dist/model/SmartContractWalletType.js +56 -0
- package/dist/model/SourceGroup.js +124 -0
- package/dist/model/StakingPoolType.js +66 -0
- package/dist/model/StakingSource.js +171 -0
- package/dist/model/Stakings.js +295 -0
- package/dist/model/StakingsValidatorInfo.js +135 -0
- package/dist/model/SubWalletAssetBalance.js +140 -0
- package/dist/model/TSSGroups.js +110 -0
- package/dist/model/TSSRequest.js +133 -0
- package/dist/model/TSSRequestStatus.js +76 -0
- package/dist/model/TSSRequestType.js +66 -0
- package/dist/model/TokenBalance.js +127 -0
- package/dist/model/TokenBalanceBalance.js +154 -0
- package/dist/model/TokenInfo.js +231 -0
- package/dist/model/Transaction.js +443 -0
- package/dist/model/TransactionApprover.js +129 -0
- package/dist/model/TransactionBlockInfo.js +106 -0
- package/dist/model/TransactionCustodialAssetWalletSource.js +122 -0
- package/dist/model/TransactionDepositFromAddressSource.js +153 -0
- package/dist/model/TransactionDepositFromLoopSource.js +107 -0
- package/dist/model/TransactionDepositFromWalletSource.js +157 -0
- package/dist/model/TransactionDepositToAddressDestination.js +185 -0
- package/dist/model/TransactionDepositToWalletDestination.js +181 -0
- package/dist/model/TransactionDestination.js +329 -0
- package/dist/model/TransactionDestinationType.js +86 -0
- package/dist/model/TransactionDetail.js +607 -0
- package/dist/model/TransactionDetails.js +742 -0
- package/dist/model/TransactionEvmContractDestination.js +146 -0
- package/dist/model/TransactionEvmEip1559Fee.js +226 -0
- package/dist/model/TransactionEvmLegacyFee.js +195 -0
- package/dist/model/TransactionExchangeWalletSource.js +146 -0
- package/dist/model/TransactionFee.js +240 -0
- package/dist/model/TransactionFeeStationWalletSource.js +122 -0
- package/dist/model/TransactionFixedFee.js +157 -0
- package/dist/model/TransactionInitiatorType.js +71 -0
- package/dist/model/TransactionMPCWalletSource.js +194 -0
- package/dist/model/TransactionMessageSignEIP191Destination.js +122 -0
- package/dist/model/TransactionMessageSignEIP712Destination.js +120 -0
- package/dist/model/TransactionRawTxInfo.js +131 -0
- package/dist/model/TransactionRbf.js +167 -0
- package/dist/model/TransactionRbfSource.js +154 -0
- package/dist/model/TransactionReplacement.js +143 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +182 -0
- package/dist/model/TransactionRequestEvmLegacyFee.js +162 -0
- package/dist/model/TransactionRequestFee.js +222 -0
- package/dist/model/TransactionRequestFixedFee.js +146 -0
- package/dist/model/TransactionRequestUtxoFee.js +161 -0
- package/dist/model/TransactionResend.js +111 -0
- package/dist/model/TransactionResult.js +137 -0
- package/dist/model/TransactionResultType.js +56 -0
- package/dist/model/TransactionSignatureResult.js +120 -0
- package/dist/model/TransactionSigner.js +147 -0
- package/dist/model/TransactionSmartContractSafeWalletSource.js +153 -0
- package/dist/model/TransactionSource.js +286 -0
- package/dist/model/TransactionSourceType.js +96 -0
- package/dist/model/TransactionStatus.js +106 -0
- package/dist/model/TransactionSubStatus.js +166 -0
- package/dist/model/TransactionTimeline.js +102 -0
- package/dist/model/TransactionTokeApproval.js +313 -0
- package/dist/model/TransactionTokenAmount.js +139 -0
- package/dist/model/TransactionTransferToAddressDestination.js +182 -0
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +113 -0
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +113 -0
- package/dist/model/TransactionTransferToWalletDestination.js +159 -0
- package/dist/model/TransactionType.js +76 -0
- package/dist/model/TransactionUtxo.js +97 -0
- package/dist/model/TransactionUtxoFee.js +170 -0
- package/dist/model/TransactionWebhookEventData.js +620 -0
- package/dist/model/TransferDestination.js +195 -0
- package/dist/model/TransferDestinationType.js +61 -0
- package/dist/model/TransferParams.js +198 -0
- package/dist/model/TransferSource.js +214 -0
- package/dist/model/UTXO.js +163 -0
- package/dist/model/UpdateCustodialWalletParams.js +120 -0
- package/dist/model/UpdateExchangeWalletParams.js +120 -0
- package/dist/model/UpdateGroupAction.js +56 -0
- package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +106 -0
- package/dist/model/UpdateMpcProjectByIdRequest.js +110 -0
- package/dist/model/UpdateMpcVaultByIdRequest.js +110 -0
- package/dist/model/UpdateMpcWalletParams.js +120 -0
- package/dist/model/UpdateSmartContractWalletParams.js +120 -0
- package/dist/model/UpdateWalletParams.js +185 -0
- package/dist/model/UpdateWebhookEndpointByIdRequest.js +132 -0
- package/dist/model/UtxoFeeBasePrice.js +88 -0
- package/dist/model/UtxoFeeRate.js +164 -0
- package/dist/model/WalletInfo.js +235 -0
- package/dist/model/WalletSubtype.js +86 -0
- package/dist/model/WalletType.js +71 -0
- package/dist/model/WebhookEndpoint.js +175 -0
- package/dist/model/WebhookEndpointStatus.js +81 -0
- package/dist/model/WebhookEvent.js +189 -0
- package/dist/model/WebhookEventData.js +299 -0
- package/dist/model/WebhookEventDataType.js +129 -0
- package/dist/model/WebhookEventLog.js +204 -0
- package/dist/model/WebhookEventStatus.js +66 -0
- package/dist/model/WebhookEventType.js +71 -0
- package/docs/Activity.md +23 -0
- package/docs/ActivityAction.md +14 -0
- package/docs/ActivityInitiator.md +9 -0
- package/docs/ActivityStatus.md +14 -0
- package/docs/ActivityTimeline.md +12 -0
- package/docs/ActivityType.md +20 -0
- package/docs/AddressEncoding.md +22 -0
- package/docs/AddressInfo.md +14 -0
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressTransferDestinationAccountOutput.md +11 -0
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +11 -0
- package/docs/AmountDetailsInner.md +11 -0
- package/docs/AmountStatus.md +26 -0
- package/docs/AssetBalance.md +10 -0
- package/docs/AssetInfo.md +12 -0
- package/docs/BabylonStakeExtra.md +11 -0
- package/docs/BabylonValidator.md +27 -0
- package/docs/BaseContractCallSource.md +11 -0
- package/docs/BaseEstimateStakingFee.md +9 -0
- package/docs/BaseStakeExtra.md +9 -0
- package/docs/ChainInfo.md +14 -0
- package/docs/CheckAddressValidity200Response.md +9 -0
- package/docs/CoboSafeDelegate.md +11 -0
- package/docs/CoboSafeDelegateType.md +12 -0
- package/docs/ContractCallDestination.md +12 -0
- package/docs/ContractCallDestinationType.md +10 -0
- package/docs/ContractCallParams.md +15 -0
- package/docs/ContractCallSource.md +13 -0
- package/docs/ContractCallSourceType.md +14 -0
- package/docs/CreateAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +11 -0
- package/docs/CreateExchangeWalletParams.md +19 -0
- package/docs/CreateKeyShareHolder.md +12 -0
- package/docs/CreateKeyShareHolderGroupRequest.md +12 -0
- package/docs/CreateMpcProjectRequest.md +11 -0
- package/docs/CreateMpcVaultRequest.md +11 -0
- package/docs/CreateMpcWalletParams.md +12 -0
- package/docs/CreateSafeWalletParams.md +18 -0
- package/docs/CreateSmartContractWalletParams.md +18 -0
- package/docs/CreateStakeActivity.md +13 -0
- package/docs/CreateStakeActivityExtra.md +13 -0
- package/docs/CreateTransferTransaction201Response.md +11 -0
- package/docs/CreateTssRequestRequest.md +11 -0
- package/docs/CreateUnstakeActivity.md +11 -0
- package/docs/CreateWalletParams.md +20 -0
- package/docs/CreateWebhookEndpointRequest.md +11 -0
- package/docs/CreateWithdrawActivity.md +12 -0
- package/docs/CreatedWalletInfo.md +18 -0
- package/docs/CurveType.md +12 -0
- package/docs/CustodialTransferSource.md +10 -0
- package/docs/CustodialWalletInfo.md +13 -0
- package/docs/DeleteKeyShareHolderGroupById201Response.md +9 -0
- package/docs/DeleteWalletById201Response.md +9 -0
- package/docs/DevelopersWebhooksApi.md +496 -0
- package/docs/EigenLayerLstStakeExtra.md +10 -0
- package/docs/EigenLayerNativeStakeExtra.md +10 -0
- package/docs/EigenlayerValidator.md +13 -0
- package/docs/ErrorResponse.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +14 -0
- package/docs/EstimateFeeParams.md +15 -0
- package/docs/EstimateFeeRequestType.md +12 -0
- package/docs/EstimateStakeFee.md +14 -0
- package/docs/EstimateTransferFeeParams.md +14 -0
- package/docs/EstimateUnstakeFee.md +12 -0
- package/docs/EstimateWithdrawFee.md +13 -0
- package/docs/EstimatedEvmEip1559Fee.md +13 -0
- package/docs/EstimatedEvmEip1559FeeSlow.md +11 -0
- package/docs/EstimatedEvmLegacyFee.md +13 -0
- package/docs/EstimatedEvmLegacyFeeSlow.md +10 -0
- package/docs/EstimatedFee.md +15 -0
- package/docs/EstimatedFixedFee.md +12 -0
- package/docs/EstimatedUtxoFee.md +13 -0
- package/docs/EstimatedUtxoFeeSlow.md +10 -0
- package/docs/EvmContractCallDestination.md +12 -0
- package/docs/EvmEIP191MessageSignDestination.md +10 -0
- package/docs/EvmEIP712MessageSignDestination.md +10 -0
- package/docs/EvmEip1559FeeBasePrice.md +10 -0
- package/docs/EvmEip1559FeeRate.md +13 -0
- package/docs/EvmLegacyFeeBasePrice.md +9 -0
- package/docs/EvmLegacyFeeRate.md +13 -0
- package/docs/ExchangeId.md +18 -0
- package/docs/ExchangeTransferDestination.md +12 -0
- package/docs/ExchangeTransferSource.md +11 -0
- package/docs/ExchangeWalletInfo.md +16 -0
- package/docs/ExtendedTokenInfo.md +19 -0
- package/docs/FeeAmount.md +9 -0
- package/docs/FeeGasLimit.md +9 -0
- package/docs/FeeRate.md +14 -0
- package/docs/FeeType.md +16 -0
- package/docs/FixedFeeRate.md +11 -0
- package/docs/GetToken200Response.md +13 -0
- package/docs/GetToken4XXResponse.md +10 -0
- package/docs/KeyShareHolder.md +14 -0
- package/docs/KeyShareHolderGroup.md +16 -0
- package/docs/KeyShareHolderGroupStatus.md +14 -0
- package/docs/KeyShareHolderGroupType.md +14 -0
- package/docs/KeyShareHolderStatus.md +16 -0
- package/docs/KeyShareHolderType.md +14 -0
- package/docs/ListAddresses200Response.md +10 -0
- package/docs/ListKeyShareHolderGroups200Response.md +10 -0
- package/docs/ListMpcProjects200Response.md +10 -0
- package/docs/ListMpcVaults200Response.md +10 -0
- package/docs/ListSupportedChains200Response.md +10 -0
- package/docs/ListSupportedTokens200Response.md +10 -0
- package/docs/ListTokenBalancesForAddress200Response.md +10 -0
- package/docs/ListTransactions200Response.md +10 -0
- package/docs/ListTssRequests200Response.md +10 -0
- package/docs/ListUtxos200Response.md +10 -0
- package/docs/ListWallets200Response.md +10 -0
- package/docs/ListWebhookEndpoints200Response.md +10 -0
- package/docs/ListWebhookEventDefinitions200ResponseInner.md +10 -0
- package/docs/ListWebhookEventLogs200Response.md +10 -0
- package/docs/ListWebhookEvents200Response.md +10 -0
- package/docs/LockUtxos201Response.md +9 -0
- package/docs/LockUtxosRequest.md +9 -0
- package/docs/LockUtxosRequestUtxosInner.md +11 -0
- package/docs/MPCDelegate.md +11 -0
- package/docs/MPCProject.md +14 -0
- package/docs/MPCVault.md +14 -0
- package/docs/MPCVaultType.md +12 -0
- package/docs/MPCWalletInfo.md +15 -0
- package/docs/MaxFeeAmount.md +9 -0
- package/docs/MaxTransferableValue.md +11 -0
- package/docs/MessageSignDestination.md +11 -0
- package/docs/MessageSignDestinationType.md +12 -0
- package/docs/MessageSignParams.md +14 -0
- package/docs/MessageSignSource.md +11 -0
- package/docs/MessageSignSourceType.md +12 -0
- package/docs/MpcContractCallSource.md +12 -0
- package/docs/MpcMessageSignSource.md +11 -0
- package/docs/MpcSigningGroup.md +10 -0
- package/docs/MpcTransferSource.md +13 -0
- package/docs/OAuthApi.md +112 -0
- package/docs/Pagination.md +11 -0
- package/docs/PoolDetails.md +24 -0
- package/docs/PoolDetailsAllOfValidatorsInfo.md +28 -0
- package/docs/PoolSummary.md +16 -0
- package/docs/RefreshTokenRequest.md +11 -0
- package/docs/ReplaceType.md +14 -0
- package/docs/RetryWebhookEventById201Response.md +9 -0
- package/docs/RootPubkey.md +10 -0
- package/docs/SafeContractCallSource.md +12 -0
- package/docs/SafeTransferSource.md +12 -0
- package/docs/SafeWallet.md +20 -0
- package/docs/SmartContractInitiator.md +10 -0
- package/docs/SmartContractWalletInfo.md +20 -0
- package/docs/SmartContractWalletOperationType.md +10 -0
- package/docs/SmartContractWalletType.md +10 -0
- package/docs/SourceGroup.md +10 -0
- package/docs/StakingPoolType.md +14 -0
- package/docs/StakingSource.md +13 -0
- package/docs/Stakings.md +22 -0
- package/docs/StakingsValidatorInfo.md +13 -0
- package/docs/SubWalletAssetBalance.md +11 -0
- package/docs/TSSGroups.md +11 -0
- package/docs/TSSRequest.md +13 -0
- package/docs/TSSRequestStatus.md +18 -0
- package/docs/TSSRequestType.md +14 -0
- package/docs/TokenBalance.md +10 -0
- package/docs/TokenBalanceBalance.md +12 -0
- package/docs/TokenInfo.md +19 -0
- package/docs/Transaction.md +36 -0
- package/docs/TransactionApprover.md +25 -0
- package/docs/TransactionBlockInfo.md +11 -0
- package/docs/TransactionCustodialAssetWalletSource.md +10 -0
- package/docs/TransactionDepositFromAddressSource.md +13 -0
- package/docs/TransactionDepositFromLoopSource.md +9 -0
- package/docs/TransactionDepositFromWalletSource.md +13 -0
- package/docs/TransactionDepositToAddressDestination.md +15 -0
- package/docs/TransactionDepositToWalletDestination.md +15 -0
- package/docs/TransactionDestination.md +26 -0
- package/docs/TransactionDestinationType.md +22 -0
- package/docs/TransactionDetail.md +37 -0
- package/docs/TransactionDetails.md +45 -0
- package/docs/TransactionEvmContractDestination.md +12 -0
- package/docs/TransactionEvmEip1559Fee.md +16 -0
- package/docs/TransactionEvmLegacyFee.md +14 -0
- package/docs/TransactionExchangeWalletSource.md +12 -0
- package/docs/TransactionFee.md +19 -0
- package/docs/TransactionFeeStationWalletSource.md +10 -0
- package/docs/TransactionFixedFee.md +12 -0
- package/docs/TransactionInitiatorType.md +16 -0
- package/docs/TransactionMPCWalletSource.md +13 -0
- package/docs/TransactionMessageSignEIP191Destination.md +10 -0
- package/docs/TransactionMessageSignEIP712Destination.md +10 -0
- package/docs/TransactionRawTxInfo.md +11 -0
- package/docs/TransactionRbf.md +13 -0
- package/docs/TransactionRbfSource.md +13 -0
- package/docs/TransactionReplacement.md +14 -0
- package/docs/TransactionRequestEvmEip1559Fee.md +13 -0
- package/docs/TransactionRequestEvmLegacyFee.md +12 -0
- package/docs/TransactionRequestFee.md +16 -0
- package/docs/TransactionRequestFixedFee.md +11 -0
- package/docs/TransactionRequestUtxoFee.md +12 -0
- package/docs/TransactionResend.md +9 -0
- package/docs/TransactionResult.md +10 -0
- package/docs/TransactionResultType.md +10 -0
- package/docs/TransactionSignatureResult.md +10 -0
- package/docs/TransactionSigner.md +28 -0
- package/docs/TransactionSmartContractSafeWalletSource.md +12 -0
- package/docs/TransactionSource.md +19 -0
- package/docs/TransactionSourceType.md +26 -0
- package/docs/TransactionStatus.md +30 -0
- package/docs/TransactionSubStatus.md +54 -0
- package/docs/TransactionTimeline.md +11 -0
- package/docs/TransactionTokeApproval.md +21 -0
- package/docs/TransactionTokenAmount.md +11 -0
- package/docs/TransactionTransferToAddressDestination.md +14 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +11 -0
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +11 -0
- package/docs/TransactionTransferToWalletDestination.md +13 -0
- package/docs/TransactionType.md +18 -0
- package/docs/TransactionUtxo.md +10 -0
- package/docs/TransactionUtxoFee.md +13 -0
- package/docs/TransactionWebhookEventData.md +48 -0
- package/docs/TransactionsApi.md +562 -0
- package/docs/TransferDestination.md +17 -0
- package/docs/TransferDestinationType.md +12 -0
- package/docs/TransferParams.md +15 -0
- package/docs/TransferSource.md +15 -0
- package/docs/UTXO.md +16 -0
- package/docs/UpdateCustodialWalletParams.md +10 -0
- package/docs/UpdateExchangeWalletParams.md +10 -0
- package/docs/UpdateGroupAction.md +10 -0
- package/docs/UpdateKeyShareHolderGroupByIdRequest.md +9 -0
- package/docs/UpdateMpcProjectByIdRequest.md +9 -0
- package/docs/UpdateMpcVaultByIdRequest.md +9 -0
- package/docs/UpdateMpcWalletParams.md +10 -0
- package/docs/UpdateSmartContractWalletParams.md +10 -0
- package/docs/UpdateWalletParams.md +10 -0
- package/docs/UpdateWebhookEndpointByIdRequest.md +22 -0
- package/docs/UtxoFeeBasePrice.md +9 -0
- package/docs/UtxoFeeRate.md +13 -0
- package/docs/WalletInfo.md +18 -0
- package/docs/WalletSubtype.md +22 -0
- package/docs/WalletType.md +16 -0
- package/docs/WalletsApi.md +1198 -0
- package/docs/WalletsMPCWalletsApi.md +974 -0
- package/docs/WebhookEndpoint.md +14 -0
- package/docs/WebhookEndpointStatus.md +20 -0
- package/docs/WebhookEvent.md +16 -0
- package/docs/WebhookEventData.md +48 -0
- package/docs/WebhookEventDataType.md +20 -0
- package/docs/WebhookEventLog.md +17 -0
- package/docs/WebhookEventStatus.md +14 -0
- package/docs/WebhookEventType.md +16 -0
- package/package.json +49 -0
|
@@ -0,0 +1,1200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AddressInfo = _interopRequireDefault(require("../model/AddressInfo"));
|
|
9
|
+
var _ChainInfo = _interopRequireDefault(require("../model/ChainInfo"));
|
|
10
|
+
var _CheckAddressValidity200Response = _interopRequireDefault(require("../model/CheckAddressValidity200Response"));
|
|
11
|
+
var _CreateAddressRequest = _interopRequireDefault(require("../model/CreateAddressRequest"));
|
|
12
|
+
var _CreateWalletParams = _interopRequireDefault(require("../model/CreateWalletParams"));
|
|
13
|
+
var _CreatedWalletInfo = _interopRequireDefault(require("../model/CreatedWalletInfo"));
|
|
14
|
+
var _DeleteWalletById201Response = _interopRequireDefault(require("../model/DeleteWalletById201Response"));
|
|
15
|
+
var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse"));
|
|
16
|
+
var _ExtendedTokenInfo = _interopRequireDefault(require("../model/ExtendedTokenInfo"));
|
|
17
|
+
var _ListAddresses200Response = _interopRequireDefault(require("../model/ListAddresses200Response"));
|
|
18
|
+
var _ListSupportedChains200Response = _interopRequireDefault(require("../model/ListSupportedChains200Response"));
|
|
19
|
+
var _ListSupportedTokens200Response = _interopRequireDefault(require("../model/ListSupportedTokens200Response"));
|
|
20
|
+
var _ListTokenBalancesForAddress200Response = _interopRequireDefault(require("../model/ListTokenBalancesForAddress200Response"));
|
|
21
|
+
var _ListUtxos200Response = _interopRequireDefault(require("../model/ListUtxos200Response"));
|
|
22
|
+
var _ListWallets200Response = _interopRequireDefault(require("../model/ListWallets200Response"));
|
|
23
|
+
var _LockUtxos201Response = _interopRequireDefault(require("../model/LockUtxos201Response"));
|
|
24
|
+
var _LockUtxosRequest = _interopRequireDefault(require("../model/LockUtxosRequest"));
|
|
25
|
+
var _MaxTransferableValue = _interopRequireDefault(require("../model/MaxTransferableValue"));
|
|
26
|
+
var _UpdateWalletParams = _interopRequireDefault(require("../model/UpdateWalletParams"));
|
|
27
|
+
var _WalletInfo = _interopRequireDefault(require("../model/WalletInfo"));
|
|
28
|
+
var _WalletSubtype = _interopRequireDefault(require("../model/WalletSubtype"));
|
|
29
|
+
var _WalletType = _interopRequireDefault(require("../model/WalletType"));
|
|
30
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
31
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
32
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
33
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
34
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
35
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
36
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
37
|
+
* Cobo Wallet as a Service 2.0
|
|
38
|
+
*
|
|
39
|
+
* Contact: support@cobo.com
|
|
40
|
+
*
|
|
41
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
42
|
+
* https://openapi-generator.tech
|
|
43
|
+
* Do not edit the class manually.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Wallets service.
|
|
48
|
+
* @module api/WalletsApi
|
|
49
|
+
*/
|
|
50
|
+
var WalletsApi = exports["default"] = /*#__PURE__*/function () {
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a new WalletsApi.
|
|
53
|
+
* @alias module:api/WalletsApi
|
|
54
|
+
* @class
|
|
55
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
56
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
57
|
+
*/
|
|
58
|
+
function WalletsApi(apiClient) {
|
|
59
|
+
_classCallCheck(this, WalletsApi);
|
|
60
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Check address validity
|
|
65
|
+
* This operation verifies if a given address is valid for a specific chain.
|
|
66
|
+
* @param {String} chain_id 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).
|
|
67
|
+
* @param {String} address The wallet address.
|
|
68
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CheckAddressValidity200Response} and HTTP response
|
|
69
|
+
*/
|
|
70
|
+
return _createClass(WalletsApi, [{
|
|
71
|
+
key: "checkAddressValidityWithHttpInfo",
|
|
72
|
+
value: function checkAddressValidityWithHttpInfo(chain_id, address) {
|
|
73
|
+
var postBody = null;
|
|
74
|
+
if (postBody && postBody.toJSON) {
|
|
75
|
+
postBody = postBody.toJSON();
|
|
76
|
+
}
|
|
77
|
+
// verify the required parameter 'chain_id' is set
|
|
78
|
+
if (chain_id === undefined || chain_id === null) {
|
|
79
|
+
throw new Error("Missing the required parameter 'chain_id' when calling checkAddressValidity");
|
|
80
|
+
}
|
|
81
|
+
// verify the required parameter 'address' is set
|
|
82
|
+
if (address === undefined || address === null) {
|
|
83
|
+
throw new Error("Missing the required parameter 'address' when calling checkAddressValidity");
|
|
84
|
+
}
|
|
85
|
+
var pathParams = {};
|
|
86
|
+
var queryParams = {
|
|
87
|
+
'chain_id': chain_id,
|
|
88
|
+
'address': address
|
|
89
|
+
};
|
|
90
|
+
var headerParams = {};
|
|
91
|
+
var formParams = {};
|
|
92
|
+
var authNames = ['CoboAuth'];
|
|
93
|
+
var contentTypes = [];
|
|
94
|
+
var accepts = ['application/json'];
|
|
95
|
+
var returnType = _CheckAddressValidity200Response["default"];
|
|
96
|
+
return this.apiClient.callApi('/wallets/check_address_validity', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Check address validity
|
|
101
|
+
* This operation verifies if a given address is valid for a specific chain.
|
|
102
|
+
* @param {String} chain_id 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).
|
|
103
|
+
* @param {String} address The wallet address.
|
|
104
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CheckAddressValidity200Response}
|
|
105
|
+
*/
|
|
106
|
+
}, {
|
|
107
|
+
key: "checkAddressValidity",
|
|
108
|
+
value: function checkAddressValidity(chain_id, address) {
|
|
109
|
+
return this.checkAddressValidityWithHttpInfo(chain_id, address).then(function (response_and_data) {
|
|
110
|
+
return response_and_data.data;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Create addresses in wallet
|
|
116
|
+
* This operation generates one or more addresses within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
|
|
117
|
+
* @param {String} wallet_id The wallet ID.
|
|
118
|
+
* @param {Object} opts Optional parameters
|
|
119
|
+
* @param {module:model/CreateAddressRequest} [CreateAddressRequest] The request body to generates addresses within a specified wallet.
|
|
120
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AddressInfo>} and HTTP response
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "createAddressWithHttpInfo",
|
|
124
|
+
value: function createAddressWithHttpInfo(wallet_id, opts) {
|
|
125
|
+
opts = opts || {};
|
|
126
|
+
var postBody = opts['CreateAddressRequest'];
|
|
127
|
+
if (postBody && postBody.toJSON) {
|
|
128
|
+
postBody = postBody.toJSON();
|
|
129
|
+
}
|
|
130
|
+
// verify the required parameter 'wallet_id' is set
|
|
131
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
132
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling createAddress");
|
|
133
|
+
}
|
|
134
|
+
var pathParams = {
|
|
135
|
+
'wallet_id': wallet_id
|
|
136
|
+
};
|
|
137
|
+
var queryParams = {};
|
|
138
|
+
var headerParams = {};
|
|
139
|
+
var formParams = {};
|
|
140
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
141
|
+
var contentTypes = ['application/json'];
|
|
142
|
+
var accepts = ['application/json'];
|
|
143
|
+
var returnType = [_AddressInfo["default"]];
|
|
144
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/addresses', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Create addresses in wallet
|
|
149
|
+
* This operation generates one or more addresses within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
|
|
150
|
+
* @param {String} wallet_id The wallet ID.
|
|
151
|
+
* @param {Object} opts Optional parameters
|
|
152
|
+
* @param {module:model/CreateAddressRequest} opts.CreateAddressRequest The request body to generates addresses within a specified wallet.
|
|
153
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AddressInfo>}
|
|
154
|
+
*/
|
|
155
|
+
}, {
|
|
156
|
+
key: "createAddress",
|
|
157
|
+
value: function createAddress(wallet_id, opts) {
|
|
158
|
+
return this.createAddressWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
159
|
+
return response_and_data.data;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Create wallet
|
|
165
|
+
* This operation creates a wallet with the provided information.
|
|
166
|
+
* @param {Object} opts Optional parameters
|
|
167
|
+
* @param {module:model/CreateWalletParams} [CreateWalletParams] The request body to create a wallet
|
|
168
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreatedWalletInfo} and HTTP response
|
|
169
|
+
*/
|
|
170
|
+
}, {
|
|
171
|
+
key: "createWalletWithHttpInfo",
|
|
172
|
+
value: function createWalletWithHttpInfo(opts) {
|
|
173
|
+
opts = opts || {};
|
|
174
|
+
var postBody = opts['CreateWalletParams'];
|
|
175
|
+
if (postBody && postBody.toJSON) {
|
|
176
|
+
postBody = postBody.toJSON();
|
|
177
|
+
}
|
|
178
|
+
var pathParams = {};
|
|
179
|
+
var queryParams = {};
|
|
180
|
+
var headerParams = {};
|
|
181
|
+
var formParams = {};
|
|
182
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
183
|
+
var contentTypes = ['application/json'];
|
|
184
|
+
var accepts = ['application/json'];
|
|
185
|
+
var returnType = _CreatedWalletInfo["default"];
|
|
186
|
+
return this.apiClient.callApi('/wallets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Create wallet
|
|
191
|
+
* This operation creates a wallet with the provided information.
|
|
192
|
+
* @param {Object} opts Optional parameters
|
|
193
|
+
* @param {module:model/CreateWalletParams} opts.CreateWalletParams The request body to create a wallet
|
|
194
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreatedWalletInfo}
|
|
195
|
+
*/
|
|
196
|
+
}, {
|
|
197
|
+
key: "createWallet",
|
|
198
|
+
value: function createWallet(opts) {
|
|
199
|
+
return this.createWalletWithHttpInfo(opts).then(function (response_and_data) {
|
|
200
|
+
return response_and_data.data;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Delete wallet
|
|
206
|
+
* This operation deletes a specified wallet. <Note>This operation is applicable to Exchange Wallets only.</Note>
|
|
207
|
+
* @param {String} wallet_id The wallet ID.
|
|
208
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteWalletById201Response} and HTTP response
|
|
209
|
+
*/
|
|
210
|
+
}, {
|
|
211
|
+
key: "deleteWalletByIdWithHttpInfo",
|
|
212
|
+
value: function deleteWalletByIdWithHttpInfo(wallet_id) {
|
|
213
|
+
var postBody = null;
|
|
214
|
+
if (postBody && postBody.toJSON) {
|
|
215
|
+
postBody = postBody.toJSON();
|
|
216
|
+
}
|
|
217
|
+
// verify the required parameter 'wallet_id' is set
|
|
218
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
219
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling deleteWalletById");
|
|
220
|
+
}
|
|
221
|
+
var pathParams = {
|
|
222
|
+
'wallet_id': wallet_id
|
|
223
|
+
};
|
|
224
|
+
var queryParams = {};
|
|
225
|
+
var headerParams = {};
|
|
226
|
+
var formParams = {};
|
|
227
|
+
var authNames = ['CoboAuth'];
|
|
228
|
+
var contentTypes = [];
|
|
229
|
+
var accepts = ['application/json'];
|
|
230
|
+
var returnType = _DeleteWalletById201Response["default"];
|
|
231
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Delete wallet
|
|
236
|
+
* This operation deletes a specified wallet. <Note>This operation is applicable to Exchange Wallets only.</Note>
|
|
237
|
+
* @param {String} wallet_id The wallet ID.
|
|
238
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteWalletById201Response}
|
|
239
|
+
*/
|
|
240
|
+
}, {
|
|
241
|
+
key: "deleteWalletById",
|
|
242
|
+
value: function deleteWalletById(wallet_id) {
|
|
243
|
+
return this.deleteWalletByIdWithHttpInfo(wallet_id).then(function (response_and_data) {
|
|
244
|
+
return response_and_data.data;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Get address information
|
|
250
|
+
* This operation retrieves the detailed information about a specified address within a wallet.
|
|
251
|
+
* @param {String} wallet_id The wallet ID.
|
|
252
|
+
* @param {String} address The wallet address.
|
|
253
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/AddressInfo>} and HTTP response
|
|
254
|
+
*/
|
|
255
|
+
}, {
|
|
256
|
+
key: "getAddressWithHttpInfo",
|
|
257
|
+
value: function getAddressWithHttpInfo(wallet_id, address) {
|
|
258
|
+
var postBody = null;
|
|
259
|
+
if (postBody && postBody.toJSON) {
|
|
260
|
+
postBody = postBody.toJSON();
|
|
261
|
+
}
|
|
262
|
+
// verify the required parameter 'wallet_id' is set
|
|
263
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
264
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling getAddress");
|
|
265
|
+
}
|
|
266
|
+
// verify the required parameter 'address' is set
|
|
267
|
+
if (address === undefined || address === null) {
|
|
268
|
+
throw new Error("Missing the required parameter 'address' when calling getAddress");
|
|
269
|
+
}
|
|
270
|
+
var pathParams = {
|
|
271
|
+
'wallet_id': wallet_id,
|
|
272
|
+
'address': address
|
|
273
|
+
};
|
|
274
|
+
var queryParams = {};
|
|
275
|
+
var headerParams = {};
|
|
276
|
+
var formParams = {};
|
|
277
|
+
var authNames = ['CoboAuth'];
|
|
278
|
+
var contentTypes = [];
|
|
279
|
+
var accepts = ['application/json'];
|
|
280
|
+
var returnType = [_AddressInfo["default"]];
|
|
281
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/addresses/{address}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Get address information
|
|
286
|
+
* This operation retrieves the detailed information about a specified address within a wallet.
|
|
287
|
+
* @param {String} wallet_id The wallet ID.
|
|
288
|
+
* @param {String} address The wallet address.
|
|
289
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/AddressInfo>}
|
|
290
|
+
*/
|
|
291
|
+
}, {
|
|
292
|
+
key: "getAddress",
|
|
293
|
+
value: function getAddress(wallet_id, address) {
|
|
294
|
+
return this.getAddressWithHttpInfo(wallet_id, address).then(function (response_and_data) {
|
|
295
|
+
return response_and_data.data;
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Get chain information
|
|
301
|
+
* This operation retrieves the detailed information about a specified chain.
|
|
302
|
+
* @param {String} chain_id 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).
|
|
303
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ChainInfo} and HTTP response
|
|
304
|
+
*/
|
|
305
|
+
}, {
|
|
306
|
+
key: "getChainByIdWithHttpInfo",
|
|
307
|
+
value: function getChainByIdWithHttpInfo(chain_id) {
|
|
308
|
+
var postBody = null;
|
|
309
|
+
if (postBody && postBody.toJSON) {
|
|
310
|
+
postBody = postBody.toJSON();
|
|
311
|
+
}
|
|
312
|
+
// verify the required parameter 'chain_id' is set
|
|
313
|
+
if (chain_id === undefined || chain_id === null) {
|
|
314
|
+
throw new Error("Missing the required parameter 'chain_id' when calling getChainById");
|
|
315
|
+
}
|
|
316
|
+
var pathParams = {
|
|
317
|
+
'chain_id': chain_id
|
|
318
|
+
};
|
|
319
|
+
var queryParams = {};
|
|
320
|
+
var headerParams = {};
|
|
321
|
+
var formParams = {};
|
|
322
|
+
var authNames = ['CoboAuth'];
|
|
323
|
+
var contentTypes = [];
|
|
324
|
+
var accepts = ['application/json'];
|
|
325
|
+
var returnType = _ChainInfo["default"];
|
|
326
|
+
return this.apiClient.callApi('/wallets/chains/{chain_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Get chain information
|
|
331
|
+
* This operation retrieves the detailed information about a specified chain.
|
|
332
|
+
* @param {String} chain_id 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).
|
|
333
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ChainInfo}
|
|
334
|
+
*/
|
|
335
|
+
}, {
|
|
336
|
+
key: "getChainById",
|
|
337
|
+
value: function getChainById(chain_id) {
|
|
338
|
+
return this.getChainByIdWithHttpInfo(chain_id).then(function (response_and_data) {
|
|
339
|
+
return response_and_data.data;
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Get maximum transferable value
|
|
345
|
+
* This operation retrieves the maximum amount that you can transfer from a wallet or a specified wallet address, along with the corresponding transaction fee. You must specify `to_address` in your query because it affects the transaction fee.
|
|
346
|
+
* @param {String} wallet_id The wallet ID.
|
|
347
|
+
* @param {String} token_id 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).
|
|
348
|
+
* @param {String} fee_rate The fee rate in sats/vByte or gas price in wei.
|
|
349
|
+
* @param {String} to_address The recipient's address.
|
|
350
|
+
* @param {Object} opts Optional parameters
|
|
351
|
+
* @param {String} [from_address] The sender's address. For EVM addresses in MPC Wallets, this parameter is required.
|
|
352
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MaxTransferableValue} and HTTP response
|
|
353
|
+
*/
|
|
354
|
+
}, {
|
|
355
|
+
key: "getMaxTransferableValueWithHttpInfo",
|
|
356
|
+
value: function getMaxTransferableValueWithHttpInfo(wallet_id, token_id, fee_rate, to_address, opts) {
|
|
357
|
+
opts = opts || {};
|
|
358
|
+
var postBody = null;
|
|
359
|
+
if (postBody && postBody.toJSON) {
|
|
360
|
+
postBody = postBody.toJSON();
|
|
361
|
+
}
|
|
362
|
+
// verify the required parameter 'wallet_id' is set
|
|
363
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
364
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling getMaxTransferableValue");
|
|
365
|
+
}
|
|
366
|
+
// verify the required parameter 'token_id' is set
|
|
367
|
+
if (token_id === undefined || token_id === null) {
|
|
368
|
+
throw new Error("Missing the required parameter 'token_id' when calling getMaxTransferableValue");
|
|
369
|
+
}
|
|
370
|
+
// verify the required parameter 'fee_rate' is set
|
|
371
|
+
if (fee_rate === undefined || fee_rate === null) {
|
|
372
|
+
throw new Error("Missing the required parameter 'fee_rate' when calling getMaxTransferableValue");
|
|
373
|
+
}
|
|
374
|
+
// verify the required parameter 'to_address' is set
|
|
375
|
+
if (to_address === undefined || to_address === null) {
|
|
376
|
+
throw new Error("Missing the required parameter 'to_address' when calling getMaxTransferableValue");
|
|
377
|
+
}
|
|
378
|
+
var pathParams = {
|
|
379
|
+
'wallet_id': wallet_id
|
|
380
|
+
};
|
|
381
|
+
var queryParams = {
|
|
382
|
+
'token_id': token_id,
|
|
383
|
+
'fee_rate': fee_rate,
|
|
384
|
+
'to_address': to_address,
|
|
385
|
+
'from_address': opts['from_address']
|
|
386
|
+
};
|
|
387
|
+
var headerParams = {};
|
|
388
|
+
var formParams = {};
|
|
389
|
+
var authNames = ['CoboAuth'];
|
|
390
|
+
var contentTypes = [];
|
|
391
|
+
var accepts = ['application/json'];
|
|
392
|
+
var returnType = _MaxTransferableValue["default"];
|
|
393
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/max_transferable_value', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Get maximum transferable value
|
|
398
|
+
* This operation retrieves the maximum amount that you can transfer from a wallet or a specified wallet address, along with the corresponding transaction fee. You must specify `to_address` in your query because it affects the transaction fee.
|
|
399
|
+
* @param {String} wallet_id The wallet ID.
|
|
400
|
+
* @param {String} token_id 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).
|
|
401
|
+
* @param {String} fee_rate The fee rate in sats/vByte or gas price in wei.
|
|
402
|
+
* @param {String} to_address The recipient's address.
|
|
403
|
+
* @param {Object} opts Optional parameters
|
|
404
|
+
* @param {String} opts.from_address The sender's address. For EVM addresses in MPC Wallets, this parameter is required.
|
|
405
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MaxTransferableValue}
|
|
406
|
+
*/
|
|
407
|
+
}, {
|
|
408
|
+
key: "getMaxTransferableValue",
|
|
409
|
+
value: function getMaxTransferableValue(wallet_id, token_id, fee_rate, to_address, opts) {
|
|
410
|
+
return this.getMaxTransferableValueWithHttpInfo(wallet_id, token_id, fee_rate, to_address, opts).then(function (response_and_data) {
|
|
411
|
+
return response_and_data.data;
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Get token information
|
|
417
|
+
* This operation retrieves the detailed information about a specified token.
|
|
418
|
+
* @param {String} token_id 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).
|
|
419
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ExtendedTokenInfo} and HTTP response
|
|
420
|
+
*/
|
|
421
|
+
}, {
|
|
422
|
+
key: "getTokenByIdWithHttpInfo",
|
|
423
|
+
value: function getTokenByIdWithHttpInfo(token_id) {
|
|
424
|
+
var postBody = null;
|
|
425
|
+
if (postBody && postBody.toJSON) {
|
|
426
|
+
postBody = postBody.toJSON();
|
|
427
|
+
}
|
|
428
|
+
// verify the required parameter 'token_id' is set
|
|
429
|
+
if (token_id === undefined || token_id === null) {
|
|
430
|
+
throw new Error("Missing the required parameter 'token_id' when calling getTokenById");
|
|
431
|
+
}
|
|
432
|
+
var pathParams = {
|
|
433
|
+
'token_id': token_id
|
|
434
|
+
};
|
|
435
|
+
var queryParams = {};
|
|
436
|
+
var headerParams = {};
|
|
437
|
+
var formParams = {};
|
|
438
|
+
var authNames = ['CoboAuth'];
|
|
439
|
+
var contentTypes = [];
|
|
440
|
+
var accepts = ['application/json'];
|
|
441
|
+
var returnType = _ExtendedTokenInfo["default"];
|
|
442
|
+
return this.apiClient.callApi('/wallets/tokens/{token_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Get token information
|
|
447
|
+
* This operation retrieves the detailed information about a specified token.
|
|
448
|
+
* @param {String} token_id 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).
|
|
449
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ExtendedTokenInfo}
|
|
450
|
+
*/
|
|
451
|
+
}, {
|
|
452
|
+
key: "getTokenById",
|
|
453
|
+
value: function getTokenById(token_id) {
|
|
454
|
+
return this.getTokenByIdWithHttpInfo(token_id).then(function (response_and_data) {
|
|
455
|
+
return response_and_data.data;
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Get wallet information
|
|
461
|
+
* This operation retrieves the detailed information about a specified wallet.
|
|
462
|
+
* @param {String} wallet_id The wallet ID.
|
|
463
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletInfo} and HTTP response
|
|
464
|
+
*/
|
|
465
|
+
}, {
|
|
466
|
+
key: "getWalletByIdWithHttpInfo",
|
|
467
|
+
value: function getWalletByIdWithHttpInfo(wallet_id) {
|
|
468
|
+
var postBody = null;
|
|
469
|
+
if (postBody && postBody.toJSON) {
|
|
470
|
+
postBody = postBody.toJSON();
|
|
471
|
+
}
|
|
472
|
+
// verify the required parameter 'wallet_id' is set
|
|
473
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
474
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling getWalletById");
|
|
475
|
+
}
|
|
476
|
+
var pathParams = {
|
|
477
|
+
'wallet_id': wallet_id
|
|
478
|
+
};
|
|
479
|
+
var queryParams = {};
|
|
480
|
+
var headerParams = {};
|
|
481
|
+
var formParams = {};
|
|
482
|
+
var authNames = ['CoboAuth'];
|
|
483
|
+
var contentTypes = [];
|
|
484
|
+
var accepts = ['application/json'];
|
|
485
|
+
var returnType = _WalletInfo["default"];
|
|
486
|
+
return this.apiClient.callApi('/wallets/{wallet_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Get wallet information
|
|
491
|
+
* This operation retrieves the detailed information about a specified wallet.
|
|
492
|
+
* @param {String} wallet_id The wallet ID.
|
|
493
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletInfo}
|
|
494
|
+
*/
|
|
495
|
+
}, {
|
|
496
|
+
key: "getWalletById",
|
|
497
|
+
value: function getWalletById(wallet_id) {
|
|
498
|
+
return this.getWalletByIdWithHttpInfo(wallet_id).then(function (response_and_data) {
|
|
499
|
+
return response_and_data.data;
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* List wallet addresses
|
|
505
|
+
* This operation retrieves a list of addresses within a specified wallet.
|
|
506
|
+
* @param {String} wallet_id The wallet ID.
|
|
507
|
+
* @param {Object} opts Optional parameters
|
|
508
|
+
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID 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).
|
|
509
|
+
* @param {String} [addresses] A list of wallet addresses, separated by comma.
|
|
510
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
511
|
+
* @param {String} [before] 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.
|
|
512
|
+
* @param {String} [after] 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.
|
|
513
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListAddresses200Response} and HTTP response
|
|
514
|
+
*/
|
|
515
|
+
}, {
|
|
516
|
+
key: "listAddressesWithHttpInfo",
|
|
517
|
+
value: function listAddressesWithHttpInfo(wallet_id, opts) {
|
|
518
|
+
opts = opts || {};
|
|
519
|
+
var postBody = null;
|
|
520
|
+
if (postBody && postBody.toJSON) {
|
|
521
|
+
postBody = postBody.toJSON();
|
|
522
|
+
}
|
|
523
|
+
// verify the required parameter 'wallet_id' is set
|
|
524
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
525
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling listAddresses");
|
|
526
|
+
}
|
|
527
|
+
var pathParams = {
|
|
528
|
+
'wallet_id': wallet_id
|
|
529
|
+
};
|
|
530
|
+
var queryParams = {
|
|
531
|
+
'chain_ids': opts['chain_ids'],
|
|
532
|
+
'addresses': opts['addresses'],
|
|
533
|
+
'limit': opts['limit'],
|
|
534
|
+
'before': opts['before'],
|
|
535
|
+
'after': opts['after']
|
|
536
|
+
};
|
|
537
|
+
var headerParams = {};
|
|
538
|
+
var formParams = {};
|
|
539
|
+
var authNames = ['CoboAuth'];
|
|
540
|
+
var contentTypes = [];
|
|
541
|
+
var accepts = ['application/json'];
|
|
542
|
+
var returnType = _ListAddresses200Response["default"];
|
|
543
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/addresses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* List wallet addresses
|
|
548
|
+
* This operation retrieves a list of addresses within a specified wallet.
|
|
549
|
+
* @param {String} wallet_id The wallet ID.
|
|
550
|
+
* @param {Object} opts Optional parameters
|
|
551
|
+
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID 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).
|
|
552
|
+
* @param {String} opts.addresses A list of wallet addresses, separated by comma.
|
|
553
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
554
|
+
* @param {String} opts.before 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.
|
|
555
|
+
* @param {String} opts.after 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.
|
|
556
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListAddresses200Response}
|
|
557
|
+
*/
|
|
558
|
+
}, {
|
|
559
|
+
key: "listAddresses",
|
|
560
|
+
value: function listAddresses(wallet_id, opts) {
|
|
561
|
+
return this.listAddressesWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
562
|
+
return response_and_data.data;
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* List enabled chains
|
|
568
|
+
* This operation retrieves all the chains that can be used by your organization. You can filter the result by wallet type or subtype. If you do not specify a wallet type, this operation returns a combination of chains that can be used by your organization for each wallet type.
|
|
569
|
+
* @param {Object} opts Optional parameters
|
|
570
|
+
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
571
|
+
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
572
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
573
|
+
* @param {String} [before] 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.
|
|
574
|
+
* @param {String} [after] 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.
|
|
575
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSupportedChains200Response} and HTTP response
|
|
576
|
+
*/
|
|
577
|
+
}, {
|
|
578
|
+
key: "listEnabledChainsWithHttpInfo",
|
|
579
|
+
value: function listEnabledChainsWithHttpInfo(opts) {
|
|
580
|
+
opts = opts || {};
|
|
581
|
+
var postBody = null;
|
|
582
|
+
if (postBody && postBody.toJSON) {
|
|
583
|
+
postBody = postBody.toJSON();
|
|
584
|
+
}
|
|
585
|
+
var pathParams = {};
|
|
586
|
+
var queryParams = {
|
|
587
|
+
'wallet_type': opts['wallet_type'],
|
|
588
|
+
'wallet_subtype': opts['wallet_subtype'],
|
|
589
|
+
'limit': opts['limit'],
|
|
590
|
+
'before': opts['before'],
|
|
591
|
+
'after': opts['after']
|
|
592
|
+
};
|
|
593
|
+
var headerParams = {};
|
|
594
|
+
var formParams = {};
|
|
595
|
+
var authNames = ['CoboAuth'];
|
|
596
|
+
var contentTypes = [];
|
|
597
|
+
var accepts = ['application/json'];
|
|
598
|
+
var returnType = _ListSupportedChains200Response["default"];
|
|
599
|
+
return this.apiClient.callApi('/wallets/enabled_chains', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* List enabled chains
|
|
604
|
+
* This operation retrieves all the chains that can be used by your organization. You can filter the result by wallet type or subtype. If you do not specify a wallet type, this operation returns a combination of chains that can be used by your organization for each wallet type.
|
|
605
|
+
* @param {Object} opts Optional parameters
|
|
606
|
+
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
607
|
+
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
608
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
609
|
+
* @param {String} opts.before 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.
|
|
610
|
+
* @param {String} opts.after 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.
|
|
611
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupportedChains200Response}
|
|
612
|
+
*/
|
|
613
|
+
}, {
|
|
614
|
+
key: "listEnabledChains",
|
|
615
|
+
value: function listEnabledChains(opts) {
|
|
616
|
+
return this.listEnabledChainsWithHttpInfo(opts).then(function (response_and_data) {
|
|
617
|
+
return response_and_data.data;
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* List enabled tokens
|
|
623
|
+
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, and chain IDs. If you do not specify a wallet type, this operation returns a combination of tokens that can be used by your organization for each wallet type.
|
|
624
|
+
* @param {Object} opts Optional parameters
|
|
625
|
+
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
626
|
+
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
627
|
+
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID 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).
|
|
628
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
629
|
+
* @param {String} [before] 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.
|
|
630
|
+
* @param {String} [after] 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.
|
|
631
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSupportedTokens200Response} and HTTP response
|
|
632
|
+
*/
|
|
633
|
+
}, {
|
|
634
|
+
key: "listEnabledTokensWithHttpInfo",
|
|
635
|
+
value: function listEnabledTokensWithHttpInfo(opts) {
|
|
636
|
+
opts = opts || {};
|
|
637
|
+
var postBody = null;
|
|
638
|
+
if (postBody && postBody.toJSON) {
|
|
639
|
+
postBody = postBody.toJSON();
|
|
640
|
+
}
|
|
641
|
+
var pathParams = {};
|
|
642
|
+
var queryParams = {
|
|
643
|
+
'wallet_type': opts['wallet_type'],
|
|
644
|
+
'wallet_subtype': opts['wallet_subtype'],
|
|
645
|
+
'chain_ids': opts['chain_ids'],
|
|
646
|
+
'limit': opts['limit'],
|
|
647
|
+
'before': opts['before'],
|
|
648
|
+
'after': opts['after']
|
|
649
|
+
};
|
|
650
|
+
var headerParams = {};
|
|
651
|
+
var formParams = {};
|
|
652
|
+
var authNames = ['CoboAuth'];
|
|
653
|
+
var contentTypes = [];
|
|
654
|
+
var accepts = ['application/json'];
|
|
655
|
+
var returnType = _ListSupportedTokens200Response["default"];
|
|
656
|
+
return this.apiClient.callApi('/wallets/enabled_tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* List enabled tokens
|
|
661
|
+
* This operation retrieves all the tokens that can be used by your organization. You can filter the result by wallet type, subtype, and chain IDs. If you do not specify a wallet type, this operation returns a combination of tokens that can be used by your organization for each wallet type.
|
|
662
|
+
* @param {Object} opts Optional parameters
|
|
663
|
+
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
664
|
+
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
665
|
+
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID 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).
|
|
666
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
667
|
+
* @param {String} opts.before 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.
|
|
668
|
+
* @param {String} opts.after 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.
|
|
669
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupportedTokens200Response}
|
|
670
|
+
*/
|
|
671
|
+
}, {
|
|
672
|
+
key: "listEnabledTokens",
|
|
673
|
+
value: function listEnabledTokens(opts) {
|
|
674
|
+
return this.listEnabledTokensWithHttpInfo(opts).then(function (response_and_data) {
|
|
675
|
+
return response_and_data.data;
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* List supported chains
|
|
681
|
+
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
|
|
682
|
+
* @param {Object} opts Optional parameters
|
|
683
|
+
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
684
|
+
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
685
|
+
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID 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).
|
|
686
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
687
|
+
* @param {String} [before] 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.
|
|
688
|
+
* @param {String} [after] 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.
|
|
689
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSupportedChains200Response} and HTTP response
|
|
690
|
+
*/
|
|
691
|
+
}, {
|
|
692
|
+
key: "listSupportedChainsWithHttpInfo",
|
|
693
|
+
value: function listSupportedChainsWithHttpInfo(opts) {
|
|
694
|
+
opts = opts || {};
|
|
695
|
+
var postBody = null;
|
|
696
|
+
if (postBody && postBody.toJSON) {
|
|
697
|
+
postBody = postBody.toJSON();
|
|
698
|
+
}
|
|
699
|
+
var pathParams = {};
|
|
700
|
+
var queryParams = {
|
|
701
|
+
'wallet_type': opts['wallet_type'],
|
|
702
|
+
'wallet_subtype': opts['wallet_subtype'],
|
|
703
|
+
'chain_ids': opts['chain_ids'],
|
|
704
|
+
'limit': opts['limit'],
|
|
705
|
+
'before': opts['before'],
|
|
706
|
+
'after': opts['after']
|
|
707
|
+
};
|
|
708
|
+
var headerParams = {};
|
|
709
|
+
var formParams = {};
|
|
710
|
+
var authNames = ['CoboAuth'];
|
|
711
|
+
var contentTypes = [];
|
|
712
|
+
var accepts = ['application/json'];
|
|
713
|
+
var returnType = _ListSupportedChains200Response["default"];
|
|
714
|
+
return this.apiClient.callApi('/wallets/chains', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* List supported chains
|
|
719
|
+
* This operation retrieves all chains supported by a specific wallet type or subtype. It provides details such as the chain ID, chain symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of chains supported by each wallet type. You can filter the result by chain IDs. The chain metadata is publicly available without any permission restrictions.
|
|
720
|
+
* @param {Object} opts Optional parameters
|
|
721
|
+
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
722
|
+
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
723
|
+
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID 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).
|
|
724
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
725
|
+
* @param {String} opts.before 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.
|
|
726
|
+
* @param {String} opts.after 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.
|
|
727
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupportedChains200Response}
|
|
728
|
+
*/
|
|
729
|
+
}, {
|
|
730
|
+
key: "listSupportedChains",
|
|
731
|
+
value: function listSupportedChains(opts) {
|
|
732
|
+
return this.listSupportedChainsWithHttpInfo(opts).then(function (response_and_data) {
|
|
733
|
+
return response_and_data.data;
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* List supported tokens
|
|
739
|
+
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
|
|
740
|
+
* @param {Object} opts Optional parameters
|
|
741
|
+
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
742
|
+
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
743
|
+
* @param {String} [chain_ids] A list of chain IDs, separated by comma. The chain ID 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).
|
|
744
|
+
* @param {String} [token_ids] A list of token IDs, separated by comma. The token ID 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).
|
|
745
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
746
|
+
* @param {String} [before] 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.
|
|
747
|
+
* @param {String} [after] 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.
|
|
748
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSupportedTokens200Response} and HTTP response
|
|
749
|
+
*/
|
|
750
|
+
}, {
|
|
751
|
+
key: "listSupportedTokensWithHttpInfo",
|
|
752
|
+
value: function listSupportedTokensWithHttpInfo(opts) {
|
|
753
|
+
opts = opts || {};
|
|
754
|
+
var postBody = null;
|
|
755
|
+
if (postBody && postBody.toJSON) {
|
|
756
|
+
postBody = postBody.toJSON();
|
|
757
|
+
}
|
|
758
|
+
var pathParams = {};
|
|
759
|
+
var queryParams = {
|
|
760
|
+
'wallet_type': opts['wallet_type'],
|
|
761
|
+
'wallet_subtype': opts['wallet_subtype'],
|
|
762
|
+
'chain_ids': opts['chain_ids'],
|
|
763
|
+
'token_ids': opts['token_ids'],
|
|
764
|
+
'limit': opts['limit'],
|
|
765
|
+
'before': opts['before'],
|
|
766
|
+
'after': opts['after']
|
|
767
|
+
};
|
|
768
|
+
var headerParams = {};
|
|
769
|
+
var formParams = {};
|
|
770
|
+
var authNames = ['CoboAuth'];
|
|
771
|
+
var contentTypes = [];
|
|
772
|
+
var accepts = ['application/json'];
|
|
773
|
+
var returnType = _ListSupportedTokens200Response["default"];
|
|
774
|
+
return this.apiClient.callApi('/wallets/tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* List supported tokens
|
|
779
|
+
* This operation retrieves all tokens supported by a specific wallet type or subtype. It provides details such as token ID, token symbol, and other relevant information. If you do not specify a wallet type, this operation returns a combination of tokens supported by each wallet type. You can filter the result by token IDs or chain IDs. The token metadata is publicly available without any permission restrictions.
|
|
780
|
+
* @param {Object} opts Optional parameters
|
|
781
|
+
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
782
|
+
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
783
|
+
* @param {String} opts.chain_ids A list of chain IDs, separated by comma. The chain ID 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).
|
|
784
|
+
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID 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).
|
|
785
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
786
|
+
* @param {String} opts.before 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.
|
|
787
|
+
* @param {String} opts.after 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.
|
|
788
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSupportedTokens200Response}
|
|
789
|
+
*/
|
|
790
|
+
}, {
|
|
791
|
+
key: "listSupportedTokens",
|
|
792
|
+
value: function listSupportedTokens(opts) {
|
|
793
|
+
return this.listSupportedTokensWithHttpInfo(opts).then(function (response_and_data) {
|
|
794
|
+
return response_and_data.data;
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* List token balances by address
|
|
800
|
+
* The operation retrieves a list of token balances for a specified address within an MPC Wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
801
|
+
* @param {String} wallet_id The wallet ID.
|
|
802
|
+
* @param {String} address The wallet address.
|
|
803
|
+
* @param {Object} opts Optional parameters
|
|
804
|
+
* @param {String} [token_ids] A list of token IDs, separated by comma. The token ID 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).
|
|
805
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
806
|
+
* @param {String} [before] 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.
|
|
807
|
+
* @param {String} [after] 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.
|
|
808
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTokenBalancesForAddress200Response} and HTTP response
|
|
809
|
+
*/
|
|
810
|
+
}, {
|
|
811
|
+
key: "listTokenBalancesForAddressWithHttpInfo",
|
|
812
|
+
value: function listTokenBalancesForAddressWithHttpInfo(wallet_id, address, opts) {
|
|
813
|
+
opts = opts || {};
|
|
814
|
+
var postBody = null;
|
|
815
|
+
if (postBody && postBody.toJSON) {
|
|
816
|
+
postBody = postBody.toJSON();
|
|
817
|
+
}
|
|
818
|
+
// verify the required parameter 'wallet_id' is set
|
|
819
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
820
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling listTokenBalancesForAddress");
|
|
821
|
+
}
|
|
822
|
+
// verify the required parameter 'address' is set
|
|
823
|
+
if (address === undefined || address === null) {
|
|
824
|
+
throw new Error("Missing the required parameter 'address' when calling listTokenBalancesForAddress");
|
|
825
|
+
}
|
|
826
|
+
var pathParams = {
|
|
827
|
+
'wallet_id': wallet_id,
|
|
828
|
+
'address': address
|
|
829
|
+
};
|
|
830
|
+
var queryParams = {
|
|
831
|
+
'token_ids': opts['token_ids'],
|
|
832
|
+
'limit': opts['limit'],
|
|
833
|
+
'before': opts['before'],
|
|
834
|
+
'after': opts['after']
|
|
835
|
+
};
|
|
836
|
+
var headerParams = {};
|
|
837
|
+
var formParams = {};
|
|
838
|
+
var authNames = ['CoboAuth'];
|
|
839
|
+
var contentTypes = [];
|
|
840
|
+
var accepts = ['application/json'];
|
|
841
|
+
var returnType = _ListTokenBalancesForAddress200Response["default"];
|
|
842
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/addresses/{address}/tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* List token balances by address
|
|
847
|
+
* The operation retrieves a list of token balances for a specified address within an MPC Wallet. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
848
|
+
* @param {String} wallet_id The wallet ID.
|
|
849
|
+
* @param {String} address The wallet address.
|
|
850
|
+
* @param {Object} opts Optional parameters
|
|
851
|
+
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID 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).
|
|
852
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
853
|
+
* @param {String} opts.before 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.
|
|
854
|
+
* @param {String} opts.after 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.
|
|
855
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTokenBalancesForAddress200Response}
|
|
856
|
+
*/
|
|
857
|
+
}, {
|
|
858
|
+
key: "listTokenBalancesForAddress",
|
|
859
|
+
value: function listTokenBalancesForAddress(wallet_id, address, opts) {
|
|
860
|
+
return this.listTokenBalancesForAddressWithHttpInfo(wallet_id, address, opts).then(function (response_and_data) {
|
|
861
|
+
return response_and_data.data;
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* List token balances by wallet
|
|
867
|
+
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
|
|
868
|
+
* @param {String} wallet_id The wallet ID.
|
|
869
|
+
* @param {Object} opts Optional parameters
|
|
870
|
+
* @param {String} [token_ids] A list of token IDs, separated by comma. The token ID 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).
|
|
871
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
872
|
+
* @param {String} [before] 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.
|
|
873
|
+
* @param {String} [after] 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.
|
|
874
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListTokenBalancesForAddress200Response} and HTTP response
|
|
875
|
+
*/
|
|
876
|
+
}, {
|
|
877
|
+
key: "listTokenBalancesForWalletWithHttpInfo",
|
|
878
|
+
value: function listTokenBalancesForWalletWithHttpInfo(wallet_id, opts) {
|
|
879
|
+
opts = opts || {};
|
|
880
|
+
var postBody = null;
|
|
881
|
+
if (postBody && postBody.toJSON) {
|
|
882
|
+
postBody = postBody.toJSON();
|
|
883
|
+
}
|
|
884
|
+
// verify the required parameter 'wallet_id' is set
|
|
885
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
886
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling listTokenBalancesForWallet");
|
|
887
|
+
}
|
|
888
|
+
var pathParams = {
|
|
889
|
+
'wallet_id': wallet_id
|
|
890
|
+
};
|
|
891
|
+
var queryParams = {
|
|
892
|
+
'token_ids': opts['token_ids'],
|
|
893
|
+
'limit': opts['limit'],
|
|
894
|
+
'before': opts['before'],
|
|
895
|
+
'after': opts['after']
|
|
896
|
+
};
|
|
897
|
+
var headerParams = {};
|
|
898
|
+
var formParams = {};
|
|
899
|
+
var authNames = ['CoboAuth'];
|
|
900
|
+
var contentTypes = [];
|
|
901
|
+
var accepts = ['application/json'];
|
|
902
|
+
var returnType = _ListTokenBalancesForAddress200Response["default"];
|
|
903
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/tokens', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* List token balances by wallet
|
|
908
|
+
* The operation retrieves a list of token balances within a specified wallet. <Note>This operation is applicable to Custodial Wallets and MPC Wallets only.</Note>
|
|
909
|
+
* @param {String} wallet_id The wallet ID.
|
|
910
|
+
* @param {Object} opts Optional parameters
|
|
911
|
+
* @param {String} opts.token_ids A list of token IDs, separated by comma. The token ID 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).
|
|
912
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
913
|
+
* @param {String} opts.before 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.
|
|
914
|
+
* @param {String} opts.after 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.
|
|
915
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListTokenBalancesForAddress200Response}
|
|
916
|
+
*/
|
|
917
|
+
}, {
|
|
918
|
+
key: "listTokenBalancesForWallet",
|
|
919
|
+
value: function listTokenBalancesForWallet(wallet_id, opts) {
|
|
920
|
+
return this.listTokenBalancesForWalletWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
921
|
+
return response_and_data.data;
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* List UTXOs
|
|
927
|
+
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
928
|
+
* @param {String} wallet_id The wallet ID.
|
|
929
|
+
* @param {String} token_id 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).
|
|
930
|
+
* @param {Object} opts Optional parameters
|
|
931
|
+
* @param {String} [address] The wallet address.
|
|
932
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
933
|
+
* @param {String} [before] 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.
|
|
934
|
+
* @param {String} [after] 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.
|
|
935
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListUtxos200Response} and HTTP response
|
|
936
|
+
*/
|
|
937
|
+
}, {
|
|
938
|
+
key: "listUtxosWithHttpInfo",
|
|
939
|
+
value: function listUtxosWithHttpInfo(wallet_id, token_id, opts) {
|
|
940
|
+
opts = opts || {};
|
|
941
|
+
var postBody = null;
|
|
942
|
+
if (postBody && postBody.toJSON) {
|
|
943
|
+
postBody = postBody.toJSON();
|
|
944
|
+
}
|
|
945
|
+
// verify the required parameter 'wallet_id' is set
|
|
946
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
947
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling listUtxos");
|
|
948
|
+
}
|
|
949
|
+
// verify the required parameter 'token_id' is set
|
|
950
|
+
if (token_id === undefined || token_id === null) {
|
|
951
|
+
throw new Error("Missing the required parameter 'token_id' when calling listUtxos");
|
|
952
|
+
}
|
|
953
|
+
var pathParams = {
|
|
954
|
+
'wallet_id': wallet_id
|
|
955
|
+
};
|
|
956
|
+
var queryParams = {
|
|
957
|
+
'token_id': token_id,
|
|
958
|
+
'address': opts['address'],
|
|
959
|
+
'limit': opts['limit'],
|
|
960
|
+
'before': opts['before'],
|
|
961
|
+
'after': opts['after']
|
|
962
|
+
};
|
|
963
|
+
var headerParams = {};
|
|
964
|
+
var formParams = {};
|
|
965
|
+
var authNames = ['CoboAuth'];
|
|
966
|
+
var contentTypes = [];
|
|
967
|
+
var accepts = ['application/json'];
|
|
968
|
+
var returnType = _ListUtxos200Response["default"];
|
|
969
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/utxos', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* List UTXOs
|
|
974
|
+
* The operation retrieves a list of unspent transaction outputs (UTXOs) for a specified wallet and token. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
975
|
+
* @param {String} wallet_id The wallet ID.
|
|
976
|
+
* @param {String} token_id 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).
|
|
977
|
+
* @param {Object} opts Optional parameters
|
|
978
|
+
* @param {String} opts.address The wallet address.
|
|
979
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
980
|
+
* @param {String} opts.before 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.
|
|
981
|
+
* @param {String} opts.after 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.
|
|
982
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListUtxos200Response}
|
|
983
|
+
*/
|
|
984
|
+
}, {
|
|
985
|
+
key: "listUtxos",
|
|
986
|
+
value: function listUtxos(wallet_id, token_id, opts) {
|
|
987
|
+
return this.listUtxosWithHttpInfo(wallet_id, token_id, opts).then(function (response_and_data) {
|
|
988
|
+
return response_and_data.data;
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* List all wallets
|
|
994
|
+
* This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. <Note>You must specify either the wallet type or subtype, or both.</Note>
|
|
995
|
+
* @param {Object} opts Optional parameters
|
|
996
|
+
* @param {module:model/WalletType} [wallet_type] The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
997
|
+
* @param {module:model/WalletSubtype} [wallet_subtype] The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
998
|
+
* @param {String} [project_id] The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
999
|
+
* @param {String} [vault_id] (This parameter is applicable to MPC Wallets only) The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
1000
|
+
* @param {Number} [limit = 10)] The maximum number of objects to return. For most operations, the value range is [1, 50].
|
|
1001
|
+
* @param {String} [before] 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.
|
|
1002
|
+
* @param {String} [after] 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.
|
|
1003
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWallets200Response} and HTTP response
|
|
1004
|
+
*/
|
|
1005
|
+
}, {
|
|
1006
|
+
key: "listWalletsWithHttpInfo",
|
|
1007
|
+
value: function listWalletsWithHttpInfo(opts) {
|
|
1008
|
+
opts = opts || {};
|
|
1009
|
+
var postBody = null;
|
|
1010
|
+
if (postBody && postBody.toJSON) {
|
|
1011
|
+
postBody = postBody.toJSON();
|
|
1012
|
+
}
|
|
1013
|
+
var pathParams = {};
|
|
1014
|
+
var queryParams = {
|
|
1015
|
+
'wallet_type': opts['wallet_type'],
|
|
1016
|
+
'wallet_subtype': opts['wallet_subtype'],
|
|
1017
|
+
'project_id': opts['project_id'],
|
|
1018
|
+
'vault_id': opts['vault_id'],
|
|
1019
|
+
'limit': opts['limit'],
|
|
1020
|
+
'before': opts['before'],
|
|
1021
|
+
'after': opts['after']
|
|
1022
|
+
};
|
|
1023
|
+
var headerParams = {};
|
|
1024
|
+
var formParams = {};
|
|
1025
|
+
var authNames = ['CoboAuth'];
|
|
1026
|
+
var contentTypes = [];
|
|
1027
|
+
var accepts = ['application/json'];
|
|
1028
|
+
var returnType = _ListWallets200Response["default"];
|
|
1029
|
+
return this.apiClient.callApi('/wallets', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* List all wallets
|
|
1034
|
+
* This operation retrieves the information of all wallets under your organization. You can filter the result by wallet type and subtype. For MPC Wallets, you can also filter by project ID and vault ID. <Note>You must specify either the wallet type or subtype, or both.</Note>
|
|
1035
|
+
* @param {Object} opts Optional parameters
|
|
1036
|
+
* @param {module:model/WalletType} opts.wallet_type The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction)
|
|
1037
|
+
* @param {module:model/WalletSubtype} opts.wallet_subtype The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet})
|
|
1038
|
+
* @param {String} opts.project_id The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects).
|
|
1039
|
+
* @param {String} opts.vault_id (This parameter is applicable to MPC Wallets only) The vault ID, which you can retrieve by calling [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults).
|
|
1040
|
+
* @param {Number} opts.limit The maximum number of objects to return. For most operations, the value range is [1, 50]. (default to 10)
|
|
1041
|
+
* @param {String} opts.before 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.
|
|
1042
|
+
* @param {String} opts.after 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.
|
|
1043
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWallets200Response}
|
|
1044
|
+
*/
|
|
1045
|
+
}, {
|
|
1046
|
+
key: "listWallets",
|
|
1047
|
+
value: function listWallets(opts) {
|
|
1048
|
+
return this.listWalletsWithHttpInfo(opts).then(function (response_and_data) {
|
|
1049
|
+
return response_and_data.data;
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Lock UTXOs
|
|
1055
|
+
* This operation locks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
1056
|
+
* @param {String} wallet_id The wallet ID.
|
|
1057
|
+
* @param {Object} opts Optional parameters
|
|
1058
|
+
* @param {module:model/LockUtxosRequest} [LockUtxosRequest] The request body of the Lock/Unlock UTXOs operation.
|
|
1059
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LockUtxos201Response} and HTTP response
|
|
1060
|
+
*/
|
|
1061
|
+
}, {
|
|
1062
|
+
key: "lockUtxosWithHttpInfo",
|
|
1063
|
+
value: function lockUtxosWithHttpInfo(wallet_id, opts) {
|
|
1064
|
+
opts = opts || {};
|
|
1065
|
+
var postBody = opts['LockUtxosRequest'];
|
|
1066
|
+
if (postBody && postBody.toJSON) {
|
|
1067
|
+
postBody = postBody.toJSON();
|
|
1068
|
+
}
|
|
1069
|
+
// verify the required parameter 'wallet_id' is set
|
|
1070
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
1071
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling lockUtxos");
|
|
1072
|
+
}
|
|
1073
|
+
var pathParams = {
|
|
1074
|
+
'wallet_id': wallet_id
|
|
1075
|
+
};
|
|
1076
|
+
var queryParams = {};
|
|
1077
|
+
var headerParams = {};
|
|
1078
|
+
var formParams = {};
|
|
1079
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1080
|
+
var contentTypes = ['application/json'];
|
|
1081
|
+
var accepts = ['application/json'];
|
|
1082
|
+
var returnType = _LockUtxos201Response["default"];
|
|
1083
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/utxos/lock', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Lock UTXOs
|
|
1088
|
+
* This operation locks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
1089
|
+
* @param {String} wallet_id The wallet ID.
|
|
1090
|
+
* @param {Object} opts Optional parameters
|
|
1091
|
+
* @param {module:model/LockUtxosRequest} opts.LockUtxosRequest The request body of the Lock/Unlock UTXOs operation.
|
|
1092
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LockUtxos201Response}
|
|
1093
|
+
*/
|
|
1094
|
+
}, {
|
|
1095
|
+
key: "lockUtxos",
|
|
1096
|
+
value: function lockUtxos(wallet_id, opts) {
|
|
1097
|
+
return this.lockUtxosWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
1098
|
+
return response_and_data.data;
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Unlock UTXOs
|
|
1104
|
+
* This operation unlocks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
1105
|
+
* @param {String} wallet_id The wallet ID.
|
|
1106
|
+
* @param {Object} opts Optional parameters
|
|
1107
|
+
* @param {module:model/LockUtxosRequest} [LockUtxosRequest] The request body of the Lock/Unlock UTXOs operation.
|
|
1108
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LockUtxos201Response} and HTTP response
|
|
1109
|
+
*/
|
|
1110
|
+
}, {
|
|
1111
|
+
key: "unlockUtxosWithHttpInfo",
|
|
1112
|
+
value: function unlockUtxosWithHttpInfo(wallet_id, opts) {
|
|
1113
|
+
opts = opts || {};
|
|
1114
|
+
var postBody = opts['LockUtxosRequest'];
|
|
1115
|
+
if (postBody && postBody.toJSON) {
|
|
1116
|
+
postBody = postBody.toJSON();
|
|
1117
|
+
}
|
|
1118
|
+
// verify the required parameter 'wallet_id' is set
|
|
1119
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
1120
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling unlockUtxos");
|
|
1121
|
+
}
|
|
1122
|
+
var pathParams = {
|
|
1123
|
+
'wallet_id': wallet_id
|
|
1124
|
+
};
|
|
1125
|
+
var queryParams = {};
|
|
1126
|
+
var headerParams = {};
|
|
1127
|
+
var formParams = {};
|
|
1128
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1129
|
+
var contentTypes = ['application/json'];
|
|
1130
|
+
var accepts = ['application/json'];
|
|
1131
|
+
var returnType = _LockUtxos201Response["default"];
|
|
1132
|
+
return this.apiClient.callApi('/wallets/{wallet_id}/utxos/unlock', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Unlock UTXOs
|
|
1137
|
+
* This operation unlocks the UTXOs with specified transaction hashes. Locked UTXOs cannot be transferred until unlocked. <Note>This operation is applicable to MPC Wallets only.</Note>
|
|
1138
|
+
* @param {String} wallet_id The wallet ID.
|
|
1139
|
+
* @param {Object} opts Optional parameters
|
|
1140
|
+
* @param {module:model/LockUtxosRequest} opts.LockUtxosRequest The request body of the Lock/Unlock UTXOs operation.
|
|
1141
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LockUtxos201Response}
|
|
1142
|
+
*/
|
|
1143
|
+
}, {
|
|
1144
|
+
key: "unlockUtxos",
|
|
1145
|
+
value: function unlockUtxos(wallet_id, opts) {
|
|
1146
|
+
return this.unlockUtxosWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
1147
|
+
return response_and_data.data;
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Update wallet
|
|
1153
|
+
* This operation updates the information of a specified wallet. For Exchange Wallets, you can update the API key, API secret, and other information about your exchange accounts with this operation. For other wallet types, you can only update the wallet name.
|
|
1154
|
+
* @param {String} wallet_id The wallet ID.
|
|
1155
|
+
* @param {Object} opts Optional parameters
|
|
1156
|
+
* @param {module:model/UpdateWalletParams} [UpdateWalletParams] The request body.
|
|
1157
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletInfo} and HTTP response
|
|
1158
|
+
*/
|
|
1159
|
+
}, {
|
|
1160
|
+
key: "updateWalletByIdWithHttpInfo",
|
|
1161
|
+
value: function updateWalletByIdWithHttpInfo(wallet_id, opts) {
|
|
1162
|
+
opts = opts || {};
|
|
1163
|
+
var postBody = opts['UpdateWalletParams'];
|
|
1164
|
+
if (postBody && postBody.toJSON) {
|
|
1165
|
+
postBody = postBody.toJSON();
|
|
1166
|
+
}
|
|
1167
|
+
// verify the required parameter 'wallet_id' is set
|
|
1168
|
+
if (wallet_id === undefined || wallet_id === null) {
|
|
1169
|
+
throw new Error("Missing the required parameter 'wallet_id' when calling updateWalletById");
|
|
1170
|
+
}
|
|
1171
|
+
var pathParams = {
|
|
1172
|
+
'wallet_id': wallet_id
|
|
1173
|
+
};
|
|
1174
|
+
var queryParams = {};
|
|
1175
|
+
var headerParams = {};
|
|
1176
|
+
var formParams = {};
|
|
1177
|
+
var authNames = ['OAuth2', 'CoboAuth'];
|
|
1178
|
+
var contentTypes = ['application/json'];
|
|
1179
|
+
var accepts = ['application/json'];
|
|
1180
|
+
var returnType = _WalletInfo["default"];
|
|
1181
|
+
return this.apiClient.callApi('/wallets/{wallet_id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
/**
|
|
1185
|
+
* Update wallet
|
|
1186
|
+
* This operation updates the information of a specified wallet. For Exchange Wallets, you can update the API key, API secret, and other information about your exchange accounts with this operation. For other wallet types, you can only update the wallet name.
|
|
1187
|
+
* @param {String} wallet_id The wallet ID.
|
|
1188
|
+
* @param {Object} opts Optional parameters
|
|
1189
|
+
* @param {module:model/UpdateWalletParams} opts.UpdateWalletParams The request body.
|
|
1190
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletInfo}
|
|
1191
|
+
*/
|
|
1192
|
+
}, {
|
|
1193
|
+
key: "updateWalletById",
|
|
1194
|
+
value: function updateWalletById(wallet_id, opts) {
|
|
1195
|
+
return this.updateWalletByIdWithHttpInfo(wallet_id, opts).then(function (response_and_data) {
|
|
1196
|
+
return response_and_data.data;
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
}]);
|
|
1200
|
+
}();
|