@cobo/cobo-waas2 1.9.0 → 1.11.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 (148) hide show
  1. package/README.md +47 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +1 -1
  4. package/dist/api/DevelopersApi.js +7 -7
  5. package/dist/api/DevelopersWebhooksApi.js +8 -8
  6. package/dist/api/StakingsApi.js +412 -18
  7. package/dist/api/SwapsApi.js +360 -0
  8. package/dist/api/TransactionsApi.js +18 -18
  9. package/dist/api/TravelRuleApi.js +4 -4
  10. package/dist/api/WalletsApi.js +19 -19
  11. package/dist/api/WalletsExchangeWalletApi.js +1 -1
  12. package/dist/api/WalletsMPCWalletsApi.js +19 -19
  13. package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
  14. package/dist/index.js +213 -3
  15. package/dist/model/AddressesEventData.js +4 -4
  16. package/dist/model/AddressesEventDataAllOfAddresses.js +295 -0
  17. package/dist/model/BTCEIP191MessageSignDestination.js +1 -1
  18. package/dist/model/BabylonAirdropPop.js +186 -0
  19. package/dist/model/BabylonAirdropRegistration.js +172 -0
  20. package/dist/model/BabylonEligibleAirdrop.js +157 -0
  21. package/dist/model/BabylonRegistrationRequestStatus.js +66 -0
  22. package/dist/model/BabylonRegistrationStatus.js +66 -0
  23. package/dist/model/BabylonStakingRegistration.js +185 -0
  24. package/dist/model/ChainInfo.js +2 -2
  25. package/dist/model/ContractCallDestination.js +42 -8
  26. package/dist/model/ContractCallDestinationType.js +5 -0
  27. package/dist/model/ContractCallSource.js +6 -0
  28. package/dist/model/CreateBabylonAirdropRegistration201Response.js +87 -0
  29. package/dist/model/CreateBabylonAirdropRegistrationRequest.js +105 -0
  30. package/dist/model/CreateBabylonStakingRegistration201Response.js +87 -0
  31. package/dist/model/CreateBabylonStakingRegistrationRequest.js +103 -0
  32. package/dist/model/CreateSwapActivityRequest.js +153 -0
  33. package/dist/model/CreateSwapQuote201Response.js +264 -0
  34. package/dist/model/CreateSwapQuoteRequest.js +166 -0
  35. package/dist/model/EstimatedEvmEip1559FeeSlow.js +23 -0
  36. package/dist/model/EstimatedEvmLegacyFeeSlow.js +23 -0
  37. package/dist/model/ExtendedTokenInfo.js +3 -3
  38. package/dist/model/FeeReserved.js +87 -0
  39. package/dist/model/ListBabylonAirdropRegistrations200Response.js +123 -0
  40. package/dist/model/ListBabylonEligibleAirdrops200Response.js +123 -0
  41. package/dist/model/ListBabylonEligibleStakings200Response.js +123 -0
  42. package/dist/model/ListBabylonEligibleStakings200ResponseDataInner.js +141 -0
  43. package/dist/model/ListBabylonStakingRegistrations200Response.js +123 -0
  44. package/dist/model/{SwapSummary.js → ListEnableTokenPairs200Response.js} +51 -49
  45. package/dist/model/ListSwapActivities200Response.js +123 -0
  46. package/dist/model/MaxFeeAmount.js +1 -1
  47. package/dist/model/MessageSignSource.js +6 -0
  48. package/dist/model/MpcContractCallSource.js +16 -0
  49. package/dist/model/MpcMessageSignSource.js +16 -0
  50. package/dist/model/MpcSigningGroup.js +27 -4
  51. package/dist/model/MpcTransferSource.js +16 -0
  52. package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +2 -2
  53. package/dist/model/SolContractCallAccount.js +133 -0
  54. package/dist/model/SolContractCallDestination.js +139 -0
  55. package/dist/model/SolContractCallInstruction.js +158 -0
  56. package/dist/model/StakingPoolId.js +30 -0
  57. package/dist/model/StakingPoolType.js +15 -0
  58. package/dist/model/SwapQuote.js +203 -0
  59. package/dist/model/TokenInfo.js +2 -2
  60. package/dist/model/TransactionDestination.js +45 -11
  61. package/dist/model/TransactionDestinationType.js +5 -0
  62. package/dist/model/TransactionFee.js +1 -1
  63. package/dist/model/TransactionFixedFee.js +2 -2
  64. package/dist/model/TransactionRawTxInfo.js +16 -0
  65. package/dist/model/TransactionRbfSource.js +6 -0
  66. package/dist/model/TransactionRequestFee.js +1 -1
  67. package/dist/model/TransactionRequestFixedFee.js +2 -2
  68. package/dist/model/TransactionRequestUtxoFee.js +1 -1
  69. package/dist/model/TransactionSolContractAccount.js +106 -0
  70. package/dist/model/TransactionSolContractDestination.js +137 -0
  71. package/dist/model/TransactionSolContractInstruction.js +134 -0
  72. package/dist/model/TransactionTokeApproval.js +3 -3
  73. package/dist/model/TransactionUtxoChange.js +101 -0
  74. package/dist/model/TransferSource.js +6 -0
  75. package/dist/model/WebhookEventData.js +2 -2
  76. package/docs/AddressBooksApi.md +1 -1
  77. package/docs/AddressesEventData.md +1 -1
  78. package/docs/AddressesEventDataAllOfAddresses.md +19 -0
  79. package/docs/BabylonAirdropPop.md +14 -0
  80. package/docs/BabylonAirdropRegistration.md +16 -0
  81. package/docs/BabylonEligibleAirdrop.md +14 -0
  82. package/docs/BabylonRegistrationRequestStatus.md +14 -0
  83. package/docs/BabylonRegistrationStatus.md +14 -0
  84. package/docs/BabylonStakingRegistration.md +17 -0
  85. package/docs/ChainInfo.md +1 -1
  86. package/docs/ContractCallDestination.md +1 -0
  87. package/docs/ContractCallDestinationType.md +2 -0
  88. package/docs/ContractCallSource.md +1 -0
  89. package/docs/CreateBabylonAirdropRegistration201Response.md +9 -0
  90. package/docs/CreateBabylonAirdropRegistrationRequest.md +10 -0
  91. package/docs/CreateBabylonStakingRegistration201Response.md +9 -0
  92. package/docs/CreateBabylonStakingRegistrationRequest.md +10 -0
  93. package/docs/CreateSwapActivityRequest.md +12 -0
  94. package/docs/CreateSwapQuote201Response.md +17 -0
  95. package/docs/CreateSwapQuoteRequest.md +13 -0
  96. package/docs/DevelopersApi.md +5 -5
  97. package/docs/DevelopersWebhooksApi.md +8 -8
  98. package/docs/EstimatedEvmEip1559FeeSlow.md +1 -0
  99. package/docs/EstimatedEvmLegacyFeeSlow.md +1 -0
  100. package/docs/ExtendedTokenInfo.md +1 -1
  101. package/docs/FeeReserved.md +9 -0
  102. package/docs/ListBabylonAirdropRegistrations200Response.md +10 -0
  103. package/docs/ListBabylonEligibleAirdrops200Response.md +10 -0
  104. package/docs/ListBabylonEligibleStakings200Response.md +10 -0
  105. package/docs/ListBabylonEligibleStakings200ResponseDataInner.md +13 -0
  106. package/docs/ListBabylonStakingRegistrations200Response.md +10 -0
  107. package/docs/ListEnableTokenPairs200Response.md +10 -0
  108. package/docs/ListSwapActivities200Response.md +10 -0
  109. package/docs/MaxFeeAmount.md +1 -1
  110. package/docs/MessageSignSource.md +1 -0
  111. package/docs/MpcContractCallSource.md +1 -0
  112. package/docs/MpcMessageSignSource.md +1 -0
  113. package/docs/MpcSigningGroup.md +1 -1
  114. package/docs/MpcTransferSource.md +1 -0
  115. package/docs/QueryGuardPubkey200ResponseAddressesInner.md +1 -1
  116. package/docs/SolContractCallAccount.md +11 -0
  117. package/docs/SolContractCallDestination.md +10 -0
  118. package/docs/SolContractCallInstruction.md +11 -0
  119. package/docs/StakingPoolId.md +12 -0
  120. package/docs/StakingPoolType.md +6 -0
  121. package/docs/StakingsApi.md +461 -13
  122. package/docs/SwapQuote.md +16 -0
  123. package/docs/SwapsApi.md +348 -0
  124. package/docs/TokenInfo.md +1 -1
  125. package/docs/TransactionDestination.md +1 -0
  126. package/docs/TransactionDestinationType.md +2 -0
  127. package/docs/TransactionFee.md +1 -1
  128. package/docs/TransactionFixedFee.md +1 -1
  129. package/docs/TransactionRawTxInfo.md +1 -0
  130. package/docs/TransactionRbfSource.md +1 -0
  131. package/docs/TransactionRequestFee.md +1 -1
  132. package/docs/TransactionRequestFixedFee.md +1 -1
  133. package/docs/TransactionRequestUtxoFee.md +1 -1
  134. package/docs/TransactionSolContractAccount.md +11 -0
  135. package/docs/TransactionSolContractDestination.md +10 -0
  136. package/docs/TransactionSolContractInstruction.md +11 -0
  137. package/docs/TransactionTokeApproval.md +1 -1
  138. package/docs/TransactionUtxoChange.md +10 -0
  139. package/docs/TransactionsApi.md +16 -16
  140. package/docs/TransferSource.md +1 -0
  141. package/docs/TravelRuleApi.md +4 -4
  142. package/docs/WalletsApi.md +16 -16
  143. package/docs/WalletsExchangeWalletApi.md +1 -1
  144. package/docs/WalletsMPCWalletsApi.md +19 -19
  145. package/docs/WalletsSmartContractWalletsApi.md +1 -1
  146. package/docs/WebhookEventData.md +1 -1
  147. package/package.json +2 -2
  148. package/docs/SwapSummary.md +0 -10
@@ -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
+ }();
@@ -0,0 +1,185 @@
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 BabylonStakingRegistration model module.
28
+ * @module model/BabylonStakingRegistration
29
+ */
30
+ var BabylonStakingRegistration = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>BabylonStakingRegistration</code>.
33
+ * The details of aBabylon Phase-2 registration.
34
+ * @alias module:model/BabylonStakingRegistration
35
+ */
36
+ function BabylonStakingRegistration() {
37
+ _classCallCheck(this, BabylonStakingRegistration);
38
+ BabylonStakingRegistration.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(BabylonStakingRegistration, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>BabylonStakingRegistration</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/BabylonStakingRegistration} obj Optional instance to populate.
55
+ * @return {module:model/BabylonStakingRegistration} The populated <code>BabylonStakingRegistration</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new BabylonStakingRegistration();
62
+ if (data.hasOwnProperty('id')) {
63
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('staking_id')) {
66
+ obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('babylon_address')) {
69
+ obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
70
+ }
71
+ if (data.hasOwnProperty('btc_address')) {
72
+ obj['btc_address'] = _StakingSource["default"].constructFromObject(data['btc_address']);
73
+ }
74
+ if (data.hasOwnProperty('status')) {
75
+ obj['status'] = _BabylonRegistrationRequestStatus["default"].constructFromObject(data['status']);
76
+ }
77
+ if (data.hasOwnProperty('staked_amount')) {
78
+ obj['staked_amount'] = _ApiClient["default"].convertToType(data['staked_amount'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('error_message')) {
81
+ obj['error_message'] = _ApiClient["default"].convertToType(data['error_message'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('created_timestamp')) {
84
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
85
+ }
86
+ if (data.hasOwnProperty('updated_timestamp')) {
87
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
88
+ }
89
+ }
90
+ return obj;
91
+ }
92
+
93
+ /**
94
+ * Validates the JSON data with respect to <code>BabylonStakingRegistration</code>.
95
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
96
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonStakingRegistration</code>.
97
+ */
98
+ }, {
99
+ key: "validateJSON",
100
+ value: function validateJSON(data) {
101
+ // ensure the json data is a string
102
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
103
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
107
+ throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
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
+ // validate the optional field `btc_address`
117
+ if (data['btc_address']) {
118
+ // data not null
119
+ if (!!_StakingSource["default"].validateJSON) {
120
+ _StakingSource["default"].validateJSON(data['btc_address']);
121
+ }
122
+ }
123
+ // ensure the json data is a string
124
+ if (data['staked_amount'] && !(typeof data['staked_amount'] === 'string' || data['staked_amount'] instanceof String)) {
125
+ throw new Error("Expected the field `staked_amount` to be a primitive type in the JSON string but got " + data['staked_amount']);
126
+ }
127
+ // ensure the json data is a string
128
+ if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
129
+ throw new Error("Expected the field `error_message` to be a primitive type in the JSON string but got " + data['error_message']);
130
+ }
131
+ return true;
132
+ }
133
+ }]);
134
+ }();
135
+ /**
136
+ * The registration ID, a unique identifier for tracking the staking registration.
137
+ * @member {String} id
138
+ */
139
+ BabylonStakingRegistration.prototype['id'] = undefined;
140
+
141
+ /**
142
+ * The ID of the Phase-1 BTC staking position.
143
+ * @member {String} staking_id
144
+ */
145
+ BabylonStakingRegistration.prototype['staking_id'] = undefined;
146
+
147
+ /**
148
+ * @member {module:model/StakingSource} babylon_address
149
+ */
150
+ BabylonStakingRegistration.prototype['babylon_address'] = undefined;
151
+
152
+ /**
153
+ * @member {module:model/StakingSource} btc_address
154
+ */
155
+ BabylonStakingRegistration.prototype['btc_address'] = undefined;
156
+
157
+ /**
158
+ * @member {module:model/BabylonRegistrationRequestStatus} status
159
+ */
160
+ BabylonStakingRegistration.prototype['status'] = undefined;
161
+
162
+ /**
163
+ * The amount of BTC that is staked.
164
+ * @member {String} staked_amount
165
+ */
166
+ BabylonStakingRegistration.prototype['staked_amount'] = undefined;
167
+
168
+ /**
169
+ * The error message if the Babylon Phase-2 registration request failed.
170
+ * @member {String} error_message
171
+ */
172
+ BabylonStakingRegistration.prototype['error_message'] = undefined;
173
+
174
+ /**
175
+ * The time when the registration was created, in Unix timestamp format, measured in milliseconds.
176
+ * @member {Number} created_timestamp
177
+ */
178
+ BabylonStakingRegistration.prototype['created_timestamp'] = undefined;
179
+
180
+ /**
181
+ * The time when the registration was updated, in Unix timestamp format, measured in milliseconds.
182
+ * @member {Number} updated_timestamp
183
+ */
184
+ BabylonStakingRegistration.prototype['updated_timestamp'] = undefined;
185
+ var _default = exports["default"] = BabylonStakingRegistration;
@@ -33,7 +33,7 @@ var ChainInfo = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>ChainInfo</code>.
34
34
  * The chain information.
35
35
  * @alias module:model/ChainInfo
36
- * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
36
+ * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain.
37
37
  */
38
38
  function ChainInfo(chain_id) {
39
39
  _classCallCheck(this, ChainInfo);
@@ -138,7 +138,7 @@ var ChainInfo = /*#__PURE__*/function () {
138
138
  ChainInfo.RequiredProperties = ["chain_id"];
139
139
 
140
140
  /**
141
- * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
141
+ * The chain ID, which is the unique identifier of a blockchain.
142
142
  * @member {String} chain_id
143
143
  */
144
144
  ChainInfo.prototype['chain_id'] = undefined;