@cobo/cobo-waas2 1.22.0 → 1.24.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 +81 -17
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +26 -26
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +204 -57
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TokenizationApi.js +2 -2
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +329 -21
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/ApprovalDetail.js +4 -4
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +9 -9
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +14 -7
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +17 -4
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +3 -3
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CreateSweepToAddress.js +1 -1
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/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/IsolateDisposition.js +167 -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 +10 -1
- package/dist/model/MerchantBalance.js +7 -7
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/OrgInfo.js +9 -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 +107 -0
- package/dist/model/{RawMessageSignDestination.js → PaymentEstimateFeeRequest.js} +51 -37
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentOrderEventData.js +8 -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/PaymentWalletBalance.js +6 -6
- package/dist/model/PspBalance.js +7 -7
- package/dist/model/ReceivedAmountPerAddress.js +5 -5
- package/dist/model/Refund.js +17 -1
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- 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/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/SweepToAddress.js +1 -1
- 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/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- 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 +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/ApprovalDetail.md +3 -3
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +18 -18
- package/docs/AutoSweepTask.md +5 -5
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BridgingFee.md +11 -0
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CommissionFee.md +9 -0
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +2 -2
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +3 -2
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +4 -3
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +3 -3
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/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/IsolateDisposition.md +13 -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 +2 -1
- package/docs/MerchantBalance.md +6 -6
- package/docs/MessageSignDestination.md +0 -1
- package/docs/OrgInfo.md +1 -0
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +203 -28
- 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 +3 -1
- package/docs/PaymentRefundEventData.md +5 -2
- package/docs/PaymentSettlementEvent.md +9 -4
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +5 -5
- package/docs/PspBalance.md +6 -6
- package/docs/ReceivedAmountPerAddress.md +2 -2
- package/docs/Refund.md +2 -1
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- 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/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/TokenizationApi.md +2 -2
- 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 +11 -11
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +12 -3
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
|
@@ -0,0 +1,136 @@
|
|
|
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 BridgingFee model module.
|
|
29
|
+
* @module model/BridgingFee
|
|
30
|
+
*/
|
|
31
|
+
var BridgingFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>BridgingFee</code>.
|
|
34
|
+
* @alias module:model/BridgingFee
|
|
35
|
+
* @param fee_amount {String} The bridging fee amount.
|
|
36
|
+
*/
|
|
37
|
+
function BridgingFee(fee_amount) {
|
|
38
|
+
_classCallCheck(this, BridgingFee);
|
|
39
|
+
BridgingFee.initialize(this, fee_amount);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(BridgingFee, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, fee_amount) {
|
|
50
|
+
obj['fee_amount'] = fee_amount;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>BridgingFee</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/BridgingFee} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/BridgingFee} The populated <code>BridgingFee</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new BridgingFee();
|
|
65
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
66
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('received_token_id')) {
|
|
69
|
+
obj['received_token_id'] = _ApiClient["default"].convertToType(data['received_token_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('received_amount')) {
|
|
72
|
+
obj['received_amount'] = _ApiClient["default"].convertToType(data['received_amount'], 'String');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Validates the JSON data with respect to <code>BridgingFee</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>BridgingFee</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(BridgingFee.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['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
103
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
if (data['received_token_id'] && !(typeof data['received_token_id'] === 'string' || data['received_token_id'] instanceof String)) {
|
|
107
|
+
throw new Error("Expected the field `received_token_id` to be a primitive type in the JSON string but got " + data['received_token_id']);
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is a string
|
|
110
|
+
if (data['received_amount'] && !(typeof data['received_amount'] === 'string' || data['received_amount'] instanceof String)) {
|
|
111
|
+
throw new Error("Expected the field `received_amount` to be a primitive type in the JSON string but got " + data['received_amount']);
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
117
|
+
BridgingFee.RequiredProperties = ["fee_amount"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The bridging fee amount.
|
|
121
|
+
* @member {String} fee_amount
|
|
122
|
+
*/
|
|
123
|
+
BridgingFee.prototype['fee_amount'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The received token id after bridge.
|
|
127
|
+
* @member {String} received_token_id
|
|
128
|
+
*/
|
|
129
|
+
BridgingFee.prototype['received_token_id'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* The received amount after bridge.
|
|
133
|
+
* @member {String} received_amount
|
|
134
|
+
*/
|
|
135
|
+
BridgingFee.prototype['received_amount'] = undefined;
|
|
136
|
+
var _default = exports["default"] = BridgingFee;
|
package/dist/model/ChainInfo.js
CHANGED
|
@@ -72,6 +72,9 @@ var ChainInfo = /*#__PURE__*/function () {
|
|
|
72
72
|
if (data.hasOwnProperty('icon_url')) {
|
|
73
73
|
obj['icon_url'] = _ApiClient["default"].convertToType(data['icon_url'], 'String');
|
|
74
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('chain_identifier')) {
|
|
76
|
+
obj['chain_identifier'] = _ApiClient["default"].convertToType(data['chain_identifier'], 'String');
|
|
77
|
+
}
|
|
75
78
|
if (data.hasOwnProperty('explorer_tx_url')) {
|
|
76
79
|
obj['explorer_tx_url'] = _ApiClient["default"].convertToType(data['explorer_tx_url'], 'String');
|
|
77
80
|
}
|
|
@@ -127,6 +130,10 @@ var ChainInfo = /*#__PURE__*/function () {
|
|
|
127
130
|
throw new Error("Expected the field `icon_url` to be a primitive type in the JSON string but got " + data['icon_url']);
|
|
128
131
|
}
|
|
129
132
|
// ensure the json data is a string
|
|
133
|
+
if (data['chain_identifier'] && !(typeof data['chain_identifier'] === 'string' || data['chain_identifier'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `chain_identifier` to be a primitive type in the JSON string but got " + data['chain_identifier']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
130
137
|
if (data['explorer_tx_url'] && !(typeof data['explorer_tx_url'] === 'string' || data['explorer_tx_url'] instanceof String)) {
|
|
131
138
|
throw new Error("Expected the field `explorer_tx_url` to be a primitive type in the JSON string but got " + data['explorer_tx_url']);
|
|
132
139
|
}
|
|
@@ -147,7 +154,7 @@ ChainInfo.RequiredProperties = ["chain_id"];
|
|
|
147
154
|
ChainInfo.prototype['chain_id'] = undefined;
|
|
148
155
|
|
|
149
156
|
/**
|
|
150
|
-
* The chain symbol, which is the abbreviated name of a chain.
|
|
157
|
+
* The chain symbol for display purposes, which is the abbreviated name of a chain.
|
|
151
158
|
* @member {String} symbol
|
|
152
159
|
*/
|
|
153
160
|
ChainInfo.prototype['symbol'] = undefined;
|
|
@@ -158,6 +165,12 @@ ChainInfo.prototype['symbol'] = undefined;
|
|
|
158
165
|
*/
|
|
159
166
|
ChainInfo.prototype['icon_url'] = undefined;
|
|
160
167
|
|
|
168
|
+
/**
|
|
169
|
+
* A functional identifier used to group blockchains with similar execution logic. For example, `ETH` for all EVM-compatible chains (Ethereum, BNB Smart Chain, Polygon).
|
|
170
|
+
* @member {String} chain_identifier
|
|
171
|
+
*/
|
|
172
|
+
ChainInfo.prototype['chain_identifier'] = undefined;
|
|
173
|
+
|
|
161
174
|
/**
|
|
162
175
|
* The transaction URL pattern on the blockchain explorer. You can use it to concatenate the transaction URLs.
|
|
163
176
|
* @member {String} explorer_tx_url
|
|
@@ -37,7 +37,7 @@ var ChainsEventData = /*#__PURE__*/function () {
|
|
|
37
37
|
* Constructs a new <code>ChainsEventData</code>.
|
|
38
38
|
* @alias module:model/ChainsEventData
|
|
39
39
|
* @implements module:model/WebhookEventDataType
|
|
40
|
-
* @param data_type {module:model/ChainsEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
40
|
+
* @param data_type {module:model/ChainsEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
41
41
|
* @param chains {Array.<module:model/ChainInfo>} The enabled chains.
|
|
42
42
|
*/
|
|
43
43
|
function ChainsEventData(data_type, chains) {
|
|
@@ -146,7 +146,7 @@ var ChainsEventData = /*#__PURE__*/function () {
|
|
|
146
146
|
ChainsEventData.RequiredProperties = ["data_type", "chains"];
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
149
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
150
150
|
* @member {module:model/ChainsEventData.DataTypeEnum} data_type
|
|
151
151
|
*/
|
|
152
152
|
ChainsEventData.prototype['data_type'] = undefined;
|
|
@@ -169,7 +169,7 @@ ChainsEventData.prototype['wallet_subtypes'] = undefined;
|
|
|
169
169
|
|
|
170
170
|
// Implement WebhookEventDataType interface:
|
|
171
171
|
/**
|
|
172
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data.
|
|
172
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
173
173
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
174
174
|
*/
|
|
175
175
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -255,6 +255,11 @@ ChainsEventData['DataTypeEnum'] = {
|
|
|
255
255
|
* @const
|
|
256
256
|
*/
|
|
257
257
|
"SuspendedToken": "SuspendedToken",
|
|
258
|
+
/**
|
|
259
|
+
* value: "ComplianceDisposition"
|
|
260
|
+
* @const
|
|
261
|
+
*/
|
|
262
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
258
263
|
/**
|
|
259
264
|
* value: "unknown_default_open_api"
|
|
260
265
|
* @const
|
|
@@ -0,0 +1,110 @@
|
|
|
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 CommissionFee model module.
|
|
29
|
+
* @module model/CommissionFee
|
|
30
|
+
*/
|
|
31
|
+
var CommissionFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>CommissionFee</code>.
|
|
34
|
+
* @alias module:model/CommissionFee
|
|
35
|
+
* @param fee_amount {String} The commission fee amount.
|
|
36
|
+
*/
|
|
37
|
+
function CommissionFee(fee_amount) {
|
|
38
|
+
_classCallCheck(this, CommissionFee);
|
|
39
|
+
CommissionFee.initialize(this, fee_amount);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initializes the fields of this object.
|
|
44
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
45
|
+
* Only for internal use.
|
|
46
|
+
*/
|
|
47
|
+
return _createClass(CommissionFee, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, fee_amount) {
|
|
50
|
+
obj['fee_amount'] = fee_amount;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>CommissionFee</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/CommissionFee} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/CommissionFee} The populated <code>CommissionFee</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new CommissionFee();
|
|
65
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
66
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>CommissionFee</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>CommissionFee</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(CommissionFee.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data.hasOwnProperty(property)) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ensure the json data is a string
|
|
91
|
+
} catch (err) {
|
|
92
|
+
_iterator.e(err);
|
|
93
|
+
} finally {
|
|
94
|
+
_iterator.f();
|
|
95
|
+
}
|
|
96
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
97
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
CommissionFee.RequiredProperties = ["fee_amount"];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The commission fee amount.
|
|
107
|
+
* @member {String} fee_amount
|
|
108
|
+
*/
|
|
109
|
+
CommissionFee.prototype['fee_amount'] = undefined;
|
|
110
|
+
var _default = exports["default"] = CommissionFee;
|
|
@@ -0,0 +1,321 @@
|
|
|
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 _DispositionEventData = _interopRequireDefault(require("./DispositionEventData"));
|
|
9
|
+
var _DispositionStatus = _interopRequireDefault(require("./DispositionStatus"));
|
|
10
|
+
var _DispositionType = _interopRequireDefault(require("./DispositionType"));
|
|
11
|
+
var _WebhookEventDataType = _interopRequireDefault(require("./WebhookEventDataType"));
|
|
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 ComplianceDispositionUpdateEventData model module.
|
|
33
|
+
* @module model/ComplianceDispositionUpdateEventData
|
|
34
|
+
*/
|
|
35
|
+
var ComplianceDispositionUpdateEventData = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>ComplianceDispositionUpdateEventData</code>.
|
|
38
|
+
* @alias module:model/ComplianceDispositionUpdateEventData
|
|
39
|
+
* @implements module:model/WebhookEventDataType
|
|
40
|
+
* @implements module:model/DispositionEventData
|
|
41
|
+
* @param data_type {module:model/ComplianceDispositionUpdateEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
42
|
+
* @param transaction_id {String} The transaction ID.
|
|
43
|
+
* @param disposition_type {module:model/DispositionType}
|
|
44
|
+
* @param disposition_status {module:model/DispositionStatus}
|
|
45
|
+
* @param updated_timestamp {Number} The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
46
|
+
*/
|
|
47
|
+
function ComplianceDispositionUpdateEventData(data_type, transaction_id, disposition_type, disposition_status, updated_timestamp) {
|
|
48
|
+
_classCallCheck(this, ComplianceDispositionUpdateEventData);
|
|
49
|
+
_WebhookEventDataType["default"].initialize(this, data_type);
|
|
50
|
+
_DispositionEventData["default"].initialize(this, transaction_id, disposition_type, disposition_status, updated_timestamp);
|
|
51
|
+
ComplianceDispositionUpdateEventData.initialize(this, data_type, transaction_id, disposition_type, disposition_status, updated_timestamp);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Initializes the fields of this object.
|
|
56
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
57
|
+
* Only for internal use.
|
|
58
|
+
*/
|
|
59
|
+
return _createClass(ComplianceDispositionUpdateEventData, null, [{
|
|
60
|
+
key: "initialize",
|
|
61
|
+
value: function initialize(obj, data_type, transaction_id, disposition_type, disposition_status, updated_timestamp) {
|
|
62
|
+
obj['data_type'] = data_type;
|
|
63
|
+
obj['transaction_id'] = transaction_id;
|
|
64
|
+
obj['disposition_type'] = disposition_type;
|
|
65
|
+
obj['disposition_status'] = disposition_status;
|
|
66
|
+
obj['updated_timestamp'] = updated_timestamp;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Constructs a <code>ComplianceDispositionUpdateEventData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
71
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @param {module:model/ComplianceDispositionUpdateEventData} obj Optional instance to populate.
|
|
74
|
+
* @return {module:model/ComplianceDispositionUpdateEventData} The populated <code>ComplianceDispositionUpdateEventData</code> instance.
|
|
75
|
+
*/
|
|
76
|
+
}, {
|
|
77
|
+
key: "constructFromObject",
|
|
78
|
+
value: function constructFromObject(data, obj) {
|
|
79
|
+
if (data) {
|
|
80
|
+
obj = obj || new ComplianceDispositionUpdateEventData();
|
|
81
|
+
_WebhookEventDataType["default"].constructFromObject(data, obj);
|
|
82
|
+
_DispositionEventData["default"].constructFromObject(data, obj);
|
|
83
|
+
if (data.hasOwnProperty('data_type')) {
|
|
84
|
+
obj['data_type'] = _ApiClient["default"].convertToType(data['data_type'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('transaction_id')) {
|
|
87
|
+
obj['transaction_id'] = _ApiClient["default"].convertToType(data['transaction_id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('disposition_type')) {
|
|
90
|
+
obj['disposition_type'] = _DispositionType["default"].constructFromObject(data['disposition_type']);
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('disposition_status')) {
|
|
93
|
+
obj['disposition_status'] = _DispositionStatus["default"].constructFromObject(data['disposition_status']);
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('destination_address')) {
|
|
96
|
+
obj['destination_address'] = _ApiClient["default"].convertToType(data['destination_address'], 'String');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('disposition_amount')) {
|
|
99
|
+
obj['disposition_amount'] = _ApiClient["default"].convertToType(data['disposition_amount'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
102
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Validates the JSON data with respect to <code>ComplianceDispositionUpdateEventData</code>.
|
|
110
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
111
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ComplianceDispositionUpdateEventData</code>.
|
|
112
|
+
*/
|
|
113
|
+
}, {
|
|
114
|
+
key: "validateJSON",
|
|
115
|
+
value: function validateJSON(data) {
|
|
116
|
+
// check to make sure all required properties are present in the JSON string
|
|
117
|
+
var _iterator = _createForOfIteratorHelper(ComplianceDispositionUpdateEventData.RequiredProperties),
|
|
118
|
+
_step;
|
|
119
|
+
try {
|
|
120
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
121
|
+
var property = _step.value;
|
|
122
|
+
if (!data.hasOwnProperty(property)) {
|
|
123
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// ensure the json data is a string
|
|
127
|
+
} catch (err) {
|
|
128
|
+
_iterator.e(err);
|
|
129
|
+
} finally {
|
|
130
|
+
_iterator.f();
|
|
131
|
+
}
|
|
132
|
+
if (data['data_type'] && !(typeof data['data_type'] === 'string' || data['data_type'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `data_type` to be a primitive type in the JSON string but got " + data['data_type']);
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
if (data['transaction_id'] && !(typeof data['transaction_id'] === 'string' || data['transaction_id'] instanceof String)) {
|
|
137
|
+
throw new Error("Expected the field `transaction_id` to be a primitive type in the JSON string but got " + data['transaction_id']);
|
|
138
|
+
}
|
|
139
|
+
// ensure the json data is a string
|
|
140
|
+
if (data['destination_address'] && !(typeof data['destination_address'] === 'string' || data['destination_address'] instanceof String)) {
|
|
141
|
+
throw new Error("Expected the field `destination_address` to be a primitive type in the JSON string but got " + data['destination_address']);
|
|
142
|
+
}
|
|
143
|
+
// ensure the json data is a string
|
|
144
|
+
if (data['disposition_amount'] && !(typeof data['disposition_amount'] === 'string' || data['disposition_amount'] instanceof String)) {
|
|
145
|
+
throw new Error("Expected the field `disposition_amount` to be a primitive type in the JSON string but got " + data['disposition_amount']);
|
|
146
|
+
}
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
}]);
|
|
150
|
+
}();
|
|
151
|
+
ComplianceDispositionUpdateEventData.RequiredProperties = ["data_type", "transaction_id", "disposition_type", "disposition_status", "updated_timestamp"];
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
155
|
+
* @member {module:model/ComplianceDispositionUpdateEventData.DataTypeEnum} data_type
|
|
156
|
+
*/
|
|
157
|
+
ComplianceDispositionUpdateEventData.prototype['data_type'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The transaction ID.
|
|
161
|
+
* @member {String} transaction_id
|
|
162
|
+
*/
|
|
163
|
+
ComplianceDispositionUpdateEventData.prototype['transaction_id'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @member {module:model/DispositionType} disposition_type
|
|
167
|
+
*/
|
|
168
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_type'] = undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
172
|
+
*/
|
|
173
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_status'] = undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The blockchain address to receive the refunded/isolated funds.
|
|
177
|
+
* @member {String} destination_address
|
|
178
|
+
*/
|
|
179
|
+
ComplianceDispositionUpdateEventData.prototype['destination_address'] = undefined;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The amount to be refunded/isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
183
|
+
* @member {String} disposition_amount
|
|
184
|
+
*/
|
|
185
|
+
ComplianceDispositionUpdateEventData.prototype['disposition_amount'] = undefined;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
189
|
+
* @member {Number} updated_timestamp
|
|
190
|
+
*/
|
|
191
|
+
ComplianceDispositionUpdateEventData.prototype['updated_timestamp'] = undefined;
|
|
192
|
+
|
|
193
|
+
// Implement WebhookEventDataType interface:
|
|
194
|
+
/**
|
|
195
|
+
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data. - `Addresses`: The addresses event data. - `WalletInfo`: The wallet information event data. - `MPCVault`: The MPC vault event data. - `Chains`: The enabled chain event data. - `Tokens`: The enabled token event data. - `TokenListing`: The token listing event data. - `PaymentOrder`: The payment order event data. - `PaymentRefund`: The payment refund event data. - `PaymentSettlement`: The payment settlement event data. - `PaymentTransaction`: The payment transaction event data. - `PaymentAddressUpdate`: The top-up address update event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data.
|
|
196
|
+
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
197
|
+
*/
|
|
198
|
+
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
199
|
+
// Implement DispositionEventData interface:
|
|
200
|
+
/**
|
|
201
|
+
* The transaction ID.
|
|
202
|
+
* @member {String} transaction_id
|
|
203
|
+
*/
|
|
204
|
+
_DispositionEventData["default"].prototype['transaction_id'] = undefined;
|
|
205
|
+
/**
|
|
206
|
+
* @member {module:model/DispositionType} disposition_type
|
|
207
|
+
*/
|
|
208
|
+
_DispositionEventData["default"].prototype['disposition_type'] = undefined;
|
|
209
|
+
/**
|
|
210
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
211
|
+
*/
|
|
212
|
+
_DispositionEventData["default"].prototype['disposition_status'] = undefined;
|
|
213
|
+
/**
|
|
214
|
+
* The blockchain address to receive the refunded/isolated funds.
|
|
215
|
+
* @member {String} destination_address
|
|
216
|
+
*/
|
|
217
|
+
_DispositionEventData["default"].prototype['destination_address'] = undefined;
|
|
218
|
+
/**
|
|
219
|
+
* The amount to be refunded/isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
220
|
+
* @member {String} disposition_amount
|
|
221
|
+
*/
|
|
222
|
+
_DispositionEventData["default"].prototype['disposition_amount'] = undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
225
|
+
* @member {Number} updated_timestamp
|
|
226
|
+
*/
|
|
227
|
+
_DispositionEventData["default"].prototype['updated_timestamp'] = undefined;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Allowed values for the <code>data_type</code> property.
|
|
231
|
+
* @enum {String}
|
|
232
|
+
* @readonly
|
|
233
|
+
*/
|
|
234
|
+
ComplianceDispositionUpdateEventData['DataTypeEnum'] = {
|
|
235
|
+
/**
|
|
236
|
+
* value: "Transaction"
|
|
237
|
+
* @const
|
|
238
|
+
*/
|
|
239
|
+
"Transaction": "Transaction",
|
|
240
|
+
/**
|
|
241
|
+
* value: "TSSRequest"
|
|
242
|
+
* @const
|
|
243
|
+
*/
|
|
244
|
+
"TSSRequest": "TSSRequest",
|
|
245
|
+
/**
|
|
246
|
+
* value: "Addresses"
|
|
247
|
+
* @const
|
|
248
|
+
*/
|
|
249
|
+
"Addresses": "Addresses",
|
|
250
|
+
/**
|
|
251
|
+
* value: "WalletInfo"
|
|
252
|
+
* @const
|
|
253
|
+
*/
|
|
254
|
+
"WalletInfo": "WalletInfo",
|
|
255
|
+
/**
|
|
256
|
+
* value: "MPCVault"
|
|
257
|
+
* @const
|
|
258
|
+
*/
|
|
259
|
+
"MPCVault": "MPCVault",
|
|
260
|
+
/**
|
|
261
|
+
* value: "Chains"
|
|
262
|
+
* @const
|
|
263
|
+
*/
|
|
264
|
+
"Chains": "Chains",
|
|
265
|
+
/**
|
|
266
|
+
* value: "Tokens"
|
|
267
|
+
* @const
|
|
268
|
+
*/
|
|
269
|
+
"Tokens": "Tokens",
|
|
270
|
+
/**
|
|
271
|
+
* value: "TokenListing"
|
|
272
|
+
* @const
|
|
273
|
+
*/
|
|
274
|
+
"TokenListing": "TokenListing",
|
|
275
|
+
/**
|
|
276
|
+
* value: "PaymentOrder"
|
|
277
|
+
* @const
|
|
278
|
+
*/
|
|
279
|
+
"PaymentOrder": "PaymentOrder",
|
|
280
|
+
/**
|
|
281
|
+
* value: "PaymentRefund"
|
|
282
|
+
* @const
|
|
283
|
+
*/
|
|
284
|
+
"PaymentRefund": "PaymentRefund",
|
|
285
|
+
/**
|
|
286
|
+
* value: "PaymentSettlement"
|
|
287
|
+
* @const
|
|
288
|
+
*/
|
|
289
|
+
"PaymentSettlement": "PaymentSettlement",
|
|
290
|
+
/**
|
|
291
|
+
* value: "PaymentTransaction"
|
|
292
|
+
* @const
|
|
293
|
+
*/
|
|
294
|
+
"PaymentTransaction": "PaymentTransaction",
|
|
295
|
+
/**
|
|
296
|
+
* value: "PaymentAddressUpdate"
|
|
297
|
+
* @const
|
|
298
|
+
*/
|
|
299
|
+
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
300
|
+
/**
|
|
301
|
+
* value: "BalanceUpdateInfo"
|
|
302
|
+
* @const
|
|
303
|
+
*/
|
|
304
|
+
"BalanceUpdateInfo": "BalanceUpdateInfo",
|
|
305
|
+
/**
|
|
306
|
+
* value: "SuspendedToken"
|
|
307
|
+
* @const
|
|
308
|
+
*/
|
|
309
|
+
"SuspendedToken": "SuspendedToken",
|
|
310
|
+
/**
|
|
311
|
+
* value: "ComplianceDisposition"
|
|
312
|
+
* @const
|
|
313
|
+
*/
|
|
314
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
315
|
+
/**
|
|
316
|
+
* value: "unknown_default_open_api"
|
|
317
|
+
* @const
|
|
318
|
+
*/
|
|
319
|
+
"unknown_default_open_api": "unknown_default_open_api"
|
|
320
|
+
};
|
|
321
|
+
var _default = exports["default"] = ComplianceDispositionUpdateEventData;
|