import { type RpcProvider } from "starknet"; import { type Address } from "../../types/address.js"; import { Amount, type ExecuteOptions } from "../../types/index.js"; import type { PoolMember } from "../../types/pool.js"; import type { WalletInterface } from "../../wallet/interface.js"; import type { Tx } from "../../tx/index.js"; import type { ChainId } from "../../types/config.js"; import type { StakingProvider } from "../../staking/interface.js"; export interface EndurStakingOptions { fetcher?: typeof fetch; timeoutMs?: number; } export type EndurAPYResult = Partial>; export type EndurTVLResult = Partial>; /** * LST staking module for Endur liquid staking on Starknet. * * Mirrors the `Staking` API so SDK users interact with one consistent * staking interface regardless of the underlying mechanism: * - `enter` / `stake` / `add` → ERC4626 `deposit` * - `exitIntent` → ERC4626 `redeem` * - `exit` → ERC4626 `redeem` of full share balance * - `getPosition` → LST share balance as a `PoolMember` * - `getCommission` → `0` (yield is baked into the share price) * * Obtain an instance via `wallet.lstStaking("STRK")`. * * @example * ```ts * const lst = wallet.lstStaking("STRK"); * * // Deposit * const tx = await lst.enter(wallet, Amount.parse("100", 18)); * await tx.wait(); * * // Check position * const position = await lst.getPosition(wallet); * console.log(`Shares: ${position?.staked.toFormatted()}`); * * // Redeem * const exitTx = await lst.exitIntent(wallet, position.staked); * await exitTx.wait(); * ``` */ export declare class EndurStaking implements StakingProvider { private readonly config; private readonly provider; private readonly chainId; private readonly fetcher; private readonly timeoutMs; private constructor(); /** The underlying asset symbol (e.g. "STRK", "WBTC") */ get asset(): string; /** The LST share token symbol (e.g. "xSTRK", "xWBTC") */ get lstSymbol(): string; /** * Enter the LST vault as a new depositor (ERC4626 deposit). * * For LST vaults there is no membership gate — `enter`, `stake`, and `add` * all perform the same underlying deposit. */ enter(wallet: WalletInterface, amount: Amount, options?: ExecuteOptions): Promise; /** * Stake assets in the LST vault (ERC4626 deposit). * * Equivalent to `enter` — provided for API parity with `Staking`. */ stake(wallet: WalletInterface, amount: Amount, options?: ExecuteOptions): Promise; /** * Add more assets to the LST vault (ERC4626 deposit). * * Equivalent to `enter` — provided for API parity with `Staking`. */ add(wallet: WalletInterface, amount: Amount, options?: ExecuteOptions): Promise; /** * Deposit with a specific validator address. */ enterToValidator(wallet: WalletInterface, amount: Amount, validatorAddress: string, options?: ExecuteOptions): Promise; /** * Deposit with a referral code. */ enterWithReferral(wallet: WalletInterface, amount: Amount, referralCode: string, options?: ExecuteOptions): Promise; /** * Initiate an exit by redeeming a specific amount of LST shares (ERC4626 redeem). * * Unlike delegation pool staking, LST redemption is immediate — there is no * exit window. This method mirrors `exitIntent` from `Staking` for API parity. * * @param amount - Amount of LST shares to redeem */ exitIntent(wallet: WalletInterface, amount: Amount, options?: ExecuteOptions): Promise; /** * Redeem the wallet's full LST share balance (ERC4626 redeem). * * Queries the current position and redeems everything. Mirrors `exit` from * `Staking` for API parity. * * @throws Error if the wallet holds no LST shares */ exit(wallet: WalletInterface, options?: ExecuteOptions): Promise; /** * Not applicable for LST vaults — yield is reflected in the share price. * * @throws Always throws; use `exit` or `exitIntent` to realise gains. */ claimRewards(_wallet: WalletInterface, _options?: ExecuteOptions): Promise; /** * Check whether the wallet holds any LST shares. */ isMember(wallet: WalletInterface): Promise; /** * Get the wallet's LST position as a `PoolMember`. * * - `staked` — LST share balance * - `rewards` — always zero (yield is in the share price) * - `total` — same as `staked` * * Returns `null` if the wallet holds no shares. */ getPosition(walletOrAddress: WalletInterface | Address): Promise; /** * Returns `0` — LST vaults have no validator commission. * * Provided for API parity with `Staking`. */ getCommission(): Promise; /** * Get current APY data for this asset from the Endur API. */ getAPY(): Promise; /** * Get current TVL data for this asset from the Endur API. */ getTVL(): Promise; private buildApproveCall; private buildDepositCalls; private buildRedeemCall; private assertDecimalsMatch; private fetchStats; private parseStats; /** * Create an `EndurStaking` instance for the given asset and chain. * * @throws Error if the asset is not supported on the chain */ static from(asset: string, provider: RpcProvider, chainId: ChainId, options?: EndurStakingOptions): EndurStaking; } //# sourceMappingURL=endur-staking.d.ts.map