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?