@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.
Files changed (89) hide show
  1. package/README.md +40 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/DevelopersApi.js +4 -4
  4. package/dist/api/StakingsApi.js +400 -6
  5. package/dist/api/SwapsApi.js +360 -0
  6. package/dist/api/TransactionsApi.js +4 -4
  7. package/dist/index.js +164 -3
  8. package/dist/model/AddressesEventData.js +4 -4
  9. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  10. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  11. package/dist/model/BabylonAirdropPop.js +186 -0
  12. package/dist/model/BabylonAirdropRegistration.js +172 -0
  13. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  14. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  15. package/dist/model/BabylonRegistrationStatus.js +66 -0
  16. package/dist/model/BabylonStakingRegistration.js +185 -0
  17. package/dist/model/ContractCallSource.js +6 -0
  18. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  19. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  20. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  21. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  22. package/dist/model/CreateSwapActivityRequest.js +153 -0
  23. package/dist/model/CreateSwapQuote201Response.js +264 -0
  24. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  25. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  26. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  27. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  28. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  29. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  30. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  31. package/dist/model/ListSwapActivities200Response.js +123 -0
  32. package/dist/model/MessageSignSource.js +6 -0
  33. package/dist/model/MpcContractCallSource.js +16 -0
  34. package/dist/model/MpcMessageSignSource.js +16 -0
  35. package/dist/model/MpcSigningGroup.js +27 -4
  36. package/dist/model/MpcTransferSource.js +16 -0
  37. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  38. package/dist/model/StakingPoolId.js +30 -0
  39. package/dist/model/StakingPoolType.js +15 -0
  40. package/dist/model/SwapQuote.js +203 -0
  41. package/dist/model/TransactionDestination.js +4 -4
  42. package/dist/model/TransactionRawTxInfo.js +16 -0
  43. package/dist/model/TransactionRbfSource.js +6 -0
  44. package/dist/model/TransactionUtxoChange.js +101 -0
  45. package/dist/model/TransferSource.js +6 -0
  46. package/dist/model/WebhookEventData.js +2 -2
  47. package/docs/AddressesEventData.md +1 -1
  48. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  49. package/docs/BabylonAirdropPop.md +14 -0
  50. package/docs/BabylonAirdropRegistration.md +16 -0
  51. package/docs/BabylonEligibleAirdrop.md +14 -0
  52. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  53. package/docs/BabylonRegistrationStatus.md +14 -0
  54. package/docs/BabylonStakingRegistration.md +17 -0
  55. package/docs/ContractCallSource.md +1 -0
  56. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  57. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  58. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  59. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  60. package/docs/CreateSwapActivityRequest.md +12 -0
  61. package/docs/CreateSwapQuote201Response.md +17 -0
  62. package/docs/CreateSwapQuoteRequest.md +13 -0
  63. package/docs/DevelopersApi.md +2 -2
  64. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  65. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  66. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  67. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  68. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  69. package/docs/ListEnableTokenPairs200Response.md +10 -0
  70. package/docs/ListSwapActivities200Response.md +10 -0
  71. package/docs/MessageSignSource.md +1 -0
  72. package/docs/MpcContractCallSource.md +1 -0
  73. package/docs/MpcMessageSignSource.md +1 -0
  74. package/docs/MpcSigningGroup.md +1 -1
  75. package/docs/MpcTransferSource.md +1 -0
  76. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  77. package/docs/StakingPoolId.md +12 -0
  78. package/docs/StakingPoolType.md +6 -0
  79. package/docs/StakingsApi.md +449 -1
  80. package/docs/SwapQuote.md +16 -0
  81. package/docs/SwapsApi.md +348 -0
  82. package/docs/TransactionRawTxInfo.md +1 -0
  83. package/docs/TransactionRbfSource.md +1 -0
  84. package/docs/TransactionUtxoChange.md +10 -0
  85. package/docs/TransactionsApi.md +2 -2
  86. package/docs/TransferSource.md +1 -0
  87. package/docs/WebhookEventData.md +1 -1
  88. package/package.json +2 -2
  89. package/docs/SwapSummary.md +0 -10
@@ -0,0 +1,186 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The BabylonAirdropPop model module.
29
+ * @module model/BabylonAirdropPop
30
+ */
31
+ var BabylonAirdropPop = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>BabylonAirdropPop</code>.
34
+ * Proof of Participation (PoP) details used for airdrop registration.
35
+ * @alias module:model/BabylonAirdropPop
36
+ * @param baby_address {String} The Babylon (BABY) address used to receive BABY rewards.
37
+ * @param btc_address {String} The Bitcoin (BTC) address used for staking.
38
+ * @param btc_public_key {String} The public key corresponding to the `btc_address`, represented in hex format.
39
+ * @param btc_sign_baby {String} A BTC signature that signs the `baby_address`.
40
+ * @param baby_sign_btc {String} A BABY signature that signs the `btc_address`.
41
+ * @param baby_public_key {String} The public key corresponding to the `baby_address`, represented in base64 format.
42
+ */
43
+ function BabylonAirdropPop(baby_address, btc_address, btc_public_key, btc_sign_baby, baby_sign_btc, baby_public_key) {
44
+ _classCallCheck(this, BabylonAirdropPop);
45
+ BabylonAirdropPop.initialize(this, baby_address, btc_address, btc_public_key, btc_sign_baby, baby_sign_btc, baby_public_key);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(BabylonAirdropPop, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, baby_address, btc_address, btc_public_key, btc_sign_baby, baby_sign_btc, baby_public_key) {
56
+ obj['baby_address'] = baby_address;
57
+ obj['btc_address'] = btc_address;
58
+ obj['btc_public_key'] = btc_public_key;
59
+ obj['btc_sign_baby'] = btc_sign_baby;
60
+ obj['baby_sign_btc'] = baby_sign_btc;
61
+ obj['baby_public_key'] = baby_public_key;
62
+ }
63
+
64
+ /**
65
+ * Constructs a <code>BabylonAirdropPop</code> from a plain JavaScript object, optionally creating a new instance.
66
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
67
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
68
+ * @param {module:model/BabylonAirdropPop} obj Optional instance to populate.
69
+ * @return {module:model/BabylonAirdropPop} The populated <code>BabylonAirdropPop</code> instance.
70
+ */
71
+ }, {
72
+ key: "constructFromObject",
73
+ value: function constructFromObject(data, obj) {
74
+ if (data) {
75
+ obj = obj || new BabylonAirdropPop();
76
+ if (data.hasOwnProperty('baby_address')) {
77
+ obj['baby_address'] = _ApiClient["default"].convertToType(data['baby_address'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('btc_address')) {
80
+ obj['btc_address'] = _ApiClient["default"].convertToType(data['btc_address'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('btc_public_key')) {
83
+ obj['btc_public_key'] = _ApiClient["default"].convertToType(data['btc_public_key'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('btc_sign_baby')) {
86
+ obj['btc_sign_baby'] = _ApiClient["default"].convertToType(data['btc_sign_baby'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('baby_sign_btc')) {
89
+ obj['baby_sign_btc'] = _ApiClient["default"].convertToType(data['baby_sign_btc'], 'String');
90
+ }
91
+ if (data.hasOwnProperty('baby_public_key')) {
92
+ obj['baby_public_key'] = _ApiClient["default"].convertToType(data['baby_public_key'], 'String');
93
+ }
94
+ }
95
+ return obj;
96
+ }
97
+
98
+ /**
99
+ * Validates the JSON data with respect to <code>BabylonAirdropPop</code>.
100
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
101
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonAirdropPop</code>.
102
+ */
103
+ }, {
104
+ key: "validateJSON",
105
+ value: function validateJSON(data) {
106
+ // check to make sure all required properties are present in the JSON string
107
+ var _iterator = _createForOfIteratorHelper(BabylonAirdropPop.RequiredProperties),
108
+ _step;
109
+ try {
110
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
111
+ var property = _step.value;
112
+ if (!data.hasOwnProperty(property)) {
113
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
114
+ }
115
+ }
116
+ // ensure the json data is a string
117
+ } catch (err) {
118
+ _iterator.e(err);
119
+ } finally {
120
+ _iterator.f();
121
+ }
122
+ if (data['baby_address'] && !(typeof data['baby_address'] === 'string' || data['baby_address'] instanceof String)) {
123
+ throw new Error("Expected the field `baby_address` to be a primitive type in the JSON string but got " + data['baby_address']);
124
+ }
125
+ // ensure the json data is a string
126
+ if (data['btc_address'] && !(typeof data['btc_address'] === 'string' || data['btc_address'] instanceof String)) {
127
+ throw new Error("Expected the field `btc_address` to be a primitive type in the JSON string but got " + data['btc_address']);
128
+ }
129
+ // ensure the json data is a string
130
+ if (data['btc_public_key'] && !(typeof data['btc_public_key'] === 'string' || data['btc_public_key'] instanceof String)) {
131
+ throw new Error("Expected the field `btc_public_key` to be a primitive type in the JSON string but got " + data['btc_public_key']);
132
+ }
133
+ // ensure the json data is a string
134
+ if (data['btc_sign_baby'] && !(typeof data['btc_sign_baby'] === 'string' || data['btc_sign_baby'] instanceof String)) {
135
+ throw new Error("Expected the field `btc_sign_baby` to be a primitive type in the JSON string but got " + data['btc_sign_baby']);
136
+ }
137
+ // ensure the json data is a string
138
+ if (data['baby_sign_btc'] && !(typeof data['baby_sign_btc'] === 'string' || data['baby_sign_btc'] instanceof String)) {
139
+ throw new Error("Expected the field `baby_sign_btc` to be a primitive type in the JSON string but got " + data['baby_sign_btc']);
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['baby_public_key'] && !(typeof data['baby_public_key'] === 'string' || data['baby_public_key'] instanceof String)) {
143
+ throw new Error("Expected the field `baby_public_key` to be a primitive type in the JSON string but got " + data['baby_public_key']);
144
+ }
145
+ return true;
146
+ }
147
+ }]);
148
+ }();
149
+ BabylonAirdropPop.RequiredProperties = ["baby_address", "btc_address", "btc_public_key", "btc_sign_baby", "baby_sign_btc", "baby_public_key"];
150
+
151
+ /**
152
+ * The Babylon (BABY) address used to receive BABY rewards.
153
+ * @member {String} baby_address
154
+ */
155
+ BabylonAirdropPop.prototype['baby_address'] = undefined;
156
+
157
+ /**
158
+ * The Bitcoin (BTC) address used for staking.
159
+ * @member {String} btc_address
160
+ */
161
+ BabylonAirdropPop.prototype['btc_address'] = undefined;
162
+
163
+ /**
164
+ * The public key corresponding to the `btc_address`, represented in hex format.
165
+ * @member {String} btc_public_key
166
+ */
167
+ BabylonAirdropPop.prototype['btc_public_key'] = undefined;
168
+
169
+ /**
170
+ * A BTC signature that signs the `baby_address`.
171
+ * @member {String} btc_sign_baby
172
+ */
173
+ BabylonAirdropPop.prototype['btc_sign_baby'] = undefined;
174
+
175
+ /**
176
+ * A BABY signature that signs the `btc_address`.
177
+ * @member {String} baby_sign_btc
178
+ */
179
+ BabylonAirdropPop.prototype['baby_sign_btc'] = undefined;
180
+
181
+ /**
182
+ * The public key corresponding to the `baby_address`, represented in base64 format.
183
+ * @member {String} baby_public_key
184
+ */
185
+ BabylonAirdropPop.prototype['baby_public_key'] = undefined;
186
+ var _default = exports["default"] = BabylonAirdropPop;
@@ -0,0 +1,172 @@
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 _BabylonRegistrationRequestStatus = _interopRequireDefault(require("./BabylonRegistrationRequestStatus"));
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 BabylonAirdropRegistration model module.
28
+ * @module model/BabylonAirdropRegistration
29
+ */
30
+ var BabylonAirdropRegistration = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>BabylonAirdropRegistration</code>.
33
+ * The details of a Babylon airdrop registration.
34
+ * @alias module:model/BabylonAirdropRegistration
35
+ */
36
+ function BabylonAirdropRegistration() {
37
+ _classCallCheck(this, BabylonAirdropRegistration);
38
+ BabylonAirdropRegistration.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(BabylonAirdropRegistration, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>BabylonAirdropRegistration</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/BabylonAirdropRegistration} obj Optional instance to populate.
55
+ * @return {module:model/BabylonAirdropRegistration} The populated <code>BabylonAirdropRegistration</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new BabylonAirdropRegistration();
62
+ if (data.hasOwnProperty('id')) {
63
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('status')) {
66
+ obj['status'] = _BabylonRegistrationRequestStatus["default"].constructFromObject(data['status']);
67
+ }
68
+ if (data.hasOwnProperty('btc_address')) {
69
+ obj['btc_address'] = _StakingSource["default"].constructFromObject(data['btc_address']);
70
+ }
71
+ if (data.hasOwnProperty('babylon_address')) {
72
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
73
+ }
74
+ if (data.hasOwnProperty('airdrop_amount')) {
75
+ obj['airdrop_amount'] = _ApiClient["default"].convertToType(data['airdrop_amount'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('error_message')) {
78
+ obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('created_timestamp')) {
81
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('updated_timestamp')) {
84
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
85
+ }
86
+ }
87
+ return obj;
88
+ }
89
+
90
+ /**
91
+ * Validates the JSON data with respect to <code>BabylonAirdropRegistration</code>.
92
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
93
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonAirdropRegistration</code>.
94
+ */
95
+ }, {
96
+ key: "validateJSON",
97
+ value: function validateJSON(data) {
98
+ // ensure the json data is a string
99
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
100
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
101
+ }
102
+ // validate the optional field `btc_address`
103
+ if (data['btc_address']) {
104
+ // data not null
105
+ if (!!_StakingSource["default"].validateJSON) {
106
+ _StakingSource["default"].validateJSON(data['btc_address']);
107
+ }
108
+ }
109
+ // validate the optional field `babylon_address`
110
+ if (data['babylon_address']) {
111
+ // data not null
112
+ if (!!_StakingSource["default"].validateJSON) {
113
+ _StakingSource["default"].validateJSON(data['babylon_address']);
114
+ }
115
+ }
116
+ // ensure the json data is a string
117
+ if (data['airdrop_amount'] && !(typeof data['airdrop_amount'] === 'string' || data['airdrop_amount'] instanceof String)) {
118
+ throw new Error("Expected the field `airdrop_amount` to be a primitive type in the JSON string but got " + data['airdrop_amount']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
122
+ throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
123
+ }
124
+ return true;
125
+ }
126
+ }]);
127
+ }();
128
+ /**
129
+ * The registration ID, a unique identifier for tracking the airdrop registration.
130
+ * @member {String} id
131
+ */
132
+ BabylonAirdropRegistration.prototype['id'] = undefined;
133
+
134
+ /**
135
+ * @member {module:model/BabylonRegistrationRequestStatus} status
136
+ */
137
+ BabylonAirdropRegistration.prototype['status'] = undefined;
138
+
139
+ /**
140
+ * @member {module:model/StakingSource} btc_address
141
+ */
142
+ BabylonAirdropRegistration.prototype['btc_address'] = undefined;
143
+
144
+ /**
145
+ * @member {module:model/StakingSource} babylon_address
146
+ */
147
+ BabylonAirdropRegistration.prototype['babylon_address'] = undefined;
148
+
149
+ /**
150
+ * The actual airdrop amount allocated for this BTC address.
151
+ * @member {String} airdrop_amount
152
+ */
153
+ BabylonAirdropRegistration.prototype['airdrop_amount'] = undefined;
154
+
155
+ /**
156
+ * The detailed error message if the registration failed.
157
+ * @member {String} error_message
158
+ */
159
+ BabylonAirdropRegistration.prototype['error_message'] = undefined;
160
+
161
+ /**
162
+ * The time when the registration was created, in Unix timestamp format, measured in milliseconds.
163
+ * @member {Number} created_timestamp
164
+ */
165
+ BabylonAirdropRegistration.prototype['created_timestamp'] = undefined;
166
+
167
+ /**
168
+ * The time when the registration was updated, in Unix timestamp format, measured in milliseconds.
169
+ * @member {Number} updated_timestamp
170
+ */
171
+ BabylonAirdropRegistration.prototype['updated_timestamp'] = undefined;
172
+ var _default = exports["default"] = BabylonAirdropRegistration;
@@ -0,0 +1,157 @@
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 _BabylonAirdropPop = _interopRequireDefault(require("./BabylonAirdropPop"));
9
+ var _BabylonRegistrationStatus = _interopRequireDefault(require("./BabylonRegistrationStatus"));
10
+ var _StakingSource = _interopRequireDefault(require("./StakingSource"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The BabylonEligibleAirdrop model module.
29
+ * @module model/BabylonEligibleAirdrop
30
+ */
31
+ var BabylonEligibleAirdrop = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>BabylonEligibleAirdrop</code>.
34
+ * The babylon airdrop eligibility.
35
+ * @alias module:model/BabylonEligibleAirdrop
36
+ */
37
+ function BabylonEligibleAirdrop() {
38
+ _classCallCheck(this, BabylonEligibleAirdrop);
39
+ BabylonEligibleAirdrop.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(BabylonEligibleAirdrop, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>BabylonEligibleAirdrop</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/BabylonEligibleAirdrop} obj Optional instance to populate.
56
+ * @return {module:model/BabylonEligibleAirdrop} The populated <code>BabylonEligibleAirdrop</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new BabylonEligibleAirdrop();
63
+ if (data.hasOwnProperty('btc_address')) {
64
+ obj['btc_address'] = _StakingSource["default"].constructFromObject(data['btc_address']);
65
+ }
66
+ if (data.hasOwnProperty('babylon_address')) {
67
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
68
+ }
69
+ if (data.hasOwnProperty('babylon_points')) {
70
+ obj['babylon_points'] = _ApiClient["default"].convertToType(data['babylon_points'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('airdrop_amount')) {
73
+ obj['airdrop_amount'] = _ApiClient["default"].convertToType(data['airdrop_amount'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('status')) {
76
+ obj['status'] = _BabylonRegistrationStatus["default"].constructFromObject(data['status']);
77
+ }
78
+ if (data.hasOwnProperty('pop')) {
79
+ obj['pop'] = _BabylonAirdropPop["default"].constructFromObject(data['pop']);
80
+ }
81
+ }
82
+ return obj;
83
+ }
84
+
85
+ /**
86
+ * Validates the JSON data with respect to <code>BabylonEligibleAirdrop</code>.
87
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
88
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonEligibleAirdrop</code>.
89
+ */
90
+ }, {
91
+ key: "validateJSON",
92
+ value: function validateJSON(data) {
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['babylon_points'] && !(typeof data['babylon_points'] === 'string' || data['babylon_points'] instanceof String)) {
109
+ throw new Error("Expected the field `babylon_points` to be a primitive type in the JSON string but got " + data['babylon_points']);
110
+ }
111
+ // ensure the json data is a string
112
+ if (data['airdrop_amount'] && !(typeof data['airdrop_amount'] === 'string' || data['airdrop_amount'] instanceof String)) {
113
+ throw new Error("Expected the field `airdrop_amount` to be a primitive type in the JSON string but got " + data['airdrop_amount']);
114
+ }
115
+ // validate the optional field `pop`
116
+ if (data['pop']) {
117
+ // data not null
118
+ if (!!_BabylonAirdropPop["default"].validateJSON) {
119
+ _BabylonAirdropPop["default"].validateJSON(data['pop']);
120
+ }
121
+ }
122
+ return true;
123
+ }
124
+ }]);
125
+ }();
126
+ /**
127
+ * @member {module:model/StakingSource} btc_address
128
+ */
129
+ BabylonEligibleAirdrop.prototype['btc_address'] = undefined;
130
+
131
+ /**
132
+ * @member {module:model/StakingSource} babylon_address
133
+ */
134
+ BabylonEligibleAirdrop.prototype['babylon_address'] = undefined;
135
+
136
+ /**
137
+ * The current Babylon points balance accumulated by the BTC address.
138
+ * @member {String} babylon_points
139
+ */
140
+ BabylonEligibleAirdrop.prototype['babylon_points'] = undefined;
141
+
142
+ /**
143
+ * The estimated airdrop amount based on the current Babylon points balance.
144
+ * @member {String} airdrop_amount
145
+ */
146
+ BabylonEligibleAirdrop.prototype['airdrop_amount'] = undefined;
147
+
148
+ /**
149
+ * @member {module:model/BabylonRegistrationStatus} status
150
+ */
151
+ BabylonEligibleAirdrop.prototype['status'] = undefined;
152
+
153
+ /**
154
+ * @member {module:model/BabylonAirdropPop} pop
155
+ */
156
+ BabylonEligibleAirdrop.prototype['pop'] = undefined;
157
+ var _default = exports["default"] = BabylonEligibleAirdrop;
@@ -0,0 +1,66 @@
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 BabylonRegistrationRequestStatus.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var BabylonRegistrationRequestStatus = exports["default"] = /*#__PURE__*/function () {
31
+ function BabylonRegistrationRequestStatus() {
32
+ _classCallCheck(this, BabylonRegistrationRequestStatus);
33
+ /**
34
+ * value: "Processing"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Processing", "Processing");
38
+ /**
39
+ * value: "Completed"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Completed", "Completed");
43
+ /**
44
+ * value: "Failed"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "Failed", "Failed");
48
+ /**
49
+ * value: "unknown_default_open_api"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
53
+ }
54
+ return _createClass(BabylonRegistrationRequestStatus, null, [{
55
+ key: "constructFromObject",
56
+ value:
57
+ /**
58
+ * Returns a <code>BabylonRegistrationRequestStatus</code> enum value from a Javascript object name.
59
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
60
+ * @return {module:model/BabylonRegistrationRequestStatus} The enum <code>BabylonRegistrationRequestStatus</code> value.
61
+ */
62
+ function constructFromObject(object) {
63
+ return object;
64
+ }
65
+ }]);
66
+ }();
@@ -0,0 +1,66 @@
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 BabylonRegistrationStatus.
27
+ * @enum {}
28
+ * @readonly
29
+ */
30
+ var BabylonRegistrationStatus = exports["default"] = /*#__PURE__*/function () {
31
+ function BabylonRegistrationStatus() {
32
+ _classCallCheck(this, BabylonRegistrationStatus);
33
+ /**
34
+ * value: "Registered"
35
+ * @const
36
+ */
37
+ _defineProperty(this, "Registered", "Registered");
38
+ /**
39
+ * value: "Unregistered"
40
+ * @const
41
+ */
42
+ _defineProperty(this, "Unregistered", "Unregistered");
43
+ /**
44
+ * value: "Registering"
45
+ * @const
46
+ */
47
+ _defineProperty(this, "Registering", "Registering");
48
+ /**
49
+ * value: "unknown_default_open_api"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
53
+ }
54
+ return _createClass(BabylonRegistrationStatus, null, [{
55
+ key: "constructFromObject",
56
+ value:
57
+ /**
58
+ * Returns a <code>BabylonRegistrationStatus</code> enum value from a Javascript object name.
59
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
60
+ * @return {module:model/BabylonRegistrationStatus} The enum <code>BabylonRegistrationStatus</code> value.
61
+ */
62
+ function constructFromObject(object) {
63
+ return object;
64
+ }
65
+ }]);
66
+ }();