@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
|
@@ -34,7 +34,7 @@ var MerchantBalance = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>MerchantBalance</code>.
|
|
35
35
|
* @alias module:model/MerchantBalance
|
|
36
36
|
* @param merchant_id {String} The merchant ID.
|
|
37
|
-
* @param token_id {String} The ID
|
|
37
|
+
* @param token_id {String} The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.
|
|
38
38
|
* @param acquiring_type {module:model/AcquiringType}
|
|
39
39
|
*/
|
|
40
40
|
function MerchantBalance(merchant_id, token_id, acquiring_type) {
|
|
@@ -159,7 +159,7 @@ MerchantBalance.RequiredProperties = ["merchant_id", "token_id", "acquiring_type
|
|
|
159
159
|
MerchantBalance.prototype['merchant_id'] = undefined;
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
|
-
* The ID
|
|
162
|
+
* The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.
|
|
163
163
|
* @member {String} token_id
|
|
164
164
|
*/
|
|
165
165
|
MerchantBalance.prototype['token_id'] = undefined;
|
|
@@ -170,31 +170,31 @@ MerchantBalance.prototype['token_id'] = undefined;
|
|
|
170
170
|
MerchantBalance.prototype['acquiring_type'] = undefined;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
* The
|
|
173
|
+
* The total amount of the token that has been received by the merchant.
|
|
174
174
|
* @member {String} total_received_amount
|
|
175
175
|
*/
|
|
176
176
|
MerchantBalance.prototype['total_received_amount'] = undefined;
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
* The merchant
|
|
179
|
+
* The total amount of the token that has been paid out from the merchant's balance.
|
|
180
180
|
* @member {String} settled_amount
|
|
181
181
|
*/
|
|
182
182
|
MerchantBalance.prototype['settled_amount'] = undefined;
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* The
|
|
185
|
+
* The total amount of the token that has been refunded from the merchant's balance.
|
|
186
186
|
* @member {String} refunded_amount
|
|
187
187
|
*/
|
|
188
188
|
MerchantBalance.prototype['refunded_amount'] = undefined;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
*
|
|
191
|
+
* The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances)
|
|
192
192
|
* @member {String} total_balance
|
|
193
193
|
*/
|
|
194
194
|
MerchantBalance.prototype['total_balance'] = undefined;
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
*
|
|
197
|
+
* This field has been deprecated.
|
|
198
198
|
* @member {String} available_balance
|
|
199
199
|
*/
|
|
200
200
|
MerchantBalance.prototype['available_balance'] = undefined;
|
|
@@ -7,12 +7,10 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BTCBIP137MessageSignDestination = _interopRequireDefault(require("./BTCBIP137MessageSignDestination"));
|
|
9
9
|
var _BTCBIP322MessageSignDestination = _interopRequireDefault(require("./BTCBIP322MessageSignDestination"));
|
|
10
|
-
var _BTCEIP191MessageSignDestination = _interopRequireDefault(require("./BTCEIP191MessageSignDestination"));
|
|
11
10
|
var _CosmosAdr36MessageSignDestination = _interopRequireDefault(require("./CosmosAdr36MessageSignDestination"));
|
|
12
11
|
var _EvmEIP191MessageSignDestination = _interopRequireDefault(require("./EvmEIP191MessageSignDestination"));
|
|
13
12
|
var _EvmEIP712MessageSignDestination = _interopRequireDefault(require("./EvmEIP712MessageSignDestination"));
|
|
14
13
|
var _MessageSignDestinationType = _interopRequireDefault(require("./MessageSignDestinationType"));
|
|
15
|
-
var _RawMessageSignDestination = _interopRequireDefault(require("./RawMessageSignDestination"));
|
|
16
14
|
var _MessageSignDestination;
|
|
17
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
16
|
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); }
|
|
@@ -39,7 +37,7 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
39
37
|
/**
|
|
40
38
|
* Constructs a new <code>MessageSignDestination</code>.
|
|
41
39
|
* @alias module:model/MessageSignDestination
|
|
42
|
-
* @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/
|
|
40
|
+
* @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} instance The actual instance to initialize MessageSignDestination.
|
|
43
41
|
*/
|
|
44
42
|
function MessageSignDestination() {
|
|
45
43
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -68,10 +66,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
68
66
|
this.actualInstance = _BTCBIP322MessageSignDestination["default"].constructFromObject(instance);
|
|
69
67
|
match++;
|
|
70
68
|
break;
|
|
71
|
-
case "BTC_EIP_191_Signature":
|
|
72
|
-
this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
73
|
-
match++;
|
|
74
|
-
break;
|
|
75
69
|
case "COSMOS_ADR_36_Signature":
|
|
76
70
|
this.actualInstance = _CosmosAdr36MessageSignDestination["default"].constructFromObject(instance);
|
|
77
71
|
match++;
|
|
@@ -84,10 +78,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
84
78
|
this.actualInstance = _EvmEIP712MessageSignDestination["default"].constructFromObject(instance);
|
|
85
79
|
match++;
|
|
86
80
|
break;
|
|
87
|
-
case "Raw_Message_Signature":
|
|
88
|
-
this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
|
|
89
|
-
match++;
|
|
90
|
-
break;
|
|
91
81
|
default:
|
|
92
82
|
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
93
83
|
break;
|
|
@@ -140,52 +130,6 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
140
130
|
// json data failed to deserialize into EvmEIP712MessageSignDestination
|
|
141
131
|
errorMessages.push("Failed to construct EvmEIP712MessageSignDestination: " + err);
|
|
142
132
|
}
|
|
143
|
-
try {
|
|
144
|
-
if (instance instanceof _RawMessageSignDestination["default"]) {
|
|
145
|
-
this.actualInstance = instance;
|
|
146
|
-
} else if (!!_RawMessageSignDestination["default"].validateJSON && _RawMessageSignDestination["default"].validateJSON(instance)) {
|
|
147
|
-
// plain JS object
|
|
148
|
-
// create RawMessageSignDestination from JS object
|
|
149
|
-
this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
|
|
150
|
-
} else {
|
|
151
|
-
if (_RawMessageSignDestination["default"].constructFromObject(instance)) {
|
|
152
|
-
if (!!_RawMessageSignDestination["default"].constructFromObject(instance).toJSON) {
|
|
153
|
-
if (_RawMessageSignDestination["default"].constructFromObject(instance).toJSON()) {
|
|
154
|
-
this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
this.actualInstance = _RawMessageSignDestination["default"].constructFromObject(instance);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
match++;
|
|
162
|
-
} catch (err) {
|
|
163
|
-
// json data failed to deserialize into RawMessageSignDestination
|
|
164
|
-
errorMessages.push("Failed to construct RawMessageSignDestination: " + err);
|
|
165
|
-
}
|
|
166
|
-
try {
|
|
167
|
-
if (instance instanceof _BTCEIP191MessageSignDestination["default"]) {
|
|
168
|
-
this.actualInstance = instance;
|
|
169
|
-
} else if (!!_BTCEIP191MessageSignDestination["default"].validateJSON && _BTCEIP191MessageSignDestination["default"].validateJSON(instance)) {
|
|
170
|
-
// plain JS object
|
|
171
|
-
// create BTCEIP191MessageSignDestination from JS object
|
|
172
|
-
this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
173
|
-
} else {
|
|
174
|
-
if (_BTCEIP191MessageSignDestination["default"].constructFromObject(instance)) {
|
|
175
|
-
if (!!_BTCEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON) {
|
|
176
|
-
if (_BTCEIP191MessageSignDestination["default"].constructFromObject(instance).toJSON()) {
|
|
177
|
-
this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
this.actualInstance = _BTCEIP191MessageSignDestination["default"].constructFromObject(instance);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
match++;
|
|
185
|
-
} catch (err) {
|
|
186
|
-
// json data failed to deserialize into BTCEIP191MessageSignDestination
|
|
187
|
-
errorMessages.push("Failed to construct BTCEIP191MessageSignDestination: " + err);
|
|
188
|
-
}
|
|
189
133
|
try {
|
|
190
134
|
if (instance instanceof _BTCBIP137MessageSignDestination["default"]) {
|
|
191
135
|
this.actualInstance = instance;
|
|
@@ -257,11 +201,11 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
257
201
|
}
|
|
258
202
|
|
|
259
203
|
// if (match > 1) {
|
|
260
|
-
// throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination,
|
|
204
|
+
// throw new Error("Multiple matches found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination. Input: " + JSON.stringify(instance));
|
|
261
205
|
// } else
|
|
262
206
|
if (match === 0) {
|
|
263
207
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
264
|
-
// throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination,
|
|
208
|
+
// throw new Error("No match found constructing `MessageSignDestination` with oneOf schemas BTCBIP137MessageSignDestination, BTCBIP322MessageSignDestination, CosmosAdr36MessageSignDestination, EvmEIP191MessageSignDestination, EvmEIP712MessageSignDestination. Details: " +
|
|
265
209
|
// errorMessages.join(", "));
|
|
266
210
|
return;
|
|
267
211
|
} else {// only 1 match
|
|
@@ -280,16 +224,16 @@ var MessageSignDestination = /*#__PURE__*/function () {
|
|
|
280
224
|
key: "getActualInstance",
|
|
281
225
|
value:
|
|
282
226
|
/**
|
|
283
|
-
* Gets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>
|
|
284
|
-
* @return {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/
|
|
227
|
+
* Gets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>.
|
|
228
|
+
* @return {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} The actual instance.
|
|
285
229
|
*/
|
|
286
230
|
function getActualInstance() {
|
|
287
231
|
return this.actualInstance;
|
|
288
232
|
}
|
|
289
233
|
|
|
290
234
|
/**
|
|
291
|
-
* Sets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>
|
|
292
|
-
* @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/
|
|
235
|
+
* Sets the actual instance, which can be <code>BTCBIP137MessageSignDestination</code>, <code>BTCBIP322MessageSignDestination</code>, <code>CosmosAdr36MessageSignDestination</code>, <code>EvmEIP191MessageSignDestination</code>, <code>EvmEIP712MessageSignDestination</code>.
|
|
236
|
+
* @param {(module:model/BTCBIP137MessageSignDestination|module:model/BTCBIP322MessageSignDestination|module:model/CosmosAdr36MessageSignDestination|module:model/EvmEIP191MessageSignDestination|module:model/EvmEIP712MessageSignDestination)} obj The actual instance.
|
|
293
237
|
*/
|
|
294
238
|
}, {
|
|
295
239
|
key: "setActualInstance",
|
|
@@ -329,12 +273,6 @@ MessageSignDestination.prototype['message'] = undefined;
|
|
|
329
273
|
*/
|
|
330
274
|
MessageSignDestination.prototype['structured_data'] = undefined;
|
|
331
275
|
|
|
332
|
-
/**
|
|
333
|
-
* Message hash to be signed, in hexadecimal format.
|
|
334
|
-
* @member {String} msg_hash
|
|
335
|
-
*/
|
|
336
|
-
MessageSignDestination.prototype['msg_hash'] = undefined;
|
|
337
|
-
|
|
338
276
|
/**
|
|
339
277
|
* Message to be signed, in hexadecimal format.
|
|
340
278
|
* @member {String} message_bip137
|
|
@@ -352,5 +290,5 @@ MessageSignDestination.prototype['message_bip322'] = undefined;
|
|
|
352
290
|
* @member {String} message_cosmos_adr36
|
|
353
291
|
*/
|
|
354
292
|
MessageSignDestination.prototype['message_cosmos_adr36'] = undefined;
|
|
355
|
-
MessageSignDestination.OneOf = ["BTCBIP137MessageSignDestination", "BTCBIP322MessageSignDestination", "
|
|
293
|
+
MessageSignDestination.OneOf = ["BTCBIP137MessageSignDestination", "BTCBIP322MessageSignDestination", "CosmosAdr36MessageSignDestination", "EvmEIP191MessageSignDestination", "EvmEIP712MessageSignDestination"];
|
|
356
294
|
var _default = exports["default"] = MessageSignDestination;
|
package/dist/model/OrgInfo.js
CHANGED
|
@@ -66,6 +66,9 @@ var OrgInfo = /*#__PURE__*/function () {
|
|
|
66
66
|
if (data.hasOwnProperty('org_id')) {
|
|
67
67
|
obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'String');
|
|
68
68
|
}
|
|
69
|
+
if (data.hasOwnProperty('biz_org_id')) {
|
|
70
|
+
obj['biz_org_id'] = _ApiClient["default"].convertToType(data['biz_org_id'], 'Number');
|
|
71
|
+
}
|
|
69
72
|
if (data.hasOwnProperty('name')) {
|
|
70
73
|
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
71
74
|
}
|
|
@@ -119,6 +122,12 @@ OrgInfo.RequiredProperties = ["org_id"];
|
|
|
119
122
|
*/
|
|
120
123
|
OrgInfo.prototype['org_id'] = undefined;
|
|
121
124
|
|
|
125
|
+
/**
|
|
126
|
+
* An internal business ID assigned by Cobo. Used mainly by Cobo's customer support to locate the organization.
|
|
127
|
+
* @member {Number} biz_org_id
|
|
128
|
+
*/
|
|
129
|
+
OrgInfo.prototype['biz_org_id'] = undefined;
|
|
130
|
+
|
|
122
131
|
/**
|
|
123
132
|
* The organization name.
|
|
124
133
|
* @member {String} name
|
|
@@ -0,0 +1,123 @@
|
|
|
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 OtcFee model module.
|
|
29
|
+
* @module model/OtcFee
|
|
30
|
+
*/
|
|
31
|
+
var OtcFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>OtcFee</code>.
|
|
34
|
+
* @alias module:model/OtcFee
|
|
35
|
+
* @param fee_rate {String} The otc fee rate.
|
|
36
|
+
*/
|
|
37
|
+
function OtcFee(fee_rate) {
|
|
38
|
+
_classCallCheck(this, OtcFee);
|
|
39
|
+
OtcFee.initialize(this, fee_rate);
|
|
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(OtcFee, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, fee_rate) {
|
|
50
|
+
obj['fee_rate'] = fee_rate;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>OtcFee</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/OtcFee} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/OtcFee} The populated <code>OtcFee</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new OtcFee();
|
|
65
|
+
if (data.hasOwnProperty('fee_rate')) {
|
|
66
|
+
obj['fee_rate'] = _ApiClient["default"].convertToType(data['fee_rate'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('token_id')) {
|
|
69
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>OtcFee</code>.
|
|
77
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>OtcFee</code>.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "validateJSON",
|
|
82
|
+
value: function validateJSON(data) {
|
|
83
|
+
// check to make sure all required properties are present in the JSON string
|
|
84
|
+
var _iterator = _createForOfIteratorHelper(OtcFee.RequiredProperties),
|
|
85
|
+
_step;
|
|
86
|
+
try {
|
|
87
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
88
|
+
var property = _step.value;
|
|
89
|
+
if (!data.hasOwnProperty(property)) {
|
|
90
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// ensure the json data is a string
|
|
94
|
+
} catch (err) {
|
|
95
|
+
_iterator.e(err);
|
|
96
|
+
} finally {
|
|
97
|
+
_iterator.f();
|
|
98
|
+
}
|
|
99
|
+
if (data['fee_rate'] && !(typeof data['fee_rate'] === 'string' || data['fee_rate'] instanceof String)) {
|
|
100
|
+
throw new Error("Expected the field `fee_rate` to be a primitive type in the JSON string but got " + data['fee_rate']);
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is a string
|
|
103
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
104
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}]);
|
|
109
|
+
}();
|
|
110
|
+
OtcFee.RequiredProperties = ["fee_rate"];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The otc fee rate.
|
|
114
|
+
* @member {String} fee_rate
|
|
115
|
+
*/
|
|
116
|
+
OtcFee.prototype['fee_rate'] = undefined;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The token id in otc.
|
|
120
|
+
* @member {String} token_id
|
|
121
|
+
*/
|
|
122
|
+
OtcFee.prototype['token_id'] = undefined;
|
|
123
|
+
var _default = exports["default"] = OtcFee;
|
|
@@ -34,7 +34,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>PaymentAddressUpdateEventData</code>.
|
|
35
35
|
* @alias module:model/PaymentAddressUpdateEventData
|
|
36
36
|
* @implements module:model/WebhookEventDataType
|
|
37
|
-
* @param data_type {module:model/PaymentAddressUpdateEventData.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.
|
|
37
|
+
* @param data_type {module:model/PaymentAddressUpdateEventData.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.
|
|
38
38
|
* @param custom_payer_id {String} A unique identifier assigned by the developer to track and identify individual payers in their system.
|
|
39
39
|
* @param payer_id {String} A unique identifier assigned by Cobo to track and identify individual payers.
|
|
40
40
|
* @param chain {String} The chain ID.
|
|
@@ -152,7 +152,7 @@ var PaymentAddressUpdateEventData = /*#__PURE__*/function () {
|
|
|
152
152
|
PaymentAddressUpdateEventData.RequiredProperties = ["data_type", "custom_payer_id", "payer_id", "chain", "previous_address", "updated_address"];
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* 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.
|
|
155
|
+
* 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.
|
|
156
156
|
* @member {module:model/PaymentAddressUpdateEventData.DataTypeEnum} data_type
|
|
157
157
|
*/
|
|
158
158
|
PaymentAddressUpdateEventData.prototype['data_type'] = undefined;
|
|
@@ -189,7 +189,7 @@ PaymentAddressUpdateEventData.prototype['updated_address'] = undefined;
|
|
|
189
189
|
|
|
190
190
|
// Implement WebhookEventDataType interface:
|
|
191
191
|
/**
|
|
192
|
-
* 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.
|
|
192
|
+
* 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.
|
|
193
193
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
194
194
|
*/
|
|
195
195
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -275,6 +275,11 @@ PaymentAddressUpdateEventData['DataTypeEnum'] = {
|
|
|
275
275
|
* @const
|
|
276
276
|
*/
|
|
277
277
|
"SuspendedToken": "SuspendedToken",
|
|
278
|
+
/**
|
|
279
|
+
* value: "ComplianceDisposition"
|
|
280
|
+
* @const
|
|
281
|
+
*/
|
|
282
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
278
283
|
/**
|
|
279
284
|
* value: "unknown_default_open_api"
|
|
280
285
|
* @const
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Cobo Wallet as a Service 2.0
|
|
19
|
+
*
|
|
20
|
+
* Contact: help@cobo.com
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The PaymentEstimateFee model module.
|
|
29
|
+
* @module model/PaymentEstimateFee
|
|
30
|
+
*/
|
|
31
|
+
var PaymentEstimateFee = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>PaymentEstimateFee</code>.
|
|
34
|
+
* @alias module:model/PaymentEstimateFee
|
|
35
|
+
* @param token_id {String} The ID of the cryptocurrency you want to OffRamp settle.
|
|
36
|
+
* @param amount {String} The OffRamp settlement amount.
|
|
37
|
+
*/
|
|
38
|
+
function PaymentEstimateFee(token_id, amount) {
|
|
39
|
+
_classCallCheck(this, PaymentEstimateFee);
|
|
40
|
+
PaymentEstimateFee.initialize(this, token_id, amount);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(PaymentEstimateFee, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, token_id, amount) {
|
|
51
|
+
obj['token_id'] = token_id;
|
|
52
|
+
obj['amount'] = amount;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>PaymentEstimateFee</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/PaymentEstimateFee} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/PaymentEstimateFee} The populated <code>PaymentEstimateFee</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new PaymentEstimateFee();
|
|
67
|
+
if (data.hasOwnProperty('token_id')) {
|
|
68
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('amount')) {
|
|
71
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>PaymentEstimateFee</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentEstimateFee</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(PaymentEstimateFee.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
103
|
+
}
|
|
104
|
+
// ensure the json data is a string
|
|
105
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
}();
|
|
112
|
+
PaymentEstimateFee.RequiredProperties = ["token_id", "amount"];
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the cryptocurrency you want to OffRamp settle.
|
|
116
|
+
* @member {String} token_id
|
|
117
|
+
*/
|
|
118
|
+
PaymentEstimateFee.prototype['token_id'] = undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The OffRamp settlement amount.
|
|
122
|
+
* @member {String} amount
|
|
123
|
+
*/
|
|
124
|
+
PaymentEstimateFee.prototype['amount'] = undefined;
|
|
125
|
+
var _default = exports["default"] = PaymentEstimateFee;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _PaymentEstimatedFee = _interopRequireDefault(require("./PaymentEstimatedFee"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The PaymentEstimateFee201Response model module.
|
|
30
|
+
* @module model/PaymentEstimateFee201Response
|
|
31
|
+
*/
|
|
32
|
+
var PaymentEstimateFee201Response = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>PaymentEstimateFee201Response</code>.
|
|
35
|
+
* @alias module:model/PaymentEstimateFee201Response
|
|
36
|
+
*/
|
|
37
|
+
function PaymentEstimateFee201Response() {
|
|
38
|
+
_classCallCheck(this, PaymentEstimateFee201Response);
|
|
39
|
+
PaymentEstimateFee201Response.initialize(this);
|
|
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(PaymentEstimateFee201Response, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj) {}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Constructs a <code>PaymentEstimateFee201Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
53
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
54
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
55
|
+
* @param {module:model/PaymentEstimateFee201Response} obj Optional instance to populate.
|
|
56
|
+
* @return {module:model/PaymentEstimateFee201Response} The populated <code>PaymentEstimateFee201Response</code> instance.
|
|
57
|
+
*/
|
|
58
|
+
}, {
|
|
59
|
+
key: "constructFromObject",
|
|
60
|
+
value: function constructFromObject(data, obj) {
|
|
61
|
+
if (data) {
|
|
62
|
+
obj = obj || new PaymentEstimateFee201Response();
|
|
63
|
+
if (data.hasOwnProperty('data')) {
|
|
64
|
+
obj['data'] = _ApiClient["default"].convertToType(data['data'], [_PaymentEstimatedFee["default"]]);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return obj;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Validates the JSON data with respect to <code>PaymentEstimateFee201Response</code>.
|
|
72
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
73
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PaymentEstimateFee201Response</code>.
|
|
74
|
+
*/
|
|
75
|
+
}, {
|
|
76
|
+
key: "validateJSON",
|
|
77
|
+
value: function validateJSON(data) {
|
|
78
|
+
if (data['data']) {
|
|
79
|
+
// data not null
|
|
80
|
+
// ensure the json data is an array
|
|
81
|
+
if (!Array.isArray(data['data'])) {
|
|
82
|
+
throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
|
|
83
|
+
}
|
|
84
|
+
// validate the optional field `data` (array)
|
|
85
|
+
var _iterator = _createForOfIteratorHelper(data['data']),
|
|
86
|
+
_step;
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var item = _step.value;
|
|
90
|
+
_PaymentEstimatedFee["default"].validateJSON(item);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
;
|
|
98
|
+
}
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
}();
|
|
103
|
+
/**
|
|
104
|
+
* @member {Array.<module:model/PaymentEstimatedFee>} data
|
|
105
|
+
*/
|
|
106
|
+
PaymentEstimateFee201Response.prototype['data'] = undefined;
|
|
107
|
+
var _default = exports["default"] = PaymentEstimateFee201Response;
|