import { BN, web3 } from '@coral-xyz/anchor'; import { Marinade } from '../marinade'; import { MarinadeMint } from '../marinade-mint/marinade-mint'; import { StakeRecord } from './borsh/stake-record'; import { StakeState } from './borsh/stake-state'; import { ValidatorRecord } from './borsh/validator-record'; import { MarinadeStateResponse } from './marinade-state.types'; import { StakeInfo } from './borsh/stake-info'; export declare class MarinadeState { private readonly marinade; private readonly anchorProvider; readonly state: MarinadeStateResponse; readonly marinadeStateAddress: web3.PublicKey; readonly marinadeFinanceProgramId: web3.PublicKey; private constructor(); static fetch(marinade: Marinade): Promise; reserveAddress: () => web3.PublicKey; mSolPrice: number; mSolMintAddress: web3.PublicKey; mSolMint: MarinadeMint; mSolMintAuthority: () => web3.PublicKey; mSolLegAuthority: () => web3.PublicKey; mSolLeg: web3.PublicKey; lpMintAddress: web3.PublicKey; lpMint: MarinadeMint; lpMintAuthority: () => web3.PublicKey; solLeg: () => web3.PublicKey; stakeDepositAuthority: () => web3.PublicKey; stakeWithdrawAuthority: () => web3.PublicKey; canonicalStake: (validator: web3.PublicKey) => web3.PublicKey; /** * Derive the canonical stake account address of a validator. * Mirrors the program's State::find_canonical_stake_address: * seeds [state, validator vote address, "canonical_stake"]. */ static canonicalStakeAddress(marinadeStateAddress: web3.PublicKey, validatorVoteAddress: web3.PublicKey, marinadeFinanceProgramId: web3.PublicKey): web3.PublicKey; private findProgramDerivedAddress; private static deriveAddress; validatorDuplicationFlag: (validatorAddress: web3.PublicKey) => web3.PublicKey; epochInfo: () => Promise; unstakeNowFeeBp(lamportsToObtain: BN): Promise; stakeDelta(): BN; /** * return validatorRecords with capacity */ getValidatorRecords(): Promise<{ validatorRecords: ValidatorRecord[]; capacity: number; }>; /** * return stakeRecords with capacity */ getStakeRecords(): Promise<{ stakeRecords: StakeRecord[]; capacity: number; }>; getStakeStates(): Promise; private deserializeStakeState; /** * return listStakeInfos with capacity */ getStakeInfos(): Promise<{ stakeInfos: StakeInfo[]; capacity: number; }>; treasuryMsolAccount: web3.PublicKey; /** * Commission in % */ rewardsCommissionPercent: number; /** * Max Stake moved per epoch in % */ maxStakeMovedPerEpoch: number; /** * % Fee when withdrawing stake account */ withdrawStakeAccountFee: number; /** * % Fee when depositing SOL */ depositSolFee: number; /** * % Fee when depositing stake account */ depositStakeAccountFee: number; }