@cobo/cobo-waas2 1.7.0 → 1.9.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 +122 -29
- package/dist/ApiClient.js +11 -1
- package/dist/api/AddressBooksApi.js +7 -7
- package/dist/api/DevelopersApi.js +111 -1
- package/dist/api/DevelopersWebhooksApi.js +38 -38
- package/dist/api/OAuthApi.js +2 -2
- package/dist/api/PrimeBrokerApi.js +317 -0
- package/dist/api/StakingsApi.js +45 -42
- package/dist/api/TransactionsApi.js +131 -42
- package/dist/api/TravelRuleApi.js +216 -0
- package/dist/api/WalletsApi.js +152 -81
- package/dist/api/WalletsExchangeWalletApi.js +13 -13
- package/dist/api/WalletsMPCWalletsApi.js +189 -77
- package/dist/api/WalletsSmartContractWalletsApi.js +1 -1
- package/dist/index.js +385 -7
- package/dist/model/Activity.js +29 -0
- package/dist/model/ActivityAction.js +30 -0
- package/dist/model/ActivityExtra.js +274 -0
- package/dist/model/AddressBalance.js +129 -0
- package/dist/model/AddressInfo.js +15 -2
- package/dist/model/AddressTransferDestination.js +37 -1
- package/dist/model/AddressesEventData.js +190 -0
- package/dist/model/ApiLogDetails.js +2 -2
- package/dist/model/ApprovalStatementStatus.js +81 -0
- package/dist/model/AssetBalance.js +6 -6
- package/dist/model/BTCEIP191MessageSignDestination.js +122 -0
- package/dist/model/BabylonStakeExtra.js +1 -1
- package/dist/model/BabylonStakingActivityDetailExtra.js +165 -0
- package/dist/model/{TokenBalanceBalance.js → Balance.js} +28 -28
- package/dist/model/BaseContractCallSource.js +1 -1
- package/dist/model/BroadcastSignedTransactionsRequest.js +1 -1
- package/dist/model/CallbackMessage.js +288 -0
- package/dist/model/ChainInfo.js +2 -2
- package/dist/model/ChangeGuardPubkey200Response.js +110 -0
- package/dist/model/ContractCallParams.js +38 -2
- package/dist/model/CoreStakingActivityDetailExtra.js +164 -0
- package/dist/model/CreateAddressRequest.js +30 -4
- package/dist/model/CreateClaimActivity.js +2 -2
- package/dist/model/CreateClaimActivityRequest.js +3 -3
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreateMpcVaultRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePrimeBrokerAddress201Response.js +140 -0
- package/dist/model/CreatePrimeBrokerAddressRequest.js +107 -0
- package/dist/model/CreateStakeActivity.js +4 -6
- package/dist/model/CreateStakeActivityExtra.js +1 -1
- package/dist/model/CreateStakeActivityRequest.js +5 -7
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/CreateWebhookEndpointRequest.js +2 -2
- package/dist/model/CustodialTransferSource.js +1 -1
- package/dist/model/DeleteGuardPubkey201Response.js +110 -0
- package/dist/model/DestinationWalletType.js +61 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateClaimFee.js +1 -1
- package/dist/model/EstimateContractCallFeeParams.js +2 -2
- package/dist/model/EstimateFeeParams.js +2 -2
- package/dist/model/EstimateStakeFee.js +5 -7
- package/dist/model/EstimateTransferFeeParams.js +2 -2
- package/dist/model/EthStakeEstimatedFee.js +13 -0
- package/dist/model/EthStakingActivityDetailExtra.js +142 -0
- package/dist/model/EvmContractCallDestination.js +1 -1
- package/dist/model/EvmEIP191MessageSignDestination.js +1 -1
- package/dist/model/EvmEIP712MessageSignDestination.js +1 -1
- package/dist/model/ExchangeTransferDestination.js +1 -1
- package/dist/model/ExchangeTransferSource.js +1 -1
- package/dist/model/ExtendedTokenInfo.js +3 -3
- package/dist/model/GetStakingEstimationFee201Response.js +6 -0
- package/dist/model/GetStakingEstimationFeeRequest.js +1 -1
- package/dist/model/GetTransactionLimitation200Response.js +143 -0
- package/dist/model/GuardPubkeyStatus.js +91 -0
- package/dist/model/ListAddressBalancesByToken200Response.js +123 -0
- package/dist/model/ListCallbackMessages200Response.js +145 -0
- package/dist/model/ListKeyShareHolders200Response.js +123 -0
- package/dist/model/ListSupportedCountries200ResponseInner.js +140 -0
- package/dist/model/LockUtxosRequestUtxosInner.js +2 -2
- package/dist/model/MPCDelegate.js +1 -1
- package/dist/model/MPCVaultEventData.js +279 -0
- package/dist/model/MaxTransferableValue.js +1 -1
- package/dist/model/MessageSignDestination.js +70 -8
- package/dist/model/MessageSignDestinationType.js +12 -2
- package/dist/model/MessageSignParams.js +2 -2
- package/dist/model/MpcTransferSource.js +1 -1
- package/dist/model/OrgInfo.js +133 -0
- package/dist/model/Pagination.js +4 -4
- package/dist/model/QueryApprovalStatement200Response.js +122 -0
- package/dist/model/QueryGuardPubkey200Response.js +129 -0
- package/dist/model/QueryGuardPubkey200ResponseAddressesInner.js +125 -0
- package/dist/model/RawMessageSignDestination.js +1 -1
- package/dist/model/RetryCallbackMessage201Response.js +83 -0
- package/dist/model/RootPubkey.js +1 -1
- package/dist/model/SafeContractCallSource.js +1 -1
- package/dist/model/SafeTransferSource.js +1 -1
- package/dist/model/SelectedEntityType.js +61 -0
- package/dist/model/SelfCustodyWallet.js +152 -0
- package/dist/model/SourceGroup.js +1 -1
- package/dist/model/StakingPoolId.js +5 -0
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/SubWalletAssetBalance.js +6 -6
- package/dist/model/SubmitDepositTravelRuleInfo201Response.js +83 -0
- package/dist/model/SwapActivity.js +218 -0
- package/dist/model/SwapSummary.js +121 -0
- package/dist/model/SwapTokenPair.js +100 -0
- package/dist/model/TSSGroups.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +18 -3
- package/dist/model/TokenBalance.js +8 -8
- package/dist/model/TokenInfo.js +2 -2
- package/dist/model/Transaction.js +2 -2
- package/dist/model/TransactionApprovalDetail.js +121 -0
- package/dist/model/TransactionApprovalResult.js +66 -0
- package/dist/model/TransactionCustodialAssetWalletSource.js +1 -1
- package/dist/model/TransactionDepositFromAddressSource.js +1 -1
- package/dist/model/TransactionDepositFromLoopSource.js +1 -1
- package/dist/model/TransactionDepositFromWalletSource.js +1 -1
- package/dist/model/TransactionDepositToAddressDestination.js +17 -1
- package/dist/model/TransactionDepositToAddressDestinationTxInfo.js +83 -0
- package/dist/model/TransactionDepositToWalletDestination.js +1 -1
- package/dist/model/TransactionDestination.js +6 -0
- package/dist/model/TransactionDetail.js +4 -4
- package/dist/model/TransactionDetails.js +4 -4
- package/dist/model/TransactionEvmContractDestination.js +1 -1
- package/dist/model/TransactionExchangeWalletSource.js +1 -1
- package/dist/model/TransactionMPCWalletSource.js +1 -1
- package/dist/model/TransactionMessageSignEIP191Destination.js +1 -1
- package/dist/model/TransactionMessageSignEIP712Destination.js +1 -1
- package/dist/model/TransactionRawMessageSignDestination.js +1 -1
- package/dist/model/TransactionRawTxInfo.js +17 -4
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -1
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -1
- package/dist/model/TransactionRequestFixedFee.js +1 -1
- package/dist/model/TransactionRequestUtxoFee.js +1 -1
- package/dist/model/TransactionRoleApprovalDetail.js +152 -0
- package/dist/model/TransactionSelectedUtxo.js +123 -0
- package/dist/model/TransactionSmartContractSafeWalletSource.js +1 -1
- package/dist/model/TransactionSubStatus.js +5 -0
- package/dist/model/TransactionTokeApproval.js +3 -3
- package/dist/model/TransactionTokenAmount.js +1 -1
- package/dist/model/TransactionTransferToAddressDestination.js +1 -1
- package/dist/model/TransactionTransferToWalletDestination.js +1 -1
- package/dist/model/TransactionUserApprovalDetail.js +162 -0
- package/dist/model/TransactionWebhookEventData.js +22 -7
- package/dist/model/TransferDestination.js +6 -0
- package/dist/model/TransferParams.js +38 -2
- package/dist/model/TravelRuleDepositExchangesOrVASP.js +168 -0
- package/dist/model/TravelRuleDepositExchangesOrVASPEntityInfo.js +222 -0
- package/dist/model/TravelRuleDepositLegalEntity.js +171 -0
- package/dist/model/TravelRuleDepositNaturalEntity.js +186 -0
- package/dist/model/TravelRuleDepositRequest.js +128 -0
- package/dist/model/TravelRuleDepositRequestTravelRuleInfo.js +222 -0
- package/dist/model/TravelRuleWithdrawExchangesOrVASP.js +155 -0
- package/dist/model/TravelRuleWithdrawExchangesOrVASPEntityInfo.js +222 -0
- package/dist/model/TravelRuleWithdrawLegalEntity.js +144 -0
- package/dist/model/TravelRuleWithdrawNaturalEntity.js +159 -0
- package/dist/model/TravelRuleWithdrawRequest.js +128 -0
- package/dist/model/TravelRuleWithdrawRequestTravelRuleInfo.js +216 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +1 -1
- package/dist/model/UpdateWebhookEndpointByIdRequest.js +1 -1
- package/dist/model/Vasp.js +141 -0
- package/dist/model/WalletInfoEventData.js +175 -0
- package/dist/model/WebhookEventData.js +135 -14
- package/dist/model/WebhookEventDataType.js +17 -2
- package/dist/model/WebhookEventType.js +23 -8
- package/docs/Activity.md +2 -0
- package/docs/ActivityAction.md +12 -0
- package/docs/ActivityExtra.md +20 -0
- package/docs/AddressBalance.md +10 -0
- package/docs/AddressBooksApi.md +4 -4
- package/docs/AddressInfo.md +2 -1
- package/docs/AddressTransferDestination.md +14 -0
- package/docs/AddressesEventData.md +29 -0
- package/docs/ApiLogDetails.md +1 -1
- package/docs/ApprovalStatementStatus.md +20 -0
- package/docs/AssetBalance.md +1 -1
- package/docs/BTCEIP191MessageSignDestination.md +10 -0
- package/docs/BabylonStakeExtra.md +1 -1
- package/docs/BabylonStakingActivityDetailExtra.md +14 -0
- package/docs/{TokenBalanceBalance.md → Balance.md} +5 -5
- package/docs/BroadcastSignedTransactionsRequest.md +1 -1
- package/docs/CallbackMessage.md +46 -0
- package/docs/ChainInfo.md +1 -1
- package/docs/ChangeGuardPubkey200Response.md +9 -0
- package/docs/ContractCallParams.md +15 -1
- package/docs/CoreStakingActivityDetailExtra.md +13 -0
- package/docs/CreateAddressRequest.md +4 -2
- package/docs/CreateClaimActivity.md +1 -1
- package/docs/CreateClaimActivityRequest.md +1 -1
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreateMpcVaultRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePrimeBrokerAddress201Response.md +10 -0
- package/docs/CreatePrimeBrokerAddressRequest.md +9 -0
- package/docs/CreateStakeActivity.md +1 -1
- package/docs/CreateStakeActivityExtra.md +1 -1
- package/docs/CreateStakeActivityRequest.md +1 -1
- package/docs/CreateWalletParams.md +1 -1
- package/docs/CreateWebhookEndpointRequest.md +1 -1
- package/docs/DeleteGuardPubkey201Response.md +9 -0
- package/docs/DestinationWalletType.md +12 -0
- package/docs/DevelopersApi.md +119 -1
- package/docs/DevelopersWebhooksApi.md +23 -23
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateClaimFee.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +2 -2
- package/docs/EstimateStakeFee.md +1 -1
- package/docs/EstimateTransferFeeParams.md +1 -1
- package/docs/EthStakeEstimatedFee.md +1 -0
- package/docs/EthStakingActivityDetailExtra.md +11 -0
- package/docs/ExtendedTokenInfo.md +1 -1
- package/docs/GetStakingEstimationFee201Response.md +1 -0
- package/docs/GetStakingEstimationFeeRequest.md +2 -2
- package/docs/GetTransactionLimitation200Response.md +12 -0
- package/docs/GuardPubkeyStatus.md +24 -0
- package/docs/ListAddressBalancesByToken200Response.md +10 -0
- package/docs/ListCallbackMessages200Response.md +10 -0
- package/docs/ListKeyShareHolders200Response.md +10 -0
- package/docs/ListSupportedCountries200ResponseInner.md +11 -0
- package/docs/LockUtxosRequestUtxosInner.md +1 -1
- package/docs/MPCVaultEventData.md +34 -0
- package/docs/MaxTransferableValue.md +1 -1
- package/docs/MessageSignDestination.md +1 -0
- package/docs/MessageSignDestinationType.md +6 -2
- package/docs/MessageSignParams.md +1 -1
- package/docs/OAuthApi.md +1 -1
- package/docs/OrgInfo.md +11 -0
- package/docs/Pagination.md +2 -2
- package/docs/PrimeBrokerApi.md +318 -0
- package/docs/QueryApprovalStatement200Response.md +12 -0
- package/docs/QueryGuardPubkey200Response.md +11 -0
- package/docs/QueryGuardPubkey200ResponseAddressesInner.md +10 -0
- package/docs/RetryCallbackMessage201Response.md +9 -0
- package/docs/RootPubkey.md +1 -1
- package/docs/SelectedEntityType.md +12 -0
- package/docs/SelfCustodyWallet.md +12 -0
- package/docs/SourceGroup.md +1 -1
- package/docs/StakingPoolId.md +2 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/StakingsApi.md +30 -28
- package/docs/SubWalletAssetBalance.md +1 -1
- package/docs/SubmitDepositTravelRuleInfo201Response.md +9 -0
- package/docs/SwapActivity.md +20 -0
- package/docs/SwapSummary.md +10 -0
- package/docs/SwapTokenPair.md +10 -0
- package/docs/TSSGroups.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +7 -1
- package/docs/TokenBalance.md +2 -2
- package/docs/TokenInfo.md +1 -1
- package/docs/Transaction.md +2 -2
- package/docs/TransactionApprovalDetail.md +11 -0
- package/docs/TransactionApprovalResult.md +14 -0
- package/docs/TransactionDepositToAddressDestination.md +1 -0
- package/docs/TransactionDepositToAddressDestinationTxInfo.md +9 -0
- package/docs/TransactionDestination.md +1 -0
- package/docs/TransactionDetail.md +2 -2
- package/docs/TransactionDetails.md +2 -2
- package/docs/TransactionRawTxInfo.md +2 -1
- package/docs/TransactionRoleApprovalDetail.md +13 -0
- package/docs/TransactionSelectedUtxo.md +12 -0
- package/docs/TransactionSubStatus.md +2 -0
- package/docs/TransactionTokeApproval.md +1 -1
- package/docs/TransactionTokenAmount.md +1 -1
- package/docs/TransactionUserApprovalDetail.md +15 -0
- package/docs/TransactionWebhookEventData.md +9 -3
- package/docs/TransactionsApi.md +129 -27
- package/docs/TransferDestination.md +14 -0
- package/docs/TransferParams.md +15 -1
- package/docs/TravelRuleApi.md +214 -0
- package/docs/TravelRuleDepositExchangesOrVASP.md +13 -0
- package/docs/TravelRuleDepositExchangesOrVASPEntityInfo.md +29 -0
- package/docs/TravelRuleDepositLegalEntity.md +25 -0
- package/docs/TravelRuleDepositNaturalEntity.md +26 -0
- package/docs/TravelRuleDepositRequest.md +10 -0
- package/docs/TravelRuleDepositRequestTravelRuleInfo.md +16 -0
- package/docs/TravelRuleWithdrawExchangesOrVASP.md +12 -0
- package/docs/TravelRuleWithdrawExchangesOrVASPEntityInfo.md +16 -0
- package/docs/TravelRuleWithdrawLegalEntity.md +12 -0
- package/docs/TravelRuleWithdrawNaturalEntity.md +13 -0
- package/docs/TravelRuleWithdrawRequest.md +10 -0
- package/docs/TravelRuleWithdrawRequestTravelRuleInfo.md +15 -0
- package/docs/TriggerTestWebhookEventRequest.md +1 -1
- package/docs/UpdateWebhookEndpointByIdRequest.md +1 -1
- package/docs/Vasp.md +11 -0
- package/docs/WalletInfoEventData.md +29 -0
- package/docs/WalletsApi.md +112 -47
- package/docs/WalletsExchangeWalletApi.md +7 -7
- package/docs/WalletsMPCWalletsApi.md +160 -46
- package/docs/WalletsSmartContractWalletsApi.md +1 -1
- package/docs/WebhookEventData.md +17 -5
- package/docs/WebhookEventDataType.md +7 -1
- package/docs/WebhookEventType.md +14 -8
- package/package.json +2 -2
|
@@ -0,0 +1,218 @@
|
|
|
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 _TransactionInitiatorType = _interopRequireDefault(require("./TransactionInitiatorType"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Cobo Wallet as a Service 2.0
|
|
17
|
+
*
|
|
18
|
+
* Contact: help@cobo.com
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
21
|
+
* https://openapi-generator.tech
|
|
22
|
+
* Do not edit the class manually.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The SwapActivity model module.
|
|
27
|
+
* @module model/SwapActivity
|
|
28
|
+
*/
|
|
29
|
+
var SwapActivity = /*#__PURE__*/function () {
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a new <code>SwapActivity</code>.
|
|
32
|
+
* @alias module:model/SwapActivity
|
|
33
|
+
*/
|
|
34
|
+
function SwapActivity() {
|
|
35
|
+
_classCallCheck(this, SwapActivity);
|
|
36
|
+
SwapActivity.initialize(this);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Initializes the fields of this object.
|
|
41
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
42
|
+
* Only for internal use.
|
|
43
|
+
*/
|
|
44
|
+
return _createClass(SwapActivity, null, [{
|
|
45
|
+
key: "initialize",
|
|
46
|
+
value: function initialize(obj) {}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructs a <code>SwapActivity</code> from a plain JavaScript object, optionally creating a new instance.
|
|
50
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
51
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
52
|
+
* @param {module:model/SwapActivity} obj Optional instance to populate.
|
|
53
|
+
* @return {module:model/SwapActivity} The populated <code>SwapActivity</code> instance.
|
|
54
|
+
*/
|
|
55
|
+
}, {
|
|
56
|
+
key: "constructFromObject",
|
|
57
|
+
value: function constructFromObject(data, obj) {
|
|
58
|
+
if (data) {
|
|
59
|
+
obj = obj || new SwapActivity();
|
|
60
|
+
if (data.hasOwnProperty('activity_id')) {
|
|
61
|
+
obj['activity_id'] = _ApiClient["default"].convertToType(data['activity_id'], 'String');
|
|
62
|
+
}
|
|
63
|
+
if (data.hasOwnProperty('status')) {
|
|
64
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
65
|
+
}
|
|
66
|
+
if (data.hasOwnProperty('wallet_id')) {
|
|
67
|
+
obj['wallet_id'] = _ApiClient["default"].convertToType(data['wallet_id'], 'String');
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('pay_token_id')) {
|
|
70
|
+
obj['pay_token_id'] = _ApiClient["default"].convertToType(data['pay_token_id'], 'String');
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('receive_token_id')) {
|
|
73
|
+
obj['receive_token_id'] = _ApiClient["default"].convertToType(data['receive_token_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('pay_amount')) {
|
|
76
|
+
obj['pay_amount'] = _ApiClient["default"].convertToType(data['pay_amount'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('receive_amount')) {
|
|
79
|
+
obj['receive_amount'] = _ApiClient["default"].convertToType(data['receive_amount'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
82
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('initiator')) {
|
|
85
|
+
obj['initiator'] = _ApiClient["default"].convertToType(data['initiator'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('initiator_type')) {
|
|
88
|
+
obj['initiator_type'] = _TransactionInitiatorType["default"].constructFromObject(data['initiator_type']);
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('created_timestamp')) {
|
|
91
|
+
obj['created_timestamp'] = _ApiClient["default"].convertToType(data['created_timestamp'], 'Number');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('updated_timestamp')) {
|
|
94
|
+
obj['updated_timestamp'] = _ApiClient["default"].convertToType(data['updated_timestamp'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return obj;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Validates the JSON data with respect to <code>SwapActivity</code>.
|
|
102
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
103
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapActivity</code>.
|
|
104
|
+
*/
|
|
105
|
+
}, {
|
|
106
|
+
key: "validateJSON",
|
|
107
|
+
value: function validateJSON(data) {
|
|
108
|
+
// ensure the json data is a string
|
|
109
|
+
if (data['activity_id'] && !(typeof data['activity_id'] === 'string' || data['activity_id'] instanceof String)) {
|
|
110
|
+
throw new Error("Expected the field `activity_id` to be a primitive type in the JSON string but got " + data['activity_id']);
|
|
111
|
+
}
|
|
112
|
+
// ensure the json data is a string
|
|
113
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
114
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
115
|
+
}
|
|
116
|
+
// ensure the json data is a string
|
|
117
|
+
if (data['wallet_id'] && !(typeof data['wallet_id'] === 'string' || data['wallet_id'] instanceof String)) {
|
|
118
|
+
throw new Error("Expected the field `wallet_id` to be a primitive type in the JSON string but got " + data['wallet_id']);
|
|
119
|
+
}
|
|
120
|
+
// ensure the json data is a string
|
|
121
|
+
if (data['pay_token_id'] && !(typeof data['pay_token_id'] === 'string' || data['pay_token_id'] instanceof String)) {
|
|
122
|
+
throw new Error("Expected the field `pay_token_id` to be a primitive type in the JSON string but got " + data['pay_token_id']);
|
|
123
|
+
}
|
|
124
|
+
// ensure the json data is a string
|
|
125
|
+
if (data['receive_token_id'] && !(typeof data['receive_token_id'] === 'string' || data['receive_token_id'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `receive_token_id` to be a primitive type in the JSON string but got " + data['receive_token_id']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is a string
|
|
129
|
+
if (data['pay_amount'] && !(typeof data['pay_amount'] === 'string' || data['pay_amount'] instanceof String)) {
|
|
130
|
+
throw new Error("Expected the field `pay_amount` to be a primitive type in the JSON string but got " + data['pay_amount']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['receive_amount'] && !(typeof data['receive_amount'] === 'string' || data['receive_amount'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `receive_amount` to be a primitive type in the JSON string but got " + data['receive_amount']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
138
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is a string
|
|
141
|
+
if (data['initiator'] && !(typeof data['initiator'] === 'string' || data['initiator'] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `initiator` to be a primitive type in the JSON string but got " + data['initiator']);
|
|
143
|
+
}
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
}]);
|
|
147
|
+
}();
|
|
148
|
+
/**
|
|
149
|
+
* The unique identifier of the swap activity.
|
|
150
|
+
* @member {String} activity_id
|
|
151
|
+
*/
|
|
152
|
+
SwapActivity.prototype['activity_id'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The status of the swap activity.
|
|
156
|
+
* @member {String} status
|
|
157
|
+
*/
|
|
158
|
+
SwapActivity.prototype['status'] = undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The unique identifier of the wallet.
|
|
162
|
+
* @member {String} wallet_id
|
|
163
|
+
*/
|
|
164
|
+
SwapActivity.prototype['wallet_id'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The token symbol to swap from.
|
|
168
|
+
* @member {String} pay_token_id
|
|
169
|
+
*/
|
|
170
|
+
SwapActivity.prototype['pay_token_id'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The token symbol to swap to.
|
|
174
|
+
* @member {String} receive_token_id
|
|
175
|
+
*/
|
|
176
|
+
SwapActivity.prototype['receive_token_id'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The amount of tokens to bridge.
|
|
180
|
+
* @member {String} pay_amount
|
|
181
|
+
*/
|
|
182
|
+
SwapActivity.prototype['pay_amount'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The amount of tokens to receive.
|
|
186
|
+
* @member {String} receive_amount
|
|
187
|
+
*/
|
|
188
|
+
SwapActivity.prototype['receive_amount'] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The amount of fee.
|
|
192
|
+
* @member {String} fee_amount
|
|
193
|
+
*/
|
|
194
|
+
SwapActivity.prototype['fee_amount'] = undefined;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The initiator of the swap activity.
|
|
198
|
+
* @member {String} initiator
|
|
199
|
+
*/
|
|
200
|
+
SwapActivity.prototype['initiator'] = undefined;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @member {module:model/TransactionInitiatorType} initiator_type
|
|
204
|
+
*/
|
|
205
|
+
SwapActivity.prototype['initiator_type'] = undefined;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The time when the swap activity was created, in Unix timestamp format, measured in milliseconds.
|
|
209
|
+
* @member {Number} created_timestamp
|
|
210
|
+
*/
|
|
211
|
+
SwapActivity.prototype['created_timestamp'] = undefined;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The time when the swap activity was last updated, in Unix timestamp format, measured in milliseconds.
|
|
215
|
+
* @member {Number} updated_timestamp
|
|
216
|
+
*/
|
|
217
|
+
SwapActivity.prototype['updated_timestamp'] = undefined;
|
|
218
|
+
var _default = exports["default"] = SwapActivity;
|
|
@@ -0,0 +1,121 @@
|
|
|
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 SwapSummary model module.
|
|
29
|
+
* @module model/SwapSummary
|
|
30
|
+
*/
|
|
31
|
+
var SwapSummary = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>SwapSummary</code>.
|
|
34
|
+
* @alias module:model/SwapSummary
|
|
35
|
+
* @param total_usd_value {String} The total USD value of the swap activities, represented as a string.
|
|
36
|
+
* @param activity_count {Number} The total number of swap activities.
|
|
37
|
+
*/
|
|
38
|
+
function SwapSummary(total_usd_value, activity_count) {
|
|
39
|
+
_classCallCheck(this, SwapSummary);
|
|
40
|
+
SwapSummary.initialize(this, total_usd_value, activity_count);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(SwapSummary, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, total_usd_value, activity_count) {
|
|
51
|
+
obj['total_usd_value'] = total_usd_value;
|
|
52
|
+
obj['activity_count'] = activity_count;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>SwapSummary</code> from a plain JavaScript object, optionally creating a new instance.
|
|
57
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
58
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
59
|
+
* @param {module:model/SwapSummary} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/SwapSummary} The populated <code>SwapSummary</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new SwapSummary();
|
|
67
|
+
if (data.hasOwnProperty('total_usd_value')) {
|
|
68
|
+
obj['total_usd_value'] = _ApiClient["default"].convertToType(data['total_usd_value'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('activity_count')) {
|
|
71
|
+
obj['activity_count'] = _ApiClient["default"].convertToType(data['activity_count'], 'Number');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>SwapSummary</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapSummary</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(SwapSummary.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['total_usd_value'] && !(typeof data['total_usd_value'] === 'string' || data['total_usd_value'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `total_usd_value` to be a primitive type in the JSON string but got " + data['total_usd_value']);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
}();
|
|
108
|
+
SwapSummary.RequiredProperties = ["total_usd_value", "activity_count"];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The total USD value of the swap activities, represented as a string.
|
|
112
|
+
* @member {String} total_usd_value
|
|
113
|
+
*/
|
|
114
|
+
SwapSummary.prototype['total_usd_value'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The total number of swap activities.
|
|
118
|
+
* @member {Number} activity_count
|
|
119
|
+
*/
|
|
120
|
+
SwapSummary.prototype['activity_count'] = undefined;
|
|
121
|
+
var _default = exports["default"] = SwapSummary;
|
|
@@ -0,0 +1,100 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); } /**
|
|
15
|
+
* Cobo Wallet as a Service 2.0
|
|
16
|
+
*
|
|
17
|
+
* Contact: help@cobo.com
|
|
18
|
+
*
|
|
19
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20
|
+
* https://openapi-generator.tech
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* The SwapTokenPair model module.
|
|
26
|
+
* @module model/SwapTokenPair
|
|
27
|
+
*/
|
|
28
|
+
var SwapTokenPair = /*#__PURE__*/function () {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>SwapTokenPair</code>.
|
|
31
|
+
* @alias module:model/SwapTokenPair
|
|
32
|
+
*/
|
|
33
|
+
function SwapTokenPair() {
|
|
34
|
+
_classCallCheck(this, SwapTokenPair);
|
|
35
|
+
SwapTokenPair.initialize(this);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initializes the fields of this object.
|
|
40
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
41
|
+
* Only for internal use.
|
|
42
|
+
*/
|
|
43
|
+
return _createClass(SwapTokenPair, null, [{
|
|
44
|
+
key: "initialize",
|
|
45
|
+
value: function initialize(obj) {}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Constructs a <code>SwapTokenPair</code> from a plain JavaScript object, optionally creating a new instance.
|
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
51
|
+
* @param {module:model/SwapTokenPair} obj Optional instance to populate.
|
|
52
|
+
* @return {module:model/SwapTokenPair} The populated <code>SwapTokenPair</code> instance.
|
|
53
|
+
*/
|
|
54
|
+
}, {
|
|
55
|
+
key: "constructFromObject",
|
|
56
|
+
value: function constructFromObject(data, obj) {
|
|
57
|
+
if (data) {
|
|
58
|
+
obj = obj || new SwapTokenPair();
|
|
59
|
+
if (data.hasOwnProperty('pay_token_id')) {
|
|
60
|
+
obj['pay_token_id'] = _ApiClient["default"].convertToType(data['pay_token_id'], 'String');
|
|
61
|
+
}
|
|
62
|
+
if (data.hasOwnProperty('receive_token_id')) {
|
|
63
|
+
obj['receive_token_id'] = _ApiClient["default"].convertToType(data['receive_token_id'], 'String');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validates the JSON data with respect to <code>SwapTokenPair</code>.
|
|
71
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
72
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SwapTokenPair</code>.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "validateJSON",
|
|
76
|
+
value: function validateJSON(data) {
|
|
77
|
+
// ensure the json data is a string
|
|
78
|
+
if (data['pay_token_id'] && !(typeof data['pay_token_id'] === 'string' || data['pay_token_id'] instanceof String)) {
|
|
79
|
+
throw new Error("Expected the field `pay_token_id` to be a primitive type in the JSON string but got " + data['pay_token_id']);
|
|
80
|
+
}
|
|
81
|
+
// ensure the json data is a string
|
|
82
|
+
if (data['receive_token_id'] && !(typeof data['receive_token_id'] === 'string' || data['receive_token_id'] instanceof String)) {
|
|
83
|
+
throw new Error("Expected the field `receive_token_id` to be a primitive type in the JSON string but got " + data['receive_token_id']);
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
}]);
|
|
88
|
+
}();
|
|
89
|
+
/**
|
|
90
|
+
* The source token symbol.
|
|
91
|
+
* @member {String} pay_token_id
|
|
92
|
+
*/
|
|
93
|
+
SwapTokenPair.prototype['pay_token_id'] = undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The target token symbol.
|
|
97
|
+
* @member {String} receive_token_id
|
|
98
|
+
*/
|
|
99
|
+
SwapTokenPair.prototype['receive_token_id'] = undefined;
|
|
100
|
+
var _default = exports["default"] = SwapTokenPair;
|
package/dist/model/TSSGroups.js
CHANGED
|
@@ -103,7 +103,7 @@ TSSGroups.prototype['tss_key_share_group_id'] = undefined;
|
|
|
103
103
|
TSSGroups.prototype['curve'] = undefined;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
* The vault's [root extended public key](https://
|
|
106
|
+
* The vault's [root extended public key](https://www.cobo.com/developers/v2/guides/mpc-wallets/get-started-ocw#root-extended-public-keys).
|
|
107
107
|
* @member {String} root_pubkey
|
|
108
108
|
*/
|
|
109
109
|
TSSGroups.prototype['root_pubkey'] = undefined;
|
|
@@ -39,7 +39,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
|
|
|
39
39
|
* @alias module:model/TSSRequestWebhookEventData
|
|
40
40
|
* @implements module:model/WebhookEventDataType
|
|
41
41
|
* @implements module:model/TSSRequest
|
|
42
|
-
* @param data_type {module:model/TSSRequestWebhookEventData.DataTypeEnum} The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
|
|
42
|
+
* @param data_type {module:model/TSSRequestWebhookEventData.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.
|
|
43
43
|
*/
|
|
44
44
|
function TSSRequestWebhookEventData(data_type) {
|
|
45
45
|
_classCallCheck(this, TSSRequestWebhookEventData);
|
|
@@ -154,7 +154,7 @@ var TSSRequestWebhookEventData = /*#__PURE__*/function () {
|
|
|
154
154
|
TSSRequestWebhookEventData.RequiredProperties = ["data_type"];
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
|
|
157
|
+
* 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.
|
|
158
158
|
* @member {module:model/TSSRequestWebhookEventData.DataTypeEnum} data_type
|
|
159
159
|
*/
|
|
160
160
|
TSSRequestWebhookEventData.prototype['data_type'] = undefined;
|
|
@@ -200,7 +200,7 @@ TSSRequestWebhookEventData.prototype['created_timestamp'] = undefined;
|
|
|
200
200
|
|
|
201
201
|
// Implement WebhookEventDataType interface:
|
|
202
202
|
/**
|
|
203
|
-
* The data type of the event. - `Transaction`: The transaction event data. - `TSSRequest`: The TSS request event data.
|
|
203
|
+
* 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.
|
|
204
204
|
* @member {module:model/WebhookEventDataType.DataTypeEnum} data_type
|
|
205
205
|
*/
|
|
206
206
|
_WebhookEventDataType["default"].prototype['data_type'] = undefined;
|
|
@@ -254,6 +254,21 @@ TSSRequestWebhookEventData['DataTypeEnum'] = {
|
|
|
254
254
|
* @const
|
|
255
255
|
*/
|
|
256
256
|
"TSSRequest": "TSSRequest",
|
|
257
|
+
/**
|
|
258
|
+
* value: "Addresses"
|
|
259
|
+
* @const
|
|
260
|
+
*/
|
|
261
|
+
"Addresses": "Addresses",
|
|
262
|
+
/**
|
|
263
|
+
* value: "WalletInfo"
|
|
264
|
+
* @const
|
|
265
|
+
*/
|
|
266
|
+
"WalletInfo": "WalletInfo",
|
|
267
|
+
/**
|
|
268
|
+
* value: "MPCVault"
|
|
269
|
+
* @const
|
|
270
|
+
*/
|
|
271
|
+
"MPCVault": "MPCVault",
|
|
257
272
|
/**
|
|
258
273
|
* value: "unknown_default_open_api"
|
|
259
274
|
* @const
|
|
@@ -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 _Balance = _interopRequireDefault(require("./Balance"));
|
|
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; } } }; }
|
|
@@ -34,8 +34,8 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>TokenBalance</code>.
|
|
35
35
|
* The balance information.
|
|
36
36
|
* @alias module:model/TokenBalance
|
|
37
|
-
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
38
|
-
* @param balance {module:model/
|
|
37
|
+
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
38
|
+
* @param balance {module:model/Balance}
|
|
39
39
|
*/
|
|
40
40
|
function TokenBalance(token_id, balance) {
|
|
41
41
|
_classCallCheck(this, TokenBalance);
|
|
@@ -70,7 +70,7 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
70
70
|
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
71
71
|
}
|
|
72
72
|
if (data.hasOwnProperty('balance')) {
|
|
73
|
-
obj['balance'] =
|
|
73
|
+
obj['balance'] = _Balance["default"].constructFromObject(data['balance']);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
return obj;
|
|
@@ -106,8 +106,8 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
106
106
|
// validate the optional field `balance`
|
|
107
107
|
if (data['balance']) {
|
|
108
108
|
// data not null
|
|
109
|
-
if (!!
|
|
110
|
-
|
|
109
|
+
if (!!_Balance["default"].validateJSON) {
|
|
110
|
+
_Balance["default"].validateJSON(data['balance']);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return true;
|
|
@@ -117,13 +117,13 @@ var TokenBalance = /*#__PURE__*/function () {
|
|
|
117
117
|
TokenBalance.RequiredProperties = ["token_id", "balance"];
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
120
|
+
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
121
121
|
* @member {String} token_id
|
|
122
122
|
*/
|
|
123
123
|
TokenBalance.prototype['token_id'] = undefined;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* @member {module:model/
|
|
126
|
+
* @member {module:model/Balance} balance
|
|
127
127
|
*/
|
|
128
128
|
TokenBalance.prototype['balance'] = undefined;
|
|
129
129
|
var _default = exports["default"] = TokenBalance;
|
package/dist/model/TokenInfo.js
CHANGED
|
@@ -34,7 +34,7 @@ var TokenInfo = /*#__PURE__*/function () {
|
|
|
34
34
|
* Constructs a new <code>TokenInfo</code>.
|
|
35
35
|
* The token information.
|
|
36
36
|
* @alias module:model/TokenInfo
|
|
37
|
-
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
37
|
+
* @param token_id {String} The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
38
38
|
* @param chain_id {String} The ID of the chain on which the token operates.
|
|
39
39
|
*/
|
|
40
40
|
function TokenInfo(token_id, chain_id) {
|
|
@@ -182,7 +182,7 @@ var TokenInfo = /*#__PURE__*/function () {
|
|
|
182
182
|
TokenInfo.RequiredProperties = ["token_id", "chain_id"];
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
185
|
+
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
186
186
|
* @member {String} token_id
|
|
187
187
|
*/
|
|
188
188
|
TokenInfo.prototype['token_id'] = undefined;
|
|
@@ -344,13 +344,13 @@ Transaction.prototype['sub_status'] = undefined;
|
|
|
344
344
|
Transaction.prototype['failed_reason'] = undefined;
|
|
345
345
|
|
|
346
346
|
/**
|
|
347
|
-
* 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](/v2/api-references/wallets/list-enabled-chains).
|
|
347
|
+
* 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).
|
|
348
348
|
* @member {String} chain_id
|
|
349
349
|
*/
|
|
350
350
|
Transaction.prototype['chain_id'] = undefined;
|
|
351
351
|
|
|
352
352
|
/**
|
|
353
|
-
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](/v2/api-references/wallets/list-enabled-tokens).
|
|
353
|
+
* The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).
|
|
354
354
|
* @member {String} token_id
|
|
355
355
|
*/
|
|
356
356
|
Transaction.prototype['token_id'] = undefined;
|