@northstake/northstakeapi 1.0.39 → 1.0.41
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/.openapi-generator/FILES +5 -2
- package/api/lidoReadApi.ts +92 -3
- package/api/lidoStakingVaultsApi.ts +81 -0
- package/api/lidoWriteApi.ts +676 -9
- package/api/validatorsApi.ts +0 -114
- package/api.ts +5 -2
- package/dist/api/lidoReadApi.d.ts +17 -3
- package/dist/api/lidoReadApi.js +72 -3
- package/dist/api/lidoStakingVaultsApi.d.ts +13 -0
- package/dist/api/lidoStakingVaultsApi.js +61 -0
- package/dist/api/lidoWriteApi.d.ts +131 -8
- package/dist/api/lidoWriteApi.js +539 -8
- package/dist/api/validatorsApi.d.ts +0 -27
- package/dist/api/validatorsApi.js +0 -85
- package/dist/api.d.ts +5 -2
- package/dist/api.js +5 -2
- package/dist/model/abandonDashboardRequest.d.ts +32 -0
- package/dist/model/abandonDashboardRequest.js +33 -0
- package/dist/model/{getWithdrawalsResponse.d.ts → changeTier.d.ts} +7 -9
- package/dist/model/{getWithdrawalsResponse.js → changeTier.js} +15 -20
- package/dist/model/{validatorWithdrawal.d.ts → getOperatorGroup200Response.d.ts} +15 -23
- package/dist/model/getOperatorGroup200Response.js +43 -0
- package/dist/model/getStETHPerWstETHRate200Response.d.ts +2 -2
- package/dist/model/getStETHPerWstETHRate200Response.js +1 -1
- package/dist/model/lidoContractsStakingVault.d.ts +8 -0
- package/dist/model/lidoContractsStakingVault.js +10 -0
- package/dist/model/lidoStakingContractsWithDataVaultData.d.ts +16 -2
- package/dist/model/lidoStakingContractsWithDataVaultData.js +13 -3
- package/dist/model/models.d.ts +5 -2
- package/dist/model/models.js +16 -8
- package/dist/model/supportedValidatorProvidersResponse.d.ts +29 -0
- package/dist/model/supportedValidatorProvidersResponse.js +31 -0
- package/dist/model/updateShareLimit.d.ts +32 -0
- package/dist/model/updateShareLimit.js +33 -0
- package/dist/model/validatorProvider.d.ts +1 -1
- package/model/abandonDashboardRequest.ts +43 -0
- package/model/{getWithdrawalsResponse.ts → changeTier.ts} +17 -24
- package/model/getOperatorGroup200Response.ts +61 -0
- package/model/getStETHPerWstETHRate200Response.ts +3 -3
- package/model/lidoContractsStakingVault.ts +18 -0
- package/model/lidoStakingContractsWithDataVaultData.ts +32 -5
- package/model/models.ts +26 -12
- package/model/supportedValidatorProvidersResponse.ts +35 -0
- package/model/updateShareLimit.ts +43 -0
- package/model/validatorProvider.ts +2 -1
- package/package.json +2 -2
- package/dist/model/validatorWithdrawal.js +0 -78
- package/model/validatorWithdrawal.ts +0 -107
package/dist/api/lidoWriteApi.js
CHANGED
|
@@ -75,8 +75,157 @@ class LidoWriteApi {
|
|
|
75
75
|
addInterceptor(interceptor) {
|
|
76
76
|
this.interceptors.push(interceptor);
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Returns a partial transaction to call Dashboard.abandonDashboard(newOwner). Only allowed when the vault is fully disconnected from the vault hub (after disconnect has completed). Step 3 of the stVault disconnect guide (with Dashboard).
|
|
80
|
+
* @summary Abandon dashboard and transfer vault ownership (disconnect Step 3)
|
|
81
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
82
|
+
* @param abandonDashboardRequest
|
|
83
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from.
|
|
84
|
+
*/
|
|
85
|
+
async abandonDashboard(contractsId, abandonDashboardRequest, simulateAddress, options = { headers: {} }) {
|
|
86
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/abandon-dashboard'
|
|
87
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
88
|
+
let localVarQueryParameters = {};
|
|
89
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
90
|
+
const produces = ['application/json'];
|
|
91
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
92
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
96
|
+
}
|
|
97
|
+
let localVarFormParams = {};
|
|
98
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
99
|
+
if (contractsId === null || contractsId === undefined) {
|
|
100
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling abandonDashboard.');
|
|
101
|
+
}
|
|
102
|
+
// Verify required parameter 'abandonDashboardRequest' is not null or undefined
|
|
103
|
+
if (abandonDashboardRequest === null || abandonDashboardRequest === undefined) {
|
|
104
|
+
throw new Error('Required parameter "abandonDashboardRequest" was null or undefined when calling abandonDashboard.');
|
|
105
|
+
}
|
|
106
|
+
if (simulateAddress !== undefined) {
|
|
107
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
108
|
+
}
|
|
109
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
110
|
+
let localVarUseFormData = false;
|
|
111
|
+
let localVarRequestOptions = {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
qs: localVarQueryParameters,
|
|
114
|
+
headers: localVarHeaderParams,
|
|
115
|
+
uri: localVarPath,
|
|
116
|
+
useQuerystring: this._useQuerystring,
|
|
117
|
+
json: true,
|
|
118
|
+
body: models_1.ObjectSerializer.serialize(abandonDashboardRequest, "AbandonDashboardRequest")
|
|
119
|
+
};
|
|
120
|
+
let authenticationPromise = Promise.resolve();
|
|
121
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
122
|
+
let interceptorPromise = authenticationPromise;
|
|
123
|
+
for (const interceptor of this.interceptors) {
|
|
124
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
125
|
+
}
|
|
126
|
+
return interceptorPromise.then(() => {
|
|
127
|
+
if (Object.keys(localVarFormParams).length) {
|
|
128
|
+
if (localVarUseFormData) {
|
|
129
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return new Promise((resolve, reject) => {
|
|
136
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
137
|
+
if (error) {
|
|
138
|
+
console.error('API call error:', error);
|
|
139
|
+
reject(error);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
143
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
144
|
+
resolve({ body: body, status: response.statusCode });
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
console.error('API response error:', response.statusCode);
|
|
148
|
+
resolve({ body: body, status: response.statusCode });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns a partial transaction to call StakingVault.acceptOwnership(). Only allowed when the vault is fully disconnected from the vault hub. Step 4 of the stVault disconnect guide (with Dashboard), or Step 3 without Dashboard.
|
|
157
|
+
* @summary Accept staking vault ownership (disconnect Step 4)
|
|
158
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
159
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from.
|
|
160
|
+
*/
|
|
161
|
+
async acceptStakingVaultOwnership(contractsId, simulateAddress, options = { headers: {} }) {
|
|
162
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/accept-staking-vault-ownership'
|
|
163
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
164
|
+
let localVarQueryParameters = {};
|
|
165
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
166
|
+
const produces = ['application/json'];
|
|
167
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
168
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
172
|
+
}
|
|
173
|
+
let localVarFormParams = {};
|
|
174
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
175
|
+
if (contractsId === null || contractsId === undefined) {
|
|
176
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling acceptStakingVaultOwnership.');
|
|
177
|
+
}
|
|
178
|
+
if (simulateAddress !== undefined) {
|
|
179
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
180
|
+
}
|
|
181
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
182
|
+
let localVarUseFormData = false;
|
|
183
|
+
let localVarRequestOptions = {
|
|
184
|
+
method: 'POST',
|
|
185
|
+
qs: localVarQueryParameters,
|
|
186
|
+
headers: localVarHeaderParams,
|
|
187
|
+
uri: localVarPath,
|
|
188
|
+
useQuerystring: this._useQuerystring,
|
|
189
|
+
json: true,
|
|
190
|
+
};
|
|
191
|
+
let authenticationPromise = Promise.resolve();
|
|
192
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
193
|
+
let interceptorPromise = authenticationPromise;
|
|
194
|
+
for (const interceptor of this.interceptors) {
|
|
195
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
196
|
+
}
|
|
197
|
+
return interceptorPromise.then(() => {
|
|
198
|
+
if (Object.keys(localVarFormParams).length) {
|
|
199
|
+
if (localVarUseFormData) {
|
|
200
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return new Promise((resolve, reject) => {
|
|
207
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
208
|
+
if (error) {
|
|
209
|
+
console.error('API call error:', error);
|
|
210
|
+
reject(error);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
214
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
215
|
+
resolve({ body: body, status: response.statusCode });
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
console.error('API response error:', response.statusCode);
|
|
219
|
+
resolve({ body: body, status: response.statusCode });
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
}
|
|
78
226
|
/**
|
|
79
227
|
*
|
|
228
|
+
* @summary Encode approval to burn stETH
|
|
80
229
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
81
230
|
* @param approveStETH
|
|
82
231
|
*/
|
|
@@ -149,6 +298,7 @@ class LidoWriteApi {
|
|
|
149
298
|
}
|
|
150
299
|
/**
|
|
151
300
|
*
|
|
301
|
+
* @summary Encode approval to burn wstETH
|
|
152
302
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
153
303
|
* @param approveWstETH
|
|
154
304
|
*/
|
|
@@ -221,6 +371,7 @@ class LidoWriteApi {
|
|
|
221
371
|
}
|
|
222
372
|
/**
|
|
223
373
|
*
|
|
374
|
+
* @summary Approve wrapping stETH to wstETH
|
|
224
375
|
* @param approveStETH
|
|
225
376
|
*/
|
|
226
377
|
async approveWrapStETH(approveStETH, options = { headers: {} }) {
|
|
@@ -287,6 +438,7 @@ class LidoWriteApi {
|
|
|
287
438
|
}
|
|
288
439
|
/**
|
|
289
440
|
*
|
|
441
|
+
* @summary Encode burn shares transaction
|
|
290
442
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
291
443
|
* @param burnShares
|
|
292
444
|
*/
|
|
@@ -359,6 +511,7 @@ class LidoWriteApi {
|
|
|
359
511
|
}
|
|
360
512
|
/**
|
|
361
513
|
*
|
|
514
|
+
* @summary Encode burn stETH transaction
|
|
362
515
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
363
516
|
* @param burnStETH
|
|
364
517
|
*/
|
|
@@ -431,6 +584,7 @@ class LidoWriteApi {
|
|
|
431
584
|
}
|
|
432
585
|
/**
|
|
433
586
|
*
|
|
587
|
+
* @summary Encode burn wstETH transaction
|
|
434
588
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
435
589
|
* @param burnWstETH
|
|
436
590
|
*/
|
|
@@ -503,6 +657,80 @@ class LidoWriteApi {
|
|
|
503
657
|
}
|
|
504
658
|
/**
|
|
505
659
|
*
|
|
660
|
+
* @summary Encode change tier transaction
|
|
661
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
662
|
+
* @param changeTier
|
|
663
|
+
*/
|
|
664
|
+
async changeTier(contractsId, changeTier, options = { headers: {} }) {
|
|
665
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/change-tier'
|
|
666
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
667
|
+
let localVarQueryParameters = {};
|
|
668
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
669
|
+
const produces = ['application/json'];
|
|
670
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
671
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
675
|
+
}
|
|
676
|
+
let localVarFormParams = {};
|
|
677
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
678
|
+
if (contractsId === null || contractsId === undefined) {
|
|
679
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling changeTier.');
|
|
680
|
+
}
|
|
681
|
+
// Verify required parameter 'changeTier' is not null or undefined
|
|
682
|
+
if (changeTier === null || changeTier === undefined) {
|
|
683
|
+
throw new Error('Required parameter "changeTier" was null or undefined when calling changeTier.');
|
|
684
|
+
}
|
|
685
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
686
|
+
let localVarUseFormData = false;
|
|
687
|
+
let localVarRequestOptions = {
|
|
688
|
+
method: 'POST',
|
|
689
|
+
qs: localVarQueryParameters,
|
|
690
|
+
headers: localVarHeaderParams,
|
|
691
|
+
uri: localVarPath,
|
|
692
|
+
useQuerystring: this._useQuerystring,
|
|
693
|
+
json: true,
|
|
694
|
+
body: models_1.ObjectSerializer.serialize(changeTier, "ChangeTier")
|
|
695
|
+
};
|
|
696
|
+
let authenticationPromise = Promise.resolve();
|
|
697
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
698
|
+
let interceptorPromise = authenticationPromise;
|
|
699
|
+
for (const interceptor of this.interceptors) {
|
|
700
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
701
|
+
}
|
|
702
|
+
return interceptorPromise.then(() => {
|
|
703
|
+
if (Object.keys(localVarFormParams).length) {
|
|
704
|
+
if (localVarUseFormData) {
|
|
705
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
return new Promise((resolve, reject) => {
|
|
712
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
713
|
+
if (error) {
|
|
714
|
+
console.error('API call error:', error);
|
|
715
|
+
reject(error);
|
|
716
|
+
}
|
|
717
|
+
else {
|
|
718
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
719
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
720
|
+
resolve({ body: body, status: response.statusCode });
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
console.error('API response error:', response.statusCode);
|
|
724
|
+
resolve({ body: body, status: response.statusCode });
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
*
|
|
733
|
+
* @summary Collect ERC20 from vault
|
|
506
734
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
507
735
|
* @param collectERC20FromVault
|
|
508
736
|
*/
|
|
@@ -573,6 +801,77 @@ class LidoWriteApi {
|
|
|
573
801
|
});
|
|
574
802
|
});
|
|
575
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Returns a partial transaction to connect the vault to the vault hub (payable with 1 ETH). Only allowed when the vault is not already connected; returns 400 if already connected.
|
|
806
|
+
* @summary Connect to vault hub
|
|
807
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
808
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from.
|
|
809
|
+
*/
|
|
810
|
+
async connectToVaultHub(contractsId, simulateAddress, options = { headers: {} }) {
|
|
811
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/connect-to-vault-hub'
|
|
812
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
813
|
+
let localVarQueryParameters = {};
|
|
814
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
815
|
+
const produces = ['application/json'];
|
|
816
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
817
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
818
|
+
}
|
|
819
|
+
else {
|
|
820
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
821
|
+
}
|
|
822
|
+
let localVarFormParams = {};
|
|
823
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
824
|
+
if (contractsId === null || contractsId === undefined) {
|
|
825
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling connectToVaultHub.');
|
|
826
|
+
}
|
|
827
|
+
if (simulateAddress !== undefined) {
|
|
828
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
829
|
+
}
|
|
830
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
831
|
+
let localVarUseFormData = false;
|
|
832
|
+
let localVarRequestOptions = {
|
|
833
|
+
method: 'POST',
|
|
834
|
+
qs: localVarQueryParameters,
|
|
835
|
+
headers: localVarHeaderParams,
|
|
836
|
+
uri: localVarPath,
|
|
837
|
+
useQuerystring: this._useQuerystring,
|
|
838
|
+
json: true,
|
|
839
|
+
};
|
|
840
|
+
let authenticationPromise = Promise.resolve();
|
|
841
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
842
|
+
let interceptorPromise = authenticationPromise;
|
|
843
|
+
for (const interceptor of this.interceptors) {
|
|
844
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
845
|
+
}
|
|
846
|
+
return interceptorPromise.then(() => {
|
|
847
|
+
if (Object.keys(localVarFormParams).length) {
|
|
848
|
+
if (localVarUseFormData) {
|
|
849
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
850
|
+
}
|
|
851
|
+
else {
|
|
852
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return new Promise((resolve, reject) => {
|
|
856
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
857
|
+
if (error) {
|
|
858
|
+
console.error('API call error:', error);
|
|
859
|
+
reject(error);
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
863
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
864
|
+
resolve({ body: body, status: response.statusCode });
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
console.error('API response error:', response.statusCode);
|
|
868
|
+
resolve({ body: body, status: response.statusCode });
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
});
|
|
873
|
+
});
|
|
874
|
+
}
|
|
576
875
|
/**
|
|
577
876
|
*
|
|
578
877
|
* @summary Create EIP-7251 consolidation requests for validators
|
|
@@ -648,6 +947,7 @@ class LidoWriteApi {
|
|
|
648
947
|
}
|
|
649
948
|
/**
|
|
650
949
|
*
|
|
950
|
+
* @summary Fund vault with ETH
|
|
651
951
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
652
952
|
* @param fundVault
|
|
653
953
|
*/
|
|
@@ -719,11 +1019,12 @@ class LidoWriteApi {
|
|
|
719
1019
|
});
|
|
720
1020
|
}
|
|
721
1021
|
/**
|
|
722
|
-
*
|
|
723
|
-
* @summary Update
|
|
1022
|
+
* Returns the calldata needed to submit the updateVaultData transaction to the lazy oracle contract for a specific Lido staking contract set.
|
|
1023
|
+
* @summary Update lazy oracle report
|
|
724
1024
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1025
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from. If provided, the transaction will be simulated and any revert errors will be returned.
|
|
725
1026
|
*/
|
|
726
|
-
async getLazyOracleReportCallData(contractsId, options = { headers: {} }) {
|
|
1027
|
+
async getLazyOracleReportCallData(contractsId, simulateAddress, options = { headers: {} }) {
|
|
727
1028
|
const localVarPath = this.basePath + '/lidov3/{contractsId}/update-vault-report'
|
|
728
1029
|
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
729
1030
|
let localVarQueryParameters = {};
|
|
@@ -740,6 +1041,9 @@ class LidoWriteApi {
|
|
|
740
1041
|
if (contractsId === null || contractsId === undefined) {
|
|
741
1042
|
throw new Error('Required parameter "contractsId" was null or undefined when calling getLazyOracleReportCallData.');
|
|
742
1043
|
}
|
|
1044
|
+
if (simulateAddress !== undefined) {
|
|
1045
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
1046
|
+
}
|
|
743
1047
|
Object.assign(localVarHeaderParams, options.headers);
|
|
744
1048
|
let localVarUseFormData = false;
|
|
745
1049
|
let localVarRequestOptions = {
|
|
@@ -860,6 +1164,7 @@ class LidoWriteApi {
|
|
|
860
1164
|
}
|
|
861
1165
|
/**
|
|
862
1166
|
*
|
|
1167
|
+
* @summary Grant vault role
|
|
863
1168
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
864
1169
|
* @param grantRole
|
|
865
1170
|
*/
|
|
@@ -932,7 +1237,7 @@ class LidoWriteApi {
|
|
|
932
1237
|
}
|
|
933
1238
|
/**
|
|
934
1239
|
*
|
|
935
|
-
* @summary List staking request IDs for a
|
|
1240
|
+
* @summary List staking request IDs for a vault
|
|
936
1241
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
937
1242
|
* @param status
|
|
938
1243
|
*/
|
|
@@ -1003,6 +1308,7 @@ class LidoWriteApi {
|
|
|
1003
1308
|
}
|
|
1004
1309
|
/**
|
|
1005
1310
|
*
|
|
1311
|
+
* @summary Encode mint shares transaction
|
|
1006
1312
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1007
1313
|
* @param mintShares
|
|
1008
1314
|
*/
|
|
@@ -1075,6 +1381,7 @@ class LidoWriteApi {
|
|
|
1075
1381
|
}
|
|
1076
1382
|
/**
|
|
1077
1383
|
*
|
|
1384
|
+
* @summary Encode mint stETH transaction
|
|
1078
1385
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1079
1386
|
* @param mintStETH
|
|
1080
1387
|
*/
|
|
@@ -1147,6 +1454,7 @@ class LidoWriteApi {
|
|
|
1147
1454
|
}
|
|
1148
1455
|
/**
|
|
1149
1456
|
*
|
|
1457
|
+
* @summary Encode mint wstETH transaction
|
|
1150
1458
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1151
1459
|
* @param mintWstETH
|
|
1152
1460
|
*/
|
|
@@ -1219,6 +1527,7 @@ class LidoWriteApi {
|
|
|
1219
1527
|
}
|
|
1220
1528
|
/**
|
|
1221
1529
|
*
|
|
1530
|
+
* @summary Rebalance vault with ETH
|
|
1222
1531
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1223
1532
|
* @param rebalanceVaultWithEther
|
|
1224
1533
|
*/
|
|
@@ -1291,6 +1600,7 @@ class LidoWriteApi {
|
|
|
1291
1600
|
}
|
|
1292
1601
|
/**
|
|
1293
1602
|
*
|
|
1603
|
+
* @summary Rebalance vault with shares
|
|
1294
1604
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1295
1605
|
* @param rebalanceVaultWithShares
|
|
1296
1606
|
*/
|
|
@@ -1363,6 +1673,7 @@ class LidoWriteApi {
|
|
|
1363
1673
|
}
|
|
1364
1674
|
/**
|
|
1365
1675
|
*
|
|
1676
|
+
* @summary Recover ERC20 from vault
|
|
1366
1677
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1367
1678
|
* @param recoverERC20
|
|
1368
1679
|
*/
|
|
@@ -1435,6 +1746,7 @@ class LidoWriteApi {
|
|
|
1435
1746
|
}
|
|
1436
1747
|
/**
|
|
1437
1748
|
*
|
|
1749
|
+
* @summary Revoke vault role
|
|
1438
1750
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1439
1751
|
* @param revokeRole
|
|
1440
1752
|
*/
|
|
@@ -1506,8 +1818,8 @@ class LidoWriteApi {
|
|
|
1506
1818
|
});
|
|
1507
1819
|
}
|
|
1508
1820
|
/**
|
|
1509
|
-
*
|
|
1510
|
-
* @summary Stake ETH
|
|
1821
|
+
* Returns the call data needed to submit the unguaranteed deposit transaction to the dashboard contract.
|
|
1822
|
+
* @summary Stake ETH with a Lido staking vault
|
|
1511
1823
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1512
1824
|
* @param stakeEthRequest
|
|
1513
1825
|
*/
|
|
@@ -1580,6 +1892,78 @@ class LidoWriteApi {
|
|
|
1580
1892
|
}
|
|
1581
1893
|
/**
|
|
1582
1894
|
*
|
|
1895
|
+
* @summary Encode sync tier transaction
|
|
1896
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1897
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from. If provided, the transaction will be simulated and any revert errors will be returned.
|
|
1898
|
+
*/
|
|
1899
|
+
async syncTier(contractsId, simulateAddress, options = { headers: {} }) {
|
|
1900
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/sync-tier'
|
|
1901
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1902
|
+
let localVarQueryParameters = {};
|
|
1903
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1904
|
+
const produces = ['application/json'];
|
|
1905
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1906
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1907
|
+
}
|
|
1908
|
+
else {
|
|
1909
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1910
|
+
}
|
|
1911
|
+
let localVarFormParams = {};
|
|
1912
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1913
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1914
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling syncTier.');
|
|
1915
|
+
}
|
|
1916
|
+
if (simulateAddress !== undefined) {
|
|
1917
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
1918
|
+
}
|
|
1919
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1920
|
+
let localVarUseFormData = false;
|
|
1921
|
+
let localVarRequestOptions = {
|
|
1922
|
+
method: 'POST',
|
|
1923
|
+
qs: localVarQueryParameters,
|
|
1924
|
+
headers: localVarHeaderParams,
|
|
1925
|
+
uri: localVarPath,
|
|
1926
|
+
useQuerystring: this._useQuerystring,
|
|
1927
|
+
json: true,
|
|
1928
|
+
};
|
|
1929
|
+
let authenticationPromise = Promise.resolve();
|
|
1930
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1931
|
+
let interceptorPromise = authenticationPromise;
|
|
1932
|
+
for (const interceptor of this.interceptors) {
|
|
1933
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1934
|
+
}
|
|
1935
|
+
return interceptorPromise.then(() => {
|
|
1936
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1937
|
+
if (localVarUseFormData) {
|
|
1938
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1939
|
+
}
|
|
1940
|
+
else {
|
|
1941
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return new Promise((resolve, reject) => {
|
|
1945
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1946
|
+
if (error) {
|
|
1947
|
+
console.error('API call error:', error);
|
|
1948
|
+
reject(error);
|
|
1949
|
+
}
|
|
1950
|
+
else {
|
|
1951
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1952
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1953
|
+
resolve({ body: body, status: response.statusCode });
|
|
1954
|
+
}
|
|
1955
|
+
else {
|
|
1956
|
+
console.error('API response error:', response.statusCode);
|
|
1957
|
+
resolve({ body: body, status: response.statusCode });
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
});
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Returns a partial transaction to trigger EIP-7002 validator withdrawals. When the vault is connected, uses Dashboard. When the vault is disconnected (e.g. after the disconnect wizard), uses StakingVault.triggerValidatorWithdrawals.
|
|
1966
|
+
* @summary Trigger validator withdrawals
|
|
1583
1967
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1584
1968
|
* @param triggerValidatorWithdrawals
|
|
1585
1969
|
*/
|
|
@@ -1652,6 +2036,7 @@ class LidoWriteApi {
|
|
|
1652
2036
|
}
|
|
1653
2037
|
/**
|
|
1654
2038
|
*
|
|
2039
|
+
* @summary Unwrap wstETH to stETH
|
|
1655
2040
|
* @param unwrapWstETH
|
|
1656
2041
|
*/
|
|
1657
2042
|
async unwrapWstETH(unwrapWstETH, options = { headers: {} }) {
|
|
@@ -1718,7 +2103,80 @@ class LidoWriteApi {
|
|
|
1718
2103
|
}
|
|
1719
2104
|
/**
|
|
1720
2105
|
*
|
|
1721
|
-
* @summary
|
|
2106
|
+
* @summary Encode update share limit transaction
|
|
2107
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
2108
|
+
* @param updateShareLimit
|
|
2109
|
+
*/
|
|
2110
|
+
async updateShareLimit(contractsId, updateShareLimit, options = { headers: {} }) {
|
|
2111
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/update-share-limit'
|
|
2112
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
2113
|
+
let localVarQueryParameters = {};
|
|
2114
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2115
|
+
const produces = ['application/json'];
|
|
2116
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2117
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2118
|
+
}
|
|
2119
|
+
else {
|
|
2120
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2121
|
+
}
|
|
2122
|
+
let localVarFormParams = {};
|
|
2123
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
2124
|
+
if (contractsId === null || contractsId === undefined) {
|
|
2125
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling updateShareLimit.');
|
|
2126
|
+
}
|
|
2127
|
+
// Verify required parameter 'updateShareLimit' is not null or undefined
|
|
2128
|
+
if (updateShareLimit === null || updateShareLimit === undefined) {
|
|
2129
|
+
throw new Error('Required parameter "updateShareLimit" was null or undefined when calling updateShareLimit.');
|
|
2130
|
+
}
|
|
2131
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
2132
|
+
let localVarUseFormData = false;
|
|
2133
|
+
let localVarRequestOptions = {
|
|
2134
|
+
method: 'POST',
|
|
2135
|
+
qs: localVarQueryParameters,
|
|
2136
|
+
headers: localVarHeaderParams,
|
|
2137
|
+
uri: localVarPath,
|
|
2138
|
+
useQuerystring: this._useQuerystring,
|
|
2139
|
+
json: true,
|
|
2140
|
+
body: models_1.ObjectSerializer.serialize(updateShareLimit, "UpdateShareLimit")
|
|
2141
|
+
};
|
|
2142
|
+
let authenticationPromise = Promise.resolve();
|
|
2143
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2144
|
+
let interceptorPromise = authenticationPromise;
|
|
2145
|
+
for (const interceptor of this.interceptors) {
|
|
2146
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2147
|
+
}
|
|
2148
|
+
return interceptorPromise.then(() => {
|
|
2149
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2150
|
+
if (localVarUseFormData) {
|
|
2151
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2152
|
+
}
|
|
2153
|
+
else {
|
|
2154
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
return new Promise((resolve, reject) => {
|
|
2158
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
2159
|
+
if (error) {
|
|
2160
|
+
console.error('API call error:', error);
|
|
2161
|
+
reject(error);
|
|
2162
|
+
}
|
|
2163
|
+
else {
|
|
2164
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2165
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
2166
|
+
resolve({ body: body, status: response.statusCode });
|
|
2167
|
+
}
|
|
2168
|
+
else {
|
|
2169
|
+
console.error('API response error:', response.statusCode);
|
|
2170
|
+
resolve({ body: body, status: response.statusCode });
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
});
|
|
2174
|
+
});
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* Returns validator balances and signing wallet information for the given consolidation requests.
|
|
2179
|
+
* @summary Validate consolidation requests
|
|
1722
2180
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1723
2181
|
* @param consolidateValidators
|
|
1724
2182
|
*/
|
|
@@ -1790,7 +2248,79 @@ class LidoWriteApi {
|
|
|
1790
2248
|
});
|
|
1791
2249
|
}
|
|
1792
2250
|
/**
|
|
1793
|
-
*
|
|
2251
|
+
* Returns a partial transaction to voluntarily disconnect the vault from the vault hub. This is the only write operation allowed when the vault is already disconnected.
|
|
2252
|
+
* @summary Voluntary disconnect from vault hub
|
|
2253
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
2254
|
+
* @param simulateAddress Optional Ethereum address to simulate the transaction from.
|
|
2255
|
+
*/
|
|
2256
|
+
async voluntaryDisconnectFromVaultHub(contractsId, simulateAddress, options = { headers: {} }) {
|
|
2257
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/voluntary-disconnect'
|
|
2258
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
2259
|
+
let localVarQueryParameters = {};
|
|
2260
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2261
|
+
const produces = ['application/json'];
|
|
2262
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2263
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2264
|
+
}
|
|
2265
|
+
else {
|
|
2266
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2267
|
+
}
|
|
2268
|
+
let localVarFormParams = {};
|
|
2269
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
2270
|
+
if (contractsId === null || contractsId === undefined) {
|
|
2271
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling voluntaryDisconnectFromVaultHub.');
|
|
2272
|
+
}
|
|
2273
|
+
if (simulateAddress !== undefined) {
|
|
2274
|
+
localVarQueryParameters['simulateAddress'] = models_1.ObjectSerializer.serialize(simulateAddress, "string");
|
|
2275
|
+
}
|
|
2276
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
2277
|
+
let localVarUseFormData = false;
|
|
2278
|
+
let localVarRequestOptions = {
|
|
2279
|
+
method: 'POST',
|
|
2280
|
+
qs: localVarQueryParameters,
|
|
2281
|
+
headers: localVarHeaderParams,
|
|
2282
|
+
uri: localVarPath,
|
|
2283
|
+
useQuerystring: this._useQuerystring,
|
|
2284
|
+
json: true,
|
|
2285
|
+
};
|
|
2286
|
+
let authenticationPromise = Promise.resolve();
|
|
2287
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2288
|
+
let interceptorPromise = authenticationPromise;
|
|
2289
|
+
for (const interceptor of this.interceptors) {
|
|
2290
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
2291
|
+
}
|
|
2292
|
+
return interceptorPromise.then(() => {
|
|
2293
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2294
|
+
if (localVarUseFormData) {
|
|
2295
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2296
|
+
}
|
|
2297
|
+
else {
|
|
2298
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
return new Promise((resolve, reject) => {
|
|
2302
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
2303
|
+
if (error) {
|
|
2304
|
+
console.error('API call error:', error);
|
|
2305
|
+
reject(error);
|
|
2306
|
+
}
|
|
2307
|
+
else {
|
|
2308
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2309
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
2310
|
+
resolve({ body: body, status: response.statusCode });
|
|
2311
|
+
}
|
|
2312
|
+
else {
|
|
2313
|
+
console.error('API response error:', response.statusCode);
|
|
2314
|
+
resolve({ body: body, status: response.statusCode });
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
});
|
|
2318
|
+
});
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
/**
|
|
2322
|
+
* Returns a partial transaction to withdraw ETH. When the vault is connected, uses Dashboard.withdraw. When the vault is disconnected (e.g. after the disconnect wizard), uses StakingVault.withdraw(recipient, amount).
|
|
2323
|
+
* @summary Withdraw from vault
|
|
1794
2324
|
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1795
2325
|
* @param withdrawFromVault
|
|
1796
2326
|
*/
|
|
@@ -1863,6 +2393,7 @@ class LidoWriteApi {
|
|
|
1863
2393
|
}
|
|
1864
2394
|
/**
|
|
1865
2395
|
*
|
|
2396
|
+
* @summary Wrap stETH to wstETH
|
|
1866
2397
|
* @param wrapStETH
|
|
1867
2398
|
*/
|
|
1868
2399
|
async wrapStETH(wrapStETH, options = { headers: {} }) {
|