@cobo/cobo-waas2 1.22.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -17
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +200 -21
- package/dist/api/AutoSweepApi.js +26 -26
- package/dist/api/ComplianceApi.js +214 -0
- package/dist/api/FeeStationApi.js +47 -4
- package/dist/api/PaymentApi.js +204 -57
- package/dist/api/SwapsApi.js +374 -0
- package/dist/api/TokenizationApi.js +2 -2
- package/dist/api/TransactionsApi.js +18 -18
- package/dist/api/WalletsApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +2 -2
- package/dist/index.js +329 -21
- package/dist/model/AddressBook.js +12 -12
- package/dist/model/AddressInfo.js +13 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AddressesEventDataAllOfAddresses.js +18 -0
- package/dist/model/ApprovalDetail.js +4 -4
- package/dist/model/ApprovalResult.js +6 -11
- package/dist/model/ApprovalTemplate.js +4 -4
- package/dist/model/ApprovalTransactionResult.js +8 -8
- package/dist/model/ApprovalUserDetail.js +95 -24
- package/dist/model/AutoSweepTask.js +9 -9
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BridgingFee.js +136 -0
- package/dist/model/ChainInfo.js +14 -1
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/CommissionFee.js +110 -0
- package/dist/model/ComplianceDispositionUpdateEventData.js +321 -0
- package/dist/model/ContractCallDestination.js +48 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CreateAddressBookParam.js +165 -0
- package/dist/model/CreateAddressBooks201Response.js +107 -0
- package/dist/model/CreateAddressBooksParam.js +128 -0
- package/dist/model/CreateAutoSweepTask.js +5 -5
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +14 -7
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +17 -4
- package/dist/model/CreateRefundRequest.js +2 -2
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +3 -3
- package/dist/model/CreateSettlementRequestRequest.js +39 -0
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateSwapActivityRequest.js +193 -0
- package/dist/model/CreateSweepToAddress.js +1 -1
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/CustodialTransferDestination.js +1 -1
- package/dist/model/DeleteAddressBookById201Response.js +106 -0
- package/dist/model/DispositionEventData.js +170 -0
- package/dist/model/DispositionQueryResponse.js +146 -0
- package/dist/model/DispositionResponse.js +122 -0
- package/dist/model/DispositionStatus.js +116 -0
- package/dist/model/DispositionType.js +66 -0
- package/dist/model/EstimateContractCallFeeParams.js +1 -1
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +1 -1
- package/dist/model/EstimatedEvmEip1559Fee.js +1 -1
- package/dist/model/EstimatedEvmLegacyFee.js +1 -1
- package/dist/model/EstimatedFILFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EstimatedSOLFee.js +1 -1
- package/dist/model/EstimatedUtxoFee.js +1 -1
- package/dist/model/FeeStationCheckFeeStationUsage.js +186 -0
- package/dist/model/FeeStationCheckFeeStationUsageResponse.js +200 -0
- package/dist/model/FeeStationGasStationType.js +61 -0
- package/dist/model/IsolateDisposition.js +167 -0
- package/dist/model/ListSwapActivities200Response.js +123 -0
- package/dist/model/ListSwapEnabledTokens200Response.js +123 -0
- package/dist/model/ListTopUpPayerAccounts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/Merchant.js +10 -1
- package/dist/model/MerchantBalance.js +7 -7
- package/dist/model/MessageSignDestination.js +8 -70
- package/dist/model/OrgInfo.js +9 -0
- package/dist/model/OtcFee.js +123 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentEstimateFee.js +125 -0
- package/dist/model/PaymentEstimateFee201Response.js +107 -0
- package/dist/model/{RawMessageSignDestination.js → PaymentEstimateFeeRequest.js} +51 -37
- package/dist/model/PaymentEstimatedFee.js +173 -0
- package/dist/model/PaymentFeeType.js +71 -0
- package/dist/model/PaymentOrderEventData.js +8 -3
- package/dist/model/PaymentRefundEventData.js +30 -5
- package/dist/model/PaymentSettlementEvent.js +70 -9
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PaymentWalletBalance.js +6 -6
- package/dist/model/PspBalance.js +7 -7
- package/dist/model/ReceivedAmountPerAddress.js +5 -5
- package/dist/model/Refund.js +17 -1
- package/dist/model/RefundDisposition.js +167 -0
- package/dist/model/RoleDetail.js +41 -6
- package/dist/model/SettleRequestStatus.js +5 -0
- package/dist/model/Settlement.js +45 -3
- package/dist/model/SettlementDetail.js +33 -1
- package/dist/model/SettlementInfo.js +7 -7
- package/dist/model/SolContractCallAddressLookupTableAccount.js +126 -0
- package/dist/model/SolContractCallDestination.js +30 -0
- package/dist/model/StellarContractCallContractParam.js +164 -0
- package/dist/model/StellarContractCallContractType.js +56 -0
- package/dist/model/StellarContractCallDestination.js +125 -0
- package/dist/model/StellarContractCallTrustLineOperationType.js +56 -0
- package/dist/model/StellarContractCallTrustLineParam.js +133 -0
- package/dist/model/SupportedToken.js +9 -0
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +9 -9
- package/dist/model/SwapActivityApprovers.js +1 -1
- package/dist/model/SwapActivityDetail.js +34 -18
- package/dist/model/SwapActivitySigners.js +2 -2
- package/dist/model/SwapActivityTimeline.js +5 -5
- package/dist/model/SwapEstimateFee.js +147 -0
- package/dist/model/SwapQuote.js +18 -31
- package/dist/model/SwapReceivingTransaction.js +133 -0
- package/dist/model/SwapToken.js +9 -9
- package/dist/model/SweepToAddress.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCoboCategory.js +5 -0
- package/dist/model/TransactionDestination.js +48 -8
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionEvmLegacyFee.js +1 -1
- package/dist/model/TransactionFILFee.js +1 -1
- package/dist/model/TransactionFixedFee.js +1 -1
- package/dist/model/TransactionFuelingInfo.js +13 -0
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFILFee.js +1 -1
- package/dist/model/TransactionRequestSOLFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionSOLFee.js +1 -1
- package/dist/model/TransactionSolContractAddressLookupTableAccount.js +126 -0
- package/dist/model/TransactionSolContractDestination.js +30 -0
- package/dist/model/TransactionStellarContractParam.js +164 -0
- package/dist/model/TransactionStellarContractType.js +56 -0
- package/dist/model/{BTCEIP191MessageSignDestination.js → TransactionStellarDestination.js} +38 -35
- package/dist/model/TransactionStellarTrustLineOperationType.js +56 -0
- package/dist/model/TransactionStellarTrustLineParam.js +133 -0
- package/dist/model/TransactionUtxoFee.js +1 -1
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UnfreezeDisposition.js +111 -0
- package/dist/model/UpdateAddressBookParam.js +150 -0
- package/dist/model/UpdateBankAccountByIdRequest.js +108 -0
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/UpdateTopUpAddress.js +4 -6
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WalletSetup.js +66 -0
- package/dist/model/WebhookEventData.js +81 -11
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +5 -0
- package/docs/AddressBook.md +7 -7
- package/docs/AddressBooksApi.md +218 -8
- package/docs/AddressInfo.md +1 -0
- package/docs/AddressesEventData.md +3 -1
- package/docs/AddressesEventDataAllOfAddresses.md +1 -0
- package/docs/ApprovalDetail.md +3 -3
- package/docs/ApprovalResult.md +3 -5
- package/docs/ApprovalTemplate.md +3 -3
- package/docs/ApprovalTransactionResult.md +4 -4
- package/docs/ApprovalUserDetail.md +15 -9
- package/docs/AutoSweepApi.md +18 -18
- package/docs/AutoSweepTask.md +5 -5
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BridgingFee.md +11 -0
- package/docs/ChainInfo.md +2 -1
- package/docs/ChainsEventData.md +3 -1
- package/docs/CommissionFee.md +9 -0
- package/docs/ComplianceApi.md +218 -0
- package/docs/ComplianceDispositionUpdateEventData.md +56 -0
- package/docs/ContractCallDestination.md +2 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CreateAddressBookParam.md +13 -0
- package/docs/CreateAddressBooks201Response.md +9 -0
- package/docs/CreateAddressBooksParam.md +9 -0
- package/docs/CreateAutoSweepTask.md +2 -2
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +3 -2
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +4 -3
- package/docs/CreateRefundRequest.md +1 -1
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +3 -3
- package/docs/CreateSettlementRequestRequest.md +3 -0
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateSwapActivityRequest.md +15 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/DeleteAddressBookById201Response.md +9 -0
- package/docs/DispositionEventData.md +14 -0
- package/docs/DispositionQueryResponse.md +12 -0
- package/docs/DispositionResponse.md +10 -0
- package/docs/DispositionStatus.md +34 -0
- package/docs/DispositionType.md +14 -0
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/FeeStationApi.md +53 -0
- package/docs/FeeStationCheckFeeStationUsage.md +14 -0
- package/docs/FeeStationCheckFeeStationUsageResponse.md +16 -0
- package/docs/FeeStationGasStationType.md +12 -0
- package/docs/IsolateDisposition.md +13 -0
- package/docs/ListSwapActivities200Response.md +10 -0
- package/docs/ListSwapEnabledTokens200Response.md +10 -0
- package/docs/ListTopUpPayerAccounts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/Merchant.md +2 -1
- package/docs/MerchantBalance.md +6 -6
- package/docs/MessageSignDestination.md +0 -1
- package/docs/OrgInfo.md +1 -0
- package/docs/OtcFee.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentApi.md +203 -28
- package/docs/PaymentEstimateFee.md +10 -0
- package/docs/PaymentEstimateFee201Response.md +9 -0
- package/docs/PaymentEstimateFeeRequest.md +10 -0
- package/docs/PaymentEstimatedFee.md +13 -0
- package/docs/PaymentFeeType.md +16 -0
- package/docs/PaymentOrderEventData.md +3 -1
- package/docs/PaymentRefundEventData.md +5 -2
- package/docs/PaymentSettlementEvent.md +9 -4
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PaymentWalletBalance.md +5 -5
- package/docs/PspBalance.md +6 -6
- package/docs/ReceivedAmountPerAddress.md +2 -2
- package/docs/Refund.md +2 -1
- package/docs/RefundDisposition.md +13 -0
- package/docs/RoleDetail.md +4 -1
- package/docs/SettleRequestStatus.md +2 -0
- package/docs/Settlement.md +6 -3
- package/docs/SettlementDetail.md +3 -1
- package/docs/SettlementInfo.md +6 -6
- package/docs/SolContractCallAddressLookupTableAccount.md +10 -0
- package/docs/SolContractCallDestination.md +1 -0
- package/docs/StellarContractCallContractParam.md +11 -0
- package/docs/StellarContractCallContractType.md +10 -0
- package/docs/StellarContractCallDestination.md +10 -0
- package/docs/StellarContractCallTrustLineOperationType.md +10 -0
- package/docs/StellarContractCallTrustLineParam.md +11 -0
- package/docs/SupportedToken.md +1 -0
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +9 -9
- package/docs/SwapActivityDetail.md +10 -9
- package/docs/SwapActivitySigners.md +1 -1
- package/docs/SwapActivityTimeline.md +3 -3
- package/docs/SwapEstimateFee.md +12 -0
- package/docs/SwapQuote.md +10 -11
- package/docs/SwapReceivingTransaction.md +11 -0
- package/docs/SwapToken.md +6 -6
- package/docs/SwapsApi.md +356 -0
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokenizationApi.md +2 -2
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCoboCategory.md +2 -0
- package/docs/TransactionDestination.md +2 -0
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionFuelingInfo.md +1 -0
- package/docs/TransactionSolContractAddressLookupTableAccount.md +10 -0
- package/docs/TransactionSolContractDestination.md +1 -0
- package/docs/TransactionStellarContractParam.md +11 -0
- package/docs/TransactionStellarContractType.md +10 -0
- package/docs/TransactionStellarDestination.md +10 -0
- package/docs/TransactionStellarTrustLineOperationType.md +10 -0
- package/docs/TransactionStellarTrustLineParam.md +11 -0
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +11 -11
- package/docs/UnfreezeDisposition.md +9 -0
- package/docs/UpdateAddressBookParam.md +12 -0
- package/docs/UpdateBankAccountByIdRequest.md +9 -0
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/UpdateTopUpAddress.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletSetup.md +14 -0
- package/docs/WalletsApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +12 -3
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +2 -0
- package/package.json +1 -1
- package/dist/model/ApprovalShowInfo.js +0 -140
- package/docs/ApprovalShowInfo.md +0 -13
- package/docs/BTCEIP191MessageSignDestination.md +0 -10
- package/docs/RawMessageSignDestination.md +0 -10
|
@@ -10,8 +10,13 @@ var _AddressesEventData = _interopRequireDefault(require("./AddressesEventData")
|
|
|
10
10
|
var _AddressesEventDataAllOfAddresses = _interopRequireDefault(require("./AddressesEventDataAllOfAddresses"));
|
|
11
11
|
var _Balance = _interopRequireDefault(require("./Balance"));
|
|
12
12
|
var _BalanceUpdateInfoEventData = _interopRequireDefault(require("./BalanceUpdateInfoEventData"));
|
|
13
|
+
var _BankAccount = _interopRequireDefault(require("./BankAccount"));
|
|
13
14
|
var _ChainInfo = _interopRequireDefault(require("./ChainInfo"));
|
|
14
15
|
var _ChainsEventData = _interopRequireDefault(require("./ChainsEventData"));
|
|
16
|
+
var _CommissionFee = _interopRequireDefault(require("./CommissionFee"));
|
|
17
|
+
var _ComplianceDispositionUpdateEventData = _interopRequireDefault(require("./ComplianceDispositionUpdateEventData"));
|
|
18
|
+
var _DispositionStatus = _interopRequireDefault(require("./DispositionStatus"));
|
|
19
|
+
var _DispositionType = _interopRequireDefault(require("./DispositionType"));
|
|
15
20
|
var _MPCVaultEventData = _interopRequireDefault(require("./MPCVaultEventData"));
|
|
16
21
|
var _PaymentAddressUpdateEventData = _interopRequireDefault(require("./PaymentAddressUpdateEventData"));
|
|
17
22
|
var _PaymentOrderEventData = _interopRequireDefault(require("./PaymentOrderEventData"));
|
|
@@ -75,7 +80,7 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
75
80
|
/**
|
|
76
81
|
* Constructs a new <code>WebhookEventData</code>.
|
|
77
82
|
* @alias module:model/WebhookEventData
|
|
78
|
-
* @param {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} instance The actual instance to initialize WebhookEventData.
|
|
83
|
+
* @param {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/ComplianceDispositionUpdateEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} instance The actual instance to initialize WebhookEventData.
|
|
79
84
|
*/
|
|
80
85
|
function WebhookEventData() {
|
|
81
86
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -108,6 +113,10 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
108
113
|
this.actualInstance = _ChainsEventData["default"].constructFromObject(instance);
|
|
109
114
|
match++;
|
|
110
115
|
break;
|
|
116
|
+
case "ComplianceDisposition":
|
|
117
|
+
this.actualInstance = _ComplianceDispositionUpdateEventData["default"].constructFromObject(instance);
|
|
118
|
+
match++;
|
|
119
|
+
break;
|
|
111
120
|
case "MPCVault":
|
|
112
121
|
this.actualInstance = _MPCVaultEventData["default"].constructFromObject(instance);
|
|
113
122
|
match++;
|
|
@@ -507,13 +516,36 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
507
516
|
// json data failed to deserialize into PaymentAddressUpdateEventData
|
|
508
517
|
errorMessages.push("Failed to construct PaymentAddressUpdateEventData: " + err);
|
|
509
518
|
}
|
|
519
|
+
try {
|
|
520
|
+
if (instance instanceof _ComplianceDispositionUpdateEventData["default"]) {
|
|
521
|
+
this.actualInstance = instance;
|
|
522
|
+
} else if (!!_ComplianceDispositionUpdateEventData["default"].validateJSON && _ComplianceDispositionUpdateEventData["default"].validateJSON(instance)) {
|
|
523
|
+
// plain JS object
|
|
524
|
+
// create ComplianceDispositionUpdateEventData from JS object
|
|
525
|
+
this.actualInstance = _ComplianceDispositionUpdateEventData["default"].constructFromObject(instance);
|
|
526
|
+
} else {
|
|
527
|
+
if (_ComplianceDispositionUpdateEventData["default"].constructFromObject(instance)) {
|
|
528
|
+
if (!!_ComplianceDispositionUpdateEventData["default"].constructFromObject(instance).toJSON) {
|
|
529
|
+
if (_ComplianceDispositionUpdateEventData["default"].constructFromObject(instance).toJSON()) {
|
|
530
|
+
this.actualInstance = _ComplianceDispositionUpdateEventData["default"].constructFromObject(instance);
|
|
531
|
+
}
|
|
532
|
+
} else {
|
|
533
|
+
this.actualInstance = _ComplianceDispositionUpdateEventData["default"].constructFromObject(instance);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
match++;
|
|
538
|
+
} catch (err) {
|
|
539
|
+
// json data failed to deserialize into ComplianceDispositionUpdateEventData
|
|
540
|
+
errorMessages.push("Failed to construct ComplianceDispositionUpdateEventData: " + err);
|
|
541
|
+
}
|
|
510
542
|
|
|
511
543
|
// if (match > 1) {
|
|
512
|
-
// throw new Error("Multiple matches found constructing `WebhookEventData` with oneOf schemas AddressesEventData, BalanceUpdateInfoEventData, ChainsEventData, MPCVaultEventData, PaymentAddressUpdateEventData, PaymentOrderEventData, PaymentRefundEventData, PaymentSettlementEvent, PaymentTransactionEventData, SuspendedTokenEventData, TSSRequestWebhookEventData, TokenListingEventData, TokensEventData, TransactionWebhookEventData, WalletInfoEventData. Input: " + JSON.stringify(instance));
|
|
544
|
+
// throw new Error("Multiple matches found constructing `WebhookEventData` with oneOf schemas AddressesEventData, BalanceUpdateInfoEventData, ChainsEventData, ComplianceDispositionUpdateEventData, MPCVaultEventData, PaymentAddressUpdateEventData, PaymentOrderEventData, PaymentRefundEventData, PaymentSettlementEvent, PaymentTransactionEventData, SuspendedTokenEventData, TSSRequestWebhookEventData, TokenListingEventData, TokensEventData, TransactionWebhookEventData, WalletInfoEventData. Input: " + JSON.stringify(instance));
|
|
513
545
|
// } else
|
|
514
546
|
if (match === 0) {
|
|
515
547
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
516
|
-
// throw new Error("No match found constructing `WebhookEventData` with oneOf schemas AddressesEventData, BalanceUpdateInfoEventData, ChainsEventData, MPCVaultEventData, PaymentAddressUpdateEventData, PaymentOrderEventData, PaymentRefundEventData, PaymentSettlementEvent, PaymentTransactionEventData, SuspendedTokenEventData, TSSRequestWebhookEventData, TokenListingEventData, TokensEventData, TransactionWebhookEventData, WalletInfoEventData. Details: " +
|
|
548
|
+
// throw new Error("No match found constructing `WebhookEventData` with oneOf schemas AddressesEventData, BalanceUpdateInfoEventData, ChainsEventData, ComplianceDispositionUpdateEventData, MPCVaultEventData, PaymentAddressUpdateEventData, PaymentOrderEventData, PaymentRefundEventData, PaymentSettlementEvent, PaymentTransactionEventData, SuspendedTokenEventData, TSSRequestWebhookEventData, TokenListingEventData, TokensEventData, TransactionWebhookEventData, WalletInfoEventData. Details: " +
|
|
517
549
|
// errorMessages.join(", "));
|
|
518
550
|
return;
|
|
519
551
|
} else {// only 1 match
|
|
@@ -532,16 +564,16 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
532
564
|
key: "getActualInstance",
|
|
533
565
|
value:
|
|
534
566
|
/**
|
|
535
|
-
* Gets the actual instance, which can be <code>AddressesEventData</code>, <code>BalanceUpdateInfoEventData</code>, <code>ChainsEventData</code>, <code>MPCVaultEventData</code>, <code>PaymentAddressUpdateEventData</code>, <code>PaymentOrderEventData</code>, <code>PaymentRefundEventData</code>, <code>PaymentSettlementEvent</code>, <code>PaymentTransactionEventData</code>, <code>SuspendedTokenEventData</code>, <code>TSSRequestWebhookEventData</code>, <code>TokenListingEventData</code>, <code>TokensEventData</code>, <code>TransactionWebhookEventData</code>, <code>WalletInfoEventData</code>.
|
|
536
|
-
* @return {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} The actual instance.
|
|
567
|
+
* Gets the actual instance, which can be <code>AddressesEventData</code>, <code>BalanceUpdateInfoEventData</code>, <code>ChainsEventData</code>, <code>ComplianceDispositionUpdateEventData</code>, <code>MPCVaultEventData</code>, <code>PaymentAddressUpdateEventData</code>, <code>PaymentOrderEventData</code>, <code>PaymentRefundEventData</code>, <code>PaymentSettlementEvent</code>, <code>PaymentTransactionEventData</code>, <code>SuspendedTokenEventData</code>, <code>TSSRequestWebhookEventData</code>, <code>TokenListingEventData</code>, <code>TokensEventData</code>, <code>TransactionWebhookEventData</code>, <code>WalletInfoEventData</code>.
|
|
568
|
+
* @return {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/ComplianceDispositionUpdateEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} The actual instance.
|
|
537
569
|
*/
|
|
538
570
|
function getActualInstance() {
|
|
539
571
|
return this.actualInstance;
|
|
540
572
|
}
|
|
541
573
|
|
|
542
574
|
/**
|
|
543
|
-
* Sets the actual instance, which can be <code>AddressesEventData</code>, <code>BalanceUpdateInfoEventData</code>, <code>ChainsEventData</code>, <code>MPCVaultEventData</code>, <code>PaymentAddressUpdateEventData</code>, <code>PaymentOrderEventData</code>, <code>PaymentRefundEventData</code>, <code>PaymentSettlementEvent</code>, <code>PaymentTransactionEventData</code>, <code>SuspendedTokenEventData</code>, <code>TSSRequestWebhookEventData</code>, <code>TokenListingEventData</code>, <code>TokensEventData</code>, <code>TransactionWebhookEventData</code>, <code>WalletInfoEventData</code>.
|
|
544
|
-
* @param {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} obj The actual instance.
|
|
575
|
+
* Sets the actual instance, which can be <code>AddressesEventData</code>, <code>BalanceUpdateInfoEventData</code>, <code>ChainsEventData</code>, <code>ComplianceDispositionUpdateEventData</code>, <code>MPCVaultEventData</code>, <code>PaymentAddressUpdateEventData</code>, <code>PaymentOrderEventData</code>, <code>PaymentRefundEventData</code>, <code>PaymentSettlementEvent</code>, <code>PaymentTransactionEventData</code>, <code>SuspendedTokenEventData</code>, <code>TSSRequestWebhookEventData</code>, <code>TokenListingEventData</code>, <code>TokensEventData</code>, <code>TransactionWebhookEventData</code>, <code>WalletInfoEventData</code>.
|
|
576
|
+
* @param {(module:model/AddressesEventData|module:model/BalanceUpdateInfoEventData|module:model/ChainsEventData|module:model/ComplianceDispositionUpdateEventData|module:model/MPCVaultEventData|module:model/PaymentAddressUpdateEventData|module:model/PaymentOrderEventData|module:model/PaymentRefundEventData|module:model/PaymentSettlementEvent|module:model/PaymentTransactionEventData|module:model/SuspendedTokenEventData|module:model/TSSRequestWebhookEventData|module:model/TokenListingEventData|module:model/TokensEventData|module:model/TransactionWebhookEventData|module:model/WalletInfoEventData)} obj The actual instance.
|
|
545
577
|
*/
|
|
546
578
|
}, {
|
|
547
579
|
key: "setActualInstance",
|
|
@@ -556,7 +588,7 @@ var WebhookEventData = /*#__PURE__*/function () {
|
|
|
556
588
|
}]);
|
|
557
589
|
}();
|
|
558
590
|
/**
|
|
559
|
-
* 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.
|
|
591
|
+
* 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.
|
|
560
592
|
* @member {module:model/WebhookEventData.DataTypeEnum} data_type
|
|
561
593
|
*/
|
|
562
594
|
_WebhookEventData = WebhookEventData;
|
|
@@ -739,7 +771,7 @@ WebhookEventData.prototype['fueling_info'] = undefined;
|
|
|
739
771
|
WebhookEventData.prototype['created_timestamp'] = undefined;
|
|
740
772
|
|
|
741
773
|
/**
|
|
742
|
-
* The time when the
|
|
774
|
+
* The time when the disposition was updated, in Unix timestamp format, measured in milliseconds.
|
|
743
775
|
* @member {Number} updated_timestamp
|
|
744
776
|
*/
|
|
745
777
|
WebhookEventData.prototype['updated_timestamp'] = undefined;
|
|
@@ -892,7 +924,7 @@ WebhookEventData.prototype['payable_amount'] = undefined;
|
|
|
892
924
|
WebhookEventData.prototype['receive_address'] = undefined;
|
|
893
925
|
|
|
894
926
|
/**
|
|
895
|
-
* The fiat currency
|
|
927
|
+
* The fiat currency for the settlement request.
|
|
896
928
|
* @member {String} currency
|
|
897
929
|
*/
|
|
898
930
|
WebhookEventData.prototype['currency'] = undefined;
|
|
@@ -991,6 +1023,11 @@ WebhookEventData.prototype['merchant_fee_amount'] = undefined;
|
|
|
991
1023
|
*/
|
|
992
1024
|
WebhookEventData.prototype['merchant_fee_token_id'] = undefined;
|
|
993
1025
|
|
|
1026
|
+
/**
|
|
1027
|
+
* @member {module:model/CommissionFee} commission_fee
|
|
1028
|
+
*/
|
|
1029
|
+
WebhookEventData.prototype['commission_fee'] = undefined;
|
|
1030
|
+
|
|
994
1031
|
/**
|
|
995
1032
|
* The settlement request ID generated by Cobo.
|
|
996
1033
|
* @member {String} settlement_request_id
|
|
@@ -1017,6 +1054,17 @@ WebhookEventData.prototype['payout_channel'] = undefined;
|
|
|
1017
1054
|
*/
|
|
1018
1055
|
WebhookEventData.prototype['settlement_type'] = undefined;
|
|
1019
1056
|
|
|
1057
|
+
/**
|
|
1058
|
+
* The received fiat amount of this settlement request.
|
|
1059
|
+
* @member {String} received_amount_fiat
|
|
1060
|
+
*/
|
|
1061
|
+
WebhookEventData.prototype['received_amount_fiat'] = undefined;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* @member {module:model/BankAccount} bank_account
|
|
1065
|
+
*/
|
|
1066
|
+
WebhookEventData.prototype['bank_account'] = undefined;
|
|
1067
|
+
|
|
1020
1068
|
/**
|
|
1021
1069
|
* A unique identifier assigned by Cobo to track and identify individual payers.
|
|
1022
1070
|
* @member {String} payer_id
|
|
@@ -1046,5 +1094,27 @@ WebhookEventData.prototype['previous_address'] = undefined;
|
|
|
1046
1094
|
* @member {String} updated_address
|
|
1047
1095
|
*/
|
|
1048
1096
|
WebhookEventData.prototype['updated_address'] = undefined;
|
|
1049
|
-
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* @member {module:model/DispositionType} disposition_type
|
|
1100
|
+
*/
|
|
1101
|
+
WebhookEventData.prototype['disposition_type'] = undefined;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* @member {module:model/DispositionStatus} disposition_status
|
|
1105
|
+
*/
|
|
1106
|
+
WebhookEventData.prototype['disposition_status'] = undefined;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* The blockchain address to receive the refunded/isolated funds.
|
|
1110
|
+
* @member {String} destination_address
|
|
1111
|
+
*/
|
|
1112
|
+
WebhookEventData.prototype['destination_address'] = undefined;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* The amount to be refunded/isolated from the original transaction, specified as a numeric string. This value cannot exceed the total amount of the original transaction.
|
|
1116
|
+
* @member {String} disposition_amount
|
|
1117
|
+
*/
|
|
1118
|
+
WebhookEventData.prototype['disposition_amount'] = undefined;
|
|
1119
|
+
WebhookEventData.OneOf = ["AddressesEventData", "BalanceUpdateInfoEventData", "ChainsEventData", "ComplianceDispositionUpdateEventData", "MPCVaultEventData", "PaymentAddressUpdateEventData", "PaymentOrderEventData", "PaymentRefundEventData", "PaymentSettlementEvent", "PaymentTransactionEventData", "SuspendedTokenEventData", "TSSRequestWebhookEventData", "TokenListingEventData", "TokensEventData", "TransactionWebhookEventData", "WalletInfoEventData"];
|
|
1050
1120
|
var _default = exports["default"] = WebhookEventData;
|
|
@@ -33,7 +33,7 @@ var WebhookEventDataType = /*#__PURE__*/function () {
|
|
|
33
33
|
* Constructs a new <code>WebhookEventDataType</code>.
|
|
34
34
|
* The data type of the event.
|
|
35
35
|
* @alias module:model/WebhookEventDataType
|
|
36
|
-
* @param data_type {module:model/WebhookEventDataType.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.
|
|
36
|
+
* @param data_type {module:model/WebhookEventDataType.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.
|
|
37
37
|
*/
|
|
38
38
|
function WebhookEventDataType(data_type) {
|
|
39
39
|
_classCallCheck(this, WebhookEventDataType);
|
|
@@ -104,7 +104,7 @@ var WebhookEventDataType = /*#__PURE__*/function () {
|
|
|
104
104
|
WebhookEventDataType.RequiredProperties = ["data_type"];
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
* 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.
|
|
107
|
+
* 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.
|
|
108
108
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
109
109
|
*/
|
|
110
110
|
WebhookEventDataType.prototype['data_type'] = undefined;
|
|
@@ -190,6 +190,11 @@ WebhookEventDataType['DataTypeEnum'] = {
|
|
|
190
190
|
* @const
|
|
191
191
|
*/
|
|
192
192
|
"SuspendedToken": "SuspendedToken",
|
|
193
|
+
/**
|
|
194
|
+
* value: "ComplianceDisposition"
|
|
195
|
+
* @const
|
|
196
|
+
*/
|
|
197
|
+
"ComplianceDisposition": "ComplianceDisposition",
|
|
193
198
|
/**
|
|
194
199
|
* value: "unknown_default_open_api"
|
|
195
200
|
* @const
|
|
@@ -195,6 +195,11 @@ var WebhookEventType = exports["default"] = /*#__PURE__*/function () {
|
|
|
195
195
|
* @const
|
|
196
196
|
*/
|
|
197
197
|
_defineProperty(this, "payment.address.updated", "payment.address.updated");
|
|
198
|
+
/**
|
|
199
|
+
* value: "compliance.disposition.status.updated"
|
|
200
|
+
* @const
|
|
201
|
+
*/
|
|
202
|
+
_defineProperty(this, "compliance.disposition.status.updated", "compliance.disposition.status.updated");
|
|
198
203
|
/**
|
|
199
204
|
* value: "unknown_default_open_api"
|
|
200
205
|
* @const
|
package/docs/AddressBook.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**org_id** | **String** |
|
|
8
|
-
**entry_id** | **String** |
|
|
9
|
-
**address** | **String** |
|
|
10
|
-
**memo** | **String** |
|
|
11
|
-
**wallet_name** | **String** |
|
|
7
|
+
**org_id** | **String** | Organization ID. |
|
|
8
|
+
**entry_id** | **String** | Address Book entry ID. |
|
|
9
|
+
**address** | **String** | Wallet address. |
|
|
10
|
+
**memo** | **String** | Optional memo or tag required by some chains. | [optional]
|
|
11
|
+
**wallet_name** | **String** | Wallet name. | [optional]
|
|
12
12
|
**wallet_type** | [**WalletType**](WalletType.md) | | [optional]
|
|
13
13
|
**wallet_subtype** | [**WalletSubtype**](WalletSubtype.md) | | [optional]
|
|
14
|
-
**label** | **String** |
|
|
14
|
+
**label** | **String** | A user-defined label for the address. |
|
|
15
15
|
**chain_ids** | **[String]** | A list of chain IDs. | [optional]
|
|
16
|
-
**email** | **String** |
|
|
16
|
+
**email** | **String** | Email of the address owner. | [optional]
|
|
17
17
|
**encoding** | [**AddressEncoding**](AddressEncoding.md) | | [optional]
|
|
18
18
|
|
|
19
19
|
|
package/docs/AddressBooksApi.md
CHANGED
|
@@ -4,17 +4,173 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
-
[**
|
|
7
|
+
[**createAddressBooks**](AddressBooksApi.md#createAddressBooks) | **POST** /address_books | Create Address Book entries
|
|
8
|
+
[**deleteAddressBookById**](AddressBooksApi.md#deleteAddressBookById) | **POST** /address_books/{entry_id}/delete | Delete Address Book entry
|
|
9
|
+
[**getAddressBookById**](AddressBooksApi.md#getAddressBookById) | **GET** /address_books/{entry_id} | Get Address Book entry
|
|
10
|
+
[**listAddressBooks**](AddressBooksApi.md#listAddressBooks) | **GET** /address_books | List Address Book entries
|
|
11
|
+
[**updateAddressBookById**](AddressBooksApi.md#updateAddressBookById) | **PUT** /address_books/{entry_id} | Update Address Book entry
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
|
|
15
|
+
## createAddressBooks
|
|
16
|
+
|
|
17
|
+
> CreateAddressBooks201Response createAddressBooks(opts)
|
|
18
|
+
|
|
19
|
+
Create Address Book entries
|
|
20
|
+
|
|
21
|
+
This operation adds new entries (records) to your Address Book. <Note>This operation is available upon request. Please contact our [customer support](mailto:help@cobo.com) to enable it.</Note>
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
27
|
+
// Initialize the API client
|
|
28
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
29
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
30
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
31
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
32
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
33
|
+
// Call the API
|
|
34
|
+
const apiInstance = new CoboWaas2.AddressBooksApi();
|
|
35
|
+
const opts = {
|
|
36
|
+
'CreateAddressBooksParam': new CoboWaas2.CreateAddressBooksParam()
|
|
37
|
+
};
|
|
38
|
+
apiInstance.createAddressBooks(opts).then((data) => {
|
|
39
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
40
|
+
}, (error) => {
|
|
41
|
+
console.error(error);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Name | Type | Description | Notes
|
|
50
|
+
------------- | ------------- | ------------- | -------------
|
|
51
|
+
**CreateAddressBooksParam** | [**CreateAddressBooksParam**](CreateAddressBooksParam.md)| The request body of the create Address Books operation. | [optional]
|
|
52
|
+
|
|
53
|
+
### Return type
|
|
54
|
+
|
|
55
|
+
[**CreateAddressBooks201Response**](CreateAddressBooks201Response.md)
|
|
56
|
+
|
|
57
|
+
### Authorization
|
|
58
|
+
|
|
59
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
60
|
+
|
|
61
|
+
### HTTP request headers
|
|
62
|
+
|
|
63
|
+
- **Content-Type**: application/json
|
|
64
|
+
- **Accept**: application/json
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## deleteAddressBookById
|
|
68
|
+
|
|
69
|
+
> DeleteAddressBookById201Response deleteAddressBookById(entry_id)
|
|
70
|
+
|
|
71
|
+
Delete Address Book entry
|
|
72
|
+
|
|
73
|
+
This operation deletes a specified Address Book entry (record). <Note>This operation is available upon request. Please contact our [customer support](mailto:help@cobo.com) to enable it.</Note>
|
|
74
|
+
|
|
75
|
+
### Example
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
79
|
+
// Initialize the API client
|
|
80
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
81
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
82
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
83
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
84
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
85
|
+
// Call the API
|
|
86
|
+
const apiInstance = new CoboWaas2.AddressBooksApi();
|
|
87
|
+
const entry_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
88
|
+
apiInstance.deleteAddressBookById(entry_id).then((data) => {
|
|
89
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
90
|
+
}, (error) => {
|
|
91
|
+
console.error(error);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Parameters
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Name | Type | Description | Notes
|
|
100
|
+
------------- | ------------- | ------------- | -------------
|
|
101
|
+
**entry_id** | **String**| The Address Book entry ID. |
|
|
102
|
+
|
|
103
|
+
### Return type
|
|
104
|
+
|
|
105
|
+
[**DeleteAddressBookById201Response**](DeleteAddressBookById201Response.md)
|
|
106
|
+
|
|
107
|
+
### Authorization
|
|
108
|
+
|
|
109
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
110
|
+
|
|
111
|
+
### HTTP request headers
|
|
112
|
+
|
|
113
|
+
- **Content-Type**: Not defined
|
|
114
|
+
- **Accept**: application/json
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## getAddressBookById
|
|
118
|
+
|
|
119
|
+
> AddressBook getAddressBookById(entry_id)
|
|
120
|
+
|
|
121
|
+
Get Address Book entry
|
|
122
|
+
|
|
123
|
+
This operation retrieves the detailed information about a specified Address Book entry (record).
|
|
124
|
+
|
|
125
|
+
### Example
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
129
|
+
// Initialize the API client
|
|
130
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
131
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
132
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
133
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
134
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
135
|
+
// Call the API
|
|
136
|
+
const apiInstance = new CoboWaas2.AddressBooksApi();
|
|
137
|
+
const entry_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
138
|
+
apiInstance.getAddressBookById(entry_id).then((data) => {
|
|
139
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
140
|
+
}, (error) => {
|
|
141
|
+
console.error(error);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
Name | Type | Description | Notes
|
|
150
|
+
------------- | ------------- | ------------- | -------------
|
|
151
|
+
**entry_id** | **String**| The Address Book entry ID. |
|
|
152
|
+
|
|
153
|
+
### Return type
|
|
154
|
+
|
|
155
|
+
[**AddressBook**](AddressBook.md)
|
|
156
|
+
|
|
157
|
+
### Authorization
|
|
158
|
+
|
|
159
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
160
|
+
|
|
161
|
+
### HTTP request headers
|
|
162
|
+
|
|
163
|
+
- **Content-Type**: Not defined
|
|
164
|
+
- **Accept**: application/json
|
|
165
|
+
|
|
166
|
+
|
|
11
167
|
## listAddressBooks
|
|
12
168
|
|
|
13
|
-
> ListAddressBooks200Response listAddressBooks(
|
|
169
|
+
> ListAddressBooks200Response listAddressBooks(opts)
|
|
14
170
|
|
|
15
|
-
List
|
|
171
|
+
List Address Book entries
|
|
16
172
|
|
|
17
|
-
This operation retrieves
|
|
173
|
+
This operation retrieves all entries (records) from your Address Book. You can filter the entries by chain ID, address, and label.
|
|
18
174
|
|
|
19
175
|
### Example
|
|
20
176
|
|
|
@@ -28,15 +184,15 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
28
184
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
29
185
|
// Call the API
|
|
30
186
|
const apiInstance = new CoboWaas2.AddressBooksApi();
|
|
31
|
-
const chain_id = "ETH";
|
|
32
187
|
const opts = {
|
|
188
|
+
'chain_id': "ETH",
|
|
33
189
|
'address': "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
|
|
34
190
|
'label': "test",
|
|
35
191
|
'limit': 10,
|
|
36
192
|
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
37
193
|
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk"
|
|
38
194
|
};
|
|
39
|
-
apiInstance.listAddressBooks(
|
|
195
|
+
apiInstance.listAddressBooks(opts).then((data) => {
|
|
40
196
|
console.log('API called successfully. Returned data: ' + data);
|
|
41
197
|
}, (error) => {
|
|
42
198
|
console.error(error);
|
|
@@ -49,9 +205,9 @@ apiInstance.listAddressBooks(chain_id, opts).then((data) => {
|
|
|
49
205
|
|
|
50
206
|
Name | Type | Description | Notes
|
|
51
207
|
------------- | ------------- | ------------- | -------------
|
|
52
|
-
**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). |
|
|
208
|
+
**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). | [optional]
|
|
53
209
|
**address** | **String**| The wallet address. | [optional]
|
|
54
|
-
**label** | **String**|
|
|
210
|
+
**label** | **String**| A user-defined label for the address. | [optional]
|
|
55
211
|
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
56
212
|
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
57
213
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
@@ -69,3 +225,57 @@ Name | Type | Description | Notes
|
|
|
69
225
|
- **Content-Type**: Not defined
|
|
70
226
|
- **Accept**: application/json
|
|
71
227
|
|
|
228
|
+
|
|
229
|
+
## updateAddressBookById
|
|
230
|
+
|
|
231
|
+
> AddressBook updateAddressBookById(entry_id, opts)
|
|
232
|
+
|
|
233
|
+
Update Address Book entry
|
|
234
|
+
|
|
235
|
+
This operation updates the information of a specified Address Book entry (record). <Note>This operation is available upon request. Please contact our [customer support](mailto:help@cobo.com) to enable it.</Note>
|
|
236
|
+
|
|
237
|
+
### Example
|
|
238
|
+
|
|
239
|
+
```javascript
|
|
240
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
241
|
+
// Initialize the API client
|
|
242
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
243
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
244
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
245
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
246
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
247
|
+
// Call the API
|
|
248
|
+
const apiInstance = new CoboWaas2.AddressBooksApi();
|
|
249
|
+
const entry_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
250
|
+
const opts = {
|
|
251
|
+
'UpdateAddressBookParam': new CoboWaas2.UpdateAddressBookParam()
|
|
252
|
+
};
|
|
253
|
+
apiInstance.updateAddressBookById(entry_id, opts).then((data) => {
|
|
254
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
255
|
+
}, (error) => {
|
|
256
|
+
console.error(error);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Parameters
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
Name | Type | Description | Notes
|
|
265
|
+
------------- | ------------- | ------------- | -------------
|
|
266
|
+
**entry_id** | **String**| The Address Book entry ID. |
|
|
267
|
+
**UpdateAddressBookParam** | [**UpdateAddressBookParam**](UpdateAddressBookParam.md)| The request body of the update Address Book operation. | [optional]
|
|
268
|
+
|
|
269
|
+
### Return type
|
|
270
|
+
|
|
271
|
+
[**AddressBook**](AddressBook.md)
|
|
272
|
+
|
|
273
|
+
### Authorization
|
|
274
|
+
|
|
275
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
276
|
+
|
|
277
|
+
### HTTP request headers
|
|
278
|
+
|
|
279
|
+
- **Content-Type**: application/json
|
|
280
|
+
- **Accept**: application/json
|
|
281
|
+
|
package/docs/AddressInfo.md
CHANGED
|
@@ -14,5 +14,6 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**root_pubkey** | **String** | The root public key of the address. This property applies to MPC Wallets only. | [optional]
|
|
15
15
|
**taproot_script_tree_hash** | **String** | The information about the new address. | [optional]
|
|
16
16
|
**taproot_internal_address** | **String** | The Taproot address before tweaking. | [optional]
|
|
17
|
+
**stellar_trusted_token_ids** | **[String]** | The list of token IDs for which this address has already established trustlines on the Stellar network. | [optional]
|
|
17
18
|
|
|
18
19
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**data_type** | **String** | 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. |
|
|
7
|
+
**data_type** | **String** | 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. |
|
|
8
8
|
**addresses** | [**[AddressesEventDataAllOfAddresses]**](AddressesEventDataAllOfAddresses.md) | A list of addresses. | [optional]
|
|
9
9
|
|
|
10
10
|
|
|
@@ -42,6 +42,8 @@ Name | Type | Description | Notes
|
|
|
42
42
|
|
|
43
43
|
* `SuspendedToken` (value: `"SuspendedToken"`)
|
|
44
44
|
|
|
45
|
+
* `ComplianceDisposition` (value: `"ComplianceDisposition"`)
|
|
46
|
+
|
|
45
47
|
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
46
48
|
|
|
47
49
|
|
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**root_pubkey** | **String** | The root public key of the address. This property applies to MPC Wallets only. | [optional]
|
|
15
15
|
**taproot_script_tree_hash** | **String** | The information about the new address. | [optional]
|
|
16
16
|
**taproot_internal_address** | **String** | The Taproot address before tweaking. | [optional]
|
|
17
|
+
**stellar_trusted_token_ids** | **[String]** | The list of token IDs for which this address has already established trustlines on the Stellar network. | [optional]
|
|
17
18
|
**wallet_id** | **String** | The wallet ID. |
|
|
18
19
|
|
|
19
20
|
|
package/docs/ApprovalDetail.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**transaction_id** | **String** |
|
|
8
|
-
**cobo_id** | **String** |
|
|
9
|
-
**request_id** | **String** |
|
|
7
|
+
**transaction_id** | **String** | Transaction ID. | [optional]
|
|
8
|
+
**cobo_id** | **String** | Cobo ID used to track a transaction. | [optional]
|
|
9
|
+
**request_id** | **String** | Request ID used to track a transaction request. | [optional]
|
|
10
10
|
**address_owner** | [**RoleDetail**](RoleDetail.md) | | [optional]
|
|
11
11
|
**spender** | [**RoleDetail**](RoleDetail.md) | | [optional]
|
|
12
12
|
**approver** | [**RoleDetail**](RoleDetail.md) | | [optional]
|
package/docs/ApprovalResult.md
CHANGED
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
## Enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
* `
|
|
6
|
+
* `APPROVED` (value: `"Approved"`)
|
|
7
7
|
|
|
8
|
-
* `
|
|
8
|
+
* `REJECTED` (value: `"Rejected"`)
|
|
9
9
|
|
|
10
|
-
* `
|
|
11
|
-
|
|
12
|
-
* `unknown_default_open_api` (value: `11184809`)
|
|
10
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
13
11
|
|
|
14
12
|
|
package/docs/ApprovalTemplate.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**business_key** | **String** |
|
|
8
|
-
**template_text** | **String** |
|
|
9
|
-
**template_version** | **String** |
|
|
7
|
+
**business_key** | **String** | Business key used to identify the type of approval template. | [optional]
|
|
8
|
+
**template_text** | **String** | Text content defined in the approval template used to generate approval messages shown to users | [optional]
|
|
9
|
+
**template_version** | **String** | Version of the approval template. | [optional]
|
|
10
10
|
|
|
11
11
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
## Enum
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
* `REJECTED` (value:
|
|
6
|
+
* `REJECTED` (value: `"Rejected"`)
|
|
7
7
|
|
|
8
|
-
* `PENDING` (value: `
|
|
8
|
+
* `PENDING` (value: `"Pending"`)
|
|
9
9
|
|
|
10
|
-
* `APPROVED` (value: `
|
|
10
|
+
* `APPROVED` (value: `"Approved"`)
|
|
11
11
|
|
|
12
|
-
* `unknown_default_open_api` (value: `
|
|
12
|
+
* `unknown_default_open_api` (value: `"unknown_default_open_api"`)
|
|
13
13
|
|
|
14
14
|
|