@cobo/cobo-waas2 1.23.0 → 1.25.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 +68 -6
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +6 -6
- package/dist/api/ComplianceApi.js +132 -2
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +246 -56
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TransactionsApi.js +4 -4
- package/dist/index.js +336 -14
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +305 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateMerchantRequest.js +15 -8
- package/dist/model/CreateOrderLinkRequest.js +129 -0
- package/dist/model/CreatePaymentOrderRequest.js +27 -1
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSettlement.js +3 -29
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedFILFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedSOLFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
- package/dist/model/FeeStationGasStationType.js +61 -0
- package/dist/model/FundsStatusType.js +111 -0
- package/dist/model/KytScreeningsDecisionsType.js +71 -0
- package/dist/model/KytScreeningsEventData.js +155 -0
- package/dist/model/KytScreeningsReviewType.js +61 -0
- package/dist/model/KytScreeningsTransaction.js +144 -0
- package/dist/model/KytScreeningsTransactionType.js +61 -0
- package/dist/model/Link.js +125 -0
- package/dist/model/LinkDisplayInfo.js +100 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
- package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +12 -3
- package/dist/model/MerchantBalance.js +3 -3
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/Order.js +13 -0
- package/dist/model/OrderLinkBusinessInfo.js +261 -0
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +125 -0
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +108 -0
- package/dist/model/PaymentEstimateFeeRequest.js +137 -0
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentOrderEventData.js +26 -3
- package/dist/model/PaymentRefundEventData.js +30 -5
- package/dist/model/PaymentSettlementEvent.js +70 -9
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +3 -3
- package/dist/model/Refund.js +17 -1
- package/dist/model/ReviewStatusType.js +91 -0
- package/dist/model/SettleRequestStatus.js +5 -0
- package/dist/model/Settlement.js +45 -3
- package/dist/model/SettlementDetail.js +33 -1
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
- package/dist/model/SolContractCallDestination.js +30 -0
- package/dist/model/StellarContractCallContractParam.js +164 -0
- package/dist/model/StellarContractCallContractType.js +56 -0
- package/dist/model/StellarContractCallDestination.js +125 -0
- package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
- package/dist/model/StellarContractCallTrustLineParam.js +133 -0
- package/dist/model/SubmitKytResponse.js +122 -0
- package/dist/model/SubmitKytScreeningsDecisionsBody.js +122 -0
- package/dist/model/{RawMessageSignDestination.js → SubmitKytScreeningsReviewBody.js} +36 -36
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +9 -9
- package/dist/model/SwapActivityApprovers.js +1 -1
- package/dist/model/SwapActivityDetail.js +34 -18
- package/dist/model/SwapActivitySigners.js +2 -2
- package/dist/model/SwapActivityTimeline.js +5 -5
- package/dist/model/SwapEstimateFee.js +147 -0
- package/dist/model/SwapQuote.js +18 -31
- package/dist/model/SwapReceivingTransaction.js +133 -0
- package/dist/model/SwapToken.js +9 -9
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionDestination.js +48 -8
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionEvmLegacyFee.js +1 -1
- package/dist/model/TransactionFILFee.js +1 -1
- package/dist/model/TransactionFixedFee.js +1 -1
- package/dist/model/TransactionFuelingInfo.js +13 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFILFee.js +1 -1
- package/dist/model/TransactionRequestSOLFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSOLFee.js +1 -1
- package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
- package/dist/model/TransactionSolContractDestination.js +30 -0
- package/dist/model/TransactionStellarContractParam.js +164 -0
- package/dist/model/TransactionStellarContractType.js +56 -0
- package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
- package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
- package/dist/model/TransactionStellarTrustLineParam.js +133 -0
- package/dist/model/TransactionUtxoFee.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +81 -11
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +3 -3
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BridgingFee.md +11 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/CommissionFee.md +9 -0
- package/docs/ComplianceApi.md +158 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +57 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateMerchantRequest.md +3 -2
- package/docs/CreateOrderLinkRequest.md +10 -0
- package/docs/CreatePaymentOrderRequest.md +3 -1
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateSettlement.md +2 -4
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/FeeStationApi.md +53 -0
- package/docs/FeeStationCheckFeeStationUsage.md +14 -0
- package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
- package/docs/FeeStationGasStationType.md +12 -0
- package/docs/FundsStatusType.md +32 -0
- package/docs/KytScreeningsDecisionsType.md +16 -0
- package/docs/KytScreeningsEventData.md +13 -0
- package/docs/KytScreeningsReviewType.md +12 -0
- package/docs/KytScreeningsTransaction.md +12 -0
- package/docs/KytScreeningsTransactionType.md +12 -0
- package/docs/Link.md +10 -0
- package/docs/LinkDisplayInfo.md +10 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +3 -2
- package/docs/MerchantBalance.md +3 -3
- package/docs/MessageSignDestination.md +0 -1
- package/docs/Order.md +1 -0
- package/docs/OrderLinkBusinessInfo.md +19 -0
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +10 -0
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +253 -25
- package/docs/PaymentEstimateFee.md +10 -0
- package/docs/PaymentEstimateFee201Response.md +9 -0
- package/docs/PaymentEstimateFeeRequest.md +10 -0
- package/docs/PaymentEstimatedFee.md +13 -0
- package/docs/PaymentFeeType.md +16 -0
- package/docs/PaymentOrderEventData.md +4 -1
- package/docs/PaymentRefundEventData.md +5 -2
- package/docs/PaymentSettlementEvent.md +9 -4
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +3 -3
- package/docs/Refund.md +2 -1
- package/docs/ReviewStatusType.md +24 -0
- package/docs/SettleRequestStatus.md +2 -0
- package/docs/Settlement.md +6 -3
- package/docs/SettlementDetail.md +3 -1
- package/docs/SettlementInfo.md +6 -6
- package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
- package/docs/SolContractCallDestination.md +1 -0
- package/docs/StellarContractCallContractParam.md +11 -0
- package/docs/StellarContractCallContractType.md +10 -0
- package/docs/StellarContractCallDestination.md +10 -0
- package/docs/StellarContractCallTrustLineOperationType.md +10 -0
- package/docs/StellarContractCallTrustLineParam.md +11 -0
- package/docs/SubmitKytResponse.md +10 -0
- package/docs/SubmitKytScreeningsDecisionsBody.md +10 -0
- package/docs/SubmitKytScreeningsReviewBody.md +10 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +9 -9
- package/docs/SwapActivityDetail.md +10 -9
- package/docs/SwapActivitySigners.md +1 -1
- package/docs/SwapActivityTimeline.md +3 -3
- package/docs/SwapEstimateFee.md +12 -0
- package/docs/SwapQuote.md +10 -11
- package/docs/SwapReceivingTransaction.md +11 -0
- package/docs/SwapToken.md +6 -6
- package/docs/SwapsApi.md +356 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionDestination.md +2 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionFuelingInfo.md +1 -0
- package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
- package/docs/TransactionSolContractDestination.md +1 -0
- package/docs/TransactionStellarContractParam.md +11 -0
- package/docs/TransactionStellarContractType.md +10 -0
- package/docs/TransactionStellarDestination.md +10 -0
- package/docs/TransactionStellarTrustLineOperationType.md +10 -0
- package/docs/TransactionStellarTrustLineParam.md +11 -0
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +2 -2
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WebhookEventData.md +12 -3
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The TransactionSolContractAddressLookupTableAccount model module.
|
|
29
|
+
* @module model/TransactionSolContractAddressLookupTableAccount
|
|
30
|
+
*/
|
|
31
|
+
var TransactionSolContractAddressLookupTableAccount = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>TransactionSolContractAddressLookupTableAccount</code>.
|
|
34
|
+
* The information about a Solana Address Lookup Table account.
|
|
35
|
+
* @alias module:model/TransactionSolContractAddressLookupTableAccount
|
|
36
|
+
* @param alt_account_key {String} The on-chain public key of the Address Lookup Table (ALT) account, identifying the specific lookup table.
|
|
37
|
+
* @param addresses {Array.<String>} An array of stored account addresses within the lookup table, which can be referenced in transactions by index.
|
|
38
|
+
*/
|
|
39
|
+
function TransactionSolContractAddressLookupTableAccount(alt_account_key, addresses) {
|
|
40
|
+
_classCallCheck(this, TransactionSolContractAddressLookupTableAccount);
|
|
41
|
+
TransactionSolContractAddressLookupTableAccount.initialize(this, alt_account_key, addresses);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(TransactionSolContractAddressLookupTableAccount, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, alt_account_key, addresses) {
|
|
52
|
+
obj['alt_account_key'] = alt_account_key;
|
|
53
|
+
obj['addresses'] = addresses;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>TransactionSolContractAddressLookupTableAccount</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/TransactionSolContractAddressLookupTableAccount} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/TransactionSolContractAddressLookupTableAccount} The populated <code>TransactionSolContractAddressLookupTableAccount</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new TransactionSolContractAddressLookupTableAccount();
|
|
68
|
+
if (data.hasOwnProperty('alt_account_key')) {
|
|
69
|
+
obj['alt_account_key'] = _ApiClient["default"].convertToType(data['alt_account_key'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('addresses')) {
|
|
72
|
+
obj['addresses'] = _ApiClient["default"].convertToType(data['addresses'], ['String']);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>TransactionSolContractAddressLookupTableAccount</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>TransactionSolContractAddressLookupTableAccount</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(TransactionSolContractAddressLookupTableAccount.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['alt_account_key'] && !(typeof data['alt_account_key'] === 'string' || data['alt_account_key'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `alt_account_key` to be a primitive type in the JSON string but got " + data['alt_account_key']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is an array
|
|
106
|
+
if (!Array.isArray(data['addresses'])) {
|
|
107
|
+
throw new Error("Expected the field `addresses` to be an array in the JSON data but got " + data['addresses']);
|
|
108
|
+
}
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}]);
|
|
112
|
+
}();
|
|
113
|
+
TransactionSolContractAddressLookupTableAccount.RequiredProperties = ["alt_account_key", "addresses"];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The on-chain public key of the Address Lookup Table (ALT) account, identifying the specific lookup table.
|
|
117
|
+
* @member {String} alt_account_key
|
|
118
|
+
*/
|
|
119
|
+
TransactionSolContractAddressLookupTableAccount.prototype['alt_account_key'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* An array of stored account addresses within the lookup table, which can be referenced in transactions by index.
|
|
123
|
+
* @member {Array.<String>} addresses
|
|
124
|
+
*/
|
|
125
|
+
TransactionSolContractAddressLookupTableAccount.prototype['addresses'] = undefined;
|
|
126
|
+
var _default = exports["default"] = TransactionSolContractAddressLookupTableAccount;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
|
|
9
|
+
var _TransactionSolContractAddressLookupTableAccount = _interopRequireDefault(require("./TransactionSolContractAddressLookupTableAccount"));
|
|
9
10
|
var _TransactionSolContractInstruction = _interopRequireDefault(require("./TransactionSolContractInstruction"));
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
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); }
|
|
@@ -71,6 +72,9 @@ var TransactionSolContractDestination = /*#__PURE__*/function () {
|
|
|
71
72
|
if (data.hasOwnProperty('instructions')) {
|
|
72
73
|
obj['instructions'] = _ApiClient["default"].convertToType(data['instructions'], [_TransactionSolContractInstruction["default"]]);
|
|
73
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('address_lookup_table_accounts')) {
|
|
76
|
+
obj['address_lookup_table_accounts'] = _ApiClient["default"].convertToType(data['address_lookup_table_accounts'], [_TransactionSolContractAddressLookupTableAccount["default"]]);
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
return obj;
|
|
76
80
|
}
|
|
@@ -119,6 +123,27 @@ var TransactionSolContractDestination = /*#__PURE__*/function () {
|
|
|
119
123
|
}
|
|
120
124
|
;
|
|
121
125
|
}
|
|
126
|
+
if (data['address_lookup_table_accounts']) {
|
|
127
|
+
// data not null
|
|
128
|
+
// ensure the json data is an array
|
|
129
|
+
if (!Array.isArray(data['address_lookup_table_accounts'])) {
|
|
130
|
+
throw new Error("Expected the field `address_lookup_table_accounts` to be an array in the JSON data but got " + data['address_lookup_table_accounts']);
|
|
131
|
+
}
|
|
132
|
+
// validate the optional field `address_lookup_table_accounts` (array)
|
|
133
|
+
var _iterator3 = _createForOfIteratorHelper(data['address_lookup_table_accounts']),
|
|
134
|
+
_step3;
|
|
135
|
+
try {
|
|
136
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
137
|
+
var _item = _step3.value;
|
|
138
|
+
_TransactionSolContractAddressLookupTableAccount["default"].validateJSON(_item);
|
|
139
|
+
}
|
|
140
|
+
} catch (err) {
|
|
141
|
+
_iterator3.e(err);
|
|
142
|
+
} finally {
|
|
143
|
+
_iterator3.f();
|
|
144
|
+
}
|
|
145
|
+
;
|
|
146
|
+
}
|
|
122
147
|
return true;
|
|
123
148
|
}
|
|
124
149
|
}]);
|
|
@@ -134,4 +159,9 @@ TransactionSolContractDestination.prototype['destination_type'] = undefined;
|
|
|
134
159
|
* @member {Array.<module:model/TransactionSolContractInstruction>} instructions
|
|
135
160
|
*/
|
|
136
161
|
TransactionSolContractDestination.prototype['instructions'] = undefined;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @member {Array.<module:model/TransactionSolContractAddressLookupTableAccount>} address_lookup_table_accounts
|
|
165
|
+
*/
|
|
166
|
+
TransactionSolContractDestination.prototype['address_lookup_table_accounts'] = undefined;
|
|
137
167
|
var _default = exports["default"] = TransactionSolContractDestination;
|
|
@@ -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 _TransactionStellarContractType = _interopRequireDefault(require("./TransactionStellarContractType"));
|
|
9
|
+
var _TransactionStellarTrustLineOperationType = _interopRequireDefault(require("./TransactionStellarTrustLineOperationType"));
|
|
10
|
+
var _TransactionStellarTrustLineParam = _interopRequireDefault(require("./TransactionStellarTrustLineParam"));
|
|
11
|
+
var _TransactionStellarContractParam;
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _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; }
|
|
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 TransactionStellarContractParam model module.
|
|
31
|
+
* @module model/TransactionStellarContractParam
|
|
32
|
+
*/
|
|
33
|
+
var TransactionStellarContractParam = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>TransactionStellarContractParam</code>.
|
|
36
|
+
* @alias module:model/TransactionStellarContractParam
|
|
37
|
+
* @param {(module:model/TransactionStellarTrustLineParam)} instance The actual instance to initialize TransactionStellarContractParam.
|
|
38
|
+
*/
|
|
39
|
+
function TransactionStellarContractParam() {
|
|
40
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
41
|
+
_classCallCheck(this, TransactionStellarContractParam);
|
|
42
|
+
/**
|
|
43
|
+
* Returns the JSON representation of the actual instance.
|
|
44
|
+
* @return {string}
|
|
45
|
+
*/
|
|
46
|
+
_defineProperty(this, "toJSON", function () {
|
|
47
|
+
return this.getActualInstance();
|
|
48
|
+
});
|
|
49
|
+
if (instance === null) {
|
|
50
|
+
this.actualInstance = null;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var match = 0;
|
|
54
|
+
var errorMessages = [];
|
|
55
|
+
var discriminatorValue = instance["contract_type"];
|
|
56
|
+
if (discriminatorValue) {
|
|
57
|
+
switch (discriminatorValue) {
|
|
58
|
+
case "TrustLine":
|
|
59
|
+
this.actualInstance = _TransactionStellarTrustLineParam["default"].constructFromObject(instance);
|
|
60
|
+
match++;
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
if (instance instanceof _TransactionStellarTrustLineParam["default"]) {
|
|
70
|
+
this.actualInstance = instance;
|
|
71
|
+
} else if (!!_TransactionStellarTrustLineParam["default"].validateJSON && _TransactionStellarTrustLineParam["default"].validateJSON(instance)) {
|
|
72
|
+
// plain JS object
|
|
73
|
+
// create TransactionStellarTrustLineParam from JS object
|
|
74
|
+
this.actualInstance = _TransactionStellarTrustLineParam["default"].constructFromObject(instance);
|
|
75
|
+
} else {
|
|
76
|
+
if (_TransactionStellarTrustLineParam["default"].constructFromObject(instance)) {
|
|
77
|
+
if (!!_TransactionStellarTrustLineParam["default"].constructFromObject(instance).toJSON) {
|
|
78
|
+
if (_TransactionStellarTrustLineParam["default"].constructFromObject(instance).toJSON()) {
|
|
79
|
+
this.actualInstance = _TransactionStellarTrustLineParam["default"].constructFromObject(instance);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
this.actualInstance = _TransactionStellarTrustLineParam["default"].constructFromObject(instance);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
match++;
|
|
87
|
+
} catch (err) {
|
|
88
|
+
// json data failed to deserialize into TransactionStellarTrustLineParam
|
|
89
|
+
errorMessages.push("Failed to construct TransactionStellarTrustLineParam: " + err);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// if (match > 1) {
|
|
93
|
+
// throw new Error("Multiple matches found constructing `TransactionStellarContractParam` with oneOf schemas TransactionStellarTrustLineParam. Input: " + JSON.stringify(instance));
|
|
94
|
+
// } else
|
|
95
|
+
if (match === 0) {
|
|
96
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
97
|
+
// throw new Error("No match found constructing `TransactionStellarContractParam` with oneOf schemas TransactionStellarTrustLineParam. Details: " +
|
|
98
|
+
// errorMessages.join(", "));
|
|
99
|
+
return;
|
|
100
|
+
} else {// only 1 match
|
|
101
|
+
// the input is valid
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Constructs a <code>TransactionStellarContractParam</code> from a plain JavaScript object, optionally creating a new instance.
|
|
107
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
108
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
109
|
+
* @param {module:model/TransactionStellarContractParam} obj Optional instance to populate.
|
|
110
|
+
* @return {module:model/TransactionStellarContractParam} The populated <code>TransactionStellarContractParam</code> instance.
|
|
111
|
+
*/
|
|
112
|
+
return _createClass(TransactionStellarContractParam, [{
|
|
113
|
+
key: "getActualInstance",
|
|
114
|
+
value:
|
|
115
|
+
/**
|
|
116
|
+
* Gets the actual instance, which can be <code>TransactionStellarTrustLineParam</code>.
|
|
117
|
+
* @return {(module:model/TransactionStellarTrustLineParam)} The actual instance.
|
|
118
|
+
*/
|
|
119
|
+
function getActualInstance() {
|
|
120
|
+
return this.actualInstance;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets the actual instance, which can be <code>TransactionStellarTrustLineParam</code>.
|
|
125
|
+
* @param {(module:model/TransactionStellarTrustLineParam)} obj The actual instance.
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "setActualInstance",
|
|
129
|
+
value: function setActualInstance(obj) {
|
|
130
|
+
this.actualInstance = TransactionStellarContractParam.constructFromObject(obj).getActualInstance();
|
|
131
|
+
}
|
|
132
|
+
}], [{
|
|
133
|
+
key: "constructFromObject",
|
|
134
|
+
value: function constructFromObject(data, obj) {
|
|
135
|
+
return new TransactionStellarContractParam(data);
|
|
136
|
+
}
|
|
137
|
+
}]);
|
|
138
|
+
}();
|
|
139
|
+
/**
|
|
140
|
+
* @member {module:model/TransactionStellarContractType} contract_type
|
|
141
|
+
*/
|
|
142
|
+
_TransactionStellarContractParam = TransactionStellarContractParam;
|
|
143
|
+
/**
|
|
144
|
+
* Create an instance of TransactionStellarContractParam from a JSON string.
|
|
145
|
+
* @param {string} json_string JSON string.
|
|
146
|
+
* @return {module:model/TransactionStellarContractParam} An instance of TransactionStellarContractParam.
|
|
147
|
+
*/
|
|
148
|
+
_defineProperty(TransactionStellarContractParam, "fromJSON", function (json_string) {
|
|
149
|
+
return _TransactionStellarContractParam.constructFromObject(JSON.parse(json_string));
|
|
150
|
+
});
|
|
151
|
+
TransactionStellarContractParam.prototype['contract_type'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The token ID, which is the unique identifier of a token.
|
|
155
|
+
* @member {String} token_id
|
|
156
|
+
*/
|
|
157
|
+
TransactionStellarContractParam.prototype['token_id'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @member {module:model/TransactionStellarTrustLineOperationType} operation_type
|
|
161
|
+
*/
|
|
162
|
+
TransactionStellarContractParam.prototype['operation_type'] = undefined;
|
|
163
|
+
TransactionStellarContractParam.OneOf = ["TransactionStellarTrustLineParam"];
|
|
164
|
+
var _default = exports["default"] = TransactionStellarContractParam;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class TransactionStellarContractType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var TransactionStellarContractType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function TransactionStellarContractType() {
|
|
32
|
+
_classCallCheck(this, TransactionStellarContractType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "TrustLine"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "TrustLine", "TrustLine");
|
|
38
|
+
/**
|
|
39
|
+
* value: "unknown_default_open_api"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
43
|
+
}
|
|
44
|
+
return _createClass(TransactionStellarContractType, null, [{
|
|
45
|
+
key: "constructFromObject",
|
|
46
|
+
value:
|
|
47
|
+
/**
|
|
48
|
+
* Returns a <code>TransactionStellarContractType</code> enum value from a Javascript object name.
|
|
49
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
50
|
+
* @return {module:model/TransactionStellarContractType} The enum <code>TransactionStellarContractType</code> value.
|
|
51
|
+
*/
|
|
52
|
+
function constructFromObject(object) {
|
|
53
|
+
return object;
|
|
54
|
+
}
|
|
55
|
+
}]);
|
|
56
|
+
}();
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _TransactionDestinationType = _interopRequireDefault(require("./TransactionDestinationType"));
|
|
9
|
+
var _TransactionStellarContractParam = _interopRequireDefault(require("./TransactionStellarContractParam"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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); }
|
|
11
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; } } }; }
|
|
@@ -26,20 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
26
27
|
*
|
|
27
28
|
*/
|
|
28
29
|
/**
|
|
29
|
-
* The
|
|
30
|
-
* @module model/
|
|
30
|
+
* The TransactionStellarDestination model module.
|
|
31
|
+
* @module model/TransactionStellarDestination
|
|
31
32
|
*/
|
|
32
|
-
var
|
|
33
|
+
var TransactionStellarDestination = /*#__PURE__*/function () {
|
|
33
34
|
/**
|
|
34
|
-
* Constructs a new <code>
|
|
35
|
-
* The information about the destination `
|
|
36
|
-
* @alias module:model/
|
|
37
|
-
* @param destination_type {module:model/
|
|
38
|
-
* @param
|
|
35
|
+
* Constructs a new <code>TransactionStellarDestination</code>.
|
|
36
|
+
* The information about the transaction destination type `STELLAR_Contract`. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type.
|
|
37
|
+
* @alias module:model/TransactionStellarDestination
|
|
38
|
+
* @param destination_type {module:model/TransactionDestinationType}
|
|
39
|
+
* @param contract_param {module:model/TransactionStellarContractParam}
|
|
39
40
|
*/
|
|
40
|
-
function
|
|
41
|
-
_classCallCheck(this,
|
|
42
|
-
|
|
41
|
+
function TransactionStellarDestination(destination_type, contract_param) {
|
|
42
|
+
_classCallCheck(this, TransactionStellarDestination);
|
|
43
|
+
TransactionStellarDestination.initialize(this, destination_type, contract_param);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
/**
|
|
@@ -47,45 +48,45 @@ var BTCEIP191MessageSignDestination = /*#__PURE__*/function () {
|
|
|
47
48
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
49
|
* Only for internal use.
|
|
49
50
|
*/
|
|
50
|
-
return _createClass(
|
|
51
|
+
return _createClass(TransactionStellarDestination, null, [{
|
|
51
52
|
key: "initialize",
|
|
52
|
-
value: function initialize(obj, destination_type,
|
|
53
|
+
value: function initialize(obj, destination_type, contract_param) {
|
|
53
54
|
obj['destination_type'] = destination_type;
|
|
54
|
-
obj['
|
|
55
|
+
obj['contract_param'] = contract_param;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
|
-
* Constructs a <code>
|
|
59
|
+
* Constructs a <code>TransactionStellarDestination</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
60
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
61
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @param {module:model/
|
|
62
|
-
* @return {module:model/
|
|
62
|
+
* @param {module:model/TransactionStellarDestination} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/TransactionStellarDestination} The populated <code>TransactionStellarDestination</code> instance.
|
|
63
64
|
*/
|
|
64
65
|
}, {
|
|
65
66
|
key: "constructFromObject",
|
|
66
67
|
value: function constructFromObject(data, obj) {
|
|
67
68
|
if (data) {
|
|
68
|
-
obj = obj || new
|
|
69
|
+
obj = obj || new TransactionStellarDestination();
|
|
69
70
|
if (data.hasOwnProperty('destination_type')) {
|
|
70
|
-
obj['destination_type'] =
|
|
71
|
+
obj['destination_type'] = _TransactionDestinationType["default"].constructFromObject(data['destination_type']);
|
|
71
72
|
}
|
|
72
|
-
if (data.hasOwnProperty('
|
|
73
|
-
obj['
|
|
73
|
+
if (data.hasOwnProperty('contract_param')) {
|
|
74
|
+
obj['contract_param'] = _TransactionStellarContractParam["default"].constructFromObject(data['contract_param']);
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
return obj;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
/**
|
|
80
|
-
* Validates the JSON data with respect to <code>
|
|
81
|
+
* Validates the JSON data with respect to <code>TransactionStellarDestination</code>.
|
|
81
82
|
* @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>
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TransactionStellarDestination</code>.
|
|
83
84
|
*/
|
|
84
85
|
}, {
|
|
85
86
|
key: "validateJSON",
|
|
86
87
|
value: function validateJSON(data) {
|
|
87
88
|
// check to make sure all required properties are present in the JSON string
|
|
88
|
-
var _iterator = _createForOfIteratorHelper(
|
|
89
|
+
var _iterator = _createForOfIteratorHelper(TransactionStellarDestination.RequiredProperties),
|
|
89
90
|
_step;
|
|
90
91
|
try {
|
|
91
92
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -94,29 +95,31 @@ var BTCEIP191MessageSignDestination = /*#__PURE__*/function () {
|
|
|
94
95
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
//
|
|
98
|
+
// validate the optional field `contract_param`
|
|
98
99
|
} catch (err) {
|
|
99
100
|
_iterator.e(err);
|
|
100
101
|
} finally {
|
|
101
102
|
_iterator.f();
|
|
102
103
|
}
|
|
103
|
-
if (data['
|
|
104
|
-
|
|
104
|
+
if (data['contract_param']) {
|
|
105
|
+
// data not null
|
|
106
|
+
if (!!_TransactionStellarContractParam["default"].validateJSON) {
|
|
107
|
+
_TransactionStellarContractParam["default"].validateJSON(data['contract_param']);
|
|
108
|
+
}
|
|
105
109
|
}
|
|
106
110
|
return true;
|
|
107
111
|
}
|
|
108
112
|
}]);
|
|
109
113
|
}();
|
|
110
|
-
|
|
114
|
+
TransactionStellarDestination.RequiredProperties = ["destination_type", "contract_param"];
|
|
111
115
|
|
|
112
116
|
/**
|
|
113
|
-
* @member {module:model/
|
|
117
|
+
* @member {module:model/TransactionDestinationType} destination_type
|
|
114
118
|
*/
|
|
115
|
-
|
|
119
|
+
TransactionStellarDestination.prototype['destination_type'] = undefined;
|
|
116
120
|
|
|
117
121
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @member {String} message
|
|
122
|
+
* @member {module:model/TransactionStellarContractParam} contract_param
|
|
120
123
|
*/
|
|
121
|
-
|
|
122
|
-
var _default = exports["default"] =
|
|
124
|
+
TransactionStellarDestination.prototype['contract_param'] = undefined;
|
|
125
|
+
var _default = exports["default"] = TransactionStellarDestination;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Enum class TransactionStellarTrustLineOperationType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var TransactionStellarTrustLineOperationType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function TransactionStellarTrustLineOperationType() {
|
|
32
|
+
_classCallCheck(this, TransactionStellarTrustLineOperationType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "ChangeTrust"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "ChangeTrust", "ChangeTrust");
|
|
38
|
+
/**
|
|
39
|
+
* value: "unknown_default_open_api"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
43
|
+
}
|
|
44
|
+
return _createClass(TransactionStellarTrustLineOperationType, null, [{
|
|
45
|
+
key: "constructFromObject",
|
|
46
|
+
value:
|
|
47
|
+
/**
|
|
48
|
+
* Returns a <code>TransactionStellarTrustLineOperationType</code> enum value from a Javascript object name.
|
|
49
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
50
|
+
* @return {module:model/TransactionStellarTrustLineOperationType} The enum <code>TransactionStellarTrustLineOperationType</code> value.
|
|
51
|
+
*/
|
|
52
|
+
function constructFromObject(object) {
|
|
53
|
+
return object;
|
|
54
|
+
}
|
|
55
|
+
}]);
|
|
56
|
+
}();
|