@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,202 @@
|
|
|
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 _TokenizationAppInitiator = _interopRequireDefault(require("./TokenizationAppInitiator"));
|
|
9
|
+
var _TokenizationBurnTokenParams = _interopRequireDefault(require("./TokenizationBurnTokenParams"));
|
|
10
|
+
var _TokenizationBurnTokenParamsBurnsInner = _interopRequireDefault(require("./TokenizationBurnTokenParamsBurnsInner"));
|
|
11
|
+
var _TokenizationTokenOperationSource = _interopRequireDefault(require("./TokenizationTokenOperationSource"));
|
|
12
|
+
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; } } }; }
|
|
16
|
+
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; } }
|
|
17
|
+
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; }
|
|
18
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
|
+
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); } }
|
|
20
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
+
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); } /**
|
|
23
|
+
* Cobo Wallet as a Service 2.0
|
|
24
|
+
*
|
|
25
|
+
* Contact: help@cobo.com
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The TokenizationBurnTokenRequest model module.
|
|
34
|
+
* @module model/TokenizationBurnTokenRequest
|
|
35
|
+
*/
|
|
36
|
+
var TokenizationBurnTokenRequest = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>TokenizationBurnTokenRequest</code>.
|
|
39
|
+
* @alias module:model/TokenizationBurnTokenRequest
|
|
40
|
+
* @implements module:model/TokenizationBurnTokenParams
|
|
41
|
+
* @implements module:model/TokenizationAppInitiator
|
|
42
|
+
* @param source {module:model/TokenizationTokenOperationSource}
|
|
43
|
+
* @param burns {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} Details for each token burn, including amount and address to burn from.
|
|
44
|
+
* @param fee {module:model/TransactionRequestFee}
|
|
45
|
+
*/
|
|
46
|
+
function TokenizationBurnTokenRequest(source, burns, fee) {
|
|
47
|
+
_classCallCheck(this, TokenizationBurnTokenRequest);
|
|
48
|
+
_TokenizationBurnTokenParams["default"].initialize(this, source, burns);
|
|
49
|
+
_TokenizationAppInitiator["default"].initialize(this);
|
|
50
|
+
TokenizationBurnTokenRequest.initialize(this, source, burns, fee);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Initializes the fields of this object.
|
|
55
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
56
|
+
* Only for internal use.
|
|
57
|
+
*/
|
|
58
|
+
return _createClass(TokenizationBurnTokenRequest, null, [{
|
|
59
|
+
key: "initialize",
|
|
60
|
+
value: function initialize(obj, source, burns, fee) {
|
|
61
|
+
obj['source'] = source;
|
|
62
|
+
obj['burns'] = burns;
|
|
63
|
+
obj['fee'] = fee;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Constructs a <code>TokenizationBurnTokenRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
68
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
69
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
70
|
+
* @param {module:model/TokenizationBurnTokenRequest} obj Optional instance to populate.
|
|
71
|
+
* @return {module:model/TokenizationBurnTokenRequest} The populated <code>TokenizationBurnTokenRequest</code> instance.
|
|
72
|
+
*/
|
|
73
|
+
}, {
|
|
74
|
+
key: "constructFromObject",
|
|
75
|
+
value: function constructFromObject(data, obj) {
|
|
76
|
+
if (data) {
|
|
77
|
+
obj = obj || new TokenizationBurnTokenRequest();
|
|
78
|
+
_TokenizationBurnTokenParams["default"].constructFromObject(data, obj);
|
|
79
|
+
_TokenizationAppInitiator["default"].constructFromObject(data, obj);
|
|
80
|
+
if (data.hasOwnProperty('source')) {
|
|
81
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('burns')) {
|
|
84
|
+
obj['burns'] = _ApiClient["default"].convertToType(data['burns'], [_TokenizationBurnTokenParamsBurnsInner["default"]]);
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('app_initiator')) {
|
|
87
|
+
obj['app_initiator'] = _ApiClient["default"].convertToType(data['app_initiator'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('fee')) {
|
|
90
|
+
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return obj;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Validates the JSON data with respect to <code>TokenizationBurnTokenRequest</code>.
|
|
98
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
99
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationBurnTokenRequest</code>.
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "validateJSON",
|
|
103
|
+
value: function validateJSON(data) {
|
|
104
|
+
// check to make sure all required properties are present in the JSON string
|
|
105
|
+
var _iterator = _createForOfIteratorHelper(TokenizationBurnTokenRequest.RequiredProperties),
|
|
106
|
+
_step;
|
|
107
|
+
try {
|
|
108
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
109
|
+
var property = _step.value;
|
|
110
|
+
if (!data.hasOwnProperty(property)) {
|
|
111
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// validate the optional field `source`
|
|
115
|
+
} catch (err) {
|
|
116
|
+
_iterator.e(err);
|
|
117
|
+
} finally {
|
|
118
|
+
_iterator.f();
|
|
119
|
+
}
|
|
120
|
+
if (data['source']) {
|
|
121
|
+
// data not null
|
|
122
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
123
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (data['burns']) {
|
|
127
|
+
// data not null
|
|
128
|
+
// ensure the json data is an array
|
|
129
|
+
if (!Array.isArray(data['burns'])) {
|
|
130
|
+
throw new Error("Expected the field `burns` to be an array in the JSON data but got " + data['burns']);
|
|
131
|
+
}
|
|
132
|
+
// validate the optional field `burns` (array)
|
|
133
|
+
var _iterator2 = _createForOfIteratorHelper(data['burns']),
|
|
134
|
+
_step2;
|
|
135
|
+
try {
|
|
136
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
137
|
+
var item = _step2.value;
|
|
138
|
+
_TokenizationBurnTokenParamsBurnsInner["default"].validateJSON(item);
|
|
139
|
+
}
|
|
140
|
+
} catch (err) {
|
|
141
|
+
_iterator2.e(err);
|
|
142
|
+
} finally {
|
|
143
|
+
_iterator2.f();
|
|
144
|
+
}
|
|
145
|
+
;
|
|
146
|
+
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['app_initiator'] && !(typeof data['app_initiator'] === 'string' || data['app_initiator'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `app_initiator` to be a primitive type in the JSON string but got " + data['app_initiator']);
|
|
150
|
+
}
|
|
151
|
+
// validate the optional field `fee`
|
|
152
|
+
if (data['fee']) {
|
|
153
|
+
// data not null
|
|
154
|
+
if (!!_TransactionRequestFee["default"].validateJSON) {
|
|
155
|
+
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
}]);
|
|
161
|
+
}();
|
|
162
|
+
TokenizationBurnTokenRequest.RequiredProperties = ["source", "burns", "fee"];
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
166
|
+
*/
|
|
167
|
+
TokenizationBurnTokenRequest.prototype['source'] = undefined;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Details for each token burn, including amount and address to burn from.
|
|
171
|
+
* @member {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} burns
|
|
172
|
+
*/
|
|
173
|
+
TokenizationBurnTokenRequest.prototype['burns'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The initiator of the tokenization activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
|
|
177
|
+
* @member {String} app_initiator
|
|
178
|
+
*/
|
|
179
|
+
TokenizationBurnTokenRequest.prototype['app_initiator'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @member {module:model/TransactionRequestFee} fee
|
|
183
|
+
*/
|
|
184
|
+
TokenizationBurnTokenRequest.prototype['fee'] = undefined;
|
|
185
|
+
|
|
186
|
+
// Implement TokenizationBurnTokenParams interface:
|
|
187
|
+
/**
|
|
188
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
189
|
+
*/
|
|
190
|
+
_TokenizationBurnTokenParams["default"].prototype['source'] = undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Details for each token burn, including amount and address to burn from.
|
|
193
|
+
* @member {Array.<module:model/TokenizationBurnTokenParamsBurnsInner>} burns
|
|
194
|
+
*/
|
|
195
|
+
_TokenizationBurnTokenParams["default"].prototype['burns'] = undefined;
|
|
196
|
+
// Implement TokenizationAppInitiator interface:
|
|
197
|
+
/**
|
|
198
|
+
* The initiator of the tokenization activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
|
|
199
|
+
* @member {String} app_initiator
|
|
200
|
+
*/
|
|
201
|
+
_TokenizationAppInitiator["default"].prototype['app_initiator'] = undefined;
|
|
202
|
+
var _default = exports["default"] = TokenizationBurnTokenRequest;
|
|
@@ -0,0 +1,167 @@
|
|
|
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 _TokenizationContractCallParams = _interopRequireDefault(require("./TokenizationContractCallParams"));
|
|
9
|
+
var _TokenizationContractCallParamsData = _interopRequireDefault(require("./TokenizationContractCallParamsData"));
|
|
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 TokenizationContractCallEstimateFeeParams model module.
|
|
33
|
+
* @module model/TokenizationContractCallEstimateFeeParams
|
|
34
|
+
*/
|
|
35
|
+
var TokenizationContractCallEstimateFeeParams = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>TokenizationContractCallEstimateFeeParams</code>.
|
|
38
|
+
* @alias module:model/TokenizationContractCallEstimateFeeParams
|
|
39
|
+
* @implements module:model/TokenizationContractCallParams
|
|
40
|
+
* @param operation_type {module:model/TokenizationOperationType}
|
|
41
|
+
* @param token_id {String} The ID of the token.
|
|
42
|
+
*/
|
|
43
|
+
function TokenizationContractCallEstimateFeeParams(operation_type, token_id) {
|
|
44
|
+
_classCallCheck(this, TokenizationContractCallEstimateFeeParams);
|
|
45
|
+
_TokenizationContractCallParams["default"].initialize(this);
|
|
46
|
+
TokenizationContractCallEstimateFeeParams.initialize(this, operation_type, token_id);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(TokenizationContractCallEstimateFeeParams, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, operation_type, token_id) {
|
|
57
|
+
obj['operation_type'] = operation_type;
|
|
58
|
+
obj['token_id'] = token_id;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>TokenizationContractCallEstimateFeeParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/TokenizationContractCallEstimateFeeParams} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/TokenizationContractCallEstimateFeeParams} The populated <code>TokenizationContractCallEstimateFeeParams</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new TokenizationContractCallEstimateFeeParams();
|
|
73
|
+
_TokenizationContractCallParams["default"].constructFromObject(data, obj);
|
|
74
|
+
if (data.hasOwnProperty('source')) {
|
|
75
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('data')) {
|
|
78
|
+
obj['data'] = _TokenizationContractCallParamsData["default"].constructFromObject(data['data']);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('operation_type')) {
|
|
81
|
+
obj['operation_type'] = _TokenizationOperationType["default"].constructFromObject(data['operation_type']);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('token_id')) {
|
|
84
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return obj;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Validates the JSON data with respect to <code>TokenizationContractCallEstimateFeeParams</code>.
|
|
92
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
93
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationContractCallEstimateFeeParams</code>.
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "validateJSON",
|
|
97
|
+
value: function validateJSON(data) {
|
|
98
|
+
// check to make sure all required properties are present in the JSON string
|
|
99
|
+
var _iterator = _createForOfIteratorHelper(TokenizationContractCallEstimateFeeParams.RequiredProperties),
|
|
100
|
+
_step;
|
|
101
|
+
try {
|
|
102
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103
|
+
var property = _step.value;
|
|
104
|
+
if (!data.hasOwnProperty(property)) {
|
|
105
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// validate the optional field `source`
|
|
109
|
+
} catch (err) {
|
|
110
|
+
_iterator.e(err);
|
|
111
|
+
} finally {
|
|
112
|
+
_iterator.f();
|
|
113
|
+
}
|
|
114
|
+
if (data['source']) {
|
|
115
|
+
// data not null
|
|
116
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
117
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// validate the optional field `data`
|
|
121
|
+
if (data['data']) {
|
|
122
|
+
// data not null
|
|
123
|
+
if (!!_TokenizationContractCallParamsData["default"].validateJSON) {
|
|
124
|
+
_TokenizationContractCallParamsData["default"].validateJSON(data['data']);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// ensure the json data is a string
|
|
128
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
}]);
|
|
134
|
+
}();
|
|
135
|
+
TokenizationContractCallEstimateFeeParams.RequiredProperties = ["operation_type", "token_id"];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
139
|
+
*/
|
|
140
|
+
TokenizationContractCallEstimateFeeParams.prototype['source'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @member {module:model/TokenizationContractCallParamsData} data
|
|
144
|
+
*/
|
|
145
|
+
TokenizationContractCallEstimateFeeParams.prototype['data'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @member {module:model/TokenizationOperationType} operation_type
|
|
149
|
+
*/
|
|
150
|
+
TokenizationContractCallEstimateFeeParams.prototype['operation_type'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The ID of the token.
|
|
154
|
+
* @member {String} token_id
|
|
155
|
+
*/
|
|
156
|
+
TokenizationContractCallEstimateFeeParams.prototype['token_id'] = undefined;
|
|
157
|
+
|
|
158
|
+
// Implement TokenizationContractCallParams interface:
|
|
159
|
+
/**
|
|
160
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
161
|
+
*/
|
|
162
|
+
_TokenizationContractCallParams["default"].prototype['source'] = undefined;
|
|
163
|
+
/**
|
|
164
|
+
* @member {module:model/TokenizationContractCallParamsData} data
|
|
165
|
+
*/
|
|
166
|
+
_TokenizationContractCallParams["default"].prototype['data'] = undefined;
|
|
167
|
+
var _default = exports["default"] = TokenizationContractCallEstimateFeeParams;
|
|
@@ -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 _TokenizationContractCallParamsData = _interopRequireDefault(require("./TokenizationContractCallParamsData"));
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Cobo Wallet as a Service 2.0
|
|
18
|
+
*
|
|
19
|
+
* Contact: help@cobo.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The TokenizationContractCallParams model module.
|
|
28
|
+
* @module model/TokenizationContractCallParams
|
|
29
|
+
*/
|
|
30
|
+
var TokenizationContractCallParams = /*#__PURE__*/function () {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new <code>TokenizationContractCallParams</code>.
|
|
33
|
+
* The information about the contract call.
|
|
34
|
+
* @alias module:model/TokenizationContractCallParams
|
|
35
|
+
*/
|
|
36
|
+
function TokenizationContractCallParams() {
|
|
37
|
+
_classCallCheck(this, TokenizationContractCallParams);
|
|
38
|
+
TokenizationContractCallParams.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(TokenizationContractCallParams, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>TokenizationContractCallParams</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/TokenizationContractCallParams} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/TokenizationContractCallParams} The populated <code>TokenizationContractCallParams</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new TokenizationContractCallParams();
|
|
62
|
+
if (data.hasOwnProperty('source')) {
|
|
63
|
+
obj['source'] = _TokenizationTokenOperationSource["default"].constructFromObject(data['source']);
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('data')) {
|
|
66
|
+
obj['data'] = _TokenizationContractCallParamsData["default"].constructFromObject(data['data']);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>TokenizationContractCallParams</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenizationContractCallParams</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// validate the optional field `source`
|
|
81
|
+
if (data['source']) {
|
|
82
|
+
// data not null
|
|
83
|
+
if (!!_TokenizationTokenOperationSource["default"].validateJSON) {
|
|
84
|
+
_TokenizationTokenOperationSource["default"].validateJSON(data['source']);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// validate the optional field `data`
|
|
88
|
+
if (data['data']) {
|
|
89
|
+
// data not null
|
|
90
|
+
if (!!_TokenizationContractCallParamsData["default"].validateJSON) {
|
|
91
|
+
_TokenizationContractCallParamsData["default"].validateJSON(data['data']);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
}]);
|
|
97
|
+
}();
|
|
98
|
+
/**
|
|
99
|
+
* @member {module:model/TokenizationTokenOperationSource} source
|
|
100
|
+
*/
|
|
101
|
+
TokenizationContractCallParams.prototype['source'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @member {module:model/TokenizationContractCallParamsData} data
|
|
105
|
+
*/
|
|
106
|
+
TokenizationContractCallParams.prototype['data'] = undefined;
|
|
107
|
+
var _default = exports["default"] = TokenizationContractCallParams;
|
|
@@ -0,0 +1,164 @@
|
|
|
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 _TokenizationContractCallType = _interopRequireDefault(require("./TokenizationContractCallType"));
|
|
9
|
+
var _TokenizationEvmContractCallParams = _interopRequireDefault(require("./TokenizationEvmContractCallParams"));
|
|
10
|
+
var _TokenizationContractCallParamsData;
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
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 _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, 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 TokenizationContractCallParamsData model module.
|
|
30
|
+
* @module model/TokenizationContractCallParamsData
|
|
31
|
+
*/
|
|
32
|
+
var TokenizationContractCallParamsData = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>TokenizationContractCallParamsData</code>.
|
|
35
|
+
* @alias module:model/TokenizationContractCallParamsData
|
|
36
|
+
* @param {(module:model/TokenizationEvmContractCallParams)} instance The actual instance to initialize TokenizationContractCallParamsData.
|
|
37
|
+
*/
|
|
38
|
+
function TokenizationContractCallParamsData() {
|
|
39
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
40
|
+
_classCallCheck(this, TokenizationContractCallParamsData);
|
|
41
|
+
/**
|
|
42
|
+
* Returns the JSON representation of the actual instance.
|
|
43
|
+
* @return {string}
|
|
44
|
+
*/
|
|
45
|
+
_defineProperty(this, "toJSON", function () {
|
|
46
|
+
return this.getActualInstance();
|
|
47
|
+
});
|
|
48
|
+
if (instance === null) {
|
|
49
|
+
this.actualInstance = null;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var match = 0;
|
|
53
|
+
var errorMessages = [];
|
|
54
|
+
var discriminatorValue = instance["type"];
|
|
55
|
+
if (discriminatorValue) {
|
|
56
|
+
switch (discriminatorValue) {
|
|
57
|
+
case "EVM_Contract":
|
|
58
|
+
this.actualInstance = _TokenizationEvmContractCallParams["default"].constructFromObject(instance);
|
|
59
|
+
match++;
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
if (instance instanceof _TokenizationEvmContractCallParams["default"]) {
|
|
69
|
+
this.actualInstance = instance;
|
|
70
|
+
} else if (!!_TokenizationEvmContractCallParams["default"].validateJSON && _TokenizationEvmContractCallParams["default"].validateJSON(instance)) {
|
|
71
|
+
// plain JS object
|
|
72
|
+
// create TokenizationEvmContractCallParams from JS object
|
|
73
|
+
this.actualInstance = _TokenizationEvmContractCallParams["default"].constructFromObject(instance);
|
|
74
|
+
} else {
|
|
75
|
+
if (_TokenizationEvmContractCallParams["default"].constructFromObject(instance)) {
|
|
76
|
+
if (!!_TokenizationEvmContractCallParams["default"].constructFromObject(instance).toJSON) {
|
|
77
|
+
if (_TokenizationEvmContractCallParams["default"].constructFromObject(instance).toJSON()) {
|
|
78
|
+
this.actualInstance = _TokenizationEvmContractCallParams["default"].constructFromObject(instance);
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
this.actualInstance = _TokenizationEvmContractCallParams["default"].constructFromObject(instance);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
match++;
|
|
86
|
+
} catch (err) {
|
|
87
|
+
// json data failed to deserialize into TokenizationEvmContractCallParams
|
|
88
|
+
errorMessages.push("Failed to construct TokenizationEvmContractCallParams: " + err);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// if (match > 1) {
|
|
92
|
+
// throw new Error("Multiple matches found constructing `TokenizationContractCallParamsData` with oneOf schemas TokenizationEvmContractCallParams. Input: " + JSON.stringify(instance));
|
|
93
|
+
// } else
|
|
94
|
+
if (match === 0) {
|
|
95
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
96
|
+
// throw new Error("No match found constructing `TokenizationContractCallParamsData` with oneOf schemas TokenizationEvmContractCallParams. Details: " +
|
|
97
|
+
// errorMessages.join(", "));
|
|
98
|
+
return;
|
|
99
|
+
} else {// only 1 match
|
|
100
|
+
// the input is valid
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Constructs a <code>TokenizationContractCallParamsData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
106
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
107
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
108
|
+
* @param {module:model/TokenizationContractCallParamsData} obj Optional instance to populate.
|
|
109
|
+
* @return {module:model/TokenizationContractCallParamsData} The populated <code>TokenizationContractCallParamsData</code> instance.
|
|
110
|
+
*/
|
|
111
|
+
return _createClass(TokenizationContractCallParamsData, [{
|
|
112
|
+
key: "getActualInstance",
|
|
113
|
+
value:
|
|
114
|
+
/**
|
|
115
|
+
* Gets the actual instance, which can be <code>TokenizationEvmContractCallParams</code>.
|
|
116
|
+
* @return {(module:model/TokenizationEvmContractCallParams)} The actual instance.
|
|
117
|
+
*/
|
|
118
|
+
function getActualInstance() {
|
|
119
|
+
return this.actualInstance;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Sets the actual instance, which can be <code>TokenizationEvmContractCallParams</code>.
|
|
124
|
+
* @param {(module:model/TokenizationEvmContractCallParams)} obj The actual instance.
|
|
125
|
+
*/
|
|
126
|
+
}, {
|
|
127
|
+
key: "setActualInstance",
|
|
128
|
+
value: function setActualInstance(obj) {
|
|
129
|
+
this.actualInstance = TokenizationContractCallParamsData.constructFromObject(obj).getActualInstance();
|
|
130
|
+
}
|
|
131
|
+
}], [{
|
|
132
|
+
key: "constructFromObject",
|
|
133
|
+
value: function constructFromObject(data, obj) {
|
|
134
|
+
return new TokenizationContractCallParamsData(data);
|
|
135
|
+
}
|
|
136
|
+
}]);
|
|
137
|
+
}();
|
|
138
|
+
/**
|
|
139
|
+
* @member {module:model/TokenizationContractCallType} type
|
|
140
|
+
*/
|
|
141
|
+
_TokenizationContractCallParamsData = TokenizationContractCallParamsData;
|
|
142
|
+
/**
|
|
143
|
+
* Create an instance of TokenizationContractCallParamsData from a JSON string.
|
|
144
|
+
* @param {string} json_string JSON string.
|
|
145
|
+
* @return {module:model/TokenizationContractCallParamsData} An instance of TokenizationContractCallParamsData.
|
|
146
|
+
*/
|
|
147
|
+
_defineProperty(TokenizationContractCallParamsData, "fromJSON", function (json_string) {
|
|
148
|
+
return _TokenizationContractCallParamsData.constructFromObject(JSON.parse(json_string));
|
|
149
|
+
});
|
|
150
|
+
TokenizationContractCallParamsData.prototype['type'] = undefined;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The data that is used to invoke a specific function or method within the specified contract at the destination address.
|
|
154
|
+
* @member {String} calldata
|
|
155
|
+
*/
|
|
156
|
+
TokenizationContractCallParamsData.prototype['calldata'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The transfer amount. For example, if you trade 1.5 ETH, then the value is `1.5`.
|
|
160
|
+
* @member {String} value
|
|
161
|
+
*/
|
|
162
|
+
TokenizationContractCallParamsData.prototype['value'] = undefined;
|
|
163
|
+
TokenizationContractCallParamsData.OneOf = ["TokenizationEvmContractCallParams"];
|
|
164
|
+
var _default = exports["default"] = TokenizationContractCallParamsData;
|