@cobo/cobo-waas2 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -9
- package/dist/ApiClient.js +2 -2
- package/dist/PreRequestScript.js +640 -0
- package/dist/api/DevelopersWebhooksApi.js +1 -1
- package/dist/api/OAuthApi.js +5 -5
- package/dist/api/StakingsApi.js +538 -0
- package/dist/api/TransactionsApi.js +111 -9
- package/dist/api/WalletsApi.js +1 -60
- package/dist/api/WalletsExchangeWalletApi.js +5 -5
- package/dist/api/WalletsMPCWalletsApi.js +1 -1
- package/dist/index.js +154 -0
- package/dist/model/Activity.js +21 -12
- package/dist/model/ActivityAction.js +1 -1
- package/dist/model/ActivityInitiator.js +8 -8
- package/dist/model/ActivityStatus.js +1 -1
- package/dist/model/ActivityTimeline.js +4 -2
- package/dist/model/ActivityType.js +1 -16
- package/dist/model/AddressEncoding.js +1 -1
- package/dist/model/AddressInfo.js +40 -1
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationAccountOutput.js +3 -3
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +2 -2
- package/dist/model/AmountDetailsInner.js +1 -14
- package/dist/model/AmountStatus.js +1 -1
- package/dist/model/AssetBalance.js +1 -1
- package/dist/model/AssetInfo.js +1 -1
- package/dist/model/BabylonStakeExtra.js +10 -10
- package/dist/model/BabylonStakingExtra.js +175 -0
- package/dist/model/BabylonValidator.js +35 -15
- package/dist/model/BaseContractCallSource.js +2 -2
- package/dist/model/BaseEstimateStakingFee.js +1 -1
- package/dist/model/BaseStakeExtra.js +2 -2
- package/dist/model/BaseStakeSource.js +137 -0
- package/dist/model/BookkeepingRecord.js +243 -0
- package/dist/model/BookkeepingSummary.js +150 -0
- package/dist/model/BroadcastSignedTransactions201ResponseInner.js +125 -0
- package/dist/model/BroadcastSignedTransactionsRequest.js +87 -0
- package/dist/model/ChainInfo.js +10 -1
- package/dist/model/CheckAddressValidity200Response.js +1 -1
- package/dist/model/CheckAddressesValidity200ResponseInner.js +1 -1
- package/dist/model/CheckLoopTransfers200ResponseInner.js +2 -2
- package/dist/model/CoboSafeDelegate.js +28 -3
- package/dist/model/CoboSafeDelegateType.js +1 -1
- package/dist/model/ContractCallDestination.js +25 -4
- package/dist/model/ContractCallDestinationType.js +1 -1
- package/dist/model/ContractCallParams.js +1 -1
- package/dist/model/ContractCallSource.js +42 -5
- package/dist/model/ContractCallSourceType.js +1 -1
- package/dist/model/CreateAddressRequest.js +1 -1
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +1 -1
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateKeyShareHolderGroupRequest.js +1 -1
- package/dist/model/CreateMpcProjectRequest.js +1 -1
- package/dist/model/CreateMpcVaultRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +1 -1
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +24 -3
- package/dist/model/CreateStakeActivity.js +5 -5
- package/dist/model/CreateStakeActivity201Response.js +123 -0
- package/dist/model/CreateStakeActivityExtra.js +37 -60
- package/dist/model/CreateStakeActivityRequest.js +246 -0
- package/dist/model/CreateTransferTransaction201Response.js +1 -1
- package/dist/model/CreateTssRequestRequest.js +1 -1
- package/dist/model/CreateUnstakeActivity.js +4 -4
- package/dist/model/CreateUnstakeActivityRequest.js +200 -0
- package/dist/model/CreateWalletParams.js +52 -7
- package/dist/model/CreateWebhookEndpointRequest.js +1 -1
- package/dist/model/CreateWithdrawActivity.js +5 -5
- package/dist/model/CreateWithdrawActivityRequest.js +220 -0
- package/dist/model/CreatedWalletInfo.js +52 -7
- package/dist/model/CurveType.js +1 -1
- package/dist/model/CustodialTransferSource.js +2 -2
- package/dist/model/CustodialWalletInfo.js +1 -1
- package/dist/model/DeleteKeyShareHolderGroupById201Response.js +1 -1
- package/dist/model/DeleteWalletById201Response.js +1 -1
- package/dist/model/EigenLayerLstStakeExtra.js +2 -2
- package/dist/model/EigenLayerNativeStakeExtra.js +1 -1
- package/dist/model/EigenlayerValidator.js +1 -1
- package/dist/model/ErrorResponse.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +38 -5
- package/dist/model/EstimateFeeRequestType.js +1 -1
- package/dist/model/EstimateStakeFee.js +7 -7
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimateUnstakeFee.js +6 -6
- package/dist/model/EstimateWithdrawFee.js +8 -8
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +1 -1
- package/dist/model/EstimatedFee.js +66 -9
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/EstimatedUtxoFeeSlow.js +1 -1
- package/dist/model/EvmContractCallDestination.js +9 -5
- package/dist/model/EvmEIP191MessageSignDestination.js +2 -2
- package/dist/model/EvmEIP712MessageSignDestination.js +2 -2
- package/dist/model/EvmEip1559FeeBasePrice.js +1 -1
- package/dist/model/EvmEip1559FeeRate.js +1 -1
- package/dist/model/EvmLegacyFeeBasePrice.js +1 -1
- package/dist/model/EvmLegacyFeeRate.js +1 -1
- package/dist/model/ExchangeId.js +1 -1
- package/dist/model/ExchangeTransferDestination.js +4 -4
- package/dist/model/ExchangeTransferSource.js +2 -2
- package/dist/model/ExchangeWalletInfo.js +1 -1
- package/dist/model/ExtendedTokenInfo.js +37 -1
- package/dist/model/FeeAmount.js +1 -1
- package/dist/model/FeeGasLimit.js +1 -1
- package/dist/model/FeeRate.js +66 -9
- package/dist/model/FeeType.js +1 -1
- package/dist/model/FixedFeeRate.js +1 -1
- package/dist/model/GetStakingEstimationFee201Response.js +109 -0
- package/dist/model/GetStakingEstimationFeeRequest.js +256 -0
- package/dist/model/GetToken200Response.js +1 -1
- package/dist/model/GetToken4XXResponse.js +1 -1
- package/dist/model/KeyShareHolder.js +1 -1
- package/dist/model/KeyShareHolderGroup.js +1 -1
- package/dist/model/KeyShareHolderGroupStatus.js +1 -1
- package/dist/model/KeyShareHolderGroupType.js +1 -1
- package/dist/model/KeyShareHolderStatus.js +1 -1
- package/dist/model/KeyShareHolderType.js +1 -1
- package/dist/model/ListAddresses200Response.js +1 -1
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +1 -1
- package/dist/model/ListExchanges200ResponseInner.js +1 -1
- package/dist/model/ListKeyShareHolderGroups200Response.js +1 -1
- package/dist/model/ListMpcProjects200Response.js +1 -1
- package/dist/model/ListMpcVaults200Response.js +1 -1
- package/dist/model/ListStakingActivities200Response.js +123 -0
- package/dist/model/ListStakingPools200Response.js +123 -0
- package/dist/model/ListStakings200Response.js +123 -0
- package/dist/model/ListSupportedAssetsForExchange200Response.js +1 -1
- package/dist/model/ListSupportedChains200Response.js +1 -1
- package/dist/model/ListSupportedTokens200Response.js +1 -1
- package/dist/model/ListTokenBalancesForAddress200Response.js +1 -1
- package/dist/model/ListTransactions200Response.js +1 -1
- package/dist/model/ListTssRequests200Response.js +1 -1
- package/dist/model/ListUtxos200Response.js +1 -1
- package/dist/model/ListWallets200Response.js +1 -1
- package/dist/model/ListWebhookEndpoints200Response.js +1 -1
- package/dist/model/ListWebhookEventDefinitions200ResponseInner.js +1 -1
- package/dist/model/ListWebhookEventLogs200Response.js +1 -1
- package/dist/model/ListWebhookEvents200Response.js +1 -1
- package/dist/model/LockUtxos201Response.js +1 -1
- package/dist/model/LockUtxosRequest.js +1 -1
- package/dist/model/LockUtxosRequestUtxosInner.js +1 -1
- package/dist/model/MPCDelegate.js +1 -1
- package/dist/model/MPCProject.js +1 -1
- package/dist/model/MPCVault.js +1 -1
- package/dist/model/MPCVaultType.js +1 -1
- package/dist/model/MPCWalletInfo.js +1 -1
- package/dist/model/MaxFeeAmount.js +1 -1
- package/dist/model/MaxTransferableValue.js +1 -1
- package/dist/model/MessageSignDestination.js +38 -5
- package/dist/model/MessageSignDestinationType.js +1 -1
- package/dist/model/MessageSignParams.js +1 -1
- package/dist/model/MessageSignSource.js +28 -3
- package/dist/model/MessageSignSourceType.js +1 -1
- package/dist/model/MpcContractCallSource.js +1 -1
- package/dist/model/MpcMessageSignSource.js +1 -1
- package/dist/model/MpcSigningGroup.js +1 -1
- package/dist/model/MpcStakeSource.js +156 -0
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Pagination.js +1 -1
- package/dist/model/PoolDetails.js +27 -27
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +45 -40
- package/dist/model/PoolSummary.js +14 -14
- package/dist/model/RawMessageSignDestination.js +122 -0
- package/dist/model/RefreshToken200Response.js +1 -1
- package/dist/model/RefreshTokenRequest.js +1 -1
- package/dist/model/ReplaceType.js +1 -1
- package/dist/model/RetryWebhookEventById201Response.js +1 -1
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SafeContractCallSource.js +2 -2
- package/dist/model/SafeTransferSource.js +2 -2
- package/dist/model/SafeWallet.js +1 -1
- package/dist/model/SmartContractInitiator.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +24 -3
- package/dist/model/SmartContractWalletOperationType.js +1 -1
- package/dist/model/SmartContractWalletType.js +1 -1
- package/dist/model/SourceGroup.js +1 -1
- package/dist/model/StakeSourceType.js +56 -0
- package/dist/model/StakingPoolType.js +1 -11
- package/dist/model/StakingSource.js +39 -46
- package/dist/model/Stakings.js +35 -63
- package/dist/model/StakingsExtra.js +182 -0
- package/dist/model/StakingsValidatorInfo.js +7 -2
- package/dist/model/SubWalletAssetBalance.js +1 -1
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSRequest.js +1 -1
- package/dist/model/TSSRequestStatus.js +1 -1
- package/dist/model/TSSRequestType.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +1 -1
- package/dist/model/TokenBalance.js +1 -1
- package/dist/model/TokenBalanceBalance.js +1 -1
- package/dist/model/TokenInfo.js +27 -1
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionApprover.js +1 -1
- package/dist/model/TransactionBlockInfo.js +1 -1
- package/dist/model/TransactionCustodialAssetWalletSource.js +2 -2
- package/dist/model/TransactionDepositFromAddressSource.js +2 -2
- package/dist/model/TransactionDepositFromLoopSource.js +2 -2
- package/dist/model/TransactionDepositFromWalletSource.js +2 -2
- package/dist/model/TransactionDepositToAddressDestination.js +4 -4
- package/dist/model/TransactionDepositToWalletDestination.js +4 -4
- package/dist/model/TransactionDestination.js +110 -17
- package/dist/model/TransactionDestinationType.js +1 -1
- package/dist/model/TransactionDetail.js +1 -1
- package/dist/model/TransactionDetails.js +1 -1
- package/dist/model/TransactionEvmContractDestination.js +9 -5
- package/dist/model/TransactionEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionEvmLegacyFee.js +2 -2
- package/dist/model/TransactionExchangeWalletSource.js +2 -2
- package/dist/model/TransactionFee.js +66 -9
- package/dist/model/TransactionFeeStationWalletSource.js +1 -1
- package/dist/model/TransactionFixedFee.js +2 -2
- package/dist/model/TransactionInitiatorType.js +1 -1
- package/dist/model/TransactionMPCWalletSource.js +2 -2
- package/dist/model/TransactionMessageSignEIP191Destination.js +2 -2
- package/dist/model/TransactionMessageSignEIP712Destination.js +2 -2
- package/dist/model/TransactionRawTxInfo.js +1 -1
- package/dist/model/TransactionRbf.js +1 -1
- package/dist/model/TransactionRbfSource.js +28 -3
- package/dist/model/TransactionReplacement.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +2 -2
- package/dist/model/TransactionRequestFee.js +66 -9
- package/dist/model/TransactionRequestFixedFee.js +2 -2
- package/dist/model/TransactionRequestUtxoFee.js +2 -2
- package/dist/model/TransactionResend.js +1 -1
- package/dist/model/TransactionResult.js +24 -3
- package/dist/model/TransactionResultType.js +1 -1
- package/dist/model/TransactionSignatureResult.js +1 -1
- package/dist/model/TransactionSigner.js +1 -1
- package/dist/model/TransactionSmartContractSafeWalletSource.js +2 -2
- package/dist/model/TransactionSource.js +116 -15
- package/dist/model/TransactionSourceType.js +1 -1
- package/dist/model/TransactionStatus.js +1 -1
- package/dist/model/TransactionSubStatus.js +1 -1
- package/dist/model/TransactionTimeline.js +1 -1
- package/dist/model/TransactionTokeApproval.js +37 -1
- package/dist/model/TransactionTokenAmount.js +1 -1
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +2 -2
- package/dist/model/TransactionTransferToWalletDestination.js +4 -4
- package/dist/model/TransactionType.js +11 -1
- package/dist/model/TransactionUtxo.js +1 -1
- package/dist/model/TransactionUtxoFee.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +1 -1
- package/dist/model/TransferDestination.js +39 -6
- package/dist/model/TransferDestinationType.js +1 -1
- package/dist/model/TransferParams.js +1 -1
- package/dist/model/TransferSource.js +74 -9
- package/dist/model/UTXO.js +1 -1
- package/dist/model/UpdateCustodialWalletParams.js +1 -1
- package/dist/model/UpdateExchangeWalletParams.js +1 -1
- package/dist/model/UpdateGroupAction.js +1 -1
- package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +1 -1
- package/dist/model/UpdateMpcProjectByIdRequest.js +1 -1
- package/dist/model/UpdateMpcVaultByIdRequest.js +1 -1
- package/dist/model/UpdateMpcWalletParams.js +1 -1
- package/dist/model/UpdateSmartContractWalletParams.js +1 -1
- package/dist/model/UpdateWalletParams.js +66 -9
- package/dist/model/UpdateWebhookEndpointByIdRequest.js +1 -1
- package/dist/model/UtxoFeeBasePrice.js +1 -1
- package/dist/model/UtxoFeeRate.js +1 -1
- package/dist/model/WalletBalanceSnapshot.js +120 -0
- package/dist/model/WalletBalanceSnapshotRecord.js +163 -0
- package/dist/model/WalletInfo.js +66 -9
- package/dist/model/WalletSubtype.js +1 -1
- package/dist/model/WalletType.js +1 -1
- package/dist/model/WebhookEndpoint.js +1 -1
- package/dist/model/WebhookEndpointStatus.js +1 -1
- package/dist/model/WebhookEvent.js +1 -1
- package/dist/model/WebhookEventData.js +38 -5
- package/dist/model/WebhookEventDataType.js +1 -1
- package/dist/model/WebhookEventLog.js +1 -1
- package/dist/model/WebhookEventStatus.js +1 -1
- package/dist/model/WebhookEventType.js +1 -1
- package/docs/Activity.md +9 -8
- package/docs/ActivityInitiator.md +1 -1
- package/docs/ActivityTimeline.md +3 -3
- package/docs/ActivityType.md +0 -6
- package/docs/AddressInfo.md +3 -0
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AmountDetailsInner.md +0 -1
- package/docs/BabylonStakeExtra.md +3 -3
- package/docs/BabylonStakingExtra.md +14 -0
- package/docs/BabylonValidator.md +6 -5
- package/docs/BaseStakeSource.md +11 -0
- package/docs/BookkeepingRecord.md +19 -0
- package/docs/BookkeepingSummary.md +12 -0
- package/docs/BroadcastSignedTransactions201ResponseInner.md +10 -0
- package/docs/BroadcastSignedTransactionsRequest.md +9 -0
- package/docs/ChainInfo.md +1 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +2 -2
- package/docs/CreateStakeActivity201Response.md +10 -0
- package/docs/CreateStakeActivityExtra.md +3 -5
- package/docs/CreateStakeActivityRequest.md +15 -0
- package/docs/CreateUnstakeActivity.md +2 -2
- package/docs/CreateUnstakeActivityRequest.md +13 -0
- package/docs/CreateWithdrawActivity.md +3 -3
- package/docs/CreateWithdrawActivityRequest.md +14 -0
- package/docs/EigenLayerLstStakeExtra.md +1 -1
- package/docs/EstimateStakeFee.md +2 -2
- package/docs/EstimateUnstakeFee.md +2 -2
- package/docs/EstimateWithdrawFee.md +3 -3
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeTransferDestination.md +1 -1
- package/docs/ExtendedTokenInfo.md +2 -0
- package/docs/GetStakingEstimationFee201Response.md +11 -0
- package/docs/GetStakingEstimationFeeRequest.md +17 -0
- package/docs/ListStakingActivities200Response.md +10 -0
- package/docs/ListStakingPools200Response.md +10 -0
- package/docs/ListStakings200Response.md +10 -0
- package/docs/MpcStakeSource.md +11 -0
- package/docs/OAuthApi.md +2 -2
- package/docs/PoolDetails.md +13 -13
- package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -6
- package/docs/PoolSummary.md +6 -6
- package/docs/RawMessageSignDestination.md +10 -0
- package/docs/StakeSourceType.md +10 -0
- package/docs/StakingPoolType.md +0 -4
- package/docs/StakingSource.md +1 -3
- package/docs/Stakings.md +10 -13
- package/docs/StakingsApi.md +570 -0
- package/docs/StakingsExtra.md +14 -0
- package/docs/StakingsValidatorInfo.md +5 -5
- package/docs/TokenInfo.md +2 -0
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +1 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionTokeApproval.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +1 -1
- package/docs/TransactionType.md +4 -0
- package/docs/TransactionsApi.md +110 -2
- package/docs/TransferDestination.md +1 -1
- package/docs/WalletBalanceSnapshot.md +10 -0
- package/docs/WalletBalanceSnapshotRecord.md +13 -0
- package/docs/WalletsApi.md +0 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,156 @@
|
|
|
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 _BaseStakeSource = _interopRequireDefault(require("./BaseStakeSource"));
|
|
9
|
+
var _StakeSourceType = _interopRequireDefault(require("./StakeSourceType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The MpcStakeSource model module.
|
|
31
|
+
* @module model/MpcStakeSource
|
|
32
|
+
*/
|
|
33
|
+
var MpcStakeSource = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>MpcStakeSource</code>.
|
|
36
|
+
* @alias module:model/MpcStakeSource
|
|
37
|
+
* @implements module:model/BaseStakeSource
|
|
38
|
+
* @param source_type {module:model/StakeSourceType}
|
|
39
|
+
* @param wallet_id {String} The wallet ID.
|
|
40
|
+
* @param address {String} The wallet address.
|
|
41
|
+
*/
|
|
42
|
+
function MpcStakeSource(source_type, wallet_id, address) {
|
|
43
|
+
_classCallCheck(this, MpcStakeSource);
|
|
44
|
+
_BaseStakeSource["default"].initialize(this, source_type, wallet_id, address);
|
|
45
|
+
MpcStakeSource.initialize(this, source_type, wallet_id, address);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(MpcStakeSource, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, source_type, wallet_id, address) {
|
|
56
|
+
obj['source_type'] = source_type;
|
|
57
|
+
obj['wallet_id'] = wallet_id;
|
|
58
|
+
obj['address'] = address;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>MpcStakeSource</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/MpcStakeSource} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/MpcStakeSource} The populated <code>MpcStakeSource</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new MpcStakeSource();
|
|
73
|
+
_BaseStakeSource["default"].constructFromObject(data, obj);
|
|
74
|
+
if (data.hasOwnProperty('source_type')) {
|
|
75
|
+
obj['source_type'] = _StakeSourceType["default"].constructFromObject(data['source_type']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
78
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('address')) {
|
|
81
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>MpcStakeSource</code>.
|
|
89
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MpcStakeSource</code>.
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "validateJSON",
|
|
94
|
+
value: function validateJSON(data) {
|
|
95
|
+
// check to make sure all required properties are present in the JSON string
|
|
96
|
+
var _iterator = _createForOfIteratorHelper(MpcStakeSource.RequiredProperties),
|
|
97
|
+
_step;
|
|
98
|
+
try {
|
|
99
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
100
|
+
var property = _step.value;
|
|
101
|
+
if (!data.hasOwnProperty(property)) {
|
|
102
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_iterator.e(err);
|
|
108
|
+
} finally {
|
|
109
|
+
_iterator.f();
|
|
110
|
+
}
|
|
111
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}]);
|
|
121
|
+
}();
|
|
122
|
+
MpcStakeSource.RequiredProperties = ["source_type", "wallet_id", "address"];
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @member {module:model/StakeSourceType} source_type
|
|
126
|
+
*/
|
|
127
|
+
MpcStakeSource.prototype['source_type'] = undefined;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The wallet ID.
|
|
131
|
+
* @member {String} wallet_id
|
|
132
|
+
*/
|
|
133
|
+
MpcStakeSource.prototype['wallet_id'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The wallet address.
|
|
137
|
+
* @member {String} address
|
|
138
|
+
*/
|
|
139
|
+
MpcStakeSource.prototype['address'] = undefined;
|
|
140
|
+
|
|
141
|
+
// Implement BaseStakeSource interface:
|
|
142
|
+
/**
|
|
143
|
+
* @member {module:model/StakeSourceType} source_type
|
|
144
|
+
*/
|
|
145
|
+
_BaseStakeSource["default"].prototype['source_type'] = undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The wallet ID.
|
|
148
|
+
* @member {String} wallet_id
|
|
149
|
+
*/
|
|
150
|
+
_BaseStakeSource["default"].prototype['wallet_id'] = undefined;
|
|
151
|
+
/**
|
|
152
|
+
* The wallet address.
|
|
153
|
+
* @member {String} address
|
|
154
|
+
*/
|
|
155
|
+
_BaseStakeSource["default"].prototype['address'] = undefined;
|
|
156
|
+
var _default = exports["default"] = MpcStakeSource;
|
|
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
19
19
|
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); } /**
|
|
20
20
|
* Cobo Wallet as a Service 2.0
|
|
21
21
|
*
|
|
22
|
-
* Contact:
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
25
|
* https://openapi-generator.tech
|
|
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
var MpcTransferSource = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
35
35
|
* Constructs a new <code>MpcTransferSource</code>.
|
|
36
|
-
* The information about the transaction source types `Org-Controlled` and `User-Controlled`.
|
|
36
|
+
* The information about the transaction source types `Org-Controlled` and `User-Controlled`. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. If you specify both the `address` or `included_utxos` properties, the specified included UTXOs must belong to the address. Switch between the tabs to display the properties for different transaction sources.
|
|
37
37
|
* @alias module:model/MpcTransferSource
|
|
38
38
|
* @param source_type {module:model/WalletSubtype}
|
|
39
39
|
* @param wallet_id {String} The wallet ID.
|
package/dist/model/Pagination.js
CHANGED
|
@@ -17,7 +17,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
18
|
* Cobo Wallet as a Service 2.0
|
|
19
19
|
*
|
|
20
|
-
* Contact:
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
21
|
*
|
|
22
22
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
23
|
* https://openapi-generator.tech
|
|
@@ -22,7 +22,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
22
22
|
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); } /**
|
|
23
23
|
* Cobo Wallet as a Service 2.0
|
|
24
24
|
*
|
|
25
|
-
* Contact:
|
|
25
|
+
* Contact: help@cobo.com
|
|
26
26
|
*
|
|
27
27
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
28
|
* https://openapi-generator.tech
|
|
@@ -38,15 +38,15 @@ var PoolDetails = /*#__PURE__*/function () {
|
|
|
38
38
|
* Constructs a new <code>PoolDetails</code>.
|
|
39
39
|
* @alias module:model/PoolDetails
|
|
40
40
|
* @implements module:model/PoolSummary
|
|
41
|
-
* @param id {String} The
|
|
42
|
-
* @param chain_id {String} The
|
|
41
|
+
* @param id {String} The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token.
|
|
42
|
+
* @param chain_id {String} The chain ID.
|
|
43
43
|
* @param protocol {String} The name of the protocol.
|
|
44
44
|
* @param protocol_icon_url {String} The URL of the protocol's icon.
|
|
45
|
-
* @param supported_wallet_types {Array.<module:model/WalletType>} The
|
|
46
|
-
* @param supported_wallet_subtypes {Array.<module:model/WalletSubtype>} The
|
|
47
|
-
* @param token_id {String} The
|
|
48
|
-
* @param est_apr {Number} The estimated APR.
|
|
49
|
-
* @param validators_info {Array.<module:model/PoolDetailsAllOfValidatorsInfo>}
|
|
45
|
+
* @param supported_wallet_types {Array.<module:model/WalletType>} The wallet type. Possible values include: - `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)
|
|
46
|
+
* @param supported_wallet_subtypes {Array.<module:model/WalletSubtype>} The wallet subtype. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Web3`: Custodial Wallets (Web3 Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
|
|
47
|
+
* @param token_id {String} The token ID.
|
|
48
|
+
* @param est_apr {Number} The estimated annual percentage rate (APR).
|
|
49
|
+
* @param validators_info {Array.<module:model/PoolDetailsAllOfValidatorsInfo>} A list of available validators.
|
|
50
50
|
*/
|
|
51
51
|
function PoolDetails(id, chain_id, protocol, protocol_icon_url, supported_wallet_types, supported_wallet_subtypes, token_id, est_apr, validators_info) {
|
|
52
52
|
_classCallCheck(this, PoolDetails);
|
|
@@ -225,13 +225,13 @@ var PoolDetails = /*#__PURE__*/function () {
|
|
|
225
225
|
PoolDetails.RequiredProperties = ["id", "chain_id", "protocol", "protocol_icon_url", "supported_wallet_types", "supported_wallet_subtypes", "token_id", "est_apr", "validators_info"];
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* The
|
|
228
|
+
* The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token.
|
|
229
229
|
* @member {String} id
|
|
230
230
|
*/
|
|
231
231
|
PoolDetails.prototype['id'] = undefined;
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
|
-
* The
|
|
234
|
+
* The chain ID.
|
|
235
235
|
* @member {String} chain_id
|
|
236
236
|
*/
|
|
237
237
|
PoolDetails.prototype['chain_id'] = undefined;
|
|
@@ -249,25 +249,25 @@ PoolDetails.prototype['protocol'] = undefined;
|
|
|
249
249
|
PoolDetails.prototype['protocol_icon_url'] = undefined;
|
|
250
250
|
|
|
251
251
|
/**
|
|
252
|
-
* The
|
|
252
|
+
* The wallet type. Possible values include: - `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)
|
|
253
253
|
* @member {Array.<module:model/WalletType>} supported_wallet_types
|
|
254
254
|
*/
|
|
255
255
|
PoolDetails.prototype['supported_wallet_types'] = undefined;
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
|
-
* The
|
|
258
|
+
* The wallet subtype. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Web3`: Custodial Wallets (Web3 Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
|
|
259
259
|
* @member {Array.<module:model/WalletSubtype>} supported_wallet_subtypes
|
|
260
260
|
*/
|
|
261
261
|
PoolDetails.prototype['supported_wallet_subtypes'] = undefined;
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
-
* The
|
|
264
|
+
* The token ID.
|
|
265
265
|
* @member {String} token_id
|
|
266
266
|
*/
|
|
267
267
|
PoolDetails.prototype['token_id'] = undefined;
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
|
-
* The estimated APR.
|
|
270
|
+
* The estimated annual percentage rate (APR).
|
|
271
271
|
* @member {Number} est_apr
|
|
272
272
|
*/
|
|
273
273
|
PoolDetails.prototype['est_apr'] = undefined;
|
|
@@ -278,55 +278,55 @@ PoolDetails.prototype['est_apr'] = undefined;
|
|
|
278
278
|
PoolDetails.prototype['pool_type'] = undefined;
|
|
279
279
|
|
|
280
280
|
/**
|
|
281
|
-
* The minimum amount
|
|
281
|
+
* The minimum amount that can be staked in one staking request.
|
|
282
282
|
* @member {String} min_amount
|
|
283
283
|
*/
|
|
284
284
|
PoolDetails.prototype['min_amount'] = undefined;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
|
-
* The maximum amount
|
|
287
|
+
* The maximum amount that can be staked in one staking request.
|
|
288
288
|
* @member {String} max_amount
|
|
289
289
|
*/
|
|
290
290
|
PoolDetails.prototype['max_amount'] = undefined;
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
|
-
* The minimum staking period in days.
|
|
293
|
+
* The minimum staking period, in days.
|
|
294
294
|
* @member {Number} min_stake_period
|
|
295
295
|
*/
|
|
296
296
|
PoolDetails.prototype['min_stake_period'] = undefined;
|
|
297
297
|
|
|
298
298
|
/**
|
|
299
|
-
* The maximum staking period in days.
|
|
299
|
+
* The maximum staking period, in days.
|
|
300
300
|
* @member {Number} max_stake_period
|
|
301
301
|
*/
|
|
302
302
|
PoolDetails.prototype['max_stake_period'] = undefined;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
|
-
* The minimum
|
|
305
|
+
* The minimum block number. A block number indicates the number of blocks that need to be processed before the locked tokens are unlocked and become accessible.
|
|
306
306
|
* @member {Number} min_stake_blocks
|
|
307
307
|
*/
|
|
308
308
|
PoolDetails.prototype['min_stake_blocks'] = undefined;
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
|
-
* The maximum
|
|
311
|
+
* The maximum block number. A block number indicates the number of blocks that need to be processed before the locked tokens are unlocked and become accessible.
|
|
312
312
|
* @member {Number} max_stake_blocks
|
|
313
313
|
*/
|
|
314
314
|
PoolDetails.prototype['max_stake_blocks'] = undefined;
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
*
|
|
317
|
+
* A list of available validators.
|
|
318
318
|
* @member {Array.<module:model/PoolDetailsAllOfValidatorsInfo>} validators_info
|
|
319
319
|
*/
|
|
320
320
|
PoolDetails.prototype['validators_info'] = undefined;
|
|
321
321
|
|
|
322
322
|
// Implement PoolSummary interface:
|
|
323
323
|
/**
|
|
324
|
-
* The
|
|
324
|
+
* The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token.
|
|
325
325
|
* @member {String} id
|
|
326
326
|
*/
|
|
327
327
|
_PoolSummary["default"].prototype['id'] = undefined;
|
|
328
328
|
/**
|
|
329
|
-
* The
|
|
329
|
+
* The chain ID.
|
|
330
330
|
* @member {String} chain_id
|
|
331
331
|
*/
|
|
332
332
|
_PoolSummary["default"].prototype['chain_id'] = undefined;
|
|
@@ -341,22 +341,22 @@ _PoolSummary["default"].prototype['protocol'] = undefined;
|
|
|
341
341
|
*/
|
|
342
342
|
_PoolSummary["default"].prototype['protocol_icon_url'] = undefined;
|
|
343
343
|
/**
|
|
344
|
-
* The
|
|
344
|
+
* The wallet type. Possible values include: - `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)
|
|
345
345
|
* @member {Array.<module:model/WalletType>} supported_wallet_types
|
|
346
346
|
*/
|
|
347
347
|
_PoolSummary["default"].prototype['supported_wallet_types'] = undefined;
|
|
348
348
|
/**
|
|
349
|
-
* The
|
|
349
|
+
* The wallet subtype. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Web3`: Custodial Wallets (Web3 Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
|
|
350
350
|
* @member {Array.<module:model/WalletSubtype>} supported_wallet_subtypes
|
|
351
351
|
*/
|
|
352
352
|
_PoolSummary["default"].prototype['supported_wallet_subtypes'] = undefined;
|
|
353
353
|
/**
|
|
354
|
-
* The
|
|
354
|
+
* The token ID.
|
|
355
355
|
* @member {String} token_id
|
|
356
356
|
*/
|
|
357
357
|
_PoolSummary["default"].prototype['token_id'] = undefined;
|
|
358
358
|
/**
|
|
359
|
-
* The estimated APR.
|
|
359
|
+
* The estimated annual percentage rate (APR).
|
|
360
360
|
* @member {Number} est_apr
|
|
361
361
|
*/
|
|
362
362
|
_PoolSummary["default"].prototype['est_apr'] = undefined;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BabylonValidator = _interopRequireDefault(require("./BabylonValidator"));
|
|
9
|
-
var
|
|
9
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
10
10
|
var _PoolDetailsAllOfValidatorsInfo;
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
12
|
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); }
|
|
@@ -18,7 +18,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
18
18
|
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); } /**
|
|
19
19
|
* Cobo Wallet as a Service 2.0
|
|
20
20
|
*
|
|
21
|
-
* Contact:
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
22
|
*
|
|
23
23
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
24
|
* https://openapi-generator.tech
|
|
@@ -33,7 +33,7 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>PoolDetailsAllOfValidatorsInfo</code>.
|
|
35
35
|
* @alias module:model/PoolDetailsAllOfValidatorsInfo
|
|
36
|
-
* @param {(module:model/BabylonValidator
|
|
36
|
+
* @param {(module:model/BabylonValidator)} instance The actual instance to initialize PoolDetailsAllOfValidatorsInfo.
|
|
37
37
|
*/
|
|
38
38
|
function PoolDetailsAllOfValidatorsInfo() {
|
|
39
39
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -51,6 +51,19 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
51
51
|
}
|
|
52
52
|
var match = 0;
|
|
53
53
|
var errorMessages = [];
|
|
54
|
+
var discriminatorValue = instance["pool_type"];
|
|
55
|
+
if (discriminatorValue) {
|
|
56
|
+
switch (discriminatorValue) {
|
|
57
|
+
case "Babylon":
|
|
58
|
+
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
59
|
+
match++;
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
54
67
|
try {
|
|
55
68
|
if (instance instanceof _BabylonValidator["default"]) {
|
|
56
69
|
this.actualInstance = instance;
|
|
@@ -58,36 +71,29 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
58
71
|
// plain JS object
|
|
59
72
|
// create BabylonValidator from JS object
|
|
60
73
|
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
61
|
-
} else
|
|
62
|
-
|
|
74
|
+
} else {
|
|
75
|
+
if (_BabylonValidator["default"].constructFromObject(instance)) {
|
|
76
|
+
if (!!_BabylonValidator["default"].constructFromObject(instance).toJSON) {
|
|
77
|
+
if (_BabylonValidator["default"].constructFromObject(instance).toJSON()) {
|
|
78
|
+
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
this.actualInstance = _BabylonValidator["default"].constructFromObject(instance);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
63
84
|
}
|
|
64
85
|
match++;
|
|
65
86
|
} catch (err) {
|
|
66
87
|
// json data failed to deserialize into BabylonValidator
|
|
67
88
|
errorMessages.push("Failed to construct BabylonValidator: " + err);
|
|
68
89
|
}
|
|
69
|
-
try {
|
|
70
|
-
if (instance instanceof _EigenlayerValidator["default"]) {
|
|
71
|
-
this.actualInstance = instance;
|
|
72
|
-
} else if (!!_EigenlayerValidator["default"].validateJSON && _EigenlayerValidator["default"].validateJSON(instance)) {
|
|
73
|
-
// plain JS object
|
|
74
|
-
// create EigenlayerValidator from JS object
|
|
75
|
-
this.actualInstance = _EigenlayerValidator["default"].constructFromObject(instance);
|
|
76
|
-
} else if (_EigenlayerValidator["default"].constructFromObject(instance)) {
|
|
77
|
-
this.actualInstance = _EigenlayerValidator["default"].constructFromObject(instance);
|
|
78
|
-
}
|
|
79
|
-
match++;
|
|
80
|
-
} catch (err) {
|
|
81
|
-
// json data failed to deserialize into EigenlayerValidator
|
|
82
|
-
errorMessages.push("Failed to construct EigenlayerValidator: " + err);
|
|
83
|
-
}
|
|
84
90
|
|
|
85
91
|
// if (match > 1) {
|
|
86
|
-
// throw new Error("Multiple matches found constructing `PoolDetailsAllOfValidatorsInfo` with oneOf schemas BabylonValidator
|
|
92
|
+
// throw new Error("Multiple matches found constructing `PoolDetailsAllOfValidatorsInfo` with oneOf schemas BabylonValidator. Input: " + JSON.stringify(instance));
|
|
87
93
|
// } else
|
|
88
94
|
if (match === 0) {
|
|
89
95
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
90
|
-
// throw new Error("No match found constructing `PoolDetailsAllOfValidatorsInfo` with oneOf schemas BabylonValidator
|
|
96
|
+
// throw new Error("No match found constructing `PoolDetailsAllOfValidatorsInfo` with oneOf schemas BabylonValidator. Details: " +
|
|
91
97
|
// errorMessages.join(", "));
|
|
92
98
|
return;
|
|
93
99
|
} else {// only 1 match
|
|
@@ -106,16 +112,16 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
106
112
|
key: "getActualInstance",
|
|
107
113
|
value:
|
|
108
114
|
/**
|
|
109
|
-
* Gets the actual instance, which can be <code>BabylonValidator</code
|
|
110
|
-
* @return {(module:model/BabylonValidator
|
|
115
|
+
* Gets the actual instance, which can be <code>BabylonValidator</code>.
|
|
116
|
+
* @return {(module:model/BabylonValidator)} The actual instance.
|
|
111
117
|
*/
|
|
112
118
|
function getActualInstance() {
|
|
113
119
|
return this.actualInstance;
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
/**
|
|
117
|
-
* Sets the actual instance, which can be <code>BabylonValidator</code
|
|
118
|
-
* @param {(module:model/BabylonValidator
|
|
123
|
+
* Sets the actual instance, which can be <code>BabylonValidator</code>.
|
|
124
|
+
* @param {(module:model/BabylonValidator)} obj The actual instance.
|
|
119
125
|
*/
|
|
120
126
|
}, {
|
|
121
127
|
key: "setActualInstance",
|
|
@@ -130,8 +136,7 @@ var PoolDetailsAllOfValidatorsInfo = /*#__PURE__*/function () {
|
|
|
130
136
|
}]);
|
|
131
137
|
}();
|
|
132
138
|
/**
|
|
133
|
-
*
|
|
134
|
-
* @member {String} icon_url
|
|
139
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
135
140
|
*/
|
|
136
141
|
_PoolDetailsAllOfValidatorsInfo = PoolDetailsAllOfValidatorsInfo;
|
|
137
142
|
/**
|
|
@@ -142,42 +147,42 @@ _PoolDetailsAllOfValidatorsInfo = PoolDetailsAllOfValidatorsInfo;
|
|
|
142
147
|
_defineProperty(PoolDetailsAllOfValidatorsInfo, "fromJSON", function (json_string) {
|
|
143
148
|
return _PoolDetailsAllOfValidatorsInfo.constructFromObject(JSON.parse(json_string));
|
|
144
149
|
});
|
|
150
|
+
PoolDetailsAllOfValidatorsInfo.prototype['pool_type'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The URL of the validator's icon.
|
|
154
|
+
* @member {String} icon_url
|
|
155
|
+
*/
|
|
145
156
|
PoolDetailsAllOfValidatorsInfo.prototype['icon_url'] = undefined;
|
|
146
157
|
|
|
147
158
|
/**
|
|
148
|
-
* The name
|
|
159
|
+
* The validator's name.
|
|
149
160
|
* @member {String} name
|
|
150
161
|
*/
|
|
151
162
|
PoolDetailsAllOfValidatorsInfo.prototype['name'] = undefined;
|
|
152
163
|
|
|
153
164
|
/**
|
|
154
|
-
*
|
|
165
|
+
* This property can be ignored.
|
|
155
166
|
* @member {Number} priority
|
|
156
167
|
*/
|
|
157
168
|
PoolDetailsAllOfValidatorsInfo.prototype['priority'] = undefined;
|
|
158
169
|
|
|
159
170
|
/**
|
|
160
|
-
* The public key of validator.
|
|
171
|
+
* The public key of the validator.
|
|
161
172
|
* @member {String} public_key
|
|
162
173
|
*/
|
|
163
174
|
PoolDetailsAllOfValidatorsInfo.prototype['public_key'] = undefined;
|
|
164
175
|
|
|
165
176
|
/**
|
|
166
|
-
* The commission of validator.
|
|
177
|
+
* The commission rate of the validator.
|
|
167
178
|
* @member {Number} commission_rate
|
|
168
179
|
*/
|
|
169
180
|
PoolDetailsAllOfValidatorsInfo.prototype['commission_rate'] = undefined;
|
|
170
181
|
|
|
171
182
|
/**
|
|
172
|
-
*
|
|
183
|
+
* A list of supported Proof-of-Stake (PoS) chains.
|
|
173
184
|
* @member {Array.<module:model/PoolDetailsAllOfValidatorsInfo.SupportedPosChainsEnum>} supported_pos_chains
|
|
174
185
|
*/
|
|
175
186
|
PoolDetailsAllOfValidatorsInfo.prototype['supported_pos_chains'] = undefined;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* The address of validator.
|
|
179
|
-
* @member {String} address
|
|
180
|
-
*/
|
|
181
|
-
PoolDetailsAllOfValidatorsInfo.prototype['address'] = undefined;
|
|
182
|
-
PoolDetailsAllOfValidatorsInfo.OneOf = ["BabylonValidator", "EigenlayerValidator"];
|
|
187
|
+
PoolDetailsAllOfValidatorsInfo.OneOf = ["BabylonValidator"];
|
|
183
188
|
var _default = exports["default"] = PoolDetailsAllOfValidatorsInfo;
|
|
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
19
19
|
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); } /**
|
|
20
20
|
* Cobo Wallet as a Service 2.0
|
|
21
21
|
*
|
|
22
|
-
* Contact:
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
23
|
*
|
|
24
24
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
25
|
* https://openapi-generator.tech
|
|
@@ -33,16 +33,16 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
33
33
|
var PoolSummary = /*#__PURE__*/function () {
|
|
34
34
|
/**
|
|
35
35
|
* Constructs a new <code>PoolSummary</code>.
|
|
36
|
-
* The
|
|
36
|
+
* The basic information of the staking pool.
|
|
37
37
|
* @alias module:model/PoolSummary
|
|
38
|
-
* @param id {String} The
|
|
39
|
-
* @param chain_id {String} The
|
|
38
|
+
* @param id {String} The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token.
|
|
39
|
+
* @param chain_id {String} The chain ID.
|
|
40
40
|
* @param protocol {String} The name of the protocol.
|
|
41
41
|
* @param protocol_icon_url {String} The URL of the protocol's icon.
|
|
42
|
-
* @param supported_wallet_types {Array.<module:model/WalletType>} The
|
|
43
|
-
* @param supported_wallet_subtypes {Array.<module:model/WalletSubtype>} The
|
|
44
|
-
* @param token_id {String} The
|
|
45
|
-
* @param est_apr {Number} The estimated APR.
|
|
42
|
+
* @param supported_wallet_types {Array.<module:model/WalletType>} The wallet type. Possible values include: - `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)
|
|
43
|
+
* @param supported_wallet_subtypes {Array.<module:model/WalletSubtype>} The wallet subtype. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Web3`: Custodial Wallets (Web3 Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
|
|
44
|
+
* @param token_id {String} The token ID.
|
|
45
|
+
* @param est_apr {Number} The estimated annual percentage rate (APR).
|
|
46
46
|
*/
|
|
47
47
|
function PoolSummary(id, chain_id, protocol, protocol_icon_url, supported_wallet_types, supported_wallet_subtypes, token_id, est_apr) {
|
|
48
48
|
_classCallCheck(this, PoolSummary);
|
|
@@ -165,13 +165,13 @@ var PoolSummary = /*#__PURE__*/function () {
|
|
|
165
165
|
PoolSummary.RequiredProperties = ["id", "chain_id", "protocol", "protocol_icon_url", "supported_wallet_types", "supported_wallet_subtypes", "token_id", "est_apr"];
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
|
-
* The
|
|
168
|
+
* The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token.
|
|
169
169
|
* @member {String} id
|
|
170
170
|
*/
|
|
171
171
|
PoolSummary.prototype['id'] = undefined;
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* The
|
|
174
|
+
* The chain ID.
|
|
175
175
|
* @member {String} chain_id
|
|
176
176
|
*/
|
|
177
177
|
PoolSummary.prototype['chain_id'] = undefined;
|
|
@@ -189,25 +189,25 @@ PoolSummary.prototype['protocol'] = undefined;
|
|
|
189
189
|
PoolSummary.prototype['protocol_icon_url'] = undefined;
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* The
|
|
192
|
+
* The wallet type. Possible values include: - `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)
|
|
193
193
|
* @member {Array.<module:model/WalletType>} supported_wallet_types
|
|
194
194
|
*/
|
|
195
195
|
PoolSummary.prototype['supported_wallet_types'] = undefined;
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
* The
|
|
198
|
+
* The wallet subtype. Possible values include: - `Asset`: Custodial Wallets (Asset Wallets). - `Web3`: Custodial Wallets (Web3 Wallets). - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets). - `User-Controlled`: MPC Wallets (User-Controlled Wallets). - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}). - `Main`: Exchange Wallets (Main Account). - `Sub`: Exchange Wallets (Sub Account).
|
|
199
199
|
* @member {Array.<module:model/WalletSubtype>} supported_wallet_subtypes
|
|
200
200
|
*/
|
|
201
201
|
PoolSummary.prototype['supported_wallet_subtypes'] = undefined;
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
|
-
* The
|
|
204
|
+
* The token ID.
|
|
205
205
|
* @member {String} token_id
|
|
206
206
|
*/
|
|
207
207
|
PoolSummary.prototype['token_id'] = undefined;
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
|
-
* The estimated APR.
|
|
210
|
+
* The estimated annual percentage rate (APR).
|
|
211
211
|
* @member {Number} est_apr
|
|
212
212
|
*/
|
|
213
213
|
PoolSummary.prototype['est_apr'] = undefined;
|