@cobo/cobo-waas2 1.2.0 → 1.3.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 (349) hide show
  1. package/README.md +41 -9
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/PreRequestScript.js +640 -0
  4. package/dist/api/DevelopersWebhooksApi.js +1 -1
  5. package/dist/api/OAuthApi.js +5 -5
  6. package/dist/api/StakingsApi.js +538 -0
  7. package/dist/api/TransactionsApi.js +111 -9
  8. package/dist/api/WalletsApi.js +1 -60
  9. package/dist/api/WalletsExchangeWalletApi.js +5 -5
  10. package/dist/api/WalletsMPCWalletsApi.js +1 -1
  11. package/dist/index.js +154 -0
  12. package/dist/model/Activity.js +21 -12
  13. package/dist/model/ActivityAction.js +1 -1
  14. package/dist/model/ActivityInitiator.js +8 -8
  15. package/dist/model/ActivityStatus.js +1 -1
  16. package/dist/model/ActivityTimeline.js +4 -2
  17. package/dist/model/ActivityType.js +1 -16
  18. package/dist/model/AddressEncoding.js +1 -1
  19. package/dist/model/AddressInfo.js +40 -1
  20. package/dist/model/AddressTransferDestination.js +2 -2
  21. package/dist/model/AddressTransferDestinationAccountOutput.js +3 -3
  22. package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +2 -2
  23. package/dist/model/AmountDetailsInner.js +1 -14
  24. package/dist/model/AmountStatus.js +1 -1
  25. package/dist/model/AssetBalance.js +1 -1
  26. package/dist/model/AssetInfo.js +1 -1
  27. package/dist/model/BabylonStakeExtra.js +10 -10
  28. package/dist/model/BabylonStakingExtra.js +175 -0
  29. package/dist/model/BabylonValidator.js +35 -15
  30. package/dist/model/BaseContractCallSource.js +2 -2
  31. package/dist/model/BaseEstimateStakingFee.js +1 -1
  32. package/dist/model/BaseStakeExtra.js +2 -2
  33. package/dist/model/BaseStakeSource.js +137 -0
  34. package/dist/model/BookkeepingRecord.js +243 -0
  35. package/dist/model/BookkeepingSummary.js +150 -0
  36. package/dist/model/BroadcastSignedTransactions201ResponseInner.js +125 -0
  37. package/dist/model/BroadcastSignedTransactionsRequest.js +87 -0
  38. package/dist/model/ChainInfo.js +10 -1
  39. package/dist/model/CheckAddressValidity200Response.js +1 -1
  40. package/dist/model/CheckAddressesValidity200ResponseInner.js +1 -1
  41. package/dist/model/CheckLoopTransfers200ResponseInner.js +2 -2
  42. package/dist/model/CoboSafeDelegate.js +28 -3
  43. package/dist/model/CoboSafeDelegateType.js +1 -1
  44. package/dist/model/ContractCallDestination.js +25 -4
  45. package/dist/model/ContractCallDestinationType.js +1 -1
  46. package/dist/model/ContractCallParams.js +1 -1
  47. package/dist/model/ContractCallSource.js +42 -5
  48. package/dist/model/ContractCallSourceType.js +1 -1
  49. package/dist/model/CreateAddressRequest.js +1 -1
  50. package/dist/model/CreateCustodialWalletParams.js +1 -1
  51. package/dist/model/CreateExchangeWalletParams.js +1 -1
  52. package/dist/model/CreateKeyShareHolder.js +1 -1
  53. package/dist/model/CreateKeyShareHolderGroupRequest.js +1 -1
  54. package/dist/model/CreateMpcProjectRequest.js +1 -1
  55. package/dist/model/CreateMpcVaultRequest.js +1 -1
  56. package/dist/model/CreateMpcWalletParams.js +1 -1
  57. package/dist/model/CreateSafeWalletParams.js +1 -1
  58. package/dist/model/CreateSmartContractWalletParams.js +24 -3
  59. package/dist/model/CreateStakeActivity.js +5 -5
  60. package/dist/model/CreateStakeActivity201Response.js +123 -0
  61. package/dist/model/CreateStakeActivityExtra.js +37 -60
  62. package/dist/model/CreateStakeActivityRequest.js +246 -0
  63. package/dist/model/CreateTransferTransaction201Response.js +1 -1
  64. package/dist/model/CreateTssRequestRequest.js +1 -1
  65. package/dist/model/CreateUnstakeActivity.js +4 -4
  66. package/dist/model/CreateUnstakeActivityRequest.js +200 -0
  67. package/dist/model/CreateWalletParams.js +52 -7
  68. package/dist/model/CreateWebhookEndpointRequest.js +1 -1
  69. package/dist/model/CreateWithdrawActivity.js +5 -5
  70. package/dist/model/CreateWithdrawActivityRequest.js +220 -0
  71. package/dist/model/CreatedWalletInfo.js +52 -7
  72. package/dist/model/CurveType.js +1 -1
  73. package/dist/model/CustodialTransferSource.js +2 -2
  74. package/dist/model/CustodialWalletInfo.js +1 -1
  75. package/dist/model/DeleteKeyShareHolderGroupById201Response.js +1 -1
  76. package/dist/model/DeleteWalletById201Response.js +1 -1
  77. package/dist/model/EigenLayerLstStakeExtra.js +2 -2
  78. package/dist/model/EigenLayerNativeStakeExtra.js +1 -1
  79. package/dist/model/EigenlayerValidator.js +1 -1
  80. package/dist/model/ErrorResponse.js +1 -1
  81. package/dist/model/EstimateContractCallFeeParams.js +1 -1
  82. package/dist/model/EstimateFeeParams.js +38 -5
  83. package/dist/model/EstimateFeeRequestType.js +1 -1
  84. package/dist/model/EstimateStakeFee.js +7 -7
  85. package/dist/model/EstimateTransferFeeParams.js +1 -1
  86. package/dist/model/EstimateUnstakeFee.js +6 -6
  87. package/dist/model/EstimateWithdrawFee.js +8 -8
  88. package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
  89. package/dist/model/EstimatedEvmEip1559FeeSlow.js +1 -1
  90. package/dist/model/EstimatedEvmLegacyFee.js +1 -1
  91. package/dist/model/EstimatedEvmLegacyFeeSlow.js +1 -1
  92. package/dist/model/EstimatedFee.js +66 -9
  93. package/dist/model/EstimatedFixedFee.js +1 -1
  94. package/dist/model/EstimatedUtxoFee.js +1 -1
  95. package/dist/model/EstimatedUtxoFeeSlow.js +1 -1
  96. package/dist/model/EvmContractCallDestination.js +9 -5
  97. package/dist/model/EvmEIP191MessageSignDestination.js +2 -2
  98. package/dist/model/EvmEIP712MessageSignDestination.js +2 -2
  99. package/dist/model/EvmEip1559FeeBasePrice.js +1 -1
  100. package/dist/model/EvmEip1559FeeRate.js +1 -1
  101. package/dist/model/EvmLegacyFeeBasePrice.js +1 -1
  102. package/dist/model/EvmLegacyFeeRate.js +1 -1
  103. package/dist/model/ExchangeId.js +1 -1
  104. package/dist/model/ExchangeTransferDestination.js +4 -4
  105. package/dist/model/ExchangeTransferSource.js +2 -2
  106. package/dist/model/ExchangeWalletInfo.js +1 -1
  107. package/dist/model/ExtendedTokenInfo.js +37 -1
  108. package/dist/model/FeeAmount.js +1 -1
  109. package/dist/model/FeeGasLimit.js +1 -1
  110. package/dist/model/FeeRate.js +66 -9
  111. package/dist/model/FeeType.js +1 -1
  112. package/dist/model/FixedFeeRate.js +1 -1
  113. package/dist/model/GetStakingEstimationFee201Response.js +109 -0
  114. package/dist/model/GetStakingEstimationFeeRequest.js +256 -0
  115. package/dist/model/GetToken200Response.js +1 -1
  116. package/dist/model/GetToken4XXResponse.js +1 -1
  117. package/dist/model/KeyShareHolder.js +1 -1
  118. package/dist/model/KeyShareHolderGroup.js +1 -1
  119. package/dist/model/KeyShareHolderGroupStatus.js +1 -1
  120. package/dist/model/KeyShareHolderGroupType.js +1 -1
  121. package/dist/model/KeyShareHolderStatus.js +1 -1
  122. package/dist/model/KeyShareHolderType.js +1 -1
  123. package/dist/model/ListAddresses200Response.js +1 -1
  124. package/dist/model/ListAssetBalancesForExchangeWallet200Response.js +1 -1
  125. package/dist/model/ListExchanges200ResponseInner.js +1 -1
  126. package/dist/model/ListKeyShareHolderGroups200Response.js +1 -1
  127. package/dist/model/ListMpcProjects200Response.js +1 -1
  128. package/dist/model/ListMpcVaults200Response.js +1 -1
  129. package/dist/model/ListStakingActivities200Response.js +123 -0
  130. package/dist/model/ListStakingPools200Response.js +123 -0
  131. package/dist/model/ListStakings200Response.js +123 -0
  132. package/dist/model/ListSupportedAssetsForExchange200Response.js +1 -1
  133. package/dist/model/ListSupportedChains200Response.js +1 -1
  134. package/dist/model/ListSupportedTokens200Response.js +1 -1
  135. package/dist/model/ListTokenBalancesForAddress200Response.js +1 -1
  136. package/dist/model/ListTransactions200Response.js +1 -1
  137. package/dist/model/ListTssRequests200Response.js +1 -1
  138. package/dist/model/ListUtxos200Response.js +1 -1
  139. package/dist/model/ListWallets200Response.js +1 -1
  140. package/dist/model/ListWebhookEndpoints200Response.js +1 -1
  141. package/dist/model/ListWebhookEventDefinitions200ResponseInner.js +1 -1
  142. package/dist/model/ListWebhookEventLogs200Response.js +1 -1
  143. package/dist/model/ListWebhookEvents200Response.js +1 -1
  144. package/dist/model/LockUtxos201Response.js +1 -1
  145. package/dist/model/LockUtxosRequest.js +1 -1
  146. package/dist/model/LockUtxosRequestUtxosInner.js +1 -1
  147. package/dist/model/MPCDelegate.js +1 -1
  148. package/dist/model/MPCProject.js +1 -1
  149. package/dist/model/MPCVault.js +1 -1
  150. package/dist/model/MPCVaultType.js +1 -1
  151. package/dist/model/MPCWalletInfo.js +1 -1
  152. package/dist/model/MaxFeeAmount.js +1 -1
  153. package/dist/model/MaxTransferableValue.js +1 -1
  154. package/dist/model/MessageSignDestination.js +38 -5
  155. package/dist/model/MessageSignDestinationType.js +1 -1
  156. package/dist/model/MessageSignParams.js +1 -1
  157. package/dist/model/MessageSignSource.js +28 -3
  158. package/dist/model/MessageSignSourceType.js +1 -1
  159. package/dist/model/MpcContractCallSource.js +1 -1
  160. package/dist/model/MpcMessageSignSource.js +1 -1
  161. package/dist/model/MpcSigningGroup.js +1 -1
  162. package/dist/model/MpcStakeSource.js +156 -0
  163. package/dist/model/MpcTransferSource.js +2 -2
  164. package/dist/model/Pagination.js +1 -1
  165. package/dist/model/PoolDetails.js +27 -27
  166. package/dist/model/PoolDetailsAllOfValidatorsInfo.js +45 -40
  167. package/dist/model/PoolSummary.js +14 -14
  168. package/dist/model/RawMessageSignDestination.js +122 -0
  169. package/dist/model/RefreshToken200Response.js +1 -1
  170. package/dist/model/RefreshTokenRequest.js +1 -1
  171. package/dist/model/ReplaceType.js +1 -1
  172. package/dist/model/RetryWebhookEventById201Response.js +1 -1
  173. package/dist/model/RootPubkey.js +1 -1
  174. package/dist/model/SafeContractCallSource.js +2 -2
  175. package/dist/model/SafeTransferSource.js +2 -2
  176. package/dist/model/SafeWallet.js +1 -1
  177. package/dist/model/SmartContractInitiator.js +1 -1
  178. package/dist/model/SmartContractWalletInfo.js +24 -3
  179. package/dist/model/SmartContractWalletOperationType.js +1 -1
  180. package/dist/model/SmartContractWalletType.js +1 -1
  181. package/dist/model/SourceGroup.js +1 -1
  182. package/dist/model/StakeSourceType.js +56 -0
  183. package/dist/model/StakingPoolType.js +1 -11
  184. package/dist/model/StakingSource.js +39 -46
  185. package/dist/model/Stakings.js +35 -63
  186. package/dist/model/StakingsExtra.js +182 -0
  187. package/dist/model/StakingsValidatorInfo.js +7 -2
  188. package/dist/model/SubWalletAssetBalance.js +1 -1
  189. package/dist/model/TSSGroups.js +1 -1
  190. package/dist/model/TSSRequest.js +1 -1
  191. package/dist/model/TSSRequestStatus.js +1 -1
  192. package/dist/model/TSSRequestType.js +1 -1
  193. package/dist/model/TSSRequestWebhookEventData.js +1 -1
  194. package/dist/model/TokenBalance.js +1 -1
  195. package/dist/model/TokenBalanceBalance.js +1 -1
  196. package/dist/model/TokenInfo.js +27 -1
  197. package/dist/model/Transaction.js +1 -1
  198. package/dist/model/TransactionApprover.js +1 -1
  199. package/dist/model/TransactionBlockInfo.js +1 -1
  200. package/dist/model/TransactionCustodialAssetWalletSource.js +2 -2
  201. package/dist/model/TransactionDepositFromAddressSource.js +2 -2
  202. package/dist/model/TransactionDepositFromLoopSource.js +2 -2
  203. package/dist/model/TransactionDepositFromWalletSource.js +2 -2
  204. package/dist/model/TransactionDepositToAddressDestination.js +4 -4
  205. package/dist/model/TransactionDepositToWalletDestination.js +4 -4
  206. package/dist/model/TransactionDestination.js +110 -17
  207. package/dist/model/TransactionDestinationType.js +1 -1
  208. package/dist/model/TransactionDetail.js +1 -1
  209. package/dist/model/TransactionDetails.js +1 -1
  210. package/dist/model/TransactionEvmContractDestination.js +9 -5
  211. package/dist/model/TransactionEvmEip1559Fee.js +2 -2
  212. package/dist/model/TransactionEvmLegacyFee.js +2 -2
  213. package/dist/model/TransactionExchangeWalletSource.js +2 -2
  214. package/dist/model/TransactionFee.js +66 -9
  215. package/dist/model/TransactionFeeStationWalletSource.js +1 -1
  216. package/dist/model/TransactionFixedFee.js +2 -2
  217. package/dist/model/TransactionInitiatorType.js +1 -1
  218. package/dist/model/TransactionMPCWalletSource.js +2 -2
  219. package/dist/model/TransactionMessageSignEIP191Destination.js +2 -2
  220. package/dist/model/TransactionMessageSignEIP712Destination.js +2 -2
  221. package/dist/model/TransactionRawTxInfo.js +1 -1
  222. package/dist/model/TransactionRbf.js +1 -1
  223. package/dist/model/TransactionRbfSource.js +28 -3
  224. package/dist/model/TransactionReplacement.js +1 -1
  225. package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -2
  226. package/dist/model/TransactionRequestEvmLegacyFee.js +2 -2
  227. package/dist/model/TransactionRequestFee.js +66 -9
  228. package/dist/model/TransactionRequestFixedFee.js +2 -2
  229. package/dist/model/TransactionRequestUtxoFee.js +2 -2
  230. package/dist/model/TransactionResend.js +1 -1
  231. package/dist/model/TransactionResult.js +24 -3
  232. package/dist/model/TransactionResultType.js +1 -1
  233. package/dist/model/TransactionSignatureResult.js +1 -1
  234. package/dist/model/TransactionSigner.js +1 -1
  235. package/dist/model/TransactionSmartContractSafeWalletSource.js +2 -2
  236. package/dist/model/TransactionSource.js +116 -15
  237. package/dist/model/TransactionSourceType.js +1 -1
  238. package/dist/model/TransactionStatus.js +1 -1
  239. package/dist/model/TransactionSubStatus.js +1 -1
  240. package/dist/model/TransactionTimeline.js +1 -1
  241. package/dist/model/TransactionTokeApproval.js +37 -1
  242. package/dist/model/TransactionTokenAmount.js +1 -1
  243. package/dist/model/TransactionTransferToAddressDestination.js +2 -2
  244. package/dist/model/TransactionTransferToAddressDestinationAccountOutput.js +2 -2
  245. package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +2 -2
  246. package/dist/model/TransactionTransferToWalletDestination.js +4 -4
  247. package/dist/model/TransactionType.js +11 -1
  248. package/dist/model/TransactionUtxo.js +1 -1
  249. package/dist/model/TransactionUtxoFee.js +2 -2
  250. package/dist/model/TransactionWebhookEventData.js +1 -1
  251. package/dist/model/TransferDestination.js +39 -6
  252. package/dist/model/TransferDestinationType.js +1 -1
  253. package/dist/model/TransferParams.js +1 -1
  254. package/dist/model/TransferSource.js +74 -9
  255. package/dist/model/UTXO.js +1 -1
  256. package/dist/model/UpdateCustodialWalletParams.js +1 -1
  257. package/dist/model/UpdateExchangeWalletParams.js +1 -1
  258. package/dist/model/UpdateGroupAction.js +1 -1
  259. package/dist/model/UpdateKeyShareHolderGroupByIdRequest.js +1 -1
  260. package/dist/model/UpdateMpcProjectByIdRequest.js +1 -1
  261. package/dist/model/UpdateMpcVaultByIdRequest.js +1 -1
  262. package/dist/model/UpdateMpcWalletParams.js +1 -1
  263. package/dist/model/UpdateSmartContractWalletParams.js +1 -1
  264. package/dist/model/UpdateWalletParams.js +66 -9
  265. package/dist/model/UpdateWebhookEndpointByIdRequest.js +1 -1
  266. package/dist/model/UtxoFeeBasePrice.js +1 -1
  267. package/dist/model/UtxoFeeRate.js +1 -1
  268. package/dist/model/WalletBalanceSnapshot.js +120 -0
  269. package/dist/model/WalletBalanceSnapshotRecord.js +163 -0
  270. package/dist/model/WalletInfo.js +66 -9
  271. package/dist/model/WalletSubtype.js +1 -1
  272. package/dist/model/WalletType.js +1 -1
  273. package/dist/model/WebhookEndpoint.js +1 -1
  274. package/dist/model/WebhookEndpointStatus.js +1 -1
  275. package/dist/model/WebhookEvent.js +1 -1
  276. package/dist/model/WebhookEventData.js +38 -5
  277. package/dist/model/WebhookEventDataType.js +1 -1
  278. package/dist/model/WebhookEventLog.js +1 -1
  279. package/dist/model/WebhookEventStatus.js +1 -1
  280. package/dist/model/WebhookEventType.js +1 -1
  281. package/docs/Activity.md +9 -8
  282. package/docs/ActivityInitiator.md +1 -1
  283. package/docs/ActivityTimeline.md +3 -3
  284. package/docs/ActivityType.md +0 -6
  285. package/docs/AddressInfo.md +3 -0
  286. package/docs/AddressTransferDestinationAccountOutput.md +1 -1
  287. package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -1
  288. package/docs/AmountDetailsInner.md +0 -1
  289. package/docs/BabylonStakeExtra.md +3 -3
  290. package/docs/BabylonStakingExtra.md +14 -0
  291. package/docs/BabylonValidator.md +6 -5
  292. package/docs/BaseStakeSource.md +11 -0
  293. package/docs/BookkeepingRecord.md +19 -0
  294. package/docs/BookkeepingSummary.md +12 -0
  295. package/docs/BroadcastSignedTransactions201ResponseInner.md +10 -0
  296. package/docs/BroadcastSignedTransactionsRequest.md +9 -0
  297. package/docs/ChainInfo.md +1 -0
  298. package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
  299. package/docs/ContractCallDestination.md +1 -1
  300. package/docs/CreateStakeActivity.md +2 -2
  301. package/docs/CreateStakeActivity201Response.md +10 -0
  302. package/docs/CreateStakeActivityExtra.md +3 -5
  303. package/docs/CreateStakeActivityRequest.md +15 -0
  304. package/docs/CreateUnstakeActivity.md +2 -2
  305. package/docs/CreateUnstakeActivityRequest.md +13 -0
  306. package/docs/CreateWithdrawActivity.md +3 -3
  307. package/docs/CreateWithdrawActivityRequest.md +14 -0
  308. package/docs/EigenLayerLstStakeExtra.md +1 -1
  309. package/docs/EstimateStakeFee.md +2 -2
  310. package/docs/EstimateUnstakeFee.md +2 -2
  311. package/docs/EstimateWithdrawFee.md +3 -3
  312. package/docs/EvmContractCallDestination.md +1 -1
  313. package/docs/ExchangeTransferDestination.md +1 -1
  314. package/docs/ExtendedTokenInfo.md +2 -0
  315. package/docs/GetStakingEstimationFee201Response.md +11 -0
  316. package/docs/GetStakingEstimationFeeRequest.md +17 -0
  317. package/docs/ListStakingActivities200Response.md +10 -0
  318. package/docs/ListStakingPools200Response.md +10 -0
  319. package/docs/ListStakings200Response.md +10 -0
  320. package/docs/MpcStakeSource.md +11 -0
  321. package/docs/OAuthApi.md +2 -2
  322. package/docs/PoolDetails.md +13 -13
  323. package/docs/PoolDetailsAllOfValidatorsInfo.md +6 -6
  324. package/docs/PoolSummary.md +6 -6
  325. package/docs/RawMessageSignDestination.md +10 -0
  326. package/docs/StakeSourceType.md +10 -0
  327. package/docs/StakingPoolType.md +0 -4
  328. package/docs/StakingSource.md +1 -3
  329. package/docs/Stakings.md +10 -13
  330. package/docs/StakingsApi.md +570 -0
  331. package/docs/StakingsExtra.md +14 -0
  332. package/docs/StakingsValidatorInfo.md +5 -5
  333. package/docs/TokenInfo.md +2 -0
  334. package/docs/TransactionDepositToAddressDestination.md +1 -1
  335. package/docs/TransactionDepositToWalletDestination.md +1 -1
  336. package/docs/TransactionDestination.md +2 -2
  337. package/docs/TransactionEvmContractDestination.md +1 -1
  338. package/docs/TransactionTokeApproval.md +2 -0
  339. package/docs/TransactionTransferToAddressDestinationAccountOutput.md +1 -1
  340. package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +1 -1
  341. package/docs/TransactionTransferToWalletDestination.md +1 -1
  342. package/docs/TransactionType.md +4 -0
  343. package/docs/TransactionsApi.md +110 -2
  344. package/docs/TransferDestination.md +1 -1
  345. package/docs/WalletBalanceSnapshot.md +10 -0
  346. package/docs/WalletBalanceSnapshotRecord.md +13 -0
  347. package/docs/WalletsApi.md +0 -55
  348. package/docs/WalletsExchangeWalletApi.md +2 -2
  349. package/package.json +2 -2
@@ -18,7 +18,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
18
18
  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); } /**
19
19
  * Cobo Wallet as a Service 2.0
20
20
  *
21
- * Contact: support@cobo.com
21
+ * Contact: help@cobo.com
22
22
  *
23
23
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
24
  * https://openapi-generator.tech
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var TransactionDepositFromLoopSource = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>TransactionDepositFromLoopSource</code>.
35
- * Information about the transaction source type &#x60;DepositFromLoop&#x60;.
35
+ * Information about the transaction source type &#x60;DepositFromLoop&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
36
36
  * @alias module:model/TransactionDepositFromLoopSource
37
37
  * @param source_type {module:model/TransactionSourceType}
38
38
  */
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); } /**
21
21
  * Cobo Wallet as a Service 2.0
22
22
  *
23
- * Contact: support@cobo.com
23
+ * Contact: help@cobo.com
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
26
  * https://openapi-generator.tech
@@ -34,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var TransactionDepositFromWalletSource = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>TransactionDepositFromWalletSource</code>.
37
- * Information about the transaction source type &#x60;DepositFromWallet&#x60;.
37
+ * Information about the transaction source type &#x60;DepositFromWallet&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
38
38
  * @alias module:model/TransactionDepositFromWalletSource
39
39
  * @param source_type {module:model/TransactionSourceType}
40
40
  * @param wallet_id {String} The wallet ID.
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); } /**
21
21
  * Cobo Wallet as a Service 2.0
22
22
  *
23
- * Contact: support@cobo.com
23
+ * Contact: help@cobo.com
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
26
  * https://openapi-generator.tech
@@ -34,13 +34,13 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var TransactionDepositToAddressDestination = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>TransactionDepositToAddressDestination</code>.
37
- * Information about the transaction destination type &#x60;DepositToAddress&#x60;.
37
+ * Information about the transaction destination type &#x60;DepositToAddress&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction destinations.
38
38
  * @alias module:model/TransactionDepositToAddressDestination
39
39
  * @param destination_type {module:model/TransactionDestinationType}
40
40
  * @param wallet_id {String} The wallet ID.
41
41
  * @param wallet_type {module:model/WalletType}
42
42
  * @param address {String} The destination address.
43
- * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
43
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
44
44
  */
45
45
  function TransactionDepositToAddressDestination(destination_type, wallet_id, wallet_type, address, amount) {
46
46
  _classCallCheck(this, TransactionDepositToAddressDestination);
@@ -178,7 +178,7 @@ TransactionDepositToAddressDestination.prototype['address'] = undefined;
178
178
  TransactionDepositToAddressDestination.prototype['memo'] = undefined;
179
179
 
180
180
  /**
181
- * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
181
+ * The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
182
182
  * @member {String} amount
183
183
  */
184
184
  TransactionDepositToAddressDestination.prototype['amount'] = undefined;
@@ -21,7 +21,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
21
21
  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); } /**
22
22
  * Cobo Wallet as a Service 2.0
23
23
  *
24
- * Contact: support@cobo.com
24
+ * Contact: help@cobo.com
25
25
  *
26
26
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
27
  * https://openapi-generator.tech
@@ -35,13 +35,13 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
35
35
  var TransactionDepositToWalletDestination = /*#__PURE__*/function () {
36
36
  /**
37
37
  * Constructs a new <code>TransactionDepositToWalletDestination</code>.
38
- * Information about the transaction destination type &#x60;DepositToWallet&#x60;.
38
+ * Information about the transaction destination type &#x60;DepositToWallet&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction destinations.
39
39
  * @alias module:model/TransactionDepositToWalletDestination
40
40
  * @param destination_type {module:model/TransactionDestinationType}
41
41
  * @param wallet_id {String} The wallet ID.
42
42
  * @param wallet_type {module:model/WalletType}
43
43
  * @param wallet_subtype {module:model/WalletSubtype}
44
- * @param amount {String} The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
44
+ * @param amount {String} The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
45
45
  */
46
46
  function TransactionDepositToWalletDestination(destination_type, wallet_id, wallet_type, wallet_subtype, amount) {
47
47
  _classCallCheck(this, TransactionDepositToWalletDestination);
@@ -174,7 +174,7 @@ TransactionDepositToWalletDestination.prototype['trading_account_type'] = undefi
174
174
  TransactionDepositToWalletDestination.prototype['exchange_id'] = undefined;
175
175
 
176
176
  /**
177
- * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
177
+ * The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
178
178
  * @member {String} amount
179
179
  */
180
180
  TransactionDepositToWalletDestination.prototype['amount'] = undefined;
@@ -29,7 +29,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
29
29
  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); } /**
30
30
  * Cobo Wallet as a Service 2.0
31
31
  *
32
- * Contact: support@cobo.com
32
+ * Contact: help@cobo.com
33
33
  *
34
34
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
35
35
  * https://openapi-generator.tech
@@ -62,6 +62,43 @@ var TransactionDestination = /*#__PURE__*/function () {
62
62
  }
63
63
  var match = 0;
64
64
  var errorMessages = [];
65
+ var discriminatorValue = instance["destination_type"];
66
+ if (discriminatorValue) {
67
+ switch (discriminatorValue) {
68
+ case "Address":
69
+ this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
70
+ match++;
71
+ break;
72
+ case "DepositToAddress":
73
+ this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
74
+ match++;
75
+ break;
76
+ case "DepositToWallet":
77
+ this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
78
+ match++;
79
+ break;
80
+ case "EVM_Contract":
81
+ this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
82
+ match++;
83
+ break;
84
+ case "EVM_EIP_191_Signature":
85
+ this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
86
+ match++;
87
+ break;
88
+ case "EVM_EIP_712_Signature":
89
+ this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
90
+ match++;
91
+ break;
92
+ case "ExchangeWallet":
93
+ this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
94
+ match++;
95
+ break;
96
+ default:
97
+ errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
98
+ break;
99
+ }
100
+ return;
101
+ }
65
102
  try {
66
103
  if (instance instanceof _TransactionTransferToAddressDestination["default"]) {
67
104
  this.actualInstance = instance;
@@ -69,8 +106,16 @@ var TransactionDestination = /*#__PURE__*/function () {
69
106
  // plain JS object
70
107
  // create TransactionTransferToAddressDestination from JS object
71
108
  this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
72
- } else if (_TransactionTransferToAddressDestination["default"].constructFromObject(instance)) {
73
- this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
109
+ } else {
110
+ if (_TransactionTransferToAddressDestination["default"].constructFromObject(instance)) {
111
+ if (!!_TransactionTransferToAddressDestination["default"].constructFromObject(instance).toJSON) {
112
+ if (_TransactionTransferToAddressDestination["default"].constructFromObject(instance).toJSON()) {
113
+ this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
114
+ }
115
+ } else {
116
+ this.actualInstance = _TransactionTransferToAddressDestination["default"].constructFromObject(instance);
117
+ }
118
+ }
74
119
  }
75
120
  match++;
76
121
  } catch (err) {
@@ -84,8 +129,16 @@ var TransactionDestination = /*#__PURE__*/function () {
84
129
  // plain JS object
85
130
  // create TransactionTransferToWalletDestination from JS object
86
131
  this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
87
- } else if (_TransactionTransferToWalletDestination["default"].constructFromObject(instance)) {
88
- this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
132
+ } else {
133
+ if (_TransactionTransferToWalletDestination["default"].constructFromObject(instance)) {
134
+ if (!!_TransactionTransferToWalletDestination["default"].constructFromObject(instance).toJSON) {
135
+ if (_TransactionTransferToWalletDestination["default"].constructFromObject(instance).toJSON()) {
136
+ this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
137
+ }
138
+ } else {
139
+ this.actualInstance = _TransactionTransferToWalletDestination["default"].constructFromObject(instance);
140
+ }
141
+ }
89
142
  }
90
143
  match++;
91
144
  } catch (err) {
@@ -99,8 +152,16 @@ var TransactionDestination = /*#__PURE__*/function () {
99
152
  // plain JS object
100
153
  // create TransactionEvmContractDestination from JS object
101
154
  this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
102
- } else if (_TransactionEvmContractDestination["default"].constructFromObject(instance)) {
103
- this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
155
+ } else {
156
+ if (_TransactionEvmContractDestination["default"].constructFromObject(instance)) {
157
+ if (!!_TransactionEvmContractDestination["default"].constructFromObject(instance).toJSON) {
158
+ if (_TransactionEvmContractDestination["default"].constructFromObject(instance).toJSON()) {
159
+ this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
160
+ }
161
+ } else {
162
+ this.actualInstance = _TransactionEvmContractDestination["default"].constructFromObject(instance);
163
+ }
164
+ }
104
165
  }
105
166
  match++;
106
167
  } catch (err) {
@@ -114,8 +175,16 @@ var TransactionDestination = /*#__PURE__*/function () {
114
175
  // plain JS object
115
176
  // create TransactionMessageSignEIP191Destination from JS object
116
177
  this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
117
- } else if (_TransactionMessageSignEIP191Destination["default"].constructFromObject(instance)) {
118
- this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
178
+ } else {
179
+ if (_TransactionMessageSignEIP191Destination["default"].constructFromObject(instance)) {
180
+ if (!!_TransactionMessageSignEIP191Destination["default"].constructFromObject(instance).toJSON) {
181
+ if (_TransactionMessageSignEIP191Destination["default"].constructFromObject(instance).toJSON()) {
182
+ this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
183
+ }
184
+ } else {
185
+ this.actualInstance = _TransactionMessageSignEIP191Destination["default"].constructFromObject(instance);
186
+ }
187
+ }
119
188
  }
120
189
  match++;
121
190
  } catch (err) {
@@ -129,8 +198,16 @@ var TransactionDestination = /*#__PURE__*/function () {
129
198
  // plain JS object
130
199
  // create TransactionMessageSignEIP712Destination from JS object
131
200
  this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
132
- } else if (_TransactionMessageSignEIP712Destination["default"].constructFromObject(instance)) {
133
- this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
201
+ } else {
202
+ if (_TransactionMessageSignEIP712Destination["default"].constructFromObject(instance)) {
203
+ if (!!_TransactionMessageSignEIP712Destination["default"].constructFromObject(instance).toJSON) {
204
+ if (_TransactionMessageSignEIP712Destination["default"].constructFromObject(instance).toJSON()) {
205
+ this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
206
+ }
207
+ } else {
208
+ this.actualInstance = _TransactionMessageSignEIP712Destination["default"].constructFromObject(instance);
209
+ }
210
+ }
134
211
  }
135
212
  match++;
136
213
  } catch (err) {
@@ -144,8 +221,16 @@ var TransactionDestination = /*#__PURE__*/function () {
144
221
  // plain JS object
145
222
  // create TransactionDepositToAddressDestination from JS object
146
223
  this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
147
- } else if (_TransactionDepositToAddressDestination["default"].constructFromObject(instance)) {
148
- this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
224
+ } else {
225
+ if (_TransactionDepositToAddressDestination["default"].constructFromObject(instance)) {
226
+ if (!!_TransactionDepositToAddressDestination["default"].constructFromObject(instance).toJSON) {
227
+ if (_TransactionDepositToAddressDestination["default"].constructFromObject(instance).toJSON()) {
228
+ this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
229
+ }
230
+ } else {
231
+ this.actualInstance = _TransactionDepositToAddressDestination["default"].constructFromObject(instance);
232
+ }
233
+ }
149
234
  }
150
235
  match++;
151
236
  } catch (err) {
@@ -159,8 +244,16 @@ var TransactionDestination = /*#__PURE__*/function () {
159
244
  // plain JS object
160
245
  // create TransactionDepositToWalletDestination from JS object
161
246
  this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
162
- } else if (_TransactionDepositToWalletDestination["default"].constructFromObject(instance)) {
163
- this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
247
+ } else {
248
+ if (_TransactionDepositToWalletDestination["default"].constructFromObject(instance)) {
249
+ if (!!_TransactionDepositToWalletDestination["default"].constructFromObject(instance).toJSON) {
250
+ if (_TransactionDepositToWalletDestination["default"].constructFromObject(instance).toJSON()) {
251
+ this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
252
+ }
253
+ } else {
254
+ this.actualInstance = _TransactionDepositToWalletDestination["default"].constructFromObject(instance);
255
+ }
256
+ }
164
257
  }
165
258
  match++;
166
259
  } catch (err) {
@@ -275,7 +368,7 @@ TransactionDestination.prototype['trading_account_type'] = undefined;
275
368
  TransactionDestination.prototype['exchange_id'] = undefined;
276
369
 
277
370
  /**
278
- * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
371
+ * The transfer amount. For example, if you trade 1.5 BTC, then the value is `1.5`.
279
372
  * @member {String} amount
280
373
  */
281
374
  TransactionDestination.prototype['amount'] = undefined;
@@ -294,7 +387,7 @@ TransactionDestination.prototype['value'] = undefined;
294
387
 
295
388
  /**
296
389
  * The data that is used to invoke a specific function or method within the specified contract at the destination address.
297
- * @member {Blob} calldata
390
+ * @member {String} calldata
298
391
  */
299
392
  TransactionDestination.prototype['calldata'] = undefined;
300
393
 
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
15
15
  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); } /**
16
16
  * Cobo Wallet as a Service 2.0
17
17
  *
18
- * Contact: support@cobo.com
18
+ * Contact: help@cobo.com
19
19
  *
20
20
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
21
  * https://openapi-generator.tech
@@ -30,7 +30,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
30
30
  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); } /**
31
31
  * Cobo Wallet as a Service 2.0
32
32
  *
33
- * Contact: support@cobo.com
33
+ * Contact: help@cobo.com
34
34
  *
35
35
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
36
36
  * https://openapi-generator.tech
@@ -33,7 +33,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
33
33
  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); } /**
34
34
  * Cobo Wallet as a Service 2.0
35
35
  *
36
- * Contact: support@cobo.com
36
+ * Contact: help@cobo.com
37
37
  *
38
38
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
39
39
  * https://openapi-generator.tech
@@ -18,7 +18,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
18
18
  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); } /**
19
19
  * Cobo Wallet as a Service 2.0
20
20
  *
21
- * Contact: support@cobo.com
21
+ * Contact: help@cobo.com
22
22
  *
23
23
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
24
  * https://openapi-generator.tech
@@ -32,11 +32,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
32
  var TransactionEvmContractDestination = /*#__PURE__*/function () {
33
33
  /**
34
34
  * Constructs a new <code>TransactionEvmContractDestination</code>.
35
- * Information about the transaction destination type &#x60;EVM_Contract&#x60;.
35
+ * Information about the transaction destination type &#x60;EVM_Contract&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction destinations.
36
36
  * @alias module:model/TransactionEvmContractDestination
37
37
  * @param destination_type {module:model/TransactionDestinationType}
38
38
  * @param address {String} The destination address.
39
- * @param calldata {Blob} The data that is used to invoke a specific function or method within the specified contract at the destination address.
39
+ * @param calldata {String} The data that is used to invoke a specific function or method within the specified contract at the destination address.
40
40
  */
41
41
  function TransactionEvmContractDestination(destination_type, address, calldata) {
42
42
  _classCallCheck(this, TransactionEvmContractDestination);
@@ -78,7 +78,7 @@ var TransactionEvmContractDestination = /*#__PURE__*/function () {
78
78
  obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
79
79
  }
80
80
  if (data.hasOwnProperty('calldata')) {
81
- obj['calldata'] = _ApiClient["default"].convertToType(data['calldata'], 'Blob');
81
+ obj['calldata'] = _ApiClient["default"].convertToType(data['calldata'], 'String');
82
82
  }
83
83
  }
84
84
  return obj;
@@ -115,6 +115,10 @@ var TransactionEvmContractDestination = /*#__PURE__*/function () {
115
115
  if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
116
116
  throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
117
117
  }
118
+ // ensure the json data is a string
119
+ if (data['calldata'] && !(typeof data['calldata'] === 'string' || data['calldata'] instanceof String)) {
120
+ throw new Error("Expected the field `calldata` to be a primitive type in the JSON string but got " + data['calldata']);
121
+ }
118
122
  return true;
119
123
  }
120
124
  }]);
@@ -140,7 +144,7 @@ TransactionEvmContractDestination.prototype['value'] = undefined;
140
144
 
141
145
  /**
142
146
  * The data that is used to invoke a specific function or method within the specified contract at the destination address.
143
- * @member {Blob} calldata
147
+ * @member {String} calldata
144
148
  */
145
149
  TransactionEvmContractDestination.prototype['calldata'] = undefined;
146
150
  var _default = exports["default"] = TransactionEvmContractDestination;
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); } /**
21
21
  * Cobo Wallet as a Service 2.0
22
22
  *
23
- * Contact: support@cobo.com
23
+ * Contact: help@cobo.com
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
26
  * https://openapi-generator.tech
@@ -34,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var TransactionEvmEip1559Fee = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>TransactionEvmEip1559Fee</code>.
37
- * The transaction fee actually charged by the chain that uses the EIP-1559 fee model. The transaction fee is calculated by multiplying the gas price by the used gas units. This can be expressed as: Transaction fee &#x3D; gas price * used gas units.
37
+ * The transaction fee actually charged by the chain that uses the EIP-1559 fee model. The transaction fee is calculated by multiplying the gas price by the used gas units. This can be expressed as: Transaction fee &#x3D; gas price * used gas units. Switch between the tabs to display the properties for different transaction fee models.
38
38
  * @alias module:model/TransactionEvmEip1559Fee
39
39
  * @implements module:model/EvmEip1559FeeBasePrice
40
40
  * @implements module:model/FeeGasLimit
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); } /**
21
21
  * Cobo Wallet as a Service 2.0
22
22
  *
23
- * Contact: support@cobo.com
23
+ * Contact: help@cobo.com
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
26
  * https://openapi-generator.tech
@@ -34,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var TransactionEvmLegacyFee = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>TransactionEvmLegacyFee</code>.
37
- * The transaction fee actually charged by the chain that uses the legacy fee model. The transaction fee is calculated by multiplying the gas price by the used gas. This can be expressed as: Transaction fee &#x3D; gas price * used gas units.
37
+ * The transaction fee actually charged by the chain that uses the legacy fee model. The transaction fee is calculated by multiplying the gas price by the used gas. This can be expressed as: Transaction fee &#x3D; gas price * used gas units. Switch between the tabs to display the properties for different transaction fee models.
38
38
  * @alias module:model/TransactionEvmLegacyFee
39
39
  * @implements module:model/EvmLegacyFeeBasePrice
40
40
  * @implements module:model/FeeGasLimit
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
19
  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); } /**
20
20
  * Cobo Wallet as a Service 2.0
21
21
  *
22
- * Contact: support@cobo.com
22
+ * Contact: help@cobo.com
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  var TransactionExchangeWalletSource = /*#__PURE__*/function () {
34
34
  /**
35
35
  * Constructs a new <code>TransactionExchangeWalletSource</code>.
36
- * Information about the transaction source types &#x60;Main&#x60; and &#x60;Sub&#x60;.
36
+ * Information about the transaction source types &#x60;Main&#x60; and &#x60;Sub&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
37
37
  * @alias module:model/TransactionExchangeWalletSource
38
38
  * @param source_type {module:model/TransactionSourceType}
39
39
  * @param exchange_id {module:model/ExchangeId}
@@ -21,7 +21,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
21
21
  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); } /**
22
22
  * Cobo Wallet as a Service 2.0
23
23
  *
24
- * Contact: support@cobo.com
24
+ * Contact: help@cobo.com
25
25
  *
26
26
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
27
  * https://openapi-generator.tech
@@ -54,6 +54,31 @@ var TransactionFee = /*#__PURE__*/function () {
54
54
  }
55
55
  var match = 0;
56
56
  var errorMessages = [];
57
+ var discriminatorValue = instance["fee_type"];
58
+ if (discriminatorValue) {
59
+ switch (discriminatorValue) {
60
+ case "EVM_EIP_1559":
61
+ this.actualInstance = _TransactionEvmEip1559Fee["default"].constructFromObject(instance);
62
+ match++;
63
+ break;
64
+ case "EVM_Legacy":
65
+ this.actualInstance = _TransactionEvmLegacyFee["default"].constructFromObject(instance);
66
+ match++;
67
+ break;
68
+ case "Fixed":
69
+ this.actualInstance = _TransactionFixedFee["default"].constructFromObject(instance);
70
+ match++;
71
+ break;
72
+ case "UTXO":
73
+ this.actualInstance = _TransactionUtxoFee["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 _TransactionEvmEip1559Fee["default"]) {
59
84
  this.actualInstance = instance;
@@ -61,8 +86,16 @@ var TransactionFee = /*#__PURE__*/function () {
61
86
  // plain JS object
62
87
  // create TransactionEvmEip1559Fee from JS object
63
88
  this.actualInstance = _TransactionEvmEip1559Fee["default"].constructFromObject(instance);
64
- } else if (_TransactionEvmEip1559Fee["default"].constructFromObject(instance)) {
65
- this.actualInstance = _TransactionEvmEip1559Fee["default"].constructFromObject(instance);
89
+ } else {
90
+ if (_TransactionEvmEip1559Fee["default"].constructFromObject(instance)) {
91
+ if (!!_TransactionEvmEip1559Fee["default"].constructFromObject(instance).toJSON) {
92
+ if (_TransactionEvmEip1559Fee["default"].constructFromObject(instance).toJSON()) {
93
+ this.actualInstance = _TransactionEvmEip1559Fee["default"].constructFromObject(instance);
94
+ }
95
+ } else {
96
+ this.actualInstance = _TransactionEvmEip1559Fee["default"].constructFromObject(instance);
97
+ }
98
+ }
66
99
  }
67
100
  match++;
68
101
  } catch (err) {
@@ -76,8 +109,16 @@ var TransactionFee = /*#__PURE__*/function () {
76
109
  // plain JS object
77
110
  // create TransactionEvmLegacyFee from JS object
78
111
  this.actualInstance = _TransactionEvmLegacyFee["default"].constructFromObject(instance);
79
- } else if (_TransactionEvmLegacyFee["default"].constructFromObject(instance)) {
80
- this.actualInstance = _TransactionEvmLegacyFee["default"].constructFromObject(instance);
112
+ } else {
113
+ if (_TransactionEvmLegacyFee["default"].constructFromObject(instance)) {
114
+ if (!!_TransactionEvmLegacyFee["default"].constructFromObject(instance).toJSON) {
115
+ if (_TransactionEvmLegacyFee["default"].constructFromObject(instance).toJSON()) {
116
+ this.actualInstance = _TransactionEvmLegacyFee["default"].constructFromObject(instance);
117
+ }
118
+ } else {
119
+ this.actualInstance = _TransactionEvmLegacyFee["default"].constructFromObject(instance);
120
+ }
121
+ }
81
122
  }
82
123
  match++;
83
124
  } catch (err) {
@@ -91,8 +132,16 @@ var TransactionFee = /*#__PURE__*/function () {
91
132
  // plain JS object
92
133
  // create TransactionUtxoFee from JS object
93
134
  this.actualInstance = _TransactionUtxoFee["default"].constructFromObject(instance);
94
- } else if (_TransactionUtxoFee["default"].constructFromObject(instance)) {
95
- this.actualInstance = _TransactionUtxoFee["default"].constructFromObject(instance);
135
+ } else {
136
+ if (_TransactionUtxoFee["default"].constructFromObject(instance)) {
137
+ if (!!_TransactionUtxoFee["default"].constructFromObject(instance).toJSON) {
138
+ if (_TransactionUtxoFee["default"].constructFromObject(instance).toJSON()) {
139
+ this.actualInstance = _TransactionUtxoFee["default"].constructFromObject(instance);
140
+ }
141
+ } else {
142
+ this.actualInstance = _TransactionUtxoFee["default"].constructFromObject(instance);
143
+ }
144
+ }
96
145
  }
97
146
  match++;
98
147
  } catch (err) {
@@ -106,8 +155,16 @@ var TransactionFee = /*#__PURE__*/function () {
106
155
  // plain JS object
107
156
  // create TransactionFixedFee from JS object
108
157
  this.actualInstance = _TransactionFixedFee["default"].constructFromObject(instance);
109
- } else if (_TransactionFixedFee["default"].constructFromObject(instance)) {
110
- this.actualInstance = _TransactionFixedFee["default"].constructFromObject(instance);
158
+ } else {
159
+ if (_TransactionFixedFee["default"].constructFromObject(instance)) {
160
+ if (!!_TransactionFixedFee["default"].constructFromObject(instance).toJSON) {
161
+ if (_TransactionFixedFee["default"].constructFromObject(instance).toJSON()) {
162
+ this.actualInstance = _TransactionFixedFee["default"].constructFromObject(instance);
163
+ }
164
+ } else {
165
+ this.actualInstance = _TransactionFixedFee["default"].constructFromObject(instance);
166
+ }
167
+ }
111
168
  }
112
169
  match++;
113
170
  } catch (err) {
@@ -18,7 +18,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
18
18
  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); } /**
19
19
  * Cobo Wallet as a Service 2.0
20
20
  *
21
- * Contact: support@cobo.com
21
+ * Contact: help@cobo.com
22
22
  *
23
23
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
24
  * https://openapi-generator.tech
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
19
  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); } /**
20
20
  * Cobo Wallet as a Service 2.0
21
21
  *
22
- * Contact: support@cobo.com
22
+ * Contact: help@cobo.com
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  var TransactionFixedFee = /*#__PURE__*/function () {
34
34
  /**
35
35
  * Constructs a new <code>TransactionFixedFee</code>.
36
- * The transaction fee actually charged by the chain that uses the fixed fee model.
36
+ * The transaction fee actually charged by the chain that uses the fixed fee model. Switch between the tabs to display the properties for different transaction fee models.
37
37
  * @alias module:model/TransactionFixedFee
38
38
  * @implements module:model/MaxFeeAmount
39
39
  * @param fee_type {module:model/FeeType}
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
15
15
  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); } /**
16
16
  * Cobo Wallet as a Service 2.0
17
17
  *
18
- * Contact: support@cobo.com
18
+ * Contact: help@cobo.com
19
19
  *
20
20
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
21
  * https://openapi-generator.tech
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
19
  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); } /**
20
20
  * Cobo Wallet as a Service 2.0
21
21
  *
22
- * Contact: support@cobo.com
22
+ * Contact: help@cobo.com
23
23
  *
24
24
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
25
  * https://openapi-generator.tech
@@ -33,7 +33,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
33
33
  var TransactionMPCWalletSource = /*#__PURE__*/function () {
34
34
  /**
35
35
  * Constructs a new <code>TransactionMPCWalletSource</code>.
36
- * Information about the transaction source type &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;.
36
+ * Information about the transaction source type &#x60;Org-Controlled&#x60; and &#x60;User-Controlled&#x60;. Refer to [Transaction sources and destinations](/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. Switch between the tabs to display the properties for different transaction sources.
37
37
  * @alias module:model/TransactionMPCWalletSource
38
38
  * @param source_type {module:model/TransactionSourceType}
39
39
  * @param wallet_id {String} The wallet ID.