@cobo/cobo-waas2 1.1.2 → 1.2.1

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 (143) hide show
  1. package/README.md +16 -3
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +640 -0
  4. package/dist/api/OAuthApi.js +16 -15
  5. package/dist/api/TransactionsApi.js +18 -18
  6. package/dist/api/WalletsApi.js +123 -12
  7. package/dist/api/WalletsExchangeWalletApi.js +254 -0
  8. package/dist/api/WalletsMPCWalletsApi.js +8 -8
  9. package/dist/index.js +56 -0
  10. package/dist/model/AddressInfo.js +1 -1
  11. package/dist/model/AddressTransferDestination.js +3 -3
  12. package/dist/model/AddressTransferDestinationAccountOutput.js +2 -2
  13. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +1 -1
  14. package/dist/model/AssetInfo.js +2 -2
  15. package/dist/model/BabylonStakeExtra.js +9 -0
  16. package/dist/model/CheckAddressValidity200Response.js +2 -2
  17. package/dist/model/CheckAddressesValidity200ResponseInner.js +121 -0
  18. package/dist/model/CheckLoopTransfers200ResponseInner.js +96 -0
  19. package/dist/model/CoboSafeDelegate.js +27 -2
  20. package/dist/model/ContractCallDestination.js +24 -3
  21. package/dist/model/ContractCallSource.js +41 -4
  22. package/dist/model/CreateSmartContractWalletParams.js +23 -2
  23. package/dist/model/CreateStakeActivity.js +14 -1
  24. package/dist/model/CreateStakeActivityExtra.js +57 -6
  25. package/dist/model/CreateTssRequestRequest.js +13 -0
  26. package/dist/model/CreateUnstakeActivity.js +13 -0
  27. package/dist/model/CreateWalletParams.js +51 -6
  28. package/dist/model/CreateWithdrawActivity.js +13 -0
  29. package/dist/model/CreatedWalletInfo.js +63 -6
  30. package/dist/model/EstimateFeeParams.js +37 -4
  31. package/dist/model/EstimateStakeFee.js +19 -1
  32. package/dist/model/EstimateUnstakeFee.js +18 -0
  33. package/dist/model/EstimateWithdrawFee.js +18 -0
  34. package/dist/model/EstimatedFee.js +65 -8
  35. package/dist/model/EvmContractCallDestination.js +1 -1
  36. package/dist/model/ExchangeId.js +5 -0
  37. package/dist/model/ExchangeTransferDestination.js +16 -16
  38. package/dist/model/ExchangeTransferSource.js +14 -14
  39. package/dist/model/FeeRate.js +65 -8
  40. package/dist/model/GetToken200Response.js +4 -4
  41. package/dist/model/KeyShareHolder.js +13 -0
  42. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +123 -0
  43. package/dist/model/ListExchanges200ResponseInner.js +122 -0
  44. package/dist/model/ListSupportedAssetsForExchange200Response.js +123 -0
  45. package/dist/model/MPCWalletInfo.js +26 -0
  46. package/dist/model/MessageSignDestination.js +37 -4
  47. package/dist/model/MessageSignSource.js +27 -2
  48. package/dist/model/PoolDetailsAllOfValidatorsInfo.js +20 -4
  49. package/dist/model/RefreshToken200Response.js +135 -0
  50. package/dist/model/RefreshTokenRequest.js +2 -2
  51. package/dist/model/SmartContractWalletInfo.js +23 -2
  52. package/dist/model/SmartContractWalletType.js +2 -2
  53. package/dist/model/StakingSource.js +41 -4
  54. package/dist/model/SubWalletAssetBalance.js +10 -10
  55. package/dist/model/TSSRequest.js +23 -1
  56. package/dist/model/TSSRequestWebhookEventData.js +263 -0
  57. package/dist/model/TransactionDepositFromWalletSource.js +6 -6
  58. package/dist/model/TransactionDepositToAddressDestination.js +2 -2
  59. package/dist/model/TransactionDepositToWalletDestination.js +9 -9
  60. package/dist/model/TransactionDestination.js +112 -19
  61. package/dist/model/TransactionEvmContractDestination.js +1 -1
  62. package/dist/model/TransactionExchangeWalletSource.js +6 -6
  63. package/dist/model/TransactionFee.js +65 -8
  64. package/dist/model/TransactionMPCWalletSource.js +13 -0
  65. package/dist/model/TransactionRbfSource.js +27 -2
  66. package/dist/model/TransactionRequestFee.js +65 -8
  67. package/dist/model/TransactionResult.js +23 -2
  68. package/dist/model/TransactionSource.js +123 -16
  69. package/dist/model/TransactionSubStatus.js +5 -0
  70. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +1 -1
  71. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +1 -1
  72. package/dist/model/TransactionTransferToWalletDestination.js +9 -9
  73. package/dist/model/TransactionWebhookEventData.js +8 -3
  74. package/dist/model/TransferDestination.js +43 -10
  75. package/dist/model/TransferParams.js +2 -2
  76. package/dist/model/TransferSource.js +76 -11
  77. package/dist/model/UpdateWalletParams.js +65 -8
  78. package/dist/model/WalletInfo.js +77 -8
  79. package/dist/model/WebhookEventData.js +84 -17
  80. package/dist/model/WebhookEventDataType.js +7 -2
  81. package/dist/model/WebhookEventType.js +24 -4
  82. package/docs/AddressInfo.md +1 -1
  83. package/docs/AddressTransferDestination.md +2 -2
  84. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  85. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  86. package/docs/AssetInfo.md +1 -1
  87. package/docs/BabylonStakeExtra.md +1 -0
  88. package/docs/CheckAddressValidity200Response.md +1 -1
  89. package/docs/CheckAddressesValidity200ResponseInner.md +10 -0
  90. package/docs/CheckLoopTransfers200ResponseInner.md +10 -0
  91. package/docs/ContractCallDestination.md +1 -1
  92. package/docs/CreateStakeActivity.md +1 -0
  93. package/docs/CreateStakeActivityExtra.md +1 -0
  94. package/docs/CreateTssRequestRequest.md +1 -0
  95. package/docs/CreateUnstakeActivity.md +1 -0
  96. package/docs/CreateWithdrawActivity.md +1 -0
  97. package/docs/CreatedWalletInfo.md +2 -0
  98. package/docs/DevelopersWebhooksApi.md +78 -69
  99. package/docs/EstimateStakeFee.md +1 -0
  100. package/docs/EstimateUnstakeFee.md +1 -0
  101. package/docs/EstimateWithdrawFee.md +1 -0
  102. package/docs/EvmContractCallDestination.md +1 -1
  103. package/docs/ExchangeId.md +2 -0
  104. package/docs/ExchangeTransferDestination.md +2 -2
  105. package/docs/ExchangeTransferSource.md +1 -1
  106. package/docs/GetToken200Response.md +4 -4
  107. package/docs/KeyShareHolder.md +1 -0
  108. package/docs/ListAssetBalancesForExchangeWallet200Response.md +10 -0
  109. package/docs/ListExchanges200ResponseInner.md +10 -0
  110. package/docs/ListSupportedAssetsForExchange200Response.md +10 -0
  111. package/docs/MPCWalletInfo.md +2 -0
  112. package/docs/OAuthApi.md +26 -24
  113. package/docs/RefreshToken200Response.md +13 -0
  114. package/docs/RefreshTokenRequest.md +2 -2
  115. package/docs/SmartContractWalletType.md +1 -1
  116. package/docs/SubWalletAssetBalance.md +2 -2
  117. package/docs/TSSRequest.md +2 -0
  118. package/docs/TSSRequestWebhookEventData.md +29 -0
  119. package/docs/TransactionDepositFromWalletSource.md +1 -1
  120. package/docs/TransactionDepositToAddressDestination.md +1 -1
  121. package/docs/TransactionDepositToWalletDestination.md +2 -2
  122. package/docs/TransactionDestination.md +3 -3
  123. package/docs/TransactionEvmContractDestination.md +1 -1
  124. package/docs/TransactionExchangeWalletSource.md +1 -1
  125. package/docs/TransactionMPCWalletSource.md +1 -0
  126. package/docs/TransactionSource.md +2 -1
  127. package/docs/TransactionSubStatus.md +2 -0
  128. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  129. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  130. package/docs/TransactionTransferToWalletDestination.md +2 -2
  131. package/docs/TransactionWebhookEventData.md +3 -1
  132. package/docs/TransactionsApi.md +98 -88
  133. package/docs/TransferDestination.md +4 -4
  134. package/docs/TransferParams.md +1 -1
  135. package/docs/TransferSource.md +1 -1
  136. package/docs/WalletInfo.md +2 -0
  137. package/docs/WalletsApi.md +316 -187
  138. package/docs/WalletsExchangeWalletApi.md +230 -0
  139. package/docs/WalletsMPCWalletsApi.md +153 -135
  140. package/docs/WebhookEventData.md +10 -5
  141. package/docs/WebhookEventDataType.md +3 -1
  142. package/docs/WebhookEventType.md +12 -4
  143. 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}
@@ -315,7 +315,7 @@ var TransactionWebhookEventData = /*#__PURE__*/function () {
315
315
  TransactionWebhookEventData.RequiredProperties = ["data_type", "transaction_id", "wallet_id", "status", "source", "destination", "initiator_type"];
316
316
 
317
317
  /**
318
- * 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.
319
319
  * @member {module:model/TransactionWebhookEventData.DataTypeEnum} data_type
320
320
  */
321
321
  TransactionWebhookEventData.prototype['data_type'] = undefined;
@@ -479,7 +479,7 @@ TransactionWebhookEventData.prototype['updated_timestamp'] = undefined;
479
479
 
480
480
  // Implement WebhookEventDataType interface:
481
481
  /**
482
- * 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.
483
483
  * @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
484
484
  */
485
485
  _WebhookEventDataType["default"].prototype['data_type'] = undefined;
@@ -625,6 +625,11 @@ TransactionWebhookEventData['DataTypeEnum'] = {
625
625
  * @const
626
626
  */
627
627
  "Transaction": "Transaction",
628
+ /**
629
+ * value: "TSSRequest"
630
+ * @const
631
+ */
632
+ "TSSRequest": "TSSRequest",
628
633
  /**
629
634
  * value: "unknown_default_open_api"
630
635
  * @const
@@ -54,6 +54,23 @@ var TransferDestination = /*#__PURE__*/function () {
54
54
  }
55
55
  var match = 0;
56
56
  var errorMessages = [];
57
+ var discriminatorValue = instance["destination_type"];
58
+ if (discriminatorValue) {
59
+ switch (discriminatorValue) {
60
+ case "Address":
61
+ this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
62
+ match++;
63
+ break;
64
+ case "ExchangeWallet":
65
+ this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
66
+ match++;
67
+ break;
68
+ default:
69
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
70
+ break;
71
+ }
72
+ return;
73
+ }
57
74
  try {
58
75
  if (instance instanceof _AddressTransferDestination["default"]) {
59
76
  this.actualInstance = instance;
@@ -61,8 +78,16 @@ var TransferDestination = /*#__PURE__*/function () {
61
78
  // plain JS object
62
79
  // create AddressTransferDestination from JS object
63
80
  this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
64
- } else if (_AddressTransferDestination["default"].constructFromObject(instance)) {
65
- this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
81
+ } else {
82
+ if (_AddressTransferDestination["default"].constructFromObject(instance)) {
83
+ if (!!_AddressTransferDestination["default"].constructFromObject(instance).toJSON) {
84
+ if (_AddressTransferDestination["default"].constructFromObject(instance).toJSON()) {
85
+ this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
86
+ }
87
+ } else {
88
+ this.actualInstance = _AddressTransferDestination["default"].constructFromObject(instance);
89
+ }
90
+ }
66
91
  }
67
92
  match++;
68
93
  } catch (err) {
@@ -76,8 +101,16 @@ var TransferDestination = /*#__PURE__*/function () {
76
101
  // plain JS object
77
102
  // create ExchangeTransferDestination from JS object
78
103
  this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
79
- } else if (_ExchangeTransferDestination["default"].constructFromObject(instance)) {
80
- this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
104
+ } else {
105
+ if (_ExchangeTransferDestination["default"].constructFromObject(instance)) {
106
+ if (!!_ExchangeTransferDestination["default"].constructFromObject(instance).toJSON) {
107
+ if (_ExchangeTransferDestination["default"].constructFromObject(instance).toJSON()) {
108
+ this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
109
+ }
110
+ } else {
111
+ this.actualInstance = _ExchangeTransferDestination["default"].constructFromObject(instance);
112
+ }
113
+ }
81
114
  }
82
115
  match++;
83
116
  } catch (err) {
@@ -163,13 +196,13 @@ TransferDestination.prototype['utxo_outputs'] = undefined;
163
196
  TransferDestination.prototype['change_address'] = undefined;
164
197
 
165
198
  /**
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.
199
+ * 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
200
  * @member {Boolean} force_internal
168
201
  */
169
202
  TransferDestination.prototype['force_internal'] = undefined;
170
203
 
171
204
  /**
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.
205
+ * 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
206
  * @member {Boolean} force_external
174
207
  */
175
208
  TransferDestination.prototype['force_external'] = undefined;
@@ -181,13 +214,13 @@ TransferDestination.prototype['force_external'] = undefined;
181
214
  TransferDestination.prototype['wallet_id'] = undefined;
182
215
 
183
216
  /**
184
- * The exchange trading account or the sub-wallet ID.
185
- * @member {String} sub_wallet_id
217
+ * The trading account type.
218
+ * @member {String} trading_account_type
186
219
  */
187
- TransferDestination.prototype['sub_wallet_id'] = undefined;
220
+ TransferDestination.prototype['trading_account_type'] = undefined;
188
221
 
189
222
  /**
190
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
223
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
191
224
  * @member {String} amount
192
225
  */
193
226
  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) {
@@ -175,7 +175,7 @@ TransferParams.prototype['request_id'] = undefined;
175
175
  TransferParams.prototype['source'] = undefined;
176
176
 
177
177
  /**
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).
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.
179
179
  * @member {String} token_id
180
180
  */
181
181
  TransferParams.prototype['token_id'] = undefined;
@@ -56,6 +56,39 @@ var TransferSource = /*#__PURE__*/function () {
56
56
  }
57
57
  var match = 0;
58
58
  var errorMessages = [];
59
+ var discriminatorValue = instance["source_type"];
60
+ if (discriminatorValue) {
61
+ switch (discriminatorValue) {
62
+ case "Asset":
63
+ this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
64
+ match++;
65
+ break;
66
+ case "Main":
67
+ this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
68
+ match++;
69
+ break;
70
+ case "Org-Controlled":
71
+ this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
72
+ match++;
73
+ break;
74
+ case "Safe{Wallet}":
75
+ this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
76
+ match++;
77
+ break;
78
+ case "Sub":
79
+ this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
80
+ match++;
81
+ break;
82
+ case "User-Controlled":
83
+ this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
84
+ match++;
85
+ break;
86
+ default:
87
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
88
+ break;
89
+ }
90
+ return;
91
+ }
59
92
  try {
60
93
  if (instance instanceof _CustodialTransferSource["default"]) {
61
94
  this.actualInstance = instance;
@@ -63,8 +96,16 @@ var TransferSource = /*#__PURE__*/function () {
63
96
  // plain JS object
64
97
  // create CustodialTransferSource from JS object
65
98
  this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
66
- } else if (_CustodialTransferSource["default"].constructFromObject(instance)) {
67
- this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
99
+ } else {
100
+ if (_CustodialTransferSource["default"].constructFromObject(instance)) {
101
+ if (!!_CustodialTransferSource["default"].constructFromObject(instance).toJSON) {
102
+ if (_CustodialTransferSource["default"].constructFromObject(instance).toJSON()) {
103
+ this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
104
+ }
105
+ } else {
106
+ this.actualInstance = _CustodialTransferSource["default"].constructFromObject(instance);
107
+ }
108
+ }
68
109
  }
69
110
  match++;
70
111
  } catch (err) {
@@ -78,8 +119,16 @@ var TransferSource = /*#__PURE__*/function () {
78
119
  // plain JS object
79
120
  // create MpcTransferSource from JS object
80
121
  this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
81
- } else if (_MpcTransferSource["default"].constructFromObject(instance)) {
82
- this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
122
+ } else {
123
+ if (_MpcTransferSource["default"].constructFromObject(instance)) {
124
+ if (!!_MpcTransferSource["default"].constructFromObject(instance).toJSON) {
125
+ if (_MpcTransferSource["default"].constructFromObject(instance).toJSON()) {
126
+ this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
127
+ }
128
+ } else {
129
+ this.actualInstance = _MpcTransferSource["default"].constructFromObject(instance);
130
+ }
131
+ }
83
132
  }
84
133
  match++;
85
134
  } catch (err) {
@@ -93,8 +142,16 @@ var TransferSource = /*#__PURE__*/function () {
93
142
  // plain JS object
94
143
  // create SafeTransferSource from JS object
95
144
  this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
96
- } else if (_SafeTransferSource["default"].constructFromObject(instance)) {
97
- this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
145
+ } else {
146
+ if (_SafeTransferSource["default"].constructFromObject(instance)) {
147
+ if (!!_SafeTransferSource["default"].constructFromObject(instance).toJSON) {
148
+ if (_SafeTransferSource["default"].constructFromObject(instance).toJSON()) {
149
+ this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
150
+ }
151
+ } else {
152
+ this.actualInstance = _SafeTransferSource["default"].constructFromObject(instance);
153
+ }
154
+ }
98
155
  }
99
156
  match++;
100
157
  } catch (err) {
@@ -108,8 +165,16 @@ var TransferSource = /*#__PURE__*/function () {
108
165
  // plain JS object
109
166
  // create ExchangeTransferSource from JS object
110
167
  this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
111
- } else if (_ExchangeTransferSource["default"].constructFromObject(instance)) {
112
- this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
168
+ } else {
169
+ if (_ExchangeTransferSource["default"].constructFromObject(instance)) {
170
+ if (!!_ExchangeTransferSource["default"].constructFromObject(instance).toJSON) {
171
+ if (_ExchangeTransferSource["default"].constructFromObject(instance).toJSON()) {
172
+ this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
173
+ }
174
+ } else {
175
+ this.actualInstance = _ExchangeTransferSource["default"].constructFromObject(instance);
176
+ }
177
+ }
113
178
  }
114
179
  match++;
115
180
  } catch (err) {
@@ -206,9 +271,9 @@ TransferSource.prototype['excluded_utxos'] = undefined;
206
271
  TransferSource.prototype['delegate'] = undefined;
207
272
 
208
273
  /**
209
- * The exchange trading account or the sub-wallet ID.
210
- * @member {String} sub_wallet_id
274
+ * The trading account type.
275
+ * @member {String} trading_account_type
211
276
  */
212
- TransferSource.prototype['sub_wallet_id'] = undefined;
277
+ TransferSource.prototype['trading_account_type'] = undefined;
213
278
  TransferSource.OneOf = ["CustodialTransferSource", "ExchangeTransferSource", "MpcTransferSource", "SafeTransferSource"];
214
279
  var _default = exports["default"] = TransferSource;
@@ -54,6 +54,31 @@ var UpdateWalletParams = /*#__PURE__*/function () {
54
54
  }
55
55
  var match = 0;
56
56
  var errorMessages = [];
57
+ var discriminatorValue = instance["wallet_type"];
58
+ if (discriminatorValue) {
59
+ switch (discriminatorValue) {
60
+ case "Custodial":
61
+ this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
62
+ match++;
63
+ break;
64
+ case "Exchange":
65
+ this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
66
+ match++;
67
+ break;
68
+ case "MPC":
69
+ this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
70
+ match++;
71
+ break;
72
+ case "SmartContract":
73
+ this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
74
+ match++;
75
+ break;
76
+ default:
77
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
78
+ break;
79
+ }
80
+ return;
81
+ }
57
82
  try {
58
83
  if (instance instanceof _UpdateCustodialWalletParams["default"]) {
59
84
  this.actualInstance = instance;
@@ -61,8 +86,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
61
86
  // plain JS object
62
87
  // create UpdateCustodialWalletParams from JS object
63
88
  this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
64
- } else if (_UpdateCustodialWalletParams["default"].constructFromObject(instance)) {
65
- this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
89
+ } else {
90
+ if (_UpdateCustodialWalletParams["default"].constructFromObject(instance)) {
91
+ if (!!_UpdateCustodialWalletParams["default"].constructFromObject(instance).toJSON) {
92
+ if (_UpdateCustodialWalletParams["default"].constructFromObject(instance).toJSON()) {
93
+ this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
94
+ }
95
+ } else {
96
+ this.actualInstance = _UpdateCustodialWalletParams["default"].constructFromObject(instance);
97
+ }
98
+ }
66
99
  }
67
100
  match++;
68
101
  } catch (err) {
@@ -76,8 +109,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
76
109
  // plain JS object
77
110
  // create UpdateMpcWalletParams from JS object
78
111
  this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
79
- } else if (_UpdateMpcWalletParams["default"].constructFromObject(instance)) {
80
- this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
112
+ } else {
113
+ if (_UpdateMpcWalletParams["default"].constructFromObject(instance)) {
114
+ if (!!_UpdateMpcWalletParams["default"].constructFromObject(instance).toJSON) {
115
+ if (_UpdateMpcWalletParams["default"].constructFromObject(instance).toJSON()) {
116
+ this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
117
+ }
118
+ } else {
119
+ this.actualInstance = _UpdateMpcWalletParams["default"].constructFromObject(instance);
120
+ }
121
+ }
81
122
  }
82
123
  match++;
83
124
  } catch (err) {
@@ -91,8 +132,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
91
132
  // plain JS object
92
133
  // create UpdateSmartContractWalletParams from JS object
93
134
  this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
94
- } else if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance)) {
95
- this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
135
+ } else {
136
+ if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance)) {
137
+ if (!!_UpdateSmartContractWalletParams["default"].constructFromObject(instance).toJSON) {
138
+ if (_UpdateSmartContractWalletParams["default"].constructFromObject(instance).toJSON()) {
139
+ this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
140
+ }
141
+ } else {
142
+ this.actualInstance = _UpdateSmartContractWalletParams["default"].constructFromObject(instance);
143
+ }
144
+ }
96
145
  }
97
146
  match++;
98
147
  } catch (err) {
@@ -106,8 +155,16 @@ var UpdateWalletParams = /*#__PURE__*/function () {
106
155
  // plain JS object
107
156
  // create UpdateExchangeWalletParams from JS object
108
157
  this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
109
- } else if (_UpdateExchangeWalletParams["default"].constructFromObject(instance)) {
110
- this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
158
+ } else {
159
+ if (_UpdateExchangeWalletParams["default"].constructFromObject(instance)) {
160
+ if (!!_UpdateExchangeWalletParams["default"].constructFromObject(instance).toJSON) {
161
+ if (_UpdateExchangeWalletParams["default"].constructFromObject(instance).toJSON()) {
162
+ this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
163
+ }
164
+ } else {
165
+ this.actualInstance = _UpdateExchangeWalletParams["default"].constructFromObject(instance);
166
+ }
167
+ }
111
168
  }
112
169
  match++;
113
170
  } catch (err) {
@@ -58,6 +58,31 @@ var WalletInfo = /*#__PURE__*/function () {
58
58
  }
59
59
  var match = 0;
60
60
  var errorMessages = [];
61
+ var discriminatorValue = instance["wallet_type"];
62
+ if (discriminatorValue) {
63
+ switch (discriminatorValue) {
64
+ case "Custodial":
65
+ this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
66
+ match++;
67
+ break;
68
+ case "Exchange":
69
+ this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
70
+ match++;
71
+ break;
72
+ case "MPC":
73
+ this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
74
+ match++;
75
+ break;
76
+ case "SmartContract":
77
+ this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
78
+ match++;
79
+ break;
80
+ default:
81
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
82
+ break;
83
+ }
84
+ return;
85
+ }
61
86
  try {
62
87
  if (instance instanceof _CustodialWalletInfo["default"]) {
63
88
  this.actualInstance = instance;
@@ -65,8 +90,16 @@ var WalletInfo = /*#__PURE__*/function () {
65
90
  // plain JS object
66
91
  // create CustodialWalletInfo from JS object
67
92
  this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
68
- } else if (_CustodialWalletInfo["default"].constructFromObject(instance)) {
69
- this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
93
+ } else {
94
+ if (_CustodialWalletInfo["default"].constructFromObject(instance)) {
95
+ if (!!_CustodialWalletInfo["default"].constructFromObject(instance).toJSON) {
96
+ if (_CustodialWalletInfo["default"].constructFromObject(instance).toJSON()) {
97
+ this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
98
+ }
99
+ } else {
100
+ this.actualInstance = _CustodialWalletInfo["default"].constructFromObject(instance);
101
+ }
102
+ }
70
103
  }
71
104
  match++;
72
105
  } catch (err) {
@@ -80,8 +113,16 @@ var WalletInfo = /*#__PURE__*/function () {
80
113
  // plain JS object
81
114
  // create MPCWalletInfo from JS object
82
115
  this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
83
- } else if (_MPCWalletInfo["default"].constructFromObject(instance)) {
84
- this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
116
+ } else {
117
+ if (_MPCWalletInfo["default"].constructFromObject(instance)) {
118
+ if (!!_MPCWalletInfo["default"].constructFromObject(instance).toJSON) {
119
+ if (_MPCWalletInfo["default"].constructFromObject(instance).toJSON()) {
120
+ this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
121
+ }
122
+ } else {
123
+ this.actualInstance = _MPCWalletInfo["default"].constructFromObject(instance);
124
+ }
125
+ }
85
126
  }
86
127
  match++;
87
128
  } catch (err) {
@@ -95,8 +136,16 @@ var WalletInfo = /*#__PURE__*/function () {
95
136
  // plain JS object
96
137
  // create SmartContractWalletInfo from JS object
97
138
  this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
98
- } else if (_SmartContractWalletInfo["default"].constructFromObject(instance)) {
99
- this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
139
+ } else {
140
+ if (_SmartContractWalletInfo["default"].constructFromObject(instance)) {
141
+ if (!!_SmartContractWalletInfo["default"].constructFromObject(instance).toJSON) {
142
+ if (_SmartContractWalletInfo["default"].constructFromObject(instance).toJSON()) {
143
+ this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
144
+ }
145
+ } else {
146
+ this.actualInstance = _SmartContractWalletInfo["default"].constructFromObject(instance);
147
+ }
148
+ }
100
149
  }
101
150
  match++;
102
151
  } catch (err) {
@@ -110,8 +159,16 @@ var WalletInfo = /*#__PURE__*/function () {
110
159
  // plain JS object
111
160
  // create ExchangeWalletInfo from JS object
112
161
  this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
113
- } else if (_ExchangeWalletInfo["default"].constructFromObject(instance)) {
114
- this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
162
+ } else {
163
+ if (_ExchangeWalletInfo["default"].constructFromObject(instance)) {
164
+ if (!!_ExchangeWalletInfo["default"].constructFromObject(instance).toJSON) {
165
+ if (_ExchangeWalletInfo["default"].constructFromObject(instance).toJSON()) {
166
+ this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
167
+ }
168
+ } else {
169
+ this.actualInstance = _ExchangeWalletInfo["default"].constructFromObject(instance);
170
+ }
171
+ }
115
172
  }
116
173
  match++;
117
174
  } catch (err) {
@@ -209,12 +266,24 @@ WalletInfo.prototype['org_id'] = undefined;
209
266
  */
210
267
  WalletInfo.prototype['project_id'] = undefined;
211
268
 
269
+ /**
270
+ * The project name.
271
+ * @member {String} project_name
272
+ */
273
+ WalletInfo.prototype['project_name'] = undefined;
274
+
212
275
  /**
213
276
  * The ID of the owning vault.
214
277
  * @member {String} vault_id
215
278
  */
216
279
  WalletInfo.prototype['vault_id'] = undefined;
217
280
 
281
+ /**
282
+ * The vault name.
283
+ * @member {String} vault_name
284
+ */
285
+ WalletInfo.prototype['vault_name'] = undefined;
286
+
218
287
  /**
219
288
  * The API key of your exchange account.
220
289
  * @member {String} apikey