@cobo/cobo-waas2 1.7.0 → 1.9.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 +122 -29
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +7 -7
- package/dist/api/DevelopersApi.js +111 -1
- package/dist/api/DevelopersWebhooksApi.js +38 -38
- package/dist/api/OAuthApi.js +2 -2
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +45 -42
- package/dist/api/TransactionsApi.js +131 -42
- package/dist/api/TravelRuleApi.js +216 -0
- package/dist/api/WalletsApi.js +152 -81
- package/dist/api/WalletsExchangeWalletApi.js +13 -13
- package/dist/api/WalletsMPCWalletsApi.js +189 -77
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +385 -7
- package/dist/model/Activity.js +29 -0
- package/dist/model/ActivityAction.js +30 -0
- package/dist/model/ActivityExtra.js +274 -0
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressInfo.js +15 -2
- package/dist/model/AddressTransferDestination.js +37 -1
- package/dist/model/AddressesEventData.js +190 -0
- package/dist/model/ApiLogDetails.js +2 -2
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonStakeExtra.js +1 -1
- package/dist/model/BabylonStakingActivityDetailExtra.js +165 -0
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +28 -28
- package/dist/model/BaseContractCallSource.js +1 -1
- package/dist/model/BroadcastSignedTransactionsRequest.js +1 -1
- package/dist/model/CallbackMessage.js +288 -0
- package/dist/model/ChainInfo.js +2 -2
- package/dist/model/ChangeGuardPubkey200Response.js +110 -0
- package/dist/model/ContractCallParams.js +38 -2
- package/dist/model/CoreStakingActivityDetailExtra.js +164 -0
- package/dist/model/CreateAddressRequest.js +30 -4
- package/dist/model/CreateClaimActivity.js +2 -2
- package/dist/model/CreateClaimActivityRequest.js +3 -3
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMpcVaultRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/CreateStakeActivity.js +4 -6
- package/dist/model/CreateStakeActivityExtra.js +1 -1
- package/dist/model/CreateStakeActivityRequest.js +5 -7
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/CreateWebhookEndpointRequest.js +2 -2
- package/dist/model/CustodialTransferSource.js +1 -1
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/DestinationWalletType.js +61 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateClaimFee.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +2 -2
- package/dist/model/EstimateStakeFee.js +5 -7
- package/dist/model/EstimateTransferFeeParams.js +2 -2
- package/dist/model/EthStakeEstimatedFee.js +13 -0
- package/dist/model/EthStakingActivityDetailExtra.js +142 -0
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/EvmEIP191MessageSignDestination.js +1 -1
- package/dist/model/EvmEIP712MessageSignDestination.js +1 -1
- package/dist/model/ExchangeTransferDestination.js +1 -1
- package/dist/model/ExchangeTransferSource.js +1 -1
- package/dist/model/ExtendedTokenInfo.js +3 -3
- package/dist/model/GetStakingEstimationFee201Response.js +6 -0
- package/dist/model/GetStakingEstimationFeeRequest.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +143 -0
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListCallbackMessages200Response.js +145 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/ListSupportedCountries200ResponseInner.js +140 -0
- package/dist/model/LockUtxosRequestUtxosInner.js +2 -2
- package/dist/model/MPCDelegate.js +1 -1
- package/dist/model/MPCVaultEventData.js +279 -0
- package/dist/model/MaxTransferableValue.js +1 -1
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/MessageSignParams.js +2 -2
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/OrgInfo.js +133 -0
- package/dist/model/Pagination.js +4 -4
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RawMessageSignDestination.js +1 -1
- package/dist/model/RetryCallbackMessage201Response.js +83 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SafeContractCallSource.js +1 -1
- package/dist/model/SafeTransferSource.js +1 -1
- package/dist/model/SelectedEntityType.js +61 -0
- package/dist/model/SelfCustodyWallet.js +152 -0
- package/dist/model/SourceGroup.js +1 -1
- package/dist/model/StakingPoolId.js +5 -0
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +83 -0
- package/dist/model/SwapActivity.js +218 -0
- package/dist/model/SwapSummary.js +121 -0
- package/dist/model/SwapTokenPair.js +100 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +18 -3
- package/dist/model/TokenBalance.js +8 -8
- package/dist/model/TokenInfo.js +2 -2
- package/dist/model/Transaction.js +2 -2
- package/dist/model/TransactionApprovalDetail.js +121 -0
- package/dist/model/TransactionApprovalResult.js +66 -0
- package/dist/model/TransactionCustodialAssetWalletSource.js +1 -1
- package/dist/model/TransactionDepositFromAddressSource.js +1 -1
- package/dist/model/TransactionDepositFromLoopSource.js +1 -1
- package/dist/model/TransactionDepositFromWalletSource.js +1 -1
- package/dist/model/TransactionDepositToAddressDestination.js +17 -1
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDepositToWalletDestination.js +1 -1
- package/dist/model/TransactionDestination.js +6 -0
- package/dist/model/TransactionDetail.js +4 -4
- package/dist/model/TransactionDetails.js +4 -4
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +1 -1
- package/dist/model/TransactionMPCWalletSource.js +1 -1
- package/dist/model/TransactionMessageSignEIP191Destination.js +1 -1
- package/dist/model/TransactionMessageSignEIP712Destination.js +1 -1
- package/dist/model/TransactionRawMessageSignDestination.js +1 -1
- package/dist/model/TransactionRawTxInfo.js +17 -4
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFixedFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionRoleApprovalDetail.js +152 -0
- package/dist/model/TransactionSelectedUtxo.js +123 -0
- package/dist/model/TransactionSmartContractSafeWalletSource.js +1 -1
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTokeApproval.js +3 -3
- package/dist/model/TransactionTokenAmount.js +1 -1
- package/dist/model/TransactionTransferToAddressDestination.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +1 -1
- package/dist/model/TransactionUserApprovalDetail.js +162 -0
- package/dist/model/TransactionWebhookEventData.js +22 -7
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +38 -2
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +168 -0
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +222 -0
- package/dist/model/TravelRuleDepositLegalEntity.js +171 -0
- package/dist/model/TravelRuleDepositNaturalEntity.js +186 -0
- package/dist/model/TravelRuleDepositRequest.js +128 -0
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +222 -0
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +155 -0
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +222 -0
- package/dist/model/TravelRuleWithdrawLegalEntity.js +144 -0
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +159 -0
- package/dist/model/TravelRuleWithdrawRequest.js +128 -0
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +216 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +1 -1
- package/dist/model/UpdateWebhookEndpointByIdRequest.js +1 -1
- package/dist/model/Vasp.js +141 -0
- package/dist/model/WalletInfoEventData.js +175 -0
- package/dist/model/WebhookEventData.js +135 -14
- package/dist/model/WebhookEventDataType.js +17 -2
- package/dist/model/WebhookEventType.js +23 -8
- package/docs/Activity.md +2 -0
- package/docs/ActivityAction.md +12 -0
- package/docs/ActivityExtra.md +20 -0
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +4 -4
- package/docs/AddressInfo.md +2 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressesEventData.md +29 -0
- package/docs/ApiLogDetails.md +1 -1
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonStakeExtra.md +1 -1
- package/docs/BabylonStakingActivityDetailExtra.md +14 -0
- package/docs/{TokenBalanceBalance.md → Balance.md} +5 -5
- package/docs/BroadcastSignedTransactionsRequest.md +1 -1
- package/docs/CallbackMessage.md +46 -0
- package/docs/ChainInfo.md +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +15 -1
- package/docs/CoreStakingActivityDetailExtra.md +13 -0
- package/docs/CreateAddressRequest.md +4 -2
- package/docs/CreateClaimActivity.md +1 -1
- package/docs/CreateClaimActivityRequest.md +1 -1
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMpcVaultRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/CreateStakeActivity.md +1 -1
- package/docs/CreateStakeActivityExtra.md +1 -1
- package/docs/CreateStakeActivityRequest.md +1 -1
- package/docs/CreateWalletParams.md +1 -1
- package/docs/CreateWebhookEndpointRequest.md +1 -1
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DestinationWalletType.md +12 -0
- package/docs/DevelopersApi.md +119 -1
- package/docs/DevelopersWebhooksApi.md +23 -23
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateClaimFee.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +2 -2
- package/docs/EstimateStakeFee.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/EthStakeEstimatedFee.md +1 -0
- package/docs/EthStakingActivityDetailExtra.md +11 -0
- package/docs/ExtendedTokenInfo.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -0
- package/docs/GetStakingEstimationFeeRequest.md +2 -2
- package/docs/GetTransactionLimitation200Response.md +12 -0
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListCallbackMessages200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/ListSupportedCountries200ResponseInner.md +11 -0
- package/docs/LockUtxosRequestUtxosInner.md +1 -1
- package/docs/MPCVaultEventData.md +34 -0
- package/docs/MaxTransferableValue.md +1 -1
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/MessageSignParams.md +1 -1
- package/docs/OAuthApi.md +1 -1
- package/docs/OrgInfo.md +11 -0
- package/docs/Pagination.md +2 -2
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RetryCallbackMessage201Response.md +9 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelectedEntityType.md +12 -0
- package/docs/SelfCustodyWallet.md +12 -0
- package/docs/SourceGroup.md +1 -1
- package/docs/StakingPoolId.md +2 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/StakingsApi.md +30 -28
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +9 -0
- package/docs/SwapActivity.md +20 -0
- package/docs/SwapSummary.md +10 -0
- package/docs/SwapTokenPair.md +10 -0
- package/docs/TSSGroups.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +7 -1
- package/docs/TokenBalance.md +2 -2
- package/docs/TokenInfo.md +1 -1
- package/docs/Transaction.md +2 -2
- package/docs/TransactionApprovalDetail.md +11 -0
- package/docs/TransactionApprovalResult.md +14 -0
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionDetail.md +2 -2
- package/docs/TransactionDetails.md +2 -2
- package/docs/TransactionRawTxInfo.md +2 -1
- package/docs/TransactionRoleApprovalDetail.md +13 -0
- package/docs/TransactionSelectedUtxo.md +12 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTokeApproval.md +1 -1
- package/docs/TransactionTokenAmount.md +1 -1
- package/docs/TransactionUserApprovalDetail.md +15 -0
- package/docs/TransactionWebhookEventData.md +9 -3
- package/docs/TransactionsApi.md +129 -27
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +15 -1
- package/docs/TravelRuleApi.md +214 -0
- package/docs/TravelRuleDepositExchangesOrVASP.md +13 -0
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +29 -0
- package/docs/TravelRuleDepositLegalEntity.md +25 -0
- package/docs/TravelRuleDepositNaturalEntity.md +26 -0
- package/docs/TravelRuleDepositRequest.md +10 -0
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +16 -0
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +12 -0
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +16 -0
- package/docs/TravelRuleWithdrawLegalEntity.md +12 -0
- package/docs/TravelRuleWithdrawNaturalEntity.md +13 -0
- package/docs/TravelRuleWithdrawRequest.md +10 -0
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +15 -0
- package/docs/TriggerTestWebhookEventRequest.md +1 -1
- package/docs/UpdateWebhookEndpointByIdRequest.md +1 -1
- package/docs/Vasp.md +11 -0
- package/docs/WalletInfoEventData.md +29 -0
- package/docs/WalletsApi.md +112 -47
- package/docs/WalletsExchangeWalletApi.md +7 -7
- package/docs/WalletsMPCWalletsApi.md +160 -46
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +17 -5
- package/docs/WebhookEventDataType.md +7 -1
- package/docs/WebhookEventType.md +14 -8
- package/package.json +2 -2
|
@@ -0,0 +1,164 @@
|
|
|
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 _BaseStakeExtra = _interopRequireDefault(require("./BaseStakeExtra"));
|
|
9
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
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 CoreStakingActivityDetailExtra model module.
|
|
31
|
+
* @module model/CoreStakingActivityDetailExtra
|
|
32
|
+
*/
|
|
33
|
+
var CoreStakingActivityDetailExtra = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>CoreStakingActivityDetailExtra</code>.
|
|
36
|
+
* @alias module:model/CoreStakingActivityDetailExtra
|
|
37
|
+
* @implements module:model/BaseStakeExtra
|
|
38
|
+
* @param pool_type {module:model/StakingPoolType}
|
|
39
|
+
*/
|
|
40
|
+
function CoreStakingActivityDetailExtra(pool_type) {
|
|
41
|
+
_classCallCheck(this, CoreStakingActivityDetailExtra);
|
|
42
|
+
_BaseStakeExtra["default"].initialize(this, pool_type);
|
|
43
|
+
CoreStakingActivityDetailExtra.initialize(this, pool_type);
|
|
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(CoreStakingActivityDetailExtra, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, pool_type) {
|
|
54
|
+
obj['pool_type'] = pool_type;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>CoreStakingActivityDetailExtra</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/CoreStakingActivityDetailExtra} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/CoreStakingActivityDetailExtra} The populated <code>CoreStakingActivityDetailExtra</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new CoreStakingActivityDetailExtra();
|
|
69
|
+
_BaseStakeExtra["default"].constructFromObject(data, obj);
|
|
70
|
+
if (data.hasOwnProperty('pool_type')) {
|
|
71
|
+
obj['pool_type'] = _StakingPoolType["default"].constructFromObject(data['pool_type']);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('timelock')) {
|
|
74
|
+
obj['timelock'] = _ApiClient["default"].convertToType(data['timelock'], 'Number');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('change_address')) {
|
|
77
|
+
obj['change_address'] = _ApiClient["default"].convertToType(data['change_address'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('validator_address')) {
|
|
80
|
+
obj['validator_address'] = _ApiClient["default"].convertToType(data['validator_address'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('reward_address')) {
|
|
83
|
+
obj['reward_address'] = _ApiClient["default"].convertToType(data['reward_address'], 'String');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates the JSON data with respect to <code>CoreStakingActivityDetailExtra</code>.
|
|
91
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
92
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CoreStakingActivityDetailExtra</code>.
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "validateJSON",
|
|
96
|
+
value: function validateJSON(data) {
|
|
97
|
+
// check to make sure all required properties are present in the JSON string
|
|
98
|
+
var _iterator = _createForOfIteratorHelper(CoreStakingActivityDetailExtra.RequiredProperties),
|
|
99
|
+
_step;
|
|
100
|
+
try {
|
|
101
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
102
|
+
var property = _step.value;
|
|
103
|
+
if (!data.hasOwnProperty(property)) {
|
|
104
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
if (data['change_address'] && !(typeof data['change_address'] === 'string' || data['change_address'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `change_address` to be a primitive type in the JSON string but got " + data['change_address']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['validator_address'] && !(typeof data['validator_address'] === 'string' || data['validator_address'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `validator_address` to be a primitive type in the JSON string but got " + data['validator_address']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['reward_address'] && !(typeof data['reward_address'] === 'string' || data['reward_address'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `reward_address` to be a primitive type in the JSON string but got " + data['reward_address']);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
CoreStakingActivityDetailExtra.RequiredProperties = ["pool_type"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
132
|
+
*/
|
|
133
|
+
CoreStakingActivityDetailExtra.prototype['pool_type'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
|
|
137
|
+
* @member {Number} timelock
|
|
138
|
+
*/
|
|
139
|
+
CoreStakingActivityDetailExtra.prototype['timelock'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The change address on the Bitcoin chain. If not provided, the source wallet's address will be used as the change address.
|
|
143
|
+
* @member {String} change_address
|
|
144
|
+
*/
|
|
145
|
+
CoreStakingActivityDetailExtra.prototype['change_address'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The validator's EVM address.
|
|
149
|
+
* @member {String} validator_address
|
|
150
|
+
*/
|
|
151
|
+
CoreStakingActivityDetailExtra.prototype['validator_address'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The EVM address to receive staking rewards.
|
|
155
|
+
* @member {String} reward_address
|
|
156
|
+
*/
|
|
157
|
+
CoreStakingActivityDetailExtra.prototype['reward_address'] = undefined;
|
|
158
|
+
|
|
159
|
+
// Implement BaseStakeExtra interface:
|
|
160
|
+
/**
|
|
161
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
162
|
+
*/
|
|
163
|
+
_BaseStakeExtra["default"].prototype['pool_type'] = undefined;
|
|
164
|
+
var _default = exports["default"] = CoreStakingActivityDetailExtra;
|
|
@@ -33,8 +33,8 @@ var CreateAddressRequest = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>CreateAddressRequest</code>.
|
|
35
35
|
* @alias module:model/CreateAddressRequest
|
|
36
|
-
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
37
|
-
* @param count {Number} The number of addresses to create.
|
|
36
|
+
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
37
|
+
* @param count {Number} The number of addresses to create. This property will be ignored if you are generating tweaked Taproot addresses.
|
|
38
38
|
*/
|
|
39
39
|
function CreateAddressRequest(chain_id, count) {
|
|
40
40
|
_classCallCheck(this, CreateAddressRequest);
|
|
@@ -71,6 +71,12 @@ var CreateAddressRequest = /*#__PURE__*/function () {
|
|
|
71
71
|
if (data.hasOwnProperty('count')) {
|
|
72
72
|
obj['count'] = _ApiClient["default"].convertToType(data['count'], 'Number');
|
|
73
73
|
}
|
|
74
|
+
if (data.hasOwnProperty('taproot_script_tree_hashes')) {
|
|
75
|
+
obj['taproot_script_tree_hashes'] = _ApiClient["default"].convertToType(data['taproot_script_tree_hashes'], ['String']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('taproot_internal_address')) {
|
|
78
|
+
obj['taproot_internal_address'] = _ApiClient["default"].convertToType(data['taproot_internal_address'], 'String');
|
|
79
|
+
}
|
|
74
80
|
if (data.hasOwnProperty('encoding')) {
|
|
75
81
|
obj['encoding'] = _AddressEncoding["default"].constructFromObject(data['encoding']);
|
|
76
82
|
}
|
|
@@ -105,6 +111,14 @@ var CreateAddressRequest = /*#__PURE__*/function () {
|
|
|
105
111
|
if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
106
112
|
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
107
113
|
}
|
|
114
|
+
// ensure the json data is an array
|
|
115
|
+
if (!Array.isArray(data['taproot_script_tree_hashes'])) {
|
|
116
|
+
throw new Error("Expected the field `taproot_script_tree_hashes` to be an array in the JSON data but got " + data['taproot_script_tree_hashes']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data['taproot_internal_address'] && !(typeof data['taproot_internal_address'] === 'string' || data['taproot_internal_address'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `taproot_internal_address` to be a primitive type in the JSON string but got " + data['taproot_internal_address']);
|
|
121
|
+
}
|
|
108
122
|
return true;
|
|
109
123
|
}
|
|
110
124
|
}]);
|
|
@@ -112,18 +126,30 @@ var CreateAddressRequest = /*#__PURE__*/function () {
|
|
|
112
126
|
CreateAddressRequest.RequiredProperties = ["chain_id", "count"];
|
|
113
127
|
|
|
114
128
|
/**
|
|
115
|
-
* The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
129
|
+
* The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
116
130
|
* @member {String} chain_id
|
|
117
131
|
*/
|
|
118
132
|
CreateAddressRequest.prototype['chain_id'] = undefined;
|
|
119
133
|
|
|
120
134
|
/**
|
|
121
|
-
* The number of addresses to create.
|
|
135
|
+
* The number of addresses to create. This property will be ignored if you are generating tweaked Taproot addresses.
|
|
122
136
|
* @member {Number} count
|
|
123
137
|
* @default 1
|
|
124
138
|
*/
|
|
125
139
|
CreateAddressRequest.prototype['count'] = 1;
|
|
126
140
|
|
|
141
|
+
/**
|
|
142
|
+
* A list of script tree hashes used to generate a tweaked Taproot address. This property is required only if you want to generate tweaked Taproot addresses.
|
|
143
|
+
* @member {Array.<String>} taproot_script_tree_hashes
|
|
144
|
+
*/
|
|
145
|
+
CreateAddressRequest.prototype['taproot_script_tree_hashes'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The original Taproot address to be tweaked. This property is required only if you want to generate tweaked Taproot addresses.
|
|
149
|
+
* @member {String} taproot_internal_address
|
|
150
|
+
*/
|
|
151
|
+
CreateAddressRequest.prototype['taproot_internal_address'] = undefined;
|
|
152
|
+
|
|
127
153
|
/**
|
|
128
154
|
* @member {module:model/AddressEncoding} encoding
|
|
129
155
|
*/
|
|
@@ -33,7 +33,7 @@ var CreateClaimActivity = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>CreateClaimActivity</code>.
|
|
35
35
|
* @alias module:model/CreateClaimActivity
|
|
36
|
-
* @param staking_id {String} The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions).
|
|
36
|
+
* @param staking_id {String} The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-positions).
|
|
37
37
|
*/
|
|
38
38
|
function CreateClaimActivity(staking_id) {
|
|
39
39
|
_classCallCheck(this, CreateClaimActivity);
|
|
@@ -127,7 +127,7 @@ CreateClaimActivity.RequiredProperties = ["staking_id"];
|
|
|
127
127
|
CreateClaimActivity.prototype['request_id'] = undefined;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions).
|
|
130
|
+
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-positions).
|
|
131
131
|
* @member {String} staking_id
|
|
132
132
|
*/
|
|
133
133
|
CreateClaimActivity.prototype['staking_id'] = undefined;
|
|
@@ -37,7 +37,7 @@ var CreateClaimActivityRequest = /*#__PURE__*/function () {
|
|
|
37
37
|
* @alias module:model/CreateClaimActivityRequest
|
|
38
38
|
* @implements module:model/CreateClaimActivity
|
|
39
39
|
* @implements module:model/ActivityInitiator
|
|
40
|
-
* @param staking_id {String} The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions).
|
|
40
|
+
* @param staking_id {String} The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-positions).
|
|
41
41
|
*/
|
|
42
42
|
function CreateClaimActivityRequest(staking_id) {
|
|
43
43
|
_classCallCheck(this, CreateClaimActivityRequest);
|
|
@@ -142,7 +142,7 @@ CreateClaimActivityRequest.RequiredProperties = ["staking_id"];
|
|
|
142
142
|
CreateClaimActivityRequest.prototype['request_id'] = undefined;
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions).
|
|
145
|
+
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-positions).
|
|
146
146
|
* @member {String} staking_id
|
|
147
147
|
*/
|
|
148
148
|
CreateClaimActivityRequest.prototype['staking_id'] = undefined;
|
|
@@ -165,7 +165,7 @@ CreateClaimActivityRequest.prototype['app_initiator'] = undefined;
|
|
|
165
165
|
*/
|
|
166
166
|
_CreateClaimActivity["default"].prototype['request_id'] = undefined;
|
|
167
167
|
/**
|
|
168
|
-
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](/v2/api-references/stakings/list-staking-positions).
|
|
168
|
+
* The ID of the staking position. You can retrieve a list of staking positions by calling [List staking positions](https://www.cobo.com/developers/v2/api-references/stakings/list-staking-positions).
|
|
169
169
|
* @member {String} staking_id
|
|
170
170
|
*/
|
|
171
171
|
_CreateClaimActivity["default"].prototype['staking_id'] = undefined;
|
|
@@ -106,7 +106,7 @@ CreateKeyShareHolder.prototype['name'] = undefined;
|
|
|
106
106
|
CreateKeyShareHolder.prototype['type'] = undefined;
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Key share holder's TSS Node ID. You can obtain the TSS Node ID using either mobile co-signer or
|
|
109
|
+
* Key share holder's TSS Node ID. You can obtain the TSS Node ID using either mobile co-signer or server co-signer. See the \"Primary Purposes\" row on the table in [Create a Main Group](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/create-key-share-groups#create-a-main-group).
|
|
110
110
|
* @member {String} tss_node_id
|
|
111
111
|
*/
|
|
112
112
|
CreateKeyShareHolder.prototype['tss_node_id'] = undefined;
|
|
@@ -116,7 +116,7 @@ var CreateMpcVaultRequest = /*#__PURE__*/function () {
|
|
|
116
116
|
CreateMpcVaultRequest.RequiredProperties = ["name", "vault_type"];
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* The project ID, which you can retrieve by calling [List all projects](/v2/api-references/wallets--mpc-wallets/list-all-projects). **Notes:** 1. If you set `vault_type` to `OrgControlled`, the value of `project_id` will be ignored. 2. If you set `vault_type` to `UserControlled`, then `project_id` is required.
|
|
119
|
+
* The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). **Notes:** 1. If you set `vault_type` to `OrgControlled`, the value of `project_id` will be ignored. 2. If you set `vault_type` to `UserControlled`, then `project_id` is required.
|
|
120
120
|
* @member {String} project_id
|
|
121
121
|
*/
|
|
122
122
|
CreateMpcVaultRequest.prototype['project_id'] = undefined;
|
|
@@ -39,7 +39,7 @@ var CreateMpcWalletParams = /*#__PURE__*/function () {
|
|
|
39
39
|
* @param name {String} The wallet name.
|
|
40
40
|
* @param wallet_type {module:model/WalletType}
|
|
41
41
|
* @param wallet_subtype {module:model/WalletSubtype}
|
|
42
|
-
* @param vault_id {String} The ID of the owning vault. You can call [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
|
|
42
|
+
* @param vault_id {String} The ID of the owning vault. You can call [List all vaults](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
|
|
43
43
|
*/
|
|
44
44
|
function CreateMpcWalletParams(name, wallet_type, wallet_subtype, vault_id) {
|
|
45
45
|
_classCallCheck(this, CreateMpcWalletParams);
|
|
@@ -144,7 +144,7 @@ CreateMpcWalletParams.prototype['wallet_type'] = undefined;
|
|
|
144
144
|
CreateMpcWalletParams.prototype['wallet_subtype'] = undefined;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* The ID of the owning vault. You can call [List all vaults](/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
|
|
147
|
+
* The ID of the owning vault. You can call [List all vaults](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
|
|
148
148
|
* @member {String} vault_id
|
|
149
149
|
*/
|
|
150
150
|
CreateMpcWalletParams.prototype['vault_id'] = undefined;
|
|
@@ -0,0 +1,140 @@
|
|
|
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 _QueryGuardPubkey200ResponseAddressesInner = _interopRequireDefault(require("./QueryGuardPubkey200ResponseAddressesInner"));
|
|
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 CreatePrimeBrokerAddress201Response model module.
|
|
30
|
+
* @module model/CreatePrimeBrokerAddress201Response
|
|
31
|
+
*/
|
|
32
|
+
var CreatePrimeBrokerAddress201Response = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreatePrimeBrokerAddress201Response</code>.
|
|
35
|
+
* @alias module:model/CreatePrimeBrokerAddress201Response
|
|
36
|
+
* @param pubkey {String} The Cobo Guard's public key.
|
|
37
|
+
*/
|
|
38
|
+
function CreatePrimeBrokerAddress201Response(pubkey) {
|
|
39
|
+
_classCallCheck(this, CreatePrimeBrokerAddress201Response);
|
|
40
|
+
CreatePrimeBrokerAddress201Response.initialize(this, pubkey);
|
|
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(CreatePrimeBrokerAddress201Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, pubkey) {
|
|
51
|
+
obj['pubkey'] = pubkey;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>CreatePrimeBrokerAddress201Response</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/CreatePrimeBrokerAddress201Response} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/CreatePrimeBrokerAddress201Response} The populated <code>CreatePrimeBrokerAddress201Response</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new CreatePrimeBrokerAddress201Response();
|
|
66
|
+
if (data.hasOwnProperty('pubkey')) {
|
|
67
|
+
obj['pubkey'] = _ApiClient["default"].convertToType(data['pubkey'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('addresses')) {
|
|
70
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [_QueryGuardPubkey200ResponseAddressesInner["default"]]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>CreatePrimeBrokerAddress201Response</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>CreatePrimeBrokerAddress201Response</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(CreatePrimeBrokerAddress201Response.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['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
|
|
101
|
+
throw new Error("Expected the field `pubkey` to be a primitive type in the JSON string but got " + data['pubkey']);
|
|
102
|
+
}
|
|
103
|
+
if (data['addresses']) {
|
|
104
|
+
// data not null
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
if (!Array.isArray(data['addresses'])) {
|
|
107
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
108
|
+
}
|
|
109
|
+
// validate the optional field `addresses` (array)
|
|
110
|
+
var _iterator2 = _createForOfIteratorHelper(data['addresses']),
|
|
111
|
+
_step2;
|
|
112
|
+
try {
|
|
113
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
114
|
+
var item = _step2.value;
|
|
115
|
+
_QueryGuardPubkey200ResponseAddressesInner["default"].validateJSON(item);
|
|
116
|
+
}
|
|
117
|
+
} catch (err) {
|
|
118
|
+
_iterator2.e(err);
|
|
119
|
+
} finally {
|
|
120
|
+
_iterator2.f();
|
|
121
|
+
}
|
|
122
|
+
;
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
CreatePrimeBrokerAddress201Response.RequiredProperties = ["pubkey"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The Cobo Guard's public key.
|
|
132
|
+
* @member {String} pubkey
|
|
133
|
+
*/
|
|
134
|
+
CreatePrimeBrokerAddress201Response.prototype['pubkey'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {Array.<module:model/QueryGuardPubkey200ResponseAddressesInner>} addresses
|
|
138
|
+
*/
|
|
139
|
+
CreatePrimeBrokerAddress201Response.prototype['addresses'] = undefined;
|
|
140
|
+
var _default = exports["default"] = CreatePrimeBrokerAddress201Response;
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _QueryGuardPubkey200ResponseAddressesInner = _interopRequireDefault(require("./QueryGuardPubkey200ResponseAddressesInner"));
|
|
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 CreatePrimeBrokerAddressRequest model module.
|
|
30
|
+
* @module model/CreatePrimeBrokerAddressRequest
|
|
31
|
+
*/
|
|
32
|
+
var CreatePrimeBrokerAddressRequest = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreatePrimeBrokerAddressRequest</code>.
|
|
35
|
+
* @alias module:model/CreatePrimeBrokerAddressRequest
|
|
36
|
+
*/
|
|
37
|
+
function CreatePrimeBrokerAddressRequest() {
|
|
38
|
+
_classCallCheck(this, CreatePrimeBrokerAddressRequest);
|
|
39
|
+
CreatePrimeBrokerAddressRequest.initialize(this);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(CreatePrimeBrokerAddressRequest, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>CreatePrimeBrokerAddressRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/CreatePrimeBrokerAddressRequest} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/CreatePrimeBrokerAddressRequest} The populated <code>CreatePrimeBrokerAddressRequest</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new CreatePrimeBrokerAddressRequest();
|
|
63
|
+
if (data.hasOwnProperty('addresses')) {
|
|
64
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], [_QueryGuardPubkey200ResponseAddressesInner["default"]]);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return obj;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Validates the JSON data with respect to <code>CreatePrimeBrokerAddressRequest</code>.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreatePrimeBrokerAddressRequest</code>.
|
|
74
|
+
*/
|
|
75
|
+
}, {
|
|
76
|
+
key: "validateJSON",
|
|
77
|
+
value: function validateJSON(data) {
|
|
78
|
+
if (data['addresses']) {
|
|
79
|
+
// data not null
|
|
80
|
+
// ensure the json data is an array
|
|
81
|
+
if (!Array.isArray(data['addresses'])) {
|
|
82
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
83
|
+
}
|
|
84
|
+
// validate the optional field `addresses` (array)
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(data['addresses']),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var item = _step.value;
|
|
90
|
+
_QueryGuardPubkey200ResponseAddressesInner["default"].validateJSON(item);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
;
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
/**
|
|
104
|
+
* @member {Array.<module:model/QueryGuardPubkey200ResponseAddressesInner>} addresses
|
|
105
|
+
*/
|
|
106
|
+
CreatePrimeBrokerAddressRequest.prototype['addresses'] = undefined;
|
|
107
|
+
var _default = exports["default"] = CreatePrimeBrokerAddressRequest;
|
|
@@ -39,11 +39,10 @@ var CreateStakeActivity = /*#__PURE__*/function () {
|
|
|
39
39
|
* @param pool_id {module:model/StakingPoolId}
|
|
40
40
|
* @param amount {String} The amount to stake.
|
|
41
41
|
* @param fee {module:model/TransactionRequestFee}
|
|
42
|
-
* @param extra {module:model/CreateStakeActivityExtra}
|
|
43
42
|
*/
|
|
44
|
-
function CreateStakeActivity(pool_id, amount, fee
|
|
43
|
+
function CreateStakeActivity(pool_id, amount, fee) {
|
|
45
44
|
_classCallCheck(this, CreateStakeActivity);
|
|
46
|
-
CreateStakeActivity.initialize(this, pool_id, amount, fee
|
|
45
|
+
CreateStakeActivity.initialize(this, pool_id, amount, fee);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
/**
|
|
@@ -53,11 +52,10 @@ var CreateStakeActivity = /*#__PURE__*/function () {
|
|
|
53
52
|
*/
|
|
54
53
|
return _createClass(CreateStakeActivity, null, [{
|
|
55
54
|
key: "initialize",
|
|
56
|
-
value: function initialize(obj, pool_id, amount, fee
|
|
55
|
+
value: function initialize(obj, pool_id, amount, fee) {
|
|
57
56
|
obj['pool_id'] = pool_id;
|
|
58
57
|
obj['amount'] = amount;
|
|
59
58
|
obj['fee'] = fee;
|
|
60
|
-
obj['extra'] = extra;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
/**
|
|
@@ -150,7 +148,7 @@ var CreateStakeActivity = /*#__PURE__*/function () {
|
|
|
150
148
|
}
|
|
151
149
|
}]);
|
|
152
150
|
}();
|
|
153
|
-
CreateStakeActivity.RequiredProperties = ["pool_id", "amount", "fee"
|
|
151
|
+
CreateStakeActivity.RequiredProperties = ["pool_id", "amount", "fee"];
|
|
154
152
|
|
|
155
153
|
/**
|
|
156
154
|
* The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
|
|
@@ -218,7 +218,7 @@ CreateStakeActivityExtra.prototype['finality_provider_public_key'] = undefined;
|
|
|
218
218
|
CreateStakeActivityExtra.prototype['stake_block_time'] = undefined;
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* Whether to automatically broadcast the transaction. The default value is `true`. - `true`: Automatically broadcast the transaction. - `false`: The transaction will not be submitted to the blockchain automatically. You can call [Broadcast signed transactions](/v2/api-references/transactions/broadcast-signed-transactions) to broadcast the transaction to the blockchain, or retrieve the signed raw transaction data `raw_tx` by calling [Get transaction information](/v2/api-references/transactions/get-transaction-information) and broadcast it yourself.
|
|
221
|
+
* Whether to automatically broadcast the transaction. The default value is `true`. - `true`: Automatically broadcast the transaction. - `false`: The transaction will not be submitted to the blockchain automatically. You can call [Broadcast signed transactions](https://www.cobo.com/developers/v2/api-references/transactions/broadcast-signed-transactions) to broadcast the transaction to the blockchain, or retrieve the signed raw transaction data `raw_tx` by calling [Get transaction information](https://www.cobo.com/developers/v2/api-references/transactions/get-transaction-information) and broadcast it yourself.
|
|
222
222
|
* @member {Boolean} auto_broadcast
|
|
223
223
|
*/
|
|
224
224
|
CreateStakeActivityExtra.prototype['auto_broadcast'] = undefined;
|