@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
@@ -47,7 +47,7 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
47
47
  * @alias module:model/TransactionWebhookEventData
48
48
  * @implements module:model/WebhookEventDataType
49
49
  * @implements module:model/Transaction
50
- * @param data_type {module:model/TransactionWebhookEventData.DataTypeEnum} The data type of the event. When `data_type` is `Transaction`, it means the event uses the `transaction` schema as its data type.
50
+ * @param data_type {module:model/TransactionWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
51
51
  * @param transaction_id {String} The transaction ID.
52
52
  * @param wallet_id {String} For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.
53
53
  * @param status {module:model/TransactionStatus}
@@ -246,22 +246,30 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
246
246
  // validate the optional field `source`
247
247
  if (data['source']) {
248
248
  // data not null
249
- _TransactionSource["default"].validateJSON(data['source']);
249
+ if (!!_TransactionSource["default"].validateJSON) {
250
+ _TransactionSource["default"].validateJSON(data['source']);
251
+ }
250
252
  }
251
253
  // validate the optional field `destination`
252
254
  if (data['destination']) {
253
255
  // data not null
254
- _TransactionDestination["default"].validateJSON(data['destination']);
256
+ if (!!_TransactionDestination["default"].validateJSON) {
257
+ _TransactionDestination["default"].validateJSON(data['destination']);
258
+ }
255
259
  }
256
260
  // validate the optional field `result`
257
261
  if (data['result']) {
258
262
  // data not null
259
- _TransactionResult["default"].validateJSON(data['result']);
263
+ if (!!_TransactionResult["default"].validateJSON) {
264
+ _TransactionResult["default"].validateJSON(data['result']);
265
+ }
260
266
  }
261
267
  // validate the optional field `fee`
262
268
  if (data['fee']) {
263
269
  // data not null
264
- _TransactionFee["default"].validateJSON(data['fee']);
270
+ if (!!_TransactionFee["default"].validateJSON) {
271
+ _TransactionFee["default"].validateJSON(data['fee']);
272
+ }
265
273
  }
266
274
  // ensure the json data is a string
267
275
  if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
@@ -274,17 +282,23 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
274
282
  // validate the optional field `block_info`
275
283
  if (data['block_info']) {
276
284
  // data not null
277
- _TransactionBlockInfo["default"].validateJSON(data['block_info']);
285
+ if (!!_TransactionBlockInfo["default"].validateJSON) {
286
+ _TransactionBlockInfo["default"].validateJSON(data['block_info']);
287
+ }
278
288
  }
279
289
  // validate the optional field `raw_tx_info`
280
290
  if (data['raw_tx_info']) {
281
291
  // data not null
282
- _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
292
+ if (!!_TransactionRawTxInfo["default"].validateJSON) {
293
+ _TransactionRawTxInfo["default"].validateJSON(data['raw_tx_info']);
294
+ }
283
295
  }
284
296
  // validate the optional field `replacement`
285
297
  if (data['replacement']) {
286
298
  // data not null
287
- _TransactionReplacement["default"].validateJSON(data['replacement']);
299
+ if (!!_TransactionReplacement["default"].validateJSON) {
300
+ _TransactionReplacement["default"].validateJSON(data['replacement']);
301
+ }
288
302
  }
289
303
  // ensure the json data is an array
290
304
  if (!Array.isArray(data['category'])) {
@@ -301,7 +315,7 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
301
315
  TransactionWebhookEventData.RequiredProperties = ["data_type", "transaction_id", "wallet_id", "status", "source", "destination", "initiator_type"];
302
316
 
303
317
  /**
304
- * The data type of the event. When `data_type` is `Transaction`, it means the event uses the `transaction` schema as its data type.
318
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
305
319
  * @member {module:model/TransactionWebhookEventData.DataTypeEnum} data_type
306
320
  */
307
321
  TransactionWebhookEventData.prototype['data_type'] = undefined;
@@ -465,7 +479,7 @@ TransactionWebhookEventData.prototype['updated_timestamp'] = undefined;
465
479
 
466
480
  // Implement WebhookEventDataType interface:
467
481
  /**
468
- * The data type of the event. When `data_type` is `Transaction`, it means the event uses the `transaction` schema as its data type.
482
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
469
483
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
470
484
  */
471
485
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -611,6 +625,11 @@ TransactionWebhookEventData['DataTypeEnum'] = {
611
625
  * @const
612
626
  */
613
627
  "Transaction": "Transaction",
628
+ /**
629
+ * value: "TSSRequest"
630
+ * @const
631
+ */
632
+ "TSSRequest": "TSSRequest",
614
633
  /**
615
634
  * value: "unknown_default_open_api"
616
635
  * @const
@@ -57,12 +57,12 @@ var TransferDestination = /*#__PURE__*/function () {
57
57
  try {
58
58
  if (instance instanceof _AddressTransferDestination["default"]) {
59
59
  this.actualInstance = instance;
60
- } else if (_AddressTransferDestination["default"].validateJSON(instance)) {
60
+ } else if (!!_AddressTransferDestination["default"].validateJSON && _AddressTransferDestination["default"].validateJSON(instance)) {
61
61
  // plain JS object
62
62
  // create AddressTransferDestination from JS object
63
63
  this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
64
- } else {
65
- return;
64
+ } else if (_AddressTransferDestination["default"].constructFromObject(instance)) {
65
+ this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
66
66
  }
67
67
  match++;
68
68
  } catch (err) {
@@ -72,12 +72,12 @@ var TransferDestination = /*#__PURE__*/function () {
72
72
  try {
73
73
  if (instance instanceof _ExchangeTransferDestination["default"]) {
74
74
  this.actualInstance = instance;
75
- } else if (_ExchangeTransferDestination["default"].validateJSON(instance)) {
75
+ } else if (!!_ExchangeTransferDestination["default"].validateJSON && _ExchangeTransferDestination["default"].validateJSON(instance)) {
76
76
  // plain JS object
77
77
  // create ExchangeTransferDestination from JS object
78
78
  this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
79
- } else {
80
- return;
79
+ } else if (_ExchangeTransferDestination["default"].constructFromObject(instance)) {
80
+ this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
81
81
  }
82
82
  match++;
83
83
  } catch (err) {
@@ -163,13 +163,13 @@ TransferDestination.prototype['utxo_outputs'] = undefined;
163
163
  TransferDestination.prototype['change_address'] = undefined;
164
164
 
165
165
  /**
166
- * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer.
166
+ * Whether the transaction request must be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must be executed as a Loop transfer. - `false`: The transaction request may not be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note>
167
167
  * @member {Boolean} force_internal
168
168
  */
169
169
  TransferDestination.prototype['force_internal'] = undefined;
170
170
 
171
171
  /**
172
- * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer.
172
+ * Whether the transaction request must not be executed as a Loop transfer. For more information about Loop, see [Loop's website](https://loop.top/). - `true`: The transaction request must not be executed as a Loop transfer. - `false`: The transaction request can be executed as a Loop transfer. <Note>Please do not set both `force_internal` and `force_internal` as `true`.</Note>
173
173
  * @member {Boolean} force_external
174
174
  */
175
175
  TransferDestination.prototype['force_external'] = undefined;
@@ -181,13 +181,13 @@ TransferDestination.prototype['force_external'] = undefined;
181
181
  TransferDestination.prototype['wallet_id'] = undefined;
182
182
 
183
183
  /**
184
- * The exchange trading account or the sub-wallet ID.
185
- * @member {String} sub_wallet_id
184
+ * The trading account type.
185
+ * @member {String} trading_account_type
186
186
  */
187
- TransferDestination.prototype['sub_wallet_id'] = undefined;
187
+ TransferDestination.prototype['trading_account_type'] = undefined;
188
188
 
189
189
  /**
190
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
190
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
191
191
  * @member {String} amount
192
192
  */
193
193
  TransferDestination.prototype['amount'] = undefined;
@@ -38,7 +38,7 @@ var TransferParams = /*#__PURE__*/function () {
38
38
  * @alias module:model/TransferParams
39
39
  * @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
40
40
  * @param source {module:model/TransferSource}
41
- * @param token_id {String} The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
41
+ * @param token_id {String} The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens). For transfers from Exchange Wallets, this property value represents the asset ID.
42
42
  * @param destination {module:model/TransferDestination}
43
43
  */
44
44
  function TransferParams(request_id, source, token_id, destination) {
@@ -127,7 +127,9 @@ var TransferParams = /*#__PURE__*/function () {
127
127
  // validate the optional field `source`
128
128
  if (data['source']) {
129
129
  // data not null
130
- _TransferSource["default"].validateJSON(data['source']);
130
+ if (!!_TransferSource["default"].validateJSON) {
131
+ _TransferSource["default"].validateJSON(data['source']);
132
+ }
131
133
  }
132
134
  // ensure the json data is a string
133
135
  if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
@@ -136,7 +138,9 @@ var TransferParams = /*#__PURE__*/function () {
136
138
  // validate the optional field `destination`
137
139
  if (data['destination']) {
138
140
  // data not null
139
- _TransferDestination["default"].validateJSON(data['destination']);
141
+ if (!!_TransferDestination["default"].validateJSON) {
142
+ _TransferDestination["default"].validateJSON(data['destination']);
143
+ }
140
144
  }
141
145
  // ensure the json data is an array
142
146
  if (!Array.isArray(data['category_names'])) {
@@ -149,7 +153,9 @@ var TransferParams = /*#__PURE__*/function () {
149
153
  // validate the optional field `fee`
150
154
  if (data['fee']) {
151
155
  // data not null
152
- _TransactionRequestFee["default"].validateJSON(data['fee']);
156
+ if (!!_TransactionRequestFee["default"].validateJSON) {
157
+ _TransactionRequestFee["default"].validateJSON(data['fee']);
158
+ }
153
159
  }
154
160
  return true;
155
161
  }
@@ -169,7 +175,7 @@ TransferParams.prototype['request_id'] = undefined;
169
175
  TransferParams.prototype['source'] = undefined;
170
176
 
171
177
  /**
172
- * The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
178
+ * The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens). For transfers from Exchange Wallets, this property value represents the asset ID.
173
179
  * @member {String} token_id
174
180
  */
175
181
  TransferParams.prototype['token_id'] = undefined;
@@ -59,12 +59,12 @@ var TransferSource = /*#__PURE__*/function () {
59
59
  try {
60
60
  if (instance instanceof _CustodialTransferSource["default"]) {
61
61
  this.actualInstance = instance;
62
- } else if (_CustodialTransferSource["default"].validateJSON(instance)) {
62
+ } else if (!!_CustodialTransferSource["default"].validateJSON && _CustodialTransferSource["default"].validateJSON(instance)) {
63
63
  // plain JS object
64
64
  // create CustodialTransferSource from JS object
65
65
  this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
66
- } else {
67
- return;
66
+ } else if (_CustodialTransferSource["default"].constructFromObject(instance)) {
67
+ this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
68
68
  }
69
69
  match++;
70
70
  } catch (err) {
@@ -74,12 +74,12 @@ var TransferSource = /*#__PURE__*/function () {
74
74
  try {
75
75
  if (instance instanceof _MpcTransferSource["default"]) {
76
76
  this.actualInstance = instance;
77
- } else if (_MpcTransferSource["default"].validateJSON(instance)) {
77
+ } else if (!!_MpcTransferSource["default"].validateJSON && _MpcTransferSource["default"].validateJSON(instance)) {
78
78
  // plain JS object
79
79
  // create MpcTransferSource from JS object
80
80
  this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
81
- } else {
82
- return;
81
+ } else if (_MpcTransferSource["default"].constructFromObject(instance)) {
82
+ this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
83
83
  }
84
84
  match++;
85
85
  } catch (err) {
@@ -89,12 +89,12 @@ var TransferSource = /*#__PURE__*/function () {
89
89
  try {
90
90
  if (instance instanceof _SafeTransferSource["default"]) {
91
91
  this.actualInstance = instance;
92
- } else if (_SafeTransferSource["default"].validateJSON(instance)) {
92
+ } else if (!!_SafeTransferSource["default"].validateJSON && _SafeTransferSource["default"].validateJSON(instance)) {
93
93
  // plain JS object
94
94
  // create SafeTransferSource from JS object
95
95
  this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
96
- } else {
97
- return;
96
+ } else if (_SafeTransferSource["default"].constructFromObject(instance)) {
97
+ this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
98
98
  }
99
99
  match++;
100
100
  } catch (err) {
@@ -104,12 +104,12 @@ var TransferSource = /*#__PURE__*/function () {
104
104
  try {
105
105
  if (instance instanceof _ExchangeTransferSource["default"]) {
106
106
  this.actualInstance = instance;
107
- } else if (_ExchangeTransferSource["default"].validateJSON(instance)) {
107
+ } else if (!!_ExchangeTransferSource["default"].validateJSON && _ExchangeTransferSource["default"].validateJSON(instance)) {
108
108
  // plain JS object
109
109
  // create ExchangeTransferSource from JS object
110
110
  this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
111
- } else {
112
- return;
111
+ } else if (_ExchangeTransferSource["default"].constructFromObject(instance)) {
112
+ this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
113
113
  }
114
114
  match++;
115
115
  } catch (err) {
@@ -206,9 +206,9 @@ TransferSource.prototype['excluded_utxos'] = undefined;
206
206
  TransferSource.prototype['delegate'] = undefined;
207
207
 
208
208
  /**
209
- * The exchange trading account or the sub-wallet ID.
210
- * @member {String} sub_wallet_id
209
+ * The trading account type.
210
+ * @member {String} trading_account_type
211
211
  */
212
- TransferSource.prototype['sub_wallet_id'] = undefined;
212
+ TransferSource.prototype['trading_account_type'] = undefined;
213
213
  TransferSource.OneOf = ["CustodialTransferSource", "ExchangeTransferSource", "MpcTransferSource", "SafeTransferSource"];
214
214
  var _default = exports["default"] = TransferSource;
@@ -57,12 +57,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
57
57
  try {
58
58
  if (instance instanceof _UpdateCustodialWalletParams["default"]) {
59
59
  this.actualInstance = instance;
60
- } else if (_UpdateCustodialWalletParams["default"].validateJSON(instance)) {
60
+ } else if (!!_UpdateCustodialWalletParams["default"].validateJSON && _UpdateCustodialWalletParams["default"].validateJSON(instance)) {
61
61
  // plain JS object
62
62
  // create UpdateCustodialWalletParams from JS object
63
63
  this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
64
- } else {
65
- return;
64
+ } else if (_UpdateCustodialWalletParams["default"].constructFromObject(instance)) {
65
+ this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
66
66
  }
67
67
  match++;
68
68
  } catch (err) {
@@ -72,12 +72,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
72
72
  try {
73
73
  if (instance instanceof _UpdateMpcWalletParams["default"]) {
74
74
  this.actualInstance = instance;
75
- } else if (_UpdateMpcWalletParams["default"].validateJSON(instance)) {
75
+ } else if (!!_UpdateMpcWalletParams["default"].validateJSON && _UpdateMpcWalletParams["default"].validateJSON(instance)) {
76
76
  // plain JS object
77
77
  // create UpdateMpcWalletParams from JS object
78
78
  this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
79
- } else {
80
- return;
79
+ } else if (_UpdateMpcWalletParams["default"].constructFromObject(instance)) {
80
+ this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
81
81
  }
82
82
  match++;
83
83
  } catch (err) {
@@ -87,12 +87,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
87
87
  try {
88
88
  if (instance instanceof _UpdateSmartContractWalletParams["default"]) {
89
89
  this.actualInstance = instance;
90
- } else if (_UpdateSmartContractWalletParams["default"].validateJSON(instance)) {
90
+ } else if (!!_UpdateSmartContractWalletParams["default"].validateJSON && _UpdateSmartContractWalletParams["default"].validateJSON(instance)) {
91
91
  // plain JS object
92
92
  // create UpdateSmartContractWalletParams from JS object
93
93
  this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
94
- } else {
95
- return;
94
+ } else if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance)) {
95
+ this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
96
96
  }
97
97
  match++;
98
98
  } catch (err) {
@@ -102,12 +102,12 @@ var UpdateWalletParams = /*#__PURE__*/function () {
102
102
  try {
103
103
  if (instance instanceof _UpdateExchangeWalletParams["default"]) {
104
104
  this.actualInstance = instance;
105
- } else if (_UpdateExchangeWalletParams["default"].validateJSON(instance)) {
105
+ } else if (!!_UpdateExchangeWalletParams["default"].validateJSON && _UpdateExchangeWalletParams["default"].validateJSON(instance)) {
106
106
  // plain JS object
107
107
  // create UpdateExchangeWalletParams from JS object
108
108
  this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
109
- } else {
110
- return;
109
+ } else if (_UpdateExchangeWalletParams["default"].constructFromObject(instance)) {
110
+ this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
111
111
  }
112
112
  match++;
113
113
  } catch (err) {
@@ -118,17 +118,23 @@ var UtxoFeeRate = /*#__PURE__*/function () {
118
118
  // validate the optional field `slow`
119
119
  if (data['slow']) {
120
120
  // data not null
121
- _UtxoFeeBasePrice["default"].validateJSON(data['slow']);
121
+ if (!!_UtxoFeeBasePrice["default"].validateJSON) {
122
+ _UtxoFeeBasePrice["default"].validateJSON(data['slow']);
123
+ }
122
124
  }
123
125
  // validate the optional field `recommended`
124
126
  if (data['recommended']) {
125
127
  // data not null
126
- _UtxoFeeBasePrice["default"].validateJSON(data['recommended']);
128
+ if (!!_UtxoFeeBasePrice["default"].validateJSON) {
129
+ _UtxoFeeBasePrice["default"].validateJSON(data['recommended']);
130
+ }
127
131
  }
128
132
  // validate the optional field `fast`
129
133
  if (data['fast']) {
130
134
  // data not null
131
- _UtxoFeeBasePrice["default"].validateJSON(data['fast']);
135
+ if (!!_UtxoFeeBasePrice["default"].validateJSON) {
136
+ _UtxoFeeBasePrice["default"].validateJSON(data['fast']);
137
+ }
132
138
  }
133
139
  return true;
134
140
  }
@@ -61,12 +61,12 @@ var WalletInfo = /*#__PURE__*/function () {
61
61
  try {
62
62
  if (instance instanceof _CustodialWalletInfo["default"]) {
63
63
  this.actualInstance = instance;
64
- } else if (_CustodialWalletInfo["default"].validateJSON(instance)) {
64
+ } else if (!!_CustodialWalletInfo["default"].validateJSON && _CustodialWalletInfo["default"].validateJSON(instance)) {
65
65
  // plain JS object
66
66
  // create CustodialWalletInfo from JS object
67
67
  this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
68
- } else {
69
- return;
68
+ } else if (_CustodialWalletInfo["default"].constructFromObject(instance)) {
69
+ this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
70
70
  }
71
71
  match++;
72
72
  } catch (err) {
@@ -76,12 +76,12 @@ var WalletInfo = /*#__PURE__*/function () {
76
76
  try {
77
77
  if (instance instanceof _MPCWalletInfo["default"]) {
78
78
  this.actualInstance = instance;
79
- } else if (_MPCWalletInfo["default"].validateJSON(instance)) {
79
+ } else if (!!_MPCWalletInfo["default"].validateJSON && _MPCWalletInfo["default"].validateJSON(instance)) {
80
80
  // plain JS object
81
81
  // create MPCWalletInfo from JS object
82
82
  this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
83
- } else {
84
- return;
83
+ } else if (_MPCWalletInfo["default"].constructFromObject(instance)) {
84
+ this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
85
85
  }
86
86
  match++;
87
87
  } catch (err) {
@@ -91,12 +91,12 @@ var WalletInfo = /*#__PURE__*/function () {
91
91
  try {
92
92
  if (instance instanceof _SmartContractWalletInfo["default"]) {
93
93
  this.actualInstance = instance;
94
- } else if (_SmartContractWalletInfo["default"].validateJSON(instance)) {
94
+ } else if (!!_SmartContractWalletInfo["default"].validateJSON && _SmartContractWalletInfo["default"].validateJSON(instance)) {
95
95
  // plain JS object
96
96
  // create SmartContractWalletInfo from JS object
97
97
  this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
98
- } else {
99
- return;
98
+ } else if (_SmartContractWalletInfo["default"].constructFromObject(instance)) {
99
+ this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
100
100
  }
101
101
  match++;
102
102
  } catch (err) {
@@ -106,12 +106,12 @@ var WalletInfo = /*#__PURE__*/function () {
106
106
  try {
107
107
  if (instance instanceof _ExchangeWalletInfo["default"]) {
108
108
  this.actualInstance = instance;
109
- } else if (_ExchangeWalletInfo["default"].validateJSON(instance)) {
109
+ } else if (!!_ExchangeWalletInfo["default"].validateJSON && _ExchangeWalletInfo["default"].validateJSON(instance)) {
110
110
  // plain JS object
111
111
  // create ExchangeWalletInfo from JS object
112
112
  this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
113
- } else {
114
- return;
113
+ } else if (_ExchangeWalletInfo["default"].constructFromObject(instance)) {
114
+ this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
115
115
  }
116
116
  match++;
117
117
  } catch (err) {
@@ -209,12 +209,24 @@ WalletInfo.prototype['org_id'] = undefined;
209
209
  */
210
210
  WalletInfo.prototype['project_id'] = undefined;
211
211
 
212
+ /**
213
+ * The project name.
214
+ * @member {String} project_name
215
+ */
216
+ WalletInfo.prototype['project_name'] = undefined;
217
+
212
218
  /**
213
219
  * The ID of the owning vault.
214
220
  * @member {String} vault_id
215
221
  */
216
222
  WalletInfo.prototype['vault_id'] = undefined;
217
223
 
224
+ /**
225
+ * The vault name.
226
+ * @member {String} vault_name
227
+ */
228
+ WalletInfo.prototype['vault_name'] = undefined;
229
+
218
230
  /**
219
231
  * The API key of your exchange account.
220
232
  * @member {String} apikey
@@ -134,7 +134,9 @@ var WebhookEvent = /*#__PURE__*/function () {
134
134
  // validate the optional field `data`
135
135
  if (data['data']) {
136
136
  // data not null
137
- _WebhookEventData["default"].validateJSON(data['data']);
137
+ if (!!_WebhookEventData["default"].validateJSON) {
138
+ _WebhookEventData["default"].validateJSON(data['data']);
139
+ }
138
140
  }
139
141
  return true;
140
142
  }
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SourceGroup = _interopRequireDefault(require("./SourceGroup"));
9
+ var _TSSRequestStatus = _interopRequireDefault(require("./TSSRequestStatus"));
10
+ var _TSSRequestType = _interopRequireDefault(require("./TSSRequestType"));
11
+ var _TSSRequestWebhookEventData = _interopRequireDefault(require("./TSSRequestWebhookEventData"));
8
12
  var _TransactionBlockInfo = _interopRequireDefault(require("./TransactionBlockInfo"));
9
13
  var _TransactionDestination = _interopRequireDefault(require("./TransactionDestination"));
10
14
  var _TransactionFee = _interopRequireDefault(require("./TransactionFee"));
@@ -13,9 +17,7 @@ var _TransactionRawTxInfo = _interopRequireDefault(require("./TransactionRawTxIn
13
17
  var _TransactionReplacement = _interopRequireDefault(require("./TransactionReplacement"));
14
18
  var _TransactionResult = _interopRequireDefault(require("./TransactionResult"));
15
19
  var _TransactionSource = _interopRequireDefault(require("./TransactionSource"));
16
- var _TransactionStatus = _interopRequireDefault(require("./TransactionStatus"));
17
20
  var _TransactionSubStatus = _interopRequireDefault(require("./TransactionSubStatus"));
18
- var _TransactionType = _interopRequireDefault(require("./TransactionType"));
19
21
  var _TransactionWebhookEventData = _interopRequireDefault(require("./TransactionWebhookEventData"));
20
22
  var _WebhookEventData;
21
23
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -43,7 +45,7 @@ var WebhookEventData = /*#__PURE__*/function () {
43
45
  /**
44
46
  * Constructs a new <code>WebhookEventData</code>.
45
47
  * @alias module:model/WebhookEventData
46
- * @param {(module:model/TransactionWebhookEventData)} instance The actual instance to initialize WebhookEventData.
48
+ * @param {(module:model/TSSRequestWebhookEventData|module:model/TransactionWebhookEventData)} instance The actual instance to initialize WebhookEventData.
47
49
  */
48
50
  function WebhookEventData() {
49
51
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -64,25 +66,40 @@ var WebhookEventData = /*#__PURE__*/function () {
64
66
  try {
65
67
  if (instance instanceof _TransactionWebhookEventData["default"]) {
66
68
  this.actualInstance = instance;
67
- } else if (_TransactionWebhookEventData["default"].validateJSON(instance)) {
69
+ } else if (!!_TransactionWebhookEventData["default"].validateJSON && _TransactionWebhookEventData["default"].validateJSON(instance)) {
68
70
  // plain JS object
69
71
  // create TransactionWebhookEventData from JS object
70
72
  this.actualInstance = _TransactionWebhookEventData["default"].constructFromObject(instance);
71
- } else {
72
- return;
73
+ } else if (_TransactionWebhookEventData["default"].constructFromObject(instance)) {
74
+ this.actualInstance = _TransactionWebhookEventData["default"].constructFromObject(instance);
73
75
  }
74
76
  match++;
75
77
  } catch (err) {
76
78
  // json data failed to deserialize into TransactionWebhookEventData
77
79
  errorMessages.push("Failed to construct TransactionWebhookEventData: " + err);
78
80
  }
81
+ try {
82
+ if (instance instanceof _TSSRequestWebhookEventData["default"]) {
83
+ this.actualInstance = instance;
84
+ } else if (!!_TSSRequestWebhookEventData["default"].validateJSON && _TSSRequestWebhookEventData["default"].validateJSON(instance)) {
85
+ // plain JS object
86
+ // create TSSRequestWebhookEventData from JS object
87
+ this.actualInstance = _TSSRequestWebhookEventData["default"].constructFromObject(instance);
88
+ } else if (_TSSRequestWebhookEventData["default"].constructFromObject(instance)) {
89
+ this.actualInstance = _TSSRequestWebhookEventData["default"].constructFromObject(instance);
90
+ }
91
+ match++;
92
+ } catch (err) {
93
+ // json data failed to deserialize into TSSRequestWebhookEventData
94
+ errorMessages.push("Failed to construct TSSRequestWebhookEventData: " + err);
95
+ }
79
96
 
80
97
  // if (match > 1) {
81
- // throw new Error("Multiple matches found constructing `WebhookEventData` with oneOf schemas TransactionWebhookEventData. Input: " + JSON.stringify(instance));
98
+ // throw new Error("Multiple matches found constructing `WebhookEventData` with oneOf schemas TSSRequestWebhookEventData, TransactionWebhookEventData. Input: " + JSON.stringify(instance));
82
99
  // } else
83
100
  if (match === 0) {
84
101
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
85
- // throw new Error("No match found constructing `WebhookEventData` with oneOf schemas TransactionWebhookEventData. Details: " +
102
+ // throw new Error("No match found constructing `WebhookEventData` with oneOf schemas TSSRequestWebhookEventData, TransactionWebhookEventData. Details: " +
86
103
  // errorMessages.join(", "));
87
104
  return;
88
105
  } else {// only 1 match
@@ -101,16 +118,16 @@ var WebhookEventData = /*#__PURE__*/function () {
101
118
  key: "getActualInstance",
102
119
  value:
103
120
  /**
104
- * Gets the actual instance, which can be <code>TransactionWebhookEventData</code>.
105
- * @return {(module:model/TransactionWebhookEventData)} The actual instance.
121
+ * Gets the actual instance, which can be <code>TSSRequestWebhookEventData</code>, <code>TransactionWebhookEventData</code>.
122
+ * @return {(module:model/TSSRequestWebhookEventData|module:model/TransactionWebhookEventData)} The actual instance.
106
123
  */
107
124
  function getActualInstance() {
108
125
  return this.actualInstance;
109
126
  }
110
127
 
111
128
  /**
112
- * Sets the actual instance, which can be <code>TransactionWebhookEventData</code>.
113
- * @param {(module:model/TransactionWebhookEventData)} obj The actual instance.
129
+ * Sets the actual instance, which can be <code>TSSRequestWebhookEventData</code>, <code>TransactionWebhookEventData</code>.
130
+ * @param {(module:model/TSSRequestWebhookEventData|module:model/TransactionWebhookEventData)} obj The actual instance.
114
131
  */
115
132
  }, {
116
133
  key: "setActualInstance",
@@ -125,7 +142,7 @@ var WebhookEventData = /*#__PURE__*/function () {
125
142
  }]);
126
143
  }();
127
144
  /**
128
- * The data type of the event. When `data_type` is `Transaction`, it means the event uses the `transaction` schema as its data type.
145
+ * The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
129
146
  * @member {module:model/WebhookEventData.DataTypeEnum} data_type
130
147
  */
131
148
  _WebhookEventData = WebhookEventData;
@@ -164,12 +181,12 @@ WebhookEventData.prototype['request_id'] = undefined;
164
181
  WebhookEventData.prototype['wallet_id'] = undefined;
165
182
 
166
183
  /**
167
- * @member {module:model/TransactionType} type
184
+ * @member {module:model/TSSRequestType} type
168
185
  */
169
186
  WebhookEventData.prototype['type'] = undefined;
170
187
 
171
188
  /**
172
- * @member {module:model/TransactionStatus} status
189
+ * @member {module:model/TSSRequestStatus} status
173
190
  */
174
191
  WebhookEventData.prototype['status'] = undefined;
175
192
 
@@ -273,7 +290,7 @@ WebhookEventData.prototype['replacement'] = undefined;
273
290
  WebhookEventData.prototype['category'] = undefined;
274
291
 
275
292
  /**
276
- * The description for your transaction.
293
+ * The description of the TSS request.
277
294
  * @member {String} description
278
295
  */
279
296
  WebhookEventData.prototype['description'] = undefined;
@@ -285,7 +302,7 @@ WebhookEventData.prototype['description'] = undefined;
285
302
  WebhookEventData.prototype['is_loop'] = undefined;
286
303
 
287
304
  /**
288
- * The time when the transaction was created, in Unix timestamp format, measured in milliseconds.
305
+ * The TSS request's creation time in Unix timestamp format, measured in milliseconds.
289
306
  * @member {Number} created_timestamp
290
307
  */
291
308
  WebhookEventData.prototype['created_timestamp'] = undefined;
@@ -295,5 +312,22 @@ WebhookEventData.prototype['created_timestamp'] = undefined;
295
312
  * @member {Number} updated_timestamp
296
313
  */
297
314
  WebhookEventData.prototype['updated_timestamp'] = undefined;
298
- WebhookEventData.OneOf = ["TransactionWebhookEventData"];
315
+
316
+ /**
317
+ * The TSS request ID.
318
+ * @member {String} tss_request_id
319
+ */
320
+ WebhookEventData.prototype['tss_request_id'] = undefined;
321
+
322
+ /**
323
+ * @member {module:model/SourceGroup} source_key_share_holder_group
324
+ */
325
+ WebhookEventData.prototype['source_key_share_holder_group'] = undefined;
326
+
327
+ /**
328
+ * The target key share holder group ID.
329
+ * @member {String} target_key_share_holder_group_id
330
+ */
331
+ WebhookEventData.prototype['target_key_share_holder_group_id'] = undefined;
332
+ WebhookEventData.OneOf = ["TSSRequestWebhookEventData", "TransactionWebhookEventData"];
299
333
  var _default = exports["default"] = WebhookEventData;