@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.
- package/README.md +16 -3
- package/dist/ApiClient.js +1 -1
- package/dist/api/OAuthApi.js +16 -15
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +123 -12
- package/dist/api/WalletsExchangeWalletApi.js +254 -0
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/index.js +56 -0
- package/dist/model/Activity.js +3 -1
- package/dist/model/AddressInfo.js +1 -1
- package/dist/model/AddressTransferDestination.js +6 -4
- package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/AssetBalance.js +3 -1
- package/dist/model/AssetInfo.js +2 -2
- package/dist/model/BabylonStakeExtra.js +9 -0
- package/dist/model/CheckAddressValidity200Response.js +2 -2
- package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
- package/dist/model/CoboSafeDelegate.js +3 -3
- package/dist/model/ContractCallDestination.js +4 -4
- package/dist/model/ContractCallParams.js +9 -3
- package/dist/model/ContractCallSource.js +6 -6
- package/dist/model/CreateSafeWalletParams.js +3 -1
- package/dist/model/CreateSmartContractWalletParams.js +3 -3
- package/dist/model/CreateStakeActivity.js +23 -4
- package/dist/model/CreateStakeActivityExtra.js +15 -9
- package/dist/model/CreateTssRequestRequest.js +16 -1
- package/dist/model/CreateUnstakeActivity.js +16 -1
- package/dist/model/CreateWalletParams.js +9 -9
- package/dist/model/CreateWithdrawActivity.js +16 -1
- package/dist/model/CreatedWalletInfo.js +21 -9
- package/dist/model/EstimateContractCallFeeParams.js +6 -2
- package/dist/model/EstimateFeeParams.js +6 -6
- package/dist/model/EstimateStakeFee.js +28 -4
- package/dist/model/EstimateTransferFeeParams.js +6 -2
- package/dist/model/EstimateUnstakeFee.js +21 -1
- package/dist/model/EstimateWithdrawFee.js +21 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +9 -3
- package/dist/model/EstimatedEvmLegacyFee.js +9 -3
- package/dist/model/EstimatedFee.js +12 -12
- package/dist/model/EstimatedUtxoFee.js +9 -3
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/EvmEip1559FeeRate.js +9 -3
- package/dist/model/EvmLegacyFeeRate.js +9 -3
- package/dist/model/ExchangeId.js +5 -0
- package/dist/model/ExchangeTransferDestination.js +16 -16
- package/dist/model/ExchangeTransferSource.js +14 -14
- package/dist/model/FeeRate.js +12 -12
- package/dist/model/GetToken200Response.js +4 -4
- package/dist/model/KeyShareHolder.js +13 -0
- package/dist/model/ListAddresses200Response.js +3 -1
- package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
- package/dist/model/ListExchanges200ResponseInner.js +122 -0
- package/dist/model/ListKeyShareHolderGroups200Response.js +3 -1
- package/dist/model/ListMpcProjects200Response.js +3 -1
- package/dist/model/ListMpcVaults200Response.js +3 -1
- package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
- package/dist/model/ListSupportedChains200Response.js +3 -1
- package/dist/model/ListSupportedTokens200Response.js +3 -1
- package/dist/model/ListTokenBalancesForAddress200Response.js +3 -1
- package/dist/model/ListTransactions200Response.js +3 -1
- package/dist/model/ListTssRequests200Response.js +3 -1
- package/dist/model/ListUtxos200Response.js +3 -1
- package/dist/model/ListWallets200Response.js +3 -1
- package/dist/model/ListWebhookEndpoints200Response.js +3 -1
- package/dist/model/ListWebhookEventLogs200Response.js +3 -1
- package/dist/model/ListWebhookEvents200Response.js +3 -1
- package/dist/model/MPCWalletInfo.js +26 -0
- package/dist/model/MaxTransferableValue.js +3 -1
- package/dist/model/MessageSignDestination.js +6 -6
- package/dist/model/MessageSignParams.js +6 -2
- package/dist/model/MessageSignSource.js +3 -3
- package/dist/model/PoolDetailsAllOfValidatorsInfo.js +6 -6
- package/dist/model/RefreshToken200Response.js +135 -0
- package/dist/model/RefreshTokenRequest.js +2 -2
- package/dist/model/SafeContractCallSource.js +3 -1
- package/dist/model/SafeTransferSource.js +3 -1
- package/dist/model/SafeWallet.js +3 -1
- package/dist/model/SmartContractWalletInfo.js +3 -3
- package/dist/model/SmartContractWalletType.js +2 -2
- package/dist/model/StakingSource.js +6 -6
- package/dist/model/Stakings.js +3 -1
- package/dist/model/SubWalletAssetBalance.js +13 -11
- package/dist/model/TSSRequest.js +26 -2
- package/dist/model/TSSRequestWebhookEventData.js +263 -0
- package/dist/model/TokenBalance.js +3 -1
- package/dist/model/Transaction.js +21 -7
- package/dist/model/TransactionDepositFromWalletSource.js +6 -6
- package/dist/model/TransactionDepositToAddressDestination.js +2 -2
- package/dist/model/TransactionDepositToWalletDestination.js +9 -9
- package/dist/model/TransactionDestination.js +26 -26
- package/dist/model/TransactionDetail.js +21 -7
- package/dist/model/TransactionDetails.js +24 -8
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +6 -6
- package/dist/model/TransactionFee.js +12 -12
- package/dist/model/TransactionMPCWalletSource.js +13 -0
- package/dist/model/TransactionRbf.js +6 -2
- package/dist/model/TransactionRbfSource.js +3 -3
- package/dist/model/TransactionRequestFee.js +12 -12
- package/dist/model/TransactionResult.js +3 -3
- package/dist/model/TransactionSmartContractSafeWalletSource.js +3 -1
- package/dist/model/TransactionSource.js +29 -23
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTransferToAddressDestination.js +3 -1
- package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +9 -9
- package/dist/model/TransactionWebhookEventData.js +29 -10
- package/dist/model/TransferDestination.js +12 -12
- package/dist/model/TransferParams.js +11 -5
- package/dist/model/TransferSource.js +15 -15
- package/dist/model/UpdateWalletParams.js +12 -12
- package/dist/model/UtxoFeeRate.js +9 -3
- package/dist/model/WalletInfo.js +24 -12
- package/dist/model/WebhookEvent.js +3 -1
- package/dist/model/WebhookEventData.js +52 -18
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventLog.js +3 -1
- package/dist/model/WebhookEventType.js +24 -4
- package/docs/AddressInfo.md +1 -1
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationAccountOutput.md +1 -1
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
- package/docs/AssetInfo.md +1 -1
- package/docs/BabylonStakeExtra.md +1 -0
- package/docs/CheckAddressValidity200Response.md +1 -1
- package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
- package/docs/ContractCallDestination.md +1 -1
- package/docs/CreateStakeActivity.md +1 -0
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateTssRequestRequest.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateWithdrawActivity.md +1 -0
- package/docs/CreatedWalletInfo.md +2 -0
- package/docs/DevelopersWebhooksApi.md +78 -69
- package/docs/EstimateStakeFee.md +1 -0
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimateWithdrawFee.md +1 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeId.md +2 -0
- package/docs/ExchangeTransferDestination.md +2 -2
- package/docs/ExchangeTransferSource.md +1 -1
- package/docs/GetToken200Response.md +4 -4
- package/docs/KeyShareHolder.md +1 -0
- package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
- package/docs/ListExchanges200ResponseInner.md +10 -0
- package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
- package/docs/MPCWalletInfo.md +2 -0
- package/docs/OAuthApi.md +26 -24
- package/docs/RefreshToken200Response.md +13 -0
- package/docs/RefreshTokenRequest.md +2 -2
- package/docs/SmartContractWalletType.md +1 -1
- package/docs/SubWalletAssetBalance.md +2 -2
- package/docs/TSSRequest.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +29 -0
- package/docs/TransactionDepositFromWalletSource.md +1 -1
- package/docs/TransactionDepositToAddressDestination.md +1 -1
- package/docs/TransactionDepositToWalletDestination.md +2 -2
- package/docs/TransactionDestination.md +3 -3
- package/docs/TransactionEvmContractDestination.md +1 -1
- package/docs/TransactionExchangeWalletSource.md +1 -1
- package/docs/TransactionMPCWalletSource.md +1 -0
- package/docs/TransactionSource.md +2 -1
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
- package/docs/TransactionTransferToWalletDestination.md +2 -2
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +98 -88
- package/docs/TransferDestination.md +4 -4
- package/docs/TransferParams.md +1 -1
- package/docs/TransferSource.md +1 -1
- package/docs/WalletInfo.md +2 -0
- package/docs/WalletsApi.md +316 -187
- package/docs/WalletsExchangeWalletApi.md +230 -0
- package/docs/WalletsMPCWalletsApi.md +153 -135
- package/docs/WebhookEventData.md +10 -5
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +12 -4
- 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}
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
185
|
-
* @member {String}
|
|
184
|
+
* The trading account type.
|
|
185
|
+
* @member {String} trading_account_type
|
|
186
186
|
*/
|
|
187
|
-
TransferDestination.prototype['
|
|
187
|
+
TransferDestination.prototype['trading_account_type'] = undefined;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* The
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
210
|
-
* @member {String}
|
|
209
|
+
* The trading account type.
|
|
210
|
+
* @member {String} trading_account_type
|
|
211
211
|
*/
|
|
212
|
-
TransferSource.prototype['
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
135
|
+
if (!!_UtxoFeeBasePrice["default"].validateJSON) {
|
|
136
|
+
_UtxoFeeBasePrice["default"].validateJSON(data['fast']);
|
|
137
|
+
}
|
|
132
138
|
}
|
|
133
139
|
return true;
|
|
134
140
|
}
|
package/dist/model/WalletInfo.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
*
|
|
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/
|
|
184
|
+
* @member {module:model/TSSRequestType} type
|
|
168
185
|
*/
|
|
169
186
|
WebhookEventData.prototype['type'] = undefined;
|
|
170
187
|
|
|
171
188
|
/**
|
|
172
|
-
* @member {module:model/
|
|
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
|
|
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
|
|
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
|
-
|
|
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;
|