@cobo/cobo-waas2 1.7.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 +48 -3
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/DevelopersApi.js +110 -0
- package/dist/api/DevelopersWebhooksApi.js +30 -30
- package/dist/api/OAuthApi.js +2 -2
- package/dist/api/StakingsApi.js +33 -30
- package/dist/api/TransactionsApi.js +73 -28
- 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/index.js +273 -0
- package/dist/model/Activity.js +29 -0
- package/dist/model/ActivityAction.js +30 -0
- package/dist/model/ActivityExtra.js +274 -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/BabylonStakeExtra.js +1 -1
- package/dist/model/BabylonStakingActivityDetailExtra.js +165 -0
- 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 +2 -2
- package/dist/model/CoreStakingActivityDetailExtra.js +164 -0
- package/dist/model/CreateAddressRequest.js +2 -2
- 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/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/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/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/MPCVaultEventData.js +279 -0
- package/dist/model/MaxTransferableValue.js +1 -1
- 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/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 +5 -0
- package/dist/model/StakingPoolType.js +5 -0
- 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/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/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 +2 -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/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +2 -1
- package/docs/AddressesEventData.md +29 -0
- package/docs/ApiLogDetails.md +1 -1
- package/docs/BabylonStakeExtra.md +1 -1
- package/docs/BabylonStakingActivityDetailExtra.md +14 -0
- package/docs/BroadcastSignedTransactionsRequest.md +1 -1
- package/docs/CallbackMessage.md +46 -0
- package/docs/ChainInfo.md +1 -1
- package/docs/ContractCallParams.md +1 -1
- package/docs/CoreStakingActivityDetailExtra.md +13 -0
- package/docs/CreateAddressRequest.md +1 -1
- 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/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/DestinationWalletType.md +12 -0
- package/docs/DevelopersApi.md +118 -0
- package/docs/DevelopersWebhooksApi.md +15 -15
- 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/ListCallbackMessages200Response.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/MessageSignParams.md +1 -1
- package/docs/OAuthApi.md +1 -1
- package/docs/OrgInfo.md +11 -0
- package/docs/Pagination.md +2 -2
- 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 +2 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/StakingsApi.md +18 -16
- 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/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 +65 -14
- package/docs/TransferParams.md +1 -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 +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 bitcoin address. 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 evm address.
|
|
149
|
+
* @member {String} validator_address
|
|
150
|
+
*/
|
|
151
|
+
CoreStakingActivityDetailExtra.prototype['validator_address'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The reward evm address.
|
|
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,7 +33,7 @@ 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).
|
|
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
37
|
* @param count {Number} The number of addresses to create.
|
|
38
38
|
*/
|
|
39
39
|
function CreateAddressRequest(chain_id, count) {
|
|
@@ -112,7 +112,7 @@ var CreateAddressRequest = /*#__PURE__*/function () {
|
|
|
112
112
|
CreateAddressRequest.RequiredProperties = ["chain_id", "count"];
|
|
113
113
|
|
|
114
114
|
/**
|
|
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).
|
|
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](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
116
116
|
* @member {String} chain_id
|
|
117
117
|
*/
|
|
118
118
|
CreateAddressRequest.prototype['chain_id'] = undefined;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -43,13 +43,12 @@ var CreateStakeActivityRequest = /*#__PURE__*/function () {
|
|
|
43
43
|
* @param pool_id {module:model/StakingPoolId}
|
|
44
44
|
* @param amount {String} The amount to stake.
|
|
45
45
|
* @param fee {module:model/TransactionRequestFee}
|
|
46
|
-
* @param extra {module:model/CreateStakeActivityExtra}
|
|
47
46
|
*/
|
|
48
|
-
function CreateStakeActivityRequest(pool_id, amount, fee
|
|
47
|
+
function CreateStakeActivityRequest(pool_id, amount, fee) {
|
|
49
48
|
_classCallCheck(this, CreateStakeActivityRequest);
|
|
50
|
-
_CreateStakeActivity["default"].initialize(this, pool_id, amount, fee
|
|
49
|
+
_CreateStakeActivity["default"].initialize(this, pool_id, amount, fee);
|
|
51
50
|
_ActivityInitiator["default"].initialize(this);
|
|
52
|
-
CreateStakeActivityRequest.initialize(this, pool_id, amount, fee
|
|
51
|
+
CreateStakeActivityRequest.initialize(this, pool_id, amount, fee);
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
/**
|
|
@@ -59,11 +58,10 @@ var CreateStakeActivityRequest = /*#__PURE__*/function () {
|
|
|
59
58
|
*/
|
|
60
59
|
return _createClass(CreateStakeActivityRequest, null, [{
|
|
61
60
|
key: "initialize",
|
|
62
|
-
value: function initialize(obj, pool_id, amount, fee
|
|
61
|
+
value: function initialize(obj, pool_id, amount, fee) {
|
|
63
62
|
obj['pool_id'] = pool_id;
|
|
64
63
|
obj['amount'] = amount;
|
|
65
64
|
obj['fee'] = fee;
|
|
66
|
-
obj['extra'] = extra;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
/**
|
|
@@ -165,7 +163,7 @@ var CreateStakeActivityRequest = /*#__PURE__*/function () {
|
|
|
165
163
|
}
|
|
166
164
|
}]);
|
|
167
165
|
}();
|
|
168
|
-
CreateStakeActivityRequest.RequiredProperties = ["pool_id", "amount", "fee"
|
|
166
|
+
CreateStakeActivityRequest.RequiredProperties = ["pool_id", "amount", "fee"];
|
|
169
167
|
|
|
170
168
|
/**
|
|
171
169
|
* The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
|
|
@@ -219,7 +219,7 @@ CreateWalletParams.prototype['wallet_type'] = undefined;
|
|
|
219
219
|
CreateWalletParams.prototype['wallet_subtype'] = undefined;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
|
-
* 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.
|
|
222
|
+
* 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.
|
|
223
223
|
* @member {String} vault_id
|
|
224
224
|
*/
|
|
225
225
|
CreateWalletParams.prototype['vault_id'] = undefined;
|
|
@@ -34,7 +34,7 @@ var CreateWebhookEndpointRequest = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>CreateWebhookEndpointRequest</code>.
|
|
35
35
|
* @alias module:model/CreateWebhookEndpointRequest
|
|
36
36
|
* @param url {String} The webhook endpoint URL.
|
|
37
|
-
* @param subscribed_events {Array.<module:model/WebhookEventType>} The event types you want to subscribe to for this webhook endpoint. You can call [Get webhook event types](/v2/api-references/developers--webhooks/get-webhook-event-types) to retrieve all available event types.
|
|
37
|
+
* @param subscribed_events {Array.<module:model/WebhookEventType>} The event types you want to subscribe to for this webhook endpoint. You can call [Get webhook event types](https://www.cobo.com/developers/v2/api-references/developers--webhooks/get-webhook-event-types) to retrieve all available event types.
|
|
38
38
|
*/
|
|
39
39
|
function CreateWebhookEndpointRequest(url, subscribed_events) {
|
|
40
40
|
_classCallCheck(this, CreateWebhookEndpointRequest);
|
|
@@ -126,7 +126,7 @@ CreateWebhookEndpointRequest.RequiredProperties = ["url", "subscribed_events"];
|
|
|
126
126
|
CreateWebhookEndpointRequest.prototype['url'] = undefined;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* The event types you want to subscribe to for this webhook endpoint. You can call [Get webhook event types](/v2/api-references/developers--webhooks/get-webhook-event-types) to retrieve all available event types.
|
|
129
|
+
* The event types you want to subscribe to for this webhook endpoint. You can call [Get webhook event types](https://www.cobo.com/developers/v2/api-references/developers--webhooks/get-webhook-event-types) to retrieve all available event types.
|
|
130
130
|
* @member {Array.<module:model/WebhookEventType>} subscribed_events
|
|
131
131
|
*/
|
|
132
132
|
CreateWebhookEndpointRequest.prototype['subscribed_events'] = undefined;
|
|
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
var CustodialTransferSource = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>CustodialTransferSource</code>.
|
|
35
|
-
* The information about the transaction source types `Asset` and `Web3`. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
|
|
35
|
+
* The information about the transaction source types `Asset` and `Web3`. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
|
|
36
36
|
* @alias module:model/CustodialTransferSource
|
|
37
37
|
* @param source_type {module:model/WalletSubtype}
|
|
38
38
|
* @param wallet_id {String} The wallet ID.
|
|
@@ -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 DestinationWalletType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var DestinationWalletType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function DestinationWalletType() {
|
|
32
|
+
_classCallCheck(this, DestinationWalletType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "EXCHANGES_OR_VASP"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "EXCHANGES_OR_VASP", "EXCHANGES_OR_VASP");
|
|
38
|
+
/**
|
|
39
|
+
* value: "SELF_CUSTODY_WALLET"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "SELF_CUSTODY_WALLET", "SELF_CUSTODY_WALLET");
|
|
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(DestinationWalletType, null, [{
|
|
50
|
+
key: "constructFromObject",
|
|
51
|
+
value:
|
|
52
|
+
/**
|
|
53
|
+
* Returns a <code>DestinationWalletType</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/DestinationWalletType} The enum <code>DestinationWalletType</code> value.
|
|
56
|
+
*/
|
|
57
|
+
function constructFromObject(object) {
|
|
58
|
+
return object;
|
|
59
|
+
}
|
|
60
|
+
}]);
|
|
61
|
+
}();
|
|
@@ -33,7 +33,7 @@ var ErrorResponse = /*#__PURE__*/function () {
|
|
|
33
33
|
* Constructs a new <code>ErrorResponse</code>.
|
|
34
34
|
* The response of a failed request.
|
|
35
35
|
* @alias module:model/ErrorResponse
|
|
36
|
-
* @param error_code {Number} The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
|
|
36
|
+
* @param error_code {Number} The error code. Refer to [Error codes and status codes](https://www.cobo.com/developers/v2/api-references/error-codes) for more details.
|
|
37
37
|
* @param error_message {String} The error description.
|
|
38
38
|
* @param error_id {String} The error log ID. You can provide the error ID when submitting a ticket to help Cobo to locate the issue.
|
|
39
39
|
*/
|
|
@@ -118,7 +118,7 @@ var ErrorResponse = /*#__PURE__*/function () {
|
|
|
118
118
|
ErrorResponse.RequiredProperties = ["error_code", "error_message", "error_id"];
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
|
|
121
|
+
* The error code. Refer to [Error codes and status codes](https://www.cobo.com/developers/v2/api-references/error-codes) for more details.
|
|
122
122
|
* @member {Number} error_code
|
|
123
123
|
*/
|
|
124
124
|
ErrorResponse.prototype['error_code'] = undefined;
|
|
@@ -127,7 +127,7 @@ EstimateClaimFee.RequiredProperties = ["activity_type"];
|
|
|
127
127
|
EstimateClaimFee.prototype['activity_type'] = 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
|
EstimateClaimFee.prototype['staking_id'] = undefined;
|
|
@@ -38,7 +38,7 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
|
|
|
38
38
|
* The information about a transaction that interacts with a smart contract
|
|
39
39
|
* @alias module:model/EstimateContractCallFeeParams
|
|
40
40
|
* @param request_type {module:model/EstimateFeeRequestType}
|
|
41
|
-
* @param chain_id {String} The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
41
|
+
* @param chain_id {String} The chain ID of the chain on which the smart contract is deployed. 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).
|
|
42
42
|
* @param source {module:model/ContractCallSource}
|
|
43
43
|
* @param destination {module:model/ContractCallDestination}
|
|
44
44
|
*/
|
|
@@ -158,7 +158,7 @@ EstimateContractCallFeeParams.prototype['request_id'] = undefined;
|
|
|
158
158
|
EstimateContractCallFeeParams.prototype['request_type'] = undefined;
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
161
|
+
* The chain ID of the chain on which the smart contract is deployed. 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).
|
|
162
162
|
* @member {String} chain_id
|
|
163
163
|
*/
|
|
164
164
|
EstimateContractCallFeeParams.prototype['chain_id'] = undefined;
|
|
@@ -192,7 +192,7 @@ EstimateFeeParams.prototype['request_type'] = undefined;
|
|
|
192
192
|
EstimateFeeParams.prototype['source'] = undefined;
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
195
|
+
* The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
196
196
|
* @member {String} token_id
|
|
197
197
|
*/
|
|
198
198
|
EstimateFeeParams.prototype['token_id'] = undefined;
|
|
@@ -208,7 +208,7 @@ EstimateFeeParams.prototype['destination'] = undefined;
|
|
|
208
208
|
EstimateFeeParams.prototype['fee_type'] = undefined;
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
|
-
* The chain ID of the chain on which the smart contract is deployed. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
211
|
+
* The chain ID of the chain on which the smart contract is deployed. 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).
|
|
212
212
|
* @member {String} chain_id
|
|
213
213
|
*/
|
|
214
214
|
EstimateFeeParams.prototype['chain_id'] = undefined;
|
|
@@ -45,13 +45,12 @@ var EstimateStakeFee = /*#__PURE__*/function () {
|
|
|
45
45
|
* @param pool_id {module:model/StakingPoolId}
|
|
46
46
|
* @param amount {String} The amount to stake.
|
|
47
47
|
* @param fee {module:model/TransactionRequestFee}
|
|
48
|
-
* @param extra {module:model/CreateStakeActivityExtra}
|
|
49
48
|
*/
|
|
50
|
-
function EstimateStakeFee(activity_type, pool_id, amount, fee
|
|
49
|
+
function EstimateStakeFee(activity_type, pool_id, amount, fee) {
|
|
51
50
|
_classCallCheck(this, EstimateStakeFee);
|
|
52
51
|
_BaseEstimateStakingFee["default"].initialize(this, activity_type);
|
|
53
|
-
_CreateStakeActivity["default"].initialize(this, pool_id, amount, fee
|
|
54
|
-
EstimateStakeFee.initialize(this, activity_type, pool_id, amount, fee
|
|
52
|
+
_CreateStakeActivity["default"].initialize(this, pool_id, amount, fee);
|
|
53
|
+
EstimateStakeFee.initialize(this, activity_type, pool_id, amount, fee);
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
@@ -61,12 +60,11 @@ var EstimateStakeFee = /*#__PURE__*/function () {
|
|
|
61
60
|
*/
|
|
62
61
|
return _createClass(EstimateStakeFee, null, [{
|
|
63
62
|
key: "initialize",
|
|
64
|
-
value: function initialize(obj, activity_type, pool_id, amount, fee
|
|
63
|
+
value: function initialize(obj, activity_type, pool_id, amount, fee) {
|
|
65
64
|
obj['activity_type'] = activity_type;
|
|
66
65
|
obj['pool_id'] = pool_id;
|
|
67
66
|
obj['amount'] = amount;
|
|
68
67
|
obj['fee'] = fee;
|
|
69
|
-
obj['extra'] = extra;
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
/**
|
|
@@ -164,7 +162,7 @@ var EstimateStakeFee = /*#__PURE__*/function () {
|
|
|
164
162
|
}
|
|
165
163
|
}]);
|
|
166
164
|
}();
|
|
167
|
-
EstimateStakeFee.RequiredProperties = ["activity_type", "pool_id", "amount", "fee"
|
|
165
|
+
EstimateStakeFee.RequiredProperties = ["activity_type", "pool_id", "amount", "fee"];
|
|
168
166
|
|
|
169
167
|
/**
|
|
170
168
|
* @member {module:model/ActivityType} activity_type
|
|
@@ -39,7 +39,7 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
|
|
|
39
39
|
* @alias module:model/EstimateTransferFeeParams
|
|
40
40
|
* @param request_type {module:model/EstimateFeeRequestType}
|
|
41
41
|
* @param source {module:model/TransferSource}
|
|
42
|
-
* @param token_id {String} The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
42
|
+
* @param token_id {String} The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
43
43
|
*/
|
|
44
44
|
function EstimateTransferFeeParams(request_type, source, token_id) {
|
|
45
45
|
_classCallCheck(this, EstimateTransferFeeParams);
|
|
@@ -161,7 +161,7 @@ EstimateTransferFeeParams.prototype['request_type'] = undefined;
|
|
|
161
161
|
EstimateTransferFeeParams.prototype['source'] = undefined;
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
* The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
164
|
+
* The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
165
165
|
* @member {String} token_id
|
|
166
166
|
*/
|
|
167
167
|
EstimateTransferFeeParams.prototype['token_id'] = undefined;
|
|
@@ -67,6 +67,9 @@ var EthStakeEstimatedFee = /*#__PURE__*/function () {
|
|
|
67
67
|
if (data.hasOwnProperty('validator_pubkeys')) {
|
|
68
68
|
obj['validator_pubkeys'] = _ApiClient["default"].convertToType(data['validator_pubkeys'], ['String']);
|
|
69
69
|
}
|
|
70
|
+
if (data.hasOwnProperty('core_btc_staking_address')) {
|
|
71
|
+
obj['core_btc_staking_address'] = _ApiClient["default"].convertToType(data['core_btc_staking_address'], 'String');
|
|
72
|
+
}
|
|
70
73
|
}
|
|
71
74
|
return obj;
|
|
72
75
|
}
|
|
@@ -90,6 +93,10 @@ var EthStakeEstimatedFee = /*#__PURE__*/function () {
|
|
|
90
93
|
if (!Array.isArray(data['validator_pubkeys'])) {
|
|
91
94
|
throw new Error("Expected the field `validator_pubkeys` to be an array in the JSON data but got " + data['validator_pubkeys']);
|
|
92
95
|
}
|
|
96
|
+
// ensure the json data is a string
|
|
97
|
+
if (data['core_btc_staking_address'] && !(typeof data['core_btc_staking_address'] === 'string' || data['core_btc_staking_address'] instanceof String)) {
|
|
98
|
+
throw new Error("Expected the field `core_btc_staking_address` to be a primitive type in the JSON string but got " + data['core_btc_staking_address']);
|
|
99
|
+
}
|
|
93
100
|
return true;
|
|
94
101
|
}
|
|
95
102
|
}]);
|
|
@@ -109,4 +116,10 @@ EthStakeEstimatedFee.prototype['fee'] = undefined;
|
|
|
109
116
|
* @member {Array.<String>} validator_pubkeys
|
|
110
117
|
*/
|
|
111
118
|
EthStakeEstimatedFee.prototype['validator_pubkeys'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* P2WSH address generated for this staking operation(If the estimated fee is for core BTC staking).
|
|
122
|
+
* @member {String} core_btc_staking_address
|
|
123
|
+
*/
|
|
124
|
+
EthStakeEstimatedFee.prototype['core_btc_staking_address'] = undefined;
|
|
112
125
|
var _default = exports["default"] = EthStakeEstimatedFee;
|