@cobo/cobo-waas2 1.5.0 → 1.7.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 +31 -5
- package/dist/ApiClient.js +56 -6
- package/dist/ServerDemo.js +80 -0
- package/dist/api/DevelopersApi.js +79 -0
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/OAuthApi.js +8 -8
- package/dist/api/StakingsApi.js +91 -7
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/api/WalletsApi.js +58 -57
- package/dist/crypto/Ed25519Signer.js +36 -0
- package/dist/crypto/Secp256k1Signer.js +36 -0
- package/dist/index.js +153 -13
- package/dist/model/Activity.js +4 -8
- package/dist/model/ActivityAction.js +20 -0
- package/dist/model/ActivityType.js +5 -0
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
- package/dist/model/AutoFuelType.js +61 -0
- package/dist/model/BabylonStakeEstimatedFee.js +118 -0
- package/dist/model/BabylonValidator.js +9 -12
- package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
- package/dist/model/ContractCallParams.js +9 -0
- package/dist/model/CoreStakeExtra.js +170 -0
- package/dist/model/CoreStakingExtra.js +187 -0
- package/dist/model/CreateClaimActivity.js +139 -0
- package/dist/model/CreateClaimActivityRequest.js +182 -0
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivity.js +4 -8
- package/dist/model/CreateStakeActivityExtra.js +94 -8
- package/dist/model/CreateStakeActivityRequest.js +5 -10
- package/dist/model/CreateUnstakeActivity.js +16 -0
- package/dist/model/CreateUnstakeActivityExtra.js +159 -0
- package/dist/model/CreateUnstakeActivityRequest.js +20 -0
- package/dist/model/CreateWithdrawActivity.js +0 -13
- package/dist/model/CreateWithdrawActivityRequest.js +0 -18
- package/dist/model/EstimateClaimFee.js +145 -0
- package/dist/model/EstimateContractCallFeeParams.js +6 -8
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateStakeFee.js +5 -10
- package/dist/model/EstimateTransferFeeParams.js +4 -8
- package/dist/model/EstimateUnstakeFee.js +20 -0
- package/dist/model/EstimateWithdrawFee.js +0 -18
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
- 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 +112 -0
- package/dist/model/EthStakeExtra.js +131 -0
- package/dist/model/EthStakingExtra.js +162 -0
- package/dist/model/EthStakingExtraAllOfBeaconValidators.js +140 -0
- package/dist/model/EthUnstakeExtra.js +131 -0
- package/dist/model/FeeAmount.js +1 -1
- package/dist/model/FeeGasLimit.js +1 -2
- package/dist/model/FeeRate.js +1 -1
- package/dist/model/FixedFeeRate.js +2 -2
- package/dist/model/GetApiKeyInfo200Response.js +251 -0
- package/dist/model/GetStakingEstimationFee201Response.js +144 -43
- package/dist/model/GetStakingEstimationFeeRequest.js +41 -19
- package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
- package/dist/model/GetToken4XXResponse.js +12 -10
- package/dist/model/MPCDelegate.js +1 -1
- package/dist/model/MPCProject.js +4 -4
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/Pagination.js +2 -2
- package/dist/model/{RefreshToken201Response.js → RefreshToken2XXResponse.js} +21 -21
- package/dist/model/RoleScopes.js +128 -0
- package/dist/model/Scopes.js +142 -0
- package/dist/model/SmartContractWalletInfo.js +1 -1
- package/dist/model/StakingPoolId.js +81 -0
- package/dist/model/StakingPoolType.js +10 -0
- package/dist/model/Stakings.js +10 -14
- package/dist/model/StakingsExtra.js +95 -8
- package/dist/model/TransactionEvmEip1559Fee.js +2 -4
- package/dist/model/TransactionEvmLegacyFee.js +2 -4
- package/dist/model/TransactionFee.js +1 -2
- package/dist/model/TransactionRbf.js +9 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -3
- package/dist/model/TransactionRequestEvmLegacyFee.js +2 -3
- package/dist/model/TransactionRequestFee.js +1 -2
- package/dist/model/TransactionRequestFixedFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TransferParams.js +9 -0
- package/docs/Activity.md +1 -1
- package/docs/ActivityAction.md +8 -0
- package/docs/ActivityType.md +2 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
- package/docs/AutoFuelType.md +12 -0
- package/docs/BabylonStakeEstimatedFee.md +12 -0
- package/docs/BabylonValidator.md +6 -4
- package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
- package/docs/ContractCallParams.md +1 -0
- package/docs/CoreStakeExtra.md +13 -0
- package/docs/CoreStakingExtra.md +14 -0
- package/docs/CreateClaimActivity.md +11 -0
- package/docs/CreateClaimActivityRequest.md +12 -0
- package/docs/CreateStakeActivity.md +1 -1
- package/docs/CreateStakeActivityExtra.md +5 -0
- package/docs/CreateStakeActivityRequest.md +1 -1
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateUnstakeActivityExtra.md +10 -0
- package/docs/CreateUnstakeActivityRequest.md +1 -0
- package/docs/CreateWithdrawActivity.md +0 -1
- package/docs/CreateWithdrawActivityRequest.md +0 -1
- package/docs/DevelopersApi.md +55 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EstimateClaimFee.md +11 -0
- package/docs/EstimateContractCallFeeParams.md +2 -2
- package/docs/EstimateFeeParams.md +2 -2
- package/docs/EstimateStakeFee.md +1 -1
- package/docs/EstimateTransferFeeParams.md +2 -2
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimateWithdrawFee.md +0 -1
- package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
- package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EstimatedUtxoFeeSlow.md +1 -1
- package/docs/EthStakeEstimatedFee.md +11 -0
- package/docs/EthStakeExtra.md +10 -0
- package/docs/EthStakingExtra.md +11 -0
- package/docs/EthStakingExtraAllOfBeaconValidators.md +14 -0
- package/docs/EthUnstakeExtra.md +10 -0
- package/docs/FeeAmount.md +1 -1
- package/docs/FeeGasLimit.md +1 -1
- package/docs/FeeRate.md +1 -1
- package/docs/FixedFeeRate.md +1 -1
- package/docs/GetApiKeyInfo200Response.md +30 -0
- package/docs/GetStakingEstimationFee201Response.md +3 -0
- package/docs/GetStakingEstimationFeeRequest.md +3 -4
- package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
- package/docs/GetToken4XXResponse.md +1 -1
- package/docs/MPCProject.md +1 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +4 -4
- package/docs/Pagination.md +1 -1
- package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -4
- package/docs/{RefreshToken201Response.md → RefreshToken2XXResponse.md} +1 -1
- package/docs/RoleScopes.md +10 -0
- package/docs/Scopes.md +13 -0
- package/docs/StakingPoolId.md +20 -0
- package/docs/StakingPoolType.md +4 -0
- package/docs/Stakings.md +2 -2
- package/docs/StakingsApi.md +108 -2
- package/docs/StakingsExtra.md +5 -0
- package/docs/TransactionEvmEip1559Fee.md +1 -1
- package/docs/TransactionEvmLegacyFee.md +1 -1
- package/docs/TransactionFee.md +1 -1
- package/docs/TransactionRbf.md +1 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFee.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferDestination.md +2 -2
- package/docs/TransferParams.md +1 -0
- package/docs/WalletsApi.md +54 -54
- package/package.json +4 -2
- package/dist/model/StakingsValidatorInfo.js +0 -140
- package/docs/StakingsValidatorInfo.md +0 -13
|
@@ -0,0 +1,251 @@
|
|
|
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 _RoleScopes = _interopRequireDefault(require("./RoleScopes"));
|
|
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 GetApiKeyInfo200Response model module.
|
|
30
|
+
* @module model/GetApiKeyInfo200Response
|
|
31
|
+
*/
|
|
32
|
+
var GetApiKeyInfo200Response = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>GetApiKeyInfo200Response</code>.
|
|
35
|
+
* @alias module:model/GetApiKeyInfo200Response
|
|
36
|
+
* @param name {String} The API key name.
|
|
37
|
+
* @param curve_type {module:model/GetApiKeyInfo200Response.CurveTypeEnum} The curve type used for the API key, which determines the cryptographic algorithm for key generation and signing. Possible values include: - `ED25519`: Ed25519 - `SECP256K1`: Secp256k1
|
|
38
|
+
* @param key {String} The API key value.
|
|
39
|
+
* @param created_timestamp {Number} The time when the API key was registered, in Unix timestamp format, measured in milliseconds.
|
|
40
|
+
* @param updated_timestamp {Number} The time when the API key information was last updated, in Unix timestamp format, measured in milliseconds.
|
|
41
|
+
*/
|
|
42
|
+
function GetApiKeyInfo200Response(name, curve_type, key, created_timestamp, updated_timestamp) {
|
|
43
|
+
_classCallCheck(this, GetApiKeyInfo200Response);
|
|
44
|
+
GetApiKeyInfo200Response.initialize(this, name, curve_type, key, created_timestamp, updated_timestamp);
|
|
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(GetApiKeyInfo200Response, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, name, curve_type, key, created_timestamp, updated_timestamp) {
|
|
55
|
+
obj['name'] = name;
|
|
56
|
+
obj['curve_type'] = curve_type;
|
|
57
|
+
obj['key'] = key;
|
|
58
|
+
obj['created_timestamp'] = created_timestamp;
|
|
59
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>GetApiKeyInfo200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/GetApiKeyInfo200Response} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/GetApiKeyInfo200Response} The populated <code>GetApiKeyInfo200Response</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new GetApiKeyInfo200Response();
|
|
74
|
+
if (data.hasOwnProperty('name')) {
|
|
75
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('curve_type')) {
|
|
78
|
+
obj['curve_type'] = _ApiClient["default"].convertToType(data['curve_type'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('key')) {
|
|
81
|
+
obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('callback_url')) {
|
|
84
|
+
obj['callback_url'] = _ApiClient["default"].convertToType(data['callback_url'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('valid_ips')) {
|
|
87
|
+
obj['valid_ips'] = _ApiClient["default"].convertToType(data['valid_ips'], ['String']);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
90
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
93
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('expired_timestamp')) {
|
|
96
|
+
obj['expired_timestamp'] = _ApiClient["default"].convertToType(data['expired_timestamp'], 'Number');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('role_scopes')) {
|
|
99
|
+
obj['role_scopes'] = _ApiClient["default"].convertToType(data['role_scopes'], [_RoleScopes["default"]]);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return obj;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Validates the JSON data with respect to <code>GetApiKeyInfo200Response</code>.
|
|
107
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
108
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetApiKeyInfo200Response</code>.
|
|
109
|
+
*/
|
|
110
|
+
}, {
|
|
111
|
+
key: "validateJSON",
|
|
112
|
+
value: function validateJSON(data) {
|
|
113
|
+
// check to make sure all required properties are present in the JSON string
|
|
114
|
+
var _iterator = _createForOfIteratorHelper(GetApiKeyInfo200Response.RequiredProperties),
|
|
115
|
+
_step;
|
|
116
|
+
try {
|
|
117
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
118
|
+
var property = _step.value;
|
|
119
|
+
if (!data.hasOwnProperty(property)) {
|
|
120
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
} catch (err) {
|
|
125
|
+
_iterator.e(err);
|
|
126
|
+
} finally {
|
|
127
|
+
_iterator.f();
|
|
128
|
+
}
|
|
129
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['curve_type'] && !(typeof data['curve_type'] === 'string' || data['curve_type'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `curve_type` to be a primitive type in the JSON string but got " + data['curve_type']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
if (data['key'] && !(typeof data['key'] === 'string' || data['key'] instanceof String)) {
|
|
138
|
+
throw new Error("Expected the field `key` to be a primitive type in the JSON string but got " + data['key']);
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
if (data['callback_url'] && !(typeof data['callback_url'] === 'string' || data['callback_url'] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `callback_url` to be a primitive type in the JSON string but got " + data['callback_url']);
|
|
143
|
+
}
|
|
144
|
+
// ensure the json data is an array
|
|
145
|
+
if (!Array.isArray(data['valid_ips'])) {
|
|
146
|
+
throw new Error("Expected the field `valid_ips` to be an array in the JSON data but got " + data['valid_ips']);
|
|
147
|
+
}
|
|
148
|
+
if (data['role_scopes']) {
|
|
149
|
+
// data not null
|
|
150
|
+
// ensure the json data is an array
|
|
151
|
+
if (!Array.isArray(data['role_scopes'])) {
|
|
152
|
+
throw new Error("Expected the field `role_scopes` to be an array in the JSON data but got " + data['role_scopes']);
|
|
153
|
+
}
|
|
154
|
+
// validate the optional field `role_scopes` (array)
|
|
155
|
+
var _iterator2 = _createForOfIteratorHelper(data['role_scopes']),
|
|
156
|
+
_step2;
|
|
157
|
+
try {
|
|
158
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
159
|
+
var item = _step2.value;
|
|
160
|
+
_RoleScopes["default"].validateJSON(item);
|
|
161
|
+
}
|
|
162
|
+
} catch (err) {
|
|
163
|
+
_iterator2.e(err);
|
|
164
|
+
} finally {
|
|
165
|
+
_iterator2.f();
|
|
166
|
+
}
|
|
167
|
+
;
|
|
168
|
+
}
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
}]);
|
|
172
|
+
}();
|
|
173
|
+
GetApiKeyInfo200Response.RequiredProperties = ["name", "curve_type", "key", "created_timestamp", "updated_timestamp"];
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The API key name.
|
|
177
|
+
* @member {String} name
|
|
178
|
+
*/
|
|
179
|
+
GetApiKeyInfo200Response.prototype['name'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The curve type used for the API key, which determines the cryptographic algorithm for key generation and signing. Possible values include: - `ED25519`: Ed25519 - `SECP256K1`: Secp256k1
|
|
183
|
+
* @member {module:model/GetApiKeyInfo200Response.CurveTypeEnum} curve_type
|
|
184
|
+
*/
|
|
185
|
+
GetApiKeyInfo200Response.prototype['curve_type'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The API key value.
|
|
189
|
+
* @member {String} key
|
|
190
|
+
*/
|
|
191
|
+
GetApiKeyInfo200Response.prototype['key'] = undefined;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The URL of the callback endpoint that receives callback messages triggered by this API key.
|
|
195
|
+
* @member {String} callback_url
|
|
196
|
+
*/
|
|
197
|
+
GetApiKeyInfo200Response.prototype['callback_url'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* (Applicable to permanent API keys only) The list of IP addresses that are allowed to use this API key.
|
|
201
|
+
* @member {Array.<String>} valid_ips
|
|
202
|
+
*/
|
|
203
|
+
GetApiKeyInfo200Response.prototype['valid_ips'] = undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The time when the API key was registered, in Unix timestamp format, measured in milliseconds.
|
|
207
|
+
* @member {Number} created_timestamp
|
|
208
|
+
*/
|
|
209
|
+
GetApiKeyInfo200Response.prototype['created_timestamp'] = undefined;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The time when the API key information was last updated, in Unix timestamp format, measured in milliseconds.
|
|
213
|
+
* @member {Number} updated_timestamp
|
|
214
|
+
*/
|
|
215
|
+
GetApiKeyInfo200Response.prototype['updated_timestamp'] = undefined;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The time when the API key expires, in Unix timestamp format, measured in milliseconds. For permanent API keys, this property value is `null`.
|
|
219
|
+
* @member {Number} expired_timestamp
|
|
220
|
+
*/
|
|
221
|
+
GetApiKeyInfo200Response.prototype['expired_timestamp'] = undefined;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The list of user roles and wallet scopes associated with the API key.
|
|
225
|
+
* @member {Array.<module:model/RoleScopes>} role_scopes
|
|
226
|
+
*/
|
|
227
|
+
GetApiKeyInfo200Response.prototype['role_scopes'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Allowed values for the <code>curve_type</code> property.
|
|
231
|
+
* @enum {String}
|
|
232
|
+
* @readonly
|
|
233
|
+
*/
|
|
234
|
+
GetApiKeyInfo200Response['CurveTypeEnum'] = {
|
|
235
|
+
/**
|
|
236
|
+
* value: "ED25519"
|
|
237
|
+
* @const
|
|
238
|
+
*/
|
|
239
|
+
"ED25519": "ED25519",
|
|
240
|
+
/**
|
|
241
|
+
* value: "SECP256K1"
|
|
242
|
+
* @const
|
|
243
|
+
*/
|
|
244
|
+
"SECP256K1": "SECP256K1",
|
|
245
|
+
/**
|
|
246
|
+
* value: "unknown_default_open_api"
|
|
247
|
+
* @const
|
|
248
|
+
*/
|
|
249
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
250
|
+
};
|
|
251
|
+
var _default = exports["default"] = GetApiKeyInfo200Response;
|
|
@@ -5,12 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _BabylonStakeEstimatedFee = _interopRequireDefault(require("./BabylonStakeEstimatedFee"));
|
|
9
|
+
var _EstimatedFee = _interopRequireDefault(require("./EstimatedFee"));
|
|
10
|
+
var _EthStakeEstimatedFee = _interopRequireDefault(require("./EthStakeEstimatedFee"));
|
|
8
11
|
var _FeeType = _interopRequireDefault(require("./FeeType"));
|
|
12
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
13
|
+
var _GetStakingEstimationFee201Response;
|
|
9
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
15
|
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
16
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
17
|
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); } }
|
|
13
18
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
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
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
21
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
22
|
* Cobo Wallet as a Service 2.0
|
|
@@ -30,66 +36,160 @@ var GetStakingEstimationFee201Response = /*#__PURE__*/function () {
|
|
|
30
36
|
/**
|
|
31
37
|
* Constructs a new <code>GetStakingEstimationFee201Response</code>.
|
|
32
38
|
* @alias module:model/GetStakingEstimationFee201Response
|
|
39
|
+
* @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} instance The actual instance to initialize GetStakingEstimationFee201Response.
|
|
33
40
|
*/
|
|
34
41
|
function GetStakingEstimationFee201Response() {
|
|
42
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
35
43
|
_classCallCheck(this, GetStakingEstimationFee201Response);
|
|
36
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Returns the JSON representation of the actual instance.
|
|
46
|
+
* @return {string}
|
|
47
|
+
*/
|
|
48
|
+
_defineProperty(this, "toJSON", function () {
|
|
49
|
+
return this.getActualInstance();
|
|
50
|
+
});
|
|
51
|
+
if (instance === null) {
|
|
52
|
+
this.actualInstance = null;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
var match = 0;
|
|
56
|
+
var errorMessages = [];
|
|
57
|
+
var discriminatorValue = instance["pool_type"];
|
|
58
|
+
if (discriminatorValue) {
|
|
59
|
+
switch (discriminatorValue) {
|
|
60
|
+
case "Babylon":
|
|
61
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
62
|
+
match++;
|
|
63
|
+
break;
|
|
64
|
+
case "ETHBeacon":
|
|
65
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
if (instance instanceof _EthStakeEstimatedFee["default"]) {
|
|
76
|
+
this.actualInstance = instance;
|
|
77
|
+
} else if (!!_EthStakeEstimatedFee["default"].validateJSON && _EthStakeEstimatedFee["default"].validateJSON(instance)) {
|
|
78
|
+
// plain JS object
|
|
79
|
+
// create EthStakeEstimatedFee from JS object
|
|
80
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
81
|
+
} else {
|
|
82
|
+
if (_EthStakeEstimatedFee["default"].constructFromObject(instance)) {
|
|
83
|
+
if (!!_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
|
|
84
|
+
if (_EthStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
|
|
85
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
this.actualInstance = _EthStakeEstimatedFee["default"].constructFromObject(instance);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
match++;
|
|
93
|
+
} catch (err) {
|
|
94
|
+
// json data failed to deserialize into EthStakeEstimatedFee
|
|
95
|
+
errorMessages.push("Failed to construct EthStakeEstimatedFee: " + err);
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
if (instance instanceof _BabylonStakeEstimatedFee["default"]) {
|
|
99
|
+
this.actualInstance = instance;
|
|
100
|
+
} else if (!!_BabylonStakeEstimatedFee["default"].validateJSON && _BabylonStakeEstimatedFee["default"].validateJSON(instance)) {
|
|
101
|
+
// plain JS object
|
|
102
|
+
// create BabylonStakeEstimatedFee from JS object
|
|
103
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
104
|
+
} else {
|
|
105
|
+
if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance)) {
|
|
106
|
+
if (!!_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON) {
|
|
107
|
+
if (_BabylonStakeEstimatedFee["default"].constructFromObject(instance).toJSON()) {
|
|
108
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
this.actualInstance = _BabylonStakeEstimatedFee["default"].constructFromObject(instance);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
match++;
|
|
116
|
+
} catch (err) {
|
|
117
|
+
// json data failed to deserialize into BabylonStakeEstimatedFee
|
|
118
|
+
errorMessages.push("Failed to construct BabylonStakeEstimatedFee: " + err);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// if (match > 1) {
|
|
122
|
+
// throw new Error("Multiple matches found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Input: " + JSON.stringify(instance));
|
|
123
|
+
// } else
|
|
124
|
+
if (match === 0) {
|
|
125
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
126
|
+
// throw new Error("No match found constructing `GetStakingEstimationFee201Response` with oneOf schemas BabylonStakeEstimatedFee, EthStakeEstimatedFee. Details: " +
|
|
127
|
+
// errorMessages.join(", "));
|
|
128
|
+
return;
|
|
129
|
+
} else {// only 1 match
|
|
130
|
+
// the input is valid
|
|
131
|
+
}
|
|
37
132
|
}
|
|
38
133
|
|
|
39
134
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
135
|
+
* Constructs a <code>GetStakingEstimationFee201Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
136
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
137
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
138
|
+
* @param {module:model/GetStakingEstimationFee201Response} obj Optional instance to populate.
|
|
139
|
+
* @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
|
|
43
140
|
*/
|
|
44
|
-
return _createClass(GetStakingEstimationFee201Response,
|
|
45
|
-
key: "
|
|
46
|
-
value:
|
|
47
|
-
|
|
141
|
+
return _createClass(GetStakingEstimationFee201Response, [{
|
|
142
|
+
key: "getActualInstance",
|
|
143
|
+
value:
|
|
48
144
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
-
* @param {module:model/GetStakingEstimationFee201Response} obj Optional instance to populate.
|
|
53
|
-
* @return {module:model/GetStakingEstimationFee201Response} The populated <code>GetStakingEstimationFee201Response</code> instance.
|
|
145
|
+
* Gets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
|
|
146
|
+
* @return {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} The actual instance.
|
|
54
147
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
value: function constructFromObject(data, obj) {
|
|
58
|
-
if (data) {
|
|
59
|
-
obj = obj || new GetStakingEstimationFee201Response();
|
|
60
|
-
if (data.hasOwnProperty('fee_type')) {
|
|
61
|
-
obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
|
|
62
|
-
}
|
|
63
|
-
if (data.hasOwnProperty('fee_amount')) {
|
|
64
|
-
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
65
|
-
}
|
|
66
|
-
if (data.hasOwnProperty('token_id')) {
|
|
67
|
-
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return obj;
|
|
148
|
+
function getActualInstance() {
|
|
149
|
+
return this.actualInstance;
|
|
71
150
|
}
|
|
72
151
|
|
|
73
152
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param {
|
|
76
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetStakingEstimationFee201Response</code>.
|
|
153
|
+
* Sets the actual instance, which can be <code>BabylonStakeEstimatedFee</code>, <code>EthStakeEstimatedFee</code>.
|
|
154
|
+
* @param {(module:model/BabylonStakeEstimatedFee|module:model/EthStakeEstimatedFee)} obj The actual instance.
|
|
77
155
|
*/
|
|
78
156
|
}, {
|
|
79
|
-
key: "
|
|
80
|
-
value: function
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
157
|
+
key: "setActualInstance",
|
|
158
|
+
value: function setActualInstance(obj) {
|
|
159
|
+
this.actualInstance = GetStakingEstimationFee201Response.constructFromObject(obj).getActualInstance();
|
|
160
|
+
}
|
|
161
|
+
}], [{
|
|
162
|
+
key: "constructFromObject",
|
|
163
|
+
value: function constructFromObject(data, obj) {
|
|
164
|
+
return new GetStakingEstimationFee201Response(data);
|
|
90
165
|
}
|
|
91
166
|
}]);
|
|
92
167
|
}();
|
|
168
|
+
/**
|
|
169
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
170
|
+
*/
|
|
171
|
+
_GetStakingEstimationFee201Response = GetStakingEstimationFee201Response;
|
|
172
|
+
/**
|
|
173
|
+
* Create an instance of GetStakingEstimationFee201Response from a JSON string.
|
|
174
|
+
* @param {string} json_string JSON string.
|
|
175
|
+
* @return {module:model/GetStakingEstimationFee201Response} An instance of GetStakingEstimationFee201Response.
|
|
176
|
+
*/
|
|
177
|
+
_defineProperty(GetStakingEstimationFee201Response, "fromJSON", function (json_string) {
|
|
178
|
+
return _GetStakingEstimationFee201Response.constructFromObject(JSON.parse(json_string));
|
|
179
|
+
});
|
|
180
|
+
GetStakingEstimationFee201Response.prototype['pool_type'] = undefined;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @member {module:model/EstimatedFee} fee
|
|
184
|
+
*/
|
|
185
|
+
GetStakingEstimationFee201Response.prototype['fee'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* A list of public keys associated with the Ethereum validators for this staking operation.
|
|
189
|
+
* @member {Array.<String>} validator_pubkeys
|
|
190
|
+
*/
|
|
191
|
+
GetStakingEstimationFee201Response.prototype['validator_pubkeys'] = undefined;
|
|
192
|
+
|
|
93
193
|
/**
|
|
94
194
|
* @member {module:model/FeeType} fee_type
|
|
95
195
|
*/
|
|
@@ -106,4 +206,5 @@ GetStakingEstimationFee201Response.prototype['fee_amount'] = undefined;
|
|
|
106
206
|
* @member {String} token_id
|
|
107
207
|
*/
|
|
108
208
|
GetStakingEstimationFee201Response.prototype['token_id'] = undefined;
|
|
209
|
+
GetStakingEstimationFee201Response.OneOf = ["BabylonStakeEstimatedFee", "EthStakeEstimatedFee"];
|
|
109
210
|
var _default = exports["default"] = GetStakingEstimationFee201Response;
|
|
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ActivityType = _interopRequireDefault(require("./ActivityType"));
|
|
9
|
-
var
|
|
9
|
+
var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
|
|
10
|
+
var _EstimateClaimFee = _interopRequireDefault(require("./EstimateClaimFee"));
|
|
10
11
|
var _EstimateStakeFee = _interopRequireDefault(require("./EstimateStakeFee"));
|
|
11
12
|
var _EstimateUnstakeFee = _interopRequireDefault(require("./EstimateUnstakeFee"));
|
|
12
13
|
var _EstimateWithdrawFee = _interopRequireDefault(require("./EstimateWithdrawFee"));
|
|
14
|
+
var _StakingPoolId = _interopRequireDefault(require("./StakingPoolId"));
|
|
13
15
|
var _StakingSource = _interopRequireDefault(require("./StakingSource"));
|
|
14
16
|
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
15
17
|
var _GetStakingEstimationFeeRequest;
|
|
@@ -38,7 +40,7 @@ var GetStakingEstimationFeeRequest = /*#__PURE__*/function () {
|
|
|
38
40
|
/**
|
|
39
41
|
* Constructs a new <code>GetStakingEstimationFeeRequest</code>.
|
|
40
42
|
* @alias module:model/GetStakingEstimationFeeRequest
|
|
41
|
-
* @param {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} instance The actual instance to initialize GetStakingEstimationFeeRequest.
|
|
43
|
+
* @param {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} instance The actual instance to initialize GetStakingEstimationFeeRequest.
|
|
42
44
|
*/
|
|
43
45
|
function GetStakingEstimationFeeRequest() {
|
|
44
46
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -59,6 +61,10 @@ var GetStakingEstimationFeeRequest = /*#__PURE__*/function () {
|
|
|
59
61
|
var discriminatorValue = instance["activity_type"];
|
|
60
62
|
if (discriminatorValue) {
|
|
61
63
|
switch (discriminatorValue) {
|
|
64
|
+
case "Claim":
|
|
65
|
+
this.actualInstance = _EstimateClaimFee["default"].constructFromObject(instance);
|
|
66
|
+
match++;
|
|
67
|
+
break;
|
|
62
68
|
case "Stake":
|
|
63
69
|
this.actualInstance = _EstimateStakeFee["default"].constructFromObject(instance);
|
|
64
70
|
match++;
|
|
@@ -146,13 +152,36 @@ var GetStakingEstimationFeeRequest = /*#__PURE__*/function () {
|
|
|
146
152
|
// json data failed to deserialize into EstimateWithdrawFee
|
|
147
153
|
errorMessages.push("Failed to construct EstimateWithdrawFee: " + err);
|
|
148
154
|
}
|
|
155
|
+
try {
|
|
156
|
+
if (instance instanceof _EstimateClaimFee["default"]) {
|
|
157
|
+
this.actualInstance = instance;
|
|
158
|
+
} else if (!!_EstimateClaimFee["default"].validateJSON && _EstimateClaimFee["default"].validateJSON(instance)) {
|
|
159
|
+
// plain JS object
|
|
160
|
+
// create EstimateClaimFee from JS object
|
|
161
|
+
this.actualInstance = _EstimateClaimFee["default"].constructFromObject(instance);
|
|
162
|
+
} else {
|
|
163
|
+
if (_EstimateClaimFee["default"].constructFromObject(instance)) {
|
|
164
|
+
if (!!_EstimateClaimFee["default"].constructFromObject(instance).toJSON) {
|
|
165
|
+
if (_EstimateClaimFee["default"].constructFromObject(instance).toJSON()) {
|
|
166
|
+
this.actualInstance = _EstimateClaimFee["default"].constructFromObject(instance);
|
|
167
|
+
}
|
|
168
|
+
} else {
|
|
169
|
+
this.actualInstance = _EstimateClaimFee["default"].constructFromObject(instance);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
match++;
|
|
174
|
+
} catch (err) {
|
|
175
|
+
// json data failed to deserialize into EstimateClaimFee
|
|
176
|
+
errorMessages.push("Failed to construct EstimateClaimFee: " + err);
|
|
177
|
+
}
|
|
149
178
|
|
|
150
179
|
// if (match > 1) {
|
|
151
|
-
// throw new Error("Multiple matches found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Input: " + JSON.stringify(instance));
|
|
180
|
+
// throw new Error("Multiple matches found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateClaimFee, EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Input: " + JSON.stringify(instance));
|
|
152
181
|
// } else
|
|
153
182
|
if (match === 0) {
|
|
154
183
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
155
|
-
// throw new Error("No match found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Details: " +
|
|
184
|
+
// throw new Error("No match found constructing `GetStakingEstimationFeeRequest` with oneOf schemas EstimateClaimFee, EstimateStakeFee, EstimateUnstakeFee, EstimateWithdrawFee. Details: " +
|
|
156
185
|
// errorMessages.join(", "));
|
|
157
186
|
return;
|
|
158
187
|
} else {// only 1 match
|
|
@@ -171,16 +200,16 @@ var GetStakingEstimationFeeRequest = /*#__PURE__*/function () {
|
|
|
171
200
|
key: "getActualInstance",
|
|
172
201
|
value:
|
|
173
202
|
/**
|
|
174
|
-
* Gets the actual instance, which can be <code>EstimateStakeFee</code>, <code>EstimateUnstakeFee</code>, <code>EstimateWithdrawFee</code>.
|
|
175
|
-
* @return {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} The actual instance.
|
|
203
|
+
* Gets the actual instance, which can be <code>EstimateClaimFee</code>, <code>EstimateStakeFee</code>, <code>EstimateUnstakeFee</code>, <code>EstimateWithdrawFee</code>.
|
|
204
|
+
* @return {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} The actual instance.
|
|
176
205
|
*/
|
|
177
206
|
function getActualInstance() {
|
|
178
207
|
return this.actualInstance;
|
|
179
208
|
}
|
|
180
209
|
|
|
181
210
|
/**
|
|
182
|
-
* Sets the actual instance, which can be <code>EstimateStakeFee</code>, <code>EstimateUnstakeFee</code>, <code>EstimateWithdrawFee</code>.
|
|
183
|
-
* @param {(module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} obj The actual instance.
|
|
211
|
+
* Sets the actual instance, which can be <code>EstimateClaimFee</code>, <code>EstimateStakeFee</code>, <code>EstimateUnstakeFee</code>, <code>EstimateWithdrawFee</code>.
|
|
212
|
+
* @param {(module:model/EstimateClaimFee|module:model/EstimateStakeFee|module:model/EstimateUnstakeFee|module:model/EstimateWithdrawFee)} obj The actual instance.
|
|
184
213
|
*/
|
|
185
214
|
}, {
|
|
186
215
|
key: "setActualInstance",
|
|
@@ -220,8 +249,7 @@ GetStakingEstimationFeeRequest.prototype['request_id'] = undefined;
|
|
|
220
249
|
GetStakingEstimationFeeRequest.prototype['source'] = undefined;
|
|
221
250
|
|
|
222
251
|
/**
|
|
223
|
-
*
|
|
224
|
-
* @member {String} pool_id
|
|
252
|
+
* @member {module:model/StakingPoolId} pool_id
|
|
225
253
|
*/
|
|
226
254
|
GetStakingEstimationFeeRequest.prototype['pool_id'] = undefined;
|
|
227
255
|
|
|
@@ -237,20 +265,14 @@ GetStakingEstimationFeeRequest.prototype['amount'] = undefined;
|
|
|
237
265
|
GetStakingEstimationFeeRequest.prototype['fee'] = undefined;
|
|
238
266
|
|
|
239
267
|
/**
|
|
240
|
-
* @member {module:model/
|
|
268
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
241
269
|
*/
|
|
242
270
|
GetStakingEstimationFeeRequest.prototype['extra'] = undefined;
|
|
243
271
|
|
|
244
272
|
/**
|
|
245
|
-
* The ID of the
|
|
273
|
+
* 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).
|
|
246
274
|
* @member {String} staking_id
|
|
247
275
|
*/
|
|
248
276
|
GetStakingEstimationFeeRequest.prototype['staking_id'] = undefined;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The withdrawal address.
|
|
252
|
-
* @member {String} address
|
|
253
|
-
*/
|
|
254
|
-
GetStakingEstimationFeeRequest.prototype['address'] = undefined;
|
|
255
|
-
GetStakingEstimationFeeRequest.OneOf = ["EstimateStakeFee", "EstimateUnstakeFee", "EstimateWithdrawFee"];
|
|
277
|
+
GetStakingEstimationFeeRequest.OneOf = ["EstimateClaimFee", "EstimateStakeFee", "EstimateUnstakeFee", "EstimateWithdrawFee"];
|
|
256
278
|
var _default = exports["default"] = GetStakingEstimationFeeRequest;
|