@cobo/cobo-waas2 1.26.0 → 1.28.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 +96 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +1847 -294
- package/dist/api/StakingsApi.js +44 -2
- package/dist/api/SwapsApi.js +2 -2
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +14 -14
- package/dist/index.js +420 -7
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AllocationRecord.js +193 -0
- package/dist/model/AllocationRequest.js +167 -0
- package/dist/model/BabylonCreateStakingExpansion.js +157 -0
- package/dist/model/BabylonStakeExtra.js +26 -0
- package/dist/model/BabylonStakingRegistration.js +1 -1
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BankAccountStatus.js +66 -0
- package/dist/model/BatchAllocation.js +190 -0
- package/dist/model/BatchAllocationDetail.js +188 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallDestination.js +72 -10
- package/dist/model/ContractCallDestinationType.js +10 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/Counterparty.js +195 -0
- package/dist/model/CounterpartyDetail.js +228 -0
- package/dist/model/CounterpartyType.js +61 -0
- package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCounterpartyRequest.js +193 -0
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateDestinationBankAccount.js +257 -0
- package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
- package/dist/model/CreateDestinationRequest.js +235 -0
- package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +115 -68
- package/dist/model/CreatePayoutRequest.js +192 -0
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +14 -1
- package/dist/model/CreateSettlementRequestRequest.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +12 -0
- package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/DeleteCounterparty200Response.js +110 -0
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
- package/dist/model/DeleteDestination200Response.js +110 -0
- package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
- package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
- package/dist/model/Destination.js +208 -0
- package/dist/model/DestinationBankAccount.js +301 -0
- package/dist/model/DestinationBankAccountDetail.js +394 -0
- package/dist/model/DestinationDetail.js +272 -0
- package/dist/model/DestinationType.js +61 -0
- package/dist/model/DestinationWalletAddressDetail.js +205 -0
- package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ExchangeRate.js +140 -0
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/IntermediaryBankInfo.js +140 -0
- package/dist/model/Link.js +4 -4
- package/dist/model/LinkDisplayInfo.js +15 -2
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.js +123 -0
- package/dist/model/ListCounterparties200Response.js +123 -0
- package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
- package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
- package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
- package/dist/model/ListDestinations200Response.js +123 -0
- package/dist/model/ListPayoutItems200Response.js +123 -0
- package/dist/model/ListPayouts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MerchantBalance.js +28 -2
- package/dist/model/Order.js +135 -102
- package/dist/model/OrderLinkBusinessInfo.js +151 -87
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentAllocationAmount.js +125 -0
- package/dist/model/PaymentOrderEventData.js +198 -145
- package/dist/model/PaymentPayout.js +250 -0
- package/dist/model/PaymentPayoutDetail.js +248 -0
- package/dist/model/PaymentPayoutEvent.js +433 -0
- package/dist/model/PaymentPayoutItem.js +298 -0
- package/dist/model/PaymentPayoutItemDetail.js +298 -0
- package/dist/model/PaymentPayoutItemStatus.js +76 -0
- package/dist/model/PaymentPayoutParam.js +165 -0
- package/dist/model/PaymentPayoutStatus.js +81 -0
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentSourceType.js +61 -0
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +10 -5
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +6 -6
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/Stakings.js +33 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +1 -1
- package/dist/model/SwapActivityDetail.js +2 -2
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionDestination.js +38 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionTronContractDestination.js +150 -0
- package/dist/model/TransactionWebhookEventData.js +10 -5
- package/dist/model/TronContractCallDestination.js +150 -0
- package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
- package/dist/model/UpdateDestinationBankAccount.js +257 -0
- package/dist/model/UpdateDestinationByIdRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +107 -43
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationRecord.md +15 -0
- package/docs/AllocationRequest.md +13 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BabylonCreateStakingExpansion.md +12 -0
- package/docs/BabylonStakeExtra.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BankAccountStatus.md +14 -0
- package/docs/BatchAllocation.md +14 -0
- package/docs/BatchAllocationDetail.md +14 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallDestination.md +3 -2
- package/docs/ContractCallDestinationType.md +4 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/Counterparty.md +16 -0
- package/docs/CounterpartyDetail.md +17 -0
- package/docs/CounterpartyType.md +12 -0
- package/docs/CounterpartyWalletAddressDetail.md +15 -0
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCounterpartyRequest.md +14 -0
- package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateDestinationBankAccount.md +19 -0
- package/docs/CreateDestinationBankAccountRequest.md +20 -0
- package/docs/CreateDestinationRequest.md +16 -0
- package/docs/CreateDestinationWalletAddressRequest.md +11 -0
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +15 -11
- package/docs/CreatePayoutRequest.md +14 -0
- package/docs/CreateRefundRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +2 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletAddress.md +10 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteCounterparty200Response.md +9 -0
- package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
- package/docs/DeleteDestination200Response.md +9 -0
- package/docs/DeleteDestinationBankAccount200Response.md +9 -0
- package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
- package/docs/Destination.md +17 -0
- package/docs/DestinationBankAccount.md +23 -0
- package/docs/DestinationBankAccountDetail.md +30 -0
- package/docs/DestinationDetail.md +19 -0
- package/docs/DestinationType.md +12 -0
- package/docs/DestinationWalletAddressDetail.md +16 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EnableDestinationWhitelistRequest.md +9 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeRate.md +11 -0
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/IntermediaryBankInfo.md +11 -0
- package/docs/Link.md +2 -2
- package/docs/LinkDisplayInfo.md +3 -2
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.md +10 -0
- package/docs/ListCounterparties200Response.md +10 -0
- package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
- package/docs/ListDestinationBankAccounts200Response.md +10 -0
- package/docs/ListDestinationWalletAddresses200Response.md +10 -0
- package/docs/ListDestinations200Response.md +10 -0
- package/docs/ListPayoutItems200Response.md +10 -0
- package/docs/ListPayouts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MerchantBalance.md +4 -2
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +16 -13
- package/docs/OrderLinkBusinessInfo.md +11 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentAllocationAmount.md +10 -0
- package/docs/PaymentApi.md +2153 -395
- package/docs/PaymentOrderEventData.md +19 -14
- package/docs/PaymentPayout.md +19 -0
- package/docs/PaymentPayoutDetail.md +19 -0
- package/docs/PaymentPayoutEvent.md +65 -0
- package/docs/PaymentPayoutItem.md +22 -0
- package/docs/PaymentPayoutItemDetail.md +22 -0
- package/docs/PaymentPayoutItemStatus.md +18 -0
- package/docs/PaymentPayoutParam.md +13 -0
- package/docs/PaymentPayoutStatus.md +20 -0
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentSourceType.md +12 -0
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +4 -2
- package/docs/PspBalance.md +4 -2
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +4 -4
- package/docs/SettlementDetail.md +1 -0
- package/docs/Stakings.md +2 -1
- package/docs/StakingsApi.md +54 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +1 -1
- package/docs/SwapActivityDetail.md +1 -1
- package/docs/SwapsApi.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/Transaction.md +1 -1
- package/docs/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionTronContractDestination.md +12 -0
- package/docs/TransactionWebhookEventData.md +4 -2
- package/docs/TransactionsApi.md +3 -3
- package/docs/TronContractCallDestination.md +12 -0
- package/docs/UpdateCounterpartyByIdRequest.md +13 -0
- package/docs/UpdateDestinationBankAccount.md +19 -0
- package/docs/UpdateDestinationByIdRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +12 -0
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +22 -14
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
|
@@ -35,7 +35,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
35
35
|
* Constructs a new <code>AddressesEventData</code>.
|
|
36
36
|
* @alias module:model/AddressesEventData
|
|
37
37
|
* @implements module:model/WebhookEventDataType
|
|
38
|
-
* @param data_type {module:model/AddressesEventData.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. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
38
|
+
* @param data_type {module:model/AddressesEventData.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. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
39
39
|
*/
|
|
40
40
|
function AddressesEventData(data_type) {
|
|
41
41
|
_classCallCheck(this, AddressesEventData);
|
|
@@ -132,7 +132,7 @@ var AddressesEventData = /*#__PURE__*/function () {
|
|
|
132
132
|
AddressesEventData.RequiredProperties = ["data_type"];
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
135
|
+
* 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. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
136
136
|
* @member {module:model/AddressesEventData.DataTypeEnum} data_type
|
|
137
137
|
*/
|
|
138
138
|
AddressesEventData.prototype['data_type'] = undefined;
|
|
@@ -145,7 +145,7 @@ AddressesEventData.prototype['addresses'] = undefined;
|
|
|
145
145
|
|
|
146
146
|
// Implement WebhookEventDataType interface:
|
|
147
147
|
/**
|
|
148
|
-
* 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. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
148
|
+
* 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. - `PaymentPayout`: The payment payout event data. - `BalanceUpdateInfo`: The balance update event data. - `SuspendedToken`: The token suspension event data. - `ComplianceDisposition`: The compliance disposition event data. - `ComplianceKytScreenings`: The compliance KYT screenings event data.
|
|
149
149
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
150
150
|
*/
|
|
151
151
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -221,6 +221,11 @@ AddressesEventData['DataTypeEnum'] = {
|
|
|
221
221
|
* @const
|
|
222
222
|
*/
|
|
223
223
|
"PaymentAddressUpdate": "PaymentAddressUpdate",
|
|
224
|
+
/**
|
|
225
|
+
* value: "PaymentPayout"
|
|
226
|
+
* @const
|
|
227
|
+
*/
|
|
228
|
+
"PaymentPayout": "PaymentPayout",
|
|
224
229
|
/**
|
|
225
230
|
* value: "BalanceUpdateInfo"
|
|
226
231
|
* @const
|
|
@@ -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
|
+
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 AllocationRecord model module.
|
|
29
|
+
* @module model/AllocationRecord
|
|
30
|
+
*/
|
|
31
|
+
var AllocationRecord = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>AllocationRecord</code>.
|
|
34
|
+
* @alias module:model/AllocationRecord
|
|
35
|
+
* @param allocation_record_id {String} The allocation record ID generated by Cobo.
|
|
36
|
+
* @param batch_allocation_id {String} The batch allocation ID generated by Cobo.
|
|
37
|
+
* @param token_id {String} The ID of the cryptocurrency you want to allocation. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
38
|
+
* @param amount {String} The allocation amount.
|
|
39
|
+
* @param description {String}
|
|
40
|
+
*/
|
|
41
|
+
function AllocationRecord(allocation_record_id, batch_allocation_id, token_id, amount, description) {
|
|
42
|
+
_classCallCheck(this, AllocationRecord);
|
|
43
|
+
AllocationRecord.initialize(this, allocation_record_id, batch_allocation_id, token_id, amount, description);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(AllocationRecord, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, allocation_record_id, batch_allocation_id, token_id, amount, description) {
|
|
54
|
+
obj['allocation_record_id'] = allocation_record_id;
|
|
55
|
+
obj['batch_allocation_id'] = batch_allocation_id;
|
|
56
|
+
obj['token_id'] = token_id;
|
|
57
|
+
obj['amount'] = amount;
|
|
58
|
+
obj['description'] = description;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>AllocationRecord</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/AllocationRecord} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/AllocationRecord} The populated <code>AllocationRecord</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new AllocationRecord();
|
|
73
|
+
if (data.hasOwnProperty('allocation_record_id')) {
|
|
74
|
+
obj['allocation_record_id'] = _ApiClient["default"].convertToType(data['allocation_record_id'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('batch_allocation_id')) {
|
|
77
|
+
obj['batch_allocation_id'] = _ApiClient["default"].convertToType(data['batch_allocation_id'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('token_id')) {
|
|
80
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('amount')) {
|
|
83
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('source_account')) {
|
|
86
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('destination_account')) {
|
|
89
|
+
obj['destination_account'] = _ApiClient["default"].convertToType(data['destination_account'], 'String');
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('description')) {
|
|
92
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Validates the JSON data with respect to <code>AllocationRecord</code>.
|
|
100
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
101
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AllocationRecord</code>.
|
|
102
|
+
*/
|
|
103
|
+
}, {
|
|
104
|
+
key: "validateJSON",
|
|
105
|
+
value: function validateJSON(data) {
|
|
106
|
+
// check to make sure all required properties are present in the JSON string
|
|
107
|
+
var _iterator = _createForOfIteratorHelper(AllocationRecord.RequiredProperties),
|
|
108
|
+
_step;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
111
|
+
var property = _step.value;
|
|
112
|
+
if (!data.hasOwnProperty(property)) {
|
|
113
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
} catch (err) {
|
|
118
|
+
_iterator.e(err);
|
|
119
|
+
} finally {
|
|
120
|
+
_iterator.f();
|
|
121
|
+
}
|
|
122
|
+
if (data['allocation_record_id'] && !(typeof data['allocation_record_id'] === 'string' || data['allocation_record_id'] instanceof String)) {
|
|
123
|
+
throw new Error("Expected the field `allocation_record_id` to be a primitive type in the JSON string but got " + data['allocation_record_id']);
|
|
124
|
+
}
|
|
125
|
+
// ensure the json data is a string
|
|
126
|
+
if (data['batch_allocation_id'] && !(typeof data['batch_allocation_id'] === 'string' || data['batch_allocation_id'] instanceof String)) {
|
|
127
|
+
throw new Error("Expected the field `batch_allocation_id` to be a primitive type in the JSON string but got " + data['batch_allocation_id']);
|
|
128
|
+
}
|
|
129
|
+
// ensure the json data is a string
|
|
130
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
131
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
132
|
+
}
|
|
133
|
+
// ensure the json data is a string
|
|
134
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
135
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
136
|
+
}
|
|
137
|
+
// ensure the json data is a string
|
|
138
|
+
if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
139
|
+
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
140
|
+
}
|
|
141
|
+
// ensure the json data is a string
|
|
142
|
+
if (data['destination_account'] && !(typeof data['destination_account'] === 'string' || data['destination_account'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `destination_account` to be a primitive type in the JSON string but got " + data['destination_account']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
148
|
+
}
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
}]);
|
|
152
|
+
}();
|
|
153
|
+
AllocationRecord.RequiredProperties = ["allocation_record_id", "batch_allocation_id", "token_id", "amount", "description"];
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The allocation record ID generated by Cobo.
|
|
157
|
+
* @member {String} allocation_record_id
|
|
158
|
+
*/
|
|
159
|
+
AllocationRecord.prototype['allocation_record_id'] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The batch allocation ID generated by Cobo.
|
|
163
|
+
* @member {String} batch_allocation_id
|
|
164
|
+
*/
|
|
165
|
+
AllocationRecord.prototype['batch_allocation_id'] = undefined;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The ID of the cryptocurrency you want to allocation. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
169
|
+
* @member {String} token_id
|
|
170
|
+
*/
|
|
171
|
+
AllocationRecord.prototype['token_id'] = undefined;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The allocation amount.
|
|
175
|
+
* @member {String} amount
|
|
176
|
+
*/
|
|
177
|
+
AllocationRecord.prototype['amount'] = undefined;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @member {String} source_account
|
|
181
|
+
*/
|
|
182
|
+
AllocationRecord.prototype['source_account'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @member {String} destination_account
|
|
186
|
+
*/
|
|
187
|
+
AllocationRecord.prototype['destination_account'] = undefined;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @member {String} description
|
|
191
|
+
*/
|
|
192
|
+
AllocationRecord.prototype['description'] = undefined;
|
|
193
|
+
var _default = exports["default"] = AllocationRecord;
|
|
@@ -0,0 +1,167 @@
|
|
|
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 AllocationRequest model module.
|
|
29
|
+
* @module model/AllocationRequest
|
|
30
|
+
*/
|
|
31
|
+
var AllocationRequest = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>AllocationRequest</code>.
|
|
34
|
+
* @alias module:model/AllocationRequest
|
|
35
|
+
* @param token_id {String} The ID of the cryptocurrency you want to allocation. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
36
|
+
* @param amount {String} The allocation amount.
|
|
37
|
+
* @param source_account {String}
|
|
38
|
+
* @param destination_account {String}
|
|
39
|
+
* @param description {String}
|
|
40
|
+
*/
|
|
41
|
+
function AllocationRequest(token_id, amount, source_account, destination_account, description) {
|
|
42
|
+
_classCallCheck(this, AllocationRequest);
|
|
43
|
+
AllocationRequest.initialize(this, token_id, amount, source_account, destination_account, description);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(AllocationRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, token_id, amount, source_account, destination_account, description) {
|
|
54
|
+
obj['token_id'] = token_id;
|
|
55
|
+
obj['amount'] = amount;
|
|
56
|
+
obj['source_account'] = source_account;
|
|
57
|
+
obj['destination_account'] = destination_account;
|
|
58
|
+
obj['description'] = description;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>AllocationRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/AllocationRequest} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/AllocationRequest} The populated <code>AllocationRequest</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new AllocationRequest();
|
|
73
|
+
if (data.hasOwnProperty('token_id')) {
|
|
74
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('amount')) {
|
|
77
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('source_account')) {
|
|
80
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('destination_account')) {
|
|
83
|
+
obj['destination_account'] = _ApiClient["default"].convertToType(data['destination_account'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('description')) {
|
|
86
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Validates the JSON data with respect to <code>AllocationRequest</code>.
|
|
94
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
95
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AllocationRequest</code>.
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "validateJSON",
|
|
99
|
+
value: function validateJSON(data) {
|
|
100
|
+
// check to make sure all required properties are present in the JSON string
|
|
101
|
+
var _iterator = _createForOfIteratorHelper(AllocationRequest.RequiredProperties),
|
|
102
|
+
_step;
|
|
103
|
+
try {
|
|
104
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
105
|
+
var property = _step.value;
|
|
106
|
+
if (!data.hasOwnProperty(property)) {
|
|
107
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
} catch (err) {
|
|
112
|
+
_iterator.e(err);
|
|
113
|
+
} finally {
|
|
114
|
+
_iterator.f();
|
|
115
|
+
}
|
|
116
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
if (data['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
126
|
+
}
|
|
127
|
+
// ensure the json data is a string
|
|
128
|
+
if (data['destination_account'] && !(typeof data['destination_account'] === 'string' || data['destination_account'] instanceof String)) {
|
|
129
|
+
throw new Error("Expected the field `destination_account` to be a primitive type in the JSON string but got " + data['destination_account']);
|
|
130
|
+
}
|
|
131
|
+
// ensure the json data is a string
|
|
132
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
133
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
}]);
|
|
138
|
+
}();
|
|
139
|
+
AllocationRequest.RequiredProperties = ["token_id", "amount", "source_account", "destination_account", "description"];
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The ID of the cryptocurrency you want to allocation. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT`
|
|
143
|
+
* @member {String} token_id
|
|
144
|
+
*/
|
|
145
|
+
AllocationRequest.prototype['token_id'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The allocation amount.
|
|
149
|
+
* @member {String} amount
|
|
150
|
+
*/
|
|
151
|
+
AllocationRequest.prototype['amount'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @member {String} source_account
|
|
155
|
+
*/
|
|
156
|
+
AllocationRequest.prototype['source_account'] = undefined;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @member {String} destination_account
|
|
160
|
+
*/
|
|
161
|
+
AllocationRequest.prototype['destination_account'] = undefined;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @member {String} description
|
|
165
|
+
*/
|
|
166
|
+
AllocationRequest.prototype['description'] = undefined;
|
|
167
|
+
var _default = exports["default"] = AllocationRequest;
|
|
@@ -0,0 +1,157 @@
|
|
|
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 BabylonCreateStakingExpansion model module.
|
|
30
|
+
* @module model/BabylonCreateStakingExpansion
|
|
31
|
+
*/
|
|
32
|
+
var BabylonCreateStakingExpansion = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>BabylonCreateStakingExpansion</code>.
|
|
35
|
+
* The staking expansion information specific to the Babylon protocol.
|
|
36
|
+
* @alias module:model/BabylonCreateStakingExpansion
|
|
37
|
+
* @param staking_id {String} The ID of the Phase-2 BTC staking position.
|
|
38
|
+
* @param finality_provider_public_keys {Array.<String>} The public keys of the finality providers, with each key corresponding to a BSN chain.
|
|
39
|
+
* @param fee {module:model/TransactionRequestFee}
|
|
40
|
+
*/
|
|
41
|
+
function BabylonCreateStakingExpansion(staking_id, finality_provider_public_keys, fee) {
|
|
42
|
+
_classCallCheck(this, BabylonCreateStakingExpansion);
|
|
43
|
+
BabylonCreateStakingExpansion.initialize(this, staking_id, finality_provider_public_keys, fee);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(BabylonCreateStakingExpansion, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, staking_id, finality_provider_public_keys, fee) {
|
|
54
|
+
obj['staking_id'] = staking_id;
|
|
55
|
+
obj['finality_provider_public_keys'] = finality_provider_public_keys;
|
|
56
|
+
obj['fee'] = fee;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>BabylonCreateStakingExpansion</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/BabylonCreateStakingExpansion} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/BabylonCreateStakingExpansion} The populated <code>BabylonCreateStakingExpansion</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new BabylonCreateStakingExpansion();
|
|
71
|
+
if (data.hasOwnProperty('staking_id')) {
|
|
72
|
+
obj['staking_id'] = _ApiClient["default"].convertToType(data['staking_id'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('finality_provider_public_keys')) {
|
|
75
|
+
obj['finality_provider_public_keys'] = _ApiClient["default"].convertToType(data['finality_provider_public_keys'], ['String']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('request_id')) {
|
|
78
|
+
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('fee')) {
|
|
81
|
+
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>BabylonCreateStakingExpansion</code>.
|
|
89
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
90
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>BabylonCreateStakingExpansion</code>.
|
|
91
|
+
*/
|
|
92
|
+
}, {
|
|
93
|
+
key: "validateJSON",
|
|
94
|
+
value: function validateJSON(data) {
|
|
95
|
+
// check to make sure all required properties are present in the JSON string
|
|
96
|
+
var _iterator = _createForOfIteratorHelper(BabylonCreateStakingExpansion.RequiredProperties),
|
|
97
|
+
_step;
|
|
98
|
+
try {
|
|
99
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
100
|
+
var property = _step.value;
|
|
101
|
+
if (!data.hasOwnProperty(property)) {
|
|
102
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// ensure the json data is a string
|
|
106
|
+
} catch (err) {
|
|
107
|
+
_iterator.e(err);
|
|
108
|
+
} finally {
|
|
109
|
+
_iterator.f();
|
|
110
|
+
}
|
|
111
|
+
if (data['staking_id'] && !(typeof data['staking_id'] === 'string' || data['staking_id'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `staking_id` to be a primitive type in the JSON string but got " + data['staking_id']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is an array
|
|
115
|
+
if (!Array.isArray(data['finality_provider_public_keys'])) {
|
|
116
|
+
throw new Error("Expected the field `finality_provider_public_keys` to be an array in the JSON data but got " + data['finality_provider_public_keys']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
121
|
+
}
|
|
122
|
+
// validate the optional field `fee`
|
|
123
|
+
if (data['fee']) {
|
|
124
|
+
// data not null
|
|
125
|
+
if (!!_TransactionRequestFee["default"].validateJSON) {
|
|
126
|
+
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
}]);
|
|
132
|
+
}();
|
|
133
|
+
BabylonCreateStakingExpansion.RequiredProperties = ["staking_id", "finality_provider_public_keys", "fee"];
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The ID of the Phase-2 BTC staking position.
|
|
137
|
+
* @member {String} staking_id
|
|
138
|
+
*/
|
|
139
|
+
BabylonCreateStakingExpansion.prototype['staking_id'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The public keys of the finality providers, with each key corresponding to a BSN chain.
|
|
143
|
+
* @member {Array.<String>} finality_provider_public_keys
|
|
144
|
+
*/
|
|
145
|
+
BabylonCreateStakingExpansion.prototype['finality_provider_public_keys'] = undefined;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The request ID that is used to track a request. The request ID is provided by you and must be unique within your organization.
|
|
149
|
+
* @member {String} request_id
|
|
150
|
+
*/
|
|
151
|
+
BabylonCreateStakingExpansion.prototype['request_id'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @member {module:model/TransactionRequestFee} fee
|
|
155
|
+
*/
|
|
156
|
+
BabylonCreateStakingExpansion.prototype['fee'] = undefined;
|
|
157
|
+
var _default = exports["default"] = BabylonCreateStakingExpansion;
|
|
@@ -78,6 +78,9 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
|
|
|
78
78
|
if (data.hasOwnProperty('finality_provider_public_key')) {
|
|
79
79
|
obj['finality_provider_public_key'] = _ApiClient["default"].convertToType(data['finality_provider_public_key'], 'String');
|
|
80
80
|
}
|
|
81
|
+
if (data.hasOwnProperty('finality_provider_public_keys')) {
|
|
82
|
+
obj['finality_provider_public_keys'] = _ApiClient["default"].convertToType(data['finality_provider_public_keys'], ['String']);
|
|
83
|
+
}
|
|
81
84
|
if (data.hasOwnProperty('stake_block_time')) {
|
|
82
85
|
obj['stake_block_time'] = _ApiClient["default"].convertToType(data['stake_block_time'], 'Number');
|
|
83
86
|
}
|
|
@@ -87,6 +90,9 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
|
|
|
87
90
|
if (data.hasOwnProperty('babylon_address')) {
|
|
88
91
|
obj['babylon_address'] = _StakingSource["default"].constructFromObject(data['babylon_address']);
|
|
89
92
|
}
|
|
93
|
+
if (data.hasOwnProperty('original_staking_id')) {
|
|
94
|
+
obj['original_staking_id'] = _ApiClient["default"].convertToType(data['original_staking_id'], 'String');
|
|
95
|
+
}
|
|
90
96
|
}
|
|
91
97
|
return obj;
|
|
92
98
|
}
|
|
@@ -118,6 +124,10 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
|
|
|
118
124
|
if (data['finality_provider_public_key'] && !(typeof data['finality_provider_public_key'] === 'string' || data['finality_provider_public_key'] instanceof String)) {
|
|
119
125
|
throw new Error("Expected the field `finality_provider_public_key` to be a primitive type in the JSON string but got " + data['finality_provider_public_key']);
|
|
120
126
|
}
|
|
127
|
+
// ensure the json data is an array
|
|
128
|
+
if (!Array.isArray(data['finality_provider_public_keys'])) {
|
|
129
|
+
throw new Error("Expected the field `finality_provider_public_keys` to be an array in the JSON data but got " + data['finality_provider_public_keys']);
|
|
130
|
+
}
|
|
121
131
|
// validate the optional field `babylon_address`
|
|
122
132
|
if (data['babylon_address']) {
|
|
123
133
|
// data not null
|
|
@@ -125,6 +135,10 @@ var BabylonStakeExtra = /*#__PURE__*/function () {
|
|
|
125
135
|
_StakingSource["default"].validateJSON(data['babylon_address']);
|
|
126
136
|
}
|
|
127
137
|
}
|
|
138
|
+
// ensure the json data is a string
|
|
139
|
+
if (data['original_staking_id'] && !(typeof data['original_staking_id'] === 'string' || data['original_staking_id'] instanceof String)) {
|
|
140
|
+
throw new Error("Expected the field `original_staking_id` to be a primitive type in the JSON string but got " + data['original_staking_id']);
|
|
141
|
+
}
|
|
128
142
|
return true;
|
|
129
143
|
}
|
|
130
144
|
}]);
|
|
@@ -142,6 +156,12 @@ BabylonStakeExtra.prototype['pool_type'] = undefined;
|
|
|
142
156
|
*/
|
|
143
157
|
BabylonStakeExtra.prototype['finality_provider_public_key'] = undefined;
|
|
144
158
|
|
|
159
|
+
/**
|
|
160
|
+
* The public keys of the finality providers, with each key corresponding to a BSN chain.
|
|
161
|
+
* @member {Array.<String>} finality_provider_public_keys
|
|
162
|
+
*/
|
|
163
|
+
BabylonStakeExtra.prototype['finality_provider_public_keys'] = undefined;
|
|
164
|
+
|
|
145
165
|
/**
|
|
146
166
|
* The number of blocks that need to be processed before the locked tokens are unlocked and become accessible.
|
|
147
167
|
* @member {Number} stake_block_time
|
|
@@ -159,6 +179,12 @@ BabylonStakeExtra.prototype['auto_broadcast'] = undefined;
|
|
|
159
179
|
*/
|
|
160
180
|
BabylonStakeExtra.prototype['babylon_address'] = undefined;
|
|
161
181
|
|
|
182
|
+
/**
|
|
183
|
+
* The original staking ID to expand. Only set this when you want to expand existing staking.
|
|
184
|
+
* @member {String} original_staking_id
|
|
185
|
+
*/
|
|
186
|
+
BabylonStakeExtra.prototype['original_staking_id'] = undefined;
|
|
187
|
+
|
|
162
188
|
// Implement BaseStakeExtra interface:
|
|
163
189
|
/**
|
|
164
190
|
* @member {module:model/StakingPoolType} pool_type
|
|
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
30
|
var BabylonStakingRegistration = /*#__PURE__*/function () {
|
|
31
31
|
/**
|
|
32
32
|
* Constructs a new <code>BabylonStakingRegistration</code>.
|
|
33
|
-
* The details of
|
|
33
|
+
* The details of a Babylon Phase-2 registration.
|
|
34
34
|
* @alias module:model/BabylonStakingRegistration
|
|
35
35
|
*/
|
|
36
36
|
function BabylonStakingRegistration() {
|