@cobo/cobo-waas2 1.20.0 → 1.22.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 (224) hide show
  1. package/README.md +60 -4
  2. package/dist/ApiClient.js +11 -2
  3. package/dist/PreRequestScript.js +2 -4
  4. package/dist/api/AutoSweepApi.js +289 -0
  5. package/dist/api/PaymentApi.js +386 -24
  6. package/dist/api/TokenizationApi.js +1024 -0
  7. package/dist/api/TransactionsApi.js +103 -2
  8. package/dist/api/WalletsApi.js +2 -2
  9. package/dist/crypto/ApiSigner.js +5 -1
  10. package/dist/index.js +175 -0
  11. package/dist/model/AddressesEventData.js +3 -3
  12. package/dist/model/ApprovalDetail.js +7 -7
  13. package/dist/model/AutoSweepTask.js +198 -0
  14. package/dist/model/AutoSweepTaskStatus.js +61 -0
  15. package/dist/model/BalanceUpdateInfoEventData.js +3 -3
  16. package/dist/model/ChainsEventData.js +3 -3
  17. package/dist/model/CreateAutoSweepTask.js +126 -0
  18. package/dist/model/CreateCryptoAddressRequest.js +138 -0
  19. package/dist/model/CreateCustodialWalletParams.js +9 -0
  20. package/dist/model/CreateExchangeWalletParams.js +14 -0
  21. package/dist/model/CreateMpcWalletParams.js +14 -0
  22. package/dist/model/CreatePaymentOrderRequest.js +5 -5
  23. package/dist/model/CreateSafeWalletParams.js +9 -0
  24. package/dist/model/CreateSettlement.js +27 -4
  25. package/dist/model/CreateSmartContractWalletParams.js +6 -0
  26. package/dist/model/CreateSweepToAddress.js +126 -0
  27. package/dist/model/CreateWalletParams.js +6 -0
  28. package/dist/model/CreatedWalletInfo.js +6 -0
  29. package/dist/model/CryptoAddress.js +12 -12
  30. package/dist/model/CustodialWalletInfo.js +9 -0
  31. package/dist/model/DeleteCryptoAddress201Response.js +110 -0
  32. package/dist/model/ExchangeWalletInfo.js +14 -0
  33. package/dist/model/ForcedSweep.js +9 -9
  34. package/dist/model/ForcedSweepRequest.js +8 -9
  35. package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
  36. package/dist/model/ListAutoSweepTask200Response.js +123 -0
  37. package/dist/model/ListMerchantBalances200Response.js +107 -0
  38. package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
  39. package/dist/model/ListSettlementDetails200Response.js +123 -0
  40. package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
  41. package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
  42. package/dist/model/MPCVaultEventData.js +3 -3
  43. package/dist/model/MPCWalletInfo.js +14 -0
  44. package/dist/model/MerchantBalance.js +201 -0
  45. package/dist/model/PaymentAddressUpdateEventData.js +13 -13
  46. package/dist/model/PaymentOrderEventData.js +3 -3
  47. package/dist/model/PaymentRefundEventData.js +3 -3
  48. package/dist/model/PaymentSettlementEvent.js +42 -3
  49. package/dist/model/PaymentTransactionEventData.js +6 -6
  50. package/dist/model/PaymentWalletBalance.js +177 -0
  51. package/dist/model/PspBalance.js +175 -0
  52. package/dist/model/ReceivedAmountPerAddress.js +126 -0
  53. package/dist/model/SafeWallet.js +9 -0
  54. package/dist/model/Settlement.js +27 -0
  55. package/dist/model/SettlementDetail.js +26 -0
  56. package/dist/model/SettlementInfo.js +7 -7
  57. package/dist/model/SmartContractWalletInfo.js +6 -0
  58. package/dist/model/SuspendedTokenEventData.js +3 -3
  59. package/dist/model/SweepToAddress.js +135 -0
  60. package/dist/model/SweepToAddressStatus.js +61 -0
  61. package/dist/model/TSSRequestWebhookEventData.js +3 -3
  62. package/dist/model/TokenListingEventData.js +3 -3
  63. package/dist/model/TokenizationActivityInfo.js +8 -4
  64. package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
  65. package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
  66. package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
  67. package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
  68. package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
  69. package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
  70. package/dist/model/TokenizationBurnTokenRequest.js +13 -0
  71. package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
  72. package/dist/model/TokenizationContractCallParamsData.js +43 -9
  73. package/dist/model/TokenizationContractCallRequest.js +13 -0
  74. package/dist/model/TokenizationContractCallType.js +5 -0
  75. package/dist/model/TokenizationERC20TokenParams.js +4 -4
  76. package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
  77. package/dist/model/TokenizationEvmContractCallParams.js +2 -2
  78. package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
  79. package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
  80. package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
  81. package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
  82. package/dist/model/TokenizationMintTokenRequest.js +13 -0
  83. package/dist/model/TokenizationMpcOperationSource.js +2 -2
  84. package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
  85. package/dist/model/TokenizationPauseTokenRequest.js +13 -0
  86. package/dist/model/TokenizationSOLTokenParams.js +173 -0
  87. package/dist/model/TokenizationSolContractCallParams.js +137 -0
  88. package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
  89. package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
  90. package/dist/model/TokenizationTokenDetailInfo.js +6 -6
  91. package/dist/model/TokenizationTokenInfo.js +4 -4
  92. package/dist/model/TokenizationTokenOperationSource.js +1 -1
  93. package/dist/model/TokenizationTokenPermissionParams.js +1 -1
  94. package/dist/model/TokenizationTokenPermissionType.js +15 -0
  95. package/dist/model/TokenizationTokenStandard.js +5 -0
  96. package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
  97. package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
  98. package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
  99. package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
  100. package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
  101. package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
  102. package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
  103. package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
  104. package/dist/model/TokenizationWeb3OperationSource.js +2 -2
  105. package/dist/model/TokensEventData.js +3 -3
  106. package/dist/model/TopUpAddress.js +0 -1
  107. package/dist/model/TransactionWebhookEventData.js +3 -3
  108. package/dist/model/UpdateCustodialWalletParams.js +13 -6
  109. package/dist/model/UpdateMpcWalletParams.js +13 -6
  110. package/dist/model/UpdateTopUpAddress.js +3 -3
  111. package/dist/model/UpdateWalletParams.js +6 -0
  112. package/dist/model/WalletInfo.js +6 -0
  113. package/dist/model/WalletInfoEventData.js +3 -3
  114. package/dist/model/WebhookEventData.js +19 -7
  115. package/dist/model/WebhookEventDataType.js +2 -2
  116. package/docs/AddressesEventData.md +1 -1
  117. package/docs/ApprovalDetail.md +1 -1
  118. package/docs/AutoSweepApi.md +285 -0
  119. package/docs/AutoSweepTask.md +16 -0
  120. package/docs/AutoSweepTaskStatus.md +12 -0
  121. package/docs/BalanceUpdateInfoEventData.md +1 -1
  122. package/docs/ChainsEventData.md +1 -1
  123. package/docs/CreateAutoSweepTask.md +10 -0
  124. package/docs/CreateCryptoAddressRequest.md +11 -0
  125. package/docs/CreateCustodialWalletParams.md +1 -0
  126. package/docs/CreateExchangeWalletParams.md +1 -0
  127. package/docs/CreateMpcWalletParams.md +1 -0
  128. package/docs/CreatePaymentOrderRequest.md +3 -3
  129. package/docs/CreateSafeWalletParams.md +1 -0
  130. package/docs/CreateSettlement.md +1 -1
  131. package/docs/CreateSmartContractWalletParams.md +1 -0
  132. package/docs/CreateSweepToAddress.md +10 -0
  133. package/docs/CreateWalletParams.md +1 -0
  134. package/docs/CreatedWalletInfo.md +1 -0
  135. package/docs/CryptoAddress.md +1 -1
  136. package/docs/CustodialWalletInfo.md +1 -0
  137. package/docs/DeleteCryptoAddress201Response.md +9 -0
  138. package/docs/ExchangeWalletInfo.md +1 -0
  139. package/docs/ForcedSweep.md +7 -7
  140. package/docs/ForcedSweepRequest.md +4 -4
  141. package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
  142. package/docs/ListAutoSweepTask200Response.md +10 -0
  143. package/docs/ListMerchantBalances200Response.md +9 -0
  144. package/docs/ListPaymentWalletBalances200Response.md +9 -0
  145. package/docs/ListSettlementDetails200Response.md +10 -0
  146. package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
  147. package/docs/ListWalletSweepToAddresses200Response.md +9 -0
  148. package/docs/MPCVaultEventData.md +1 -1
  149. package/docs/MPCWalletInfo.md +1 -0
  150. package/docs/MerchantBalance.md +16 -0
  151. package/docs/PaymentAddressUpdateEventData.md +6 -6
  152. package/docs/PaymentApi.md +403 -16
  153. package/docs/PaymentOrderEventData.md +1 -1
  154. package/docs/PaymentRefundEventData.md +1 -1
  155. package/docs/PaymentSettlementEvent.md +4 -1
  156. package/docs/PaymentTransactionEventData.md +4 -4
  157. package/docs/PaymentWalletBalance.md +14 -0
  158. package/docs/PspBalance.md +14 -0
  159. package/docs/ReceivedAmountPerAddress.md +10 -0
  160. package/docs/SafeWallet.md +1 -0
  161. package/docs/Settlement.md +3 -0
  162. package/docs/SettlementDetail.md +2 -0
  163. package/docs/SettlementInfo.md +6 -6
  164. package/docs/SmartContractWalletInfo.md +1 -0
  165. package/docs/SuspendedTokenEventData.md +1 -1
  166. package/docs/SweepToAddress.md +11 -0
  167. package/docs/SweepToAddressStatus.md +12 -0
  168. package/docs/TSSRequestWebhookEventData.md +1 -1
  169. package/docs/TokenListingEventData.md +1 -1
  170. package/docs/TokenizationActivityInfo.md +2 -2
  171. package/docs/TokenizationAllowlistActivationRequest.md +1 -0
  172. package/docs/TokenizationAllowlistAddressNote.md +3 -3
  173. package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
  174. package/docs/TokenizationApi.md +1069 -0
  175. package/docs/TokenizationBlocklistAddressNote.md +3 -3
  176. package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
  177. package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
  178. package/docs/TokenizationBurnTokenRequest.md +1 -0
  179. package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
  180. package/docs/TokenizationContractCallParamsData.md +2 -1
  181. package/docs/TokenizationContractCallRequest.md +1 -0
  182. package/docs/TokenizationContractCallType.md +2 -0
  183. package/docs/TokenizationERC20TokenParams.md +1 -1
  184. package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
  185. package/docs/TokenizationEvmContractCallParams.md +1 -1
  186. package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
  187. package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
  188. package/docs/TokenizationIssuedTokenRequest.md +2 -1
  189. package/docs/TokenizationMintEstimateFeeParams.md +1 -0
  190. package/docs/TokenizationMintTokenRequest.md +1 -0
  191. package/docs/TokenizationMpcOperationSource.md +1 -1
  192. package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
  193. package/docs/TokenizationPauseTokenRequest.md +1 -0
  194. package/docs/TokenizationSOLTokenParams.md +14 -0
  195. package/docs/TokenizationSolContractCallParams.md +10 -0
  196. package/docs/TokenizationSolTokenPermissionParams.md +13 -0
  197. package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
  198. package/docs/TokenizationTokenDetailInfo.md +1 -1
  199. package/docs/TokenizationTokenInfo.md +1 -1
  200. package/docs/TokenizationTokenOperationSource.md +1 -1
  201. package/docs/TokenizationTokenPermissionType.md +6 -0
  202. package/docs/TokenizationTokenStandard.md +2 -0
  203. package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
  204. package/docs/TokenizationUnpauseTokenRequest.md +1 -0
  205. package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
  206. package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
  207. package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
  208. package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
  209. package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
  210. package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
  211. package/docs/TokenizationWeb3OperationSource.md +1 -1
  212. package/docs/TokensEventData.md +1 -1
  213. package/docs/TransactionWebhookEventData.md +1 -1
  214. package/docs/TransactionsApi.md +113 -1
  215. package/docs/UpdateCustodialWalletParams.md +2 -1
  216. package/docs/UpdateMpcWalletParams.md +2 -1
  217. package/docs/UpdateTopUpAddress.md +1 -1
  218. package/docs/UpdateWalletParams.md +1 -0
  219. package/docs/WalletInfo.md +1 -0
  220. package/docs/WalletInfoEventData.md +1 -1
  221. package/docs/WalletsApi.md +1 -1
  222. package/docs/WebhookEventData.md +9 -7
  223. package/docs/WebhookEventDataType.md +1 -1
  224. package/package.json +1 -1
@@ -78,6 +78,9 @@ var CreateCustodialWalletParams = /*#__PURE__*/function () {
78
78
  if (data.hasOwnProperty('wallet_subtype')) {
79
79
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
80
80
  }
81
+ if (data.hasOwnProperty('enable_auto_sweep')) {
82
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
83
+ }
81
84
  }
82
85
  return obj;
83
86
  }
@@ -130,4 +133,10 @@ CreateCustodialWalletParams.prototype['wallet_type'] = undefined;
130
133
  * @member {module:model/WalletSubtype} wallet_subtype
131
134
  */
132
135
  CreateCustodialWalletParams.prototype['wallet_subtype'] = undefined;
136
+
137
+ /**
138
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
139
+ * @member {Boolean} enable_auto_sweep
140
+ */
141
+ CreateCustodialWalletParams.prototype['enable_auto_sweep'] = undefined;
133
142
  var _default = exports["default"] = CreateCustodialWalletParams;
@@ -88,6 +88,9 @@ var CreateExchangeWalletParams = /*#__PURE__*/function () {
88
88
  if (data.hasOwnProperty('wallet_subtype')) {
89
89
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
90
90
  }
91
+ if (data.hasOwnProperty('enable_auto_sweep')) {
92
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
93
+ }
91
94
  if (data.hasOwnProperty('exchange_id')) {
92
95
  obj['exchange_id'] = _ExchangeId["default"].constructFromObject(data['exchange_id']);
93
96
  }
@@ -193,6 +196,12 @@ CreateExchangeWalletParams.prototype['wallet_type'] = undefined;
193
196
  */
194
197
  CreateExchangeWalletParams.prototype['wallet_subtype'] = undefined;
195
198
 
199
+ /**
200
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
201
+ * @member {Boolean} enable_auto_sweep
202
+ */
203
+ CreateExchangeWalletParams.prototype['enable_auto_sweep'] = undefined;
204
+
196
205
  /**
197
206
  * @member {module:model/ExchangeId} exchange_id
198
207
  */
@@ -254,4 +263,9 @@ _CreateCustodialWalletParams["default"].prototype['wallet_type'] = undefined;
254
263
  * @member {module:model/WalletSubtype} wallet_subtype
255
264
  */
256
265
  _CreateCustodialWalletParams["default"].prototype['wallet_subtype'] = undefined;
266
+ /**
267
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
268
+ * @member {Boolean} enable_auto_sweep
269
+ */
270
+ _CreateCustodialWalletParams["default"].prototype['enable_auto_sweep'] = undefined;
257
271
  var _default = exports["default"] = CreateExchangeWalletParams;
@@ -83,6 +83,9 @@ var CreateMpcWalletParams = /*#__PURE__*/function () {
83
83
  if (data.hasOwnProperty('wallet_subtype')) {
84
84
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
85
85
  }
86
+ if (data.hasOwnProperty('enable_auto_sweep')) {
87
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
88
+ }
86
89
  if (data.hasOwnProperty('vault_id')) {
87
90
  obj['vault_id'] = _ApiClient["default"].convertToType(data['vault_id'], 'String');
88
91
  }
@@ -143,6 +146,12 @@ CreateMpcWalletParams.prototype['wallet_type'] = undefined;
143
146
  */
144
147
  CreateMpcWalletParams.prototype['wallet_subtype'] = undefined;
145
148
 
149
+ /**
150
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
151
+ * @member {Boolean} enable_auto_sweep
152
+ */
153
+ CreateMpcWalletParams.prototype['enable_auto_sweep'] = undefined;
154
+
146
155
  /**
147
156
  * The ID of the owning vault. You can call [List all vaults](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
148
157
  * @member {String} vault_id
@@ -163,4 +172,9 @@ _CreateCustodialWalletParams["default"].prototype['wallet_type'] = undefined;
163
172
  * @member {module:model/WalletSubtype} wallet_subtype
164
173
  */
165
174
  _CreateCustodialWalletParams["default"].prototype['wallet_subtype'] = undefined;
175
+ /**
176
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
177
+ * @member {Boolean} enable_auto_sweep
178
+ */
179
+ _CreateCustodialWalletParams["default"].prototype['enable_auto_sweep'] = undefined;
166
180
  var _default = exports["default"] = CreateMpcWalletParams;
@@ -34,8 +34,8 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
34
34
  * @alias module:model/CreatePaymentOrderRequest
35
35
  * @param merchant_id {String} The merchant ID.
36
36
  * @param token_id {String} The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
37
- * @param order_amount {String} The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
38
- * @param fee_amount {String} The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge. For example, if order_amount is \"100.00\" and fee_amount is \"2.00\", the customer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant and \"2.00\" settled to the developer. Values must be greater than 0 and contain two decimal places.
37
+ * @param order_amount {String} The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places.
38
+ * @param fee_amount {String} The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values must be greater than 0 and contain two decimal places.
39
39
  * @param psp_order_code {String} A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters.
40
40
  */
41
41
  function CreatePaymentOrderRequest(merchant_id, token_id, order_amount, fee_amount, psp_order_code) {
@@ -171,20 +171,20 @@ CreatePaymentOrderRequest.prototype['merchant_id'] = undefined;
171
171
  CreatePaymentOrderRequest.prototype['token_id'] = undefined;
172
172
 
173
173
  /**
174
- * The fiat currency of the order. Currently, only `USD` is supported.
174
+ * The fiat currency for the base order amount and the developer fee. Currently, only `USD` is supported. If left empty, both `order_amount` and `fee_amount` will be denominated in the cryptocurrency specified by `token_id`
175
175
  * @member {String} currency
176
176
  * @default ''
177
177
  */
178
178
  CreatePaymentOrderRequest.prototype['currency'] = '';
179
179
 
180
180
  /**
181
- * The base amount of the order in fiat currency, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.
181
+ * The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places.
182
182
  * @member {String} order_amount
183
183
  */
184
184
  CreatePaymentOrderRequest.prototype['order_amount'] = undefined;
185
185
 
186
186
  /**
187
- * The developer fee for the order in fiat currency. It is added to the base amount (`order_amount`) to determine the final charge. For example, if order_amount is \"100.00\" and fee_amount is \"2.00\", the customer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant and \"2.00\" settled to the developer. Values must be greater than 0 and contain two decimal places.
187
+ * The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values must be greater than 0 and contain two decimal places.
188
188
  * @member {String} fee_amount
189
189
  */
190
190
  CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
@@ -83,6 +83,9 @@ var CreateSafeWalletParams = /*#__PURE__*/function () {
83
83
  if (data.hasOwnProperty('wallet_subtype')) {
84
84
  obj['wallet_subtype'] = _WalletSubtype["default"].constructFromObject(data['wallet_subtype']);
85
85
  }
86
+ if (data.hasOwnProperty('enable_auto_sweep')) {
87
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
88
+ }
86
89
  if (data.hasOwnProperty('chain_id')) {
87
90
  obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
88
91
  }
@@ -180,6 +183,12 @@ CreateSafeWalletParams.prototype['wallet_type'] = undefined;
180
183
  */
181
184
  CreateSafeWalletParams.prototype['wallet_subtype'] = undefined;
182
185
 
186
+ /**
187
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
188
+ * @member {Boolean} enable_auto_sweep
189
+ */
190
+ CreateSafeWalletParams.prototype['enable_auto_sweep'] = undefined;
191
+
183
192
  /**
184
193
  * The ID of the chain that the wallet operates on.
185
194
  * @member {String} chain_id
@@ -7,6 +7,9 @@ exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10
13
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
14
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
15
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
@@ -29,10 +32,11 @@ var CreateSettlement = /*#__PURE__*/function () {
29
32
  /**
30
33
  * Constructs a new <code>CreateSettlement</code>.
31
34
  * @alias module:model/CreateSettlement
35
+ * @param token_id {String} The ID of the cryptocurrency you want to settle. Specify this field when `payout_channel` is set to `Crypto`. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
32
36
  */
33
- function CreateSettlement() {
37
+ function CreateSettlement(token_id) {
34
38
  _classCallCheck(this, CreateSettlement);
35
- CreateSettlement.initialize(this);
39
+ CreateSettlement.initialize(this, token_id);
36
40
  }
37
41
 
38
42
  /**
@@ -42,7 +46,9 @@ var CreateSettlement = /*#__PURE__*/function () {
42
46
  */
43
47
  return _createClass(CreateSettlement, null, [{
44
48
  key: "initialize",
45
- value: function initialize(obj) {}
49
+ value: function initialize(obj, token_id) {
50
+ obj['token_id'] = token_id;
51
+ }
46
52
 
47
53
  /**
48
54
  * Constructs a <code>CreateSettlement</code> from a plain JavaScript object, optionally creating a new instance.
@@ -89,7 +95,22 @@ var CreateSettlement = /*#__PURE__*/function () {
89
95
  }, {
90
96
  key: "validateJSON",
91
97
  value: function validateJSON(data) {
92
- // ensure the json data is a string
98
+ // check to make sure all required properties are present in the JSON string
99
+ var _iterator = _createForOfIteratorHelper(CreateSettlement.RequiredProperties),
100
+ _step;
101
+ try {
102
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
103
+ var property = _step.value;
104
+ if (!data.hasOwnProperty(property)) {
105
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
106
+ }
107
+ }
108
+ // ensure the json data is a string
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
93
114
  if (data['merchant_id'] && !(typeof data['merchant_id'] === 'string' || data['merchant_id'] instanceof String)) {
94
115
  throw new Error("Expected the field `merchant_id` to be a primitive type in the JSON string but got " + data['merchant_id']);
95
116
  }
@@ -121,6 +142,8 @@ var CreateSettlement = /*#__PURE__*/function () {
121
142
  }
122
143
  }]);
123
144
  }();
145
+ CreateSettlement.RequiredProperties = ["token_id"];
146
+
124
147
  /**
125
148
  * The merchant ID. Specify this field when `settlement_type` is set to `Merchant`.
126
149
  * @member {String} merchant_id
@@ -163,6 +163,12 @@ CreateSmartContractWalletParams.prototype['wallet_type'] = undefined;
163
163
  */
164
164
  CreateSmartContractWalletParams.prototype['wallet_subtype'] = undefined;
165
165
 
166
+ /**
167
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
168
+ * @member {Boolean} enable_auto_sweep
169
+ */
170
+ CreateSmartContractWalletParams.prototype['enable_auto_sweep'] = undefined;
171
+
166
172
  /**
167
173
  * The ID of the chain that the wallet operates on.
168
174
  * @member {String} chain_id
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The CreateSweepToAddress model module.
29
+ * @module model/CreateSweepToAddress
30
+ */
31
+ var CreateSweepToAddress = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CreateSweepToAddress</code>.
34
+ * The information of create sweep to address.
35
+ * @alias module:model/CreateSweepToAddress
36
+ * @param wallet_id {String} The wallet ID.
37
+ * @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
38
+ */
39
+ function CreateSweepToAddress(wallet_id, chain_id) {
40
+ _classCallCheck(this, CreateSweepToAddress);
41
+ CreateSweepToAddress.initialize(this, wallet_id, chain_id);
42
+ }
43
+
44
+ /**
45
+ * Initializes the fields of this object.
46
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
47
+ * Only for internal use.
48
+ */
49
+ return _createClass(CreateSweepToAddress, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, wallet_id, chain_id) {
52
+ obj['wallet_id'] = wallet_id;
53
+ obj['chain_id'] = chain_id;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>CreateSweepToAddress</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/CreateSweepToAddress} obj Optional instance to populate.
61
+ * @return {module:model/CreateSweepToAddress} The populated <code>CreateSweepToAddress</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new CreateSweepToAddress();
68
+ if (data.hasOwnProperty('wallet_id')) {
69
+ obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('chain_id')) {
72
+ obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>CreateSweepToAddress</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSweepToAddress</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(CreateSweepToAddress.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
103
+ throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
107
+ throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ CreateSweepToAddress.RequiredProperties = ["wallet_id", "chain_id"];
114
+
115
+ /**
116
+ * The wallet ID.
117
+ * @member {String} wallet_id
118
+ */
119
+ CreateSweepToAddress.prototype['wallet_id'] = undefined;
120
+
121
+ /**
122
+ * The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
123
+ * @member {String} chain_id
124
+ */
125
+ CreateSweepToAddress.prototype['chain_id'] = undefined;
126
+ var _default = exports["default"] = CreateSweepToAddress;
@@ -218,6 +218,12 @@ CreateWalletParams.prototype['wallet_type'] = undefined;
218
218
  */
219
219
  CreateWalletParams.prototype['wallet_subtype'] = undefined;
220
220
 
221
+ /**
222
+ * Enable the auto sweep feature for the wallet. This parameter only applies to MPC and Web3 wallets.
223
+ * @member {Boolean} enable_auto_sweep
224
+ */
225
+ CreateWalletParams.prototype['enable_auto_sweep'] = undefined;
226
+
221
227
  /**
222
228
  * The ID of the owning vault. You can call [List all vaults](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-vaults) to retrieve all vault IDs under your organization.
223
229
  * @member {String} vault_id
@@ -230,6 +230,12 @@ CreatedWalletInfo.prototype['name'] = undefined;
230
230
  */
231
231
  CreatedWalletInfo.prototype['org_id'] = undefined;
232
232
 
233
+ /**
234
+ * Enable the auto sweep feature for the wallet
235
+ * @member {Boolean} enable_auto_sweep
236
+ */
237
+ CreatedWalletInfo.prototype['enable_auto_sweep'] = undefined;
238
+
233
239
  /**
234
240
  * The project ID.
235
241
  * @member {String} project_id
@@ -33,12 +33,12 @@ var CryptoAddress = /*#__PURE__*/function () {
33
33
  * Constructs a new <code>CryptoAddress</code>.
34
34
  * @alias module:model/CryptoAddress
35
35
  * @param token_id {String} The token identifier (e.g., ETH_USDT, TRON_USDT) that this address is associated with.
36
- * @param address_id {String} A unique identifier for this crypto address, automatically generated by Cobo. Use this ID (not the raw blockchain address) when submitting a settlement request.
36
+ * @param crypto_address_id {String} A unique identifier for this crypto address, automatically generated by Cobo. Use this ID (not the raw blockchain address) when submitting a settlement request.
37
37
  * @param address {String} The blockchain address in its native format. This is the actual destination address where funds will be sent. Note: When submitting a settlement request, use the address ID rather than this raw address.
38
38
  */
39
- function CryptoAddress(token_id, address_id, address) {
39
+ function CryptoAddress(token_id, crypto_address_id, address) {
40
40
  _classCallCheck(this, CryptoAddress);
41
- CryptoAddress.initialize(this, token_id, address_id, address);
41
+ CryptoAddress.initialize(this, token_id, crypto_address_id, address);
42
42
  }
43
43
 
44
44
  /**
@@ -48,9 +48,9 @@ var CryptoAddress = /*#__PURE__*/function () {
48
48
  */
49
49
  return _createClass(CryptoAddress, null, [{
50
50
  key: "initialize",
51
- value: function initialize(obj, token_id, address_id, address) {
51
+ value: function initialize(obj, token_id, crypto_address_id, address) {
52
52
  obj['token_id'] = token_id;
53
- obj['address_id'] = address_id;
53
+ obj['crypto_address_id'] = crypto_address_id;
54
54
  obj['address'] = address;
55
55
  }
56
56
 
@@ -69,8 +69,8 @@ var CryptoAddress = /*#__PURE__*/function () {
69
69
  if (data.hasOwnProperty('token_id')) {
70
70
  obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
71
71
  }
72
- if (data.hasOwnProperty('address_id')) {
73
- obj['address_id'] = _ApiClient["default"].convertToType(data['address_id'], 'String');
72
+ if (data.hasOwnProperty('crypto_address_id')) {
73
+ obj['crypto_address_id'] = _ApiClient["default"].convertToType(data['crypto_address_id'], 'String');
74
74
  }
75
75
  if (data.hasOwnProperty('address')) {
76
76
  obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
@@ -116,8 +116,8 @@ var CryptoAddress = /*#__PURE__*/function () {
116
116
  throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
117
117
  }
118
118
  // ensure the json data is a string
119
- if (data['address_id'] && !(typeof data['address_id'] === 'string' || data['address_id'] instanceof String)) {
120
- throw new Error("Expected the field `address_id` to be a primitive type in the JSON string but got " + data['address_id']);
119
+ if (data['crypto_address_id'] && !(typeof data['crypto_address_id'] === 'string' || data['crypto_address_id'] instanceof String)) {
120
+ throw new Error("Expected the field `crypto_address_id` to be a primitive type in the JSON string but got " + data['crypto_address_id']);
121
121
  }
122
122
  // ensure the json data is a string
123
123
  if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
@@ -131,7 +131,7 @@ var CryptoAddress = /*#__PURE__*/function () {
131
131
  }
132
132
  }]);
133
133
  }();
134
- CryptoAddress.RequiredProperties = ["token_id", "address_id", "address"];
134
+ CryptoAddress.RequiredProperties = ["token_id", "crypto_address_id", "address"];
135
135
 
136
136
  /**
137
137
  * The token identifier (e.g., ETH_USDT, TRON_USDT) that this address is associated with.
@@ -141,9 +141,9 @@ CryptoAddress.prototype['token_id'] = undefined;
141
141
 
142
142
  /**
143
143
  * A unique identifier for this crypto address, automatically generated by Cobo. Use this ID (not the raw blockchain address) when submitting a settlement request.
144
- * @member {String} address_id
144
+ * @member {String} crypto_address_id
145
145
  */
146
- CryptoAddress.prototype['address_id'] = undefined;
146
+ CryptoAddress.prototype['crypto_address_id'] = undefined;
147
147
 
148
148
  /**
149
149
  * The blockchain address in its native format. This is the actual destination address where funds will be sent. Note: When submitting a settlement request, use the address ID rather than this raw address.
@@ -88,6 +88,9 @@ var CustodialWalletInfo = /*#__PURE__*/function () {
88
88
  if (data.hasOwnProperty('org_id')) {
89
89
  obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
90
90
  }
91
+ if (data.hasOwnProperty('enable_auto_sweep')) {
92
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
93
+ }
91
94
  }
92
95
  return obj;
93
96
  }
@@ -160,4 +163,10 @@ CustodialWalletInfo.prototype['name'] = undefined;
160
163
  * @member {String} org_id
161
164
  */
162
165
  CustodialWalletInfo.prototype['org_id'] = undefined;
166
+
167
+ /**
168
+ * Enable the auto sweep feature for the wallet
169
+ * @member {Boolean} enable_auto_sweep
170
+ */
171
+ CustodialWalletInfo.prototype['enable_auto_sweep'] = undefined;
163
172
  var _default = exports["default"] = CustodialWalletInfo;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Cobo Wallet as a Service 2.0
19
+ *
20
+ * Contact: help@cobo.com
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The DeleteCryptoAddress201Response model module.
29
+ * @module model/DeleteCryptoAddress201Response
30
+ */
31
+ var DeleteCryptoAddress201Response = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>DeleteCryptoAddress201Response</code>.
34
+ * @alias module:model/DeleteCryptoAddress201Response
35
+ * @param crypto_address_id {String} The ID of the deleted crypto address.
36
+ */
37
+ function DeleteCryptoAddress201Response(crypto_address_id) {
38
+ _classCallCheck(this, DeleteCryptoAddress201Response);
39
+ DeleteCryptoAddress201Response.initialize(this, crypto_address_id);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(DeleteCryptoAddress201Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj, crypto_address_id) {
50
+ obj['crypto_address_id'] = crypto_address_id;
51
+ }
52
+
53
+ /**
54
+ * Constructs a <code>DeleteCryptoAddress201Response</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
56
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
57
+ * @param {module:model/DeleteCryptoAddress201Response} obj Optional instance to populate.
58
+ * @return {module:model/DeleteCryptoAddress201Response} The populated <code>DeleteCryptoAddress201Response</code> instance.
59
+ */
60
+ }, {
61
+ key: "constructFromObject",
62
+ value: function constructFromObject(data, obj) {
63
+ if (data) {
64
+ obj = obj || new DeleteCryptoAddress201Response();
65
+ if (data.hasOwnProperty('crypto_address_id')) {
66
+ obj['crypto_address_id'] = _ApiClient["default"].convertToType(data['crypto_address_id'], 'String');
67
+ }
68
+ }
69
+ return obj;
70
+ }
71
+
72
+ /**
73
+ * Validates the JSON data with respect to <code>DeleteCryptoAddress201Response</code>.
74
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
75
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeleteCryptoAddress201Response</code>.
76
+ */
77
+ }, {
78
+ key: "validateJSON",
79
+ value: function validateJSON(data) {
80
+ // check to make sure all required properties are present in the JSON string
81
+ var _iterator = _createForOfIteratorHelper(DeleteCryptoAddress201Response.RequiredProperties),
82
+ _step;
83
+ try {
84
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
85
+ var property = _step.value;
86
+ if (!data.hasOwnProperty(property)) {
87
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
88
+ }
89
+ }
90
+ // ensure the json data is a string
91
+ } catch (err) {
92
+ _iterator.e(err);
93
+ } finally {
94
+ _iterator.f();
95
+ }
96
+ if (data['crypto_address_id'] && !(typeof data['crypto_address_id'] === 'string' || data['crypto_address_id'] instanceof String)) {
97
+ throw new Error("Expected the field `crypto_address_id` to be a primitive type in the JSON string but got " + data['crypto_address_id']);
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ DeleteCryptoAddress201Response.RequiredProperties = ["crypto_address_id"];
104
+
105
+ /**
106
+ * The ID of the deleted crypto address.
107
+ * @member {String} crypto_address_id
108
+ */
109
+ DeleteCryptoAddress201Response.prototype['crypto_address_id'] = undefined;
110
+ var _default = exports["default"] = DeleteCryptoAddress201Response;
@@ -96,6 +96,9 @@ var ExchangeWalletInfo = /*#__PURE__*/function () {
96
96
  if (data.hasOwnProperty('org_id')) {
97
97
  obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
98
98
  }
99
+ if (data.hasOwnProperty('enable_auto_sweep')) {
100
+ obj['enable_auto_sweep'] = _ApiClient["default"].convertToType(data['enable_auto_sweep'], 'Boolean');
101
+ }
99
102
  if (data.hasOwnProperty('apikey')) {
100
103
  obj['apikey'] = _ApiClient["default"].convertToType(data['apikey'], 'String');
101
104
  }
@@ -186,6 +189,12 @@ ExchangeWalletInfo.prototype['name'] = undefined;
186
189
  */
187
190
  ExchangeWalletInfo.prototype['org_id'] = undefined;
188
191
 
192
+ /**
193
+ * Enable the auto sweep feature for the wallet
194
+ * @member {Boolean} enable_auto_sweep
195
+ */
196
+ ExchangeWalletInfo.prototype['enable_auto_sweep'] = undefined;
197
+
189
198
  /**
190
199
  * The API key of your exchange account.
191
200
  * @member {String} apikey
@@ -227,4 +236,9 @@ _CustodialWalletInfo["default"].prototype['name'] = undefined;
227
236
  * @member {String} org_id
228
237
  */
229
238
  _CustodialWalletInfo["default"].prototype['org_id'] = undefined;
239
+ /**
240
+ * Enable the auto sweep feature for the wallet
241
+ * @member {Boolean} enable_auto_sweep
242
+ */
243
+ _CustodialWalletInfo["default"].prototype['enable_auto_sweep'] = undefined;
230
244
  var _default = exports["default"] = ExchangeWalletInfo;