@cobo/cobo-waas2 1.21.0 → 1.23.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 (270) hide show
  1. package/README.md +80 -5
  2. package/dist/ApiClient.js +1 -1
  3. package/dist/PreRequestScript.js +2 -4
  4. package/dist/api/AddressBooksApi.js +200 -21
  5. package/dist/api/AutoSweepApi.js +289 -0
  6. package/dist/api/ComplianceApi.js +214 -0
  7. package/dist/api/PaymentApi.js +233 -20
  8. package/dist/api/TokenizationApi.js +1024 -0
  9. package/dist/api/TransactionsApi.js +105 -4
  10. package/dist/api/WalletsApi.js +4 -4
  11. package/dist/api/WalletsMPCWalletsApi.js +2 -2
  12. package/dist/index.js +259 -7
  13. package/dist/model/AddressBook.js +12 -12
  14. package/dist/model/AddressesEventData.js +8 -3
  15. package/dist/model/ApprovalDetail.js +11 -11
  16. package/dist/model/ApprovalResult.js +6 -11
  17. package/dist/model/ApprovalTemplate.js +4 -4
  18. package/dist/model/ApprovalTransactionResult.js +8 -8
  19. package/dist/model/ApprovalUserDetail.js +95 -24
  20. package/dist/model/AutoSweepTask.js +198 -0
  21. package/dist/model/AutoSweepTaskStatus.js +61 -0
  22. package/dist/model/BalanceUpdateInfoEventData.js +8 -3
  23. package/dist/model/ChainInfo.js +14 -1
  24. package/dist/model/ChainsEventData.js +8 -3
  25. package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
  26. package/dist/model/CreateAddressBookParam.js +165 -0
  27. package/dist/model/CreateAddressBooks201Response.js +107 -0
  28. package/dist/model/CreateAddressBooksParam.js +128 -0
  29. package/dist/model/CreateAutoSweepTask.js +126 -0
  30. package/dist/model/CreateCryptoAddressRequest.js +5 -5
  31. package/dist/model/CreateCustodialWalletParams.js +9 -0
  32. package/dist/model/CreateExchangeWalletParams.js +14 -0
  33. package/dist/model/CreateMerchantRequest.js +1 -1
  34. package/dist/model/CreateMpcWalletParams.js +14 -0
  35. package/dist/model/CreatePaymentOrderRequest.js +3 -3
  36. package/dist/model/CreateRefundRequest.js +2 -2
  37. package/dist/model/CreateSafeWalletParams.js +9 -0
  38. package/dist/model/CreateSettlement.js +28 -5
  39. package/dist/model/CreateSmartContractWalletParams.js +6 -0
  40. package/dist/model/CreateSweepToAddress.js +126 -0
  41. package/dist/model/CreateWalletParams.js +6 -0
  42. package/dist/model/CreatedWalletInfo.js +6 -0
  43. package/dist/model/CustodialWalletInfo.js +9 -0
  44. package/dist/model/DeleteAddressBookById201Response.js +106 -0
  45. package/dist/model/DeleteCryptoAddress201Response.js +2 -2
  46. package/dist/model/DispositionEventData.js +170 -0
  47. package/dist/model/DispositionQueryResponse.js +146 -0
  48. package/dist/model/DispositionResponse.js +122 -0
  49. package/dist/model/DispositionStatus.js +116 -0
  50. package/dist/model/DispositionType.js +66 -0
  51. package/dist/model/ExchangeWalletInfo.js +14 -0
  52. package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
  53. package/dist/model/IsolateDisposition.js +167 -0
  54. package/dist/model/ListAutoSweepTask200Response.js +123 -0
  55. package/dist/model/ListMerchantBalances200Response.js +107 -0
  56. package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
  57. package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
  58. package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
  59. package/dist/model/MPCVaultEventData.js +8 -3
  60. package/dist/model/MPCWalletInfo.js +14 -0
  61. package/dist/model/Merchant.js +1 -1
  62. package/dist/model/MerchantBalance.js +201 -0
  63. package/dist/model/OrgInfo.js +9 -0
  64. package/dist/model/PaymentAddressUpdateEventData.js +8 -3
  65. package/dist/model/PaymentOrderEventData.js +8 -3
  66. package/dist/model/PaymentRefundEventData.js +8 -3
  67. package/dist/model/PaymentSettlementEvent.js +8 -3
  68. package/dist/model/PaymentTransactionEventData.js +8 -3
  69. package/dist/model/PaymentWalletBalance.js +177 -0
  70. package/dist/model/PspBalance.js +175 -0
  71. package/dist/model/ReceivedAmountPerAddress.js +126 -0
  72. package/dist/model/RefundDisposition.js +167 -0
  73. package/dist/model/RoleDetail.js +41 -6
  74. package/dist/model/SafeWallet.js +9 -0
  75. package/dist/model/SettlementDetail.js +1 -1
  76. package/dist/model/SmartContractWalletInfo.js +6 -0
  77. package/dist/model/SuspendedTokenEventData.js +8 -3
  78. package/dist/model/SweepToAddress.js +135 -0
  79. package/dist/model/SweepToAddressStatus.js +61 -0
  80. package/dist/model/TSSRequestWebhookEventData.js +8 -3
  81. package/dist/model/TokenListingEventData.js +8 -3
  82. package/dist/model/TokenizationActivityInfo.js +8 -4
  83. package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
  84. package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
  85. package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
  86. package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
  87. package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
  88. package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
  89. package/dist/model/TokenizationBurnTokenRequest.js +13 -0
  90. package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
  91. package/dist/model/TokenizationContractCallParamsData.js +43 -9
  92. package/dist/model/TokenizationContractCallRequest.js +13 -0
  93. package/dist/model/TokenizationContractCallType.js +5 -0
  94. package/dist/model/TokenizationERC20TokenParams.js +4 -4
  95. package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
  96. package/dist/model/TokenizationEvmContractCallParams.js +2 -2
  97. package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
  98. package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
  99. package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
  100. package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
  101. package/dist/model/TokenizationMintTokenRequest.js +13 -0
  102. package/dist/model/TokenizationMpcOperationSource.js +2 -2
  103. package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
  104. package/dist/model/TokenizationPauseTokenRequest.js +13 -0
  105. package/dist/model/TokenizationSOLTokenParams.js +173 -0
  106. package/dist/model/TokenizationSolContractCallParams.js +137 -0
  107. package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
  108. package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
  109. package/dist/model/TokenizationTokenDetailInfo.js +6 -6
  110. package/dist/model/TokenizationTokenInfo.js +4 -4
  111. package/dist/model/TokenizationTokenOperationSource.js +1 -1
  112. package/dist/model/TokenizationTokenPermissionParams.js +1 -1
  113. package/dist/model/TokenizationTokenPermissionType.js +15 -0
  114. package/dist/model/TokenizationTokenStandard.js +5 -0
  115. package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
  116. package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
  117. package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
  118. package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
  119. package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
  120. package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
  121. package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
  122. package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
  123. package/dist/model/TokenizationWeb3OperationSource.js +2 -2
  124. package/dist/model/TokensEventData.js +8 -3
  125. package/dist/model/TransactionWebhookEventData.js +8 -3
  126. package/dist/model/UnfreezeDisposition.js +111 -0
  127. package/dist/model/UpdateAddressBookParam.js +150 -0
  128. package/dist/model/UpdateCustodialWalletParams.js +13 -6
  129. package/dist/model/UpdateMerchantByIdRequest.js +1 -1
  130. package/dist/model/UpdateMpcWalletParams.js +13 -6
  131. package/dist/model/UpdateWalletParams.js +6 -0
  132. package/dist/model/WalletInfo.js +6 -0
  133. package/dist/model/WalletInfoEventData.js +8 -3
  134. package/dist/model/WebhookEventData.js +62 -10
  135. package/dist/model/WebhookEventDataType.js +7 -2
  136. package/dist/model/WebhookEventType.js +5 -0
  137. package/docs/AddressBook.md +7 -7
  138. package/docs/AddressBooksApi.md +218 -8
  139. package/docs/AddressesEventData.md +3 -1
  140. package/docs/ApprovalDetail.md +4 -4
  141. package/docs/ApprovalResult.md +3 -5
  142. package/docs/ApprovalTemplate.md +3 -3
  143. package/docs/ApprovalTransactionResult.md +4 -4
  144. package/docs/ApprovalUserDetail.md +15 -9
  145. package/docs/AutoSweepApi.md +285 -0
  146. package/docs/AutoSweepTask.md +16 -0
  147. package/docs/AutoSweepTaskStatus.md +12 -0
  148. package/docs/BalanceUpdateInfoEventData.md +3 -1
  149. package/docs/ChainInfo.md +2 -1
  150. package/docs/ChainsEventData.md +3 -1
  151. package/docs/ComplianceApi.md +218 -0
  152. package/docs/ComplianceDispositionUpdateEventData.md +56 -0
  153. package/docs/CreateAddressBookParam.md +13 -0
  154. package/docs/CreateAddressBooks201Response.md +9 -0
  155. package/docs/CreateAddressBooksParam.md +9 -0
  156. package/docs/CreateAutoSweepTask.md +10 -0
  157. package/docs/CreateCryptoAddressRequest.md +3 -3
  158. package/docs/CreateCustodialWalletParams.md +1 -0
  159. package/docs/CreateExchangeWalletParams.md +1 -0
  160. package/docs/CreateMerchantRequest.md +1 -1
  161. package/docs/CreateMpcWalletParams.md +1 -0
  162. package/docs/CreatePaymentOrderRequest.md +2 -2
  163. package/docs/CreateRefundRequest.md +1 -1
  164. package/docs/CreateSafeWalletParams.md +1 -0
  165. package/docs/CreateSettlement.md +2 -2
  166. package/docs/CreateSmartContractWalletParams.md +1 -0
  167. package/docs/CreateSweepToAddress.md +10 -0
  168. package/docs/CreateWalletParams.md +1 -0
  169. package/docs/CreatedWalletInfo.md +1 -0
  170. package/docs/CustodialWalletInfo.md +1 -0
  171. package/docs/DeleteAddressBookById201Response.md +9 -0
  172. package/docs/DeleteCryptoAddress201Response.md +1 -1
  173. package/docs/DispositionEventData.md +14 -0
  174. package/docs/DispositionQueryResponse.md +12 -0
  175. package/docs/DispositionResponse.md +10 -0
  176. package/docs/DispositionStatus.md +34 -0
  177. package/docs/DispositionType.md +14 -0
  178. package/docs/ExchangeWalletInfo.md +1 -0
  179. package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
  180. package/docs/IsolateDisposition.md +13 -0
  181. package/docs/ListAutoSweepTask200Response.md +10 -0
  182. package/docs/ListMerchantBalances200Response.md +9 -0
  183. package/docs/ListPaymentWalletBalances200Response.md +9 -0
  184. package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
  185. package/docs/ListWalletSweepToAddresses200Response.md +9 -0
  186. package/docs/MPCVaultEventData.md +3 -1
  187. package/docs/MPCWalletInfo.md +1 -0
  188. package/docs/Merchant.md +1 -1
  189. package/docs/MerchantBalance.md +16 -0
  190. package/docs/OrgInfo.md +1 -0
  191. package/docs/PaymentAddressUpdateEventData.md +3 -1
  192. package/docs/PaymentApi.md +229 -11
  193. package/docs/PaymentOrderEventData.md +3 -1
  194. package/docs/PaymentRefundEventData.md +3 -1
  195. package/docs/PaymentSettlementEvent.md +3 -1
  196. package/docs/PaymentTransactionEventData.md +3 -1
  197. package/docs/PaymentWalletBalance.md +14 -0
  198. package/docs/PspBalance.md +14 -0
  199. package/docs/ReceivedAmountPerAddress.md +10 -0
  200. package/docs/RefundDisposition.md +13 -0
  201. package/docs/RoleDetail.md +4 -1
  202. package/docs/SafeWallet.md +1 -0
  203. package/docs/SettlementDetail.md +1 -1
  204. package/docs/SmartContractWalletInfo.md +1 -0
  205. package/docs/SuspendedTokenEventData.md +3 -1
  206. package/docs/SweepToAddress.md +11 -0
  207. package/docs/SweepToAddressStatus.md +12 -0
  208. package/docs/TSSRequestWebhookEventData.md +3 -1
  209. package/docs/TokenListingEventData.md +3 -1
  210. package/docs/TokenizationActivityInfo.md +2 -2
  211. package/docs/TokenizationAllowlistActivationRequest.md +1 -0
  212. package/docs/TokenizationAllowlistAddressNote.md +3 -3
  213. package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
  214. package/docs/TokenizationApi.md +1069 -0
  215. package/docs/TokenizationBlocklistAddressNote.md +3 -3
  216. package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
  217. package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
  218. package/docs/TokenizationBurnTokenRequest.md +1 -0
  219. package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
  220. package/docs/TokenizationContractCallParamsData.md +2 -1
  221. package/docs/TokenizationContractCallRequest.md +1 -0
  222. package/docs/TokenizationContractCallType.md +2 -0
  223. package/docs/TokenizationERC20TokenParams.md +1 -1
  224. package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
  225. package/docs/TokenizationEvmContractCallParams.md +1 -1
  226. package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
  227. package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
  228. package/docs/TokenizationIssuedTokenRequest.md +2 -1
  229. package/docs/TokenizationMintEstimateFeeParams.md +1 -0
  230. package/docs/TokenizationMintTokenRequest.md +1 -0
  231. package/docs/TokenizationMpcOperationSource.md +1 -1
  232. package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
  233. package/docs/TokenizationPauseTokenRequest.md +1 -0
  234. package/docs/TokenizationSOLTokenParams.md +14 -0
  235. package/docs/TokenizationSolContractCallParams.md +10 -0
  236. package/docs/TokenizationSolTokenPermissionParams.md +13 -0
  237. package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
  238. package/docs/TokenizationTokenDetailInfo.md +1 -1
  239. package/docs/TokenizationTokenInfo.md +1 -1
  240. package/docs/TokenizationTokenOperationSource.md +1 -1
  241. package/docs/TokenizationTokenPermissionType.md +6 -0
  242. package/docs/TokenizationTokenStandard.md +2 -0
  243. package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
  244. package/docs/TokenizationUnpauseTokenRequest.md +1 -0
  245. package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
  246. package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
  247. package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
  248. package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
  249. package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
  250. package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
  251. package/docs/TokenizationWeb3OperationSource.md +1 -1
  252. package/docs/TokensEventData.md +3 -1
  253. package/docs/TransactionWebhookEventData.md +3 -1
  254. package/docs/TransactionsApi.md +114 -2
  255. package/docs/UnfreezeDisposition.md +9 -0
  256. package/docs/UpdateAddressBookParam.md +12 -0
  257. package/docs/UpdateCustodialWalletParams.md +2 -1
  258. package/docs/UpdateMerchantByIdRequest.md +1 -1
  259. package/docs/UpdateMpcWalletParams.md +2 -1
  260. package/docs/UpdateWalletParams.md +1 -0
  261. package/docs/WalletInfo.md +1 -0
  262. package/docs/WalletInfoEventData.md +3 -1
  263. package/docs/WalletsApi.md +2 -2
  264. package/docs/WalletsMPCWalletsApi.md +1 -1
  265. package/docs/WebhookEventData.md +8 -2
  266. package/docs/WebhookEventDataType.md +3 -1
  267. package/docs/WebhookEventType.md +2 -0
  268. package/package.json +1 -1
  269. package/dist/model/ApprovalShowInfo.js +0 -140
  270. package/docs/ApprovalShowInfo.md +0 -13
@@ -0,0 +1,165 @@
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 CreateAddressBookParam model module.
29
+ * @module model/CreateAddressBookParam
30
+ */
31
+ var CreateAddressBookParam = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CreateAddressBookParam</code>.
34
+ * The request body to add an address to your Address Book.
35
+ * @alias module:model/CreateAddressBookParam
36
+ * @param chain_ids {Array.<String>} A list of chain IDs.
37
+ * @param address {String} The wallet address.
38
+ */
39
+ function CreateAddressBookParam(chain_ids, address) {
40
+ _classCallCheck(this, CreateAddressBookParam);
41
+ CreateAddressBookParam.initialize(this, chain_ids, address);
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(CreateAddressBookParam, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, chain_ids, address) {
52
+ obj['chain_ids'] = chain_ids;
53
+ obj['address'] = address;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>CreateAddressBookParam</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/CreateAddressBookParam} obj Optional instance to populate.
61
+ * @return {module:model/CreateAddressBookParam} The populated <code>CreateAddressBookParam</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new CreateAddressBookParam();
68
+ if (data.hasOwnProperty('chain_ids')) {
69
+ obj['chain_ids'] = _ApiClient["default"].convertToType(data['chain_ids'], ['String']);
70
+ }
71
+ if (data.hasOwnProperty('address')) {
72
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('memo')) {
75
+ obj['memo'] = _ApiClient["default"].convertToType(data['memo'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('label')) {
78
+ obj['label'] = _ApiClient["default"].convertToType(data['label'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('email')) {
81
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
82
+ }
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>CreateAddressBookParam</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateAddressBookParam</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // check to make sure all required properties are present in the JSON string
96
+ var _iterator = _createForOfIteratorHelper(CreateAddressBookParam.RequiredProperties),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var property = _step.value;
101
+ if (!data.hasOwnProperty(property)) {
102
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
+ }
104
+ }
105
+ // ensure the json data is an array
106
+ } catch (err) {
107
+ _iterator.e(err);
108
+ } finally {
109
+ _iterator.f();
110
+ }
111
+ if (!Array.isArray(data['chain_ids'])) {
112
+ throw new Error("Expected the field `chain_ids` to be an array in the JSON data but got " + data['chain_ids']);
113
+ }
114
+ // ensure the json data is a string
115
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
116
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
117
+ }
118
+ // ensure the json data is a string
119
+ if (data['memo'] && !(typeof data['memo'] === 'string' || data['memo'] instanceof String)) {
120
+ throw new Error("Expected the field `memo` to be a primitive type in the JSON string but got " + data['memo']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['label'] && !(typeof data['label'] === 'string' || data['label'] instanceof String)) {
124
+ throw new Error("Expected the field `label` to be a primitive type in the JSON string but got " + data['label']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
128
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
129
+ }
130
+ return true;
131
+ }
132
+ }]);
133
+ }();
134
+ CreateAddressBookParam.RequiredProperties = ["chain_ids", "address"];
135
+
136
+ /**
137
+ * A list of chain IDs.
138
+ * @member {Array.<String>} chain_ids
139
+ */
140
+ CreateAddressBookParam.prototype['chain_ids'] = undefined;
141
+
142
+ /**
143
+ * The wallet address.
144
+ * @member {String} address
145
+ */
146
+ CreateAddressBookParam.prototype['address'] = undefined;
147
+
148
+ /**
149
+ * Optional memo or tag required by some chains.
150
+ * @member {String} memo
151
+ */
152
+ CreateAddressBookParam.prototype['memo'] = undefined;
153
+
154
+ /**
155
+ * A user-defined label for the address.
156
+ * @member {String} label
157
+ */
158
+ CreateAddressBookParam.prototype['label'] = undefined;
159
+
160
+ /**
161
+ * The email of the address owner.
162
+ * @member {String} email
163
+ */
164
+ CreateAddressBookParam.prototype['email'] = undefined;
165
+ var _default = exports["default"] = CreateAddressBookParam;
@@ -0,0 +1,107 @@
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 _AddressBook = _interopRequireDefault(require("./AddressBook"));
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 CreateAddressBooks201Response model module.
30
+ * @module model/CreateAddressBooks201Response
31
+ */
32
+ var CreateAddressBooks201Response = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>CreateAddressBooks201Response</code>.
35
+ * @alias module:model/CreateAddressBooks201Response
36
+ */
37
+ function CreateAddressBooks201Response() {
38
+ _classCallCheck(this, CreateAddressBooks201Response);
39
+ CreateAddressBooks201Response.initialize(this);
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(CreateAddressBooks201Response, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>CreateAddressBooks201Response</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/CreateAddressBooks201Response} obj Optional instance to populate.
56
+ * @return {module:model/CreateAddressBooks201Response} The populated <code>CreateAddressBooks201Response</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new CreateAddressBooks201Response();
63
+ if (data.hasOwnProperty('data')) {
64
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AddressBook["default"]]);
65
+ }
66
+ }
67
+ return obj;
68
+ }
69
+
70
+ /**
71
+ * Validates the JSON data with respect to <code>CreateAddressBooks201Response</code>.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateAddressBooks201Response</code>.
74
+ */
75
+ }, {
76
+ key: "validateJSON",
77
+ value: function validateJSON(data) {
78
+ if (data['data']) {
79
+ // data not null
80
+ // ensure the json data is an array
81
+ if (!Array.isArray(data['data'])) {
82
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
83
+ }
84
+ // validate the optional field `data` (array)
85
+ var _iterator = _createForOfIteratorHelper(data['data']),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var item = _step.value;
90
+ _AddressBook["default"].validateJSON(item);
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
97
+ ;
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ /**
104
+ * @member {Array.<module:model/AddressBook>} data
105
+ */
106
+ CreateAddressBooks201Response.prototype['data'] = undefined;
107
+ var _default = exports["default"] = CreateAddressBooks201Response;
@@ -0,0 +1,128 @@
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 _CreateAddressBookParam = _interopRequireDefault(require("./CreateAddressBookParam"));
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 CreateAddressBooksParam model module.
30
+ * @module model/CreateAddressBooksParam
31
+ */
32
+ var CreateAddressBooksParam = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>CreateAddressBooksParam</code>.
35
+ * The request body to add addresses in batches to your Address Book.
36
+ * @alias module:model/CreateAddressBooksParam
37
+ * @param address_books {Array.<module:model/CreateAddressBookParam>}
38
+ */
39
+ function CreateAddressBooksParam(address_books) {
40
+ _classCallCheck(this, CreateAddressBooksParam);
41
+ CreateAddressBooksParam.initialize(this, address_books);
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(CreateAddressBooksParam, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, address_books) {
52
+ obj['address_books'] = address_books;
53
+ }
54
+
55
+ /**
56
+ * Constructs a <code>CreateAddressBooksParam</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/CreateAddressBooksParam} obj Optional instance to populate.
60
+ * @return {module:model/CreateAddressBooksParam} The populated <code>CreateAddressBooksParam</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new CreateAddressBooksParam();
67
+ if (data.hasOwnProperty('address_books')) {
68
+ obj['address_books'] = _ApiClient["default"].convertToType(data['address_books'], [_CreateAddressBookParam["default"]]);
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>CreateAddressBooksParam</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateAddressBooksParam</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ // check to make sure all required properties are present in the JSON string
83
+ var _iterator = _createForOfIteratorHelper(CreateAddressBooksParam.RequiredProperties),
84
+ _step;
85
+ try {
86
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
87
+ var property = _step.value;
88
+ if (!data.hasOwnProperty(property)) {
89
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
90
+ }
91
+ }
92
+ } catch (err) {
93
+ _iterator.e(err);
94
+ } finally {
95
+ _iterator.f();
96
+ }
97
+ if (data['address_books']) {
98
+ // data not null
99
+ // ensure the json data is an array
100
+ if (!Array.isArray(data['address_books'])) {
101
+ throw new Error("Expected the field `address_books` to be an array in the JSON data but got " + data['address_books']);
102
+ }
103
+ // validate the optional field `address_books` (array)
104
+ var _iterator2 = _createForOfIteratorHelper(data['address_books']),
105
+ _step2;
106
+ try {
107
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
108
+ var item = _step2.value;
109
+ _CreateAddressBookParam["default"].validateJSON(item);
110
+ }
111
+ } catch (err) {
112
+ _iterator2.e(err);
113
+ } finally {
114
+ _iterator2.f();
115
+ }
116
+ ;
117
+ }
118
+ return true;
119
+ }
120
+ }]);
121
+ }();
122
+ CreateAddressBooksParam.RequiredProperties = ["address_books"];
123
+
124
+ /**
125
+ * @member {Array.<module:model/CreateAddressBookParam>} address_books
126
+ */
127
+ CreateAddressBooksParam.prototype['address_books'] = undefined;
128
+ var _default = exports["default"] = CreateAddressBooksParam;
@@ -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 CreateAutoSweepTask model module.
29
+ * @module model/CreateAutoSweepTask
30
+ */
31
+ var CreateAutoSweepTask = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CreateAutoSweepTask</code>.
34
+ * Wallet and token information required to create an auto-sweep task.
35
+ * @alias module:model/CreateAutoSweepTask
36
+ * @param wallet_id {String} ID of the wallet where the token will be swept.
37
+ * @param token_id {String} ID of the token to be swept. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
38
+ */
39
+ function CreateAutoSweepTask(wallet_id, token_id) {
40
+ _classCallCheck(this, CreateAutoSweepTask);
41
+ CreateAutoSweepTask.initialize(this, wallet_id, token_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(CreateAutoSweepTask, null, [{
50
+ key: "initialize",
51
+ value: function initialize(obj, wallet_id, token_id) {
52
+ obj['wallet_id'] = wallet_id;
53
+ obj['token_id'] = token_id;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>CreateAutoSweepTask</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/CreateAutoSweepTask} obj Optional instance to populate.
61
+ * @return {module:model/CreateAutoSweepTask} The populated <code>CreateAutoSweepTask</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new CreateAutoSweepTask();
68
+ if (data.hasOwnProperty('wallet_id')) {
69
+ obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('token_id')) {
72
+ obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>CreateAutoSweepTask</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>CreateAutoSweepTask</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(CreateAutoSweepTask.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['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
107
+ throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ CreateAutoSweepTask.RequiredProperties = ["wallet_id", "token_id"];
114
+
115
+ /**
116
+ * ID of the wallet where the token will be swept.
117
+ * @member {String} wallet_id
118
+ */
119
+ CreateAutoSweepTask.prototype['wallet_id'] = undefined;
120
+
121
+ /**
122
+ * ID of the token to be swept. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
123
+ * @member {String} token_id
124
+ */
125
+ CreateAutoSweepTask.prototype['token_id'] = undefined;
126
+ var _default = exports["default"] = CreateAutoSweepTask;
@@ -32,8 +32,8 @@ var CreateCryptoAddressRequest = /*#__PURE__*/function () {
32
32
  /**
33
33
  * Constructs a new <code>CreateCryptoAddressRequest</code>.
34
34
  * @alias module:model/CreateCryptoAddressRequest
35
- * @param token_id {String} The token ID that identifies the cryptocurrency and its corresponding blockchain. **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`
36
- * @param address {String} The blockchain address where crypto withdrawals will be sent. Must be a valid address format for the blockchain specified by `token_id`. For example: - For `SOL_USDC`: Provide a Solana address. - For `ETH_USDT`: Provide an Ethereum address.
35
+ * @param token_id {String} The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - 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`
36
+ * @param address {String} The blockchain address in its native format. This is the actual destination address where funds will be sent. The address must match the format required by the specified blockchain. For example: - For `SOL_USDC`: Provide a Solana address - For `ETH_USDT`: Provide an Ethereum address
37
37
  */
38
38
  function CreateCryptoAddressRequest(token_id, address) {
39
39
  _classCallCheck(this, CreateCryptoAddressRequest);
@@ -119,19 +119,19 @@ var CreateCryptoAddressRequest = /*#__PURE__*/function () {
119
119
  CreateCryptoAddressRequest.RequiredProperties = ["token_id", "address"];
120
120
 
121
121
  /**
122
- * The token ID that identifies the cryptocurrency and its corresponding blockchain. **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`
122
+ * The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - 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`
123
123
  * @member {String} token_id
124
124
  */
125
125
  CreateCryptoAddressRequest.prototype['token_id'] = undefined;
126
126
 
127
127
  /**
128
- * The blockchain address where crypto withdrawals will be sent. Must be a valid address format for the blockchain specified by `token_id`. For example: - For `SOL_USDC`: Provide a Solana address. - For `ETH_USDT`: Provide an Ethereum address.
128
+ * The blockchain address in its native format. This is the actual destination address where funds will be sent. The address must match the format required by the specified blockchain. For example: - For `SOL_USDC`: Provide a Solana address - For `ETH_USDT`: Provide an Ethereum address
129
129
  * @member {String} address
130
130
  */
131
131
  CreateCryptoAddressRequest.prototype['address'] = undefined;
132
132
 
133
133
  /**
134
- * A label to help identify the address's purpose.
134
+ * A label to help identify the address's purpose.
135
135
  * @member {String} label
136
136
  */
137
137
  CreateCryptoAddressRequest.prototype['label'] = undefined;
@@ -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 Wallets 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 Wallets 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 Wallets 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;
@@ -131,7 +131,7 @@ CreateMerchantRequest.prototype['name'] = undefined;
131
131
  CreateMerchantRequest.prototype['wallet_id'] = undefined;
132
132
 
133
133
  /**
134
- * The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions.
134
+ * The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate.
135
135
  * @member {String} developer_fee_rate
136
136
  */
137
137
  CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;