@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
|
@@ -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 _PaymentEstimateFee = _interopRequireDefault(require("./PaymentEstimateFee"));
|
|
9
|
+
var _PaymentFeeType = _interopRequireDefault(require("./PaymentFeeType"));
|
|
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,18 @@ 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 PaymentEstimateFeeRequest model module.
|
|
31
|
+
* @module model/PaymentEstimateFeeRequest
|
|
31
32
|
*/
|
|
32
|
-
var
|
|
33
|
+
var PaymentEstimateFeeRequest = /*#__PURE__*/function () {
|
|
33
34
|
/**
|
|
34
|
-
* Constructs a new <code>
|
|
35
|
-
*
|
|
36
|
-
* @
|
|
37
|
-
* @param destination_type {module:model/MessageSignDestinationType}
|
|
38
|
-
* @param msg_hash {String} Message hash to be signed, in hexadecimal format.
|
|
35
|
+
* Constructs a new <code>PaymentEstimateFeeRequest</code>.
|
|
36
|
+
* @alias module:model/PaymentEstimateFeeRequest
|
|
37
|
+
* @param estimate_fees {Array.<module:model/PaymentEstimateFee>}
|
|
39
38
|
*/
|
|
40
|
-
function
|
|
41
|
-
_classCallCheck(this,
|
|
42
|
-
|
|
39
|
+
function PaymentEstimateFeeRequest(estimate_fees) {
|
|
40
|
+
_classCallCheck(this, PaymentEstimateFeeRequest);
|
|
41
|
+
PaymentEstimateFeeRequest.initialize(this, estimate_fees);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
@@ -47,45 +46,44 @@ var RawMessageSignDestination = /*#__PURE__*/function () {
|
|
|
47
46
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
47
|
* Only for internal use.
|
|
49
48
|
*/
|
|
50
|
-
return _createClass(
|
|
49
|
+
return _createClass(PaymentEstimateFeeRequest, null, [{
|
|
51
50
|
key: "initialize",
|
|
52
|
-
value: function initialize(obj,
|
|
53
|
-
obj['
|
|
54
|
-
obj['msg_hash'] = msg_hash;
|
|
51
|
+
value: function initialize(obj, estimate_fees) {
|
|
52
|
+
obj['estimate_fees'] = estimate_fees;
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
|
-
* Constructs a <code>
|
|
56
|
+
* Constructs a <code>PaymentEstimateFeeRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
57
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
58
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
-
* @param {module:model/
|
|
62
|
-
* @return {module:model/
|
|
59
|
+
* @param {module:model/PaymentEstimateFeeRequest} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/PaymentEstimateFeeRequest} The populated <code>PaymentEstimateFeeRequest</code> instance.
|
|
63
61
|
*/
|
|
64
62
|
}, {
|
|
65
63
|
key: "constructFromObject",
|
|
66
64
|
value: function constructFromObject(data, obj) {
|
|
67
65
|
if (data) {
|
|
68
|
-
obj = obj || new
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
66
|
+
obj = obj || new PaymentEstimateFeeRequest();
|
|
67
|
+
if (data.hasOwnProperty('fee_type')) {
|
|
68
|
+
obj['fee_type'] = _PaymentFeeType["default"].constructFromObject(data['fee_type']);
|
|
71
69
|
}
|
|
72
|
-
if (data.hasOwnProperty('
|
|
73
|
-
obj['
|
|
70
|
+
if (data.hasOwnProperty('estimate_fees')) {
|
|
71
|
+
obj['estimate_fees'] = _ApiClient["default"].convertToType(data['estimate_fees'], [_PaymentEstimateFee["default"]]);
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
return obj;
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
/**
|
|
80
|
-
* Validates the JSON data with respect to <code>
|
|
78
|
+
* Validates the JSON data with respect to <code>PaymentEstimateFeeRequest</code>.
|
|
81
79
|
* @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>
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentEstimateFeeRequest</code>.
|
|
83
81
|
*/
|
|
84
82
|
}, {
|
|
85
83
|
key: "validateJSON",
|
|
86
84
|
value: function validateJSON(data) {
|
|
87
85
|
// check to make sure all required properties are present in the JSON string
|
|
88
|
-
var _iterator = _createForOfIteratorHelper(
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(PaymentEstimateFeeRequest.RequiredProperties),
|
|
89
87
|
_step;
|
|
90
88
|
try {
|
|
91
89
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -94,29 +92,45 @@ var RawMessageSignDestination = /*#__PURE__*/function () {
|
|
|
94
92
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
|
-
// ensure the json data is a string
|
|
98
95
|
} catch (err) {
|
|
99
96
|
_iterator.e(err);
|
|
100
97
|
} finally {
|
|
101
98
|
_iterator.f();
|
|
102
99
|
}
|
|
103
|
-
if (data['
|
|
104
|
-
|
|
100
|
+
if (data['estimate_fees']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['estimate_fees'])) {
|
|
104
|
+
throw new Error("Expected the field `estimate_fees` to be an array in the JSON data but got " + data['estimate_fees']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `estimate_fees` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['estimate_fees']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_PaymentEstimateFee["default"].validateJSON(item);
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator2.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator2.f();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
105
120
|
}
|
|
106
121
|
return true;
|
|
107
122
|
}
|
|
108
123
|
}]);
|
|
109
124
|
}();
|
|
110
|
-
|
|
125
|
+
PaymentEstimateFeeRequest.RequiredProperties = ["estimate_fees"];
|
|
111
126
|
|
|
112
127
|
/**
|
|
113
|
-
* @member {module:model/
|
|
128
|
+
* @member {module:model/PaymentFeeType} fee_type
|
|
114
129
|
*/
|
|
115
|
-
|
|
130
|
+
PaymentEstimateFeeRequest.prototype['fee_type'] = undefined;
|
|
116
131
|
|
|
117
132
|
/**
|
|
118
|
-
*
|
|
119
|
-
* @member {String} msg_hash
|
|
133
|
+
* @member {Array.<module:model/PaymentEstimateFee>} estimate_fees
|
|
120
134
|
*/
|
|
121
|
-
|
|
122
|
-
var _default = exports["default"] =
|
|
135
|
+
PaymentEstimateFeeRequest.prototype['estimate_fees'] = undefined;
|
|
136
|
+
var _default = exports["default"] = PaymentEstimateFeeRequest;
|
|
@@ -0,0 +1,173 @@
|
|
|
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 _BridgingFee = _interopRequireDefault(require("./BridgingFee"));
|
|
9
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
10
|
+
var _OtcFee = _interopRequireDefault(require("./OtcFee"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
+
function _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; } } }; }
|
|
14
|
+
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; } }
|
|
15
|
+
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; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /**
|
|
21
|
+
* Cobo Wallet as a Service 2.0
|
|
22
|
+
*
|
|
23
|
+
* Contact: help@cobo.com
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The PaymentEstimatedFee model module.
|
|
32
|
+
* @module model/PaymentEstimatedFee
|
|
33
|
+
*/
|
|
34
|
+
var PaymentEstimatedFee = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>PaymentEstimatedFee</code>.
|
|
37
|
+
* @alias module:model/PaymentEstimatedFee
|
|
38
|
+
* @param token_id {String} The ID of the cryptocurrency you want to payment.
|
|
39
|
+
* @param amount {String} The payment amount.
|
|
40
|
+
*/
|
|
41
|
+
function PaymentEstimatedFee(token_id, amount) {
|
|
42
|
+
_classCallCheck(this, PaymentEstimatedFee);
|
|
43
|
+
PaymentEstimatedFee.initialize(this, token_id, amount);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(PaymentEstimatedFee, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, token_id, amount) {
|
|
54
|
+
obj['token_id'] = token_id;
|
|
55
|
+
obj['amount'] = amount;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>PaymentEstimatedFee</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/PaymentEstimatedFee} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/PaymentEstimatedFee} The populated <code>PaymentEstimatedFee</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new PaymentEstimatedFee();
|
|
70
|
+
if (data.hasOwnProperty('token_id')) {
|
|
71
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('amount')) {
|
|
74
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('commission_fee')) {
|
|
77
|
+
obj['commission_fee'] = _CommissionFee["default"].constructFromObject(data['commission_fee']);
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('bridging_fee')) {
|
|
80
|
+
obj['bridging_fee'] = _BridgingFee["default"].constructFromObject(data['bridging_fee']);
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('otc_fee')) {
|
|
83
|
+
obj['otc_fee'] = _OtcFee["default"].constructFromObject(data['otc_fee']);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates the JSON data with respect to <code>PaymentEstimatedFee</code>.
|
|
91
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
92
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentEstimatedFee</code>.
|
|
93
|
+
*/
|
|
94
|
+
}, {
|
|
95
|
+
key: "validateJSON",
|
|
96
|
+
value: function validateJSON(data) {
|
|
97
|
+
// check to make sure all required properties are present in the JSON string
|
|
98
|
+
var _iterator = _createForOfIteratorHelper(PaymentEstimatedFee.RequiredProperties),
|
|
99
|
+
_step;
|
|
100
|
+
try {
|
|
101
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
102
|
+
var property = _step.value;
|
|
103
|
+
if (!data.hasOwnProperty(property)) {
|
|
104
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// ensure the json data is a string
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
119
|
+
}
|
|
120
|
+
// validate the optional field `commission_fee`
|
|
121
|
+
if (data['commission_fee']) {
|
|
122
|
+
// data not null
|
|
123
|
+
if (!!_CommissionFee["default"].validateJSON) {
|
|
124
|
+
_CommissionFee["default"].validateJSON(data['commission_fee']);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// validate the optional field `bridging_fee`
|
|
128
|
+
if (data['bridging_fee']) {
|
|
129
|
+
// data not null
|
|
130
|
+
if (!!_BridgingFee["default"].validateJSON) {
|
|
131
|
+
_BridgingFee["default"].validateJSON(data['bridging_fee']);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// validate the optional field `otc_fee`
|
|
135
|
+
if (data['otc_fee']) {
|
|
136
|
+
// data not null
|
|
137
|
+
if (!!_OtcFee["default"].validateJSON) {
|
|
138
|
+
_OtcFee["default"].validateJSON(data['otc_fee']);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
}]);
|
|
144
|
+
}();
|
|
145
|
+
PaymentEstimatedFee.RequiredProperties = ["token_id", "amount"];
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The ID of the cryptocurrency you want to payment.
|
|
149
|
+
* @member {String} token_id
|
|
150
|
+
*/
|
|
151
|
+
PaymentEstimatedFee.prototype['token_id'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The payment amount.
|
|
155
|
+
* @member {String} amount
|
|
156
|
+
*/
|
|
157
|
+
PaymentEstimatedFee.prototype['amount'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
161
|
+
*/
|
|
162
|
+
PaymentEstimatedFee.prototype['commission_fee'] = undefined;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @member {module:model/BridgingFee} bridging_fee
|
|
166
|
+
*/
|
|
167
|
+
PaymentEstimatedFee.prototype['bridging_fee'] = undefined;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @member {module:model/OtcFee} otc_fee
|
|
171
|
+
*/
|
|
172
|
+
PaymentEstimatedFee.prototype['otc_fee'] = undefined;
|
|
173
|
+
var _default = exports["default"] = PaymentEstimatedFee;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 PaymentFeeType.
|
|
27
|
+
* @enum {}
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
var PaymentFeeType = exports["default"] = /*#__PURE__*/function () {
|
|
31
|
+
function PaymentFeeType() {
|
|
32
|
+
_classCallCheck(this, PaymentFeeType);
|
|
33
|
+
/**
|
|
34
|
+
* value: "Order"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
_defineProperty(this, "Order", "Order");
|
|
38
|
+
/**
|
|
39
|
+
* value: "Refund"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
_defineProperty(this, "Refund", "Refund");
|
|
43
|
+
/**
|
|
44
|
+
* value: "CryptoSettlement"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
_defineProperty(this, "CryptoSettlement", "CryptoSettlement");
|
|
48
|
+
/**
|
|
49
|
+
* value: "OffRampSettlement"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
_defineProperty(this, "OffRampSettlement", "OffRampSettlement");
|
|
53
|
+
/**
|
|
54
|
+
* value: "unknown_default_open_api"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
_defineProperty(this, "unknown_default_open_api", "unknown_default_open_api");
|
|
58
|
+
}
|
|
59
|
+
return _createClass(PaymentFeeType, null, [{
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value:
|
|
62
|
+
/**
|
|
63
|
+
* Returns a <code>PaymentFeeType</code> enum value from a Javascript object name.
|
|
64
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
65
|
+
* @return {module:model/PaymentFeeType} The enum <code>PaymentFeeType</code> value.
|
|
66
|
+
*/
|
|
67
|
+
function constructFromObject(object) {
|
|
68
|
+
return object;
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
}();
|
|
@@ -39,7 +39,7 @@ var PaymentOrderEventData = /*#__PURE__*/function () {
|
|
|
39
39
|
* @alias module:model/PaymentOrderEventData
|
|
40
40
|
* @implements module:model/WebhookEventDataType
|
|
41
41
|
* @implements module:model/Order
|
|
42
|
-
* @param data_type {module:model/PaymentOrderEventData.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.
|
|
42
|
+
* @param data_type {module:model/PaymentOrderEventData.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.
|
|
43
43
|
* @param order_id {String} The order ID.
|
|
44
44
|
* @param token_id {String} The ID of the cryptocurrency used for payment. Supported tokens: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
45
45
|
* @param chain_id {String} The ID of the blockchain network where the payment transaction should be made. Supported chains: - USDC: `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC` - USDT: `TRON`, `ETH`, `ARBITRUM`, `SOL`, `BASE`, `MATIC`, `BSC`
|
|
@@ -268,7 +268,7 @@ var PaymentOrderEventData = /*#__PURE__*/function () {
|
|
|
268
268
|
PaymentOrderEventData.RequiredProperties = ["data_type", "order_id", "token_id", "chain_id", "payable_amount", "receive_address", "currency", "order_amount", "fee_amount", "exchange_rate", "psp_order_code", "status", "received_token_amount"];
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
|
-
* 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.
|
|
271
|
+
* 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.
|
|
272
272
|
* @member {module:model/PaymentOrderEventData.DataTypeEnum} data_type
|
|
273
273
|
*/
|
|
274
274
|
PaymentOrderEventData.prototype['data_type'] = undefined;
|
|
@@ -387,7 +387,7 @@ PaymentOrderEventData.prototype['settlement_status'] = undefined;
|
|
|
387
387
|
|
|
388
388
|
// Implement WebhookEventDataType interface:
|
|
389
389
|
/**
|
|
390
|
-
* 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.
|
|
390
|
+
* 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.
|
|
391
391
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
392
392
|
*/
|
|
393
393
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -567,6 +567,11 @@ PaymentOrderEventData['DataTypeEnum'] = {
|
|
|
567
567
|
* @const
|
|
568
568
|
*/
|
|
569
569
|
"SuspendedToken": "SuspendedToken",
|
|
570
|
+
/**
|
|
571
|
+
* value: "ComplianceDisposition"
|
|
572
|
+
* @const
|
|
573
|
+
*/
|
|
574
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
570
575
|
/**
|
|
571
576
|
* value: "unknown_default_open_api"
|
|
572
577
|
* @const
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
8
9
|
var _PaymentTransaction = _interopRequireDefault(require("./PaymentTransaction"));
|
|
9
10
|
var _Refund = _interopRequireDefault(require("./Refund"));
|
|
10
11
|
var _RefundStatus = _interopRequireDefault(require("./RefundStatus"));
|
|
@@ -39,7 +40,7 @@ var PaymentRefundEventData = /*#__PURE__*/function () {
|
|
|
39
40
|
* @alias module:model/PaymentRefundEventData
|
|
40
41
|
* @implements module:model/WebhookEventDataType
|
|
41
42
|
* @implements module:model/Refund
|
|
42
|
-
* @param data_type {module:model/PaymentRefundEventData.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.
|
|
43
|
+
* @param data_type {module:model/PaymentRefundEventData.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.
|
|
43
44
|
* @param refund_id {String} The refund order ID.
|
|
44
45
|
* @param token_id {String} The ID of the cryptocurrency used for refund.
|
|
45
46
|
* @param chain_id {String} The ID of the blockchain network on which the refund transaction occurs.
|
|
@@ -139,6 +140,9 @@ var PaymentRefundEventData = /*#__PURE__*/function () {
|
|
|
139
140
|
if (data.hasOwnProperty('merchant_fee_token_id')) {
|
|
140
141
|
obj['merchant_fee_token_id'] = _ApiClient["default"].convertToType(data['merchant_fee_token_id'], 'String');
|
|
141
142
|
}
|
|
143
|
+
if (data.hasOwnProperty('commission_fee')) {
|
|
144
|
+
obj['commission_fee'] = _CommissionFee["default"].constructFromObject(data['commission_fee']);
|
|
145
|
+
}
|
|
142
146
|
}
|
|
143
147
|
return obj;
|
|
144
148
|
}
|
|
@@ -235,6 +239,13 @@ var PaymentRefundEventData = /*#__PURE__*/function () {
|
|
|
235
239
|
if (data['merchant_fee_token_id'] && !(typeof data['merchant_fee_token_id'] === 'string' || data['merchant_fee_token_id'] instanceof String)) {
|
|
236
240
|
throw new Error("Expected the field `merchant_fee_token_id` to be a primitive type in the JSON string but got " + data['merchant_fee_token_id']);
|
|
237
241
|
}
|
|
242
|
+
// validate the optional field `commission_fee`
|
|
243
|
+
if (data['commission_fee']) {
|
|
244
|
+
// data not null
|
|
245
|
+
if (!!_CommissionFee["default"].validateJSON) {
|
|
246
|
+
_CommissionFee["default"].validateJSON(data['commission_fee']);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
238
249
|
return true;
|
|
239
250
|
}
|
|
240
251
|
}]);
|
|
@@ -242,7 +253,7 @@ var PaymentRefundEventData = /*#__PURE__*/function () {
|
|
|
242
253
|
PaymentRefundEventData.RequiredProperties = ["data_type", "refund_id", "token_id", "chain_id", "amount", "to_address", "status"];
|
|
243
254
|
|
|
244
255
|
/**
|
|
245
|
-
* 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.
|
|
256
|
+
* 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.
|
|
246
257
|
* @member {module:model/PaymentRefundEventData.DataTypeEnum} data_type
|
|
247
258
|
*/
|
|
248
259
|
PaymentRefundEventData.prototype['data_type'] = undefined;
|
|
@@ -318,7 +329,7 @@ PaymentRefundEventData.prototype['created_timestamp'] = undefined;
|
|
|
318
329
|
PaymentRefundEventData.prototype['updated_timestamp'] = undefined;
|
|
319
330
|
|
|
320
331
|
/**
|
|
321
|
-
* The initiator of this settlement request. Can return either an API key or the
|
|
332
|
+
* The initiator of this settlement request. Can return either an API key or the Payments App's ID. - Format `api_key_<API_KEY>`: Indicates the settlement request was initiated via the Payments API using the API key. - Format `app_<APP_ID>`: Indicates the settlement request was initiated through the Payments App using the App ID.
|
|
322
333
|
* @member {String} initiator
|
|
323
334
|
*/
|
|
324
335
|
PaymentRefundEventData.prototype['initiator'] = undefined;
|
|
@@ -347,9 +358,14 @@ PaymentRefundEventData.prototype['merchant_fee_amount'] = undefined;
|
|
|
347
358
|
*/
|
|
348
359
|
PaymentRefundEventData.prototype['merchant_fee_token_id'] = undefined;
|
|
349
360
|
|
|
361
|
+
/**
|
|
362
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
363
|
+
*/
|
|
364
|
+
PaymentRefundEventData.prototype['commission_fee'] = undefined;
|
|
365
|
+
|
|
350
366
|
// Implement WebhookEventDataType interface:
|
|
351
367
|
/**
|
|
352
|
-
* 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.
|
|
368
|
+
* 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.
|
|
353
369
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
354
370
|
*/
|
|
355
371
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -413,7 +429,7 @@ _Refund["default"].prototype['created_timestamp'] = undefined;
|
|
|
413
429
|
*/
|
|
414
430
|
_Refund["default"].prototype['updated_timestamp'] = undefined;
|
|
415
431
|
/**
|
|
416
|
-
* The initiator of this settlement request. Can return either an API key or the
|
|
432
|
+
* The initiator of this settlement request. Can return either an API key or the Payments App's ID. - Format `api_key_<API_KEY>`: Indicates the settlement request was initiated via the Payments API using the API key. - Format `app_<APP_ID>`: Indicates the settlement request was initiated through the Payments App using the App ID.
|
|
417
433
|
* @member {String} initiator
|
|
418
434
|
*/
|
|
419
435
|
_Refund["default"].prototype['initiator'] = undefined;
|
|
@@ -437,6 +453,10 @@ _Refund["default"].prototype['merchant_fee_amount'] = undefined;
|
|
|
437
453
|
* @member {String} merchant_fee_token_id
|
|
438
454
|
*/
|
|
439
455
|
_Refund["default"].prototype['merchant_fee_token_id'] = undefined;
|
|
456
|
+
/**
|
|
457
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
458
|
+
*/
|
|
459
|
+
_Refund["default"].prototype['commission_fee'] = undefined;
|
|
440
460
|
|
|
441
461
|
/**
|
|
442
462
|
* Allowed values for the <code>data_type</code> property.
|
|
@@ -519,6 +539,11 @@ PaymentRefundEventData['DataTypeEnum'] = {
|
|
|
519
539
|
* @const
|
|
520
540
|
*/
|
|
521
541
|
"SuspendedToken": "SuspendedToken",
|
|
542
|
+
/**
|
|
543
|
+
* value: "ComplianceDisposition"
|
|
544
|
+
* @const
|
|
545
|
+
*/
|
|
546
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
522
547
|
/**
|
|
523
548
|
* value: "unknown_default_open_api"
|
|
524
549
|
* @const
|