Record Class StakePoolState
java.lang.Object
java.lang.Record
software.sava.solana.programs.stakepool.StakePoolState
public record StakePoolState(software.sava.core.accounts.PublicKey address, AccountType accountType, software.sava.core.accounts.PublicKey manager, software.sava.core.accounts.PublicKey staker, software.sava.core.accounts.PublicKey stakeDepositAuthority, int stakeWithdrawBumpSeed, software.sava.core.accounts.PublicKey validatorList, software.sava.core.accounts.PublicKey reserveStake, software.sava.core.accounts.PublicKey poolMint, software.sava.core.accounts.PublicKey managerFeeAccount, software.sava.core.accounts.PublicKey tokenProgramId, BigDecimal totalLamports, BigDecimal poolTokenSupply, long lastUpdateEpoch, LockUp lockUp, StakePoolState.Fee epochFee, StakePoolState.FutureEpochFee nextEpochFee, software.sava.core.accounts.PublicKey preferredDepositValidatorVoteAddress, software.sava.core.accounts.PublicKey preferredWithdrawValidatorVoteAddress, StakePoolState.Fee stakeDepositFee, StakePoolState.Fee stakeWithdrawalFee, StakePoolState.FutureEpochFee nextStakeWithdrawalFee, int stakeReferralFee, software.sava.core.accounts.PublicKey solDepositAuthority, StakePoolState.Fee solDepositFee, int solReferralFee, software.sava.core.accounts.PublicKey solWithdrawAuthority, StakePoolState.Fee solWithdrawalFee, StakePoolState.FutureEpochFee nextSolWithdrawalFee, long lastEpochPoolTokenSupply, long lastEpochTotalLamports)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final BiFunction<software.sava.core.accounts.PublicKey, byte[], StakePoolState> static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionStakePoolState(software.sava.core.accounts.PublicKey address, AccountType accountType, software.sava.core.accounts.PublicKey manager, software.sava.core.accounts.PublicKey staker, software.sava.core.accounts.PublicKey stakeDepositAuthority, int stakeWithdrawBumpSeed, software.sava.core.accounts.PublicKey validatorList, software.sava.core.accounts.PublicKey reserveStake, software.sava.core.accounts.PublicKey poolMint, software.sava.core.accounts.PublicKey managerFeeAccount, software.sava.core.accounts.PublicKey tokenProgramId, BigDecimal totalLamports, BigDecimal poolTokenSupply, long lastUpdateEpoch, LockUp lockUp, StakePoolState.Fee epochFee, StakePoolState.FutureEpochFee nextEpochFee, software.sava.core.accounts.PublicKey preferredDepositValidatorVoteAddress, software.sava.core.accounts.PublicKey preferredWithdrawValidatorVoteAddress, StakePoolState.Fee stakeDepositFee, StakePoolState.Fee stakeWithdrawalFee, StakePoolState.FutureEpochFee nextStakeWithdrawalFee, int stakeReferralFee, software.sava.core.accounts.PublicKey solDepositAuthority, StakePoolState.Fee solDepositFee, int solReferralFee, software.sava.core.accounts.PublicKey solWithdrawAuthority, StakePoolState.Fee solWithdrawalFee, StakePoolState.FutureEpochFee nextSolWithdrawalFee, long lastEpochPoolTokenSupply, long lastEpochTotalLamports) Creates an instance of aStakePoolStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountTyperecord component.software.sava.core.accounts.PublicKeyaddress()Returns the value of theaddressrecord component.calculateSolPrice(int scale, RoundingMode roundingMode) calculateSolPrice(MathContext mathContext) epochFee()Returns the value of theepochFeerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastEpochPoolTokenSupplyrecord component.longReturns the value of thelastEpochTotalLamportsrecord component.longReturns the value of thelastUpdateEpochrecord component.lockUp()Returns the value of thelockUprecord component.software.sava.core.accounts.PublicKeymanager()Returns the value of themanagerrecord component.software.sava.core.accounts.PublicKeyReturns the value of themanagerFeeAccountrecord component.Returns the value of thenextEpochFeerecord component.Returns the value of thenextSolWithdrawalFeerecord component.Returns the value of thenextStakeWithdrawalFeerecord component.static StakePoolStateparseProgramData(byte[] data) static StakePoolStateparseProgramData(software.sava.core.accounts.PublicKey address, byte[] data) software.sava.core.accounts.PublicKeypoolMint()Returns the value of thepoolMintrecord component.Returns the value of thepoolTokenSupplyrecord component.software.sava.core.accounts.PublicKeyReturns the value of thepreferredDepositValidatorVoteAddressrecord component.software.sava.core.accounts.PublicKeyReturns the value of thepreferredWithdrawValidatorVoteAddressrecord component.software.sava.core.accounts.PublicKeyReturns the value of thereserveStakerecord component.software.sava.core.accounts.PublicKeyReturns the value of thesolDepositAuthorityrecord component.Returns the value of thesolDepositFeerecord component.intReturns the value of thesolReferralFeerecord component.Returns the value of thesolWithdrawalFeerecord component.software.sava.core.accounts.PublicKeyReturns the value of thesolWithdrawAuthorityrecord component.software.sava.core.accounts.PublicKeyReturns the value of thestakeDepositAuthorityrecord component.Returns the value of thestakeDepositFeerecord component.software.sava.core.accounts.PublicKeystaker()Returns the value of thestakerrecord component.intReturns the value of thestakeReferralFeerecord component.Returns the value of thestakeWithdrawalFeerecord component.intReturns the value of thestakeWithdrawBumpSeedrecord component.software.sava.core.accounts.PublicKeyReturns the value of thetokenProgramIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalLamportsrecord component.software.sava.core.accounts.PublicKeyReturns the value of thevalidatorListrecord component.
-
Field Details
-
MANAGER_OFFSET
public static final int MANAGER_OFFSET- See Also:
-
STAKE_OFFSET
public static final int STAKE_OFFSET- See Also:
-
STAKE_DEPOSIT_AUTHORITY_OFFSET
public static final int STAKE_DEPOSIT_AUTHORITY_OFFSET- See Also:
-
STAKE_WITHDRAWAL_BUMP_SEED_OFFSET
public static final int STAKE_WITHDRAWAL_BUMP_SEED_OFFSET- See Also:
-
VALIDATOR_LIST_OFFSET
public static final int VALIDATOR_LIST_OFFSET- See Also:
-
RESERVE_STAKE_OFFSET
public static final int RESERVE_STAKE_OFFSET- See Also:
-
POOL_MINT_OFFSET
public static final int POOL_MINT_OFFSET- See Also:
-
MANAGER_FEE_OFFSET
public static final int MANAGER_FEE_OFFSET- See Also:
-
TOKEN_PROGRAM_ID_OFFSET
public static final int TOKEN_PROGRAM_ID_OFFSET- See Also:
-
TOTAL_LAMPORTS_OFFSET
public static final int TOTAL_LAMPORTS_OFFSET- See Also:
-
POOL_TOKEN_SUPPLY_OFFSET
public static final int POOL_TOKEN_SUPPLY_OFFSET- See Also:
-
LAST_UPDATE_EPOCH_OFFSET
public static final int LAST_UPDATE_EPOCH_OFFSET- See Also:
-
LOCKUP_OFFSET
public static final int LOCKUP_OFFSET- See Also:
-
EPOCH_FEE_OFFSET
public static final int EPOCH_FEE_OFFSET- See Also:
-
NEXT_EPOCH_FEE_OFFSET
public static final int NEXT_EPOCH_FEE_OFFSET- See Also:
-
FACTORY
-
-
Constructor Details
-
StakePoolState
public StakePoolState(software.sava.core.accounts.PublicKey address, AccountType accountType, software.sava.core.accounts.PublicKey manager, software.sava.core.accounts.PublicKey staker, software.sava.core.accounts.PublicKey stakeDepositAuthority, int stakeWithdrawBumpSeed, software.sava.core.accounts.PublicKey validatorList, software.sava.core.accounts.PublicKey reserveStake, software.sava.core.accounts.PublicKey poolMint, software.sava.core.accounts.PublicKey managerFeeAccount, software.sava.core.accounts.PublicKey tokenProgramId, BigDecimal totalLamports, BigDecimal poolTokenSupply, long lastUpdateEpoch, LockUp lockUp, StakePoolState.Fee epochFee, StakePoolState.FutureEpochFee nextEpochFee, software.sava.core.accounts.PublicKey preferredDepositValidatorVoteAddress, software.sava.core.accounts.PublicKey preferredWithdrawValidatorVoteAddress, StakePoolState.Fee stakeDepositFee, StakePoolState.Fee stakeWithdrawalFee, StakePoolState.FutureEpochFee nextStakeWithdrawalFee, int stakeReferralFee, software.sava.core.accounts.PublicKey solDepositAuthority, StakePoolState.Fee solDepositFee, int solReferralFee, software.sava.core.accounts.PublicKey solWithdrawAuthority, StakePoolState.Fee solWithdrawalFee, StakePoolState.FutureEpochFee nextSolWithdrawalFee, long lastEpochPoolTokenSupply, long lastEpochTotalLamports) Creates an instance of aStakePoolStaterecord class.- Parameters:
address- the value for theaddressrecord componentaccountType- the value for theaccountTyperecord componentmanager- the value for themanagerrecord componentstaker- the value for thestakerrecord componentstakeDepositAuthority- the value for thestakeDepositAuthorityrecord componentstakeWithdrawBumpSeed- the value for thestakeWithdrawBumpSeedrecord componentvalidatorList- the value for thevalidatorListrecord componentreserveStake- the value for thereserveStakerecord componentpoolMint- the value for thepoolMintrecord componentmanagerFeeAccount- the value for themanagerFeeAccountrecord componenttokenProgramId- the value for thetokenProgramIdrecord componenttotalLamports- the value for thetotalLamportsrecord componentpoolTokenSupply- the value for thepoolTokenSupplyrecord componentlastUpdateEpoch- the value for thelastUpdateEpochrecord componentlockUp- the value for thelockUprecord componentepochFee- the value for theepochFeerecord componentnextEpochFee- the value for thenextEpochFeerecord componentpreferredDepositValidatorVoteAddress- the value for thepreferredDepositValidatorVoteAddressrecord componentpreferredWithdrawValidatorVoteAddress- the value for thepreferredWithdrawValidatorVoteAddressrecord componentstakeDepositFee- the value for thestakeDepositFeerecord componentstakeWithdrawalFee- the value for thestakeWithdrawalFeerecord componentnextStakeWithdrawalFee- the value for thenextStakeWithdrawalFeerecord componentstakeReferralFee- the value for thestakeReferralFeerecord componentsolDepositAuthority- the value for thesolDepositAuthorityrecord componentsolDepositFee- the value for thesolDepositFeerecord componentsolReferralFee- the value for thesolReferralFeerecord componentsolWithdrawAuthority- the value for thesolWithdrawAuthorityrecord componentsolWithdrawalFee- the value for thesolWithdrawalFeerecord componentnextSolWithdrawalFee- the value for thenextSolWithdrawalFeerecord componentlastEpochPoolTokenSupply- the value for thelastEpochPoolTokenSupplyrecord componentlastEpochTotalLamports- the value for thelastEpochTotalLamportsrecord component
-
-
Method Details
-
calculateSolPrice
-
calculateSolPrice
-
parseProgramData
-
parseProgramData
public static StakePoolState parseProgramData(software.sava.core.accounts.PublicKey address, byte[] data) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
address
public software.sava.core.accounts.PublicKey address()Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
accountType
Returns the value of theaccountTyperecord component.- Returns:
- the value of the
accountTyperecord component
-
manager
public software.sava.core.accounts.PublicKey manager()Returns the value of themanagerrecord component.- Returns:
- the value of the
managerrecord component
-
staker
public software.sava.core.accounts.PublicKey staker()Returns the value of thestakerrecord component.- Returns:
- the value of the
stakerrecord component
-
stakeDepositAuthority
public software.sava.core.accounts.PublicKey stakeDepositAuthority()Returns the value of thestakeDepositAuthorityrecord component.- Returns:
- the value of the
stakeDepositAuthorityrecord component
-
stakeWithdrawBumpSeed
public int stakeWithdrawBumpSeed()Returns the value of thestakeWithdrawBumpSeedrecord component.- Returns:
- the value of the
stakeWithdrawBumpSeedrecord component
-
validatorList
public software.sava.core.accounts.PublicKey validatorList()Returns the value of thevalidatorListrecord component.- Returns:
- the value of the
validatorListrecord component
-
reserveStake
public software.sava.core.accounts.PublicKey reserveStake()Returns the value of thereserveStakerecord component.- Returns:
- the value of the
reserveStakerecord component
-
poolMint
public software.sava.core.accounts.PublicKey poolMint()Returns the value of thepoolMintrecord component.- Returns:
- the value of the
poolMintrecord component
-
managerFeeAccount
public software.sava.core.accounts.PublicKey managerFeeAccount()Returns the value of themanagerFeeAccountrecord component.- Returns:
- the value of the
managerFeeAccountrecord component
-
tokenProgramId
public software.sava.core.accounts.PublicKey tokenProgramId()Returns the value of thetokenProgramIdrecord component.- Returns:
- the value of the
tokenProgramIdrecord component
-
totalLamports
Returns the value of thetotalLamportsrecord component.- Returns:
- the value of the
totalLamportsrecord component
-
poolTokenSupply
Returns the value of thepoolTokenSupplyrecord component.- Returns:
- the value of the
poolTokenSupplyrecord component
-
lastUpdateEpoch
public long lastUpdateEpoch()Returns the value of thelastUpdateEpochrecord component.- Returns:
- the value of the
lastUpdateEpochrecord component
-
lockUp
Returns the value of thelockUprecord component.- Returns:
- the value of the
lockUprecord component
-
epochFee
Returns the value of theepochFeerecord component.- Returns:
- the value of the
epochFeerecord component
-
nextEpochFee
Returns the value of thenextEpochFeerecord component.- Returns:
- the value of the
nextEpochFeerecord component
-
preferredDepositValidatorVoteAddress
public software.sava.core.accounts.PublicKey preferredDepositValidatorVoteAddress()Returns the value of thepreferredDepositValidatorVoteAddressrecord component.- Returns:
- the value of the
preferredDepositValidatorVoteAddressrecord component
-
preferredWithdrawValidatorVoteAddress
public software.sava.core.accounts.PublicKey preferredWithdrawValidatorVoteAddress()Returns the value of thepreferredWithdrawValidatorVoteAddressrecord component.- Returns:
- the value of the
preferredWithdrawValidatorVoteAddressrecord component
-
stakeDepositFee
Returns the value of thestakeDepositFeerecord component.- Returns:
- the value of the
stakeDepositFeerecord component
-
stakeWithdrawalFee
Returns the value of thestakeWithdrawalFeerecord component.- Returns:
- the value of the
stakeWithdrawalFeerecord component
-
nextStakeWithdrawalFee
Returns the value of thenextStakeWithdrawalFeerecord component.- Returns:
- the value of the
nextStakeWithdrawalFeerecord component
-
stakeReferralFee
public int stakeReferralFee()Returns the value of thestakeReferralFeerecord component.- Returns:
- the value of the
stakeReferralFeerecord component
-
solDepositAuthority
public software.sava.core.accounts.PublicKey solDepositAuthority()Returns the value of thesolDepositAuthorityrecord component.- Returns:
- the value of the
solDepositAuthorityrecord component
-
solDepositFee
Returns the value of thesolDepositFeerecord component.- Returns:
- the value of the
solDepositFeerecord component
-
solReferralFee
public int solReferralFee()Returns the value of thesolReferralFeerecord component.- Returns:
- the value of the
solReferralFeerecord component
-
solWithdrawAuthority
public software.sava.core.accounts.PublicKey solWithdrawAuthority()Returns the value of thesolWithdrawAuthorityrecord component.- Returns:
- the value of the
solWithdrawAuthorityrecord component
-
solWithdrawalFee
Returns the value of thesolWithdrawalFeerecord component.- Returns:
- the value of the
solWithdrawalFeerecord component
-
nextSolWithdrawalFee
Returns the value of thenextSolWithdrawalFeerecord component.- Returns:
- the value of the
nextSolWithdrawalFeerecord component
-
lastEpochPoolTokenSupply
public long lastEpochPoolTokenSupply()Returns the value of thelastEpochPoolTokenSupplyrecord component.- Returns:
- the value of the
lastEpochPoolTokenSupplyrecord component
-
lastEpochTotalLamports
public long lastEpochTotalLamports()Returns the value of thelastEpochTotalLamportsrecord component.- Returns:
- the value of the
lastEpochTotalLamportsrecord component
-