UNPKG

@lidofinance/lido-ethereum-sdk

Version:

<div style="display: flex;" align="center"> <h1 align="center">Lido Ethereum SDK</h1> </div>

288 lines 10.3 kB
import { type GetContractReturnType, type Address, type WalletClient } from 'viem'; import { TransactionResult } from '../core/index.js'; import { SharesTotalSupplyResult, SharesTransferProps } from './types.js'; import { stethSharesAbi } from './abi/steth-shares-abi.js'; import type { AccountValue, EtherValue, NoTxOptions } from '../core/types.js'; import { LidoSDKModule } from '../common/class-primitives/sdk-module.js'; export declare class LidoSDKShares extends LidoSDKModule { static readonly PRECISION: bigint; contractAddressStETH(): Promise<Address>; getContractStETHshares(): Promise<GetContractReturnType<typeof stethSharesAbi, WalletClient>>; balance(address?: AccountValue): Promise<bigint>; transfer({ account: accountProp, to, amount: _amount, callback, from: _from, ...rest }: SharesTransferProps): Promise<TransactionResult>; populateTransfer({ account: accountProp, to, amount: _amount, from: _from, }: NoTxOptions<SharesTransferProps>): Promise<{ to: `0x${string}`; from: `0x${string}`; data: `0x${string}`; }>; simulateTransfer({ account: _account, to, amount: _amount, from: _from, }: NoTxOptions<SharesTransferProps>): Promise<import("viem").SimulateContractReturnType<readonly [{ readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: false; readonly name: "sharesValue"; readonly type: "uint256"; }]; readonly name: "TransferShares"; readonly type: "event"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_account"; readonly type: "address"; }]; readonly name: "sharesOf"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_ethAmount"; readonly type: "uint256"; }]; readonly name: "getSharesByPooledEth"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "getPooledEthByShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly []; readonly name: "getTotalShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly []; readonly name: "getTotalPooledEther"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_account"; readonly type: "address"; }]; readonly name: "sharesOf"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: false; readonly inputs: readonly [{ readonly name: "_sender"; readonly type: "address"; }, { readonly name: "_recipient"; readonly type: "address"; }, { readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "transferSharesFrom"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly constant: false; readonly inputs: readonly [{ readonly name: "_recipient"; readonly type: "address"; }, { readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "transferShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "nonpayable"; readonly type: "function"; }], "transferSharesFrom", readonly [`0x${string}`, `0x${string}`, bigint], import("viem").Chain | undefined, import("viem").Account | undefined, undefined, import("viem").JsonRpcAccount> | import("viem").SimulateContractReturnType<readonly [{ readonly anonymous: false; readonly inputs: readonly [{ readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: false; readonly name: "sharesValue"; readonly type: "uint256"; }]; readonly name: "TransferShares"; readonly type: "event"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_account"; readonly type: "address"; }]; readonly name: "sharesOf"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_ethAmount"; readonly type: "uint256"; }]; readonly name: "getSharesByPooledEth"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "getPooledEthByShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly []; readonly name: "getTotalShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly []; readonly name: "getTotalPooledEther"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: true; readonly inputs: readonly [{ readonly name: "_account"; readonly type: "address"; }]; readonly name: "sharesOf"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "view"; readonly type: "function"; }, { readonly constant: false; readonly inputs: readonly [{ readonly name: "_sender"; readonly type: "address"; }, { readonly name: "_recipient"; readonly type: "address"; }, { readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "transferSharesFrom"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "nonpayable"; readonly type: "function"; }, { readonly constant: false; readonly inputs: readonly [{ readonly name: "_recipient"; readonly type: "address"; }, { readonly name: "_sharesAmount"; readonly type: "uint256"; }]; readonly name: "transferShares"; readonly outputs: readonly [{ readonly name: ""; readonly type: "uint256"; }]; readonly payable: false; readonly stateMutability: "nonpayable"; readonly type: "function"; }], "transferShares", readonly [`0x${string}`, bigint], import("viem").Chain | undefined, import("viem").Account | undefined, undefined, import("viem").JsonRpcAccount>>; convertToShares(stethAmount: EtherValue): Promise<bigint>; convertToSteth(sharesAmount: EtherValue): Promise<bigint>; getTotalSupply(): Promise<SharesTotalSupplyResult>; getShareRate(): Promise<number>; } //# sourceMappingURL=shares.d.ts.map