@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,263 @@
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 _SourceGroup = _interopRequireDefault(require("./SourceGroup"));
9
+ var _TSSRequest = _interopRequireDefault(require("./TSSRequest"));
10
+ var _TSSRequestStatus = _interopRequireDefault(require("./TSSRequestStatus"));
11
+ var _TSSRequestType = _interopRequireDefault(require("./TSSRequestType"));
12
+ var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
14
+ 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); }
15
+ 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; } } }; }
16
+ 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; } }
17
+ 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; }
18
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
+ 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); } }
20
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
+ 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); } /**
23
+ * Cobo Wallet as a Service 2.0
24
+ *
25
+ * Contact: support@cobo.com
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * The TSSRequestWebhookEventData model module.
34
+ * @module model/TSSRequestWebhookEventData
35
+ */
36
+ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>TSSRequestWebhookEventData</code>.
39
+ * @alias module:model/TSSRequestWebhookEventData
40
+ * @implements module:model/WebhookEventDataType
41
+ * @implements module:model/TSSRequest
42
+ * @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
43
+ */
44
+ function TSSRequestWebhookEventData(data_type) {
45
+ _classCallCheck(this, TSSRequestWebhookEventData);
46
+ _WebhookEventDataType["default"].initialize(this, data_type);
47
+ _TSSRequest["default"].initialize(this);
48
+ TSSRequestWebhookEventData.initialize(this, data_type);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(TSSRequestWebhookEventData, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, data_type) {
59
+ obj['data_type'] = data_type;
60
+ }
61
+
62
+ /**
63
+ * Constructs a <code>TSSRequestWebhookEventData</code> from a plain JavaScript object, optionally creating a new instance.
64
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @param {module:model/TSSRequestWebhookEventData} obj Optional instance to populate.
67
+ * @return {module:model/TSSRequestWebhookEventData} The populated <code>TSSRequestWebhookEventData</code> instance.
68
+ */
69
+ }, {
70
+ key: "constructFromObject",
71
+ value: function constructFromObject(data, obj) {
72
+ if (data) {
73
+ obj = obj || new TSSRequestWebhookEventData();
74
+ _WebhookEventDataType["default"].constructFromObject(data, obj);
75
+ _TSSRequest["default"].constructFromObject(data, obj);
76
+ if (data.hasOwnProperty('data_type')) {
77
+ obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('tss_request_id')) {
80
+ obj['tss_request_id'] = _ApiClient["default"].convertToType(data['tss_request_id'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('source_key_share_holder_group')) {
83
+ obj['source_key_share_holder_group'] = _SourceGroup["default"].constructFromObject(data['source_key_share_holder_group']);
84
+ }
85
+ if (data.hasOwnProperty('target_key_share_holder_group_id')) {
86
+ obj['target_key_share_holder_group_id'] = _ApiClient["default"].convertToType(data['target_key_share_holder_group_id'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('type')) {
89
+ obj['type'] = _TSSRequestType["default"].constructFromObject(data['type']);
90
+ }
91
+ if (data.hasOwnProperty('status')) {
92
+ obj['status'] = _TSSRequestStatus["default"].constructFromObject(data['status']);
93
+ }
94
+ if (data.hasOwnProperty('description')) {
95
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('created_timestamp')) {
98
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
99
+ }
100
+ }
101
+ return obj;
102
+ }
103
+
104
+ /**
105
+ * Validates the JSON data with respect to <code>TSSRequestWebhookEventData</code>.
106
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
107
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TSSRequestWebhookEventData</code>.
108
+ */
109
+ }, {
110
+ key: "validateJSON",
111
+ value: function validateJSON(data) {
112
+ // check to make sure all required properties are present in the JSON string
113
+ var _iterator = _createForOfIteratorHelper(TSSRequestWebhookEventData.RequiredProperties),
114
+ _step;
115
+ try {
116
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
117
+ var property = _step.value;
118
+ if (!data.hasOwnProperty(property)) {
119
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
120
+ }
121
+ }
122
+ // ensure the json data is a string
123
+ } catch (err) {
124
+ _iterator.e(err);
125
+ } finally {
126
+ _iterator.f();
127
+ }
128
+ if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
129
+ throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['tss_request_id'] && !(typeof data['tss_request_id'] === 'string' || data['tss_request_id'] instanceof String)) {
133
+ throw new Error("Expected the field `tss_request_id` to be a primitive type in the JSON string but got " + data['tss_request_id']);
134
+ }
135
+ // validate the optional field `source_key_share_holder_group`
136
+ if (data['source_key_share_holder_group']) {
137
+ // data not null
138
+ if (!!_SourceGroup["default"].validateJSON) {
139
+ _SourceGroup["default"].validateJSON(data['source_key_share_holder_group']);
140
+ }
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['target_key_share_holder_group_id'] && !(typeof data['target_key_share_holder_group_id'] === 'string' || data['target_key_share_holder_group_id'] instanceof String)) {
144
+ throw new Error("Expected the field `target_key_share_holder_group_id` to be a primitive type in the JSON string but got " + data['target_key_share_holder_group_id']);
145
+ }
146
+ // ensure the json data is a string
147
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
148
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
149
+ }
150
+ return true;
151
+ }
152
+ }]);
153
+ }();
154
+ TSSRequestWebhookEventData.RequiredProperties = ["data_type"];
155
+
156
+ /**
157
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
158
+ * @member {module:model/TSSRequestWebhookEventData.DataTypeEnum} data_type
159
+ */
160
+ TSSRequestWebhookEventData.prototype['data_type'] = undefined;
161
+
162
+ /**
163
+ * The TSS request ID.
164
+ * @member {String} tss_request_id
165
+ */
166
+ TSSRequestWebhookEventData.prototype['tss_request_id'] = undefined;
167
+
168
+ /**
169
+ * @member {module:model/SourceGroup} source_key_share_holder_group
170
+ */
171
+ TSSRequestWebhookEventData.prototype['source_key_share_holder_group'] = undefined;
172
+
173
+ /**
174
+ * The target key share holder group ID.
175
+ * @member {String} target_key_share_holder_group_id
176
+ */
177
+ TSSRequestWebhookEventData.prototype['target_key_share_holder_group_id'] = undefined;
178
+
179
+ /**
180
+ * @member {module:model/TSSRequestType} type
181
+ */
182
+ TSSRequestWebhookEventData.prototype['type'] = undefined;
183
+
184
+ /**
185
+ * @member {module:model/TSSRequestStatus} status
186
+ */
187
+ TSSRequestWebhookEventData.prototype['status'] = undefined;
188
+
189
+ /**
190
+ * The description of the TSS request.
191
+ * @member {String} description
192
+ */
193
+ TSSRequestWebhookEventData.prototype['description'] = undefined;
194
+
195
+ /**
196
+ * The TSS request's creation time in Unix timestamp format, measured in milliseconds.
197
+ * @member {Number} created_timestamp
198
+ */
199
+ TSSRequestWebhookEventData.prototype['created_timestamp'] = undefined;
200
+
201
+ // Implement WebhookEventDataType interface:
202
+ /**
203
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
204
+ * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
205
+ */
206
+ _WebhookEventDataType["default"].prototype['data_type'] = undefined;
207
+ // Implement TSSRequest interface:
208
+ /**
209
+ * The TSS request ID.
210
+ * @member {String} tss_request_id
211
+ */
212
+ _TSSRequest["default"].prototype['tss_request_id'] = undefined;
213
+ /**
214
+ * @member {module:model/SourceGroup} source_key_share_holder_group
215
+ */
216
+ _TSSRequest["default"].prototype['source_key_share_holder_group'] = undefined;
217
+ /**
218
+ * The target key share holder group ID.
219
+ * @member {String} target_key_share_holder_group_id
220
+ */
221
+ _TSSRequest["default"].prototype['target_key_share_holder_group_id'] = undefined;
222
+ /**
223
+ * @member {module:model/TSSRequestType} type
224
+ */
225
+ _TSSRequest["default"].prototype['type'] = undefined;
226
+ /**
227
+ * @member {module:model/TSSRequestStatus} status
228
+ */
229
+ _TSSRequest["default"].prototype['status'] = undefined;
230
+ /**
231
+ * The description of the TSS request.
232
+ * @member {String} description
233
+ */
234
+ _TSSRequest["default"].prototype['description'] = undefined;
235
+ /**
236
+ * The TSS request's creation time in Unix timestamp format, measured in milliseconds.
237
+ * @member {Number} created_timestamp
238
+ */
239
+ _TSSRequest["default"].prototype['created_timestamp'] = undefined;
240
+
241
+ /**
242
+ * Allowed values for the <code>data_type</code> property.
243
+ * @enum {String}
244
+ * @readonly
245
+ */
246
+ TSSRequestWebhookEventData['DataTypeEnum'] = {
247
+ /**
248
+ * value: "Transaction"
249
+ * @const
250
+ */
251
+ "Transaction": "Transaction",
252
+ /**
253
+ * value: "TSSRequest"
254
+ * @const
255
+ */
256
+ "TSSRequest": "TSSRequest",
257
+ /**
258
+ * value: "unknown_default_open_api"
259
+ * @const
260
+ */
261
+ "unknown_default_open_api": "unknown_default_open_api"
262
+ };
263
+ var _default = exports["default"] = TSSRequestWebhookEventData;
@@ -106,7 +106,9 @@ var TokenBalance = /*#__PURE__*/function () {
106
106
  // validate the optional field `balance`
107
107
  if (data['balance']) {
108
108
  // data not null
109
- _TokenBalanceBalance["default"].validateJSON(data['balance']);
109
+ if (!!_TokenBalanceBalance["default"].validateJSON) {
110
+ _TokenBalanceBalance["default"].validateJSON(data['balance']);
111
+ }
110
112
  }
111
113
  return true;
112
114
  }
@@ -230,22 +230,30 @@ var Transaction = /*#__PURE__*/function () {
230
230
  // validate the optional field `source`
231
231
  if (data['source']) {
232
232
  // data not null
233
- _TransactionSource["default"].validateJSON(data['source']);
233
+ if (!!_TransactionSource["default"].validateJSON) {
234
+ _TransactionSource["default"].validateJSON(data['source']);
235
+ }
234
236
  }
235
237
  // validate the optional field `destination`
236
238
  if (data['destination']) {
237
239
  // data not null
238
- _TransactionDestination["default"].validateJSON(data['destination']);
240
+ if (!!_TransactionDestination["default"].validateJSON) {
241
+ _TransactionDestination["default"].validateJSON(data['destination']);
242
+ }
239
243
  }
240
244
  // validate the optional field `result`
241
245
  if (data['result']) {
242
246
  // data not null
243
- _TransactionResult["default"].validateJSON(data['result']);
247
+ if (!!_TransactionResult["default"].validateJSON) {
248
+ _TransactionResult["default"].validateJSON(data['result']);
249
+ }
244
250
  }
245
251
  // validate the optional field `fee`
246
252
  if (data['fee']) {
247
253
  // data not null
248
- _TransactionFee["default"].validateJSON(data['fee']);
254
+ if (!!_TransactionFee["default"].validateJSON) {
255
+ _TransactionFee["default"].validateJSON(data['fee']);
256
+ }
249
257
  }
250
258
  // ensure the json data is a string
251
259
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
@@ -258,17 +266,23 @@ var Transaction = /*#__PURE__*/function () {
258
266
  // validate the optional field `block_info`
259
267
  if (data['block_info']) {
260
268
  // data not null
261
- _TransactionBlockInfo["default"].validateJSON(data['block_info']);
269
+ if (!!_TransactionBlockInfo["default"].validateJSON) {
270
+ _TransactionBlockInfo["default"].validateJSON(data['block_info']);
271
+ }
262
272
  }
263
273
  // validate the optional field `raw_tx_info`
264
274
  if (data['raw_tx_info']) {
265
275
  // data not null
266
- _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
276
+ if (!!_TransactionRawTxInfo["default"].validateJSON) {
277
+ _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
278
+ }
267
279
  }
268
280
  // validate the optional field `replacement`
269
281
  if (data['replacement']) {
270
282
  // data not null
271
- _TransactionReplacement["default"].validateJSON(data['replacement']);
283
+ if (!!_TransactionReplacement["default"].validateJSON) {
284
+ _TransactionReplacement["default"].validateJSON(data['replacement']);
285
+ }
272
286
  }
273
287
  // ensure the json data is an array
274
288
  if (!Array.isArray(data['category'])) {
@@ -84,8 +84,8 @@ var TransactionDepositFromWalletSource = /*#__PURE__*/function () {
84
84
  if (data.hasOwnProperty('wallet_subtype')) {
85
85
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
86
86
  }
87
- if (data.hasOwnProperty('sub_wallet_id')) {
88
- obj['sub_wallet_id'] = _ApiClient["default"].convertToType(data['sub_wallet_id'], 'String');
87
+ if (data.hasOwnProperty('trading_account_type')) {
88
+ obj['trading_account_type'] = _ApiClient["default"].convertToType(data['trading_account_type'], 'String');
89
89
  }
90
90
  }
91
91
  return obj;
@@ -119,8 +119,8 @@ var TransactionDepositFromWalletSource = /*#__PURE__*/function () {
119
119
  throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
120
120
  }
121
121
  // ensure the json data is a string
122
- if (data['sub_wallet_id'] && !(typeof data['sub_wallet_id'] === 'string' || data['sub_wallet_id'] instanceof String)) {
123
- throw new Error("Expected the field `sub_wallet_id` to be a primitive type in the JSON string but got " + data['sub_wallet_id']);
122
+ if (data['trading_account_type'] && !(typeof data['trading_account_type'] === 'string' || data['trading_account_type'] instanceof String)) {
123
+ throw new Error("Expected the field `trading_account_type` to be a primitive type in the JSON string but got " + data['trading_account_type']);
124
124
  }
125
125
  return true;
126
126
  }
@@ -151,7 +151,7 @@ TransactionDepositFromWalletSource.prototype['wallet_subtype'] = undefined;
151
151
 
152
152
  /**
153
153
  * The exchange trading account or a sub-wallet ID.
154
- * @member {String} sub_wallet_id
154
+ * @member {String} trading_account_type
155
155
  */
156
- TransactionDepositFromWalletSource.prototype['sub_wallet_id'] = undefined;
156
+ TransactionDepositFromWalletSource.prototype['trading_account_type'] = undefined;
157
157
  var _default = exports["default"] = TransactionDepositFromWalletSource;
@@ -40,7 +40,7 @@ var TransactionDepositToAddressDestination = /*#__PURE__*/function () {
40
40
  * @param wallet_id {String} The wallet ID.
41
41
  * @param wallet_type {module:model/WalletType}
42
42
  * @param address {String} The destination address.
43
- * @param amount {String} The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
43
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
44
44
  */
45
45
  function TransactionDepositToAddressDestination(destination_type, wallet_id, wallet_type, address, amount) {
46
46
  _classCallCheck(this, TransactionDepositToAddressDestination);
@@ -178,7 +178,7 @@ TransactionDepositToAddressDestination.prototype['address'] = undefined;
178
178
  TransactionDepositToAddressDestination.prototype['memo'] = undefined;
179
179
 
180
180
  /**
181
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
181
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
182
182
  * @member {String} amount
183
183
  */
184
184
  TransactionDepositToAddressDestination.prototype['amount'] = undefined;
@@ -41,7 +41,7 @@ var TransactionDepositToWalletDestination = /*#__PURE__*/function () {
41
41
  * @param wallet_id {String} The wallet ID.
42
42
  * @param wallet_type {module:model/WalletType}
43
43
  * @param wallet_subtype {module:model/WalletSubtype}
44
- * @param amount {String} The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
44
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
45
45
  */
46
46
  function TransactionDepositToWalletDestination(destination_type, wallet_id, wallet_type, wallet_subtype, amount) {
47
47
  _classCallCheck(this, TransactionDepositToWalletDestination);
@@ -87,8 +87,8 @@ var TransactionDepositToWalletDestination = /*#__PURE__*/function () {
87
87
  if (data.hasOwnProperty('wallet_subtype')) {
88
88
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
89
89
  }
90
- if (data.hasOwnProperty('sub_wallet_id')) {
91
- obj['sub_wallet_id'] = _ApiClient["default"].convertToType(data['sub_wallet_id'], 'String');
90
+ if (data.hasOwnProperty('trading_account_type')) {
91
+ obj['trading_account_type'] = _ApiClient["default"].convertToType(data['trading_account_type'], 'String');
92
92
  }
93
93
  if (data.hasOwnProperty('exchange_id')) {
94
94
  obj['exchange_id'] = _ExchangeId["default"].constructFromObject(data['exchange_id']);
@@ -128,8 +128,8 @@ var TransactionDepositToWalletDestination = /*#__PURE__*/function () {
128
128
  throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
129
129
  }
130
130
  // ensure the json data is a string
131
- if (data['sub_wallet_id'] && !(typeof data['sub_wallet_id'] === 'string' || data['sub_wallet_id'] instanceof String)) {
132
- throw new Error("Expected the field `sub_wallet_id` to be a primitive type in the JSON string but got " + data['sub_wallet_id']);
131
+ if (data['trading_account_type'] && !(typeof data['trading_account_type'] === 'string' || data['trading_account_type'] instanceof String)) {
132
+ throw new Error("Expected the field `trading_account_type` to be a primitive type in the JSON string but got " + data['trading_account_type']);
133
133
  }
134
134
  // ensure the json data is a string
135
135
  if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
@@ -163,10 +163,10 @@ TransactionDepositToWalletDestination.prototype['wallet_type'] = undefined;
163
163
  TransactionDepositToWalletDestination.prototype['wallet_subtype'] = undefined;
164
164
 
165
165
  /**
166
- * The exchange trading account or the sub-wallet ID.
167
- * @member {String} sub_wallet_id
166
+ * The trading account type.
167
+ * @member {String} trading_account_type
168
168
  */
169
- TransactionDepositToWalletDestination.prototype['sub_wallet_id'] = undefined;
169
+ TransactionDepositToWalletDestination.prototype['trading_account_type'] = undefined;
170
170
 
171
171
  /**
172
172
  * @member {module:model/ExchangeId} exchange_id
@@ -174,7 +174,7 @@ TransactionDepositToWalletDestination.prototype['sub_wallet_id'] = undefined;
174
174
  TransactionDepositToWalletDestination.prototype['exchange_id'] = undefined;
175
175
 
176
176
  /**
177
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
177
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
178
178
  * @member {String} amount
179
179
  */
180
180
  TransactionDepositToWalletDestination.prototype['amount'] = undefined;
@@ -65,12 +65,12 @@ var TransactionDestination = /*#__PURE__*/function () {
65
65
  try {
66
66
  if (instance instanceof _TransactionTransferToAddressDestination["default"]) {
67
67
  this.actualInstance = instance;
68
- } else if (_TransactionTransferToAddressDestination["default"].validateJSON(instance)) {
68
+ } else if (!!_TransactionTransferToAddressDestination["default"].validateJSON && _TransactionTransferToAddressDestination["default"].validateJSON(instance)) {
69
69
  // plain JS object
70
70
  // create TransactionTransferToAddressDestination from JS object
71
71
  this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
72
- } else {
73
- return;
72
+ } else if (_TransactionTransferToAddressDestination["default"].constructFromObject(instance)) {
73
+ this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
74
74
  }
75
75
  match++;
76
76
  } catch (err) {
@@ -80,12 +80,12 @@ var TransactionDestination = /*#__PURE__*/function () {
80
80
  try {
81
81
  if (instance instanceof _TransactionTransferToWalletDestination["default"]) {
82
82
  this.actualInstance = instance;
83
- } else if (_TransactionTransferToWalletDestination["default"].validateJSON(instance)) {
83
+ } else if (!!_TransactionTransferToWalletDestination["default"].validateJSON && _TransactionTransferToWalletDestination["default"].validateJSON(instance)) {
84
84
  // plain JS object
85
85
  // create TransactionTransferToWalletDestination from JS object
86
86
  this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
87
- } else {
88
- return;
87
+ } else if (_TransactionTransferToWalletDestination["default"].constructFromObject(instance)) {
88
+ this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
89
89
  }
90
90
  match++;
91
91
  } catch (err) {
@@ -95,12 +95,12 @@ var TransactionDestination = /*#__PURE__*/function () {
95
95
  try {
96
96
  if (instance instanceof _TransactionEvmContractDestination["default"]) {
97
97
  this.actualInstance = instance;
98
- } else if (_TransactionEvmContractDestination["default"].validateJSON(instance)) {
98
+ } else if (!!_TransactionEvmContractDestination["default"].validateJSON && _TransactionEvmContractDestination["default"].validateJSON(instance)) {
99
99
  // plain JS object
100
100
  // create TransactionEvmContractDestination from JS object
101
101
  this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
102
- } else {
103
- return;
102
+ } else if (_TransactionEvmContractDestination["default"].constructFromObject(instance)) {
103
+ this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
104
104
  }
105
105
  match++;
106
106
  } catch (err) {
@@ -110,12 +110,12 @@ var TransactionDestination = /*#__PURE__*/function () {
110
110
  try {
111
111
  if (instance instanceof _TransactionMessageSignEIP191Destination["default"]) {
112
112
  this.actualInstance = instance;
113
- } else if (_TransactionMessageSignEIP191Destination["default"].validateJSON(instance)) {
113
+ } else if (!!_TransactionMessageSignEIP191Destination["default"].validateJSON && _TransactionMessageSignEIP191Destination["default"].validateJSON(instance)) {
114
114
  // plain JS object
115
115
  // create TransactionMessageSignEIP191Destination from JS object
116
116
  this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
117
- } else {
118
- return;
117
+ } else if (_TransactionMessageSignEIP191Destination["default"].constructFromObject(instance)) {
118
+ this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
119
119
  }
120
120
  match++;
121
121
  } catch (err) {
@@ -125,12 +125,12 @@ var TransactionDestination = /*#__PURE__*/function () {
125
125
  try {
126
126
  if (instance instanceof _TransactionMessageSignEIP712Destination["default"]) {
127
127
  this.actualInstance = instance;
128
- } else if (_TransactionMessageSignEIP712Destination["default"].validateJSON(instance)) {
128
+ } else if (!!_TransactionMessageSignEIP712Destination["default"].validateJSON && _TransactionMessageSignEIP712Destination["default"].validateJSON(instance)) {
129
129
  // plain JS object
130
130
  // create TransactionMessageSignEIP712Destination from JS object
131
131
  this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
132
- } else {
133
- return;
132
+ } else if (_TransactionMessageSignEIP712Destination["default"].constructFromObject(instance)) {
133
+ this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
134
134
  }
135
135
  match++;
136
136
  } catch (err) {
@@ -140,12 +140,12 @@ var TransactionDestination = /*#__PURE__*/function () {
140
140
  try {
141
141
  if (instance instanceof _TransactionDepositToAddressDestination["default"]) {
142
142
  this.actualInstance = instance;
143
- } else if (_TransactionDepositToAddressDestination["default"].validateJSON(instance)) {
143
+ } else if (!!_TransactionDepositToAddressDestination["default"].validateJSON && _TransactionDepositToAddressDestination["default"].validateJSON(instance)) {
144
144
  // plain JS object
145
145
  // create TransactionDepositToAddressDestination from JS object
146
146
  this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
147
- } else {
148
- return;
147
+ } else if (_TransactionDepositToAddressDestination["default"].constructFromObject(instance)) {
148
+ this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
149
149
  }
150
150
  match++;
151
151
  } catch (err) {
@@ -155,12 +155,12 @@ var TransactionDestination = /*#__PURE__*/function () {
155
155
  try {
156
156
  if (instance instanceof _TransactionDepositToWalletDestination["default"]) {
157
157
  this.actualInstance = instance;
158
- } else if (_TransactionDepositToWalletDestination["default"].validateJSON(instance)) {
158
+ } else if (!!_TransactionDepositToWalletDestination["default"].validateJSON && _TransactionDepositToWalletDestination["default"].validateJSON(instance)) {
159
159
  // plain JS object
160
160
  // create TransactionDepositToWalletDestination from JS object
161
161
  this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
162
- } else {
163
- return;
162
+ } else if (_TransactionDepositToWalletDestination["default"].constructFromObject(instance)) {
163
+ this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
164
164
  }
165
165
  match++;
166
166
  } catch (err) {
@@ -264,10 +264,10 @@ TransactionDestination.prototype['force_external'] = undefined;
264
264
  TransactionDestination.prototype['wallet_id'] = undefined;
265
265
 
266
266
  /**
267
- * The exchange trading account or the sub-wallet ID.
268
- * @member {String} sub_wallet_id
267
+ * The trading account type.
268
+ * @member {String} trading_account_type
269
269
  */
270
- TransactionDestination.prototype['sub_wallet_id'] = undefined;
270
+ TransactionDestination.prototype['trading_account_type'] = undefined;
271
271
 
272
272
  /**
273
273
  * @member {module:model/ExchangeId} exchange_id
@@ -275,7 +275,7 @@ TransactionDestination.prototype['sub_wallet_id'] = undefined;
275
275
  TransactionDestination.prototype['exchange_id'] = undefined;
276
276
 
277
277
  /**
278
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
278
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
279
279
  * @member {String} amount
280
280
  */
281
281
  TransactionDestination.prototype['amount'] = undefined;
@@ -287,7 +287,7 @@ TransactionDestination.prototype['amount'] = undefined;
287
287
  TransactionDestination.prototype['address'] = undefined;
288
288
 
289
289
  /**
290
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
290
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
291
291
  * @member {String} value
292
292
  */
293
293
  TransactionDestination.prototype['value'] = undefined;
@@ -237,22 +237,30 @@ var TransactionDetail = /*#__PURE__*/function () {
237
237
  // validate the optional field `source`
238
238
  if (data['source']) {
239
239
  // data not null
240
- _TransactionSource["default"].validateJSON(data['source']);
240
+ if (!!_TransactionSource["default"].validateJSON) {
241
+ _TransactionSource["default"].validateJSON(data['source']);
242
+ }
241
243
  }
242
244
  // validate the optional field `destination`
243
245
  if (data['destination']) {
244
246
  // data not null
245
- _TransactionDestination["default"].validateJSON(data['destination']);
247
+ if (!!_TransactionDestination["default"].validateJSON) {
248
+ _TransactionDestination["default"].validateJSON(data['destination']);
249
+ }
246
250
  }
247
251
  // validate the optional field `result`
248
252
  if (data['result']) {
249
253
  // data not null
250
- _TransactionResult["default"].validateJSON(data['result']);
254
+ if (!!_TransactionResult["default"].validateJSON) {
255
+ _TransactionResult["default"].validateJSON(data['result']);
256
+ }
251
257
  }
252
258
  // validate the optional field `fee`
253
259
  if (data['fee']) {
254
260
  // data not null
255
- _TransactionFee["default"].validateJSON(data['fee']);
261
+ if (!!_TransactionFee["default"].validateJSON) {
262
+ _TransactionFee["default"].validateJSON(data['fee']);
263
+ }
256
264
  }
257
265
  // ensure the json data is a string
258
266
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
@@ -265,17 +273,23 @@ var TransactionDetail = /*#__PURE__*/function () {
265
273
  // validate the optional field `block_info`
266
274
  if (data['block_info']) {
267
275
  // data not null
268
- _TransactionBlockInfo["default"].validateJSON(data['block_info']);
276
+ if (!!_TransactionBlockInfo["default"].validateJSON) {
277
+ _TransactionBlockInfo["default"].validateJSON(data['block_info']);
278
+ }
269
279
  }
270
280
  // validate the optional field `raw_tx_info`
271
281
  if (data['raw_tx_info']) {
272
282
  // data not null
273
- _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
283
+ if (!!_TransactionRawTxInfo["default"].validateJSON) {
284
+ _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
285
+ }
274
286
  }
275
287
  // validate the optional field `replacement`
276
288
  if (data['replacement']) {
277
289
  // data not null
278
- _TransactionReplacement["default"].validateJSON(data['replacement']);
290
+ if (!!_TransactionReplacement["default"].validateJSON) {
291
+ _TransactionReplacement["default"].validateJSON(data['replacement']);
292
+ }
279
293
  }
280
294
  // ensure the json data is an array
281
295
  if (!Array.isArray(data['category'])) {