@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.
- package/README.md +80 -5
- package/dist/ApiClient.js +1 -1
- package/dist/PreRequestScript.js +2 -4
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +289 -0
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/PaymentApi.js +233 -20
- package/dist/api/TokenizationApi.js +1024 -0
- package/dist/api/TransactionsApi.js +105 -4
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +259 -7
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/ApprovalDetail.js +11 -11
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +198 -0
- package/dist/model/AutoSweepTaskStatus.js +61 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +126 -0
- package/dist/model/CreateCryptoAddressRequest.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +9 -0
- package/dist/model/CreateExchangeWalletParams.js +14 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +14 -0
- package/dist/model/CreatePaymentOrderRequest.js +3 -3
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +9 -0
- package/dist/model/CreateSettlement.js +28 -5
- package/dist/model/CreateSmartContractWalletParams.js +6 -0
- package/dist/model/CreateSweepToAddress.js +126 -0
- package/dist/model/CreateWalletParams.js +6 -0
- package/dist/model/CreatedWalletInfo.js +6 -0
- package/dist/model/CustodialWalletInfo.js +9 -0
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DeleteCryptoAddress201Response.js +2 -2
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/ExchangeWalletInfo.js +14 -0
- package/dist/model/GetTokenizationAllowlistActivation200Response.js +107 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/ListAutoSweepTask200Response.js +123 -0
- package/dist/model/ListMerchantBalances200Response.js +107 -0
- package/dist/model/ListPaymentWalletBalances200Response.js +107 -0
- package/dist/model/ListTokenizationBlocklistAddresses200Response.js +145 -0
- package/dist/model/ListWalletSweepToAddresses200Response.js +107 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MPCWalletInfo.js +14 -0
- package/dist/model/Merchant.js +1 -1
- package/dist/model/MerchantBalance.js +201 -0
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +177 -0
- package/dist/model/PspBalance.js +175 -0
- package/dist/model/ReceivedAmountPerAddress.js +126 -0
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SafeWallet.js +9 -0
- package/dist/model/SettlementDetail.js +1 -1
- package/dist/model/SmartContractWalletInfo.js +6 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SweepToAddress.js +135 -0
- package/dist/model/SweepToAddressStatus.js +61 -0
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokenizationActivityInfo.js +8 -4
- package/dist/model/TokenizationAllowlistActivationRequest.js +13 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +4 -4
- package/dist/model/TokenizationAllowlistAddressesResponse.js +145 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +4 -4
- package/dist/model/TokenizationBurnEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +4 -4
- package/dist/model/TokenizationBurnTokenRequest.js +13 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationContractCallParamsData.js +43 -9
- package/dist/model/TokenizationContractCallRequest.js +13 -0
- package/dist/model/TokenizationContractCallType.js +5 -0
- package/dist/model/TokenizationERC20TokenParams.js +4 -4
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +6 -0
- package/dist/model/TokenizationEvmContractCallParams.js +2 -2
- package/dist/model/TokenizationIssueEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +40 -12
- package/dist/model/TokenizationIssuedTokenRequest.js +14 -1
- package/dist/model/TokenizationMintEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationMintTokenRequest.js +13 -0
- package/dist/model/TokenizationMpcOperationSource.js +2 -2
- package/dist/model/TokenizationPauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationPauseTokenRequest.js +13 -0
- package/dist/model/TokenizationSOLTokenParams.js +173 -0
- package/dist/model/TokenizationSolContractCallParams.js +137 -0
- package/dist/model/TokenizationSolTokenPermissionParams.js +140 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationTokenDetailInfo.js +6 -6
- package/dist/model/TokenizationTokenInfo.js +4 -4
- package/dist/model/TokenizationTokenOperationSource.js +1 -1
- package/dist/model/TokenizationTokenPermissionParams.js +1 -1
- package/dist/model/TokenizationTokenPermissionType.js +15 -0
- package/dist/model/TokenizationTokenStandard.js +5 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +13 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +1 -1
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +13 -0
- package/dist/model/TokenizationWeb3OperationSource.js +2 -2
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateCustodialWalletParams.js +13 -6
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/UpdateMpcWalletParams.js +13 -6
- package/dist/model/UpdateWalletParams.js +6 -0
- package/dist/model/WalletInfo.js +6 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +62 -10
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressesEventData.md +3 -1
- package/docs/ApprovalDetail.md +4 -4
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +285 -0
- package/docs/AutoSweepTask.md +16 -0
- package/docs/AutoSweepTaskStatus.md +12 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +10 -0
- package/docs/CreateCryptoAddressRequest.md +3 -3
- package/docs/CreateCustodialWalletParams.md +1 -0
- package/docs/CreateExchangeWalletParams.md +1 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -0
- package/docs/CreatePaymentOrderRequest.md +2 -2
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -0
- package/docs/CreateSettlement.md +2 -2
- package/docs/CreateSmartContractWalletParams.md +1 -0
- package/docs/CreateSweepToAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -0
- package/docs/CreatedWalletInfo.md +1 -0
- package/docs/CustodialWalletInfo.md +1 -0
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DeleteCryptoAddress201Response.md +1 -1
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/ExchangeWalletInfo.md +1 -0
- package/docs/GetTokenizationAllowlistActivation200Response.md +9 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/ListAutoSweepTask200Response.md +10 -0
- package/docs/ListMerchantBalances200Response.md +9 -0
- package/docs/ListPaymentWalletBalances200Response.md +9 -0
- package/docs/ListTokenizationBlocklistAddresses200Response.md +10 -0
- package/docs/ListWalletSweepToAddresses200Response.md +9 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MPCWalletInfo.md +1 -0
- package/docs/Merchant.md +1 -1
- package/docs/MerchantBalance.md +16 -0
- package/docs/OrgInfo.md +1 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +229 -11
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +14 -0
- package/docs/PspBalance.md +14 -0
- package/docs/ReceivedAmountPerAddress.md +10 -0
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SafeWallet.md +1 -0
- package/docs/SettlementDetail.md +1 -1
- package/docs/SmartContractWalletInfo.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SweepToAddress.md +11 -0
- package/docs/SweepToAddressStatus.md +12 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationActivityInfo.md +2 -2
- package/docs/TokenizationAllowlistActivationRequest.md +1 -0
- package/docs/TokenizationAllowlistAddressNote.md +3 -3
- package/docs/TokenizationAllowlistAddressesResponse.md +10 -0
- package/docs/TokenizationApi.md +1069 -0
- package/docs/TokenizationBlocklistAddressNote.md +3 -3
- package/docs/TokenizationBurnEstimateFeeParams.md +1 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +2 -2
- package/docs/TokenizationBurnTokenRequest.md +1 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +1 -0
- package/docs/TokenizationContractCallParamsData.md +2 -1
- package/docs/TokenizationContractCallRequest.md +1 -0
- package/docs/TokenizationContractCallType.md +2 -0
- package/docs/TokenizationERC20TokenParams.md +1 -1
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +1 -0
- package/docs/TokenizationEvmContractCallParams.md +1 -1
- package/docs/TokenizationIssueEstimateFeeParams.md +1 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +2 -2
- package/docs/TokenizationIssuedTokenRequest.md +2 -1
- package/docs/TokenizationMintEstimateFeeParams.md +1 -0
- package/docs/TokenizationMintTokenRequest.md +1 -0
- package/docs/TokenizationMpcOperationSource.md +1 -1
- package/docs/TokenizationPauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationPauseTokenRequest.md +1 -0
- package/docs/TokenizationSOLTokenParams.md +14 -0
- package/docs/TokenizationSolContractCallParams.md +10 -0
- package/docs/TokenizationSolTokenPermissionParams.md +13 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +1 -0
- package/docs/TokenizationTokenDetailInfo.md +1 -1
- package/docs/TokenizationTokenInfo.md +1 -1
- package/docs/TokenizationTokenOperationSource.md +1 -1
- package/docs/TokenizationTokenPermissionType.md +6 -0
- package/docs/TokenizationTokenStandard.md +2 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +1 -0
- package/docs/TokenizationUnpauseTokenRequest.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +1 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +1 -1
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +1 -0
- package/docs/TokenizationWeb3OperationSource.md +1 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +114 -2
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateCustodialWalletParams.md +2 -1
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/UpdateMpcWalletParams.md +2 -1
- package/docs/UpdateWalletParams.md +1 -0
- package/docs/WalletInfo.md +1 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +8 -2
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- 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
|
|
36
|
-
* @param address {String} The blockchain address where
|
|
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
|
|
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
|
|
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;
|