@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
|
@@ -89,7 +89,7 @@ var CheckLoopTransfers200ResponseInner = /*#__PURE__*/function () {
|
|
|
89
89
|
CheckLoopTransfers200ResponseInner.prototype['address'] = undefined;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Whether the transaction from the given source to the given destination address can be executed as a Loop transfer. - `true`: The transaction can be executed as a Loop transfer. - `false`: The transaction cannot be executed as a Loop transfer.
|
|
92
|
+
* Whether the transaction from the given source to the given destination address can be executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction can be executed as a Cobo Loop transfer. - `false`: The transaction cannot be executed as a Cobo Loop transfer.
|
|
93
93
|
* @member {Boolean} is_loop
|
|
94
94
|
*/
|
|
95
95
|
CheckLoopTransfers200ResponseInner.prototype['is_loop'] = undefined;
|
|
@@ -154,13 +154,13 @@ _defineProperty(CoboSafeDelegate, "fromJSON", function (json_string) {
|
|
|
154
154
|
CoboSafeDelegate.prototype['delegate_type'] = undefined;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
|
-
* The wallet ID of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
157
|
+
* The wallet ID of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
158
158
|
* @member {String} wallet_id
|
|
159
159
|
*/
|
|
160
160
|
CoboSafeDelegate.prototype['wallet_id'] = undefined;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* The wallet address of the Delegate. This is required when initiating a transfer from Smart Contract Wallets (Safe{Wallet}).
|
|
163
|
+
* The wallet address of the Delegate. This is required when initiating a transfer or contract call from Smart Contract Wallets (Safe{Wallet}).
|
|
164
164
|
* @member {String} address
|
|
165
165
|
*/
|
|
166
166
|
CoboSafeDelegate.prototype['address'] = undefined;
|
|
@@ -57,7 +57,7 @@ var CreateSmartContractWalletParams = /*#__PURE__*/function () {
|
|
|
57
57
|
var discriminatorValue = instance["smart_contract_wallet_type"];
|
|
58
58
|
if (discriminatorValue) {
|
|
59
59
|
switch (discriminatorValue) {
|
|
60
|
-
case "Safe":
|
|
60
|
+
case "Safe{Wallet}":
|
|
61
61
|
this.actualInstance = _CreateSafeWalletParams["default"].constructFromObject(instance);
|
|
62
62
|
match++;
|
|
63
63
|
break;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _BabylonStakeExtra = _interopRequireDefault(require("./BabylonStakeExtra"));
|
|
9
|
+
var _EthStakeExtra = _interopRequireDefault(require("./EthStakeExtra"));
|
|
9
10
|
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
10
11
|
var _CreateStakeActivityExtra;
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -33,7 +34,7 @@ var CreateStakeActivityExtra = /*#__PURE__*/function () {
|
|
|
33
34
|
/**
|
|
34
35
|
* Constructs a new <code>CreateStakeActivityExtra</code>.
|
|
35
36
|
* @alias module:model/CreateStakeActivityExtra
|
|
36
|
-
* @param {(module:model/BabylonStakeExtra)} instance The actual instance to initialize CreateStakeActivityExtra.
|
|
37
|
+
* @param {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} instance The actual instance to initialize CreateStakeActivityExtra.
|
|
37
38
|
*/
|
|
38
39
|
function CreateStakeActivityExtra() {
|
|
39
40
|
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -58,6 +59,10 @@ var CreateStakeActivityExtra = /*#__PURE__*/function () {
|
|
|
58
59
|
this.actualInstance = _BabylonStakeExtra["default"].constructFromObject(instance);
|
|
59
60
|
match++;
|
|
60
61
|
break;
|
|
62
|
+
case "ETHBeacon":
|
|
63
|
+
this.actualInstance = _EthStakeExtra["default"].constructFromObject(instance);
|
|
64
|
+
match++;
|
|
65
|
+
break;
|
|
61
66
|
default:
|
|
62
67
|
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
63
68
|
break;
|
|
@@ -87,13 +92,36 @@ var CreateStakeActivityExtra = /*#__PURE__*/function () {
|
|
|
87
92
|
// json data failed to deserialize into BabylonStakeExtra
|
|
88
93
|
errorMessages.push("Failed to construct BabylonStakeExtra: " + err);
|
|
89
94
|
}
|
|
95
|
+
try {
|
|
96
|
+
if (instance instanceof _EthStakeExtra["default"]) {
|
|
97
|
+
this.actualInstance = instance;
|
|
98
|
+
} else if (!!_EthStakeExtra["default"].validateJSON && _EthStakeExtra["default"].validateJSON(instance)) {
|
|
99
|
+
// plain JS object
|
|
100
|
+
// create EthStakeExtra from JS object
|
|
101
|
+
this.actualInstance = _EthStakeExtra["default"].constructFromObject(instance);
|
|
102
|
+
} else {
|
|
103
|
+
if (_EthStakeExtra["default"].constructFromObject(instance)) {
|
|
104
|
+
if (!!_EthStakeExtra["default"].constructFromObject(instance).toJSON) {
|
|
105
|
+
if (_EthStakeExtra["default"].constructFromObject(instance).toJSON()) {
|
|
106
|
+
this.actualInstance = _EthStakeExtra["default"].constructFromObject(instance);
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
this.actualInstance = _EthStakeExtra["default"].constructFromObject(instance);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
match++;
|
|
114
|
+
} catch (err) {
|
|
115
|
+
// json data failed to deserialize into EthStakeExtra
|
|
116
|
+
errorMessages.push("Failed to construct EthStakeExtra: " + err);
|
|
117
|
+
}
|
|
90
118
|
|
|
91
119
|
// if (match > 1) {
|
|
92
|
-
// throw new Error("Multiple matches found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra. Input: " + JSON.stringify(instance));
|
|
120
|
+
// throw new Error("Multiple matches found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, EthStakeExtra. Input: " + JSON.stringify(instance));
|
|
93
121
|
// } else
|
|
94
122
|
if (match === 0) {
|
|
95
123
|
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
96
|
-
// throw new Error("No match found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra. Details: " +
|
|
124
|
+
// throw new Error("No match found constructing `CreateStakeActivityExtra` with oneOf schemas BabylonStakeExtra, EthStakeExtra. Details: " +
|
|
97
125
|
// errorMessages.join(", "));
|
|
98
126
|
return;
|
|
99
127
|
} else {// only 1 match
|
|
@@ -112,16 +140,16 @@ var CreateStakeActivityExtra = /*#__PURE__*/function () {
|
|
|
112
140
|
key: "getActualInstance",
|
|
113
141
|
value:
|
|
114
142
|
/**
|
|
115
|
-
* Gets the actual instance, which can be <code>BabylonStakeExtra</code>.
|
|
116
|
-
* @return {(module:model/BabylonStakeExtra)} The actual instance.
|
|
143
|
+
* Gets the actual instance, which can be <code>BabylonStakeExtra</code>, <code>EthStakeExtra</code>.
|
|
144
|
+
* @return {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} The actual instance.
|
|
117
145
|
*/
|
|
118
146
|
function getActualInstance() {
|
|
119
147
|
return this.actualInstance;
|
|
120
148
|
}
|
|
121
149
|
|
|
122
150
|
/**
|
|
123
|
-
* Sets the actual instance, which can be <code>BabylonStakeExtra</code>.
|
|
124
|
-
* @param {(module:model/BabylonStakeExtra)} obj The actual instance.
|
|
151
|
+
* Sets the actual instance, which can be <code>BabylonStakeExtra</code>, <code>EthStakeExtra</code>.
|
|
152
|
+
* @param {(module:model/BabylonStakeExtra|module:model/EthStakeExtra)} obj The actual instance.
|
|
125
153
|
*/
|
|
126
154
|
}, {
|
|
127
155
|
key: "setActualInstance",
|
|
@@ -166,5 +194,11 @@ CreateStakeActivityExtra.prototype['stake_block_time'] = undefined;
|
|
|
166
194
|
* @member {Boolean} auto_broadcast
|
|
167
195
|
*/
|
|
168
196
|
CreateStakeActivityExtra.prototype['auto_broadcast'] = undefined;
|
|
169
|
-
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The name of the provider.
|
|
200
|
+
* @member {String} provider_name
|
|
201
|
+
*/
|
|
202
|
+
CreateStakeActivityExtra.prototype['provider_name'] = undefined;
|
|
203
|
+
CreateStakeActivityExtra.OneOf = ["BabylonStakeExtra", "EthStakeExtra"];
|
|
170
204
|
var _default = exports["default"] = CreateStakeActivityExtra;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
|
|
8
9
|
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
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); }
|
|
@@ -75,6 +76,9 @@ var CreateUnstakeActivity = /*#__PURE__*/function () {
|
|
|
75
76
|
if (data.hasOwnProperty('fee')) {
|
|
76
77
|
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
77
78
|
}
|
|
79
|
+
if (data.hasOwnProperty('extra')) {
|
|
80
|
+
obj['extra'] = _CreateUnstakeActivityExtra["default"].constructFromObject(data['extra']);
|
|
81
|
+
}
|
|
78
82
|
}
|
|
79
83
|
return obj;
|
|
80
84
|
}
|
|
@@ -121,6 +125,13 @@ var CreateUnstakeActivity = /*#__PURE__*/function () {
|
|
|
121
125
|
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
122
126
|
}
|
|
123
127
|
}
|
|
128
|
+
// validate the optional field `extra`
|
|
129
|
+
if (data['extra']) {
|
|
130
|
+
// data not null
|
|
131
|
+
if (!!_CreateUnstakeActivityExtra["default"].validateJSON) {
|
|
132
|
+
_CreateUnstakeActivityExtra["default"].validateJSON(data['extra']);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
124
135
|
return true;
|
|
125
136
|
}
|
|
126
137
|
}]);
|
|
@@ -149,4 +160,9 @@ CreateUnstakeActivity.prototype['amount'] = undefined;
|
|
|
149
160
|
* @member {module:model/TransactionRequestFee} fee
|
|
150
161
|
*/
|
|
151
162
|
CreateUnstakeActivity.prototype['fee'] = undefined;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
166
|
+
*/
|
|
167
|
+
CreateUnstakeActivity.prototype['extra'] = undefined;
|
|
152
168
|
var _default = exports["default"] = CreateUnstakeActivity;
|
|
@@ -0,0 +1,159 @@
|
|
|
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 _EthUnstakeExtra = _interopRequireDefault(require("./EthUnstakeExtra"));
|
|
9
|
+
var _StakingPoolType = _interopRequireDefault(require("./StakingPoolType"));
|
|
10
|
+
var _CreateUnstakeActivityExtra;
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
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 _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
+
* Cobo Wallet as a Service 2.0
|
|
20
|
+
*
|
|
21
|
+
* Contact: help@cobo.com
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The CreateUnstakeActivityExtra model module.
|
|
30
|
+
* @module model/CreateUnstakeActivityExtra
|
|
31
|
+
*/
|
|
32
|
+
var CreateUnstakeActivityExtra = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>CreateUnstakeActivityExtra</code>.
|
|
35
|
+
* Additional protocol-specific information required for the unstaking operation. The required fields vary depending on the staking protocol.
|
|
36
|
+
* @alias module:model/CreateUnstakeActivityExtra
|
|
37
|
+
* @param {(module:model/EthUnstakeExtra)} instance The actual instance to initialize CreateUnstakeActivityExtra.
|
|
38
|
+
*/
|
|
39
|
+
function CreateUnstakeActivityExtra() {
|
|
40
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
41
|
+
_classCallCheck(this, CreateUnstakeActivityExtra);
|
|
42
|
+
/**
|
|
43
|
+
* Returns the JSON representation of the actual instance.
|
|
44
|
+
* @return {string}
|
|
45
|
+
*/
|
|
46
|
+
_defineProperty(this, "toJSON", function () {
|
|
47
|
+
return this.getActualInstance();
|
|
48
|
+
});
|
|
49
|
+
if (instance === null) {
|
|
50
|
+
this.actualInstance = null;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var match = 0;
|
|
54
|
+
var errorMessages = [];
|
|
55
|
+
var discriminatorValue = instance["pool_type"];
|
|
56
|
+
if (discriminatorValue) {
|
|
57
|
+
switch (discriminatorValue) {
|
|
58
|
+
case "ETHBeacon":
|
|
59
|
+
this.actualInstance = _EthUnstakeExtra["default"].constructFromObject(instance);
|
|
60
|
+
match++;
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
errorMessages.push("Unrecognized discriminator value: " + discriminatorValue);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
if (instance instanceof _EthUnstakeExtra["default"]) {
|
|
70
|
+
this.actualInstance = instance;
|
|
71
|
+
} else if (!!_EthUnstakeExtra["default"].validateJSON && _EthUnstakeExtra["default"].validateJSON(instance)) {
|
|
72
|
+
// plain JS object
|
|
73
|
+
// create EthUnstakeExtra from JS object
|
|
74
|
+
this.actualInstance = _EthUnstakeExtra["default"].constructFromObject(instance);
|
|
75
|
+
} else {
|
|
76
|
+
if (_EthUnstakeExtra["default"].constructFromObject(instance)) {
|
|
77
|
+
if (!!_EthUnstakeExtra["default"].constructFromObject(instance).toJSON) {
|
|
78
|
+
if (_EthUnstakeExtra["default"].constructFromObject(instance).toJSON()) {
|
|
79
|
+
this.actualInstance = _EthUnstakeExtra["default"].constructFromObject(instance);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
this.actualInstance = _EthUnstakeExtra["default"].constructFromObject(instance);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
match++;
|
|
87
|
+
} catch (err) {
|
|
88
|
+
// json data failed to deserialize into EthUnstakeExtra
|
|
89
|
+
errorMessages.push("Failed to construct EthUnstakeExtra: " + err);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// if (match > 1) {
|
|
93
|
+
// throw new Error("Multiple matches found constructing `CreateUnstakeActivityExtra` with oneOf schemas EthUnstakeExtra. Input: " + JSON.stringify(instance));
|
|
94
|
+
// } else
|
|
95
|
+
if (match === 0) {
|
|
96
|
+
// this.actualInstance = null; // clear the actual instance in case there are multiple matches
|
|
97
|
+
// throw new Error("No match found constructing `CreateUnstakeActivityExtra` with oneOf schemas EthUnstakeExtra. Details: " +
|
|
98
|
+
// errorMessages.join(", "));
|
|
99
|
+
return;
|
|
100
|
+
} else {// only 1 match
|
|
101
|
+
// the input is valid
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Constructs a <code>CreateUnstakeActivityExtra</code> from a plain JavaScript object, optionally creating a new instance.
|
|
107
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
108
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
109
|
+
* @param {module:model/CreateUnstakeActivityExtra} obj Optional instance to populate.
|
|
110
|
+
* @return {module:model/CreateUnstakeActivityExtra} The populated <code>CreateUnstakeActivityExtra</code> instance.
|
|
111
|
+
*/
|
|
112
|
+
return _createClass(CreateUnstakeActivityExtra, [{
|
|
113
|
+
key: "getActualInstance",
|
|
114
|
+
value:
|
|
115
|
+
/**
|
|
116
|
+
* Gets the actual instance, which can be <code>EthUnstakeExtra</code>.
|
|
117
|
+
* @return {(module:model/EthUnstakeExtra)} The actual instance.
|
|
118
|
+
*/
|
|
119
|
+
function getActualInstance() {
|
|
120
|
+
return this.actualInstance;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets the actual instance, which can be <code>EthUnstakeExtra</code>.
|
|
125
|
+
* @param {(module:model/EthUnstakeExtra)} obj The actual instance.
|
|
126
|
+
*/
|
|
127
|
+
}, {
|
|
128
|
+
key: "setActualInstance",
|
|
129
|
+
value: function setActualInstance(obj) {
|
|
130
|
+
this.actualInstance = CreateUnstakeActivityExtra.constructFromObject(obj).getActualInstance();
|
|
131
|
+
}
|
|
132
|
+
}], [{
|
|
133
|
+
key: "constructFromObject",
|
|
134
|
+
value: function constructFromObject(data, obj) {
|
|
135
|
+
return new CreateUnstakeActivityExtra(data);
|
|
136
|
+
}
|
|
137
|
+
}]);
|
|
138
|
+
}();
|
|
139
|
+
/**
|
|
140
|
+
* @member {module:model/StakingPoolType} pool_type
|
|
141
|
+
*/
|
|
142
|
+
_CreateUnstakeActivityExtra = CreateUnstakeActivityExtra;
|
|
143
|
+
/**
|
|
144
|
+
* Create an instance of CreateUnstakeActivityExtra from a JSON string.
|
|
145
|
+
* @param {string} json_string JSON string.
|
|
146
|
+
* @return {module:model/CreateUnstakeActivityExtra} An instance of CreateUnstakeActivityExtra.
|
|
147
|
+
*/
|
|
148
|
+
_defineProperty(CreateUnstakeActivityExtra, "fromJSON", function (json_string) {
|
|
149
|
+
return _CreateUnstakeActivityExtra.constructFromObject(JSON.parse(json_string));
|
|
150
|
+
});
|
|
151
|
+
CreateUnstakeActivityExtra.prototype['pool_type'] = undefined;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* A list of public keys identifying the validators to unstake from the Ethereum Beacon Chain.
|
|
155
|
+
* @member {Array.<String>} validator_pubkeys
|
|
156
|
+
*/
|
|
157
|
+
CreateUnstakeActivityExtra.prototype['validator_pubkeys'] = undefined;
|
|
158
|
+
CreateUnstakeActivityExtra.OneOf = ["EthUnstakeExtra"];
|
|
159
|
+
var _default = exports["default"] = CreateUnstakeActivityExtra;
|
|
@@ -7,6 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
var _ActivityInitiator = _interopRequireDefault(require("./ActivityInitiator"));
|
|
9
9
|
var _CreateUnstakeActivity = _interopRequireDefault(require("./CreateUnstakeActivity"));
|
|
10
|
+
var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
|
|
10
11
|
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
13
|
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); }
|
|
@@ -83,6 +84,9 @@ var CreateUnstakeActivityRequest = /*#__PURE__*/function () {
|
|
|
83
84
|
if (data.hasOwnProperty('fee')) {
|
|
84
85
|
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
85
86
|
}
|
|
87
|
+
if (data.hasOwnProperty('extra')) {
|
|
88
|
+
obj['extra'] = _CreateUnstakeActivityExtra["default"].constructFromObject(data['extra']);
|
|
89
|
+
}
|
|
86
90
|
if (data.hasOwnProperty('app_initiator')) {
|
|
87
91
|
obj['app_initiator'] = _ApiClient["default"].convertToType(data['app_initiator'], 'String');
|
|
88
92
|
}
|
|
@@ -132,6 +136,13 @@ var CreateUnstakeActivityRequest = /*#__PURE__*/function () {
|
|
|
132
136
|
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
133
137
|
}
|
|
134
138
|
}
|
|
139
|
+
// validate the optional field `extra`
|
|
140
|
+
if (data['extra']) {
|
|
141
|
+
// data not null
|
|
142
|
+
if (!!_CreateUnstakeActivityExtra["default"].validateJSON) {
|
|
143
|
+
_CreateUnstakeActivityExtra["default"].validateJSON(data['extra']);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
135
146
|
// ensure the json data is a string
|
|
136
147
|
if (data['app_initiator'] && !(typeof data['app_initiator'] === 'string' || data['app_initiator'] instanceof String)) {
|
|
137
148
|
throw new Error("Expected the field `app_initiator` to be a primitive type in the JSON string but got " + data['app_initiator']);
|
|
@@ -165,6 +176,11 @@ CreateUnstakeActivityRequest.prototype['amount'] = undefined;
|
|
|
165
176
|
*/
|
|
166
177
|
CreateUnstakeActivityRequest.prototype['fee'] = undefined;
|
|
167
178
|
|
|
179
|
+
/**
|
|
180
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
181
|
+
*/
|
|
182
|
+
CreateUnstakeActivityRequest.prototype['extra'] = undefined;
|
|
183
|
+
|
|
168
184
|
/**
|
|
169
185
|
* The initiator of the staking activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
|
|
170
186
|
* @member {String} app_initiator
|
|
@@ -191,6 +207,10 @@ _CreateUnstakeActivity["default"].prototype['amount'] = undefined;
|
|
|
191
207
|
* @member {module:model/TransactionRequestFee} fee
|
|
192
208
|
*/
|
|
193
209
|
_CreateUnstakeActivity["default"].prototype['fee'] = undefined;
|
|
210
|
+
/**
|
|
211
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
212
|
+
*/
|
|
213
|
+
_CreateUnstakeActivity["default"].prototype['extra'] = undefined;
|
|
194
214
|
// Implement ActivityInitiator interface:
|
|
195
215
|
/**
|
|
196
216
|
* The initiator of the staking activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.
|
|
@@ -33,7 +33,7 @@ var ErrorResponse = /*#__PURE__*/function () {
|
|
|
33
33
|
* Constructs a new <code>ErrorResponse</code>.
|
|
34
34
|
* The response of a failed request.
|
|
35
35
|
* @alias module:model/ErrorResponse
|
|
36
|
-
* @param error_code {Number} The error code.
|
|
36
|
+
* @param error_code {Number} The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
|
|
37
37
|
* @param error_message {String} The error description.
|
|
38
38
|
* @param error_id {String} The error log ID. You can provide the error ID when submitting a ticket to help Cobo to locate the issue.
|
|
39
39
|
*/
|
|
@@ -118,7 +118,7 @@ var ErrorResponse = /*#__PURE__*/function () {
|
|
|
118
118
|
ErrorResponse.RequiredProperties = ["error_code", "error_message", "error_id"];
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* The error code.
|
|
121
|
+
* The error code. Refer to [Error codes and status codes](/v2/api-references/error-codes) for more details.
|
|
122
122
|
* @member {Number} error_code
|
|
123
123
|
*/
|
|
124
124
|
ErrorResponse.prototype['error_code'] = undefined;
|
|
@@ -37,15 +37,14 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
|
|
|
37
37
|
* Constructs a new <code>EstimateContractCallFeeParams</code>.
|
|
38
38
|
* The information about a transaction that interacts with a smart contract
|
|
39
39
|
* @alias module:model/EstimateContractCallFeeParams
|
|
40
|
-
* @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
41
40
|
* @param request_type {module:model/EstimateFeeRequestType}
|
|
42
41
|
* @param chain_id {String} The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](/v2/api-references/wallets/list-enabled-chains).
|
|
43
42
|
* @param source {module:model/ContractCallSource}
|
|
44
43
|
* @param destination {module:model/ContractCallDestination}
|
|
45
44
|
*/
|
|
46
|
-
function EstimateContractCallFeeParams(
|
|
45
|
+
function EstimateContractCallFeeParams(request_type, chain_id, source, destination) {
|
|
47
46
|
_classCallCheck(this, EstimateContractCallFeeParams);
|
|
48
|
-
EstimateContractCallFeeParams.initialize(this,
|
|
47
|
+
EstimateContractCallFeeParams.initialize(this, request_type, chain_id, source, destination);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
/**
|
|
@@ -55,8 +54,7 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
|
|
|
55
54
|
*/
|
|
56
55
|
return _createClass(EstimateContractCallFeeParams, null, [{
|
|
57
56
|
key: "initialize",
|
|
58
|
-
value: function initialize(obj,
|
|
59
|
-
obj['request_id'] = request_id;
|
|
57
|
+
value: function initialize(obj, request_type, chain_id, source, destination) {
|
|
60
58
|
obj['request_type'] = request_type;
|
|
61
59
|
obj['chain_id'] = chain_id;
|
|
62
60
|
obj['source'] = source;
|
|
@@ -146,10 +144,10 @@ var EstimateContractCallFeeParams = /*#__PURE__*/function () {
|
|
|
146
144
|
}
|
|
147
145
|
}]);
|
|
148
146
|
}();
|
|
149
|
-
EstimateContractCallFeeParams.RequiredProperties = ["
|
|
147
|
+
EstimateContractCallFeeParams.RequiredProperties = ["request_type", "chain_id", "source", "destination"];
|
|
150
148
|
|
|
151
149
|
/**
|
|
152
|
-
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
150
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
|
|
153
151
|
* @member {String} request_id
|
|
154
152
|
*/
|
|
155
153
|
EstimateContractCallFeeParams.prototype['request_id'] = undefined;
|
|
@@ -167,7 +167,7 @@ var EstimateFeeParams = /*#__PURE__*/function () {
|
|
|
167
167
|
}]);
|
|
168
168
|
}();
|
|
169
169
|
/**
|
|
170
|
-
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
170
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
|
|
171
171
|
* @member {String} request_id
|
|
172
172
|
*/
|
|
173
173
|
_EstimateFeeParams = EstimateFeeParams;
|
|
@@ -37,15 +37,13 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
|
|
|
37
37
|
* Constructs a new <code>EstimateTransferFeeParams</code>.
|
|
38
38
|
* The information about a token transfer.
|
|
39
39
|
* @alias module:model/EstimateTransferFeeParams
|
|
40
|
-
* @param request_id {String} The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
41
40
|
* @param request_type {module:model/EstimateFeeRequestType}
|
|
42
41
|
* @param source {module:model/TransferSource}
|
|
43
42
|
* @param token_id {String} The token ID of the transferred 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).
|
|
44
|
-
* @param destination {module:model/TransferDestination}
|
|
45
43
|
*/
|
|
46
|
-
function EstimateTransferFeeParams(
|
|
44
|
+
function EstimateTransferFeeParams(request_type, source, token_id) {
|
|
47
45
|
_classCallCheck(this, EstimateTransferFeeParams);
|
|
48
|
-
EstimateTransferFeeParams.initialize(this,
|
|
46
|
+
EstimateTransferFeeParams.initialize(this, request_type, source, token_id);
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
/**
|
|
@@ -55,12 +53,10 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
|
|
|
55
53
|
*/
|
|
56
54
|
return _createClass(EstimateTransferFeeParams, null, [{
|
|
57
55
|
key: "initialize",
|
|
58
|
-
value: function initialize(obj,
|
|
59
|
-
obj['request_id'] = request_id;
|
|
56
|
+
value: function initialize(obj, request_type, source, token_id) {
|
|
60
57
|
obj['request_type'] = request_type;
|
|
61
58
|
obj['source'] = source;
|
|
62
59
|
obj['token_id'] = token_id;
|
|
63
|
-
obj['destination'] = destination;
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
/**
|
|
@@ -146,10 +142,10 @@ var EstimateTransferFeeParams = /*#__PURE__*/function () {
|
|
|
146
142
|
}
|
|
147
143
|
}]);
|
|
148
144
|
}();
|
|
149
|
-
EstimateTransferFeeParams.RequiredProperties = ["
|
|
145
|
+
EstimateTransferFeeParams.RequiredProperties = ["request_type", "source", "token_id"];
|
|
150
146
|
|
|
151
147
|
/**
|
|
152
|
-
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.
|
|
148
|
+
* The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. It is recommended to use the same request ID as the transaction for which you want to estimate the transaction fee.
|
|
153
149
|
* @member {String} request_id
|
|
154
150
|
*/
|
|
155
151
|
EstimateTransferFeeParams.prototype['request_id'] = undefined;
|
|
@@ -8,6 +8,7 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
|
8
8
|
var _ActivityType = _interopRequireDefault(require("./ActivityType"));
|
|
9
9
|
var _BaseEstimateStakingFee = _interopRequireDefault(require("./BaseEstimateStakingFee"));
|
|
10
10
|
var _CreateUnstakeActivity = _interopRequireDefault(require("./CreateUnstakeActivity"));
|
|
11
|
+
var _CreateUnstakeActivityExtra = _interopRequireDefault(require("./CreateUnstakeActivityExtra"));
|
|
11
12
|
var _TransactionRequestFee = _interopRequireDefault(require("./TransactionRequestFee"));
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
14
|
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); }
|
|
@@ -89,6 +90,9 @@ var EstimateUnstakeFee = /*#__PURE__*/function () {
|
|
|
89
90
|
if (data.hasOwnProperty('fee')) {
|
|
90
91
|
obj['fee'] = _TransactionRequestFee["default"].constructFromObject(data['fee']);
|
|
91
92
|
}
|
|
93
|
+
if (data.hasOwnProperty('extra')) {
|
|
94
|
+
obj['extra'] = _CreateUnstakeActivityExtra["default"].constructFromObject(data['extra']);
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
return obj;
|
|
94
98
|
}
|
|
@@ -135,6 +139,13 @@ var EstimateUnstakeFee = /*#__PURE__*/function () {
|
|
|
135
139
|
_TransactionRequestFee["default"].validateJSON(data['fee']);
|
|
136
140
|
}
|
|
137
141
|
}
|
|
142
|
+
// validate the optional field `extra`
|
|
143
|
+
if (data['extra']) {
|
|
144
|
+
// data not null
|
|
145
|
+
if (!!_CreateUnstakeActivityExtra["default"].validateJSON) {
|
|
146
|
+
_CreateUnstakeActivityExtra["default"].validateJSON(data['extra']);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
138
149
|
return true;
|
|
139
150
|
}
|
|
140
151
|
}]);
|
|
@@ -169,6 +180,11 @@ EstimateUnstakeFee.prototype['amount'] = undefined;
|
|
|
169
180
|
*/
|
|
170
181
|
EstimateUnstakeFee.prototype['fee'] = undefined;
|
|
171
182
|
|
|
183
|
+
/**
|
|
184
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
185
|
+
*/
|
|
186
|
+
EstimateUnstakeFee.prototype['extra'] = undefined;
|
|
187
|
+
|
|
172
188
|
// Implement BaseEstimateStakingFee interface:
|
|
173
189
|
/**
|
|
174
190
|
* @member {module:model/ActivityType} activity_type
|
|
@@ -194,4 +210,8 @@ _CreateUnstakeActivity["default"].prototype['amount'] = undefined;
|
|
|
194
210
|
* @member {module:model/TransactionRequestFee} fee
|
|
195
211
|
*/
|
|
196
212
|
_CreateUnstakeActivity["default"].prototype['fee'] = undefined;
|
|
213
|
+
/**
|
|
214
|
+
* @member {module:model/CreateUnstakeActivityExtra} extra
|
|
215
|
+
*/
|
|
216
|
+
_CreateUnstakeActivity["default"].prototype['extra'] = undefined;
|
|
197
217
|
var _default = exports["default"] = EstimateUnstakeFee;
|
|
@@ -57,7 +57,7 @@ var EstimatedEvmEip1559FeeSlow = /*#__PURE__*/function () {
|
|
|
57
57
|
value: function initialize(obj, max_fee_per_gas, max_priority_fee_per_gas, gas_limit) {
|
|
58
58
|
obj['max_fee_per_gas'] = max_fee_per_gas;
|
|
59
59
|
obj['max_priority_fee_per_gas'] = max_priority_fee_per_gas;
|
|
60
|
-
obj['gas_limit'] = gas_limit
|
|
60
|
+
obj['gas_limit'] = gas_limit;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -143,9 +143,8 @@ EstimatedEvmEip1559FeeSlow.prototype['max_priority_fee_per_gas'] = undefined;
|
|
|
143
143
|
/**
|
|
144
144
|
* The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
|
|
145
145
|
* @member {String} gas_limit
|
|
146
|
-
* @default '21000'
|
|
147
146
|
*/
|
|
148
|
-
EstimatedEvmEip1559FeeSlow.prototype['gas_limit'] =
|
|
147
|
+
EstimatedEvmEip1559FeeSlow.prototype['gas_limit'] = undefined;
|
|
149
148
|
|
|
150
149
|
// Implement EvmEip1559FeeBasePrice interface:
|
|
151
150
|
/**
|
|
@@ -162,7 +161,6 @@ _EvmEip1559FeeBasePrice["default"].prototype['max_priority_fee_per_gas'] = undef
|
|
|
162
161
|
/**
|
|
163
162
|
* The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
|
|
164
163
|
* @member {String} gas_limit
|
|
165
|
-
* @default '21000'
|
|
166
164
|
*/
|
|
167
|
-
_FeeGasLimit["default"].prototype['gas_limit'] =
|
|
165
|
+
_FeeGasLimit["default"].prototype['gas_limit'] = undefined;
|
|
168
166
|
var _default = exports["default"] = EstimatedEvmEip1559FeeSlow;
|
|
@@ -55,7 +55,7 @@ var EstimatedEvmLegacyFeeSlow = /*#__PURE__*/function () {
|
|
|
55
55
|
key: "initialize",
|
|
56
56
|
value: function initialize(obj, gas_price, gas_limit) {
|
|
57
57
|
obj['gas_price'] = gas_price;
|
|
58
|
-
obj['gas_limit'] = gas_limit
|
|
58
|
+
obj['gas_limit'] = gas_limit;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -128,9 +128,8 @@ EstimatedEvmLegacyFeeSlow.prototype['gas_price'] = undefined;
|
|
|
128
128
|
/**
|
|
129
129
|
* The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
|
|
130
130
|
* @member {String} gas_limit
|
|
131
|
-
* @default '21000'
|
|
132
131
|
*/
|
|
133
|
-
EstimatedEvmLegacyFeeSlow.prototype['gas_limit'] =
|
|
132
|
+
EstimatedEvmLegacyFeeSlow.prototype['gas_limit'] = undefined;
|
|
134
133
|
|
|
135
134
|
// Implement EvmLegacyFeeBasePrice interface:
|
|
136
135
|
/**
|
|
@@ -142,7 +141,6 @@ _EvmLegacyFeeBasePrice["default"].prototype['gas_price'] = undefined;
|
|
|
142
141
|
/**
|
|
143
142
|
* The gas limit. It represents the maximum number of gas units that you are willing to pay for the execution of a transaction or Ethereum Virtual Machine (EVM) operation. The gas unit cost of each operation varies.
|
|
144
143
|
* @member {String} gas_limit
|
|
145
|
-
* @default '21000'
|
|
146
144
|
*/
|
|
147
|
-
_FeeGasLimit["default"].prototype['gas_limit'] =
|
|
145
|
+
_FeeGasLimit["default"].prototype['gas_limit'] = undefined;
|
|
148
146
|
var _default = exports["default"] = EstimatedEvmLegacyFeeSlow;
|
|
@@ -241,7 +241,7 @@ EstimatedFee.prototype['fee_type'] = undefined;
|
|
|
241
241
|
EstimatedFee.prototype['token_id'] = undefined;
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
|
-
* Whether the transaction
|
|
244
|
+
* Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
|
|
245
245
|
* @member {Boolean} is_loop
|
|
246
246
|
*/
|
|
247
247
|
EstimatedFee.prototype['is_loop'] = undefined;
|
|
@@ -143,7 +143,7 @@ EstimatedFixedFee.prototype['fee_type'] = undefined;
|
|
|
143
143
|
EstimatedFixedFee.prototype['token_id'] = undefined;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Whether the transaction
|
|
146
|
+
* Whether the transaction was executed as a [Cobo Loop](https://manuals.cobo.com/en/portal/custodial-wallets/cobo-loop) transfer. - `true`: The transaction was executed as a Cobo Loop transfer. - `false`: The transaction was not executed as a Cobo Loop transfer.
|
|
147
147
|
* @member {Boolean} is_loop
|
|
148
148
|
*/
|
|
149
149
|
EstimatedFixedFee.prototype['is_loop'] = undefined;
|