@cobo/cobo-waas2 1.28.0 → 1.30.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 +88 -16
- package/dist/ApiClient.js +1 -1
- package/dist/api/AutoSweepApi.js +2 -2
- package/dist/api/ComplianceApi.js +144 -4
- package/dist/api/FeeStationApi.js +2 -2
- package/dist/api/GraphQLApi.js +85 -0
- package/dist/api/PaymentApi.js +1161 -154
- package/dist/api/StakingsApi.js +2 -2
- package/dist/api/SwapsApi.js +3 -0
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +18 -18
- package/dist/index.js +357 -28
- package/dist/model/AddressRiskLevel.js +71 -0
- package/dist/model/AddressesEventData.js +13 -3
- package/dist/model/{AllocationRecord.js → AllocationItem.js} +38 -35
- package/dist/model/{AllocationRequest.js → AllocationParam.js} +29 -26
- package/dist/model/BalanceUpdateInfoEventData.js +13 -3
- package/dist/model/BatchAllocation.js +12 -12
- package/dist/model/BatchAllocationDetail.js +15 -17
- package/dist/model/BridgingFee.js +3 -3
- package/dist/model/ChainsEventData.js +13 -3
- package/dist/model/CommissionFee.js +2 -2
- package/dist/model/ComplianceDispositionUpdateEventData.js +13 -3
- package/dist/model/ComplianceKyaScreeningsUpdateEventData.js +346 -0
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +13 -3
- package/dist/model/ContractCallParams.js +3 -3
- package/dist/model/CounterpartyWalletAddressDetail.js +2 -2
- package/dist/model/CreateBatchAllocationRequest.js +19 -19
- package/dist/model/CreateBulkSendRequest.js +167 -0
- package/dist/model/CreateBulkSendRequestPayoutParamsInner.js +153 -0
- package/dist/model/CreateCounterpartyEntry201Response.js +143 -0
- package/dist/model/CreateCounterpartyEntryRequest.js +141 -0
- package/dist/model/CreateDestinationEntry201Response.js +172 -0
- package/dist/model/CreateDestinationEntryRequest.js +172 -0
- package/dist/model/CreateKyaScreeningsBody.js +129 -0
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +17 -15
- package/dist/model/CreatePayoutRequest.js +35 -28
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateReportRequest.js +156 -0
- package/dist/model/CreateTopUpAddresses.js +139 -0
- package/dist/model/CreateTopUpAddresses201Response.js +107 -0
- package/dist/model/CreateWalletAddress.js +2 -2
- package/dist/model/DeleteCounterpartyById200Response.js +110 -0
- package/dist/model/DeleteCounterpartyEntry200Response.js +110 -0
- package/dist/model/DeleteDestinationById200Response.js +110 -0
- package/dist/model/DeleteDestinationEntry200Response.js +110 -0
- package/dist/model/EntryType.js +61 -0
- package/dist/model/GetCounterpartyEntry200Response.js +90 -0
- package/dist/model/GetDestinationEntry200Response.js +106 -0
- package/dist/model/{ListPayoutItems200Response.js → GetReports200Response.js} +22 -22
- package/dist/model/KyaRiskAssessment.js +151 -0
- package/dist/model/KyaRiskDetail.js +126 -0
- package/dist/model/KyaRiskLevel.js +66 -0
- package/dist/model/KyaScreeningRequest.js +154 -0
- package/dist/model/KyaScreeningResult.js +222 -0
- package/dist/model/KyaScreeningResultRiskAssessment.js +171 -0
- package/dist/model/KyaScreeningStatus.js +71 -0
- package/dist/model/KyaScreeningsEventData.js +174 -0
- package/dist/model/LinkDisplayInfo.js +1 -1
- package/dist/model/{ListAllocations200Response.js → ListAllocationItems200Response.js} +22 -22
- package/dist/model/ListBulkSendItems200Response.js +123 -0
- package/dist/model/ListCounterpartyEntries200Response.js +123 -0
- package/dist/model/ListDestinationEntries200Response.js +153 -0
- package/dist/model/ListKyaScreenings200Response.js +145 -0
- package/dist/model/MPCVaultEventData.js +13 -3
- package/dist/model/MerchantBalance.js +4 -4
- package/dist/model/Order.js +10 -10
- package/dist/model/OrderLinkBusinessInfo.js +22 -16
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +2 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +4 -4
- package/dist/model/PaymentAddressUpdateEventData.js +13 -3
- package/dist/model/PaymentAllocationAmount.js +2 -2
- package/dist/model/PaymentBulkSend.js +182 -0
- package/dist/model/PaymentBulkSendEvent.js +359 -0
- package/dist/model/PaymentBulkSendExecutionMode.js +61 -0
- package/dist/model/PaymentBulkSendItem.js +190 -0
- package/dist/model/{PaymentPayoutItemStatus.js → PaymentBulkSendItemStatus.js} +11 -11
- package/dist/model/PaymentBulkSendItemValidationStatus.js +66 -0
- package/dist/model/PaymentBulkSendStatus.js +81 -0
- package/dist/model/PaymentEstimateFeeRequest.js +13 -0
- package/dist/model/PaymentFeeType.js +15 -0
- package/dist/model/PaymentOrderEventData.js +31 -21
- package/dist/model/PaymentPayout.js +64 -46
- package/dist/model/PaymentPayoutDetail.js +166 -52
- package/dist/model/PaymentPayoutEvent.js +152 -80
- package/dist/model/PaymentPayoutItem.js +9 -166
- package/dist/model/PaymentPayoutParam.js +6 -46
- package/dist/model/PaymentPayoutRecipientInfo.js +126 -0
- package/dist/model/PaymentPayoutStatus.js +9 -4
- package/dist/model/PaymentRefundEventData.js +13 -3
- package/dist/model/PaymentSettlementEvent.js +13 -3
- package/dist/model/PaymentTransactionEventData.js +13 -3
- package/dist/model/PspBalance.js +4 -4
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- package/dist/model/Report.js +209 -0
- package/dist/model/ReportExportFormat.js +66 -0
- package/dist/model/ReportStatus.js +61 -0
- package/dist/model/ReportType.js +121 -0
- package/dist/model/SuspendedTokenEventData.js +13 -3
- package/dist/model/TSSRequestWebhookEventData.js +13 -3
- package/dist/model/TokenListingEventData.js +13 -3
- package/dist/model/TokensEventData.js +13 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionExtraType.js +5 -0
- package/dist/model/TransactionWalletConnectInfo.js +146 -0
- package/dist/model/TransactionWebhookEventData.js +13 -3
- package/dist/model/TransferParams.js +2 -2
- package/dist/model/UpdateCounterpartyRequest.js +160 -0
- package/dist/model/UpdateDestinationEntry200Response.js +90 -0
- package/dist/model/UpdateDestinationEntryRequest.js +135 -0
- package/dist/model/UpdateDestinationRequest.js +173 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletAddress.js +20 -2
- package/dist/model/WalletInfoEventData.js +13 -3
- package/dist/model/WebhookEventData.js +121 -28
- package/dist/model/WebhookEventDataType.js +12 -2
- package/dist/model/WebhookEventType.js +15 -0
- package/docs/AddressRiskLevel.md +16 -0
- package/docs/AddressesEventData.md +5 -1
- package/docs/AllocationItem.md +15 -0
- package/docs/AllocationParam.md +13 -0
- package/docs/AutoSweepApi.md +1 -1
- package/docs/BalanceUpdateInfoEventData.md +5 -1
- package/docs/BatchAllocation.md +2 -2
- package/docs/BatchAllocationDetail.md +1 -1
- package/docs/BridgingFee.md +2 -2
- package/docs/ChainsEventData.md +5 -1
- package/docs/CommissionFee.md +1 -1
- package/docs/ComplianceApi.md +163 -0
- package/docs/ComplianceDispositionUpdateEventData.md +5 -1
- package/docs/ComplianceKyaScreeningsUpdateEventData.md +64 -0
- package/docs/ComplianceKytScreeningsUpdateEventData.md +5 -1
- package/docs/ContractCallParams.md +2 -2
- package/docs/CounterpartyWalletAddressDetail.md +1 -1
- package/docs/CreateBatchAllocationRequest.md +2 -2
- package/docs/CreateBulkSendRequest.md +12 -0
- package/docs/CreateBulkSendRequestPayoutParamsInner.md +12 -0
- package/docs/CreateCounterpartyEntry201Response.md +10 -0
- package/docs/CreateCounterpartyEntryRequest.md +10 -0
- package/docs/CreateDestinationEntry201Response.md +11 -0
- package/docs/CreateDestinationEntryRequest.md +11 -0
- package/docs/CreateKyaScreeningsBody.md +9 -0
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +11 -11
- package/docs/CreatePayoutRequest.md +4 -4
- package/docs/CreateRefundRequest.md +2 -2
- package/docs/CreateReportRequest.md +13 -0
- package/docs/CreateTopUpAddresses.md +11 -0
- package/docs/CreateTopUpAddresses201Response.md +9 -0
- package/docs/CreateWalletAddress.md +1 -1
- package/docs/DeleteCounterpartyById200Response.md +9 -0
- package/docs/DeleteCounterpartyEntry200Response.md +9 -0
- package/docs/DeleteDestinationById200Response.md +9 -0
- package/docs/DeleteDestinationEntry200Response.md +9 -0
- package/docs/EntryType.md +12 -0
- package/docs/FeeStationApi.md +1 -1
- package/docs/GetCounterpartyEntry200Response.md +9 -0
- package/docs/GetDestinationEntry200Response.md +10 -0
- package/docs/{ListAllocations200Response.md → GetReports200Response.md} +2 -2
- package/docs/GraphQLApi.md +61 -0
- package/docs/KyaRiskAssessment.md +11 -0
- package/docs/KyaRiskDetail.md +10 -0
- package/docs/KyaRiskLevel.md +14 -0
- package/docs/KyaScreeningRequest.md +12 -0
- package/docs/KyaScreeningResult.md +17 -0
- package/docs/KyaScreeningResultRiskAssessment.md +11 -0
- package/docs/KyaScreeningStatus.md +16 -0
- package/docs/KyaScreeningsEventData.md +14 -0
- package/docs/LinkDisplayInfo.md +1 -1
- package/docs/{ListPayoutItems200Response.md → ListAllocationItems200Response.md} +2 -2
- package/docs/ListBulkSendItems200Response.md +10 -0
- package/docs/ListCounterpartyEntries200Response.md +10 -0
- package/docs/ListDestinationEntries200Response.md +11 -0
- package/docs/ListKyaScreenings200Response.md +10 -0
- package/docs/MPCVaultEventData.md +5 -1
- package/docs/MerchantBalance.md +4 -4
- package/docs/Order.md +8 -8
- package/docs/OrderLinkBusinessInfo.md +11 -11
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +2 -2
- package/docs/PaymentAddressUpdateEventData.md +5 -1
- package/docs/PaymentAllocationAmount.md +1 -1
- package/docs/PaymentApi.md +1296 -198
- package/docs/PaymentBulkSend.md +15 -0
- package/docs/PaymentBulkSendEvent.md +65 -0
- package/docs/PaymentBulkSendExecutionMode.md +12 -0
- package/docs/PaymentBulkSendItem.md +15 -0
- package/docs/{PaymentPayoutItemStatus.md → PaymentBulkSendItemStatus.md} +3 -3
- package/docs/PaymentBulkSendItemValidationStatus.md +14 -0
- package/docs/PaymentBulkSendStatus.md +20 -0
- package/docs/PaymentEstimateFeeRequest.md +1 -0
- package/docs/PaymentFeeType.md +6 -0
- package/docs/PaymentOrderEventData.md +13 -9
- package/docs/PaymentPayout.md +8 -7
- package/docs/PaymentPayoutDetail.md +10 -8
- package/docs/PaymentPayoutEvent.md +15 -9
- package/docs/PaymentPayoutItem.md +2 -13
- package/docs/PaymentPayoutParam.md +1 -4
- package/docs/PaymentPayoutRecipientInfo.md +12 -0
- package/docs/PaymentPayoutStatus.md +4 -2
- package/docs/PaymentRefundEventData.md +5 -1
- package/docs/PaymentSettlementEvent.md +5 -1
- package/docs/PaymentTransactionEventData.md +5 -1
- package/docs/PspBalance.md +4 -4
- package/docs/RefundLinkBusinessInfo.md +1 -1
- package/docs/Report.md +17 -0
- package/docs/ReportExportFormat.md +14 -0
- package/docs/ReportStatus.md +12 -0
- package/docs/ReportType.md +36 -0
- package/docs/StakingsApi.md +1 -1
- package/docs/SuspendedTokenEventData.md +5 -1
- package/docs/SwapsApi.md +2 -0
- package/docs/TSSRequestWebhookEventData.md +5 -1
- package/docs/TokenListingEventData.md +5 -1
- package/docs/TokensEventData.md +5 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionExtraType.md +2 -0
- package/docs/TransactionWalletConnectInfo.md +12 -0
- package/docs/TransactionWebhookEventData.md +5 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/TransferParams.md +1 -1
- package/docs/UpdateCounterpartyRequest.md +13 -0
- package/docs/UpdateDestinationEntry200Response.md +9 -0
- package/docs/UpdateDestinationEntryRequest.md +11 -0
- package/docs/UpdateDestinationRequest.md +14 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletAddress.md +3 -1
- package/docs/WalletInfoEventData.md +5 -1
- package/docs/WalletsApi.md +9 -9
- package/docs/WebhookEventData.md +28 -18
- package/docs/WebhookEventDataType.md +5 -1
- package/docs/WebhookEventType.md +6 -0
- package/package.json +1 -1
- package/dist/model/PaymentPayoutItemDetail.js +0 -298
- package/docs/AllocationRecord.md +0 -15
- package/docs/AllocationRequest.md +0 -13
- package/docs/PaymentPayoutItemDetail.md +0 -22
|
@@ -39,7 +39,7 @@ var ComplianceKytScreeningsUpdateEventData = /*#__PURE__*/function () {
|
|
|
39
39
|
* @alias module:model/ComplianceKytScreeningsUpdateEventData
|
|
40
40
|
* @implements module:model/WebhookEventDataType
|
|
41
41
|
* @implements module:model/KytScreeningsEventData
|
|
42
|
-
* @param data_type {module:model/ComplianceKytScreeningsUpdateEventData.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.
|
|
42
|
+
* @param data_type {module:model/ComplianceKytScreeningsUpdateEventData.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. - `PaymentBulkSend`: The payment bulk send 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. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
|
|
43
43
|
* @param transaction_id {String} The transaction ID.
|
|
44
44
|
* @param transaction_type {module:model/KytScreeningsTransactionType}
|
|
45
45
|
* @param review_status {module:model/ReviewStatusType}
|
|
@@ -143,7 +143,7 @@ var ComplianceKytScreeningsUpdateEventData = /*#__PURE__*/function () {
|
|
|
143
143
|
ComplianceKytScreeningsUpdateEventData.RequiredProperties = ["data_type", "transaction_id", "transaction_type", "review_status", "funds_status", "updated_timestamp"];
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* 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.
|
|
146
|
+
* 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. - `PaymentBulkSend`: The payment bulk send 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. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
|
|
147
147
|
* @member {module:model/ComplianceKytScreeningsUpdateEventData.DataTypeEnum} data_type
|
|
148
148
|
*/
|
|
149
149
|
ComplianceKytScreeningsUpdateEventData.prototype['data_type'] = undefined;
|
|
@@ -177,7 +177,7 @@ ComplianceKytScreeningsUpdateEventData.prototype['updated_timestamp'] = undefine
|
|
|
177
177
|
|
|
178
178
|
// Implement WebhookEventDataType interface:
|
|
179
179
|
/**
|
|
180
|
-
* 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.
|
|
180
|
+
* 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. - `PaymentBulkSend`: The payment bulk send 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. - `ComplianceKyaScreenings`: The compliance KYA screenings event data.
|
|
181
181
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
182
182
|
*/
|
|
183
183
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -281,6 +281,11 @@ ComplianceKytScreeningsUpdateEventData['DataTypeEnum'] = {
|
|
|
281
281
|
* @const
|
|
282
282
|
*/
|
|
283
283
|
"PaymentPayout": "PaymentPayout",
|
|
284
|
+
/**
|
|
285
|
+
* value: "PaymentBulkSend"
|
|
286
|
+
* @const
|
|
287
|
+
*/
|
|
288
|
+
"PaymentBulkSend": "PaymentBulkSend",
|
|
284
289
|
/**
|
|
285
290
|
* value: "BalanceUpdateInfo"
|
|
286
291
|
* @const
|
|
@@ -301,6 +306,11 @@ ComplianceKytScreeningsUpdateEventData['DataTypeEnum'] = {
|
|
|
301
306
|
* @const
|
|
302
307
|
*/
|
|
303
308
|
"ComplianceKytScreenings": "ComplianceKytScreenings",
|
|
309
|
+
/**
|
|
310
|
+
* value: "ComplianceKyaScreenings"
|
|
311
|
+
* @const
|
|
312
|
+
*/
|
|
313
|
+
"ComplianceKyaScreenings": "ComplianceKyaScreenings",
|
|
304
314
|
/**
|
|
305
315
|
* value: "unknown_default_open_api"
|
|
306
316
|
* @const
|
|
@@ -38,7 +38,7 @@ var ContractCallParams = /*#__PURE__*/function () {
|
|
|
38
38
|
* Constructs a new <code>ContractCallParams</code>.
|
|
39
39
|
* The information about a transaction that interacts with a smart contract
|
|
40
40
|
* @alias module:model/ContractCallParams
|
|
41
|
-
* @param request_id {String}
|
|
41
|
+
* @param request_id {String} A client-defined unique request identifier (idempotency key) used to prevent duplicate contract call requests. It must be unique within the same organization. Requests with the same request ID will be rejected with an error.
|
|
42
42
|
* @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).
|
|
43
43
|
* @param source {module:model/ContractCallSource}
|
|
44
44
|
* @param destination {module:model/ContractCallDestination}
|
|
@@ -172,7 +172,7 @@ var ContractCallParams = /*#__PURE__*/function () {
|
|
|
172
172
|
ContractCallParams.RequiredProperties = ["request_id", "chain_id", "source", "destination"];
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* A client-defined unique request identifier (idempotency key) used to prevent duplicate contract call requests. It must be unique within the same organization. Requests with the same request ID will be rejected with an error.
|
|
176
176
|
* @member {String} request_id
|
|
177
177
|
*/
|
|
178
178
|
ContractCallParams.prototype['request_id'] = undefined;
|
|
@@ -194,7 +194,7 @@ ContractCallParams.prototype['source'] = undefined;
|
|
|
194
194
|
ContractCallParams.prototype['destination'] = undefined;
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
* The description of the contract call transaction.
|
|
197
|
+
* The description of the contract call transaction. Maximum length is 2048 characters for MPC Wallets and Custodial Wallets (Web3 Wallets), and 1000 characters for Custodial Wallets (Asset Wallets).
|
|
198
198
|
* @member {String} description
|
|
199
199
|
*/
|
|
200
200
|
ContractCallParams.prototype['description'] = undefined;
|
|
@@ -38,7 +38,7 @@ var CounterpartyWalletAddressDetail = /*#__PURE__*/function () {
|
|
|
38
38
|
* @param counterparty_type {module:model/CounterpartyType}
|
|
39
39
|
* @param wallet_address_id {String} The wallet address ID.
|
|
40
40
|
* @param address {String} The wallet address.
|
|
41
|
-
* @param chain_id {String} The chain ID of the
|
|
41
|
+
* @param chain_id {String} The chain ID of the address.
|
|
42
42
|
* @param updated_timestamp {Number} The updated time of the wallet address, represented as a UNIX timestamp in seconds.
|
|
43
43
|
*/
|
|
44
44
|
function CounterpartyWalletAddressDetail(counterparty_id, counterparty_name, counterparty_type, wallet_address_id, address, chain_id, updated_timestamp) {
|
|
@@ -179,7 +179,7 @@ CounterpartyWalletAddressDetail.prototype['wallet_address_id'] = undefined;
|
|
|
179
179
|
CounterpartyWalletAddressDetail.prototype['address'] = undefined;
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* The chain ID of the
|
|
182
|
+
* The chain ID of the address.
|
|
183
183
|
* @member {String} chain_id
|
|
184
184
|
*/
|
|
185
185
|
CounterpartyWalletAddressDetail.prototype['chain_id'] = undefined;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var
|
|
8
|
+
var _AllocationParam = _interopRequireDefault(require("./AllocationParam"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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
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,12 +33,12 @@ var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
|
33
33
|
/**
|
|
34
34
|
* Constructs a new <code>CreateBatchAllocationRequest</code>.
|
|
35
35
|
* @alias module:model/CreateBatchAllocationRequest
|
|
36
|
-
* @param request_id {String} The request ID that is used to track a allocation request. The request ID is provided by you and must be unique.
|
|
37
|
-
* @param
|
|
36
|
+
* @param request_id {String} The request ID that is used to track a batch allocation request. The request ID is provided by you and must be unique.
|
|
37
|
+
* @param allocation_params {Array.<module:model/AllocationParam>}
|
|
38
38
|
*/
|
|
39
|
-
function CreateBatchAllocationRequest(request_id,
|
|
39
|
+
function CreateBatchAllocationRequest(request_id, allocation_params) {
|
|
40
40
|
_classCallCheck(this, CreateBatchAllocationRequest);
|
|
41
|
-
CreateBatchAllocationRequest.initialize(this, request_id,
|
|
41
|
+
CreateBatchAllocationRequest.initialize(this, request_id, allocation_params);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -48,9 +48,9 @@ var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
|
48
48
|
*/
|
|
49
49
|
return _createClass(CreateBatchAllocationRequest, null, [{
|
|
50
50
|
key: "initialize",
|
|
51
|
-
value: function initialize(obj, request_id,
|
|
51
|
+
value: function initialize(obj, request_id, allocation_params) {
|
|
52
52
|
obj['request_id'] = request_id;
|
|
53
|
-
obj['
|
|
53
|
+
obj['allocation_params'] = allocation_params;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -68,8 +68,8 @@ var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
|
68
68
|
if (data.hasOwnProperty('request_id')) {
|
|
69
69
|
obj['request_id'] = _ApiClient["default"].convertToType(data['request_id'], 'String');
|
|
70
70
|
}
|
|
71
|
-
if (data.hasOwnProperty('
|
|
72
|
-
obj['
|
|
71
|
+
if (data.hasOwnProperty('allocation_params')) {
|
|
72
|
+
obj['allocation_params'] = _ApiClient["default"].convertToType(data['allocation_params'], [_AllocationParam["default"]]);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return obj;
|
|
@@ -102,19 +102,19 @@ var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
|
102
102
|
if (data['request_id'] && !(typeof data['request_id'] === 'string' || data['request_id'] instanceof String)) {
|
|
103
103
|
throw new Error("Expected the field `request_id` to be a primitive type in the JSON string but got " + data['request_id']);
|
|
104
104
|
}
|
|
105
|
-
if (data['
|
|
105
|
+
if (data['allocation_params']) {
|
|
106
106
|
// data not null
|
|
107
107
|
// ensure the json data is an array
|
|
108
|
-
if (!Array.isArray(data['
|
|
109
|
-
throw new Error("Expected the field `
|
|
108
|
+
if (!Array.isArray(data['allocation_params'])) {
|
|
109
|
+
throw new Error("Expected the field `allocation_params` to be an array in the JSON data but got " + data['allocation_params']);
|
|
110
110
|
}
|
|
111
|
-
// validate the optional field `
|
|
112
|
-
var _iterator2 = _createForOfIteratorHelper(data['
|
|
111
|
+
// validate the optional field `allocation_params` (array)
|
|
112
|
+
var _iterator2 = _createForOfIteratorHelper(data['allocation_params']),
|
|
113
113
|
_step2;
|
|
114
114
|
try {
|
|
115
115
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
116
116
|
var item = _step2.value;
|
|
117
|
-
|
|
117
|
+
_AllocationParam["default"].validateJSON(item);
|
|
118
118
|
}
|
|
119
119
|
} catch (err) {
|
|
120
120
|
_iterator2.e(err);
|
|
@@ -127,16 +127,16 @@ var CreateBatchAllocationRequest = /*#__PURE__*/function () {
|
|
|
127
127
|
}
|
|
128
128
|
}]);
|
|
129
129
|
}();
|
|
130
|
-
CreateBatchAllocationRequest.RequiredProperties = ["request_id", "
|
|
130
|
+
CreateBatchAllocationRequest.RequiredProperties = ["request_id", "allocation_params"];
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* The request ID that is used to track a allocation request. The request ID is provided by you and must be unique.
|
|
133
|
+
* The request ID that is used to track a batch allocation request. The request ID is provided by you and must be unique.
|
|
134
134
|
* @member {String} request_id
|
|
135
135
|
*/
|
|
136
136
|
CreateBatchAllocationRequest.prototype['request_id'] = undefined;
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
|
-
* @member {Array.<module:model/
|
|
139
|
+
* @member {Array.<module:model/AllocationParam>} allocation_params
|
|
140
140
|
*/
|
|
141
|
-
CreateBatchAllocationRequest.prototype['
|
|
141
|
+
CreateBatchAllocationRequest.prototype['allocation_params'] = undefined;
|
|
142
142
|
var _default = exports["default"] = CreateBatchAllocationRequest;
|
|
@@ -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
|
+
var _CreateBulkSendRequestPayoutParamsInner = _interopRequireDefault(require("./CreateBulkSendRequestPayoutParamsInner"));
|
|
9
|
+
var _PaymentBulkSendExecutionMode = _interopRequireDefault(require("./PaymentBulkSendExecutionMode"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
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; } }
|
|
14
|
+
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; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
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); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } /**
|
|
20
|
+
* Cobo Wallet as a Service 2.0
|
|
21
|
+
*
|
|
22
|
+
* Contact: help@cobo.com
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The CreateBulkSendRequest model module.
|
|
31
|
+
* @module model/CreateBulkSendRequest
|
|
32
|
+
*/
|
|
33
|
+
var CreateBulkSendRequest = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>CreateBulkSendRequest</code>.
|
|
36
|
+
* @alias module:model/CreateBulkSendRequest
|
|
37
|
+
* @param source_account {String} The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
|
|
38
|
+
* @param execution_mode {module:model/PaymentBulkSendExecutionMode}
|
|
39
|
+
* @param payout_params {Array.<module:model/CreateBulkSendRequestPayoutParamsInner>} The bulk send items.
|
|
40
|
+
*/
|
|
41
|
+
function CreateBulkSendRequest(source_account, execution_mode, payout_params) {
|
|
42
|
+
_classCallCheck(this, CreateBulkSendRequest);
|
|
43
|
+
CreateBulkSendRequest.initialize(this, source_account, execution_mode, payout_params);
|
|
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(CreateBulkSendRequest, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, source_account, execution_mode, payout_params) {
|
|
54
|
+
obj['source_account'] = source_account;
|
|
55
|
+
obj['execution_mode'] = execution_mode;
|
|
56
|
+
obj['payout_params'] = payout_params;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>CreateBulkSendRequest</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/CreateBulkSendRequest} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/CreateBulkSendRequest} The populated <code>CreateBulkSendRequest</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new CreateBulkSendRequest();
|
|
71
|
+
if (data.hasOwnProperty('source_account')) {
|
|
72
|
+
obj['source_account'] = _ApiClient["default"].convertToType(data['source_account'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('execution_mode')) {
|
|
75
|
+
obj['execution_mode'] = _PaymentBulkSendExecutionMode["default"].constructFromObject(data['execution_mode']);
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('description')) {
|
|
78
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('payout_params')) {
|
|
81
|
+
obj['payout_params'] = _ApiClient["default"].convertToType(data['payout_params'], [_CreateBulkSendRequestPayoutParamsInner["default"]]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return obj;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Validates the JSON data with respect to <code>CreateBulkSendRequest</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>CreateBulkSendRequest</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(CreateBulkSendRequest.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['source_account'] && !(typeof data['source_account'] === 'string' || data['source_account'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `source_account` to be a primitive type in the JSON string but got " + data['source_account']);
|
|
113
|
+
}
|
|
114
|
+
// ensure the json data is a string
|
|
115
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
117
|
+
}
|
|
118
|
+
if (data['payout_params']) {
|
|
119
|
+
// data not null
|
|
120
|
+
// ensure the json data is an array
|
|
121
|
+
if (!Array.isArray(data['payout_params'])) {
|
|
122
|
+
throw new Error("Expected the field `payout_params` to be an array in the JSON data but got " + data['payout_params']);
|
|
123
|
+
}
|
|
124
|
+
// validate the optional field `payout_params` (array)
|
|
125
|
+
var _iterator2 = _createForOfIteratorHelper(data['payout_params']),
|
|
126
|
+
_step2;
|
|
127
|
+
try {
|
|
128
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
129
|
+
var item = _step2.value;
|
|
130
|
+
_CreateBulkSendRequestPayoutParamsInner["default"].validateJSON(item);
|
|
131
|
+
}
|
|
132
|
+
} catch (err) {
|
|
133
|
+
_iterator2.e(err);
|
|
134
|
+
} finally {
|
|
135
|
+
_iterator2.f();
|
|
136
|
+
}
|
|
137
|
+
;
|
|
138
|
+
}
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
}]);
|
|
142
|
+
}();
|
|
143
|
+
CreateBulkSendRequest.RequiredProperties = ["source_account", "execution_mode", "payout_params"];
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The source account from which the bulk send will be made. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`.
|
|
147
|
+
* @member {String} source_account
|
|
148
|
+
*/
|
|
149
|
+
CreateBulkSendRequest.prototype['source_account'] = undefined;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @member {module:model/PaymentBulkSendExecutionMode} execution_mode
|
|
153
|
+
*/
|
|
154
|
+
CreateBulkSendRequest.prototype['execution_mode'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The description for the entire bulk send batch.
|
|
158
|
+
* @member {String} description
|
|
159
|
+
*/
|
|
160
|
+
CreateBulkSendRequest.prototype['description'] = undefined;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The bulk send items.
|
|
164
|
+
* @member {Array.<module:model/CreateBulkSendRequestPayoutParamsInner>} payout_params
|
|
165
|
+
*/
|
|
166
|
+
CreateBulkSendRequest.prototype['payout_params'] = undefined;
|
|
167
|
+
var _default = exports["default"] = CreateBulkSendRequest;
|
|
@@ -0,0 +1,153 @@
|
|
|
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 CreateBulkSendRequestPayoutParamsInner model module.
|
|
29
|
+
* @module model/CreateBulkSendRequestPayoutParamsInner
|
|
30
|
+
*/
|
|
31
|
+
var CreateBulkSendRequestPayoutParamsInner = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>CreateBulkSendRequestPayoutParamsInner</code>.
|
|
34
|
+
* @alias module:model/CreateBulkSendRequestPayoutParamsInner
|
|
35
|
+
* @param token_id {String} The token ID of the cryptocurrency to be sent to the recipient.
|
|
36
|
+
* @param receiving_address {String} The receiving address.
|
|
37
|
+
* @param amount {String} The amount of the cryptocurrency to be sent to the recipient.
|
|
38
|
+
*/
|
|
39
|
+
function CreateBulkSendRequestPayoutParamsInner(token_id, receiving_address, amount) {
|
|
40
|
+
_classCallCheck(this, CreateBulkSendRequestPayoutParamsInner);
|
|
41
|
+
CreateBulkSendRequestPayoutParamsInner.initialize(this, token_id, receiving_address, amount);
|
|
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(CreateBulkSendRequestPayoutParamsInner, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj, token_id, receiving_address, amount) {
|
|
52
|
+
obj['token_id'] = token_id;
|
|
53
|
+
obj['receiving_address'] = receiving_address;
|
|
54
|
+
obj['amount'] = amount;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a <code>CreateBulkSendRequestPayoutParamsInner</code> from a plain JavaScript object, optionally creating a new instance.
|
|
59
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
60
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
61
|
+
* @param {module:model/CreateBulkSendRequestPayoutParamsInner} obj Optional instance to populate.
|
|
62
|
+
* @return {module:model/CreateBulkSendRequestPayoutParamsInner} The populated <code>CreateBulkSendRequestPayoutParamsInner</code> instance.
|
|
63
|
+
*/
|
|
64
|
+
}, {
|
|
65
|
+
key: "constructFromObject",
|
|
66
|
+
value: function constructFromObject(data, obj) {
|
|
67
|
+
if (data) {
|
|
68
|
+
obj = obj || new CreateBulkSendRequestPayoutParamsInner();
|
|
69
|
+
if (data.hasOwnProperty('token_id')) {
|
|
70
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('receiving_address')) {
|
|
73
|
+
obj['receiving_address'] = _ApiClient["default"].convertToType(data['receiving_address'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('amount')) {
|
|
76
|
+
obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('description')) {
|
|
79
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validates the JSON data with respect to <code>CreateBulkSendRequestPayoutParamsInner</code>.
|
|
87
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
88
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateBulkSendRequestPayoutParamsInner</code>.
|
|
89
|
+
*/
|
|
90
|
+
}, {
|
|
91
|
+
key: "validateJSON",
|
|
92
|
+
value: function validateJSON(data) {
|
|
93
|
+
// check to make sure all required properties are present in the JSON string
|
|
94
|
+
var _iterator = _createForOfIteratorHelper(CreateBulkSendRequestPayoutParamsInner.RequiredProperties),
|
|
95
|
+
_step;
|
|
96
|
+
try {
|
|
97
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
98
|
+
var property = _step.value;
|
|
99
|
+
if (!data.hasOwnProperty(property)) {
|
|
100
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
} catch (err) {
|
|
105
|
+
_iterator.e(err);
|
|
106
|
+
} finally {
|
|
107
|
+
_iterator.f();
|
|
108
|
+
}
|
|
109
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
110
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
111
|
+
}
|
|
112
|
+
// ensure the json data is a string
|
|
113
|
+
if (data['receiving_address'] && !(typeof data['receiving_address'] === 'string' || data['receiving_address'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `receiving_address` to be a primitive type in the JSON string but got " + data['receiving_address']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
}]);
|
|
127
|
+
}();
|
|
128
|
+
CreateBulkSendRequestPayoutParamsInner.RequiredProperties = ["token_id", "receiving_address", "amount"];
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The token ID of the cryptocurrency to be sent to the recipient.
|
|
132
|
+
* @member {String} token_id
|
|
133
|
+
*/
|
|
134
|
+
CreateBulkSendRequestPayoutParamsInner.prototype['token_id'] = undefined;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The receiving address.
|
|
138
|
+
* @member {String} receiving_address
|
|
139
|
+
*/
|
|
140
|
+
CreateBulkSendRequestPayoutParamsInner.prototype['receiving_address'] = undefined;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The amount of the cryptocurrency to be sent to the recipient.
|
|
144
|
+
* @member {String} amount
|
|
145
|
+
*/
|
|
146
|
+
CreateBulkSendRequestPayoutParamsInner.prototype['amount'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* A note or comment about the bulk send item.
|
|
150
|
+
* @member {String} description
|
|
151
|
+
*/
|
|
152
|
+
CreateBulkSendRequestPayoutParamsInner.prototype['description'] = undefined;
|
|
153
|
+
var _default = exports["default"] = CreateBulkSendRequestPayoutParamsInner;
|