@cobo/cobo-waas2 1.26.0 → 1.28.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 (262) hide show
  1. package/README.md +96 -4
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/api/AddressBooksApi.js +2 -2
  4. package/dist/api/AutoSweepApi.js +4 -4
  5. package/dist/api/DevelopersWebhooksApi.js +2 -2
  6. package/dist/api/OAuthApi.js +4 -4
  7. package/dist/api/PaymentApi.js +1847 -294
  8. package/dist/api/StakingsApi.js +44 -2
  9. package/dist/api/SwapsApi.js +2 -2
  10. package/dist/api/TransactionsApi.js +6 -6
  11. package/dist/api/WalletsApi.js +14 -14
  12. package/dist/index.js +420 -7
  13. package/dist/model/AddressesEventData.js +8 -3
  14. package/dist/model/AllocationRecord.js +193 -0
  15. package/dist/model/AllocationRequest.js +167 -0
  16. package/dist/model/BabylonCreateStakingExpansion.js +157 -0
  17. package/dist/model/BabylonStakeExtra.js +26 -0
  18. package/dist/model/BabylonStakingRegistration.js +1 -1
  19. package/dist/model/BalanceUpdateInfoEventData.js +8 -3
  20. package/dist/model/BankAccountStatus.js +66 -0
  21. package/dist/model/BatchAllocation.js +190 -0
  22. package/dist/model/BatchAllocationDetail.js +188 -0
  23. package/dist/model/ChainsEventData.js +8 -3
  24. package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
  25. package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
  26. package/dist/model/ContractCallDestination.js +72 -10
  27. package/dist/model/ContractCallDestinationType.js +10 -0
  28. package/dist/model/CosmosContractCallDestination.js +0 -13
  29. package/dist/model/Counterparty.js +195 -0
  30. package/dist/model/CounterpartyDetail.js +228 -0
  31. package/dist/model/CounterpartyType.js +61 -0
  32. package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
  33. package/dist/model/CreateBatchAllocationRequest.js +142 -0
  34. package/dist/model/CreateCounterpartyRequest.js +193 -0
  35. package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
  36. package/dist/model/CreateCustodialWalletParams.js +1 -1
  37. package/dist/model/CreateDestinationBankAccount.js +257 -0
  38. package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
  39. package/dist/model/CreateDestinationRequest.js +235 -0
  40. package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
  41. package/dist/model/CreateExchangeWalletParams.js +2 -2
  42. package/dist/model/CreateKeyShareHolder.js +1 -1
  43. package/dist/model/CreateMerchantRequest.js +1 -1
  44. package/dist/model/CreateMpcWalletParams.js +2 -2
  45. package/dist/model/CreatePaymentOrderRequest.js +115 -68
  46. package/dist/model/CreatePayoutRequest.js +192 -0
  47. package/dist/model/CreateRefundRequest.js +3 -3
  48. package/dist/model/CreateSafeWalletParams.js +1 -1
  49. package/dist/model/CreateSettlement.js +14 -1
  50. package/dist/model/CreateSettlementRequestRequest.js +1 -1
  51. package/dist/model/CreateSmartContractWalletParams.js +1 -1
  52. package/dist/model/CreateStakeActivityExtra.js +12 -0
  53. package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
  54. package/dist/model/CreateWalletParams.js +1 -1
  55. package/dist/model/DeleteCounterparty200Response.js +110 -0
  56. package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
  57. package/dist/model/DeleteDestination200Response.js +110 -0
  58. package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
  59. package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
  60. package/dist/model/Destination.js +208 -0
  61. package/dist/model/DestinationBankAccount.js +301 -0
  62. package/dist/model/DestinationBankAccountDetail.js +394 -0
  63. package/dist/model/DestinationDetail.js +272 -0
  64. package/dist/model/DestinationType.js +61 -0
  65. package/dist/model/DestinationWalletAddressDetail.js +205 -0
  66. package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
  67. package/dist/model/EvmContractCallDestination.js +2 -2
  68. package/dist/model/ExchangeRate.js +140 -0
  69. package/dist/model/GetExchangeRate200Response.js +2 -2
  70. package/dist/model/IntermediaryBankInfo.js +140 -0
  71. package/dist/model/Link.js +4 -4
  72. package/dist/model/LinkDisplayInfo.js +15 -2
  73. package/dist/model/ListAllocations200Response.js +123 -0
  74. package/dist/model/ListBatchAllocations200Response.js +123 -0
  75. package/dist/model/ListCounterparties200Response.js +123 -0
  76. package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
  77. package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
  78. package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
  79. package/dist/model/ListDestinations200Response.js +123 -0
  80. package/dist/model/ListPayoutItems200Response.js +123 -0
  81. package/dist/model/ListPayouts200Response.js +123 -0
  82. package/dist/model/MPCVaultEventData.js +8 -3
  83. package/dist/model/MerchantBalance.js +28 -2
  84. package/dist/model/Order.js +135 -102
  85. package/dist/model/OrderLinkBusinessInfo.js +151 -87
  86. package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
  87. package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
  88. package/dist/model/PaymentAddressUpdateEventData.js +8 -3
  89. package/dist/model/PaymentAllocationAmount.js +125 -0
  90. package/dist/model/PaymentOrderEventData.js +198 -145
  91. package/dist/model/PaymentPayout.js +250 -0
  92. package/dist/model/PaymentPayoutDetail.js +248 -0
  93. package/dist/model/PaymentPayoutEvent.js +433 -0
  94. package/dist/model/PaymentPayoutItem.js +298 -0
  95. package/dist/model/PaymentPayoutItemDetail.js +298 -0
  96. package/dist/model/PaymentPayoutItemStatus.js +76 -0
  97. package/dist/model/PaymentPayoutParam.js +165 -0
  98. package/dist/model/PaymentPayoutStatus.js +81 -0
  99. package/dist/model/PaymentRefundEventData.js +8 -3
  100. package/dist/model/PaymentSettlementEvent.js +8 -3
  101. package/dist/model/PaymentSourceType.js +61 -0
  102. package/dist/model/PaymentTransaction.js +32 -0
  103. package/dist/model/PaymentTransactionEventData.js +10 -5
  104. package/dist/model/PspBalance.js +28 -2
  105. package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
  106. package/dist/model/RefundLinkBusinessInfo.js +6 -6
  107. package/dist/model/SettlementDetail.js +13 -0
  108. package/dist/model/Stakings.js +33 -6
  109. package/dist/model/SuspendedTokenEventData.js +8 -3
  110. package/dist/model/SwapActivity.js +1 -1
  111. package/dist/model/SwapActivityDetail.js +2 -2
  112. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  113. package/dist/model/TokenListingEventData.js +8 -3
  114. package/dist/model/TokensEventData.js +8 -3
  115. package/dist/model/Transaction.js +1 -1
  116. package/dist/model/TransactionCosmosContractDestination.js +0 -13
  117. package/dist/model/TransactionDestination.js +38 -10
  118. package/dist/model/TransactionDestinationType.js +5 -0
  119. package/dist/model/TransactionDetail.js +2 -2
  120. package/dist/model/TransactionDetails.js +2 -2
  121. package/dist/model/TransactionTronContractDestination.js +150 -0
  122. package/dist/model/TransactionWebhookEventData.js +10 -5
  123. package/dist/model/TronContractCallDestination.js +150 -0
  124. package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
  125. package/dist/model/UpdateDestinationBankAccount.js +257 -0
  126. package/dist/model/UpdateDestinationByIdRequest.js +173 -0
  127. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  128. package/dist/model/WalletAddress.js +151 -0
  129. package/dist/model/WalletInfoEventData.js +8 -3
  130. package/dist/model/WebhookEventData.js +107 -43
  131. package/dist/model/WebhookEventDataType.js +7 -2
  132. package/dist/model/WebhookEventType.js +10 -0
  133. package/docs/AddressBooksApi.md +1 -1
  134. package/docs/AddressesEventData.md +3 -1
  135. package/docs/AllocationRecord.md +15 -0
  136. package/docs/AllocationRequest.md +13 -0
  137. package/docs/AutoSweepApi.md +2 -2
  138. package/docs/BabylonCreateStakingExpansion.md +12 -0
  139. package/docs/BabylonStakeExtra.md +2 -0
  140. package/docs/BalanceUpdateInfoEventData.md +3 -1
  141. package/docs/BankAccountStatus.md +14 -0
  142. package/docs/BatchAllocation.md +14 -0
  143. package/docs/BatchAllocationDetail.md +14 -0
  144. package/docs/ChainsEventData.md +3 -1
  145. package/docs/ComplianceDispositionUpdateEventData.md +3 -1
  146. package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
  147. package/docs/ContractCallDestination.md +3 -2
  148. package/docs/ContractCallDestinationType.md +4 -0
  149. package/docs/CosmosContractCallDestination.md +0 -1
  150. package/docs/Counterparty.md +16 -0
  151. package/docs/CounterpartyDetail.md +17 -0
  152. package/docs/CounterpartyType.md +12 -0
  153. package/docs/CounterpartyWalletAddressDetail.md +15 -0
  154. package/docs/CreateBatchAllocationRequest.md +10 -0
  155. package/docs/CreateCounterpartyRequest.md +14 -0
  156. package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
  157. package/docs/CreateCustodialWalletParams.md +1 -1
  158. package/docs/CreateDestinationBankAccount.md +19 -0
  159. package/docs/CreateDestinationBankAccountRequest.md +20 -0
  160. package/docs/CreateDestinationRequest.md +16 -0
  161. package/docs/CreateDestinationWalletAddressRequest.md +11 -0
  162. package/docs/CreateExchangeWalletParams.md +1 -1
  163. package/docs/CreateKeyShareHolder.md +1 -1
  164. package/docs/CreateMerchantRequest.md +1 -1
  165. package/docs/CreateMpcWalletParams.md +1 -1
  166. package/docs/CreatePaymentOrderRequest.md +15 -11
  167. package/docs/CreatePayoutRequest.md +14 -0
  168. package/docs/CreateRefundRequest.md +3 -3
  169. package/docs/CreateSafeWalletParams.md +1 -1
  170. package/docs/CreateSettlement.md +2 -1
  171. package/docs/CreateSettlementRequestRequest.md +1 -1
  172. package/docs/CreateSmartContractWalletParams.md +1 -1
  173. package/docs/CreateStakeActivityExtra.md +2 -0
  174. package/docs/CreateWalletAddress.md +10 -0
  175. package/docs/CreateWalletParams.md +1 -1
  176. package/docs/DeleteCounterparty200Response.md +9 -0
  177. package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
  178. package/docs/DeleteDestination200Response.md +9 -0
  179. package/docs/DeleteDestinationBankAccount200Response.md +9 -0
  180. package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
  181. package/docs/Destination.md +17 -0
  182. package/docs/DestinationBankAccount.md +23 -0
  183. package/docs/DestinationBankAccountDetail.md +30 -0
  184. package/docs/DestinationDetail.md +19 -0
  185. package/docs/DestinationType.md +12 -0
  186. package/docs/DestinationWalletAddressDetail.md +16 -0
  187. package/docs/DevelopersWebhooksApi.md +1 -1
  188. package/docs/EnableDestinationWhitelistRequest.md +9 -0
  189. package/docs/EvmContractCallDestination.md +1 -1
  190. package/docs/ExchangeRate.md +11 -0
  191. package/docs/GetExchangeRate200Response.md +1 -1
  192. package/docs/IntermediaryBankInfo.md +11 -0
  193. package/docs/Link.md +2 -2
  194. package/docs/LinkDisplayInfo.md +3 -2
  195. package/docs/ListAllocations200Response.md +10 -0
  196. package/docs/ListBatchAllocations200Response.md +10 -0
  197. package/docs/ListCounterparties200Response.md +10 -0
  198. package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
  199. package/docs/ListDestinationBankAccounts200Response.md +10 -0
  200. package/docs/ListDestinationWalletAddresses200Response.md +10 -0
  201. package/docs/ListDestinations200Response.md +10 -0
  202. package/docs/ListPayoutItems200Response.md +10 -0
  203. package/docs/ListPayouts200Response.md +10 -0
  204. package/docs/MPCVaultEventData.md +3 -1
  205. package/docs/MerchantBalance.md +4 -2
  206. package/docs/OAuthApi.md +2 -2
  207. package/docs/Order.md +16 -13
  208. package/docs/OrderLinkBusinessInfo.md +11 -7
  209. package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
  210. package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
  211. package/docs/PaymentAddressUpdateEventData.md +3 -1
  212. package/docs/PaymentAllocationAmount.md +10 -0
  213. package/docs/PaymentApi.md +2153 -395
  214. package/docs/PaymentOrderEventData.md +19 -14
  215. package/docs/PaymentPayout.md +19 -0
  216. package/docs/PaymentPayoutDetail.md +19 -0
  217. package/docs/PaymentPayoutEvent.md +65 -0
  218. package/docs/PaymentPayoutItem.md +22 -0
  219. package/docs/PaymentPayoutItemDetail.md +22 -0
  220. package/docs/PaymentPayoutItemStatus.md +18 -0
  221. package/docs/PaymentPayoutParam.md +13 -0
  222. package/docs/PaymentPayoutStatus.md +20 -0
  223. package/docs/PaymentRefundEventData.md +3 -1
  224. package/docs/PaymentSettlementEvent.md +3 -1
  225. package/docs/PaymentSourceType.md +12 -0
  226. package/docs/PaymentTransaction.md +2 -0
  227. package/docs/PaymentTransactionEventData.md +4 -2
  228. package/docs/PspBalance.md +4 -2
  229. package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
  230. package/docs/RefundLinkBusinessInfo.md +4 -4
  231. package/docs/SettlementDetail.md +1 -0
  232. package/docs/Stakings.md +2 -1
  233. package/docs/StakingsApi.md +54 -1
  234. package/docs/SuspendedTokenEventData.md +3 -1
  235. package/docs/SwapActivity.md +1 -1
  236. package/docs/SwapActivityDetail.md +1 -1
  237. package/docs/SwapsApi.md +1 -1
  238. package/docs/TSSRequestWebhookEventData.md +3 -1
  239. package/docs/TokenListingEventData.md +3 -1
  240. package/docs/TokensEventData.md +3 -1
  241. package/docs/Transaction.md +1 -1
  242. package/docs/TransactionCosmosContractDestination.md +0 -1
  243. package/docs/TransactionDestination.md +2 -2
  244. package/docs/TransactionDestinationType.md +2 -0
  245. package/docs/TransactionDetail.md +1 -1
  246. package/docs/TransactionDetails.md +1 -1
  247. package/docs/TransactionTronContractDestination.md +12 -0
  248. package/docs/TransactionWebhookEventData.md +4 -2
  249. package/docs/TransactionsApi.md +3 -3
  250. package/docs/TronContractCallDestination.md +12 -0
  251. package/docs/UpdateCounterpartyByIdRequest.md +13 -0
  252. package/docs/UpdateDestinationBankAccount.md +19 -0
  253. package/docs/UpdateDestinationByIdRequest.md +14 -0
  254. package/docs/UpdateMerchantByIdRequest.md +1 -1
  255. package/docs/WalletAddress.md +12 -0
  256. package/docs/WalletInfoEventData.md +3 -1
  257. package/docs/WalletsApi.md +7 -7
  258. package/docs/WebhookEventData.md +22 -14
  259. package/docs/WebhookEventDataType.md +3 -1
  260. package/docs/WebhookEventType.md +4 -0
  261. package/package.json +1 -1
  262. package/docs/ReceivedAmountPerAddress.md +0 -10
@@ -6,12 +6,15 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ContractCallDestinationType = _interopRequireDefault(require("./ContractCallDestinationType"));
9
+ var _CosmosContractCallDestination = _interopRequireDefault(require("./CosmosContractCallDestination"));
10
+ var _CosmosContractCallMessage = _interopRequireDefault(require("./CosmosContractCallMessage"));
9
11
  var _EvmContractCallDestination = _interopRequireDefault(require("./EvmContractCallDestination"));
10
12
  var _SolContractCallAddressLookupTableAccount = _interopRequireDefault(require("./SolContractCallAddressLookupTableAccount"));
11
13
  var _SolContractCallDestination = _interopRequireDefault(require("./SolContractCallDestination"));
12
14
  var _SolContractCallInstruction = _interopRequireDefault(require("./SolContractCallInstruction"));
13
15
  var _StellarContractCallContractParam = _interopRequireDefault(require("./StellarContractCallContractParam"));
14
16
  var _StellarContractCallDestination = _interopRequireDefault(require("./StellarContractCallDestination"));
17
+ var _TronContractCallDestination = _interopRequireDefault(require("./TronContractCallDestination"));
15
18
  var _ContractCallDestination;
16
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
17
20
  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); }
@@ -38,7 +41,7 @@ var ContractCallDestination = /*#__PURE__*/function () {
38
41
  /**
39
42
  * Constructs a new <code>ContractCallDestination</code>.
40
43
  * @alias module:model/ContractCallDestination
41
- * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
44
+ * @param {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} instance The actual instance to initialize ContractCallDestination.
42
45
  */
43
46
  function ContractCallDestination() {
44
47
  var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -59,6 +62,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
59
62
  var discriminatorValue = instance["destination_type"];
60
63
  if (discriminatorValue) {
61
64
  switch (discriminatorValue) {
65
+ case "COSMOS_Contract":
66
+ this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
67
+ match++;
68
+ break;
62
69
  case "EVM_Contract":
63
70
  this.actualInstance = _EvmContractCallDestination["default"].constructFromObject(instance);
64
71
  match++;
@@ -71,6 +78,10 @@ var ContractCallDestination = /*#__PURE__*/function () {
71
78
  this.actualInstance = _StellarContractCallDestination["default"].constructFromObject(instance);
72
79
  match++;
73
80
  break;
81
+ case "TRON_Contract":
82
+ this.actualInstance = _TronContractCallDestination["default"].constructFromObject(instance);
83
+ match++;
84
+ break;
74
85
  default:
75
86
  errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
76
87
  break;
@@ -146,13 +157,59 @@ var ContractCallDestination = /*#__PURE__*/function () {
146
157
  // json data failed to deserialize into StellarContractCallDestination
147
158
  errorMessages.push("Failed to construct StellarContractCallDestination: " + err);
148
159
  }
160
+ try {
161
+ if (instance instanceof _TronContractCallDestination["default"]) {
162
+ this.actualInstance = instance;
163
+ } else if (!!_TronContractCallDestination["default"].validateJSON && _TronContractCallDestination["default"].validateJSON(instance)) {
164
+ // plain JS object
165
+ // create TronContractCallDestination from JS object
166
+ this.actualInstance = _TronContractCallDestination["default"].constructFromObject(instance);
167
+ } else {
168
+ if (_TronContractCallDestination["default"].constructFromObject(instance)) {
169
+ if (!!_TronContractCallDestination["default"].constructFromObject(instance).toJSON) {
170
+ if (_TronContractCallDestination["default"].constructFromObject(instance).toJSON()) {
171
+ this.actualInstance = _TronContractCallDestination["default"].constructFromObject(instance);
172
+ }
173
+ } else {
174
+ this.actualInstance = _TronContractCallDestination["default"].constructFromObject(instance);
175
+ }
176
+ }
177
+ }
178
+ match++;
179
+ } catch (err) {
180
+ // json data failed to deserialize into TronContractCallDestination
181
+ errorMessages.push("Failed to construct TronContractCallDestination: " + err);
182
+ }
183
+ try {
184
+ if (instance instanceof _CosmosContractCallDestination["default"]) {
185
+ this.actualInstance = instance;
186
+ } else if (!!_CosmosContractCallDestination["default"].validateJSON && _CosmosContractCallDestination["default"].validateJSON(instance)) {
187
+ // plain JS object
188
+ // create CosmosContractCallDestination from JS object
189
+ this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
190
+ } else {
191
+ if (_CosmosContractCallDestination["default"].constructFromObject(instance)) {
192
+ if (!!_CosmosContractCallDestination["default"].constructFromObject(instance).toJSON) {
193
+ if (_CosmosContractCallDestination["default"].constructFromObject(instance).toJSON()) {
194
+ this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
195
+ }
196
+ } else {
197
+ this.actualInstance = _CosmosContractCallDestination["default"].constructFromObject(instance);
198
+ }
199
+ }
200
+ }
201
+ match++;
202
+ } catch (err) {
203
+ // json data failed to deserialize into CosmosContractCallDestination
204
+ errorMessages.push("Failed to construct CosmosContractCallDestination: " + err);
205
+ }
149
206
 
150
207
  // if (match > 1) {
151
- // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Input: " + JSON.stringify(instance));
208
+ // throw new Error("Multiple matches found constructing `ContractCallDestination` with oneOf schemas CosmosContractCallDestination, EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Input: " + JSON.stringify(instance));
152
209
  // } else
153
210
  if (match === 0) {
154
211
  // this.actualInstance = null; // clear the actual instance in case there are multiple matches
155
- // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination. Details: " +
212
+ // throw new Error("No match found constructing `ContractCallDestination` with oneOf schemas CosmosContractCallDestination, EvmContractCallDestination, SolContractCallDestination, StellarContractCallDestination, TronContractCallDestination. Details: " +
156
213
  // errorMessages.join(", "));
157
214
  return;
158
215
  } else {// only 1 match
@@ -171,16 +228,16 @@ var ContractCallDestination = /*#__PURE__*/function () {
171
228
  key: "getActualInstance",
172
229
  value:
173
230
  /**
174
- * Gets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
175
- * @return {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} The actual instance.
231
+ * Gets the actual instance, which can be <code>CosmosContractCallDestination</code>, <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
232
+ * @return {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} The actual instance.
176
233
  */
177
234
  function getActualInstance() {
178
235
  return this.actualInstance;
179
236
  }
180
237
 
181
238
  /**
182
- * Sets the actual instance, which can be <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>.
183
- * @param {(module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination)} obj The actual instance.
239
+ * Sets the actual instance, which can be <code>CosmosContractCallDestination</code>, <code>EvmContractCallDestination</code>, <code>SolContractCallDestination</code>, <code>StellarContractCallDestination</code>, <code>TronContractCallDestination</code>.
240
+ * @param {(module:model/CosmosContractCallDestination|module:model/EvmContractCallDestination|module:model/SolContractCallDestination|module:model/StellarContractCallDestination|module:model/TronContractCallDestination)} obj The actual instance.
184
241
  */
185
242
  }, {
186
243
  key: "setActualInstance",
@@ -215,13 +272,13 @@ ContractCallDestination.prototype['destination_type'] = undefined;
215
272
  ContractCallDestination.prototype['address'] = undefined;
216
273
 
217
274
  /**
218
- * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
275
+ * The transfer amount. For example, if you trade 1.5 TRX, then the value is `1.5`.
219
276
  * @member {String} value
220
277
  */
221
278
  ContractCallDestination.prototype['value'] = undefined;
222
279
 
223
280
  /**
224
- * The data used to invoke a specific function or method within the specified contract at the destination address, with a maximum length of 65,000 characters.
281
+ * The data that is used to invoke a specific function or method within the specified contract at the destination address.
225
282
  * @member {String} calldata
226
283
  */
227
284
  ContractCallDestination.prototype['calldata'] = undefined;
@@ -240,5 +297,10 @@ ContractCallDestination.prototype['address_lookup_table_accounts'] = undefined;
240
297
  * @member {module:model/StellarContractCallContractParam} contract_param
241
298
  */
242
299
  ContractCallDestination.prototype['contract_param'] = undefined;
243
- ContractCallDestination.OneOf = ["EvmContractCallDestination", "SolContractCallDestination", "StellarContractCallDestination"];
300
+
301
+ /**
302
+ * @member {Array.<module:model/CosmosContractCallMessage>} cosmos_messages
303
+ */
304
+ ContractCallDestination.prototype['cosmos_messages'] = undefined;
305
+ ContractCallDestination.OneOf = ["CosmosContractCallDestination", "EvmContractCallDestination", "SolContractCallDestination", "StellarContractCallDestination", "TronContractCallDestination"];
244
306
  var _default = exports["default"] = ContractCallDestination;
@@ -45,6 +45,16 @@ var ContractCallDestinationType = exports["default"] = /*#__PURE__*/function ()
45
45
  * @const
46
46
  */
47
47
  _defineProperty(this, "STELLAR_Contract", "STELLAR_Contract");
48
+ /**
49
+ * value: "TRON_Contract"
50
+ * @const
51
+ */
52
+ _defineProperty(this, "TRON_Contract", "TRON_Contract");
53
+ /**
54
+ * value: "COSMOS_Contract"
55
+ * @const
56
+ */
57
+ _defineProperty(this, "COSMOS_Contract", "COSMOS_Contract");
48
58
  /**
49
59
  * value: "unknown_default_open_api"
50
60
  * @const
@@ -73,9 +73,6 @@ var CosmosContractCallDestination = /*#__PURE__*/function () {
73
73
  if (data.hasOwnProperty('cosmos_messages')) {
74
74
  obj['cosmos_messages'] = _ApiClient["default"].convertToType(data['cosmos_messages'], [_CosmosContractCallMessage["default"]]);
75
75
  }
76
- if (data.hasOwnProperty('value')) {
77
- obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
78
- }
79
76
  }
80
77
  return obj;
81
78
  }
@@ -124,10 +121,6 @@ var CosmosContractCallDestination = /*#__PURE__*/function () {
124
121
  }
125
122
  ;
126
123
  }
127
- // ensure the json data is a string
128
- if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
129
- throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
130
- }
131
124
  return true;
132
125
  }
133
126
  }]);
@@ -143,10 +136,4 @@ CosmosContractCallDestination.prototype['destination_type'] = undefined;
143
136
  * @member {Array.<module:model/CosmosContractCallMessage>} cosmos_messages
144
137
  */
145
138
  CosmosContractCallDestination.prototype['cosmos_messages'] = undefined;
146
-
147
- /**
148
- * The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
149
- * @member {String} value
150
- */
151
- CosmosContractCallDestination.prototype['value'] = undefined;
152
139
  var _default = exports["default"] = CosmosContractCallDestination;
@@ -0,0 +1,195 @@
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
+ var _CounterpartyType = _interopRequireDefault(require("./CounterpartyType"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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); }
11
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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
+ * Cobo Wallet as a Service 2.0
20
+ *
21
+ * Contact: help@cobo.com
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * The Counterparty model module.
30
+ * @module model/Counterparty
31
+ */
32
+ var Counterparty = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>Counterparty</code>.
35
+ * @alias module:model/Counterparty
36
+ * @param counterparty_type {module:model/CounterpartyType}
37
+ * @param counterparty_name {String} The counterparty name.
38
+ * @param created_timestamp {Number} The created time of the counterparty, represented as a UNIX timestamp in seconds.
39
+ * @param updated_timestamp {Number} The updated time of the counterparty, represented as a UNIX timestamp in seconds.
40
+ */
41
+ function Counterparty(counterparty_type, counterparty_name, created_timestamp, updated_timestamp) {
42
+ _classCallCheck(this, Counterparty);
43
+ Counterparty.initialize(this, counterparty_type, counterparty_name, created_timestamp, updated_timestamp);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(Counterparty, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, counterparty_type, counterparty_name, created_timestamp, updated_timestamp) {
54
+ obj['counterparty_type'] = counterparty_type;
55
+ obj['counterparty_name'] = counterparty_name;
56
+ obj['created_timestamp'] = created_timestamp;
57
+ obj['updated_timestamp'] = updated_timestamp;
58
+ }
59
+
60
+ /**
61
+ * Constructs a <code>Counterparty</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
64
+ * @param {module:model/Counterparty} obj Optional instance to populate.
65
+ * @return {module:model/Counterparty} The populated <code>Counterparty</code> instance.
66
+ */
67
+ }, {
68
+ key: "constructFromObject",
69
+ value: function constructFromObject(data, obj) {
70
+ if (data) {
71
+ obj = obj || new Counterparty();
72
+ if (data.hasOwnProperty('counterparty_id')) {
73
+ obj['counterparty_id'] = _ApiClient["default"].convertToType(data['counterparty_id'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('counterparty_type')) {
76
+ obj['counterparty_type'] = _CounterpartyType["default"].constructFromObject(data['counterparty_type']);
77
+ }
78
+ if (data.hasOwnProperty('counterparty_name')) {
79
+ obj['counterparty_name'] = _ApiClient["default"].convertToType(data['counterparty_name'], 'String');
80
+ }
81
+ if (data.hasOwnProperty('country')) {
82
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('email')) {
85
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('contact_address')) {
88
+ obj['contact_address'] = _ApiClient["default"].convertToType(data['contact_address'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('created_timestamp')) {
91
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
92
+ }
93
+ if (data.hasOwnProperty('updated_timestamp')) {
94
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
95
+ }
96
+ }
97
+ return obj;
98
+ }
99
+
100
+ /**
101
+ * Validates the JSON data with respect to <code>Counterparty</code>.
102
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
103
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Counterparty</code>.
104
+ */
105
+ }, {
106
+ key: "validateJSON",
107
+ value: function validateJSON(data) {
108
+ // check to make sure all required properties are present in the JSON string
109
+ var _iterator = _createForOfIteratorHelper(Counterparty.RequiredProperties),
110
+ _step;
111
+ try {
112
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
113
+ var property = _step.value;
114
+ if (!data.hasOwnProperty(property)) {
115
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
116
+ }
117
+ }
118
+ // ensure the json data is a string
119
+ } catch (err) {
120
+ _iterator.e(err);
121
+ } finally {
122
+ _iterator.f();
123
+ }
124
+ if (data['counterparty_id'] && !(typeof data['counterparty_id'] === 'string' || data['counterparty_id'] instanceof String)) {
125
+ throw new Error("Expected the field `counterparty_id` to be a primitive type in the JSON string but got " + data['counterparty_id']);
126
+ }
127
+ // ensure the json data is a string
128
+ if (data['counterparty_name'] && !(typeof data['counterparty_name'] === 'string' || data['counterparty_name'] instanceof String)) {
129
+ throw new Error("Expected the field `counterparty_name` to be a primitive type in the JSON string but got " + data['counterparty_name']);
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
133
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
137
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
138
+ }
139
+ // ensure the json data is a string
140
+ if (data['contact_address'] && !(typeof data['contact_address'] === 'string' || data['contact_address'] instanceof String)) {
141
+ throw new Error("Expected the field `contact_address` to be a primitive type in the JSON string but got " + data['contact_address']);
142
+ }
143
+ return true;
144
+ }
145
+ }]);
146
+ }();
147
+ Counterparty.RequiredProperties = ["counterparty_type", "counterparty_name", "created_timestamp", "updated_timestamp"];
148
+
149
+ /**
150
+ * The counterparty ID.
151
+ * @member {String} counterparty_id
152
+ */
153
+ Counterparty.prototype['counterparty_id'] = undefined;
154
+
155
+ /**
156
+ * @member {module:model/CounterpartyType} counterparty_type
157
+ */
158
+ Counterparty.prototype['counterparty_type'] = undefined;
159
+
160
+ /**
161
+ * The counterparty name.
162
+ * @member {String} counterparty_name
163
+ */
164
+ Counterparty.prototype['counterparty_name'] = undefined;
165
+
166
+ /**
167
+ * The country of the counterparty, in ISO 3166-1 alpha-3 format.
168
+ * @member {String} country
169
+ */
170
+ Counterparty.prototype['country'] = undefined;
171
+
172
+ /**
173
+ * The email of the counterparty.
174
+ * @member {String} email
175
+ */
176
+ Counterparty.prototype['email'] = undefined;
177
+
178
+ /**
179
+ * The contact address of the counterparty.
180
+ * @member {String} contact_address
181
+ */
182
+ Counterparty.prototype['contact_address'] = undefined;
183
+
184
+ /**
185
+ * The created time of the counterparty, represented as a UNIX timestamp in seconds.
186
+ * @member {Number} created_timestamp
187
+ */
188
+ Counterparty.prototype['created_timestamp'] = undefined;
189
+
190
+ /**
191
+ * The updated time of the counterparty, represented as a UNIX timestamp in seconds.
192
+ * @member {Number} updated_timestamp
193
+ */
194
+ Counterparty.prototype['updated_timestamp'] = undefined;
195
+ var _default = exports["default"] = Counterparty;
@@ -0,0 +1,228 @@
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
+ var _CounterpartyType = _interopRequireDefault(require("./CounterpartyType"));
9
+ var _WalletAddress = _interopRequireDefault(require("./WalletAddress"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ 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; } } }; }
13
+ 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; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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
+ * Cobo Wallet as a Service 2.0
21
+ *
22
+ * Contact: help@cobo.com
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The CounterpartyDetail model module.
31
+ * @module model/CounterpartyDetail
32
+ */
33
+ var CounterpartyDetail = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new <code>CounterpartyDetail</code>.
36
+ * @alias module:model/CounterpartyDetail
37
+ * @param counterparty_type {module:model/CounterpartyType}
38
+ * @param counterparty_name {String} The counterparty name.
39
+ * @param wallet_addresses {Array.<module:model/WalletAddress>} The wallet addresses of the counterparty.
40
+ * @param created_timestamp {Number} The created time of the counterparty, represented as a UNIX timestamp in seconds.
41
+ * @param updated_timestamp {Number} The updated time of the counterparty, represented as a UNIX timestamp in seconds.
42
+ */
43
+ function CounterpartyDetail(counterparty_type, counterparty_name, wallet_addresses, created_timestamp, updated_timestamp) {
44
+ _classCallCheck(this, CounterpartyDetail);
45
+ CounterpartyDetail.initialize(this, counterparty_type, counterparty_name, wallet_addresses, created_timestamp, updated_timestamp);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(CounterpartyDetail, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, counterparty_type, counterparty_name, wallet_addresses, created_timestamp, updated_timestamp) {
56
+ obj['counterparty_type'] = counterparty_type;
57
+ obj['counterparty_name'] = counterparty_name;
58
+ obj['wallet_addresses'] = wallet_addresses;
59
+ obj['created_timestamp'] = created_timestamp;
60
+ obj['updated_timestamp'] = updated_timestamp;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>CounterpartyDetail</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @param {module:model/CounterpartyDetail} obj Optional instance to populate.
68
+ * @return {module:model/CounterpartyDetail} The populated <code>CounterpartyDetail</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new CounterpartyDetail();
75
+ if (data.hasOwnProperty('counterparty_id')) {
76
+ obj['counterparty_id'] = _ApiClient["default"].convertToType(data['counterparty_id'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('counterparty_type')) {
79
+ obj['counterparty_type'] = _CounterpartyType["default"].constructFromObject(data['counterparty_type']);
80
+ }
81
+ if (data.hasOwnProperty('counterparty_name')) {
82
+ obj['counterparty_name'] = _ApiClient["default"].convertToType(data['counterparty_name'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('country')) {
85
+ obj['country'] = _ApiClient["default"].convertToType(data['country'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('email')) {
88
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('contact_address')) {
91
+ obj['contact_address'] = _ApiClient["default"].convertToType(data['contact_address'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('wallet_addresses')) {
94
+ obj['wallet_addresses'] = _ApiClient["default"].convertToType(data['wallet_addresses'], [_WalletAddress["default"]]);
95
+ }
96
+ if (data.hasOwnProperty('created_timestamp')) {
97
+ obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
98
+ }
99
+ if (data.hasOwnProperty('updated_timestamp')) {
100
+ obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
101
+ }
102
+ }
103
+ return obj;
104
+ }
105
+
106
+ /**
107
+ * Validates the JSON data with respect to <code>CounterpartyDetail</code>.
108
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
109
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CounterpartyDetail</code>.
110
+ */
111
+ }, {
112
+ key: "validateJSON",
113
+ value: function validateJSON(data) {
114
+ // check to make sure all required properties are present in the JSON string
115
+ var _iterator = _createForOfIteratorHelper(CounterpartyDetail.RequiredProperties),
116
+ _step;
117
+ try {
118
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
119
+ var property = _step.value;
120
+ if (!data.hasOwnProperty(property)) {
121
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
122
+ }
123
+ }
124
+ // ensure the json data is a string
125
+ } catch (err) {
126
+ _iterator.e(err);
127
+ } finally {
128
+ _iterator.f();
129
+ }
130
+ if (data['counterparty_id'] && !(typeof data['counterparty_id'] === 'string' || data['counterparty_id'] instanceof String)) {
131
+ throw new Error("Expected the field `counterparty_id` to be a primitive type in the JSON string but got " + data['counterparty_id']);
132
+ }
133
+ // ensure the json data is a string
134
+ if (data['counterparty_name'] && !(typeof data['counterparty_name'] === 'string' || data['counterparty_name'] instanceof String)) {
135
+ throw new Error("Expected the field `counterparty_name` to be a primitive type in the JSON string but got " + data['counterparty_name']);
136
+ }
137
+ // ensure the json data is a string
138
+ if (data['country'] && !(typeof data['country'] === 'string' || data['country'] instanceof String)) {
139
+ throw new Error("Expected the field `country` to be a primitive type in the JSON string but got " + data['country']);
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
143
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
144
+ }
145
+ // ensure the json data is a string
146
+ if (data['contact_address'] && !(typeof data['contact_address'] === 'string' || data['contact_address'] instanceof String)) {
147
+ throw new Error("Expected the field `contact_address` to be a primitive type in the JSON string but got " + data['contact_address']);
148
+ }
149
+ if (data['wallet_addresses']) {
150
+ // data not null
151
+ // ensure the json data is an array
152
+ if (!Array.isArray(data['wallet_addresses'])) {
153
+ throw new Error("Expected the field `wallet_addresses` to be an array in the JSON data but got " + data['wallet_addresses']);
154
+ }
155
+ // validate the optional field `wallet_addresses` (array)
156
+ var _iterator2 = _createForOfIteratorHelper(data['wallet_addresses']),
157
+ _step2;
158
+ try {
159
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
160
+ var item = _step2.value;
161
+ _WalletAddress["default"].validateJSON(item);
162
+ }
163
+ } catch (err) {
164
+ _iterator2.e(err);
165
+ } finally {
166
+ _iterator2.f();
167
+ }
168
+ ;
169
+ }
170
+ return true;
171
+ }
172
+ }]);
173
+ }();
174
+ CounterpartyDetail.RequiredProperties = ["counterparty_type", "counterparty_name", "wallet_addresses", "created_timestamp", "updated_timestamp"];
175
+
176
+ /**
177
+ * The counterparty ID.
178
+ * @member {String} counterparty_id
179
+ */
180
+ CounterpartyDetail.prototype['counterparty_id'] = undefined;
181
+
182
+ /**
183
+ * @member {module:model/CounterpartyType} counterparty_type
184
+ */
185
+ CounterpartyDetail.prototype['counterparty_type'] = undefined;
186
+
187
+ /**
188
+ * The counterparty name.
189
+ * @member {String} counterparty_name
190
+ */
191
+ CounterpartyDetail.prototype['counterparty_name'] = undefined;
192
+
193
+ /**
194
+ * The country of the counterparty, in ISO 3166-1 alpha-3 format.
195
+ * @member {String} country
196
+ */
197
+ CounterpartyDetail.prototype['country'] = undefined;
198
+
199
+ /**
200
+ * The email of the counterparty.
201
+ * @member {String} email
202
+ */
203
+ CounterpartyDetail.prototype['email'] = undefined;
204
+
205
+ /**
206
+ * The contact address of the counterparty.
207
+ * @member {String} contact_address
208
+ */
209
+ CounterpartyDetail.prototype['contact_address'] = undefined;
210
+
211
+ /**
212
+ * The wallet addresses of the counterparty.
213
+ * @member {Array.<module:model/WalletAddress>} wallet_addresses
214
+ */
215
+ CounterpartyDetail.prototype['wallet_addresses'] = undefined;
216
+
217
+ /**
218
+ * The created time of the counterparty, represented as a UNIX timestamp in seconds.
219
+ * @member {Number} created_timestamp
220
+ */
221
+ CounterpartyDetail.prototype['created_timestamp'] = undefined;
222
+
223
+ /**
224
+ * The updated time of the counterparty, represented as a UNIX timestamp in seconds.
225
+ * @member {Number} updated_timestamp
226
+ */
227
+ CounterpartyDetail.prototype['updated_timestamp'] = undefined;
228
+ var _default = exports["default"] = CounterpartyDetail;