@cobo/cobo-waas2 1.1.1 → 1.2.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 (183) hide show
  1. package/README.md +16 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/OAuthApi.js +16 -15
  4. package/dist/api/TransactionsApi.js +18 -18
  5. package/dist/api/WalletsApi.js +123 -12
  6. package/dist/api/WalletsExchangeWalletApi.js +254 -0
  7. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  8. package/dist/index.js +56 -0
  9. package/dist/model/Activity.js +3 -1
  10. package/dist/model/AddressInfo.js +1 -1
  11. package/dist/model/AddressTransferDestination.js +6 -4
  12. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  13. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  14. package/dist/model/AssetBalance.js +3 -1
  15. package/dist/model/AssetInfo.js +2 -2
  16. package/dist/model/BabylonStakeExtra.js +9 -0
  17. package/dist/model/CheckAddressValidity200Response.js +2 -2
  18. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  19. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  20. package/dist/model/CoboSafeDelegate.js +3 -3
  21. package/dist/model/ContractCallDestination.js +4 -4
  22. package/dist/model/ContractCallParams.js +9 -3
  23. package/dist/model/ContractCallSource.js +6 -6
  24. package/dist/model/CreateSafeWalletParams.js +3 -1
  25. package/dist/model/CreateSmartContractWalletParams.js +3 -3
  26. package/dist/model/CreateStakeActivity.js +23 -4
  27. package/dist/model/CreateStakeActivityExtra.js +15 -9
  28. package/dist/model/CreateTssRequestRequest.js +16 -1
  29. package/dist/model/CreateUnstakeActivity.js +16 -1
  30. package/dist/model/CreateWalletParams.js +9 -9
  31. package/dist/model/CreateWithdrawActivity.js +16 -1
  32. package/dist/model/CreatedWalletInfo.js +21 -9
  33. package/dist/model/EstimateContractCallFeeParams.js +6 -2
  34. package/dist/model/EstimateFeeParams.js +6 -6
  35. package/dist/model/EstimateStakeFee.js +28 -4
  36. package/dist/model/EstimateTransferFeeParams.js +6 -2
  37. package/dist/model/EstimateUnstakeFee.js +21 -1
  38. package/dist/model/EstimateWithdrawFee.js +21 -1
  39. package/dist/model/EstimatedEvmEip1559Fee.js +9 -3
  40. package/dist/model/EstimatedEvmLegacyFee.js +9 -3
  41. package/dist/model/EstimatedFee.js +12 -12
  42. package/dist/model/EstimatedUtxoFee.js +9 -3
  43. package/dist/model/EvmContractCallDestination.js +1 -1
  44. package/dist/model/EvmEip1559FeeRate.js +9 -3
  45. package/dist/model/EvmLegacyFeeRate.js +9 -3
  46. package/dist/model/ExchangeId.js +5 -0
  47. package/dist/model/ExchangeTransferDestination.js +16 -16
  48. package/dist/model/ExchangeTransferSource.js +14 -14
  49. package/dist/model/FeeRate.js +12 -12
  50. package/dist/model/GetToken200Response.js +4 -4
  51. package/dist/model/KeyShareHolder.js +13 -0
  52. package/dist/model/ListAddresses200Response.js +3 -1
  53. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  54. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  55. package/dist/model/ListKeyShareHolderGroups200Response.js +3 -1
  56. package/dist/model/ListMpcProjects200Response.js +3 -1
  57. package/dist/model/ListMpcVaults200Response.js +3 -1
  58. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  59. package/dist/model/ListSupportedChains200Response.js +3 -1
  60. package/dist/model/ListSupportedTokens200Response.js +3 -1
  61. package/dist/model/ListTokenBalancesForAddress200Response.js +3 -1
  62. package/dist/model/ListTransactions200Response.js +3 -1
  63. package/dist/model/ListTssRequests200Response.js +3 -1
  64. package/dist/model/ListUtxos200Response.js +3 -1
  65. package/dist/model/ListWallets200Response.js +3 -1
  66. package/dist/model/ListWebhookEndpoints200Response.js +3 -1
  67. package/dist/model/ListWebhookEventLogs200Response.js +3 -1
  68. package/dist/model/ListWebhookEvents200Response.js +3 -1
  69. package/dist/model/MPCWalletInfo.js +26 -0
  70. package/dist/model/MaxTransferableValue.js +3 -1
  71. package/dist/model/MessageSignDestination.js +6 -6
  72. package/dist/model/MessageSignParams.js +6 -2
  73. package/dist/model/MessageSignSource.js +3 -3
  74. package/dist/model/PoolDetailsAllOfValidatorsInfo.js +6 -6
  75. package/dist/model/RefreshToken200Response.js +135 -0
  76. package/dist/model/RefreshTokenRequest.js +2 -2
  77. package/dist/model/SafeContractCallSource.js +3 -1
  78. package/dist/model/SafeTransferSource.js +3 -1
  79. package/dist/model/SafeWallet.js +3 -1
  80. package/dist/model/SmartContractWalletInfo.js +3 -3
  81. package/dist/model/SmartContractWalletType.js +2 -2
  82. package/dist/model/StakingSource.js +6 -6
  83. package/dist/model/Stakings.js +3 -1
  84. package/dist/model/SubWalletAssetBalance.js +13 -11
  85. package/dist/model/TSSRequest.js +26 -2
  86. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  87. package/dist/model/TokenBalance.js +3 -1
  88. package/dist/model/Transaction.js +21 -7
  89. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  90. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  91. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  92. package/dist/model/TransactionDestination.js +26 -26
  93. package/dist/model/TransactionDetail.js +21 -7
  94. package/dist/model/TransactionDetails.js +24 -8
  95. package/dist/model/TransactionEvmContractDestination.js +1 -1
  96. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  97. package/dist/model/TransactionFee.js +12 -12
  98. package/dist/model/TransactionMPCWalletSource.js +13 -0
  99. package/dist/model/TransactionRbf.js +6 -2
  100. package/dist/model/TransactionRbfSource.js +3 -3
  101. package/dist/model/TransactionRequestFee.js +12 -12
  102. package/dist/model/TransactionResult.js +3 -3
  103. package/dist/model/TransactionSmartContractSafeWalletSource.js +3 -1
  104. package/dist/model/TransactionSource.js +29 -23
  105. package/dist/model/TransactionSubStatus.js +5 -0
  106. package/dist/model/TransactionTransferToAddressDestination.js +3 -1
  107. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  108. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  109. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  110. package/dist/model/TransactionWebhookEventData.js +29 -10
  111. package/dist/model/TransferDestination.js +12 -12
  112. package/dist/model/TransferParams.js +11 -5
  113. package/dist/model/TransferSource.js +15 -15
  114. package/dist/model/UpdateWalletParams.js +12 -12
  115. package/dist/model/UtxoFeeRate.js +9 -3
  116. package/dist/model/WalletInfo.js +24 -12
  117. package/dist/model/WebhookEvent.js +3 -1
  118. package/dist/model/WebhookEventData.js +52 -18
  119. package/dist/model/WebhookEventDataType.js +7 -2
  120. package/dist/model/WebhookEventLog.js +3 -1
  121. package/dist/model/WebhookEventType.js +24 -4
  122. package/docs/AddressInfo.md +1 -1
  123. package/docs/AddressTransferDestination.md +2 -2
  124. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  125. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  126. package/docs/AssetInfo.md +1 -1
  127. package/docs/BabylonStakeExtra.md +1 -0
  128. package/docs/CheckAddressValidity200Response.md +1 -1
  129. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  130. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  131. package/docs/ContractCallDestination.md +1 -1
  132. package/docs/CreateStakeActivity.md +1 -0
  133. package/docs/CreateStakeActivityExtra.md +1 -0
  134. package/docs/CreateTssRequestRequest.md +1 -0
  135. package/docs/CreateUnstakeActivity.md +1 -0
  136. package/docs/CreateWithdrawActivity.md +1 -0
  137. package/docs/CreatedWalletInfo.md +2 -0
  138. package/docs/DevelopersWebhooksApi.md +78 -69
  139. package/docs/EstimateStakeFee.md +1 -0
  140. package/docs/EstimateUnstakeFee.md +1 -0
  141. package/docs/EstimateWithdrawFee.md +1 -0
  142. package/docs/EvmContractCallDestination.md +1 -1
  143. package/docs/ExchangeId.md +2 -0
  144. package/docs/ExchangeTransferDestination.md +2 -2
  145. package/docs/ExchangeTransferSource.md +1 -1
  146. package/docs/GetToken200Response.md +4 -4
  147. package/docs/KeyShareHolder.md +1 -0
  148. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  149. package/docs/ListExchanges200ResponseInner.md +10 -0
  150. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  151. package/docs/MPCWalletInfo.md +2 -0
  152. package/docs/OAuthApi.md +26 -24
  153. package/docs/RefreshToken200Response.md +13 -0
  154. package/docs/RefreshTokenRequest.md +2 -2
  155. package/docs/SmartContractWalletType.md +1 -1
  156. package/docs/SubWalletAssetBalance.md +2 -2
  157. package/docs/TSSRequest.md +2 -0
  158. package/docs/TSSRequestWebhookEventData.md +29 -0
  159. package/docs/TransactionDepositFromWalletSource.md +1 -1
  160. package/docs/TransactionDepositToAddressDestination.md +1 -1
  161. package/docs/TransactionDepositToWalletDestination.md +2 -2
  162. package/docs/TransactionDestination.md +3 -3
  163. package/docs/TransactionEvmContractDestination.md +1 -1
  164. package/docs/TransactionExchangeWalletSource.md +1 -1
  165. package/docs/TransactionMPCWalletSource.md +1 -0
  166. package/docs/TransactionSource.md +2 -1
  167. package/docs/TransactionSubStatus.md +2 -0
  168. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  169. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  170. package/docs/TransactionTransferToWalletDestination.md +2 -2
  171. package/docs/TransactionWebhookEventData.md +3 -1
  172. package/docs/TransactionsApi.md +98 -88
  173. package/docs/TransferDestination.md +4 -4
  174. package/docs/TransferParams.md +1 -1
  175. package/docs/TransferSource.md +1 -1
  176. package/docs/WalletInfo.md +2 -0
  177. package/docs/WalletsApi.md +316 -187
  178. package/docs/WalletsExchangeWalletApi.md +230 -0
  179. package/docs/WalletsMPCWalletsApi.md +153 -135
  180. package/docs/WebhookEventData.md +10 -5
  181. package/docs/WebhookEventDataType.md +3 -1
  182. package/docs/WebhookEventType.md +12 -4
  183. package/package.json +1 -1
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
9
+ var _SubWalletAssetBalance = _interopRequireDefault(require("./SubWalletAssetBalance"));
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: support@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 ListAssetBalancesForExchangeWallet200Response model module.
31
+ * @module model/ListAssetBalancesForExchangeWallet200Response
32
+ */
33
+ var ListAssetBalancesForExchangeWallet200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListAssetBalancesForExchangeWallet200Response</code>.
36
+ * @alias module:model/ListAssetBalancesForExchangeWallet200Response
37
+ */
38
+ function ListAssetBalancesForExchangeWallet200Response() {
39
+ _classCallCheck(this, ListAssetBalancesForExchangeWallet200Response);
40
+ ListAssetBalancesForExchangeWallet200Response.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(ListAssetBalancesForExchangeWallet200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListAssetBalancesForExchangeWallet200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListAssetBalancesForExchangeWallet200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListAssetBalancesForExchangeWallet200Response} The populated <code>ListAssetBalancesForExchangeWallet200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListAssetBalancesForExchangeWallet200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_SubWalletAssetBalance["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListAssetBalancesForExchangeWallet200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAssetBalancesForExchangeWallet200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _SubWalletAssetBalance["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/SubWalletAssetBalance>} data
116
+ */
117
+ ListAssetBalancesForExchangeWallet200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListAssetBalancesForExchangeWallet200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListAssetBalancesForExchangeWallet200Response;
@@ -0,0 +1,122 @@
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 _ExchangeId = _interopRequireDefault(require("./ExchangeId"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: support@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The ListExchanges200ResponseInner model module.
30
+ * @module model/ListExchanges200ResponseInner
31
+ */
32
+ var ListExchanges200ResponseInner = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>ListExchanges200ResponseInner</code>.
35
+ * The information about the supported exchange.
36
+ * @alias module:model/ListExchanges200ResponseInner
37
+ * @param exchange_id {module:model/ExchangeId}
38
+ * @param supported_trading_account_types {Array.<String>} The supported trading account types of this exchange.
39
+ */
40
+ function ListExchanges200ResponseInner(exchange_id, supported_trading_account_types) {
41
+ _classCallCheck(this, ListExchanges200ResponseInner);
42
+ ListExchanges200ResponseInner.initialize(this, exchange_id, supported_trading_account_types);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(ListExchanges200ResponseInner, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, exchange_id, supported_trading_account_types) {
53
+ obj['exchange_id'] = exchange_id;
54
+ obj['supported_trading_account_types'] = supported_trading_account_types;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>ListExchanges200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/ListExchanges200ResponseInner} obj Optional instance to populate.
62
+ * @return {module:model/ListExchanges200ResponseInner} The populated <code>ListExchanges200ResponseInner</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new ListExchanges200ResponseInner();
69
+ if (data.hasOwnProperty('exchange_id')) {
70
+ obj['exchange_id'] = _ExchangeId["default"].constructFromObject(data['exchange_id']);
71
+ }
72
+ if (data.hasOwnProperty('supported_trading_account_types')) {
73
+ obj['supported_trading_account_types'] = _ApiClient["default"].convertToType(data['supported_trading_account_types'], ['String']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>ListExchanges200ResponseInner</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListExchanges200ResponseInner</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(ListExchanges200ResponseInner.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ // ensure the json data is an array
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ if (!Array.isArray(data['supported_trading_account_types'])) {
104
+ throw new Error("Expected the field `supported_trading_account_types` to be an array in the JSON data but got " + data['supported_trading_account_types']);
105
+ }
106
+ return true;
107
+ }
108
+ }]);
109
+ }();
110
+ ListExchanges200ResponseInner.RequiredProperties = ["exchange_id", "supported_trading_account_types"];
111
+
112
+ /**
113
+ * @member {module:model/ExchangeId} exchange_id
114
+ */
115
+ ListExchanges200ResponseInner.prototype['exchange_id'] = undefined;
116
+
117
+ /**
118
+ * The supported trading account types of this exchange.
119
+ * @member {Array.<String>} supported_trading_account_types
120
+ */
121
+ ListExchanges200ResponseInner.prototype['supported_trading_account_types'] = undefined;
122
+ var _default = exports["default"] = ListExchanges200ResponseInner;
@@ -103,7 +103,9 @@ var ListKeyShareHolderGroups200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListMpcProjects200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListMpcVaults200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _AssetInfo = _interopRequireDefault(require("./AssetInfo"));
9
+ var _Pagination = _interopRequireDefault(require("./Pagination"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: support@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 ListSupportedAssetsForExchange200Response model module.
31
+ * @module model/ListSupportedAssetsForExchange200Response
32
+ */
33
+ var ListSupportedAssetsForExchange200Response = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>ListSupportedAssetsForExchange200Response</code>.
36
+ * @alias module:model/ListSupportedAssetsForExchange200Response
37
+ */
38
+ function ListSupportedAssetsForExchange200Response() {
39
+ _classCallCheck(this, ListSupportedAssetsForExchange200Response);
40
+ ListSupportedAssetsForExchange200Response.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(ListSupportedAssetsForExchange200Response, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>ListSupportedAssetsForExchange200Response</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/ListSupportedAssetsForExchange200Response} obj Optional instance to populate.
57
+ * @return {module:model/ListSupportedAssetsForExchange200Response} The populated <code>ListSupportedAssetsForExchange200Response</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new ListSupportedAssetsForExchange200Response();
64
+ if (data.hasOwnProperty('data')) {
65
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AssetInfo["default"]]);
66
+ }
67
+ if (data.hasOwnProperty('pagination')) {
68
+ obj['pagination'] = _Pagination["default"].constructFromObject(data['pagination']);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>ListSupportedAssetsForExchange200Response</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListSupportedAssetsForExchange200Response</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ if (data['data']) {
83
+ // data not null
84
+ // ensure the json data is an array
85
+ if (!Array.isArray(data['data'])) {
86
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
87
+ }
88
+ // validate the optional field `data` (array)
89
+ var _iterator = _createForOfIteratorHelper(data['data']),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var item = _step.value;
94
+ _AssetInfo["default"].validateJSON(item);
95
+ }
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ ;
102
+ }
103
+ // validate the optional field `pagination`
104
+ if (data['pagination']) {
105
+ // data not null
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ /**
115
+ * @member {Array.<module:model/AssetInfo>} data
116
+ */
117
+ ListSupportedAssetsForExchange200Response.prototype['data'] = undefined;
118
+
119
+ /**
120
+ * @member {module:model/Pagination} pagination
121
+ */
122
+ ListSupportedAssetsForExchange200Response.prototype['pagination'] = undefined;
123
+ var _default = exports["default"] = ListSupportedAssetsForExchange200Response;
@@ -103,7 +103,9 @@ var ListSupportedChains200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListSupportedTokens200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListTokenBalancesForAddress200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListTransactions200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListTssRequests200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListUtxos200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListWallets200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListWebhookEndpoints200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListWebhookEventLogs200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -103,7 +103,9 @@ var ListWebhookEvents200Response = /*#__PURE__*/function () {
103
103
  // validate the optional field `pagination`
104
104
  if (data['pagination']) {
105
105
  // data not null
106
- _Pagination["default"].validateJSON(data['pagination']);
106
+ if (!!_Pagination["default"].validateJSON) {
107
+ _Pagination["default"].validateJSON(data['pagination']);
108
+ }
107
109
  }
108
110
  return true;
109
111
  }
@@ -96,9 +96,15 @@ var MPCWalletInfo = /*#__PURE__*/function () {
96
96
  if (data.hasOwnProperty('project_id')) {
97
97
  obj['project_id'] = _ApiClient["default"].convertToType(data['project_id'], 'String');
98
98
  }
99
+ if (data.hasOwnProperty('project_name')) {
100
+ obj['project_name'] = _ApiClient["default"].convertToType(data['project_name'], 'String');
101
+ }
99
102
  if (data.hasOwnProperty('vault_id')) {
100
103
  obj['vault_id'] = _ApiClient["default"].convertToType(data['vault_id'], 'String');
101
104
  }
105
+ if (data.hasOwnProperty('vault_name')) {
106
+ obj['vault_name'] = _ApiClient["default"].convertToType(data['vault_name'], 'String');
107
+ }
102
108
  }
103
109
  return obj;
104
110
  }
@@ -143,9 +149,17 @@ var MPCWalletInfo = /*#__PURE__*/function () {
143
149
  throw new Error("Expected the field `project_id` to be a primitive type in the JSON string but got " + data['project_id']);
144
150
  }
145
151
  // ensure the json data is a string
152
+ if (data['project_name'] && !(typeof data['project_name'] === 'string' || data['project_name'] instanceof String)) {
153
+ throw new Error("Expected the field `project_name` to be a primitive type in the JSON string but got " + data['project_name']);
154
+ }
155
+ // ensure the json data is a string
146
156
  if (data['vault_id'] && !(typeof data['vault_id'] === 'string' || data['vault_id'] instanceof String)) {
147
157
  throw new Error("Expected the field `vault_id` to be a primitive type in the JSON string but got " + data['vault_id']);
148
158
  }
159
+ // ensure the json data is a string
160
+ if (data['vault_name'] && !(typeof data['vault_name'] === 'string' || data['vault_name'] instanceof String)) {
161
+ throw new Error("Expected the field `vault_name` to be a primitive type in the JSON string but got " + data['vault_name']);
162
+ }
149
163
  return true;
150
164
  }
151
165
  }]);
@@ -186,12 +200,24 @@ MPCWalletInfo.prototype['org_id'] = undefined;
186
200
  */
187
201
  MPCWalletInfo.prototype['project_id'] = undefined;
188
202
 
203
+ /**
204
+ * The project name.
205
+ * @member {String} project_name
206
+ */
207
+ MPCWalletInfo.prototype['project_name'] = undefined;
208
+
189
209
  /**
190
210
  * The ID of the owning vault.
191
211
  * @member {String} vault_id
192
212
  */
193
213
  MPCWalletInfo.prototype['vault_id'] = undefined;
194
214
 
215
+ /**
216
+ * The vault name.
217
+ * @member {String} vault_name
218
+ */
219
+ MPCWalletInfo.prototype['vault_name'] = undefined;
220
+
195
221
  // Implement CustodialWalletInfo interface:
196
222
  /**
197
223
  * The wallet ID.
@@ -90,7 +90,9 @@ var MaxTransferableValue = /*#__PURE__*/function () {
90
90
  // validate the optional field `fee`
91
91
  if (data['fee']) {
92
92
  // data not null
93
- _TransactionRequestFee["default"].validateJSON(data['fee']);
93
+ if (!!_TransactionRequestFee["default"].validateJSON) {
94
+ _TransactionRequestFee["default"].validateJSON(data['fee']);
95
+ }
94
96
  }
95
97
  return true;
96
98
  }
@@ -55,12 +55,12 @@ var MessageSignDestination = /*#__PURE__*/function () {
55
55
  try {
56
56
  if (instance instanceof _EvmEIP191MessageSignDestination["default"]) {
57
57
  this.actualInstance = instance;
58
- } else if (_EvmEIP191MessageSignDestination["default"].validateJSON(instance)) {
58
+ } else if (!!_EvmEIP191MessageSignDestination["default"].validateJSON && _EvmEIP191MessageSignDestination["default"].validateJSON(instance)) {
59
59
  // plain JS object
60
60
  // create EvmEIP191MessageSignDestination from JS object
61
61
  this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
62
- } else {
63
- return;
62
+ } else if (_EvmEIP191MessageSignDestination["default"].constructFromObject(instance)) {
63
+ this.actualInstance = _EvmEIP191MessageSignDestination["default"].constructFromObject(instance);
64
64
  }
65
65
  match++;
66
66
  } catch (err) {
@@ -70,12 +70,12 @@ var MessageSignDestination = /*#__PURE__*/function () {
70
70
  try {
71
71
  if (instance instanceof _EvmEIP712MessageSignDestination["default"]) {
72
72
  this.actualInstance = instance;
73
- } else if (_EvmEIP712MessageSignDestination["default"].validateJSON(instance)) {
73
+ } else if (!!_EvmEIP712MessageSignDestination["default"].validateJSON && _EvmEIP712MessageSignDestination["default"].validateJSON(instance)) {
74
74
  // plain JS object
75
75
  // create EvmEIP712MessageSignDestination from JS object
76
76
  this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
77
- } else {
78
- return;
77
+ } else if (_EvmEIP712MessageSignDestination["default"].constructFromObject(instance)) {
78
+ this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
79
79
  }
80
80
  match++;
81
81
  } catch (err) {