@cobo/cobo-waas2 1.9.0 → 1.10.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 +40 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/DevelopersApi.js +4 -4
- package/dist/api/StakingsApi.js +400 -6
- package/dist/api/SwapsApi.js +360 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +164 -3
- package/dist/model/AddressesEventData.js +4 -4
- package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
- package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
- package/dist/model/BabylonAirdropPop.js +186 -0
- package/dist/model/BabylonAirdropRegistration.js +172 -0
- package/dist/model/BabylonEligibleAirdrop.js +157 -0
- package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
- package/dist/model/BabylonRegistrationStatus.js +66 -0
- package/dist/model/BabylonStakingRegistration.js +185 -0
- package/dist/model/ContractCallSource.js +6 -0
- package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
- package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
- package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
- package/dist/model/CreateSwapActivityRequest.js +153 -0
- package/dist/model/CreateSwapQuote201Response.js +264 -0
- package/dist/model/CreateSwapQuoteRequest.js +166 -0
- package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
- package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
- package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
- package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
- package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/MessageSignSource.js +6 -0
- package/dist/model/MpcContractCallSource.js +16 -0
- package/dist/model/MpcMessageSignSource.js +16 -0
- package/dist/model/MpcSigningGroup.js +27 -4
- package/dist/model/MpcTransferSource.js +16 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
- package/dist/model/StakingPoolId.js +30 -0
- package/dist/model/StakingPoolType.js +15 -0
- package/dist/model/SwapQuote.js +203 -0
- package/dist/model/TransactionDestination.js +4 -4
- package/dist/model/TransactionRawTxInfo.js +16 -0
- package/dist/model/TransactionRbfSource.js +6 -0
- package/dist/model/TransactionUtxoChange.js +101 -0
- package/dist/model/TransferSource.js +6 -0
- package/dist/model/WebhookEventData.js +2 -2
- package/docs/AddressesEventData.md +1 -1
- package/docs/AddressesEventDataAllOfAddresses.md +19 -0
- package/docs/BabylonAirdropPop.md +14 -0
- package/docs/BabylonAirdropRegistration.md +16 -0
- package/docs/BabylonEligibleAirdrop.md +14 -0
- package/docs/BabylonRegistrationRequestStatus.md +14 -0
- package/docs/BabylonRegistrationStatus.md +14 -0
- package/docs/BabylonStakingRegistration.md +17 -0
- package/docs/ContractCallSource.md +1 -0
- package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
- package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
- package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
- package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
- package/docs/CreateSwapActivityRequest.md +12 -0
- package/docs/CreateSwapQuote201Response.md +17 -0
- package/docs/CreateSwapQuoteRequest.md +13 -0
- package/docs/DevelopersApi.md +2 -2
- package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
- package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200Response.md +10 -0
- package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
- package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
- package/docs/ListEnableTokenPairs200Response.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/MessageSignSource.md +1 -0
- package/docs/MpcContractCallSource.md +1 -0
- package/docs/MpcMessageSignSource.md +1 -0
- package/docs/MpcSigningGroup.md +1 -1
- package/docs/MpcTransferSource.md +1 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
- package/docs/StakingPoolId.md +12 -0
- package/docs/StakingPoolType.md +6 -0
- package/docs/StakingsApi.md +449 -1
- package/docs/SwapQuote.md +16 -0
- package/docs/SwapsApi.md +348 -0
- package/docs/TransactionRawTxInfo.md +1 -0
- package/docs/TransactionRbfSource.md +1 -0
- package/docs/TransactionUtxoChange.md +10 -0
- package/docs/TransactionsApi.md +2 -2
- package/docs/TransferSource.md +1 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +2 -2
- package/docs/SwapSummary.md +0 -10
|
@@ -0,0 +1,123 @@
|
|
|
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 _BabylonAirdropRegistration = _interopRequireDefault(require("./BabylonAirdropRegistration"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
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 ListBabylonAirdropRegistrations200Response model module.
|
|
31
|
+
* @module model/ListBabylonAirdropRegistrations200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListBabylonAirdropRegistrations200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListBabylonAirdropRegistrations200Response</code>.
|
|
36
|
+
* @alias module:model/ListBabylonAirdropRegistrations200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListBabylonAirdropRegistrations200Response() {
|
|
39
|
+
_classCallCheck(this, ListBabylonAirdropRegistrations200Response);
|
|
40
|
+
ListBabylonAirdropRegistrations200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListBabylonAirdropRegistrations200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListBabylonAirdropRegistrations200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListBabylonAirdropRegistrations200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListBabylonAirdropRegistrations200Response} The populated <code>ListBabylonAirdropRegistrations200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListBabylonAirdropRegistrations200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BabylonAirdropRegistration["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListBabylonAirdropRegistrations200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonAirdropRegistrations200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_BabylonAirdropRegistration["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/BabylonAirdropRegistration>} data
|
|
116
|
+
*/
|
|
117
|
+
ListBabylonAirdropRegistrations200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListBabylonAirdropRegistrations200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListBabylonAirdropRegistrations200Response;
|
|
@@ -0,0 +1,123 @@
|
|
|
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 _BabylonEligibleAirdrop = _interopRequireDefault(require("./BabylonEligibleAirdrop"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
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 ListBabylonEligibleAirdrops200Response model module.
|
|
31
|
+
* @module model/ListBabylonEligibleAirdrops200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListBabylonEligibleAirdrops200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListBabylonEligibleAirdrops200Response</code>.
|
|
36
|
+
* @alias module:model/ListBabylonEligibleAirdrops200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListBabylonEligibleAirdrops200Response() {
|
|
39
|
+
_classCallCheck(this, ListBabylonEligibleAirdrops200Response);
|
|
40
|
+
ListBabylonEligibleAirdrops200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListBabylonEligibleAirdrops200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListBabylonEligibleAirdrops200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListBabylonEligibleAirdrops200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListBabylonEligibleAirdrops200Response} The populated <code>ListBabylonEligibleAirdrops200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListBabylonEligibleAirdrops200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BabylonEligibleAirdrop["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListBabylonEligibleAirdrops200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonEligibleAirdrops200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_BabylonEligibleAirdrop["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/BabylonEligibleAirdrop>} data
|
|
116
|
+
*/
|
|
117
|
+
ListBabylonEligibleAirdrops200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListBabylonEligibleAirdrops200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListBabylonEligibleAirdrops200Response;
|
|
@@ -0,0 +1,123 @@
|
|
|
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 _ListBabylonEligibleStakings200ResponseDataInner = _interopRequireDefault(require("./ListBabylonEligibleStakings200ResponseDataInner"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
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 ListBabylonEligibleStakings200Response model module.
|
|
31
|
+
* @module model/ListBabylonEligibleStakings200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListBabylonEligibleStakings200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListBabylonEligibleStakings200Response</code>.
|
|
36
|
+
* @alias module:model/ListBabylonEligibleStakings200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListBabylonEligibleStakings200Response() {
|
|
39
|
+
_classCallCheck(this, ListBabylonEligibleStakings200Response);
|
|
40
|
+
ListBabylonEligibleStakings200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListBabylonEligibleStakings200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListBabylonEligibleStakings200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListBabylonEligibleStakings200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListBabylonEligibleStakings200Response} The populated <code>ListBabylonEligibleStakings200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListBabylonEligibleStakings200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ListBabylonEligibleStakings200ResponseDataInner["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListBabylonEligibleStakings200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonEligibleStakings200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_ListBabylonEligibleStakings200ResponseDataInner["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/ListBabylonEligibleStakings200ResponseDataInner>} data
|
|
116
|
+
*/
|
|
117
|
+
ListBabylonEligibleStakings200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListBabylonEligibleStakings200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListBabylonEligibleStakings200Response;
|
|
@@ -0,0 +1,141 @@
|
|
|
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 _BabylonRegistrationStatus = _interopRequireDefault(require("./BabylonRegistrationStatus"));
|
|
9
|
+
var _StakingSource = _interopRequireDefault(require("./StakingSource"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Cobo Wallet as a Service 2.0
|
|
18
|
+
*
|
|
19
|
+
* Contact: help@cobo.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The ListBabylonEligibleStakings200ResponseDataInner model module.
|
|
28
|
+
* @module model/ListBabylonEligibleStakings200ResponseDataInner
|
|
29
|
+
*/
|
|
30
|
+
var ListBabylonEligibleStakings200ResponseDataInner = /*#__PURE__*/function () {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new <code>ListBabylonEligibleStakings200ResponseDataInner</code>.
|
|
33
|
+
* The babylon staking position eligible for Phase-2 registration.
|
|
34
|
+
* @alias module:model/ListBabylonEligibleStakings200ResponseDataInner
|
|
35
|
+
*/
|
|
36
|
+
function ListBabylonEligibleStakings200ResponseDataInner() {
|
|
37
|
+
_classCallCheck(this, ListBabylonEligibleStakings200ResponseDataInner);
|
|
38
|
+
ListBabylonEligibleStakings200ResponseDataInner.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(ListBabylonEligibleStakings200ResponseDataInner, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>ListBabylonEligibleStakings200ResponseDataInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/ListBabylonEligibleStakings200ResponseDataInner} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/ListBabylonEligibleStakings200ResponseDataInner} The populated <code>ListBabylonEligibleStakings200ResponseDataInner</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new ListBabylonEligibleStakings200ResponseDataInner();
|
|
62
|
+
if (data.hasOwnProperty('staking_id')) {
|
|
63
|
+
obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('btc_address')) {
|
|
66
|
+
obj['btc_address'] = _StakingSource["default"].constructFromObject(data['btc_address']);
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('babylon_address')) {
|
|
69
|
+
obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('staked_amount')) {
|
|
72
|
+
obj['staked_amount'] = _ApiClient["default"].convertToType(data['staked_amount'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('status')) {
|
|
75
|
+
obj['status'] = _BabylonRegistrationStatus["default"].constructFromObject(data['status']);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Validates the JSON data with respect to <code>ListBabylonEligibleStakings200ResponseDataInner</code>.
|
|
83
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
84
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonEligibleStakings200ResponseDataInner</code>.
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "validateJSON",
|
|
88
|
+
value: function validateJSON(data) {
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
|
|
92
|
+
}
|
|
93
|
+
// validate the optional field `btc_address`
|
|
94
|
+
if (data['btc_address']) {
|
|
95
|
+
// data not null
|
|
96
|
+
if (!!_StakingSource["default"].validateJSON) {
|
|
97
|
+
_StakingSource["default"].validateJSON(data['btc_address']);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// validate the optional field `babylon_address`
|
|
101
|
+
if (data['babylon_address']) {
|
|
102
|
+
// data not null
|
|
103
|
+
if (!!_StakingSource["default"].validateJSON) {
|
|
104
|
+
_StakingSource["default"].validateJSON(data['babylon_address']);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
if (data['staked_amount'] && !(typeof data['staked_amount'] === 'string' || data['staked_amount'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `staked_amount` to be a primitive type in the JSON string but got " + data['staked_amount']);
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}]);
|
|
114
|
+
}();
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the Phase-1 BTC staking position.
|
|
117
|
+
* @member {String} staking_id
|
|
118
|
+
*/
|
|
119
|
+
ListBabylonEligibleStakings200ResponseDataInner.prototype['staking_id'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @member {module:model/StakingSource} btc_address
|
|
123
|
+
*/
|
|
124
|
+
ListBabylonEligibleStakings200ResponseDataInner.prototype['btc_address'] = undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @member {module:model/StakingSource} babylon_address
|
|
128
|
+
*/
|
|
129
|
+
ListBabylonEligibleStakings200ResponseDataInner.prototype['babylon_address'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The current amount of BTC staked.
|
|
133
|
+
* @member {String} staked_amount
|
|
134
|
+
*/
|
|
135
|
+
ListBabylonEligibleStakings200ResponseDataInner.prototype['staked_amount'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @member {module:model/BabylonRegistrationStatus} status
|
|
139
|
+
*/
|
|
140
|
+
ListBabylonEligibleStakings200ResponseDataInner.prototype['status'] = undefined;
|
|
141
|
+
var _default = exports["default"] = ListBabylonEligibleStakings200ResponseDataInner;
|
|
@@ -0,0 +1,123 @@
|
|
|
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 _BabylonStakingRegistration = _interopRequireDefault(require("./BabylonStakingRegistration"));
|
|
9
|
+
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
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 ListBabylonStakingRegistrations200Response model module.
|
|
31
|
+
* @module model/ListBabylonStakingRegistrations200Response
|
|
32
|
+
*/
|
|
33
|
+
var ListBabylonStakingRegistrations200Response = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>ListBabylonStakingRegistrations200Response</code>.
|
|
36
|
+
* @alias module:model/ListBabylonStakingRegistrations200Response
|
|
37
|
+
*/
|
|
38
|
+
function ListBabylonStakingRegistrations200Response() {
|
|
39
|
+
_classCallCheck(this, ListBabylonStakingRegistrations200Response);
|
|
40
|
+
ListBabylonStakingRegistrations200Response.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(ListBabylonStakingRegistrations200Response, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>ListBabylonStakingRegistrations200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/ListBabylonStakingRegistrations200Response} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/ListBabylonStakingRegistrations200Response} The populated <code>ListBabylonStakingRegistrations200Response</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new ListBabylonStakingRegistrations200Response();
|
|
64
|
+
if (data.hasOwnProperty('data')) {
|
|
65
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_BabylonStakingRegistration["default"]]);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('pagination')) {
|
|
68
|
+
obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>ListBabylonStakingRegistrations200Response</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListBabylonStakingRegistrations200Response</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
if (data['data']) {
|
|
83
|
+
// data not null
|
|
84
|
+
// ensure the json data is an array
|
|
85
|
+
if (!Array.isArray(data['data'])) {
|
|
86
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `data` (array)
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
90
|
+
_step;
|
|
91
|
+
try {
|
|
92
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
93
|
+
var item = _step.value;
|
|
94
|
+
_BabylonStakingRegistration["default"].validateJSON(item);
|
|
95
|
+
}
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
;
|
|
102
|
+
}
|
|
103
|
+
// validate the optional field `pagination`
|
|
104
|
+
if (data['pagination']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_Pagination["default"].validateJSON) {
|
|
107
|
+
_Pagination["default"].validateJSON(data['pagination']);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {Array.<module:model/BabylonStakingRegistration>} data
|
|
116
|
+
*/
|
|
117
|
+
ListBabylonStakingRegistrations200Response.prototype['data'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/Pagination} pagination
|
|
121
|
+
*/
|
|
122
|
+
ListBabylonStakingRegistrations200Response.prototype['pagination'] = undefined;
|
|
123
|
+
var _default = exports["default"] = ListBabylonStakingRegistrations200Response;
|