@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,295 @@
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 _AddressEncoding = _interopRequireDefault(require("./AddressEncoding"));
9
+ var _AddressInfo = _interopRequireDefault(require("./AddressInfo"));
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 AddressesEventDataAllOfAddresses model module.
31
+ * @module model/AddressesEventDataAllOfAddresses
32
+ */
33
+ var AddressesEventDataAllOfAddresses = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>AddressesEventDataAllOfAddresses</code>.
36
+ * @alias module:model/AddressesEventDataAllOfAddresses
37
+ * @implements module:model/AddressInfo
38
+ * @param address {String} The wallet address.
39
+ * @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).
40
+ * @param wallet_id {String} The wallet ID.
41
+ */
42
+ function AddressesEventDataAllOfAddresses(address, chain_id, wallet_id) {
43
+ _classCallCheck(this, AddressesEventDataAllOfAddresses);
44
+ _AddressInfo["default"].initialize(this, address, chain_id);
45
+ AddressesEventDataAllOfAddresses.initialize(this, address, chain_id, wallet_id);
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(AddressesEventDataAllOfAddresses, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, address, chain_id, wallet_id) {
56
+ obj['address'] = address;
57
+ obj['chain_id'] = chain_id;
58
+ obj['wallet_id'] = wallet_id;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>AddressesEventDataAllOfAddresses</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/AddressesEventDataAllOfAddresses} obj Optional instance to populate.
66
+ * @return {module:model/AddressesEventDataAllOfAddresses} The populated <code>AddressesEventDataAllOfAddresses</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new AddressesEventDataAllOfAddresses();
73
+ _AddressInfo["default"].constructFromObject(data, obj);
74
+ if (data.hasOwnProperty('address')) {
75
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('chain_id')) {
78
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('memo')) {
81
+ obj['memo'] = _ApiClient["default"].convertToType(data['memo'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('path')) {
84
+ obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('encoding')) {
87
+ obj['encoding'] = _AddressEncoding["default"].constructFromObject(data['encoding']);
88
+ }
89
+ if (data.hasOwnProperty('pubkey')) {
90
+ obj['pubkey'] = _ApiClient["default"].convertToType(data['pubkey'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('x_only_pubkey')) {
93
+ obj['x_only_pubkey'] = _ApiClient["default"].convertToType(data['x_only_pubkey'], 'String');
94
+ }
95
+ if (data.hasOwnProperty('root_pubkey')) {
96
+ obj['root_pubkey'] = _ApiClient["default"].convertToType(data['root_pubkey'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('taproot_script_tree_hash')) {
99
+ obj['taproot_script_tree_hash'] = _ApiClient["default"].convertToType(data['taproot_script_tree_hash'], 'String');
100
+ }
101
+ if (data.hasOwnProperty('taproot_internal_address')) {
102
+ obj['taproot_internal_address'] = _ApiClient["default"].convertToType(data['taproot_internal_address'], 'String');
103
+ }
104
+ if (data.hasOwnProperty('wallet_id')) {
105
+ obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
106
+ }
107
+ }
108
+ return obj;
109
+ }
110
+
111
+ /**
112
+ * Validates the JSON data with respect to <code>AddressesEventDataAllOfAddresses</code>.
113
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
114
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AddressesEventDataAllOfAddresses</code>.
115
+ */
116
+ }, {
117
+ key: "validateJSON",
118
+ value: function validateJSON(data) {
119
+ // check to make sure all required properties are present in the JSON string
120
+ var _iterator = _createForOfIteratorHelper(AddressesEventDataAllOfAddresses.RequiredProperties),
121
+ _step;
122
+ try {
123
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
124
+ var property = _step.value;
125
+ if (!data.hasOwnProperty(property)) {
126
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
127
+ }
128
+ }
129
+ // ensure the json data is a string
130
+ } catch (err) {
131
+ _iterator.e(err);
132
+ } finally {
133
+ _iterator.f();
134
+ }
135
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
136
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
140
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) {
144
+ throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']);
145
+ }
146
+ // ensure the json data is a string
147
+ if (data['path'] && !(typeof data['path'] === 'string' || data['path'] instanceof String)) {
148
+ throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
149
+ }
150
+ // ensure the json data is a string
151
+ if (data['pubkey'] && !(typeof data['pubkey'] === 'string' || data['pubkey'] instanceof String)) {
152
+ throw new Error("Expected the field `pubkey` to be a primitive type in the JSON string but got " + data['pubkey']);
153
+ }
154
+ // ensure the json data is a string
155
+ if (data['x_only_pubkey'] && !(typeof data['x_only_pubkey'] === 'string' || data['x_only_pubkey'] instanceof String)) {
156
+ throw new Error("Expected the field `x_only_pubkey` to be a primitive type in the JSON string but got " + data['x_only_pubkey']);
157
+ }
158
+ // ensure the json data is a string
159
+ if (data['root_pubkey'] && !(typeof data['root_pubkey'] === 'string' || data['root_pubkey'] instanceof String)) {
160
+ throw new Error("Expected the field `root_pubkey` to be a primitive type in the JSON string but got " + data['root_pubkey']);
161
+ }
162
+ // ensure the json data is a string
163
+ if (data['taproot_script_tree_hash'] && !(typeof data['taproot_script_tree_hash'] === 'string' || data['taproot_script_tree_hash'] instanceof String)) {
164
+ throw new Error("Expected the field `taproot_script_tree_hash` to be a primitive type in the JSON string but got " + data['taproot_script_tree_hash']);
165
+ }
166
+ // ensure the json data is a string
167
+ if (data['taproot_internal_address'] && !(typeof data['taproot_internal_address'] === 'string' || data['taproot_internal_address'] instanceof String)) {
168
+ throw new Error("Expected the field `taproot_internal_address` to be a primitive type in the JSON string but got " + data['taproot_internal_address']);
169
+ }
170
+ // ensure the json data is a string
171
+ if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
172
+ throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
173
+ }
174
+ return true;
175
+ }
176
+ }]);
177
+ }();
178
+ AddressesEventDataAllOfAddresses.RequiredProperties = ["address", "chain_id", "wallet_id"];
179
+
180
+ /**
181
+ * The wallet address.
182
+ * @member {String} address
183
+ */
184
+ AddressesEventDataAllOfAddresses.prototype['address'] = undefined;
185
+
186
+ /**
187
+ * 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).
188
+ * @member {String} chain_id
189
+ */
190
+ AddressesEventDataAllOfAddresses.prototype['chain_id'] = undefined;
191
+
192
+ /**
193
+ * The memo code.
194
+ * @member {String} memo
195
+ */
196
+ AddressesEventDataAllOfAddresses.prototype['memo'] = undefined;
197
+
198
+ /**
199
+ * The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see [Path levels](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels).
200
+ * @member {String} path
201
+ */
202
+ AddressesEventDataAllOfAddresses.prototype['path'] = undefined;
203
+
204
+ /**
205
+ * @member {module:model/AddressEncoding} encoding
206
+ */
207
+ AddressesEventDataAllOfAddresses.prototype['encoding'] = undefined;
208
+
209
+ /**
210
+ * The public key of the address. This property applies to MPC Wallets only.
211
+ * @member {String} pubkey
212
+ */
213
+ AddressesEventDataAllOfAddresses.prototype['pubkey'] = undefined;
214
+
215
+ /**
216
+ * The 32-byte x-only public key in hexadecimal format after tweaking.
217
+ * @member {String} x_only_pubkey
218
+ */
219
+ AddressesEventDataAllOfAddresses.prototype['x_only_pubkey'] = undefined;
220
+
221
+ /**
222
+ * The root public key of the address. This property applies to MPC Wallets only.
223
+ * @member {String} root_pubkey
224
+ */
225
+ AddressesEventDataAllOfAddresses.prototype['root_pubkey'] = undefined;
226
+
227
+ /**
228
+ * The information about the new address.
229
+ * @member {String} taproot_script_tree_hash
230
+ */
231
+ AddressesEventDataAllOfAddresses.prototype['taproot_script_tree_hash'] = undefined;
232
+
233
+ /**
234
+ * The Taproot address before tweaking.
235
+ * @member {String} taproot_internal_address
236
+ */
237
+ AddressesEventDataAllOfAddresses.prototype['taproot_internal_address'] = undefined;
238
+
239
+ /**
240
+ * The wallet ID.
241
+ * @member {String} wallet_id
242
+ */
243
+ AddressesEventDataAllOfAddresses.prototype['wallet_id'] = undefined;
244
+
245
+ // Implement AddressInfo interface:
246
+ /**
247
+ * The wallet address.
248
+ * @member {String} address
249
+ */
250
+ _AddressInfo["default"].prototype['address'] = undefined;
251
+ /**
252
+ * 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).
253
+ * @member {String} chain_id
254
+ */
255
+ _AddressInfo["default"].prototype['chain_id'] = undefined;
256
+ /**
257
+ * The memo code.
258
+ * @member {String} memo
259
+ */
260
+ _AddressInfo["default"].prototype['memo'] = undefined;
261
+ /**
262
+ * The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see [Path levels](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels).
263
+ * @member {String} path
264
+ */
265
+ _AddressInfo["default"].prototype['path'] = undefined;
266
+ /**
267
+ * @member {module:model/AddressEncoding} encoding
268
+ */
269
+ _AddressInfo["default"].prototype['encoding'] = undefined;
270
+ /**
271
+ * The public key of the address. This property applies to MPC Wallets only.
272
+ * @member {String} pubkey
273
+ */
274
+ _AddressInfo["default"].prototype['pubkey'] = undefined;
275
+ /**
276
+ * The 32-byte x-only public key in hexadecimal format after tweaking.
277
+ * @member {String} x_only_pubkey
278
+ */
279
+ _AddressInfo["default"].prototype['x_only_pubkey'] = undefined;
280
+ /**
281
+ * The root public key of the address. This property applies to MPC Wallets only.
282
+ * @member {String} root_pubkey
283
+ */
284
+ _AddressInfo["default"].prototype['root_pubkey'] = undefined;
285
+ /**
286
+ * The information about the new address.
287
+ * @member {String} taproot_script_tree_hash
288
+ */
289
+ _AddressInfo["default"].prototype['taproot_script_tree_hash'] = undefined;
290
+ /**
291
+ * The Taproot address before tweaking.
292
+ * @member {String} taproot_internal_address
293
+ */
294
+ _AddressInfo["default"].prototype['taproot_internal_address'] = undefined;
295
+ var _default = exports["default"] = AddressesEventDataAllOfAddresses;
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var BTCEIP191MessageSignDestination = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>BTCEIP191MessageSignDestination</code>.
35
- * The information about the destination &#x60;BTC_EIP_191_Signature&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type.
35
+ * The information about the destination &#x60;BTC_EIP_191_Signature&#x60;. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type.
36
36
  * @alias module:model/BTCEIP191MessageSignDestination
37
37
  * @param destination_type {module:model/MessageSignDestinationType}
38
38
  * @param message {String} The raw data of the message to be signed, encoded in Base64 format.
@@ -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;