Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Planned Implementation
Staking
Withdrawals
Resources
Related
- ethers-provider — RPC connection
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Liquid staking with Lido and stETH
import { Lido } from './Lido.js';
const lido = Lido({ provider });
// Stake ETH for stETH
await lido.submit({
amount: parseEther('10'),
referral: ZERO_ADDRESS,
signer,
});
// Wrap stETH to wstETH (non-rebasing)
await lido.wrap({
amount: stethBalance,
signer,
});
// Request withdrawal
const requestIds = await lido.requestWithdrawals({
amounts: [parseEther('5')],
signer,
});
// Check withdrawal status
const status = await lido.getWithdrawalStatus(requestIds);
// Claim when ready
await lido.claimWithdrawals({
requestIds,
signer,
});
Was this page helpful?
