@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
package/dist/index.js CHANGED
@@ -141,6 +141,18 @@ Object.defineProperty(exports, "CheckAddressValidity200Response", {
141
141
  return _CheckAddressValidity200Response["default"];
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "CheckAddressesValidity200ResponseInner", {
145
+ enumerable: true,
146
+ get: function get() {
147
+ return _CheckAddressesValidity200ResponseInner["default"];
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "CheckLoopTransfers200ResponseInner", {
151
+ enumerable: true,
152
+ get: function get() {
153
+ return _CheckLoopTransfers200ResponseInner["default"];
154
+ }
155
+ });
144
156
  Object.defineProperty(exports, "CoboSafeDelegate", {
145
157
  enumerable: true,
146
158
  get: function get() {
@@ -609,6 +621,18 @@ Object.defineProperty(exports, "ListAddresses200Response", {
609
621
  return _ListAddresses200Response["default"];
610
622
  }
611
623
  });
624
+ Object.defineProperty(exports, "ListAssetBalancesForExchangeWallet200Response", {
625
+ enumerable: true,
626
+ get: function get() {
627
+ return _ListAssetBalancesForExchangeWallet200Response["default"];
628
+ }
629
+ });
630
+ Object.defineProperty(exports, "ListExchanges200ResponseInner", {
631
+ enumerable: true,
632
+ get: function get() {
633
+ return _ListExchanges200ResponseInner["default"];
634
+ }
635
+ });
612
636
  Object.defineProperty(exports, "ListKeyShareHolderGroups200Response", {
613
637
  enumerable: true,
614
638
  get: function get() {
@@ -627,6 +651,12 @@ Object.defineProperty(exports, "ListMpcVaults200Response", {
627
651
  return _ListMpcVaults200Response["default"];
628
652
  }
629
653
  });
654
+ Object.defineProperty(exports, "ListSupportedAssetsForExchange200Response", {
655
+ enumerable: true,
656
+ get: function get() {
657
+ return _ListSupportedAssetsForExchange200Response["default"];
658
+ }
659
+ });
630
660
  Object.defineProperty(exports, "ListSupportedChains200Response", {
631
661
  enumerable: true,
632
662
  get: function get() {
@@ -837,6 +867,12 @@ Object.defineProperty(exports, "PoolSummary", {
837
867
  return _PoolSummary["default"];
838
868
  }
839
869
  });
870
+ Object.defineProperty(exports, "RefreshToken200Response", {
871
+ enumerable: true,
872
+ get: function get() {
873
+ return _RefreshToken200Response["default"];
874
+ }
875
+ });
840
876
  Object.defineProperty(exports, "RefreshTokenRequest", {
841
877
  enumerable: true,
842
878
  get: function get() {
@@ -963,6 +999,12 @@ Object.defineProperty(exports, "TSSRequestType", {
963
999
  return _TSSRequestType["default"];
964
1000
  }
965
1001
  });
1002
+ Object.defineProperty(exports, "TSSRequestWebhookEventData", {
1003
+ enumerable: true,
1004
+ get: function get() {
1005
+ return _TSSRequestWebhookEventData["default"];
1006
+ }
1007
+ });
966
1008
  Object.defineProperty(exports, "TokenBalance", {
967
1009
  enumerable: true,
968
1010
  get: function get() {
@@ -1437,6 +1479,12 @@ Object.defineProperty(exports, "WalletsApi", {
1437
1479
  return _WalletsApi["default"];
1438
1480
  }
1439
1481
  });
1482
+ Object.defineProperty(exports, "WalletsExchangeWalletApi", {
1483
+ enumerable: true,
1484
+ get: function get() {
1485
+ return _WalletsExchangeWalletApi["default"];
1486
+ }
1487
+ });
1440
1488
  Object.defineProperty(exports, "WalletsMPCWalletsApi", {
1441
1489
  enumerable: true,
1442
1490
  get: function get() {
@@ -1515,6 +1563,8 @@ var _BaseEstimateStakingFee = _interopRequireDefault(require("./model/BaseEstima
1515
1563
  var _BaseStakeExtra = _interopRequireDefault(require("./model/BaseStakeExtra"));
1516
1564
  var _ChainInfo = _interopRequireDefault(require("./model/ChainInfo"));
1517
1565
  var _CheckAddressValidity200Response = _interopRequireDefault(require("./model/CheckAddressValidity200Response"));
1566
+ var _CheckAddressesValidity200ResponseInner = _interopRequireDefault(require("./model/CheckAddressesValidity200ResponseInner"));
1567
+ var _CheckLoopTransfers200ResponseInner = _interopRequireDefault(require("./model/CheckLoopTransfers200ResponseInner"));
1518
1568
  var _CoboSafeDelegate = _interopRequireDefault(require("./model/CoboSafeDelegate"));
1519
1569
  var _CoboSafeDelegateType = _interopRequireDefault(require("./model/CoboSafeDelegateType"));
1520
1570
  var _ContractCallDestination = _interopRequireDefault(require("./model/ContractCallDestination"));
@@ -1591,9 +1641,12 @@ var _KeyShareHolderGroupType = _interopRequireDefault(require("./model/KeyShareH
1591
1641
  var _KeyShareHolderStatus = _interopRequireDefault(require("./model/KeyShareHolderStatus"));
1592
1642
  var _KeyShareHolderType = _interopRequireDefault(require("./model/KeyShareHolderType"));
1593
1643
  var _ListAddresses200Response = _interopRequireDefault(require("./model/ListAddresses200Response"));
1644
+ var _ListAssetBalancesForExchangeWallet200Response = _interopRequireDefault(require("./model/ListAssetBalancesForExchangeWallet200Response"));
1645
+ var _ListExchanges200ResponseInner = _interopRequireDefault(require("./model/ListExchanges200ResponseInner"));
1594
1646
  var _ListKeyShareHolderGroups200Response = _interopRequireDefault(require("./model/ListKeyShareHolderGroups200Response"));
1595
1647
  var _ListMpcProjects200Response = _interopRequireDefault(require("./model/ListMpcProjects200Response"));
1596
1648
  var _ListMpcVaults200Response = _interopRequireDefault(require("./model/ListMpcVaults200Response"));
1649
+ var _ListSupportedAssetsForExchange200Response = _interopRequireDefault(require("./model/ListSupportedAssetsForExchange200Response"));
1597
1650
  var _ListSupportedChains200Response = _interopRequireDefault(require("./model/ListSupportedChains200Response"));
1598
1651
  var _ListSupportedTokens200Response = _interopRequireDefault(require("./model/ListSupportedTokens200Response"));
1599
1652
  var _ListTokenBalancesForAddress200Response = _interopRequireDefault(require("./model/ListTokenBalancesForAddress200Response"));
@@ -1628,6 +1681,7 @@ var _Pagination = _interopRequireDefault(require("./model/Pagination"));
1628
1681
  var _PoolDetails = _interopRequireDefault(require("./model/PoolDetails"));
1629
1682
  var _PoolDetailsAllOfValidatorsInfo = _interopRequireDefault(require("./model/PoolDetailsAllOfValidatorsInfo"));
1630
1683
  var _PoolSummary = _interopRequireDefault(require("./model/PoolSummary"));
1684
+ var _RefreshToken200Response = _interopRequireDefault(require("./model/RefreshToken200Response"));
1631
1685
  var _RefreshTokenRequest = _interopRequireDefault(require("./model/RefreshTokenRequest"));
1632
1686
  var _ReplaceType = _interopRequireDefault(require("./model/ReplaceType"));
1633
1687
  var _RetryWebhookEventById201Response = _interopRequireDefault(require("./model/RetryWebhookEventById201Response"));
@@ -1649,6 +1703,7 @@ var _TSSGroups = _interopRequireDefault(require("./model/TSSGroups"));
1649
1703
  var _TSSRequest = _interopRequireDefault(require("./model/TSSRequest"));
1650
1704
  var _TSSRequestStatus = _interopRequireDefault(require("./model/TSSRequestStatus"));
1651
1705
  var _TSSRequestType = _interopRequireDefault(require("./model/TSSRequestType"));
1706
+ var _TSSRequestWebhookEventData = _interopRequireDefault(require("./model/TSSRequestWebhookEventData"));
1652
1707
  var _TokenBalance = _interopRequireDefault(require("./model/TokenBalance"));
1653
1708
  var _TokenBalanceBalance = _interopRequireDefault(require("./model/TokenBalanceBalance"));
1654
1709
  var _TokenInfo = _interopRequireDefault(require("./model/TokenInfo"));
@@ -1738,5 +1793,6 @@ var _DevelopersWebhooksApi = _interopRequireDefault(require("./api/DevelopersWeb
1738
1793
  var _OAuthApi = _interopRequireDefault(require("./api/OAuthApi"));
1739
1794
  var _TransactionsApi = _interopRequireDefault(require("./api/TransactionsApi"));
1740
1795
  var _WalletsApi = _interopRequireDefault(require("./api/WalletsApi"));
1796
+ var _WalletsExchangeWalletApi = _interopRequireDefault(require("./api/WalletsExchangeWalletApi"));
1741
1797
  var _WalletsMPCWalletsApi = _interopRequireDefault(require("./api/WalletsMPCWalletsApi"));
1742
1798
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -205,7 +205,9 @@ var Activity = /*#__PURE__*/function () {
205
205
  // validate the optional field `fee`
206
206
  if (data['fee']) {
207
207
  // data not null
208
- _TransactionRequestFee["default"].validateJSON(data['fee']);
208
+ if (!!_TransactionRequestFee["default"].validateJSON) {
209
+ _TransactionRequestFee["default"].validateJSON(data['fee']);
210
+ }
209
211
  }
210
212
  return true;
211
213
  }
@@ -156,7 +156,7 @@ AddressInfo.prototype['chain_id'] = undefined;
156
156
  AddressInfo.prototype['memo'] = undefined;
157
157
 
158
158
  /**
159
- * The derivation path of the address. This property applies to MPC Wallets only.
159
+ * The derivation path of the address. This property applies to MPC Wallets only. To learn the meaning of each level in the path, see [Path levels](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#path-levels).
160
160
  * @member {String} path
161
161
  */
162
162
  AddressInfo.prototype['path'] = undefined;
@@ -34,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var AddressTransferDestination = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>AddressTransferDestination</code>.
37
- * The information about the transaction destination type &#x60;Address&#x60;. Specify either the &#x60;account_output&#x60; property or the &#x60;utxo_outputs&#x60; property. Only MPC Wallets as the transaction source can transfer tokens to multiple addresses by using the &#x60;utxo_outputs&#x60; property.
37
+ * The information about the transaction destination type &#x60;Address&#x60;. Specify either the &#x60;account_output&#x60; property or the &#x60;utxo_outputs&#x60; property. You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. You should use the &#x60;utxo_outputs&#x60; property to specify the destination addresses.
38
38
  * @alias module:model/AddressTransferDestination
39
39
  * @param destination_type {module:model/TransferDestinationType}
40
40
  */
@@ -114,7 +114,9 @@ var AddressTransferDestination = /*#__PURE__*/function () {
114
114
  }
115
115
  if (data['account_output']) {
116
116
  // data not null
117
- _AddressTransferDestinationAccountOutput["default"].validateJSON(data['account_output']);
117
+ if (!!_AddressTransferDestinationAccountOutput["default"].validateJSON) {
118
+ _AddressTransferDestinationAccountOutput["default"].validateJSON(data['account_output']);
119
+ }
118
120
  }
119
121
  if (data['utxo_outputs']) {
120
122
  // data not null
@@ -169,13 +171,13 @@ AddressTransferDestination.prototype['utxo_outputs'] = undefined;
169
171
  AddressTransferDestination.prototype['change_address'] = undefined;
170
172
 
171
173
  /**
172
- * 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.
174
+ * 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>
173
175
  * @member {Boolean} force_internal
174
176
  */
175
177
  AddressTransferDestination.prototype['force_internal'] = undefined;
176
178
 
177
179
  /**
178
- * 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.
180
+ * 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>
179
181
  * @member {Boolean} force_external
180
182
  */
181
183
  AddressTransferDestination.prototype['force_external'] = undefined;
@@ -33,7 +33,7 @@ var AddressTransferDestinationAccountOutput = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>AddressTransferDestinationAccountOutput</code>.
34
34
  * @alias module:model/AddressTransferDestinationAccountOutput
35
35
  * @param address {String} The destination address.
36
- * @param amount {String} The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
36
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
37
37
  */
38
38
  function AddressTransferDestinationAccountOutput(address, amount) {
39
39
  _classCallCheck(this, AddressTransferDestinationAccountOutput);
@@ -131,7 +131,7 @@ AddressTransferDestinationAccountOutput.prototype['address'] = undefined;
131
131
  AddressTransferDestinationAccountOutput.prototype['memo'] = undefined;
132
132
 
133
133
  /**
134
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
134
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
135
135
  * @member {String} amount
136
136
  */
137
137
  AddressTransferDestinationAccountOutput.prototype['amount'] = undefined;
@@ -123,7 +123,7 @@ AddressTransferDestinationUtxoOutputsInner.RequiredProperties = ["address"];
123
123
  AddressTransferDestinationUtxoOutputsInner.prototype['address'] = undefined;
124
124
 
125
125
  /**
126
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
126
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
127
127
  * @member {String} amount
128
128
  */
129
129
  AddressTransferDestinationUtxoOutputsInner.prototype['amount'] = undefined;
@@ -106,7 +106,9 @@ var AssetBalance = /*#__PURE__*/function () {
106
106
  // validate the optional field `balance`
107
107
  if (data['balance']) {
108
108
  // data not null
109
- _TokenBalanceBalance["default"].validateJSON(data['balance']);
109
+ if (!!_TokenBalanceBalance["default"].validateJSON) {
110
+ _TokenBalanceBalance["default"].validateJSON(data['balance']);
111
+ }
110
112
  }
111
113
  return true;
112
114
  }
@@ -33,7 +33,7 @@ var AssetInfo = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>AssetInfo</code>.
34
34
  * The asset information.
35
35
  * @alias module:model/AssetInfo
36
- * @param asset_id {String} (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
36
+ * @param asset_id {String} The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
37
37
  */
38
38
  function AssetInfo(asset_id) {
39
39
  _classCallCheck(this, AssetInfo);
@@ -125,7 +125,7 @@ var AssetInfo = /*#__PURE__*/function () {
125
125
  AssetInfo.RequiredProperties = ["asset_id"];
126
126
 
127
127
  /**
128
- * (This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
128
+ * The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.
129
129
  * @member {String} asset_id
130
130
  */
131
131
  AssetInfo.prototype['asset_id'] = undefined;
@@ -80,6 +80,9 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
80
80
  if (data.hasOwnProperty('stake_block_time')) {
81
81
  obj['stake_block_time'] = _ApiClient["default"].convertToType(data['stake_block_time'], 'Number');
82
82
  }
83
+ if (data.hasOwnProperty('only_sign')) {
84
+ obj['only_sign'] = _ApiClient["default"].convertToType(data['only_sign'], 'Boolean');
85
+ }
83
86
  }
84
87
  return obj;
85
88
  }
@@ -134,6 +137,12 @@ BabylonStakeExtra.prototype['finality_provider_public_key'] = undefined;
134
137
  */
135
138
  BabylonStakeExtra.prototype['stake_block_time'] = undefined;
136
139
 
140
+ /**
141
+ * Whether to only sign transactions. Default is `false`, if set to `true`, the transaction will not be submitted to the blockchain automatically. You can call `Broadcast transactions` to submit the transaction to the blockchain, Or you can find the signed raw_tx by `Get transaction information` and broadcast it yourself.
142
+ * @member {Boolean} only_sign
143
+ */
144
+ BabylonStakeExtra.prototype['only_sign'] = undefined;
145
+
137
146
  // Implement BaseStakeExtra interface:
138
147
  /**
139
148
  * @member {module:model/StakingPoolType} pool_type
@@ -32,7 +32,7 @@ var CheckAddressValidity200Response = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>CheckAddressValidity200Response</code>.
34
34
  * @alias module:model/CheckAddressValidity200Response
35
- * @param validity {Boolean} Whether the address is valid. - `true`: The address is valid. - `false`: the address is invalid.
35
+ * @param validity {Boolean} Whether the address is valid. - `true`: The address is valid. - `false`: The address is invalid.
36
36
  */
37
37
  function CheckAddressValidity200Response(validity) {
38
38
  _classCallCheck(this, CheckAddressValidity200Response);
@@ -99,7 +99,7 @@ var CheckAddressValidity200Response = /*#__PURE__*/function () {
99
99
  CheckAddressValidity200Response.RequiredProperties = ["validity"];
100
100
 
101
101
  /**
102
- * Whether the address is valid. - `true`: The address is valid. - `false`: the address is invalid.
102
+ * Whether the address is valid. - `true`: The address is valid. - `false`: The address is invalid.
103
103
  * @member {Boolean} validity
104
104
  */
105
105
  CheckAddressValidity200Response.prototype['validity'] = undefined;
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: support@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The CheckAddressesValidity200ResponseInner model module.
29
+ * @module model/CheckAddressesValidity200ResponseInner
30
+ */
31
+ var CheckAddressesValidity200ResponseInner = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CheckAddressesValidity200ResponseInner</code>.
34
+ * @alias module:model/CheckAddressesValidity200ResponseInner
35
+ * @param address {String} The wallet address.
36
+ * @param validity {Boolean} Whether the address is valid. - `true`: The address is valid. - `false`: The address is invalid.
37
+ */
38
+ function CheckAddressesValidity200ResponseInner(address, validity) {
39
+ _classCallCheck(this, CheckAddressesValidity200ResponseInner);
40
+ CheckAddressesValidity200ResponseInner.initialize(this, address, validity);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(CheckAddressesValidity200ResponseInner, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj, address, validity) {
51
+ obj['address'] = address;
52
+ obj['validity'] = validity;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>CheckAddressesValidity200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/CheckAddressesValidity200ResponseInner} obj Optional instance to populate.
60
+ * @return {module:model/CheckAddressesValidity200ResponseInner} The populated <code>CheckAddressesValidity200ResponseInner</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new CheckAddressesValidity200ResponseInner();
67
+ if (data.hasOwnProperty('address')) {
68
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('validity')) {
71
+ obj['validity'] = _ApiClient["default"].convertToType(data['validity'], 'Boolean');
72
+ }
73
+ }
74
+ return obj;
75
+ }
76
+
77
+ /**
78
+ * Validates the JSON data with respect to <code>CheckAddressesValidity200ResponseInner</code>.
79
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
80
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CheckAddressesValidity200ResponseInner</code>.
81
+ */
82
+ }, {
83
+ key: "validateJSON",
84
+ value: function validateJSON(data) {
85
+ // check to make sure all required properties are present in the JSON string
86
+ var _iterator = _createForOfIteratorHelper(CheckAddressesValidity200ResponseInner.RequiredProperties),
87
+ _step;
88
+ try {
89
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
90
+ var property = _step.value;
91
+ if (!data.hasOwnProperty(property)) {
92
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
93
+ }
94
+ }
95
+ // ensure the json data is a string
96
+ } catch (err) {
97
+ _iterator.e(err);
98
+ } finally {
99
+ _iterator.f();
100
+ }
101
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
102
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
103
+ }
104
+ return true;
105
+ }
106
+ }]);
107
+ }();
108
+ CheckAddressesValidity200ResponseInner.RequiredProperties = ["address", "validity"];
109
+
110
+ /**
111
+ * The wallet address.
112
+ * @member {String} address
113
+ */
114
+ CheckAddressesValidity200ResponseInner.prototype['address'] = undefined;
115
+
116
+ /**
117
+ * Whether the address is valid. - `true`: The address is valid. - `false`: The address is invalid.
118
+ * @member {Boolean} validity
119
+ */
120
+ CheckAddressesValidity200ResponseInner.prototype['validity'] = undefined;
121
+ var _default = exports["default"] = CheckAddressesValidity200ResponseInner;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * Cobo Wallet as a Service 2.0
16
+ *
17
+ * Contact: support@cobo.com
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The CheckLoopTransfers200ResponseInner model module.
26
+ * @module model/CheckLoopTransfers200ResponseInner
27
+ */
28
+ var CheckLoopTransfers200ResponseInner = /*#__PURE__*/function () {
29
+ /**
30
+ * Constructs a new <code>CheckLoopTransfers200ResponseInner</code>.
31
+ * @alias module:model/CheckLoopTransfers200ResponseInner
32
+ */
33
+ function CheckLoopTransfers200ResponseInner() {
34
+ _classCallCheck(this, CheckLoopTransfers200ResponseInner);
35
+ CheckLoopTransfers200ResponseInner.initialize(this);
36
+ }
37
+
38
+ /**
39
+ * Initializes the fields of this object.
40
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
41
+ * Only for internal use.
42
+ */
43
+ return _createClass(CheckLoopTransfers200ResponseInner, null, [{
44
+ key: "initialize",
45
+ value: function initialize(obj) {}
46
+
47
+ /**
48
+ * Constructs a <code>CheckLoopTransfers200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
49
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
50
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
51
+ * @param {module:model/CheckLoopTransfers200ResponseInner} obj Optional instance to populate.
52
+ * @return {module:model/CheckLoopTransfers200ResponseInner} The populated <code>CheckLoopTransfers200ResponseInner</code> instance.
53
+ */
54
+ }, {
55
+ key: "constructFromObject",
56
+ value: function constructFromObject(data, obj) {
57
+ if (data) {
58
+ obj = obj || new CheckLoopTransfers200ResponseInner();
59
+ if (data.hasOwnProperty('address')) {
60
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
61
+ }
62
+ if (data.hasOwnProperty('is_loop')) {
63
+ obj['is_loop'] = _ApiClient["default"].convertToType(data['is_loop'], 'Boolean');
64
+ }
65
+ }
66
+ return obj;
67
+ }
68
+
69
+ /**
70
+ * Validates the JSON data with respect to <code>CheckLoopTransfers200ResponseInner</code>.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CheckLoopTransfers200ResponseInner</code>.
73
+ */
74
+ }, {
75
+ key: "validateJSON",
76
+ value: function validateJSON(data) {
77
+ // ensure the json data is a string
78
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
79
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
80
+ }
81
+ return true;
82
+ }
83
+ }]);
84
+ }();
85
+ /**
86
+ * The wallet address.
87
+ * @member {String} address
88
+ */
89
+ CheckLoopTransfers200ResponseInner.prototype['address'] = undefined;
90
+
91
+ /**
92
+ * Whether the transaction from the given source wallet to the destination address can be executed as a Loop transfer. - `true`: The transaction can be executed as a Loop transfer. - `false`: The transaction cannot be executed as a Loop transfer.
93
+ * @member {Boolean} is_loop
94
+ */
95
+ CheckLoopTransfers200ResponseInner.prototype['is_loop'] = undefined;
96
+ var _default = exports["default"] = CheckLoopTransfers200ResponseInner;
@@ -54,12 +54,12 @@ var CoboSafeDelegate = /*#__PURE__*/function () {
54
54
  try {
55
55
  if (instance instanceof _MPCDelegate["default"]) {
56
56
  this.actualInstance = instance;
57
- } else if (_MPCDelegate["default"].validateJSON(instance)) {
57
+ } else if (!!_MPCDelegate["default"].validateJSON && _MPCDelegate["default"].validateJSON(instance)) {
58
58
  // plain JS object
59
59
  // create MPCDelegate from JS object
60
60
  this.actualInstance = _MPCDelegate["default"].constructFromObject(instance);
61
- } else {
62
- return;
61
+ } else if (_MPCDelegate["default"].constructFromObject(instance)) {
62
+ this.actualInstance = _MPCDelegate["default"].constructFromObject(instance);
63
63
  }
64
64
  match++;
65
65
  } catch (err) {
@@ -54,12 +54,12 @@ var ContractCallDestination = /*#__PURE__*/function () {
54
54
  try {
55
55
  if (instance instanceof _EvmContractCallDestination["default"]) {
56
56
  this.actualInstance = instance;
57
- } else if (_EvmContractCallDestination["default"].validateJSON(instance)) {
57
+ } else if (!!_EvmContractCallDestination["default"].validateJSON && _EvmContractCallDestination["default"].validateJSON(instance)) {
58
58
  // plain JS object
59
59
  // create EvmContractCallDestination from JS object
60
60
  this.actualInstance = _EvmContractCallDestination["default"].constructFromObject(instance);
61
- } else {
62
- return;
61
+ } else if (_EvmContractCallDestination["default"].constructFromObject(instance)) {
62
+ this.actualInstance = _EvmContractCallDestination["default"].constructFromObject(instance);
63
63
  }
64
64
  match++;
65
65
  } catch (err) {
@@ -135,7 +135,7 @@ ContractCallDestination.prototype['destination_type'] = undefined;
135
135
  ContractCallDestination.prototype['address'] = undefined;
136
136
 
137
137
  /**
138
- * The quantity of the token in the transaction. For example, if you trade 1.5 ETH, then the value is `1.5`.
138
+ * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
139
139
  * @member {String} value
140
140
  */
141
141
  ContractCallDestination.prototype['value'] = undefined;
@@ -131,12 +131,16 @@ var ContractCallParams = /*#__PURE__*/function () {
131
131
  // validate the optional field `source`
132
132
  if (data['source']) {
133
133
  // data not null
134
- _ContractCallSource["default"].validateJSON(data['source']);
134
+ if (!!_ContractCallSource["default"].validateJSON) {
135
+ _ContractCallSource["default"].validateJSON(data['source']);
136
+ }
135
137
  }
136
138
  // validate the optional field `destination`
137
139
  if (data['destination']) {
138
140
  // data not null
139
- _ContractCallDestination["default"].validateJSON(data['destination']);
141
+ if (!!_ContractCallDestination["default"].validateJSON) {
142
+ _ContractCallDestination["default"].validateJSON(data['destination']);
143
+ }
140
144
  }
141
145
  // ensure the json data is a string
142
146
  if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
@@ -149,7 +153,9 @@ var ContractCallParams = /*#__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
  }
@@ -56,12 +56,12 @@ var ContractCallSource = /*#__PURE__*/function () {
56
56
  try {
57
57
  if (instance instanceof _MpcContractCallSource["default"]) {
58
58
  this.actualInstance = instance;
59
- } else if (_MpcContractCallSource["default"].validateJSON(instance)) {
59
+ } else if (!!_MpcContractCallSource["default"].validateJSON && _MpcContractCallSource["default"].validateJSON(instance)) {
60
60
  // plain JS object
61
61
  // create MpcContractCallSource from JS object
62
62
  this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
63
- } else {
64
- return;
63
+ } else if (_MpcContractCallSource["default"].constructFromObject(instance)) {
64
+ this.actualInstance = _MpcContractCallSource["default"].constructFromObject(instance);
65
65
  }
66
66
  match++;
67
67
  } catch (err) {
@@ -71,12 +71,12 @@ var ContractCallSource = /*#__PURE__*/function () {
71
71
  try {
72
72
  if (instance instanceof _SafeContractCallSource["default"]) {
73
73
  this.actualInstance = instance;
74
- } else if (_SafeContractCallSource["default"].validateJSON(instance)) {
74
+ } else if (!!_SafeContractCallSource["default"].validateJSON && _SafeContractCallSource["default"].validateJSON(instance)) {
75
75
  // plain JS object
76
76
  // create SafeContractCallSource from JS object
77
77
  this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
78
- } else {
79
- return;
78
+ } else if (_SafeContractCallSource["default"].constructFromObject(instance)) {
79
+ this.actualInstance = _SafeContractCallSource["default"].constructFromObject(instance);
80
80
  }
81
81
  match++;
82
82
  } catch (err) {
@@ -154,7 +154,9 @@ var CreateSafeWalletParams = /*#__PURE__*/function () {
154
154
  // validate the optional field `initiator`
155
155
  if (data['initiator']) {
156
156
  // data not null
157
- _SmartContractInitiator["default"].validateJSON(data['initiator']);
157
+ if (!!_SmartContractInitiator["default"].validateJSON) {
158
+ _SmartContractInitiator["default"].validateJSON(data['initiator']);
159
+ }
158
160
  }
159
161
  return true;
160
162
  }