@cobo/cobo-waas2 1.18.0 → 1.19.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 +78 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/OAuthApi.js +2 -2
- package/dist/api/TransactionsApi.js +0 -92
- package/dist/api/WalletsApi.js +50 -0
- package/dist/index.js +518 -7
- package/dist/model/AddressesEventData.js +13 -8
- package/dist/model/ApprovalDetail.js +160 -0
- package/dist/model/ApprovalResult.js +66 -0
- package/dist/model/ApprovalShowInfo.js +140 -0
- package/dist/model/ApprovalTemplate.js +114 -0
- package/dist/model/ApprovalTransactionResult.js +66 -0
- package/dist/model/ApprovalUserDetail.js +196 -0
- package/dist/model/AutoFuelType.js +5 -0
- package/dist/model/BalanceUpdateInfoEventData.js +13 -8
- package/dist/model/ChainsEventData.js +13 -8
- package/dist/model/CreatePaymentOrderRequest.js +7 -6
- package/dist/model/CreateSettlement.js +1 -2
- package/dist/model/CustodialWeb3TransferSource.js +2 -2
- package/dist/model/EstimatedEvmEip1559Fee.js +2 -2
- package/dist/model/EstimatedEvmLegacyFee.js +2 -2
- package/dist/model/EstimatedFILFee.js +2 -2
- package/dist/model/EstimatedFILFeeSlow.js +12 -12
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +2 -2
- package/dist/model/EstimatedSOLFee.js +2 -2
- package/dist/model/EstimatedSOLFeeSlow.js +11 -11
- package/dist/model/EstimatedUtxoFee.js +2 -2
- package/dist/model/EvmEip1559FeeBasePrice.js +0 -1
- package/dist/model/EvmEip1559FeeRate.js +2 -2
- package/dist/model/EvmLegacyFeeBasePrice.js +0 -1
- package/dist/model/EvmLegacyFeeRate.js +2 -2
- package/dist/model/FILBase.js +1 -1
- package/dist/model/FILPrice.js +3 -4
- package/dist/model/FeeRate.js +1 -1
- package/dist/model/FixedFeeRate.js +2 -2
- package/dist/model/GetMaxTransferableValueWithFeeModelRequest.js +156 -0
- package/dist/model/MPCVaultEventData.js +13 -8
- package/dist/model/MaxFeeAmount.js +0 -1
- package/dist/model/MaxTransferableValue.js +2 -2
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/PaymentOrderEventData.js +13 -8
- package/dist/model/PaymentRefundEventData.js +13 -8
- package/dist/model/PaymentSettlementEvent.js +13 -8
- package/dist/model/{ListTransactionApprovalDetails200Response.js → RoleDetail.js} +46 -27
- package/dist/model/SOLBase.js +2 -2
- package/dist/model/SOLComputeUnit.js +2 -3
- package/dist/model/SuspendedTokenEventData.js +225 -0
- package/dist/model/SuspendedTokenOperationType.js +61 -0
- package/dist/model/SwapActivity.js +29 -0
- package/dist/model/SwapActivityDetail.js +38 -0
- package/dist/model/TSSRequestWebhookEventData.js +13 -8
- package/dist/model/TokenListingEventData.js +13 -8
- package/dist/model/TokenizationActivityInfo.js +224 -0
- package/dist/model/TokenizationActivityStatus.js +66 -0
- package/dist/model/TokenizationAddressPermission.js +135 -0
- package/dist/model/TokenizationAllowlistActivationParams.js +124 -0
- package/dist/model/TokenizationAllowlistActivationRequest.js +180 -0
- package/dist/model/TokenizationAllowlistAddressNote.js +132 -0
- package/dist/model/TokenizationAppInitiator.js +87 -0
- package/dist/model/TokenizationBlocklistAddressNote.js +132 -0
- package/dist/model/TokenizationBurnEstimateFeeParams.js +187 -0
- package/dist/model/TokenizationBurnTokenParams.js +146 -0
- package/dist/model/TokenizationBurnTokenParamsBurnsInner.js +125 -0
- package/dist/model/TokenizationBurnTokenRequest.js +202 -0
- package/dist/model/TokenizationContractCallEstimateFeeParams.js +167 -0
- package/dist/model/TokenizationContractCallParams.js +107 -0
- package/dist/model/TokenizationContractCallParamsData.js +164 -0
- package/dist/model/TokenizationContractCallRequest.js +182 -0
- package/dist/model/TokenizationContractCallType.js +56 -0
- package/dist/model/TokenizationERC20TokenParams.js +173 -0
- package/dist/model/TokenizationEstimateFeeRequest.js +113 -0
- package/dist/model/TokenizationEstimateFeeRequestOperationParams.js +439 -0
- package/dist/model/TokenizationEvmContractCallParams.js +133 -0
- package/dist/model/TokenizationHoldingInfo.js +166 -0
- package/dist/model/TokenizationIssueEstimateFeeParams.js +176 -0
- package/dist/model/TokenizationIssueTokenParams.js +146 -0
- package/dist/model/TokenizationIssueTokenParamsTokenParams.js +183 -0
- package/dist/model/TokenizationIssuedTokenRequest.js +206 -0
- package/dist/model/TokenizationListActivitiesResponse.js +146 -0
- package/dist/model/TokenizationListEnabledChainsResponse.js +128 -0
- package/dist/model/TokenizationListHoldingsResponse.js +146 -0
- package/dist/model/TokenizationListTokenInfoResponse.js +146 -0
- package/dist/model/TokenizationMintEstimateFeeParams.js +187 -0
- package/dist/model/TokenizationMintTokenParams.js +146 -0
- package/dist/model/TokenizationMintTokenParamsMintsInner.js +125 -0
- package/dist/model/TokenizationMintTokenRequest.js +202 -0
- package/dist/model/TokenizationMpcOperationSource.js +136 -0
- package/dist/model/TokenizationOperationResponse.js +110 -0
- package/dist/model/TokenizationOperationSourceType.js +61 -0
- package/dist/model/TokenizationOperationType.js +96 -0
- package/dist/model/TokenizationPauseEstimateFeeParams.js +149 -0
- package/dist/model/TokenizationPauseTokenParams.js +113 -0
- package/dist/model/TokenizationPauseTokenRequest.js +164 -0
- package/dist/model/TokenizationStatus.js +71 -0
- package/dist/model/TokenizationToggleAllowlistEstimateFeeParams.js +165 -0
- package/dist/model/TokenizationTokenDetailInfo.js +309 -0
- package/dist/model/TokenizationTokenInfo.js +223 -0
- package/dist/model/TokenizationTokenOperationSource.js +192 -0
- package/dist/model/TokenizationTokenPermission.js +147 -0
- package/dist/model/TokenizationTokenPermissionParams.js +166 -0
- package/dist/model/TokenizationTokenPermissionType.js +86 -0
- package/dist/model/TokenizationTokenPermissionsResponse.js +139 -0
- package/dist/model/TokenizationTokenStandard.js +56 -0
- package/dist/model/TokenizationUnpauseEstimateFeeParams.js +149 -0
- package/dist/model/TokenizationUnpauseTokenParams.js +113 -0
- package/dist/model/TokenizationUnpauseTokenRequest.js +164 -0
- package/dist/model/TokenizationUpdateAddressAction.js +61 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesEstimateFeeParams.js +202 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParams.js +157 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesParamsAddressesInner.js +123 -0
- package/dist/model/TokenizationUpdateAllowlistAddressesRequest.js +217 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesEstimateFeeParams.js +202 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParams.js +157 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesParamsAddressesInner.js +123 -0
- package/dist/model/TokenizationUpdateBlocklistAddressesRequest.js +217 -0
- package/dist/model/TokenizationWeb3OperationSource.js +136 -0
- package/dist/model/TokensEventData.js +13 -8
- package/dist/model/TopUpAddress.js +2 -2
- package/dist/model/TransactionEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionEvmLegacyFee.js +2 -2
- package/dist/model/TransactionFILFee.js +11 -11
- package/dist/model/TransactionFee.js +10 -10
- package/dist/model/TransactionFixedFee.js +2 -2
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +2 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +2 -2
- package/dist/model/TransactionRequestFILFee.js +11 -11
- package/dist/model/TransactionRequestFee.js +6 -6
- package/dist/model/TransactionRequestFixedFee.js +2 -2
- package/dist/model/TransactionRequestSOLFee.js +9 -9
- package/dist/model/TransactionRequestUtxoFee.js +2 -2
- package/dist/model/TransactionSOLFee.js +11 -11
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionUtxoFee.js +2 -2
- package/dist/model/TransactionWebhookEventData.js +13 -8
- package/dist/model/UtxoFeeBasePrice.js +0 -1
- package/dist/model/UtxoFeeRate.js +2 -2
- package/dist/model/WalletInfoEventData.js +13 -8
- package/dist/model/WebhookEvent.js +2 -2
- package/dist/model/WebhookEventData.js +49 -9
- package/dist/model/WebhookEventDataType.js +12 -7
- package/dist/model/WebhookEventLog.js +2 -2
- package/dist/model/WebhookEventType.js +20 -0
- package/docs/AddressesEventData.md +5 -3
- package/docs/ApprovalDetail.md +14 -0
- package/docs/ApprovalResult.md +14 -0
- package/docs/ApprovalShowInfo.md +13 -0
- package/docs/ApprovalTemplate.md +11 -0
- package/docs/ApprovalTransactionResult.md +14 -0
- package/docs/ApprovalUserDetail.md +18 -0
- package/docs/AutoFuelType.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +5 -3
- package/docs/ChainsEventData.md +5 -3
- package/docs/CreatePaymentOrderRequest.md +4 -4
- package/docs/CreateSettlement.md +2 -2
- package/docs/CustodialWeb3TransferSource.md +1 -1
- package/docs/EstimatedEvmEip1559Fee.md +1 -1
- package/docs/EstimatedEvmLegacyFee.md +1 -1
- package/docs/EstimatedFILFee.md +1 -1
- package/docs/EstimatedFILFeeSlow.md +4 -4
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EstimatedSOLFee.md +1 -1
- package/docs/EstimatedSOLFeeSlow.md +4 -4
- package/docs/EstimatedUtxoFee.md +1 -1
- package/docs/EvmEip1559FeeRate.md +1 -1
- package/docs/EvmLegacyFeeRate.md +1 -1
- package/docs/FILBase.md +1 -1
- package/docs/FILPrice.md +3 -3
- package/docs/FeeRate.md +1 -1
- package/docs/FixedFeeRate.md +1 -1
- package/docs/GetMaxTransferableValueWithFeeModelRequest.md +12 -0
- package/docs/MPCVaultEventData.md +5 -3
- package/docs/MaxTransferableValue.md +1 -1
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +1 -1
- package/docs/PaymentOrderEventData.md +5 -3
- package/docs/PaymentRefundEventData.md +5 -3
- package/docs/PaymentSettlementEvent.md +5 -3
- package/docs/RoleDetail.md +11 -0
- package/docs/SOLBase.md +2 -2
- package/docs/SOLComputeUnit.md +2 -2
- package/docs/SuspendedTokenEventData.md +46 -0
- package/docs/SuspendedTokenOperationType.md +12 -0
- package/docs/SwapActivity.md +2 -0
- package/docs/SwapActivityDetail.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +5 -3
- package/docs/TokenListingEventData.md +5 -3
- package/docs/TokenizationActivityInfo.md +18 -0
- package/docs/TokenizationActivityStatus.md +14 -0
- package/docs/TokenizationAddressPermission.md +11 -0
- package/docs/TokenizationAllowlistActivationParams.md +10 -0
- package/docs/TokenizationAllowlistActivationRequest.md +12 -0
- package/docs/TokenizationAllowlistAddressNote.md +11 -0
- package/docs/TokenizationAppInitiator.md +9 -0
- package/docs/TokenizationBlocklistAddressNote.md +11 -0
- package/docs/TokenizationBurnEstimateFeeParams.md +12 -0
- package/docs/TokenizationBurnTokenParams.md +10 -0
- package/docs/TokenizationBurnTokenParamsBurnsInner.md +10 -0
- package/docs/TokenizationBurnTokenRequest.md +12 -0
- package/docs/TokenizationContractCallEstimateFeeParams.md +12 -0
- package/docs/TokenizationContractCallParams.md +10 -0
- package/docs/TokenizationContractCallParamsData.md +11 -0
- package/docs/TokenizationContractCallRequest.md +12 -0
- package/docs/TokenizationContractCallType.md +10 -0
- package/docs/TokenizationERC20TokenParams.md +14 -0
- package/docs/TokenizationEstimateFeeRequest.md +9 -0
- package/docs/TokenizationEstimateFeeRequestOperationParams.md +19 -0
- package/docs/TokenizationEvmContractCallParams.md +11 -0
- package/docs/TokenizationHoldingInfo.md +13 -0
- package/docs/TokenizationIssueEstimateFeeParams.md +12 -0
- package/docs/TokenizationIssueTokenParams.md +11 -0
- package/docs/TokenizationIssueTokenParamsTokenParams.md +14 -0
- package/docs/TokenizationIssuedTokenRequest.md +13 -0
- package/docs/TokenizationListActivitiesResponse.md +10 -0
- package/docs/TokenizationListEnabledChainsResponse.md +10 -0
- package/docs/TokenizationListHoldingsResponse.md +10 -0
- package/docs/TokenizationListTokenInfoResponse.md +10 -0
- package/docs/TokenizationMintEstimateFeeParams.md +12 -0
- package/docs/TokenizationMintTokenParams.md +10 -0
- package/docs/TokenizationMintTokenParamsMintsInner.md +10 -0
- package/docs/TokenizationMintTokenRequest.md +12 -0
- package/docs/TokenizationMpcOperationSource.md +11 -0
- package/docs/TokenizationOperationResponse.md +9 -0
- package/docs/TokenizationOperationSourceType.md +12 -0
- package/docs/TokenizationOperationType.md +26 -0
- package/docs/TokenizationPauseEstimateFeeParams.md +11 -0
- package/docs/TokenizationPauseTokenParams.md +9 -0
- package/docs/TokenizationPauseTokenRequest.md +11 -0
- package/docs/TokenizationStatus.md +16 -0
- package/docs/TokenizationToggleAllowlistEstimateFeeParams.md +12 -0
- package/docs/TokenizationTokenDetailInfo.md +19 -0
- package/docs/TokenizationTokenInfo.md +18 -0
- package/docs/TokenizationTokenOperationSource.md +11 -0
- package/docs/TokenizationTokenPermission.md +12 -0
- package/docs/TokenizationTokenPermissionParams.md +15 -0
- package/docs/TokenizationTokenPermissionType.md +22 -0
- package/docs/TokenizationTokenPermissionsResponse.md +10 -0
- package/docs/TokenizationTokenStandard.md +10 -0
- package/docs/TokenizationUnpauseEstimateFeeParams.md +11 -0
- package/docs/TokenizationUnpauseTokenParams.md +9 -0
- package/docs/TokenizationUnpauseTokenRequest.md +11 -0
- package/docs/TokenizationUpdateAddressAction.md +12 -0
- package/docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdateAllowlistAddressesParams.md +11 -0
- package/docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md +10 -0
- package/docs/TokenizationUpdateAllowlistAddressesRequest.md +13 -0
- package/docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md +13 -0
- package/docs/TokenizationUpdateBlocklistAddressesParams.md +11 -0
- package/docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md +10 -0
- package/docs/TokenizationUpdateBlocklistAddressesRequest.md +13 -0
- package/docs/TokenizationWeb3OperationSource.md +11 -0
- package/docs/TokensEventData.md +5 -3
- package/docs/TopUpAddress.md +1 -1
- package/docs/TransactionEvmEip1559Fee.md +2 -2
- package/docs/TransactionEvmLegacyFee.md +2 -2
- package/docs/TransactionFILFee.md +6 -6
- package/docs/TransactionFee.md +10 -10
- package/docs/TransactionFixedFee.md +2 -2
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFILFee.md +4 -4
- package/docs/TransactionRequestFee.md +6 -6
- package/docs/TransactionRequestFixedFee.md +1 -1
- package/docs/TransactionRequestSOLFee.md +3 -3
- package/docs/TransactionRequestUtxoFee.md +1 -1
- package/docs/TransactionSOLFee.md +6 -6
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionUtxoFee.md +2 -2
- package/docs/TransactionWebhookEventData.md +5 -3
- package/docs/TransactionsApi.md +0 -106
- package/docs/UtxoFeeRate.md +1 -1
- package/docs/WalletInfoEventData.md +5 -3
- package/docs/WalletsApi.md +55 -0
- package/docs/WebhookEvent.md +1 -1
- package/docs/WebhookEventData.md +7 -3
- package/docs/WebhookEventDataType.md +5 -3
- package/docs/WebhookEventLog.md +1 -1
- package/docs/WebhookEventType.md +8 -0
- package/package.json +1 -1
- package/docs/ListTransactionApprovalDetails200Response.md +0 -9
|
@@ -0,0 +1,132 @@
|
|
|
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 TokenizationBlocklistAddressNote model module.
|
|
29
|
+
* @module model/TokenizationBlocklistAddressNote
|
|
30
|
+
*/
|
|
31
|
+
var TokenizationBlocklistAddressNote = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>TokenizationBlocklistAddressNote</code>.
|
|
34
|
+
* @alias module:model/TokenizationBlocklistAddressNote
|
|
35
|
+
* @param address {String} The allowed address.
|
|
36
|
+
*/
|
|
37
|
+
function TokenizationBlocklistAddressNote(address) {
|
|
38
|
+
_classCallCheck(this, TokenizationBlocklistAddressNote);
|
|
39
|
+
TokenizationBlocklistAddressNote.initialize(this, address);
|
|
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(TokenizationBlocklistAddressNote, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, address) {
|
|
50
|
+
obj['address'] = address;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>TokenizationBlocklistAddressNote</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/TokenizationBlocklistAddressNote} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/TokenizationBlocklistAddressNote} The populated <code>TokenizationBlocklistAddressNote</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new TokenizationBlocklistAddressNote();
|
|
65
|
+
if (data.hasOwnProperty('address')) {
|
|
66
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('note')) {
|
|
69
|
+
obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
72
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>TokenizationBlocklistAddressNote</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>TokenizationBlocklistAddressNote</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(TokenizationBlocklistAddressNote.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['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
if (data['note'] && !(typeof data['note'] === 'string' || data['note'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `note` to be a primitive type in the JSON string but got " + data['note']);
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
112
|
+
}();
|
|
113
|
+
TokenizationBlocklistAddressNote.RequiredProperties = ["address"];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The allowed address.
|
|
117
|
+
* @member {String} address
|
|
118
|
+
*/
|
|
119
|
+
TokenizationBlocklistAddressNote.prototype['address'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The note for the allowed address.
|
|
123
|
+
* @member {String} note
|
|
124
|
+
*/
|
|
125
|
+
TokenizationBlocklistAddressNote.prototype['note'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The time when the blocklist address was created, in Unix timestamp format, measured in milliseconds.
|
|
129
|
+
* @member {Number} created_timestamp
|
|
130
|
+
*/
|
|
131
|
+
TokenizationBlocklistAddressNote.prototype['created_timestamp'] = undefined;
|
|
132
|
+
var _default = exports["default"] = TokenizationBlocklistAddressNote;
|
|
@@ -0,0 +1,187 @@
|
|
|
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 _TokenizationBurnTokenParams = _interopRequireDefault(require("./TokenizationBurnTokenParams"));
|
|
9
|
+
var _TokenizationBurnTokenParamsBurnsInner = _interopRequireDefault(require("./TokenizationBurnTokenParamsBurnsInner"));
|
|
10
|
+
var _TokenizationOperationType = _interopRequireDefault(require("./TokenizationOperationType"));
|
|
11
|
+
var _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
14
|
+
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; } } }; }
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
22
|
+
* Cobo Wallet as a Service 2.0
|
|
23
|
+
*
|
|
24
|
+
* Contact: help@cobo.com
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The TokenizationBurnEstimateFeeParams model module.
|
|
33
|
+
* @module model/TokenizationBurnEstimateFeeParams
|
|
34
|
+
*/
|
|
35
|
+
var TokenizationBurnEstimateFeeParams = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>TokenizationBurnEstimateFeeParams</code>.
|
|
38
|
+
* @alias module:model/TokenizationBurnEstimateFeeParams
|
|
39
|
+
* @implements module:model/TokenizationBurnTokenParams
|
|
40
|
+
* @param source {module:model/TokenizationTokenOperationSource}
|
|
41
|
+
* @param burns {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} Details for each token burn, including amount and address to burn from.
|
|
42
|
+
* @param operation_type {module:model/TokenizationOperationType}
|
|
43
|
+
* @param token_id {String} The ID of the token.
|
|
44
|
+
*/
|
|
45
|
+
function TokenizationBurnEstimateFeeParams(source, burns, operation_type, token_id) {
|
|
46
|
+
_classCallCheck(this, TokenizationBurnEstimateFeeParams);
|
|
47
|
+
_TokenizationBurnTokenParams["default"].initialize(this, source, burns);
|
|
48
|
+
TokenizationBurnEstimateFeeParams.initialize(this, source, burns, operation_type, token_id);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Initializes the fields of this object.
|
|
53
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
54
|
+
* Only for internal use.
|
|
55
|
+
*/
|
|
56
|
+
return _createClass(TokenizationBurnEstimateFeeParams, null, [{
|
|
57
|
+
key: "initialize",
|
|
58
|
+
value: function initialize(obj, source, burns, operation_type, token_id) {
|
|
59
|
+
obj['source'] = source;
|
|
60
|
+
obj['burns'] = burns;
|
|
61
|
+
obj['operation_type'] = operation_type;
|
|
62
|
+
obj['token_id'] = token_id;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Constructs a <code>TokenizationBurnEstimateFeeParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
67
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
68
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
69
|
+
* @param {module:model/TokenizationBurnEstimateFeeParams} obj Optional instance to populate.
|
|
70
|
+
* @return {module:model/TokenizationBurnEstimateFeeParams} The populated <code>TokenizationBurnEstimateFeeParams</code> instance.
|
|
71
|
+
*/
|
|
72
|
+
}, {
|
|
73
|
+
key: "constructFromObject",
|
|
74
|
+
value: function constructFromObject(data, obj) {
|
|
75
|
+
if (data) {
|
|
76
|
+
obj = obj || new TokenizationBurnEstimateFeeParams();
|
|
77
|
+
_TokenizationBurnTokenParams["default"].constructFromObject(data, obj);
|
|
78
|
+
if (data.hasOwnProperty('source')) {
|
|
79
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('burns')) {
|
|
82
|
+
obj['burns'] = _ApiClient["default"].convertToType(data['burns'], [_TokenizationBurnTokenParamsBurnsInner["default"]]);
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('operation_type')) {
|
|
85
|
+
obj['operation_type'] = _TokenizationOperationType["default"].constructFromObject(data['operation_type']);
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('token_id')) {
|
|
88
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return obj;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Validates the JSON data with respect to <code>TokenizationBurnEstimateFeeParams</code>.
|
|
96
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
97
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationBurnEstimateFeeParams</code>.
|
|
98
|
+
*/
|
|
99
|
+
}, {
|
|
100
|
+
key: "validateJSON",
|
|
101
|
+
value: function validateJSON(data) {
|
|
102
|
+
// check to make sure all required properties are present in the JSON string
|
|
103
|
+
var _iterator = _createForOfIteratorHelper(TokenizationBurnEstimateFeeParams.RequiredProperties),
|
|
104
|
+
_step;
|
|
105
|
+
try {
|
|
106
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
107
|
+
var property = _step.value;
|
|
108
|
+
if (!data.hasOwnProperty(property)) {
|
|
109
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// validate the optional field `source`
|
|
113
|
+
} catch (err) {
|
|
114
|
+
_iterator.e(err);
|
|
115
|
+
} finally {
|
|
116
|
+
_iterator.f();
|
|
117
|
+
}
|
|
118
|
+
if (data['source']) {
|
|
119
|
+
// data not null
|
|
120
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
121
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (data['burns']) {
|
|
125
|
+
// data not null
|
|
126
|
+
// ensure the json data is an array
|
|
127
|
+
if (!Array.isArray(data['burns'])) {
|
|
128
|
+
throw new Error("Expected the field `burns` to be an array in the JSON data but got " + data['burns']);
|
|
129
|
+
}
|
|
130
|
+
// validate the optional field `burns` (array)
|
|
131
|
+
var _iterator2 = _createForOfIteratorHelper(data['burns']),
|
|
132
|
+
_step2;
|
|
133
|
+
try {
|
|
134
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
135
|
+
var item = _step2.value;
|
|
136
|
+
_TokenizationBurnTokenParamsBurnsInner["default"].validateJSON(item);
|
|
137
|
+
}
|
|
138
|
+
} catch (err) {
|
|
139
|
+
_iterator2.e(err);
|
|
140
|
+
} finally {
|
|
141
|
+
_iterator2.f();
|
|
142
|
+
}
|
|
143
|
+
;
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
}]);
|
|
152
|
+
}();
|
|
153
|
+
TokenizationBurnEstimateFeeParams.RequiredProperties = ["source", "burns", "operation_type", "token_id"];
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
157
|
+
*/
|
|
158
|
+
TokenizationBurnEstimateFeeParams.prototype['source'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Details for each token burn, including amount and address to burn from.
|
|
162
|
+
* @member {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} burns
|
|
163
|
+
*/
|
|
164
|
+
TokenizationBurnEstimateFeeParams.prototype['burns'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @member {module:model/TokenizationOperationType} operation_type
|
|
168
|
+
*/
|
|
169
|
+
TokenizationBurnEstimateFeeParams.prototype['operation_type'] = undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The ID of the token.
|
|
173
|
+
* @member {String} token_id
|
|
174
|
+
*/
|
|
175
|
+
TokenizationBurnEstimateFeeParams.prototype['token_id'] = undefined;
|
|
176
|
+
|
|
177
|
+
// Implement TokenizationBurnTokenParams interface:
|
|
178
|
+
/**
|
|
179
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
180
|
+
*/
|
|
181
|
+
_TokenizationBurnTokenParams["default"].prototype['source'] = undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Details for each token burn, including amount and address to burn from.
|
|
184
|
+
* @member {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} burns
|
|
185
|
+
*/
|
|
186
|
+
_TokenizationBurnTokenParams["default"].prototype['burns'] = undefined;
|
|
187
|
+
var _default = exports["default"] = TokenizationBurnEstimateFeeParams;
|
|
@@ -0,0 +1,146 @@
|
|
|
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 _TokenizationBurnTokenParamsBurnsInner = _interopRequireDefault(require("./TokenizationBurnTokenParamsBurnsInner"));
|
|
9
|
+
var _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The TokenizationBurnTokenParams model module.
|
|
31
|
+
* @module model/TokenizationBurnTokenParams
|
|
32
|
+
*/
|
|
33
|
+
var TokenizationBurnTokenParams = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TokenizationBurnTokenParams</code>.
|
|
36
|
+
* @alias module:model/TokenizationBurnTokenParams
|
|
37
|
+
* @param source {module:model/TokenizationTokenOperationSource}
|
|
38
|
+
* @param burns {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} Details for each token burn, including amount and address to burn from.
|
|
39
|
+
*/
|
|
40
|
+
function TokenizationBurnTokenParams(source, burns) {
|
|
41
|
+
_classCallCheck(this, TokenizationBurnTokenParams);
|
|
42
|
+
TokenizationBurnTokenParams.initialize(this, source, burns);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(TokenizationBurnTokenParams, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, source, burns) {
|
|
53
|
+
obj['source'] = source;
|
|
54
|
+
obj['burns'] = burns;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>TokenizationBurnTokenParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/TokenizationBurnTokenParams} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/TokenizationBurnTokenParams} The populated <code>TokenizationBurnTokenParams</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new TokenizationBurnTokenParams();
|
|
69
|
+
if (data.hasOwnProperty('source')) {
|
|
70
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('burns')) {
|
|
73
|
+
obj['burns'] = _ApiClient["default"].convertToType(data['burns'], [_TokenizationBurnTokenParamsBurnsInner["default"]]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>TokenizationBurnTokenParams</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationBurnTokenParams</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// check to make sure all required properties are present in the JSON string
|
|
88
|
+
var _iterator = _createForOfIteratorHelper(TokenizationBurnTokenParams.RequiredProperties),
|
|
89
|
+
_step;
|
|
90
|
+
try {
|
|
91
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
92
|
+
var property = _step.value;
|
|
93
|
+
if (!data.hasOwnProperty(property)) {
|
|
94
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// validate the optional field `source`
|
|
98
|
+
} catch (err) {
|
|
99
|
+
_iterator.e(err);
|
|
100
|
+
} finally {
|
|
101
|
+
_iterator.f();
|
|
102
|
+
}
|
|
103
|
+
if (data['source']) {
|
|
104
|
+
// data not null
|
|
105
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
106
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (data['burns']) {
|
|
110
|
+
// data not null
|
|
111
|
+
// ensure the json data is an array
|
|
112
|
+
if (!Array.isArray(data['burns'])) {
|
|
113
|
+
throw new Error("Expected the field `burns` to be an array in the JSON data but got " + data['burns']);
|
|
114
|
+
}
|
|
115
|
+
// validate the optional field `burns` (array)
|
|
116
|
+
var _iterator2 = _createForOfIteratorHelper(data['burns']),
|
|
117
|
+
_step2;
|
|
118
|
+
try {
|
|
119
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
120
|
+
var item = _step2.value;
|
|
121
|
+
_TokenizationBurnTokenParamsBurnsInner["default"].validateJSON(item);
|
|
122
|
+
}
|
|
123
|
+
} catch (err) {
|
|
124
|
+
_iterator2.e(err);
|
|
125
|
+
} finally {
|
|
126
|
+
_iterator2.f();
|
|
127
|
+
}
|
|
128
|
+
;
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
}]);
|
|
133
|
+
}();
|
|
134
|
+
TokenizationBurnTokenParams.RequiredProperties = ["source", "burns"];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
138
|
+
*/
|
|
139
|
+
TokenizationBurnTokenParams.prototype['source'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Details for each token burn, including amount and address to burn from.
|
|
143
|
+
* @member {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} burns
|
|
144
|
+
*/
|
|
145
|
+
TokenizationBurnTokenParams.prototype['burns'] = undefined;
|
|
146
|
+
var _default = exports["default"] = TokenizationBurnTokenParams;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 TokenizationBurnTokenParamsBurnsInner model module.
|
|
29
|
+
* @module model/TokenizationBurnTokenParamsBurnsInner
|
|
30
|
+
*/
|
|
31
|
+
var TokenizationBurnTokenParamsBurnsInner = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>TokenizationBurnTokenParamsBurnsInner</code>.
|
|
34
|
+
* @alias module:model/TokenizationBurnTokenParamsBurnsInner
|
|
35
|
+
* @param amount {String} The amount of tokens to burn from this source.
|
|
36
|
+
* @param from_address {String} The address to burn tokens from for this source.
|
|
37
|
+
*/
|
|
38
|
+
function TokenizationBurnTokenParamsBurnsInner(amount, from_address) {
|
|
39
|
+
_classCallCheck(this, TokenizationBurnTokenParamsBurnsInner);
|
|
40
|
+
TokenizationBurnTokenParamsBurnsInner.initialize(this, amount, from_address);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(TokenizationBurnTokenParamsBurnsInner, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, amount, from_address) {
|
|
51
|
+
obj['amount'] = amount;
|
|
52
|
+
obj['from_address'] = from_address;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>TokenizationBurnTokenParamsBurnsInner</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/TokenizationBurnTokenParamsBurnsInner} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/TokenizationBurnTokenParamsBurnsInner} The populated <code>TokenizationBurnTokenParamsBurnsInner</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new TokenizationBurnTokenParamsBurnsInner();
|
|
67
|
+
if (data.hasOwnProperty('amount')) {
|
|
68
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('from_address')) {
|
|
71
|
+
obj['from_address'] = _ApiClient["default"].convertToType(data['from_address'], 'String');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>TokenizationBurnTokenParamsBurnsInner</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationBurnTokenParamsBurnsInner</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(TokenizationBurnTokenParamsBurnsInner.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
if (data['from_address'] && !(typeof data['from_address'] === 'string' || data['from_address'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `from_address` to be a primitive type in the JSON string but got " + data['from_address']);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
}();
|
|
112
|
+
TokenizationBurnTokenParamsBurnsInner.RequiredProperties = ["amount", "from_address"];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The amount of tokens to burn from this source.
|
|
116
|
+
* @member {String} amount
|
|
117
|
+
*/
|
|
118
|
+
TokenizationBurnTokenParamsBurnsInner.prototype['amount'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The address to burn tokens from for this source.
|
|
122
|
+
* @member {String} from_address
|
|
123
|
+
*/
|
|
124
|
+
TokenizationBurnTokenParamsBurnsInner.prototype['from_address'] = undefined;
|
|
125
|
+
var _default = exports["default"] = TokenizationBurnTokenParamsBurnsInner;
|