Skip to content
docs

default

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:185

Lido liquid staking for EVM wallet accounts: stake ETH → stETH, exit through the two-phase withdrawal queue (request → finalization → claim), wrap to and unwrap from the non-rebasing wstETH form, and read APR / rewards.

Withdrawal requests are permit-first: one EIP-2612 signature rides inside the request transaction, so the whole exit costs a single transaction. The permit is PROVEN with an eth_call before broadcasting — a bad signature must fall back to the two-transaction approve + request path, not burn gas. The fallback’s approval is awaited to a mined receipt before the request is sent, because the request’s gas estimate reverts against an unmined allowance.

new default(account, config?): LidoProtocolEvm

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:200

Creates a new interface to the Lido protocol for evm blockchains.

StakingWalletAccount

The wallet account to use to interact with the protocol (a @anywalletkit/wallet-evm account, or a read-only account for views).

LidoProtocolConfig = {}

The protocol’s configuration.

LidoProtocolEvm

StakingProtocol.constructor

protected readonly _account: IWalletAccountReadOnly | IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:309

StakingProtocol._account


protected readonly _config: LidoProtocolConfig

Defined in: core/dist/index-QWdcwE6y.d.ts:310

StakingProtocol._config

claimWithdrawals(options?): Promise<ClaimWithdrawalsResult>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:496

Claims finalized withdrawal requests — ETH lands on the account.

ClaimWithdrawalsOptions

Promise<ClaimWithdrawalsResult>

StakingProtocol.claimWithdrawals


describeActivity(tx, ctx): ActivityItem | null

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:696

Recognize this deployment’s Lido transactions offline (stETH submit, wstETH wrap / unwrap, WithdrawalQueue requestWithdrawals* / claimWithdrawals*). See lido-activity.ts for the rule.

ChainTx

DescribeActivityContext

ActivityItem | null

StakingProtocol.describeActivity


getApr(): Promise<number>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:533

Lido’s 7-day SMA staking APR, in percent.

Promise<number>

StakingProtocol.getApr


getRewardHistory(options?): Promise<RewardEvent[]>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:673

Daily rebase reward history for the account, newest first. Decoration: failures return an empty array, never throw.

The history’s options.

number = 14

Promise<RewardEvent[]>

Rebase events (reward in stETH base unit, timestamp unix seconds).


getRewards(): Promise<RewardTotals | null>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:649

Lifetime staking rewards for the account, from the same backend stake.lido.fi uses. Decoration: failures return null, never throw.

Promise<RewardTotals | null>

Lifetime stETH rewards (base unit) and average APR (percent).


getStakedBalance(): Promise<StakedBalance>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:514

The account’s staked position: stETH, wstETH and the live rate.

Promise<StakedBalance>

StakingProtocol.getStakedBalance


getWithdrawalEta(ids): Promise<Map<string, number>>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:602

Finalization ETA per queued request, in seconds, from Lido’s withdrawal queue API. Decoration: failures return an empty map, never throw.

bigint[]

The request ids.

Promise<Map<string, number>>

Request id (as string) → ETA seconds. Finalized requests are absent.


getWithdrawalEtaForAmount(amount): Promise<number | null>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:629

Rough finalization ETA for a NEW withdrawal request of the given size, in seconds, from Lido’s withdrawal queue API (which takes ETHER units). Decoration: failures return null, never throw.

number | bigint

The amount to withdraw (in base unit).

Promise<number | null>

ETA seconds, or null.


getWithdrawalRequests(): Promise<WithdrawalRequestsView>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:433

The account’s live withdrawal queue.

Promise<WithdrawalRequestsView>

StakingProtocol.getWithdrawalRequests


quoteClaimWithdrawals(options?): Promise<Omit<ClaimWithdrawalsResult, "hash">>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:505

Quotes the costs of a claim operation.

ClaimWithdrawalsOptions

Promise<Omit<ClaimWithdrawalsResult, "hash">>

StakingProtocol.quoteClaimWithdrawals


quoteRequestWithdrawal(__namedParameters): Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:416

Quotes the costs of a withdrawal request, assuming the queue already holds an allowance (the executed request needs none — it carries a permit).

WithdrawalRequestOptions

Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>

StakingProtocol.quoteRequestWithdrawal


quoteStake(__namedParameters): Promise<Omit<StakeResult, "hash">>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:293

Quotes the costs of a stake operation.

StakeOptions

Promise<Omit<StakeResult, "hash">>

StakingProtocol.quoteStake


requestWithdrawal(__namedParameters): Promise<WithdrawalRequestResult>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:354

Queues stETH or wstETH for withdrawal through the Lido queue. Permit-first (one signature, one transaction); falls back to approve + request if the permit leg fails. Over-cap amounts split into several requests inside the same transaction.

WithdrawalRequestOptions

Promise<WithdrawalRequestResult>

StakingProtocol.requestWithdrawal


protected requireSigningAccount(methodName): IWalletAccount

Defined in: core/dist/index-QWdcwE6y.d.ts:322

The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.

string

IWalletAccount

StakingProtocol.requireSigningAccount


stake(__namedParameters): Promise<StakeResult>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:283

Stakes ETH — stETH lands on the account 1:1.

StakeOptions

Promise<StakeResult>

StakingProtocol.stake


unwrap(options): Promise<StakeResult>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:584

Unwraps wstETH back to stETH — a single transaction, no approval needed.

StakeOptions

The unwrap’s options (amount in wstETH base unit).

Promise<StakeResult>


wrap(options): Promise<WithdrawalRequestResult>

Defined in: protocol-staking-lido-evm/src/lido-protocol-evm.ts:555

Wraps stETH into the non-rebasing wstETH. wstETH has no wrap-with-permit, so this is approve (awaited to a mined receipt) + wrap.

StakeOptions

The wrap’s options (amount in stETH base unit).

Promise<WithdrawalRequestResult>

The wrap’s result (approveHash null if the allowance already covered it).