@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
|
@@ -21,7 +21,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
21
21
|
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); } /**
|
|
22
22
|
* Cobo Wallet as a Service 2.0
|
|
23
23
|
*
|
|
24
|
-
* Contact:
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
25
|
*
|
|
26
26
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
27
|
* https://openapi-generator.tech
|
|
@@ -54,6 +54,31 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
54
54
|
}
|
|
55
55
|
var match = 0;
|
|
56
56
|
var errorMessages = [];
|
|
57
|
+
var discriminatorValue = instance["wallet_type"];
|
|
58
|
+
if (discriminatorValue) {
|
|
59
|
+
switch (discriminatorValue) {
|
|
60
|
+
case "Custodial":
|
|
61
|
+
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
62
|
+
match++;
|
|
63
|
+
break;
|
|
64
|
+
case "Exchange":
|
|
65
|
+
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
68
|
+
case "MPC":
|
|
69
|
+
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
70
|
+
match++;
|
|
71
|
+
break;
|
|
72
|
+
case "SmartContract":
|
|
73
|
+
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
74
|
+
match++;
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
57
82
|
try {
|
|
58
83
|
if (instance instanceof _UpdateCustodialWalletParams["default"]) {
|
|
59
84
|
this.actualInstance = instance;
|
|
@@ -61,8 +86,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
61
86
|
// plain JS object
|
|
62
87
|
// create UpdateCustodialWalletParams from JS object
|
|
63
88
|
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
64
|
-
} else
|
|
65
|
-
|
|
89
|
+
} else {
|
|
90
|
+
if (_UpdateCustodialWalletParams["default"].constructFromObject(instance)) {
|
|
91
|
+
if (!!_UpdateCustodialWalletParams["default"].constructFromObject(instance).toJSON) {
|
|
92
|
+
if (_UpdateCustodialWalletParams["default"].constructFromObject(instance).toJSON()) {
|
|
93
|
+
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
66
99
|
}
|
|
67
100
|
match++;
|
|
68
101
|
} catch (err) {
|
|
@@ -76,8 +109,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
76
109
|
// plain JS object
|
|
77
110
|
// create UpdateMpcWalletParams from JS object
|
|
78
111
|
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
79
|
-
} else
|
|
80
|
-
|
|
112
|
+
} else {
|
|
113
|
+
if (_UpdateMpcWalletParams["default"].constructFromObject(instance)) {
|
|
114
|
+
if (!!_UpdateMpcWalletParams["default"].constructFromObject(instance).toJSON) {
|
|
115
|
+
if (_UpdateMpcWalletParams["default"].constructFromObject(instance).toJSON()) {
|
|
116
|
+
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
81
122
|
}
|
|
82
123
|
match++;
|
|
83
124
|
} catch (err) {
|
|
@@ -91,8 +132,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
91
132
|
// plain JS object
|
|
92
133
|
// create UpdateSmartContractWalletParams from JS object
|
|
93
134
|
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
94
|
-
} else
|
|
95
|
-
|
|
135
|
+
} else {
|
|
136
|
+
if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance)) {
|
|
137
|
+
if (!!_UpdateSmartContractWalletParams["default"].constructFromObject(instance).toJSON) {
|
|
138
|
+
if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance).toJSON()) {
|
|
139
|
+
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
140
|
+
}
|
|
141
|
+
} else {
|
|
142
|
+
this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
96
145
|
}
|
|
97
146
|
match++;
|
|
98
147
|
} catch (err) {
|
|
@@ -106,8 +155,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
|
|
|
106
155
|
// plain JS object
|
|
107
156
|
// create UpdateExchangeWalletParams from JS object
|
|
108
157
|
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
109
|
-
} else
|
|
110
|
-
|
|
158
|
+
} else {
|
|
159
|
+
if (_UpdateExchangeWalletParams["default"].constructFromObject(instance)) {
|
|
160
|
+
if (!!_UpdateExchangeWalletParams["default"].constructFromObject(instance).toJSON) {
|
|
161
|
+
if (_UpdateExchangeWalletParams["default"].constructFromObject(instance).toJSON()) {
|
|
162
|
+
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
111
168
|
}
|
|
112
169
|
match++;
|
|
113
170
|
} catch (err) {
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); } /**
|
|
16
16
|
* Cobo Wallet as a Service 2.0
|
|
17
17
|
*
|
|
18
|
-
* Contact:
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
19
|
*
|
|
20
20
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
21
|
* https://openapi-generator.tech
|
|
@@ -14,7 +14,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
14
14
|
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); } /**
|
|
15
15
|
* Cobo Wallet as a Service 2.0
|
|
16
16
|
*
|
|
17
|
-
* Contact:
|
|
17
|
+
* Contact: help@cobo.com
|
|
18
18
|
*
|
|
19
19
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
20
|
* https://openapi-generator.tech
|
|
@@ -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
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The WalletBalanceSnapshot model module.
|
|
29
|
+
* @module model/WalletBalanceSnapshot
|
|
30
|
+
*/
|
|
31
|
+
var WalletBalanceSnapshot = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>WalletBalanceSnapshot</code>.
|
|
34
|
+
* The snapshot information.
|
|
35
|
+
* @alias module:model/WalletBalanceSnapshot
|
|
36
|
+
* @param snapshot_id {Number} The snapshot ID.
|
|
37
|
+
*/
|
|
38
|
+
function WalletBalanceSnapshot(snapshot_id) {
|
|
39
|
+
_classCallCheck(this, WalletBalanceSnapshot);
|
|
40
|
+
WalletBalanceSnapshot.initialize(this, snapshot_id);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(WalletBalanceSnapshot, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, snapshot_id) {
|
|
51
|
+
obj['snapshot_id'] = snapshot_id;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>WalletBalanceSnapshot</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/WalletBalanceSnapshot} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/WalletBalanceSnapshot} The populated <code>WalletBalanceSnapshot</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new WalletBalanceSnapshot();
|
|
66
|
+
if (data.hasOwnProperty('snapshot_id')) {
|
|
67
|
+
obj['snapshot_id'] = _ApiClient["default"].convertToType(data['snapshot_id'], 'Number');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('snapshot_name')) {
|
|
70
|
+
obj['snapshot_name'] = _ApiClient["default"].convertToType(data['snapshot_name'], 'String');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>WalletBalanceSnapshot</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>WalletBalanceSnapshot</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// check to make sure all required properties are present in the JSON string
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(WalletBalanceSnapshot.RequiredProperties),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var property = _step.value;
|
|
90
|
+
if (!data.hasOwnProperty(property)) {
|
|
91
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ensure the json data is a string
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_iterator.e(err);
|
|
97
|
+
} finally {
|
|
98
|
+
_iterator.f();
|
|
99
|
+
}
|
|
100
|
+
if (data['snapshot_name'] && !(typeof data['snapshot_name'] === 'string' || data['snapshot_name'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `snapshot_name` to be a primitive type in the JSON string but got " + data['snapshot_name']);
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
}();
|
|
107
|
+
WalletBalanceSnapshot.RequiredProperties = ["snapshot_id"];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The snapshot ID.
|
|
111
|
+
* @member {Number} snapshot_id
|
|
112
|
+
*/
|
|
113
|
+
WalletBalanceSnapshot.prototype['snapshot_id'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The snapshot name.
|
|
117
|
+
* @member {String} snapshot_name
|
|
118
|
+
*/
|
|
119
|
+
WalletBalanceSnapshot.prototype['snapshot_name'] = undefined;
|
|
120
|
+
var _default = exports["default"] = WalletBalanceSnapshot;
|
|
@@ -0,0 +1,163 @@
|
|
|
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 _WalletType = _interopRequireDefault(require("./WalletType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The WalletBalanceSnapshotRecord model module.
|
|
30
|
+
* @module model/WalletBalanceSnapshotRecord
|
|
31
|
+
*/
|
|
32
|
+
var WalletBalanceSnapshotRecord = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>WalletBalanceSnapshotRecord</code>.
|
|
35
|
+
* The token snapshot detail information.
|
|
36
|
+
* @alias module:model/WalletBalanceSnapshotRecord
|
|
37
|
+
* @param wallet_id {String} The wallet ID.
|
|
38
|
+
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
39
|
+
* @param balance {String} The balance of the token.
|
|
40
|
+
*/
|
|
41
|
+
function WalletBalanceSnapshotRecord(wallet_id, token_id, balance) {
|
|
42
|
+
_classCallCheck(this, WalletBalanceSnapshotRecord);
|
|
43
|
+
WalletBalanceSnapshotRecord.initialize(this, wallet_id, token_id, balance);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(WalletBalanceSnapshotRecord, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, wallet_id, token_id, balance) {
|
|
54
|
+
obj['wallet_id'] = wallet_id;
|
|
55
|
+
obj['token_id'] = token_id;
|
|
56
|
+
obj['balance'] = balance;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>WalletBalanceSnapshotRecord</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/WalletBalanceSnapshotRecord} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/WalletBalanceSnapshotRecord} The populated <code>WalletBalanceSnapshotRecord</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new WalletBalanceSnapshotRecord();
|
|
71
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
72
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('wallet_type')) {
|
|
75
|
+
obj['wallet_type'] = _WalletType["default"].constructFromObject(data['wallet_type']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('wallet_name')) {
|
|
78
|
+
obj['wallet_name'] = _ApiClient["default"].convertToType(data['wallet_name'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('token_id')) {
|
|
81
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('balance')) {
|
|
84
|
+
obj['balance'] = _ApiClient["default"].convertToType(data['balance'], 'String');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return obj;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Validates the JSON data with respect to <code>WalletBalanceSnapshotRecord</code>.
|
|
92
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
93
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>WalletBalanceSnapshotRecord</code>.
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "validateJSON",
|
|
97
|
+
value: function validateJSON(data) {
|
|
98
|
+
// check to make sure all required properties are present in the JSON string
|
|
99
|
+
var _iterator = _createForOfIteratorHelper(WalletBalanceSnapshotRecord.RequiredProperties),
|
|
100
|
+
_step;
|
|
101
|
+
try {
|
|
102
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103
|
+
var property = _step.value;
|
|
104
|
+
if (!data.hasOwnProperty(property)) {
|
|
105
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// ensure the json data is a string
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator.f();
|
|
113
|
+
}
|
|
114
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
115
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
118
|
+
if (data['wallet_name'] && !(typeof data['wallet_name'] === 'string' || data['wallet_name'] instanceof String)) {
|
|
119
|
+
throw new Error("Expected the field `wallet_name` to be a primitive type in the JSON string but got " + data['wallet_name']);
|
|
120
|
+
}
|
|
121
|
+
// ensure the json data is a string
|
|
122
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
124
|
+
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['balance'] && !(typeof data['balance'] === 'string' || data['balance'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `balance` to be a primitive type in the JSON string but got " + data['balance']);
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
}]);
|
|
132
|
+
}();
|
|
133
|
+
WalletBalanceSnapshotRecord.RequiredProperties = ["wallet_id", "token_id", "balance"];
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The wallet ID.
|
|
137
|
+
* @member {String} wallet_id
|
|
138
|
+
*/
|
|
139
|
+
WalletBalanceSnapshotRecord.prototype['wallet_id'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/WalletType} wallet_type
|
|
143
|
+
*/
|
|
144
|
+
WalletBalanceSnapshotRecord.prototype['wallet_type'] = undefined;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The wallet name.
|
|
148
|
+
* @member {String} wallet_name
|
|
149
|
+
*/
|
|
150
|
+
WalletBalanceSnapshotRecord.prototype['wallet_name'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 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).
|
|
154
|
+
* @member {String} token_id
|
|
155
|
+
*/
|
|
156
|
+
WalletBalanceSnapshotRecord.prototype['token_id'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The balance of the token.
|
|
160
|
+
* @member {String} balance
|
|
161
|
+
*/
|
|
162
|
+
WalletBalanceSnapshotRecord.prototype['balance'] = undefined;
|
|
163
|
+
var _default = exports["default"] = WalletBalanceSnapshotRecord;
|
package/dist/model/WalletInfo.js
CHANGED
|
@@ -25,7 +25,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
25
25
|
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); } /**
|
|
26
26
|
* Cobo Wallet as a Service 2.0
|
|
27
27
|
*
|
|
28
|
-
* Contact:
|
|
28
|
+
* Contact: help@cobo.com
|
|
29
29
|
*
|
|
30
30
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
31
31
|
* https://openapi-generator.tech
|
|
@@ -58,6 +58,31 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
58
58
|
}
|
|
59
59
|
var match = 0;
|
|
60
60
|
var errorMessages = [];
|
|
61
|
+
var discriminatorValue = instance["wallet_type"];
|
|
62
|
+
if (discriminatorValue) {
|
|
63
|
+
switch (discriminatorValue) {
|
|
64
|
+
case "Custodial":
|
|
65
|
+
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
68
|
+
case "Exchange":
|
|
69
|
+
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
70
|
+
match++;
|
|
71
|
+
break;
|
|
72
|
+
case "MPC":
|
|
73
|
+
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
74
|
+
match++;
|
|
75
|
+
break;
|
|
76
|
+
case "SmartContract":
|
|
77
|
+
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
78
|
+
match++;
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
61
86
|
try {
|
|
62
87
|
if (instance instanceof _CustodialWalletInfo["default"]) {
|
|
63
88
|
this.actualInstance = instance;
|
|
@@ -65,8 +90,16 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
65
90
|
// plain JS object
|
|
66
91
|
// create CustodialWalletInfo from JS object
|
|
67
92
|
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
68
|
-
} else
|
|
69
|
-
|
|
93
|
+
} else {
|
|
94
|
+
if (_CustodialWalletInfo["default"].constructFromObject(instance)) {
|
|
95
|
+
if (!!_CustodialWalletInfo["default"].constructFromObject(instance).toJSON) {
|
|
96
|
+
if (_CustodialWalletInfo["default"].constructFromObject(instance).toJSON()) {
|
|
97
|
+
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
70
103
|
}
|
|
71
104
|
match++;
|
|
72
105
|
} catch (err) {
|
|
@@ -80,8 +113,16 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
80
113
|
// plain JS object
|
|
81
114
|
// create MPCWalletInfo from JS object
|
|
82
115
|
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
83
|
-
} else
|
|
84
|
-
|
|
116
|
+
} else {
|
|
117
|
+
if (_MPCWalletInfo["default"].constructFromObject(instance)) {
|
|
118
|
+
if (!!_MPCWalletInfo["default"].constructFromObject(instance).toJSON) {
|
|
119
|
+
if (_MPCWalletInfo["default"].constructFromObject(instance).toJSON()) {
|
|
120
|
+
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
85
126
|
}
|
|
86
127
|
match++;
|
|
87
128
|
} catch (err) {
|
|
@@ -95,8 +136,16 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
95
136
|
// plain JS object
|
|
96
137
|
// create SmartContractWalletInfo from JS object
|
|
97
138
|
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
98
|
-
} else
|
|
99
|
-
|
|
139
|
+
} else {
|
|
140
|
+
if (_SmartContractWalletInfo["default"].constructFromObject(instance)) {
|
|
141
|
+
if (!!_SmartContractWalletInfo["default"].constructFromObject(instance).toJSON) {
|
|
142
|
+
if (_SmartContractWalletInfo["default"].constructFromObject(instance).toJSON()) {
|
|
143
|
+
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
100
149
|
}
|
|
101
150
|
match++;
|
|
102
151
|
} catch (err) {
|
|
@@ -110,8 +159,16 @@ var WalletInfo = /*#__PURE__*/function () {
|
|
|
110
159
|
// plain JS object
|
|
111
160
|
// create ExchangeWalletInfo from JS object
|
|
112
161
|
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
113
|
-
} else
|
|
114
|
-
|
|
162
|
+
} else {
|
|
163
|
+
if (_ExchangeWalletInfo["default"].constructFromObject(instance)) {
|
|
164
|
+
if (!!_ExchangeWalletInfo["default"].constructFromObject(instance).toJSON) {
|
|
165
|
+
if (_ExchangeWalletInfo["default"].constructFromObject(instance).toJSON()) {
|
|
166
|
+
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
115
172
|
}
|
|
116
173
|
match++;
|
|
117
174
|
} catch (err) {
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); } /**
|
|
16
16
|
* Cobo Wallet as a Service 2.0
|
|
17
17
|
*
|
|
18
|
-
* Contact:
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
19
|
*
|
|
20
20
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
21
|
* https://openapi-generator.tech
|
package/dist/model/WalletType.js
CHANGED
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); } /**
|
|
16
16
|
* Cobo Wallet as a Service 2.0
|
|
17
17
|
*
|
|
18
|
-
* Contact:
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
19
|
*
|
|
20
20
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
21
|
* https://openapi-generator.tech
|
|
@@ -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
|
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
15
15
|
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); } /**
|
|
16
16
|
* Cobo Wallet as a Service 2.0
|
|
17
17
|
*
|
|
18
|
-
* Contact:
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
19
|
*
|
|
20
20
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
21
|
* https://openapi-generator.tech
|
|
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
20
20
|
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); } /**
|
|
21
21
|
* Cobo Wallet as a Service 2.0
|
|
22
22
|
*
|
|
23
|
-
* Contact:
|
|
23
|
+
* Contact: help@cobo.com
|
|
24
24
|
*
|
|
25
25
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
26
|
* https://openapi-generator.tech
|