@cobo/cobo-waas2 1.6.0 → 1.8.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 +63 -3
- package/dist/ApiClient.js +56 -6
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/DevelopersApi.js +110 -0
- package/dist/api/DevelopersWebhooksApi.js +32 -32
- package/dist/api/OAuthApi.js +2 -2
- package/dist/api/StakingsApi.js +118 -31
- package/dist/api/TransactionsApi.js +75 -30
- package/dist/api/TravelRuleApi.js +216 -0
- package/dist/api/WalletsApi.js +68 -68
- package/dist/api/WalletsExchangeWalletApi.js +12 -12
- package/dist/api/WalletsMPCWalletsApi.js +60 -60
- package/dist/crypto/Ed25519Signer.js +36 -0
- package/dist/crypto/Secp256k1Signer.js +36 -0
- package/dist/index.js +341 -5
- package/dist/model/Activity.js +33 -8
- package/dist/model/ActivityAction.js +50 -0
- package/dist/model/ActivityExtra.js +274 -0
- package/dist/model/ActivityType.js +5 -0
- package/dist/model/AddressInfo.js +15 -2
- package/dist/model/AddressTransferDestination.js +1 -1
- package/dist/model/AddressesEventData.js +190 -0
- package/dist/model/ApiLogDetails.js +2 -2
- package/dist/model/AutoFuelType.js +61 -0
- package/dist/model/BabylonStakeExtra.js +1 -1
- package/dist/model/BabylonStakingActivityDetailExtra.js +165 -0
- package/dist/model/BabylonValidator.js +4 -12
- 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/ContractCallParams.js +11 -2
- package/dist/model/CoreStakeExtra.js +170 -0
- package/dist/model/CoreStakingActivityDetailExtra.js +164 -0
- package/dist/model/CoreStakingExtra.js +187 -0
- package/dist/model/CreateAddressRequest.js +2 -2
- package/dist/model/CreateClaimActivity.js +139 -0
- package/dist/model/CreateClaimActivityRequest.js +182 -0
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMpcVaultRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreateStakeActivity.js +8 -14
- package/dist/model/CreateStakeActivityExtra.js +61 -9
- package/dist/model/CreateStakeActivityRequest.js +10 -17
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/CreateWebhookEndpointRequest.js +2 -2
- package/dist/model/CreateWithdrawActivity.js +0 -13
- package/dist/model/CreateWithdrawActivityRequest.js +0 -18
- package/dist/model/CustodialTransferSource.js +1 -1
- package/dist/model/DestinationWalletType.js +61 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateClaimFee.js +145 -0
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +2 -2
- package/dist/model/EstimateStakeFee.js +10 -17
- package/dist/model/EstimateTransferFeeParams.js +2 -2
- package/dist/model/EstimateWithdrawFee.js +0 -18
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +4 -4
- package/dist/model/EstimatedUtxoFeeSlow.js +3 -3
- package/dist/model/EthStakeEstimatedFee.js +13 -0
- package/dist/model/EthStakingActivityDetailExtra.js +142 -0
- package/dist/model/EthStakingExtra.js +31 -0
- package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -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/FeeAmount.js +1 -1
- package/dist/model/FeeRate.js +1 -1
- package/dist/model/FixedFeeRate.js +2 -2
- package/dist/model/GetStakingEstimationFee201Response.js +6 -0
- package/dist/model/GetStakingEstimationFeeRequest.js +39 -17
- package/dist/model/GetTransactionLimitation200Response.js +143 -0
- package/dist/model/ListCallbackMessages200Response.js +145 -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/MPCProject.js +4 -4
- package/dist/model/MPCVaultEventData.js +279 -0
- package/dist/model/MaxTransferableValue.js +1 -1
- package/dist/model/MessageSignParams.js +2 -2
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/OrgInfo.js +133 -0
- package/dist/model/Pagination.js +6 -6
- package/dist/model/RawMessageSignDestination.js +1 -1
- package/dist/model/RetryCallbackMessage201Response.js +83 -0
- 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 +86 -0
- package/dist/model/StakingPoolType.js +10 -0
- package/dist/model/Stakings.js +10 -14
- package/dist/model/StakingsExtra.js +67 -8
- 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/TSSRequestWebhookEventData.js +18 -3
- package/dist/model/TokenBalance.js +2 -2
- package/dist/model/TokenBalanceBalance.js +6 -6
- 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 +1 -1
- package/dist/model/TransactionDepositToWalletDestination.js +1 -1
- 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 +4 -4
- package/dist/model/TransactionRbf.js +9 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- 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/{StakingsValidatorInfo.js → TransactionSelectedUtxo.js} +38 -55
- package/dist/model/TransactionSmartContractSafeWalletSource.js +1 -1
- 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/TransferParams.js +11 -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 +3 -1
- package/docs/ActivityAction.md +20 -0
- package/docs/ActivityExtra.md +20 -0
- package/docs/ActivityType.md +2 -0
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +2 -1
- package/docs/AddressesEventData.md +29 -0
- package/docs/ApiLogDetails.md +1 -1
- package/docs/AutoFuelType.md +12 -0
- package/docs/BabylonStakeExtra.md +1 -1
- package/docs/BabylonStakingActivityDetailExtra.md +14 -0
- package/docs/BabylonValidator.md +4 -4
- package/docs/BroadcastSignedTransactionsRequest.md +1 -1
- package/docs/CallbackMessage.md +46 -0
- package/docs/ChainInfo.md +1 -1
- package/docs/ContractCallParams.md +2 -1
- package/docs/CoreStakeExtra.md +13 -0
- package/docs/CoreStakingActivityDetailExtra.md +13 -0
- package/docs/CoreStakingExtra.md +14 -0
- package/docs/CreateAddressRequest.md +1 -1
- package/docs/CreateClaimActivity.md +11 -0
- package/docs/CreateClaimActivityRequest.md +12 -0
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMpcVaultRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreateStakeActivity.md +2 -2
- package/docs/CreateStakeActivityExtra.md +5 -1
- package/docs/CreateStakeActivityRequest.md +2 -2
- package/docs/CreateWalletParams.md +1 -1
- package/docs/CreateWebhookEndpointRequest.md +1 -1
- package/docs/CreateWithdrawActivity.md +0 -1
- package/docs/CreateWithdrawActivityRequest.md +0 -1
- package/docs/DestinationWalletType.md +12 -0
- package/docs/DevelopersApi.md +118 -0
- package/docs/DevelopersWebhooksApi.md +16 -16
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateClaimFee.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +2 -2
- package/docs/EstimateStakeFee.md +2 -2
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/EstimateWithdrawFee.md +0 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EstimatedUtxoFeeSlow.md +1 -1
- package/docs/EthStakeEstimatedFee.md +1 -0
- package/docs/EthStakingActivityDetailExtra.md +11 -0
- package/docs/EthStakingExtra.md +1 -0
- package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
- package/docs/ExtendedTokenInfo.md +1 -1
- package/docs/FeeAmount.md +1 -1
- package/docs/FeeRate.md +1 -1
- package/docs/FixedFeeRate.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -0
- package/docs/GetStakingEstimationFeeRequest.md +3 -4
- package/docs/GetTransactionLimitation200Response.md +12 -0
- package/docs/ListCallbackMessages200Response.md +10 -0
- package/docs/ListSupportedCountries200ResponseInner.md +11 -0
- package/docs/LockUtxosRequestUtxosInner.md +1 -1
- package/docs/MPCProject.md +1 -1
- package/docs/MPCVaultEventData.md +34 -0
- package/docs/MaxTransferableValue.md +1 -1
- package/docs/MessageSignParams.md +1 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +1 -1
- package/docs/OrgInfo.md +11 -0
- package/docs/Pagination.md +3 -3
- package/docs/PoolDetailsAllOfValidatorsInfo.md +4 -4
- package/docs/RetryCallbackMessage201Response.md +9 -0
- package/docs/SelectedEntityType.md +12 -0
- package/docs/SelfCustodyWallet.md +12 -0
- package/docs/SourceGroup.md +1 -1
- package/docs/StakingPoolId.md +22 -0
- package/docs/StakingPoolType.md +4 -0
- package/docs/Stakings.md +2 -2
- package/docs/StakingsApi.md +122 -14
- package/docs/StakingsExtra.md +5 -0
- 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/TSSRequestWebhookEventData.md +7 -1
- package/docs/TokenBalance.md +1 -1
- package/docs/TokenBalanceBalance.md +4 -4
- 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/TransactionDetail.md +2 -2
- package/docs/TransactionDetails.md +2 -2
- package/docs/TransactionRawTxInfo.md +1 -1
- package/docs/TransactionRbf.md +1 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRoleApprovalDetail.md +13 -0
- package/docs/TransactionSelectedUtxo.md +12 -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 +66 -15
- package/docs/TransferParams.md +2 -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 +34 -34
- package/docs/WalletsExchangeWalletApi.md +6 -6
- package/docs/WalletsMPCWalletsApi.md +30 -30
- package/docs/WebhookEventData.md +17 -5
- package/docs/WebhookEventDataType.md +7 -1
- package/docs/WebhookEventType.md +14 -8
- package/package.json +4 -3
- package/docs/StakingsValidatorInfo.md +0 -13
|
@@ -0,0 +1,61 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class SelectedEntityType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var SelectedEntityType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function SelectedEntityType() {
|
|
32
|
+
_classCallCheck(this, SelectedEntityType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "LEGAL"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "LEGAL", "LEGAL");
|
|
38
|
+
/**
|
|
39
|
+
* value: "NATURAL"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "NATURAL", "NATURAL");
|
|
43
|
+
/**
|
|
44
|
+
* value: "unknown_default_open_api"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
48
|
+
}
|
|
49
|
+
return _createClass(SelectedEntityType, null, [{
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value:
|
|
52
|
+
/**
|
|
53
|
+
* Returns a <code>SelectedEntityType</code> enum value from a Javascript object name.
|
|
54
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
55
|
+
* @return {module:model/SelectedEntityType} The enum <code>SelectedEntityType</code> value.
|
|
56
|
+
*/
|
|
57
|
+
function constructFromObject(object) {
|
|
58
|
+
return object;
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
}();
|
|
@@ -0,0 +1,152 @@
|
|
|
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 _DestinationWalletType = _interopRequireDefault(require("./DestinationWalletType"));
|
|
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 SelfCustodyWallet model module.
|
|
30
|
+
* @module model/SelfCustodyWallet
|
|
31
|
+
*/
|
|
32
|
+
var SelfCustodyWallet = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>SelfCustodyWallet</code>.
|
|
35
|
+
* Required fields for `SELF_CUSTODY_WALLET`.
|
|
36
|
+
* @alias module:model/SelfCustodyWallet
|
|
37
|
+
* @param destination_wallet_type {module:model/DestinationWalletType}
|
|
38
|
+
* @param self_custody_wallet_challenge {String} The challenge obtained from a previous operation.
|
|
39
|
+
* @param self_custody_wallet_address {String} The address of the self-custodial wallet.
|
|
40
|
+
* @param self_custody_wallet_sign {String} The signed message from the self-custodial wallet.
|
|
41
|
+
*/
|
|
42
|
+
function SelfCustodyWallet(destination_wallet_type, self_custody_wallet_challenge, self_custody_wallet_address, self_custody_wallet_sign) {
|
|
43
|
+
_classCallCheck(this, SelfCustodyWallet);
|
|
44
|
+
SelfCustodyWallet.initialize(this, destination_wallet_type, self_custody_wallet_challenge, self_custody_wallet_address, self_custody_wallet_sign);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(SelfCustodyWallet, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, destination_wallet_type, self_custody_wallet_challenge, self_custody_wallet_address, self_custody_wallet_sign) {
|
|
55
|
+
obj['destination_wallet_type'] = destination_wallet_type;
|
|
56
|
+
obj['self_custody_wallet_challenge'] = self_custody_wallet_challenge;
|
|
57
|
+
obj['self_custody_wallet_address'] = self_custody_wallet_address;
|
|
58
|
+
obj['self_custody_wallet_sign'] = self_custody_wallet_sign;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>SelfCustodyWallet</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/SelfCustodyWallet} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/SelfCustodyWallet} The populated <code>SelfCustodyWallet</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new SelfCustodyWallet();
|
|
73
|
+
if (data.hasOwnProperty('destination_wallet_type')) {
|
|
74
|
+
obj['destination_wallet_type'] = _DestinationWalletType["default"].constructFromObject(data['destination_wallet_type']);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('self_custody_wallet_challenge')) {
|
|
77
|
+
obj['self_custody_wallet_challenge'] = _ApiClient["default"].convertToType(data['self_custody_wallet_challenge'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('self_custody_wallet_address')) {
|
|
80
|
+
obj['self_custody_wallet_address'] = _ApiClient["default"].convertToType(data['self_custody_wallet_address'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('self_custody_wallet_sign')) {
|
|
83
|
+
obj['self_custody_wallet_sign'] = _ApiClient["default"].convertToType(data['self_custody_wallet_sign'], 'String');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates the JSON data with respect to <code>SelfCustodyWallet</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>SelfCustodyWallet</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(SelfCustodyWallet.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['self_custody_wallet_challenge'] && !(typeof data['self_custody_wallet_challenge'] === 'string' || data['self_custody_wallet_challenge'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `self_custody_wallet_challenge` to be a primitive type in the JSON string but got " + data['self_custody_wallet_challenge']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['self_custody_wallet_address'] && !(typeof data['self_custody_wallet_address'] === 'string' || data['self_custody_wallet_address'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `self_custody_wallet_address` to be a primitive type in the JSON string but got " + data['self_custody_wallet_address']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['self_custody_wallet_sign'] && !(typeof data['self_custody_wallet_sign'] === 'string' || data['self_custody_wallet_sign'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `self_custody_wallet_sign` to be a primitive type in the JSON string but got " + data['self_custody_wallet_sign']);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
SelfCustodyWallet.RequiredProperties = ["destination_wallet_type", "self_custody_wallet_challenge", "self_custody_wallet_address", "self_custody_wallet_sign"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @member {module:model/DestinationWalletType} destination_wallet_type
|
|
132
|
+
*/
|
|
133
|
+
SelfCustodyWallet.prototype['destination_wallet_type'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The challenge obtained from a previous operation.
|
|
137
|
+
* @member {String} self_custody_wallet_challenge
|
|
138
|
+
*/
|
|
139
|
+
SelfCustodyWallet.prototype['self_custody_wallet_challenge'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The address of the self-custodial wallet.
|
|
143
|
+
* @member {String} self_custody_wallet_address
|
|
144
|
+
*/
|
|
145
|
+
SelfCustodyWallet.prototype['self_custody_wallet_address'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The signed message from the self-custodial wallet.
|
|
149
|
+
* @member {String} self_custody_wallet_sign
|
|
150
|
+
*/
|
|
151
|
+
SelfCustodyWallet.prototype['self_custody_wallet_sign'] = undefined;
|
|
152
|
+
var _default = exports["default"] = SelfCustodyWallet;
|
|
@@ -117,7 +117,7 @@ SourceGroup.RequiredProperties = ["key_share_holder_group_id"];
|
|
|
117
117
|
SourceGroup.prototype['key_share_holder_group_id'] = undefined;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* The TSS Node IDs participating in creating a new key share holder group when `type` is set to either `KeyGenFromKeyGroup` or `Recovery`. **Note:** In any [Threshold Signature Schemes (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss) such as the 2-2, 2-3, and 3-3 schemes (in the \"threshold - participants\" format), for `tss_node_ids`, you only need to fill in 1 Cobo TSS Node ID and enough non-Cobo TSS Node IDs to satisfy the number of approvers specified in `threshold`. To obtain the Cobo TSS Node ID, run [List all Cobo key share holders](/v2/api-references/wallets--mpc-wallets/list-all-cobo-key-share-holders).
|
|
120
|
+
* The TSS Node IDs participating in creating a new key share holder group when `type` is set to either `KeyGenFromKeyGroup` or `Recovery`. **Note:** In any [Threshold Signature Schemes (TSS)](https://manuals.cobo.com/en/portal/mpc-wallets/introduction#threshold-signature-scheme-tss) such as the 2-2, 2-3, and 3-3 schemes (in the \"threshold - participants\" format), for `tss_node_ids`, you only need to fill in 1 Cobo TSS Node ID and enough non-Cobo TSS Node IDs to satisfy the number of approvers specified in `threshold`. To obtain the Cobo TSS Node ID, run [List all Cobo key share holders](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-cobo-key-share-holders).
|
|
121
121
|
* @member {Array.<String>} tss_node_ids
|
|
122
122
|
*/
|
|
123
123
|
SourceGroup.prototype['tss_node_ids'] = undefined;
|
|
@@ -0,0 +1,86 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class StakingPoolId.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var StakingPoolId = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function StakingPoolId() {
|
|
32
|
+
_classCallCheck(this, StakingPoolId);
|
|
33
|
+
/**
|
|
34
|
+
* value: "babylon_btc_signet"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "babylon_btc_signet", "babylon_btc_signet");
|
|
38
|
+
/**
|
|
39
|
+
* value: "babylon_btc"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "babylon_btc", "babylon_btc");
|
|
43
|
+
/**
|
|
44
|
+
* value: "beacon_eth"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "beacon_eth", "beacon_eth");
|
|
48
|
+
/**
|
|
49
|
+
* value: "beacon_eth_holesky"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "beacon_eth_holesky", "beacon_eth_holesky");
|
|
53
|
+
/**
|
|
54
|
+
* value: "core_btc"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "core_btc", "core_btc");
|
|
58
|
+
/**
|
|
59
|
+
* value: "core_xtn"
|
|
60
|
+
* @const
|
|
61
|
+
*/
|
|
62
|
+
_defineProperty(this, "core_xtn", "core_xtn");
|
|
63
|
+
/**
|
|
64
|
+
* value: "sky_farm_eth_usdc"
|
|
65
|
+
* @const
|
|
66
|
+
*/
|
|
67
|
+
_defineProperty(this, "sky_farm_eth_usdc", "sky_farm_eth_usdc");
|
|
68
|
+
/**
|
|
69
|
+
* value: "unknown_default_open_api"
|
|
70
|
+
* @const
|
|
71
|
+
*/
|
|
72
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
73
|
+
}
|
|
74
|
+
return _createClass(StakingPoolId, null, [{
|
|
75
|
+
key: "constructFromObject",
|
|
76
|
+
value:
|
|
77
|
+
/**
|
|
78
|
+
* Returns a <code>StakingPoolId</code> enum value from a Javascript object name.
|
|
79
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
80
|
+
* @return {module:model/StakingPoolId} The enum <code>StakingPoolId</code> value.
|
|
81
|
+
*/
|
|
82
|
+
function constructFromObject(object) {
|
|
83
|
+
return object;
|
|
84
|
+
}
|
|
85
|
+
}]);
|
|
86
|
+
}();
|
|
@@ -40,6 +40,16 @@ var StakingPoolType = exports["default"] = /*#__PURE__*/function () {
|
|
|
40
40
|
* @const
|
|
41
41
|
*/
|
|
42
42
|
_defineProperty(this, "ETHBeacon", "ETHBeacon");
|
|
43
|
+
/**
|
|
44
|
+
* value: "CoreBTC"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "CoreBTC", "CoreBTC");
|
|
48
|
+
/**
|
|
49
|
+
* value: "SkyFarm"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "SkyFarm", "SkyFarm");
|
|
43
53
|
/**
|
|
44
54
|
* value: "unknown_default_open_api"
|
|
45
55
|
* @const
|
package/dist/model/Stakings.js
CHANGED
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _AmountDetailsInner = _interopRequireDefault(require("./AmountDetailsInner"));
|
|
9
|
+
var _BabylonValidator = _interopRequireDefault(require("./BabylonValidator"));
|
|
10
|
+
var _StakingPoolId = _interopRequireDefault(require("./StakingPoolId"));
|
|
9
11
|
var _StakingsExtra = _interopRequireDefault(require("./StakingsExtra"));
|
|
10
|
-
var _StakingsValidatorInfo = _interopRequireDefault(require("./StakingsValidatorInfo"));
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
13
|
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); }
|
|
13
14
|
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; } } }; }
|
|
@@ -40,11 +41,11 @@ var Stakings = /*#__PURE__*/function () {
|
|
|
40
41
|
* @param wallet_id {String} The staker's wallet ID.
|
|
41
42
|
* @param address {String} The staker's wallet address.
|
|
42
43
|
* @param amounts {Array.<module:model/AmountDetailsInner>} The details about the staking amount.
|
|
43
|
-
* @param pool_id {
|
|
44
|
+
* @param pool_id {module:model/StakingPoolId}
|
|
44
45
|
* @param token_id {String} The token ID.
|
|
45
46
|
* @param created_timestamp {Number} The time when the staking position was created.
|
|
46
47
|
* @param updated_timestamp {Number} The time when the staking position was last updated.
|
|
47
|
-
* @param validator_info {module:model/
|
|
48
|
+
* @param validator_info {module:model/BabylonValidator}
|
|
48
49
|
*/
|
|
49
50
|
function Stakings(id, wallet_id, address, amounts, pool_id, token_id, created_timestamp, updated_timestamp, validator_info) {
|
|
50
51
|
_classCallCheck(this, Stakings);
|
|
@@ -95,7 +96,7 @@ var Stakings = /*#__PURE__*/function () {
|
|
|
95
96
|
obj['amounts'] = _ApiClient["default"].convertToType(data['amounts'], [_AmountDetailsInner["default"]]);
|
|
96
97
|
}
|
|
97
98
|
if (data.hasOwnProperty('pool_id')) {
|
|
98
|
-
obj['pool_id'] =
|
|
99
|
+
obj['pool_id'] = _StakingPoolId["default"].constructFromObject(data['pool_id']);
|
|
99
100
|
}
|
|
100
101
|
if (data.hasOwnProperty('token_id')) {
|
|
101
102
|
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
@@ -110,7 +111,7 @@ var Stakings = /*#__PURE__*/function () {
|
|
|
110
111
|
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
111
112
|
}
|
|
112
113
|
if (data.hasOwnProperty('validator_info')) {
|
|
113
|
-
obj['validator_info'] =
|
|
114
|
+
obj['validator_info'] = _BabylonValidator["default"].constructFromObject(data['validator_info']);
|
|
114
115
|
}
|
|
115
116
|
if (data.hasOwnProperty('extra')) {
|
|
116
117
|
obj['extra'] = _StakingsExtra["default"].constructFromObject(data['extra']);
|
|
@@ -176,18 +177,14 @@ var Stakings = /*#__PURE__*/function () {
|
|
|
176
177
|
;
|
|
177
178
|
}
|
|
178
179
|
// ensure the json data is a string
|
|
179
|
-
if (data['pool_id'] && !(typeof data['pool_id'] === 'string' || data['pool_id'] instanceof String)) {
|
|
180
|
-
throw new Error("Expected the field `pool_id` to be a primitive type in the JSON string but got " + data['pool_id']);
|
|
181
|
-
}
|
|
182
|
-
// ensure the json data is a string
|
|
183
180
|
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
184
181
|
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
185
182
|
}
|
|
186
183
|
// validate the optional field `validator_info`
|
|
187
184
|
if (data['validator_info']) {
|
|
188
185
|
// data not null
|
|
189
|
-
if (!!
|
|
190
|
-
|
|
186
|
+
if (!!_BabylonValidator["default"].validateJSON) {
|
|
187
|
+
_BabylonValidator["default"].validateJSON(data['validator_info']);
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
// validate the optional field `extra`
|
|
@@ -228,8 +225,7 @@ Stakings.prototype['address'] = undefined;
|
|
|
228
225
|
Stakings.prototype['amounts'] = undefined;
|
|
229
226
|
|
|
230
227
|
/**
|
|
231
|
-
*
|
|
232
|
-
* @member {String} pool_id
|
|
228
|
+
* @member {module:model/StakingPoolId} pool_id
|
|
233
229
|
*/
|
|
234
230
|
Stakings.prototype['pool_id'] = undefined;
|
|
235
231
|
|
|
@@ -258,7 +254,7 @@ Stakings.prototype['created_timestamp'] = undefined;
|
|
|
258
254
|
Stakings.prototype['updated_timestamp'] = undefined;
|
|
259
255
|
|
|
260
256
|
/**
|
|
261
|
-
* @member {module:model/
|
|
257
|
+
* @member {module:model/BabylonValidator} validator_info
|
|
262
258
|
*/
|
|
263
259
|
Stakings.prototype['validator_info'] = undefined;
|
|
264
260
|
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BabylonStakingExtra = _interopRequireDefault(require("./BabylonStakingExtra"));
|
|
9
|
+
var _CoreStakingExtra = _interopRequireDefault(require("./CoreStakingExtra"));
|
|
9
10
|
var _EthStakingExtra = _interopRequireDefault(require("./EthStakingExtra"));
|
|
11
|
+
var _EthStakingExtraAllOfBeaconValidators = _interopRequireDefault(require("./EthStakingExtraAllOfBeaconValidators"));
|
|
10
12
|
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
11
13
|
var _StakingsExtra;
|
|
12
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -34,7 +36,7 @@ var StakingsExtra = /*#__PURE__*/function () {
|
|
|
34
36
|
/**
|
|
35
37
|
* Constructs a new <code>StakingsExtra</code>.
|
|
36
38
|
* @alias module:model/StakingsExtra
|
|
37
|
-
* @param {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} instance The actual instance to initialize StakingsExtra.
|
|
39
|
+
* @param {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} instance The actual instance to initialize StakingsExtra.
|
|
38
40
|
*/
|
|
39
41
|
function StakingsExtra() {
|
|
40
42
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -59,6 +61,10 @@ var StakingsExtra = /*#__PURE__*/function () {
|
|
|
59
61
|
this.actualInstance = _BabylonStakingExtra["default"].constructFromObject(instance);
|
|
60
62
|
match++;
|
|
61
63
|
break;
|
|
64
|
+
case "CoreBTC":
|
|
65
|
+
this.actualInstance = _CoreStakingExtra["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
62
68
|
case "ETHBeacon":
|
|
63
69
|
this.actualInstance = _EthStakingExtra["default"].constructFromObject(instance);
|
|
64
70
|
match++;
|
|
@@ -115,13 +121,36 @@ var StakingsExtra = /*#__PURE__*/function () {
|
|
|
115
121
|
// json data failed to deserialize into EthStakingExtra
|
|
116
122
|
errorMessages.push("Failed to construct EthStakingExtra: " + err);
|
|
117
123
|
}
|
|
124
|
+
try {
|
|
125
|
+
if (instance instanceof _CoreStakingExtra["default"]) {
|
|
126
|
+
this.actualInstance = instance;
|
|
127
|
+
} else if (!!_CoreStakingExtra["default"].validateJSON && _CoreStakingExtra["default"].validateJSON(instance)) {
|
|
128
|
+
// plain JS object
|
|
129
|
+
// create CoreStakingExtra from JS object
|
|
130
|
+
this.actualInstance = _CoreStakingExtra["default"].constructFromObject(instance);
|
|
131
|
+
} else {
|
|
132
|
+
if (_CoreStakingExtra["default"].constructFromObject(instance)) {
|
|
133
|
+
if (!!_CoreStakingExtra["default"].constructFromObject(instance).toJSON) {
|
|
134
|
+
if (_CoreStakingExtra["default"].constructFromObject(instance).toJSON()) {
|
|
135
|
+
this.actualInstance = _CoreStakingExtra["default"].constructFromObject(instance);
|
|
136
|
+
}
|
|
137
|
+
} else {
|
|
138
|
+
this.actualInstance = _CoreStakingExtra["default"].constructFromObject(instance);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
match++;
|
|
143
|
+
} catch (err) {
|
|
144
|
+
// json data failed to deserialize into CoreStakingExtra
|
|
145
|
+
errorMessages.push("Failed to construct CoreStakingExtra: " + err);
|
|
146
|
+
}
|
|
118
147
|
|
|
119
148
|
// if (match > 1) {
|
|
120
|
-
// throw new Error("Multiple matches found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, EthStakingExtra. Input: " + JSON.stringify(instance));
|
|
149
|
+
// throw new Error("Multiple matches found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, CoreStakingExtra, EthStakingExtra. Input: " + JSON.stringify(instance));
|
|
121
150
|
// } else
|
|
122
151
|
if (match === 0) {
|
|
123
152
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
124
|
-
// throw new Error("No match found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, EthStakingExtra. Details: " +
|
|
153
|
+
// throw new Error("No match found constructing `StakingsExtra` with oneOf schemas BabylonStakingExtra, CoreStakingExtra, EthStakingExtra. Details: " +
|
|
125
154
|
// errorMessages.join(", "));
|
|
126
155
|
return;
|
|
127
156
|
} else {// only 1 match
|
|
@@ -140,16 +169,16 @@ var StakingsExtra = /*#__PURE__*/function () {
|
|
|
140
169
|
key: "getActualInstance",
|
|
141
170
|
value:
|
|
142
171
|
/**
|
|
143
|
-
* Gets the actual instance, which can be <code>BabylonStakingExtra</code>, <code>EthStakingExtra</code>.
|
|
144
|
-
* @return {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} The actual instance.
|
|
172
|
+
* Gets the actual instance, which can be <code>BabylonStakingExtra</code>, <code>CoreStakingExtra</code>, <code>EthStakingExtra</code>.
|
|
173
|
+
* @return {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} The actual instance.
|
|
145
174
|
*/
|
|
146
175
|
function getActualInstance() {
|
|
147
176
|
return this.actualInstance;
|
|
148
177
|
}
|
|
149
178
|
|
|
150
179
|
/**
|
|
151
|
-
* Sets the actual instance, which can be <code>BabylonStakingExtra</code>, <code>EthStakingExtra</code>.
|
|
152
|
-
* @param {(module:model/BabylonStakingExtra|module:model/EthStakingExtra)} obj The actual instance.
|
|
180
|
+
* Sets the actual instance, which can be <code>BabylonStakingExtra</code>, <code>CoreStakingExtra</code>, <code>EthStakingExtra</code>.
|
|
181
|
+
* @param {(module:model/BabylonStakingExtra|module:model/CoreStakingExtra|module:model/EthStakingExtra)} obj The actual instance.
|
|
153
182
|
*/
|
|
154
183
|
}, {
|
|
155
184
|
key: "setActualInstance",
|
|
@@ -206,5 +235,35 @@ StakingsExtra.prototype['stake_address'] = undefined;
|
|
|
206
235
|
* @member {String} unbond_address
|
|
207
236
|
*/
|
|
208
237
|
StakingsExtra.prototype['unbond_address'] = undefined;
|
|
209
|
-
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The list of validator information.
|
|
241
|
+
* @member {Array.<module:model/EthStakingExtraAllOfBeaconValidators>} beacon_validators
|
|
242
|
+
*/
|
|
243
|
+
StakingsExtra.prototype['beacon_validators'] = undefined;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The staker's Bitcoin address.
|
|
247
|
+
* @member {String} staker_address
|
|
248
|
+
*/
|
|
249
|
+
StakingsExtra.prototype['staker_address'] = undefined;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* The validator's EVM address.
|
|
253
|
+
* @member {String} validator_address
|
|
254
|
+
*/
|
|
255
|
+
StakingsExtra.prototype['validator_address'] = undefined;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The EVM address to receive staking rewards.
|
|
259
|
+
* @member {String} reward_address
|
|
260
|
+
*/
|
|
261
|
+
StakingsExtra.prototype['reward_address'] = undefined;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The Unix timestamp (in seconds) when the staking position will be unlocked and available for withdrawal.
|
|
265
|
+
* @member {Number} timelock
|
|
266
|
+
*/
|
|
267
|
+
StakingsExtra.prototype['timelock'] = undefined;
|
|
268
|
+
StakingsExtra.OneOf = ["BabylonStakingExtra", "CoreStakingExtra", "EthStakingExtra"];
|
|
210
269
|
var _default = exports["default"] = StakingsExtra;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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
|
+
* Cobo Wallet as a Service 2.0
|
|
16
|
+
*
|
|
17
|
+
* Contact: help@cobo.com
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
|
+
* https://openapi-generator.tech
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The SubmitDepositTravelRuleInfo201Response model module.
|
|
26
|
+
* @module model/SubmitDepositTravelRuleInfo201Response
|
|
27
|
+
*/
|
|
28
|
+
var SubmitDepositTravelRuleInfo201Response = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>SubmitDepositTravelRuleInfo201Response</code>.
|
|
31
|
+
* @alias module:model/SubmitDepositTravelRuleInfo201Response
|
|
32
|
+
*/
|
|
33
|
+
function SubmitDepositTravelRuleInfo201Response() {
|
|
34
|
+
_classCallCheck(this, SubmitDepositTravelRuleInfo201Response);
|
|
35
|
+
SubmitDepositTravelRuleInfo201Response.initialize(this);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the fields of this object.
|
|
40
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
|
+
* Only for internal use.
|
|
42
|
+
*/
|
|
43
|
+
return _createClass(SubmitDepositTravelRuleInfo201Response, null, [{
|
|
44
|
+
key: "initialize",
|
|
45
|
+
value: function initialize(obj) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>SubmitDepositTravelRuleInfo201Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/SubmitDepositTravelRuleInfo201Response} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/SubmitDepositTravelRuleInfo201Response} The populated <code>SubmitDepositTravelRuleInfo201Response</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new SubmitDepositTravelRuleInfo201Response();
|
|
59
|
+
if (data.hasOwnProperty('submitted')) {
|
|
60
|
+
obj['submitted'] = _ApiClient["default"].convertToType(data['submitted'], 'Boolean');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Validates the JSON data with respect to <code>SubmitDepositTravelRuleInfo201Response</code>.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SubmitDepositTravelRuleInfo201Response</code>.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "validateJSON",
|
|
73
|
+
value: function validateJSON(data) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
}]);
|
|
77
|
+
}();
|
|
78
|
+
/**
|
|
79
|
+
* Whether the submitted Travel Rule info has been successfully executed. - `true`: The operation has been successfully executed. - `false`: The operation has not been executed.
|
|
80
|
+
* @member {Boolean} submitted
|
|
81
|
+
*/
|
|
82
|
+
SubmitDepositTravelRuleInfo201Response.prototype['submitted'] = undefined;
|
|
83
|
+
var _default = exports["default"] = SubmitDepositTravelRuleInfo201Response;
|