- All contract instances now support
.encodeand.preparemethods for encoding calls and preparing transactions without sending them - All ABIs are now exported with their types and are optimized for better Typescript performance
- SDK now aligned with
viemnaming conventions -publicClientandwalletClientare used instead ofrpcProviderandsignerProviderto better reflect their purpose and avoid confusion - Older methods are marked for deprecation but are still supported for backward compatibility
- Types for
PublicClientandWalletClientcan now be registered with user types.
@ethersproject/bytesremoved as dependency and all related logic is migrated toviemutilslogModedefault value is now'none'innew LidoSDKCore(props)
StVaultmoduleviemversion up to^2.45.0sharesmodule new methods:convertBatchSharesToSteth,convertBatchStethToShares,getSharesByPooledEth,getPooledEthByShares,getPooledEthBySharesRoundUp- Updated ABIs:
stvaultABIs (StakingVault,VaultHub,VaultFactory,Dashboard,VaultViewer,PredepositGuarantee,OperatorGrid,LazyOracle,Multicall), plus updates incore(lido,lidoLocator) andshares(steth-shares)
StVaultmodule added
wrapEthlogic is migrated from direct ETH transfers to callingstakeETHon theWstETHReferralStakercontractwrapEthnow supports an optionalreferralAddressparameter
- Support for referral address in
wrapEthdemo block
- Dual Governance module
- DualGovernance warning status
Hooditestnet supportviemversion up to^2.26.0
Hooditestnet supportviemversion up to^2.26.0
Unichain,UnichainSepoliaL2 chains support
SoneiumandSoneiumMinatochains are added as separate L2 chainsGoerlichain is removedviemversion up to^2.22.11
SoneiumandSoneiumMinatochains are added as separate L2 chainsGoerlichain is removedviemversion up to^2.22.11
TransactionCallbackcan be async and are now awaitedTransactionCallbackStage.SIGNstage in callback can now return custom gas limit that overrides estimated oneestimateTransferandestimateApprovefor all (w)stETH instancesLidoSDKL2now hasapproveWstethForWrapEstimateGas,wrapWstethToStethEstimateGas,unwrapStethEstimateGashelpersLidoSDKStakenow hasstakeEthEstimateGashelperLidoSDKWrapnow haswrapStethEstimateGas,approveStethForWrapEstimateGasandunwrapEstimateGashelpersLidoSDKWithdraw.claimnow hasclaimRequestsEstimateGashelperLidoSDKWithdraw.requestnow hasrequestWithdrawalEstimateGas,requestWithdrawalWithPermitEstimateGashelpersLidoSDKWithdraw.request.requestWithdrawalWithPermitnow accepts customdeadlineprop for permit signature
LIDO_CONTRACT_NAMES,LIDO_L2_CONTRACT_NAMES,LIDO_L2_CONTRACT_NAMEScan now be used directly as non-const enumsLidoLocatorAbiis now exported fromcorePopulatedTransactionthat is returned frompopulateTXhelpers now only has relevant fieldsLidoSDKWrap.wrapEthEstimateGasnow applies correct gas limit
LidoSDKRewardsnow filter outs edgecases with self-transfers
viemis no longer an internal dependency and is listed as peer dependency
LidoSDKL2module is added to support Lido on L2 networks functionalityOptimismandOptimism-sepoliachains are added as separate L2 chainscore.getL2ContractAddressandLIDO_L2_CONTRACT_NAMES enumare added to support l2 contracts- ABIs are exported from corresponding modules to support custom functionality and direct viem access
multicallis used only if supported by client
- L2 and updated reef-knot support
apringetRewardsFromChainandgetRewardsFromSubgraphis now in percents e.g 3.14 and not 0.314- package is build with ts@5.4.5 with changes in bundle
LidoSDKApr.calculateAprFromRebaseEventhas increased precision
- updated version of
reef-knotpackage withwagmi@2
No changes
- fixed edge-case in
withdraw.views.findCheckpointHintswhere last finalized request would fail assertion withCannot find hints for unfinalized request... - subsequently fixed same error in
withdraw.request-info,withdraw.claimmodules
- fixed edge-cases in
getRewardsFromChainandgetRewardsFromSubgraphsometimes causing transfer events to be wronged and leading to negative balance
Sepoliatestnet- New method
getWithdrawalWaitingTimeByAmountfor fetching withdrawal waiting time for amount of eth - New method
getWithdrawalWaitingTimeByRequestIdsfor fetching withdrawal waiting time for earlier created requests by their ids
- Support for
Sepoliatestnet - Added blocks with new methods
getWithdrawalWaitingTimeByAmountandgetWithdrawalWaitingTimeByRequestIds
- Mainnet subgraph ID now points to updated, L2 based subgraph
viemversion up to2.0.6- Account hoisting support: methods no longer require address/account if it's hoisted to
walletClientor available viaeth_requestAccounts - Stake, Wrap, Withdraw Request & Claim transaction methods now return parsed transaction result
waitForTransactionReceiptParametersoptional config added to all transaction methods props
- better multisig behavior for transactions
- Simulate methods now have correct return types
stakeEthPopulateTxnot does not calculategasLimitwhich prevented usage when stake limit is reached
- Upped
nextandviemversions
- modules constructors types did not allow
rpcProviderpassage - increased default timeout on transaction confirmation
- account hoisting in
LidoSDKStethandLidoSDKWStethforsignPermitandpopulatePermit LidoSDKRewards:getRewardsFromSubgraphnow returns APR in correct units(not in percent)getRewardsFromSubgraphnow allows object to be returned fromgetSubgraphUrl
LidoSDKStatitsticsnow has helper typesLidoSDKWithdraw:- now has more exported types
approveSimulateTx,requestWithdrawalSimulateTx,requestWithdrawalWithPermitSimulateTxfixed account hoistinggetClaimableRequestsETHByAccountnow returns only claimable requests
- Playground now has custom RPC input
- All modules are covered by unit tests