@cobo/cobo-waas2 1.4.0 → 1.6.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 +32 -10
- package/dist/ApiClient.js +1 -1
- package/dist/ServerDemo.js +80 -0
- package/dist/api/AddressBooksApi.js +105 -0
- package/dist/api/DevelopersApi.js +79 -0
- package/dist/api/DevelopersWebhooksApi.js +43 -0
- package/dist/api/OAuthApi.js +10 -10
- package/dist/api/TransactionsApi.js +12 -12
- package/dist/api/WalletsApi.js +60 -59
- package/dist/api/WalletsExchangeWalletApi.js +4 -4
- package/dist/api/WalletsMPCWalletsApi.js +8 -8
- package/dist/api/WalletsSmartContractWalletsApi.js +93 -0
- package/dist/index.js +181 -34
- package/dist/model/AddressBook.js +25 -10
- package/dist/model/AddressTransferDestination.js +2 -2
- package/dist/model/AddressTransferDestinationUtxoOutputsInner.js +6 -17
- package/dist/model/ApiLogDetails.js +238 -0
- package/dist/model/ApiLogSummary.js +161 -0
- package/dist/model/BabylonStakeEstimatedFee.js +118 -0
- package/dist/model/BabylonValidator.js +5 -0
- package/dist/model/CheckAddressChainsValidity200ResponseInner.js +121 -0
- package/dist/model/CheckLoopTransfers200ResponseInner.js +1 -1
- package/dist/model/CoboSafeDelegate.js +2 -2
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +42 -8
- package/dist/model/CreateUnstakeActivity.js +16 -0
- package/dist/model/CreateUnstakeActivityExtra.js +159 -0
- package/dist/model/CreateUnstakeActivityRequest.js +20 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/EstimateContractCallFeeParams.js +5 -7
- package/dist/model/EstimateFeeParams.js +1 -1
- package/dist/model/EstimateTransferFeeParams.js +5 -9
- package/dist/model/EstimateUnstakeFee.js +20 -0
- package/dist/model/EstimatedEvmEip1559FeeSlow.js +3 -5
- package/dist/model/EstimatedEvmLegacyFeeSlow.js +3 -5
- package/dist/model/EstimatedFee.js +1 -1
- package/dist/model/EstimatedFixedFee.js +1 -1
- package/dist/model/EthStakeEstimatedFee.js +112 -0
- package/dist/model/EthStakeExtra.js +131 -0
- package/dist/model/EthStakingExtra.js +131 -0
- package/dist/model/EthUnstakeExtra.js +131 -0
- package/dist/model/ExchangeId.js +10 -0
- package/dist/model/ExtendedTokenInfo.js +17 -4
- package/dist/model/FeeGasLimit.js +1 -2
- package/dist/model/GetApiKeyInfo200Response.js +251 -0
- package/dist/model/GetStakingEstimationFee201Response.js +144 -43
- package/dist/model/GetStakingEstimationFeeRequest.js +2 -2
- package/dist/model/{GetToken200Response.js → GetToken2XXResponse.js} +21 -21
- package/dist/model/GetToken4XXResponse.js +12 -10
- package/dist/model/ListAddressBooks200Response.js +123 -0
- package/dist/model/MPCDelegate.js +5 -5
- package/dist/model/MpcTransferSource.js +2 -2
- package/dist/model/{RefreshToken200Response.js → RefreshToken2XXResponse.js} +21 -21
- package/dist/model/{WalletBalanceSnapshot.js → RoleScopes.js} +42 -34
- package/dist/model/SafeWalletDelegates.js +210 -0
- package/dist/model/{BookkeepingSummary.js → SafeWalletDelegatesContractCall.js} +47 -52
- package/dist/model/{WalletBalanceSnapshotRecord.js → SafeWalletDelegatesTransfer.js} +47 -63
- package/dist/model/Scopes.js +142 -0
- package/dist/model/SmartContractWalletInfo.js +1 -1
- package/dist/model/StakingPoolType.js +5 -0
- package/dist/model/StakingsExtra.js +36 -8
- package/dist/model/TokenAssetModelType.js +61 -0
- package/dist/model/TokenBalanceBalance.js +6 -6
- package/dist/model/TokenInfo.js +11 -2
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +50 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionEvmCalldataInfo.js +177 -0
- package/dist/model/TransactionEvmContractDestination.js +16 -0
- package/dist/model/TransactionEvmContractMethod.js +136 -0
- package/dist/model/TransactionEvmEip1559Fee.js +2 -4
- package/dist/model/TransactionEvmLegacyFee.js +2 -4
- package/dist/model/TransactionFee.js +1 -2
- package/dist/model/TransactionRawMessageSignDestination.js +120 -0
- package/dist/model/TransactionRbfSource.js +1 -1
- package/dist/model/TransactionRequestEvmEip1559Fee.js +1 -2
- package/dist/model/TransactionRequestEvmLegacyFee.js +1 -2
- package/dist/model/TransactionRequestFee.js +1 -2
- package/dist/model/TransactionSmartContractSafeWalletSource.js +4 -6
- package/dist/model/TransactionSource.js +1 -1
- package/dist/model/TransactionTokeApproval.js +17 -4
- package/dist/model/TransactionTransferToAddressDestination.js +2 -2
- package/dist/model/TransactionTransferToAddressDestinationUtxoOutputsInner.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TransferDestination.js +2 -2
- package/dist/model/TriggerTestWebhookEvent201Response.js +83 -0
- package/dist/model/TriggerTestWebhookEventRequest.js +115 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/AddressBook.md +8 -7
- package/docs/AddressBooksApi.md +71 -0
- package/docs/AddressTransferDestination.md +2 -2
- package/docs/AddressTransferDestinationUtxoOutputsInner.md +1 -2
- package/docs/ApiLogDetails.md +18 -0
- package/docs/ApiLogSummary.md +13 -0
- package/docs/BabylonStakeEstimatedFee.md +12 -0
- package/docs/BabylonValidator.md +2 -0
- package/docs/CheckAddressChainsValidity200ResponseInner.md +10 -0
- package/docs/CheckLoopTransfers200ResponseInner.md +1 -1
- package/docs/CoboSafeDelegate.md +2 -2
- package/docs/CreateStakeActivityExtra.md +1 -0
- package/docs/CreateUnstakeActivity.md +1 -0
- package/docs/CreateUnstakeActivityExtra.md +10 -0
- package/docs/CreateUnstakeActivityRequest.md +1 -0
- package/docs/DevelopersApi.md +55 -0
- package/docs/DevelopersWebhooksApi.md +53 -0
- package/docs/ErrorResponse.md +1 -1
- package/docs/EstimateContractCallFeeParams.md +1 -1
- package/docs/EstimateFeeParams.md +1 -1
- package/docs/EstimateTransferFeeParams.md +2 -2
- package/docs/EstimateUnstakeFee.md +1 -0
- package/docs/EstimatedEvmEip1559FeeSlow.md +1 -1
- package/docs/EstimatedEvmLegacyFeeSlow.md +1 -1
- package/docs/EstimatedFee.md +1 -1
- package/docs/EstimatedFixedFee.md +1 -1
- package/docs/EthStakeEstimatedFee.md +11 -0
- package/docs/EthStakeExtra.md +10 -0
- package/docs/EthStakingExtra.md +10 -0
- package/docs/EthUnstakeExtra.md +10 -0
- package/docs/ExchangeId.md +4 -0
- package/docs/ExtendedTokenInfo.md +3 -2
- package/docs/FeeGasLimit.md +1 -1
- package/docs/GetApiKeyInfo200Response.md +30 -0
- package/docs/GetStakingEstimationFee201Response.md +3 -0
- package/docs/GetStakingEstimationFeeRequest.md +1 -1
- package/docs/{GetToken200Response.md → GetToken2XXResponse.md} +1 -1
- package/docs/GetToken4XXResponse.md +1 -1
- package/docs/ListAddressBooks200Response.md +10 -0
- package/docs/MPCDelegate.md +2 -2
- package/docs/MpcTransferSource.md +1 -1
- package/docs/OAuthApi.md +5 -5
- package/docs/PoolDetailsAllOfValidatorsInfo.md +2 -0
- package/docs/{RefreshToken200Response.md → RefreshToken2XXResponse.md} +1 -1
- package/docs/RoleScopes.md +10 -0
- package/docs/SafeWalletDelegates.md +14 -0
- package/docs/SafeWalletDelegatesContractCall.md +12 -0
- package/docs/SafeWalletDelegatesTransfer.md +12 -0
- package/docs/Scopes.md +13 -0
- package/docs/StakingPoolType.md +2 -0
- package/docs/TokenAssetModelType.md +12 -0
- package/docs/TokenBalanceBalance.md +4 -4
- package/docs/TokenInfo.md +3 -2
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +4 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionEvmCalldataInfo.md +16 -0
- package/docs/TransactionEvmContractDestination.md +1 -0
- package/docs/TransactionEvmContractMethod.md +13 -0
- package/docs/TransactionEvmEip1559Fee.md +1 -1
- package/docs/TransactionEvmLegacyFee.md +1 -1
- package/docs/TransactionFee.md +1 -1
- package/docs/TransactionRawMessageSignDestination.md +10 -0
- package/docs/TransactionRbfSource.md +1 -1
- package/docs/TransactionRequestEvmEip1559Fee.md +1 -1
- package/docs/TransactionRequestEvmLegacyFee.md +1 -1
- package/docs/TransactionRequestFee.md +1 -1
- package/docs/TransactionSmartContractSafeWalletSource.md +1 -1
- package/docs/TransactionSource.md +1 -1
- package/docs/TransactionTokeApproval.md +3 -2
- package/docs/TransactionTransferToAddressDestination.md +2 -2
- package/docs/TransactionTransferToAddressDestinationUtxoOutputsInner.md +0 -1
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +7 -7
- package/docs/TransferDestination.md +2 -2
- package/docs/TriggerTestWebhookEvent201Response.md +9 -0
- package/docs/TriggerTestWebhookEventRequest.md +10 -0
- package/docs/WalletsApi.md +55 -55
- package/docs/WalletsExchangeWalletApi.md +2 -2
- package/docs/WalletsMPCWalletsApi.md +4 -4
- package/docs/WalletsSmartContractWalletsApi.md +63 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +3 -2
- package/dist/model/BookkeepingRecord.js +0 -243
- package/docs/BookkeepingRecord.md +0 -19
- package/docs/BookkeepingSummary.md +0 -12
- package/docs/WalletBalanceSnapshot.md +0 -10
- package/docs/WalletBalanceSnapshotRecord.md +0 -13
|
@@ -0,0 +1,238 @@
|
|
|
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 ApiLogDetails model module.
|
|
29
|
+
* @module model/ApiLogDetails
|
|
30
|
+
*/
|
|
31
|
+
var ApiLogDetails = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ApiLogDetails</code>.
|
|
34
|
+
* The information about an API log.
|
|
35
|
+
* @alias module:model/ApiLogDetails
|
|
36
|
+
* @param log_id {String} A unique identifier for the API log, used for tracking.
|
|
37
|
+
* @param api_method {String} The HTTP method used for the API request.
|
|
38
|
+
* @param api_endpoint {String} The endpoint of the API request.
|
|
39
|
+
* @param status_code {Number} The HTTP status code returned by the API request.
|
|
40
|
+
* @param ip_address {String} The client's IP address that made the API request.
|
|
41
|
+
* @param request_timestamp {Number} The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
42
|
+
* @param api_key {String} The API key used to call the API. For more details, refer to [API key](/v2/guides/overview/cobo-auth#api-key).
|
|
43
|
+
* @param response_body {String} The response body of the API request.
|
|
44
|
+
* @param query_params {String} The query parameters of the API request.
|
|
45
|
+
* @param request_body {String} The request body of the API request.
|
|
46
|
+
*/
|
|
47
|
+
function ApiLogDetails(log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body) {
|
|
48
|
+
_classCallCheck(this, ApiLogDetails);
|
|
49
|
+
ApiLogDetails.initialize(this, log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the fields of this object.
|
|
54
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
55
|
+
* Only for internal use.
|
|
56
|
+
*/
|
|
57
|
+
return _createClass(ApiLogDetails, null, [{
|
|
58
|
+
key: "initialize",
|
|
59
|
+
value: function initialize(obj, log_id, api_method, api_endpoint, status_code, ip_address, request_timestamp, api_key, response_body, query_params, request_body) {
|
|
60
|
+
obj['log_id'] = log_id;
|
|
61
|
+
obj['api_method'] = api_method;
|
|
62
|
+
obj['api_endpoint'] = api_endpoint;
|
|
63
|
+
obj['status_code'] = status_code;
|
|
64
|
+
obj['ip_address'] = ip_address;
|
|
65
|
+
obj['request_timestamp'] = request_timestamp;
|
|
66
|
+
obj['api_key'] = api_key;
|
|
67
|
+
obj['response_body'] = response_body;
|
|
68
|
+
obj['query_params'] = query_params;
|
|
69
|
+
obj['request_body'] = request_body;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Constructs a <code>ApiLogDetails</code> from a plain JavaScript object, optionally creating a new instance.
|
|
74
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
75
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
76
|
+
* @param {module:model/ApiLogDetails} obj Optional instance to populate.
|
|
77
|
+
* @return {module:model/ApiLogDetails} The populated <code>ApiLogDetails</code> instance.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "constructFromObject",
|
|
81
|
+
value: function constructFromObject(data, obj) {
|
|
82
|
+
if (data) {
|
|
83
|
+
obj = obj || new ApiLogDetails();
|
|
84
|
+
if (data.hasOwnProperty('log_id')) {
|
|
85
|
+
obj['log_id'] = _ApiClient["default"].convertToType(data['log_id'], 'String');
|
|
86
|
+
}
|
|
87
|
+
if (data.hasOwnProperty('api_method')) {
|
|
88
|
+
obj['api_method'] = _ApiClient["default"].convertToType(data['api_method'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('api_endpoint')) {
|
|
91
|
+
obj['api_endpoint'] = _ApiClient["default"].convertToType(data['api_endpoint'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('status_code')) {
|
|
94
|
+
obj['status_code'] = _ApiClient["default"].convertToType(data['status_code'], 'Number');
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('ip_address')) {
|
|
97
|
+
obj['ip_address'] = _ApiClient["default"].convertToType(data['ip_address'], 'String');
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('request_timestamp')) {
|
|
100
|
+
obj['request_timestamp'] = _ApiClient["default"].convertToType(data['request_timestamp'], 'Number');
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('api_key')) {
|
|
103
|
+
obj['api_key'] = _ApiClient["default"].convertToType(data['api_key'], 'String');
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('response_body')) {
|
|
106
|
+
obj['response_body'] = _ApiClient["default"].convertToType(data['response_body'], 'String');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('query_params')) {
|
|
109
|
+
obj['query_params'] = _ApiClient["default"].convertToType(data['query_params'], 'String');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('request_body')) {
|
|
112
|
+
obj['request_body'] = _ApiClient["default"].convertToType(data['request_body'], 'String');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return obj;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Validates the JSON data with respect to <code>ApiLogDetails</code>.
|
|
120
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
121
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApiLogDetails</code>.
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "validateJSON",
|
|
125
|
+
value: function validateJSON(data) {
|
|
126
|
+
// check to make sure all required properties are present in the JSON string
|
|
127
|
+
var _iterator = _createForOfIteratorHelper(ApiLogDetails.RequiredProperties),
|
|
128
|
+
_step;
|
|
129
|
+
try {
|
|
130
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
131
|
+
var property = _step.value;
|
|
132
|
+
if (!data.hasOwnProperty(property)) {
|
|
133
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
} catch (err) {
|
|
138
|
+
_iterator.e(err);
|
|
139
|
+
} finally {
|
|
140
|
+
_iterator.f();
|
|
141
|
+
}
|
|
142
|
+
if (data['log_id'] && !(typeof data['log_id'] === 'string' || data['log_id'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `log_id` to be a primitive type in the JSON string but got " + data['log_id']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['api_method'] && !(typeof data['api_method'] === 'string' || data['api_method'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `api_method` to be a primitive type in the JSON string but got " + data['api_method']);
|
|
148
|
+
}
|
|
149
|
+
// ensure the json data is a string
|
|
150
|
+
if (data['api_endpoint'] && !(typeof data['api_endpoint'] === 'string' || data['api_endpoint'] instanceof String)) {
|
|
151
|
+
throw new Error("Expected the field `api_endpoint` to be a primitive type in the JSON string but got " + data['api_endpoint']);
|
|
152
|
+
}
|
|
153
|
+
// ensure the json data is a string
|
|
154
|
+
if (data['ip_address'] && !(typeof data['ip_address'] === 'string' || data['ip_address'] instanceof String)) {
|
|
155
|
+
throw new Error("Expected the field `ip_address` to be a primitive type in the JSON string but got " + data['ip_address']);
|
|
156
|
+
}
|
|
157
|
+
// ensure the json data is a string
|
|
158
|
+
if (data['api_key'] && !(typeof data['api_key'] === 'string' || data['api_key'] instanceof String)) {
|
|
159
|
+
throw new Error("Expected the field `api_key` to be a primitive type in the JSON string but got " + data['api_key']);
|
|
160
|
+
}
|
|
161
|
+
// ensure the json data is a string
|
|
162
|
+
if (data['response_body'] && !(typeof data['response_body'] === 'string' || data['response_body'] instanceof String)) {
|
|
163
|
+
throw new Error("Expected the field `response_body` to be a primitive type in the JSON string but got " + data['response_body']);
|
|
164
|
+
}
|
|
165
|
+
// ensure the json data is a string
|
|
166
|
+
if (data['query_params'] && !(typeof data['query_params'] === 'string' || data['query_params'] instanceof String)) {
|
|
167
|
+
throw new Error("Expected the field `query_params` to be a primitive type in the JSON string but got " + data['query_params']);
|
|
168
|
+
}
|
|
169
|
+
// ensure the json data is a string
|
|
170
|
+
if (data['request_body'] && !(typeof data['request_body'] === 'string' || data['request_body'] instanceof String)) {
|
|
171
|
+
throw new Error("Expected the field `request_body` to be a primitive type in the JSON string but got " + data['request_body']);
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
}]);
|
|
176
|
+
}();
|
|
177
|
+
ApiLogDetails.RequiredProperties = ["log_id", "api_method", "api_endpoint", "status_code", "ip_address", "request_timestamp", "api_key", "response_body", "query_params", "request_body"];
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* A unique identifier for the API log, used for tracking.
|
|
181
|
+
* @member {String} log_id
|
|
182
|
+
*/
|
|
183
|
+
ApiLogDetails.prototype['log_id'] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The HTTP method used for the API request.
|
|
187
|
+
* @member {String} api_method
|
|
188
|
+
*/
|
|
189
|
+
ApiLogDetails.prototype['api_method'] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The endpoint of the API request.
|
|
193
|
+
* @member {String} api_endpoint
|
|
194
|
+
*/
|
|
195
|
+
ApiLogDetails.prototype['api_endpoint'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The HTTP status code returned by the API request.
|
|
199
|
+
* @member {Number} status_code
|
|
200
|
+
*/
|
|
201
|
+
ApiLogDetails.prototype['status_code'] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The client's IP address that made the API request.
|
|
205
|
+
* @member {String} ip_address
|
|
206
|
+
*/
|
|
207
|
+
ApiLogDetails.prototype['ip_address'] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
211
|
+
* @member {Number} request_timestamp
|
|
212
|
+
*/
|
|
213
|
+
ApiLogDetails.prototype['request_timestamp'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The API key used to call the API. For more details, refer to [API key](/v2/guides/overview/cobo-auth#api-key).
|
|
217
|
+
* @member {String} api_key
|
|
218
|
+
*/
|
|
219
|
+
ApiLogDetails.prototype['api_key'] = undefined;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The response body of the API request.
|
|
223
|
+
* @member {String} response_body
|
|
224
|
+
*/
|
|
225
|
+
ApiLogDetails.prototype['response_body'] = undefined;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The query parameters of the API request.
|
|
229
|
+
* @member {String} query_params
|
|
230
|
+
*/
|
|
231
|
+
ApiLogDetails.prototype['query_params'] = undefined;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The request body of the API request.
|
|
235
|
+
* @member {String} request_body
|
|
236
|
+
*/
|
|
237
|
+
ApiLogDetails.prototype['request_body'] = undefined;
|
|
238
|
+
var _default = exports["default"] = ApiLogDetails;
|
|
@@ -0,0 +1,161 @@
|
|
|
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 ApiLogSummary model module.
|
|
29
|
+
* @module model/ApiLogSummary
|
|
30
|
+
*/
|
|
31
|
+
var ApiLogSummary = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>ApiLogSummary</code>.
|
|
34
|
+
* The information about an API log.
|
|
35
|
+
* @alias module:model/ApiLogSummary
|
|
36
|
+
* @param api_method {String} The HTTP method used for the API request.
|
|
37
|
+
* @param api_endpoint {String} The endpoint of the API request.
|
|
38
|
+
* @param request_timestamp {Number} The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
39
|
+
* @param status_code {Number} The HTTP status code returned by the API request.
|
|
40
|
+
*/
|
|
41
|
+
function ApiLogSummary(api_method, api_endpoint, request_timestamp, status_code) {
|
|
42
|
+
_classCallCheck(this, ApiLogSummary);
|
|
43
|
+
ApiLogSummary.initialize(this, api_method, api_endpoint, request_timestamp, status_code);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Initializes the fields of this object.
|
|
48
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
49
|
+
* Only for internal use.
|
|
50
|
+
*/
|
|
51
|
+
return _createClass(ApiLogSummary, null, [{
|
|
52
|
+
key: "initialize",
|
|
53
|
+
value: function initialize(obj, api_method, api_endpoint, request_timestamp, status_code) {
|
|
54
|
+
obj['api_method'] = api_method;
|
|
55
|
+
obj['api_endpoint'] = api_endpoint;
|
|
56
|
+
obj['request_timestamp'] = request_timestamp;
|
|
57
|
+
obj['status_code'] = status_code;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>ApiLogSummary</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/ApiLogSummary} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/ApiLogSummary} The populated <code>ApiLogSummary</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "constructFromObject",
|
|
69
|
+
value: function constructFromObject(data, obj) {
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new ApiLogSummary();
|
|
72
|
+
if (data.hasOwnProperty('log_id')) {
|
|
73
|
+
obj['log_id'] = _ApiClient["default"].convertToType(data['log_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('api_method')) {
|
|
76
|
+
obj['api_method'] = _ApiClient["default"].convertToType(data['api_method'], 'String');
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('api_endpoint')) {
|
|
79
|
+
obj['api_endpoint'] = _ApiClient["default"].convertToType(data['api_endpoint'], 'String');
|
|
80
|
+
}
|
|
81
|
+
if (data.hasOwnProperty('request_timestamp')) {
|
|
82
|
+
obj['request_timestamp'] = _ApiClient["default"].convertToType(data['request_timestamp'], 'Number');
|
|
83
|
+
}
|
|
84
|
+
if (data.hasOwnProperty('status_code')) {
|
|
85
|
+
obj['status_code'] = _ApiClient["default"].convertToType(data['status_code'], 'Number');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Validates the JSON data with respect to <code>ApiLogSummary</code>.
|
|
93
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
94
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ApiLogSummary</code>.
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "validateJSON",
|
|
98
|
+
value: function validateJSON(data) {
|
|
99
|
+
// check to make sure all required properties are present in the JSON string
|
|
100
|
+
var _iterator = _createForOfIteratorHelper(ApiLogSummary.RequiredProperties),
|
|
101
|
+
_step;
|
|
102
|
+
try {
|
|
103
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
104
|
+
var property = _step.value;
|
|
105
|
+
if (!data.hasOwnProperty(property)) {
|
|
106
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// ensure the json data is a string
|
|
110
|
+
} catch (err) {
|
|
111
|
+
_iterator.e(err);
|
|
112
|
+
} finally {
|
|
113
|
+
_iterator.f();
|
|
114
|
+
}
|
|
115
|
+
if (data['log_id'] && !(typeof data['log_id'] === 'string' || data['log_id'] instanceof String)) {
|
|
116
|
+
throw new Error("Expected the field `log_id` to be a primitive type in the JSON string but got " + data['log_id']);
|
|
117
|
+
}
|
|
118
|
+
// ensure the json data is a string
|
|
119
|
+
if (data['api_method'] && !(typeof data['api_method'] === 'string' || data['api_method'] instanceof String)) {
|
|
120
|
+
throw new Error("Expected the field `api_method` to be a primitive type in the JSON string but got " + data['api_method']);
|
|
121
|
+
}
|
|
122
|
+
// ensure the json data is a string
|
|
123
|
+
if (data['api_endpoint'] && !(typeof data['api_endpoint'] === 'string' || data['api_endpoint'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `api_endpoint` to be a primitive type in the JSON string but got " + data['api_endpoint']);
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
}]);
|
|
129
|
+
}();
|
|
130
|
+
ApiLogSummary.RequiredProperties = ["api_method", "api_endpoint", "request_timestamp", "status_code"];
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A unique identifier for the API log, used for tracking.
|
|
134
|
+
* @member {String} log_id
|
|
135
|
+
*/
|
|
136
|
+
ApiLogSummary.prototype['log_id'] = undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The HTTP method used for the API request.
|
|
140
|
+
* @member {String} api_method
|
|
141
|
+
*/
|
|
142
|
+
ApiLogSummary.prototype['api_method'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The endpoint of the API request.
|
|
146
|
+
* @member {String} api_endpoint
|
|
147
|
+
*/
|
|
148
|
+
ApiLogSummary.prototype['api_endpoint'] = undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The time when the API request was created, in Unix timestamp format, measured in milliseconds.
|
|
152
|
+
* @member {Number} request_timestamp
|
|
153
|
+
*/
|
|
154
|
+
ApiLogSummary.prototype['request_timestamp'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The HTTP status code returned by the API request.
|
|
158
|
+
* @member {Number} status_code
|
|
159
|
+
*/
|
|
160
|
+
ApiLogSummary.prototype['status_code'] = undefined;
|
|
161
|
+
var _default = exports["default"] = ApiLogSummary;
|
|
@@ -0,0 +1,118 @@
|
|
|
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 _FeeType = _interopRequireDefault(require("./FeeType"));
|
|
9
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
* Cobo Wallet as a Service 2.0
|
|
18
|
+
*
|
|
19
|
+
* Contact: help@cobo.com
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The BabylonStakeEstimatedFee model module.
|
|
28
|
+
* @module model/BabylonStakeEstimatedFee
|
|
29
|
+
*/
|
|
30
|
+
var BabylonStakeEstimatedFee = /*#__PURE__*/function () {
|
|
31
|
+
/**
|
|
32
|
+
* Constructs a new <code>BabylonStakeEstimatedFee</code>.
|
|
33
|
+
* @alias module:model/BabylonStakeEstimatedFee
|
|
34
|
+
*/
|
|
35
|
+
function BabylonStakeEstimatedFee() {
|
|
36
|
+
_classCallCheck(this, BabylonStakeEstimatedFee);
|
|
37
|
+
BabylonStakeEstimatedFee.initialize(this);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the fields of this object.
|
|
42
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
43
|
+
* Only for internal use.
|
|
44
|
+
*/
|
|
45
|
+
return _createClass(BabylonStakeEstimatedFee, null, [{
|
|
46
|
+
key: "initialize",
|
|
47
|
+
value: function initialize(obj) {}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Constructs a <code>BabylonStakeEstimatedFee</code> from a plain JavaScript object, optionally creating a new instance.
|
|
51
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
52
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
53
|
+
* @param {module:model/BabylonStakeEstimatedFee} obj Optional instance to populate.
|
|
54
|
+
* @return {module:model/BabylonStakeEstimatedFee} The populated <code>BabylonStakeEstimatedFee</code> instance.
|
|
55
|
+
*/
|
|
56
|
+
}, {
|
|
57
|
+
key: "constructFromObject",
|
|
58
|
+
value: function constructFromObject(data, obj) {
|
|
59
|
+
if (data) {
|
|
60
|
+
obj = obj || new BabylonStakeEstimatedFee();
|
|
61
|
+
if (data.hasOwnProperty('pool_type')) {
|
|
62
|
+
obj['pool_type'] = _StakingPoolType["default"].constructFromObject(data['pool_type']);
|
|
63
|
+
}
|
|
64
|
+
if (data.hasOwnProperty('fee_type')) {
|
|
65
|
+
obj['fee_type'] = _FeeType["default"].constructFromObject(data['fee_type']);
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('fee_amount')) {
|
|
68
|
+
obj['fee_amount'] = _ApiClient["default"].convertToType(data['fee_amount'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('token_id')) {
|
|
71
|
+
obj['token_id'] = _ApiClient["default"].convertToType(data['token_id'], 'String');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>BabylonStakeEstimatedFee</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>BabylonStakeEstimatedFee</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// ensure the json data is a string
|
|
86
|
+
if (data['fee_amount'] && !(typeof data['fee_amount'] === 'string' || data['fee_amount'] instanceof String)) {
|
|
87
|
+
throw new Error("Expected the field `fee_amount` to be a primitive type in the JSON string but got " + data['fee_amount']);
|
|
88
|
+
}
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
if (data['token_id'] && !(typeof data['token_id'] === 'string' || data['token_id'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `token_id` to be a primitive type in the JSON string but got " + data['token_id']);
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
}();
|
|
97
|
+
/**
|
|
98
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
99
|
+
*/
|
|
100
|
+
BabylonStakeEstimatedFee.prototype['pool_type'] = undefined;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @member {module:model/FeeType} fee_type
|
|
104
|
+
*/
|
|
105
|
+
BabylonStakeEstimatedFee.prototype['fee_type'] = undefined;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The amount of the estimated fee.
|
|
109
|
+
* @member {String} fee_amount
|
|
110
|
+
*/
|
|
111
|
+
BabylonStakeEstimatedFee.prototype['fee_amount'] = undefined;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The token ID of the staking fee.
|
|
115
|
+
* @member {String} token_id
|
|
116
|
+
*/
|
|
117
|
+
BabylonStakeEstimatedFee.prototype['token_id'] = undefined;
|
|
118
|
+
var _default = exports["default"] = BabylonStakeEstimatedFee;
|
|
@@ -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 CheckAddressChainsValidity200ResponseInner model module.
|
|
29
|
+
* @module model/CheckAddressChainsValidity200ResponseInner
|
|
30
|
+
*/
|
|
31
|
+
var CheckAddressChainsValidity200ResponseInner = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>CheckAddressChainsValidity200ResponseInner</code>.
|
|
34
|
+
* @alias module:model/CheckAddressChainsValidity200ResponseInner
|
|
35
|
+
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain.
|
|
36
|
+
* @param validity {Boolean} Whether the address is valid for the specified chain. - `true`: The address is valid. - `false`: The address is invalid.
|
|
37
|
+
*/
|
|
38
|
+
function CheckAddressChainsValidity200ResponseInner(chain_id, validity) {
|
|
39
|
+
_classCallCheck(this, CheckAddressChainsValidity200ResponseInner);
|
|
40
|
+
CheckAddressChainsValidity200ResponseInner.initialize(this, chain_id, validity);
|
|
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(CheckAddressChainsValidity200ResponseInner, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj, chain_id, validity) {
|
|
51
|
+
obj['chain_id'] = chain_id;
|
|
52
|
+
obj['validity'] = validity;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructs a <code>CheckAddressChainsValidity200ResponseInner</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/CheckAddressChainsValidity200ResponseInner} obj Optional instance to populate.
|
|
60
|
+
* @return {module:model/CheckAddressChainsValidity200ResponseInner} The populated <code>CheckAddressChainsValidity200ResponseInner</code> instance.
|
|
61
|
+
*/
|
|
62
|
+
}, {
|
|
63
|
+
key: "constructFromObject",
|
|
64
|
+
value: function constructFromObject(data, obj) {
|
|
65
|
+
if (data) {
|
|
66
|
+
obj = obj || new CheckAddressChainsValidity200ResponseInner();
|
|
67
|
+
if (data.hasOwnProperty('chain_id')) {
|
|
68
|
+
obj['chain_id'] = _ApiClient["default"].convertToType(data['chain_id'], 'String');
|
|
69
|
+
}
|
|
70
|
+
if (data.hasOwnProperty('validity')) {
|
|
71
|
+
obj['validity'] = _ApiClient["default"].convertToType(data['validity'], 'Boolean');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>CheckAddressChainsValidity200ResponseInner</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>CheckAddressChainsValidity200ResponseInner</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(CheckAddressChainsValidity200ResponseInner.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['chain_id'] && !(typeof data['chain_id'] === 'string' || data['chain_id'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `chain_id` to be a primitive type in the JSON string but got " + data['chain_id']);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
}();
|
|
108
|
+
CheckAddressChainsValidity200ResponseInner.RequiredProperties = ["chain_id", "validity"];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The chain ID, which is the unique identifier of a blockchain.
|
|
112
|
+
* @member {String} chain_id
|
|
113
|
+
*/
|
|
114
|
+
CheckAddressChainsValidity200ResponseInner.prototype['chain_id'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Whether the address is valid for the specified chain. - `true`: The address is valid. - `false`: The address is invalid.
|
|
118
|
+
* @member {Boolean} validity
|
|
119
|
+
*/
|
|
120
|
+
CheckAddressChainsValidity200ResponseInner.prototype['validity'] = undefined;
|
|
121
|
+
var _default = exports["default"] = CheckAddressChainsValidity200ResponseInner;
|