@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,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _WalletSetup = _interopRequireDefault(require("./WalletSetup"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
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); }
|
|
10
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; } } }; }
|
|
@@ -33,11 +34,10 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
33
34
|
* Constructs a new <code>CreateMerchantRequest</code>.
|
|
34
35
|
* @alias module:model/CreateMerchantRequest
|
|
35
36
|
* @param name {String} The merchant name.
|
|
36
|
-
* @param wallet_id {String} The ID of the wallet linked to the merchant.
|
|
37
37
|
*/
|
|
38
|
-
function CreateMerchantRequest(name
|
|
38
|
+
function CreateMerchantRequest(name) {
|
|
39
39
|
_classCallCheck(this, CreateMerchantRequest);
|
|
40
|
-
CreateMerchantRequest.initialize(this, name
|
|
40
|
+
CreateMerchantRequest.initialize(this, name);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -47,9 +47,8 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
47
47
|
*/
|
|
48
48
|
return _createClass(CreateMerchantRequest, null, [{
|
|
49
49
|
key: "initialize",
|
|
50
|
-
value: function initialize(obj, name
|
|
50
|
+
value: function initialize(obj, name) {
|
|
51
51
|
obj['name'] = name;
|
|
52
|
-
obj['wallet_id'] = wallet_id;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
/**
|
|
@@ -73,6 +72,9 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
73
72
|
if (data.hasOwnProperty('developer_fee_rate')) {
|
|
74
73
|
obj['developer_fee_rate'] = _ApiClient["default"].convertToType(data['developer_fee_rate'], 'String');
|
|
75
74
|
}
|
|
75
|
+
if (data.hasOwnProperty('wallet_setup')) {
|
|
76
|
+
obj['wallet_setup'] = _WalletSetup["default"].constructFromObject(data['wallet_setup']);
|
|
77
|
+
}
|
|
76
78
|
}
|
|
77
79
|
return obj;
|
|
78
80
|
}
|
|
@@ -116,7 +118,7 @@ var CreateMerchantRequest = /*#__PURE__*/function () {
|
|
|
116
118
|
}
|
|
117
119
|
}]);
|
|
118
120
|
}();
|
|
119
|
-
CreateMerchantRequest.RequiredProperties = ["name"
|
|
121
|
+
CreateMerchantRequest.RequiredProperties = ["name"];
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* The merchant name.
|
|
@@ -131,8 +133,13 @@ CreateMerchantRequest.prototype['name'] = undefined;
|
|
|
131
133
|
CreateMerchantRequest.prototype['wallet_id'] = undefined;
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
|
-
* The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions.
|
|
136
|
+
* The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate.
|
|
135
137
|
* @member {String} developer_fee_rate
|
|
136
138
|
*/
|
|
137
139
|
CreateMerchantRequest.prototype['developer_fee_rate'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @member {module:model/WalletSetup} wallet_setup
|
|
143
|
+
*/
|
|
144
|
+
CreateMerchantRequest.prototype['wallet_setup'] = undefined;
|
|
138
145
|
var _default = exports["default"] = CreateMerchantRequest;
|
|
@@ -147,7 +147,7 @@ CreateMpcWalletParams.prototype['wallet_type'] = undefined;
|
|
|
147
147
|
CreateMpcWalletParams.prototype['wallet_subtype'] = undefined;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
-
* Enable the auto
|
|
150
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
151
151
|
* @member {Boolean} enable_auto_sweep
|
|
152
152
|
*/
|
|
153
153
|
CreateMpcWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -173,7 +173,7 @@ _CreateCustodialWalletParams["default"].prototype['wallet_type'] = undefined;
|
|
|
173
173
|
*/
|
|
174
174
|
_CreateCustodialWalletParams["default"].prototype['wallet_subtype'] = undefined;
|
|
175
175
|
/**
|
|
176
|
-
* Enable the auto
|
|
176
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
177
177
|
* @member {Boolean} enable_auto_sweep
|
|
178
178
|
*/
|
|
179
179
|
_CreateCustodialWalletParams["default"].prototype['enable_auto_sweep'] = undefined;
|
|
@@ -35,7 +35,7 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
35
35
|
* @param merchant_id {String} The merchant ID.
|
|
36
36
|
* @param token_id {String} The ID of the cryptocurrency used for payment. Supported values: - 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`
|
|
37
37
|
* @param order_amount {String} The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places.
|
|
38
|
-
* @param fee_amount {String} The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values
|
|
38
|
+
* @param fee_amount {String} The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
|
|
39
39
|
* @param psp_order_code {String} A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters.
|
|
40
40
|
*/
|
|
41
41
|
function CreatePaymentOrderRequest(merchant_id, token_id, order_amount, fee_amount, psp_order_code) {
|
|
@@ -97,6 +97,9 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
97
97
|
if (data.hasOwnProperty('use_dedicated_address')) {
|
|
98
98
|
obj['use_dedicated_address'] = _ApiClient["default"].convertToType(data['use_dedicated_address'], 'Boolean');
|
|
99
99
|
}
|
|
100
|
+
if (data.hasOwnProperty('custom_exchange_rate')) {
|
|
101
|
+
obj['custom_exchange_rate'] = _ApiClient["default"].convertToType(data['custom_exchange_rate'], 'String');
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
return obj;
|
|
102
105
|
}
|
|
@@ -152,6 +155,10 @@ var CreatePaymentOrderRequest = /*#__PURE__*/function () {
|
|
|
152
155
|
if (data['psp_order_code'] && !(typeof data['psp_order_code'] === 'string' || data['psp_order_code'] instanceof String)) {
|
|
153
156
|
throw new Error("Expected the field `psp_order_code` to be a primitive type in the JSON string but got " + data['psp_order_code']);
|
|
154
157
|
}
|
|
158
|
+
// ensure the json data is a string
|
|
159
|
+
if (data['custom_exchange_rate'] && !(typeof data['custom_exchange_rate'] === 'string' || data['custom_exchange_rate'] instanceof String)) {
|
|
160
|
+
throw new Error("Expected the field `custom_exchange_rate` to be a primitive type in the JSON string but got " + data['custom_exchange_rate']);
|
|
161
|
+
}
|
|
155
162
|
return true;
|
|
156
163
|
}
|
|
157
164
|
}]);
|
|
@@ -184,7 +191,7 @@ CreatePaymentOrderRequest.prototype['currency'] = '';
|
|
|
184
191
|
CreatePaymentOrderRequest.prototype['order_amount'] = undefined;
|
|
185
192
|
|
|
186
193
|
/**
|
|
187
|
-
* The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values
|
|
194
|
+
* The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places.
|
|
188
195
|
* @member {String} fee_amount
|
|
189
196
|
*/
|
|
190
197
|
CreatePaymentOrderRequest.prototype['fee_amount'] = undefined;
|
|
@@ -202,15 +209,21 @@ CreatePaymentOrderRequest.prototype['merchant_order_code'] = undefined;
|
|
|
202
209
|
CreatePaymentOrderRequest.prototype['psp_order_code'] = undefined;
|
|
203
210
|
|
|
204
211
|
/**
|
|
205
|
-
* The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. After expiration:
|
|
212
|
+
* The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event.
|
|
206
213
|
* @member {Number} expired_in
|
|
207
214
|
* @default 1800
|
|
208
215
|
*/
|
|
209
216
|
CreatePaymentOrderRequest.prototype['expired_in'] = 1800;
|
|
210
217
|
|
|
211
218
|
/**
|
|
212
|
-
*
|
|
219
|
+
* This field has been deprecated.
|
|
213
220
|
* @member {Boolean} use_dedicated_address
|
|
214
221
|
*/
|
|
215
222
|
CreatePaymentOrderRequest.prototype['use_dedicated_address'] = undefined;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* A custom exchange rate specified by the merchant. - Only effective when `currency` is `\"USD\"`. - Expressed as the amount of USD per 1 unit of the specified cryptocurrency. - If not provided, the system will use the default internal rate. Example: If the cryptocurrency is USDT and `custom_exchange_rate` = `\"0.99\"`, it means 1 USDT = 0.99 USD.
|
|
226
|
+
* @member {String} custom_exchange_rate
|
|
227
|
+
*/
|
|
228
|
+
CreatePaymentOrderRequest.prototype['custom_exchange_rate'] = undefined;
|
|
216
229
|
var _default = exports["default"] = CreatePaymentOrderRequest;
|
|
@@ -34,7 +34,7 @@ var CreateRefundRequest = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>CreateRefundRequest</code>.
|
|
35
35
|
* @alias module:model/CreateRefundRequest
|
|
36
36
|
* @param request_id {String} The request ID that is used to track a refund request. The request ID is provided by you and must be unique.
|
|
37
|
-
* @param payable_amount {String} The amount to refund in cryptocurrency. The amount must be a positive
|
|
37
|
+
* @param payable_amount {String} The amount to refund in cryptocurrency. The amount must be a positive number and can have up to two decimal places
|
|
38
38
|
* @param token_id {String} The ID of the cryptocurrency used for refund. Supported values: - 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`
|
|
39
39
|
* @param refund_type {module:model/RefundType}
|
|
40
40
|
*/
|
|
@@ -177,7 +177,7 @@ CreateRefundRequest.prototype['request_id'] = undefined;
|
|
|
177
177
|
CreateRefundRequest.prototype['merchant_id'] = undefined;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* The amount to refund in cryptocurrency. The amount must be a positive
|
|
180
|
+
* The amount to refund in cryptocurrency. The amount must be a positive number and can have up to two decimal places
|
|
181
181
|
* @member {String} payable_amount
|
|
182
182
|
*/
|
|
183
183
|
CreateRefundRequest.prototype['payable_amount'] = undefined;
|
|
@@ -184,7 +184,7 @@ CreateSafeWalletParams.prototype['wallet_type'] = undefined;
|
|
|
184
184
|
CreateSafeWalletParams.prototype['wallet_subtype'] = undefined;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
* Enable the auto
|
|
187
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
188
188
|
* @member {Boolean} enable_auto_sweep
|
|
189
189
|
*/
|
|
190
190
|
CreateSafeWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -163,19 +163,19 @@ CreateSettlement.prototype['token_id'] = undefined;
|
|
|
163
163
|
CreateSettlement.prototype['currency'] = undefined;
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
* The
|
|
166
|
+
* The amount of cryptocurrency to be settled. When settling merchant balance from orders (`acquiring_type` is `Order` and `settlement_type` is `Merchant`), do not specify this field as the amount will be automatically calculated based on the order amounts.
|
|
167
167
|
* @member {String} amount
|
|
168
168
|
*/
|
|
169
169
|
CreateSettlement.prototype['amount'] = undefined;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts.
|
|
172
|
+
* The ID of the bank account where the settled funds will be deposited. This field is only applicable when `payout_channel` is set to `OffRamp`. Call [List all bank accounts](https://www.cobo.com/developers/v2/api-references/payment/list-all-bank-accounts) to retrieve the IDs of registered bank accounts.
|
|
173
173
|
* @member {String} bank_account_id
|
|
174
174
|
*/
|
|
175
175
|
CreateSettlement.prototype['bank_account_id'] = undefined;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
|
-
* The ID of the crypto address used for crypto
|
|
178
|
+
* The ID of the crypto address used for crypto payouts. Specify this field when `payout_channel` is set to `Crypto`. Call [List crypto addresses](https://www.cobo.com/developers/v2/api-references/payment/list-crypto-addresses) to retrieve registered crypto addresses.
|
|
179
179
|
* @member {String} crypto_address_id
|
|
180
180
|
*/
|
|
181
181
|
CreateSettlement.prototype['crypto_address_id'] = undefined;
|
|
@@ -83,6 +83,15 @@ var CreateSettlementRequestRequest = /*#__PURE__*/function () {
|
|
|
83
83
|
if (data.hasOwnProperty('settlements')) {
|
|
84
84
|
obj['settlements'] = _ApiClient["default"].convertToType(data['settlements'], [_CreateSettlement["default"]]);
|
|
85
85
|
}
|
|
86
|
+
if (data.hasOwnProperty('bank_account_id')) {
|
|
87
|
+
obj['bank_account_id'] = _ApiClient["default"].convertToType(data['bank_account_id'], 'String');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('currency')) {
|
|
90
|
+
obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('remark')) {
|
|
93
|
+
obj['remark'] = _ApiClient["default"].convertToType(data['remark'], 'String');
|
|
94
|
+
}
|
|
86
95
|
}
|
|
87
96
|
return obj;
|
|
88
97
|
}
|
|
@@ -135,6 +144,18 @@ var CreateSettlementRequestRequest = /*#__PURE__*/function () {
|
|
|
135
144
|
}
|
|
136
145
|
;
|
|
137
146
|
}
|
|
147
|
+
// ensure the json data is a string
|
|
148
|
+
if (data['bank_account_id'] && !(typeof data['bank_account_id'] === 'string' || data['bank_account_id'] instanceof String)) {
|
|
149
|
+
throw new Error("Expected the field `bank_account_id` to be a primitive type in the JSON string but got " + data['bank_account_id']);
|
|
150
|
+
}
|
|
151
|
+
// ensure the json data is a string
|
|
152
|
+
if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
|
|
153
|
+
throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
|
|
154
|
+
}
|
|
155
|
+
// ensure the json data is a string
|
|
156
|
+
if (data['remark'] && !(typeof data['remark'] === 'string' || data['remark'] instanceof String)) {
|
|
157
|
+
throw new Error("Expected the field `remark` to be a primitive type in the JSON string but got " + data['remark']);
|
|
158
|
+
}
|
|
138
159
|
return true;
|
|
139
160
|
}
|
|
140
161
|
}]);
|
|
@@ -166,4 +187,22 @@ CreateSettlementRequestRequest.prototype['settlement_type'] = undefined;
|
|
|
166
187
|
* @member {Array.<module:model/CreateSettlement>} settlements
|
|
167
188
|
*/
|
|
168
189
|
CreateSettlementRequestRequest.prototype['settlements'] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* | Only used in OffRamp payout channel. The ID of the bank account where the settled funds will be deposited.
|
|
193
|
+
* @member {String} bank_account_id
|
|
194
|
+
*/
|
|
195
|
+
CreateSettlementRequestRequest.prototype['bank_account_id'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The fiat currency for the settlement request.
|
|
199
|
+
* @member {String} currency
|
|
200
|
+
*/
|
|
201
|
+
CreateSettlementRequestRequest.prototype['currency'] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The remark for the settlement request.
|
|
205
|
+
* @member {String} remark
|
|
206
|
+
*/
|
|
207
|
+
CreateSettlementRequestRequest.prototype['remark'] = undefined;
|
|
169
208
|
var _default = exports["default"] = CreateSettlementRequestRequest;
|
|
@@ -164,7 +164,7 @@ CreateSmartContractWalletParams.prototype['wallet_type'] = undefined;
|
|
|
164
164
|
CreateSmartContractWalletParams.prototype['wallet_subtype'] = undefined;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* Enable the auto
|
|
167
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
168
168
|
* @member {Boolean} enable_auto_sweep
|
|
169
169
|
*/
|
|
170
170
|
CreateSmartContractWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -0,0 +1,193 @@
|
|
|
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 _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
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 CreateSwapActivityRequest model module.
|
|
30
|
+
* @module model/CreateSwapActivityRequest
|
|
31
|
+
*/
|
|
32
|
+
var CreateSwapActivityRequest = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreateSwapActivityRequest</code>.
|
|
35
|
+
* @alias module:model/CreateSwapActivityRequest
|
|
36
|
+
* @param wallet_id {String} The ID of the wallet used to pay.
|
|
37
|
+
* @param quote_id {String} The unique identifier of the swap quote.
|
|
38
|
+
*/
|
|
39
|
+
function CreateSwapActivityRequest(wallet_id, quote_id) {
|
|
40
|
+
_classCallCheck(this, CreateSwapActivityRequest);
|
|
41
|
+
CreateSwapActivityRequest.initialize(this, wallet_id, quote_id);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(CreateSwapActivityRequest, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, wallet_id, quote_id) {
|
|
52
|
+
obj['wallet_id'] = wallet_id;
|
|
53
|
+
obj['quote_id'] = quote_id;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>CreateSwapActivityRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/CreateSwapActivityRequest} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/CreateSwapActivityRequest} The populated <code>CreateSwapActivityRequest</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new CreateSwapActivityRequest();
|
|
68
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
69
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('address')) {
|
|
72
|
+
obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('quote_id')) {
|
|
75
|
+
obj['quote_id'] = _ApiClient["default"].convertToType(data['quote_id'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('app_initiator')) {
|
|
78
|
+
obj['app_initiator'] = _ApiClient["default"].convertToType(data['app_initiator'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('request_id')) {
|
|
81
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('receiver_address')) {
|
|
84
|
+
obj['receiver_address'] = _ApiClient["default"].convertToType(data['receiver_address'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('fee')) {
|
|
87
|
+
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return obj;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Validates the JSON data with respect to <code>CreateSwapActivityRequest</code>.
|
|
95
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
96
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSwapActivityRequest</code>.
|
|
97
|
+
*/
|
|
98
|
+
}, {
|
|
99
|
+
key: "validateJSON",
|
|
100
|
+
value: function validateJSON(data) {
|
|
101
|
+
// check to make sure all required properties are present in the JSON string
|
|
102
|
+
var _iterator = _createForOfIteratorHelper(CreateSwapActivityRequest.RequiredProperties),
|
|
103
|
+
_step;
|
|
104
|
+
try {
|
|
105
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
106
|
+
var property = _step.value;
|
|
107
|
+
if (!data.hasOwnProperty(property)) {
|
|
108
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is a string
|
|
112
|
+
} catch (err) {
|
|
113
|
+
_iterator.e(err);
|
|
114
|
+
} finally {
|
|
115
|
+
_iterator.f();
|
|
116
|
+
}
|
|
117
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
if (data['quote_id'] && !(typeof data['quote_id'] === 'string' || data['quote_id'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `quote_id` to be a primitive type in the JSON string but got " + data['quote_id']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['app_initiator'] && !(typeof data['app_initiator'] === 'string' || data['app_initiator'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `app_initiator` to be a primitive type in the JSON string but got " + data['app_initiator']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
if (data['receiver_address'] && !(typeof data['receiver_address'] === 'string' || data['receiver_address'] instanceof String)) {
|
|
138
|
+
throw new Error("Expected the field `receiver_address` to be a primitive type in the JSON string but got " + data['receiver_address']);
|
|
139
|
+
}
|
|
140
|
+
// validate the optional field `fee`
|
|
141
|
+
if (data['fee']) {
|
|
142
|
+
// data not null
|
|
143
|
+
if (!!_TransactionRequestFee["default"].validateJSON) {
|
|
144
|
+
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
}]);
|
|
150
|
+
}();
|
|
151
|
+
CreateSwapActivityRequest.RequiredProperties = ["wallet_id", "quote_id"];
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The ID of the wallet used to pay.
|
|
155
|
+
* @member {String} wallet_id
|
|
156
|
+
*/
|
|
157
|
+
CreateSwapActivityRequest.prototype['wallet_id'] = undefined;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The address of the wallet used to pay.
|
|
161
|
+
* @member {String} address
|
|
162
|
+
*/
|
|
163
|
+
CreateSwapActivityRequest.prototype['address'] = undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The unique identifier of the swap quote.
|
|
167
|
+
* @member {String} quote_id
|
|
168
|
+
*/
|
|
169
|
+
CreateSwapActivityRequest.prototype['quote_id'] = undefined;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The initiator of the swap activity. It is optional and defaults to your API key if not specified.
|
|
173
|
+
* @member {String} app_initiator
|
|
174
|
+
*/
|
|
175
|
+
CreateSwapActivityRequest.prototype['app_initiator'] = undefined;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* The request ID of the swap activity.
|
|
179
|
+
* @member {String} request_id
|
|
180
|
+
*/
|
|
181
|
+
CreateSwapActivityRequest.prototype['request_id'] = undefined;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The destination address of the swap activity. This property is required only when the swap type is `Bridge` and the wallet is not a Custodial Wallet (Asset Wallet).
|
|
185
|
+
* @member {String} receiver_address
|
|
186
|
+
*/
|
|
187
|
+
CreateSwapActivityRequest.prototype['receiver_address'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @member {module:model/TransactionRequestFee} fee
|
|
191
|
+
*/
|
|
192
|
+
CreateSwapActivityRequest.prototype['fee'] = undefined;
|
|
193
|
+
var _default = exports["default"] = CreateSwapActivityRequest;
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
var CreateSweepToAddress = /*#__PURE__*/function () {
|
|
32
32
|
/**
|
|
33
33
|
* Constructs a new <code>CreateSweepToAddress</code>.
|
|
34
|
-
*
|
|
34
|
+
* Information of the new sweep-to address to be created.
|
|
35
35
|
* @alias module:model/CreateSweepToAddress
|
|
36
36
|
* @param wallet_id {String} The wallet ID.
|
|
37
37
|
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
|
|
@@ -219,7 +219,7 @@ CreateWalletParams.prototype['wallet_type'] = undefined;
|
|
|
219
219
|
CreateWalletParams.prototype['wallet_subtype'] = undefined;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
|
-
* Enable the auto
|
|
222
|
+
* Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.
|
|
223
223
|
* @member {Boolean} enable_auto_sweep
|
|
224
224
|
*/
|
|
225
225
|
CreateWalletParams.prototype['enable_auto_sweep'] = undefined;
|
|
@@ -32,7 +32,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
32
32
|
var CustodialTransferDestination = /*#__PURE__*/function () {
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>CustodialTransferDestination</code>.
|
|
35
|
-
* The information about the transaction destination type `CustodialWallet`. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. A Custodial Wallet (Asset Wallet) can only receive transfers from another Custodial Wallet (Asset Wallet) by using [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop). Switch between the tabs to display the properties for different transaction destinations.
|
|
35
|
+
* The information about the transaction destination type `CustodialWallet`. Refer to [Transaction sources and destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations) for a detailed introduction about the supported sources and destinations for each transaction type. A Custodial Wallet (Asset Wallet) can only receive transfers from another Custodial Wallet (Asset Wallet) by using [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop). <Note>This destination type is available upon request. Please contact our [customer support](mailto:help@cobo.com) to enable it.</Note> Switch between the tabs to display the properties for different transaction destinations.
|
|
36
36
|
* @alias module:model/CustodialTransferDestination
|
|
37
37
|
* @param destination_type {module:model/TransferDestinationType}
|
|
38
38
|
* @param wallet_id {String} The wallet ID.
|
|
@@ -0,0 +1,106 @@
|
|
|
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 DeleteAddressBookById201Response model module.
|
|
29
|
+
* @module model/DeleteAddressBookById201Response
|
|
30
|
+
*/
|
|
31
|
+
var DeleteAddressBookById201Response = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>DeleteAddressBookById201Response</code>.
|
|
34
|
+
* @alias module:model/DeleteAddressBookById201Response
|
|
35
|
+
* @param submitted {Boolean} Whether the request to delete the Address Book entry (record) has been successfully submitted. - `true`: The request has been successfully submitted. - `false`: The request has not been submitted.
|
|
36
|
+
*/
|
|
37
|
+
function DeleteAddressBookById201Response(submitted) {
|
|
38
|
+
_classCallCheck(this, DeleteAddressBookById201Response);
|
|
39
|
+
DeleteAddressBookById201Response.initialize(this, submitted);
|
|
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(DeleteAddressBookById201Response, null, [{
|
|
48
|
+
key: "initialize",
|
|
49
|
+
value: function initialize(obj, submitted) {
|
|
50
|
+
obj['submitted'] = submitted;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>DeleteAddressBookById201Response</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/DeleteAddressBookById201Response} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/DeleteAddressBookById201Response} The populated <code>DeleteAddressBookById201Response</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new DeleteAddressBookById201Response();
|
|
65
|
+
if (data.hasOwnProperty('submitted')) {
|
|
66
|
+
obj['submitted'] = _ApiClient["default"].convertToType(data['submitted'], 'Boolean');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>DeleteAddressBookById201Response</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeleteAddressBookById201Response</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// check to make sure all required properties are present in the JSON string
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(DeleteAddressBookById201Response.RequiredProperties),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
85
|
+
var property = _step.value;
|
|
86
|
+
if (!data.hasOwnProperty(property)) {
|
|
87
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
}]);
|
|
98
|
+
}();
|
|
99
|
+
DeleteAddressBookById201Response.RequiredProperties = ["submitted"];
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Whether the request to delete the Address Book entry (record) has been successfully submitted. - `true`: The request has been successfully submitted. - `false`: The request has not been submitted.
|
|
103
|
+
* @member {Boolean} submitted
|
|
104
|
+
*/
|
|
105
|
+
DeleteAddressBookById201Response.prototype['submitted'] = undefined;
|
|
106
|
+
var _default = exports["default"] = DeleteAddressBookById201Response;
|