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
  • Field Details

  • 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 a StakePoolState record class.
      Parameters:
      address - the value for the address record component
      accountType - the value for the accountType record component
      manager - the value for the manager record component
      staker - the value for the staker record component
      stakeDepositAuthority - the value for the stakeDepositAuthority record component
      stakeWithdrawBumpSeed - the value for the stakeWithdrawBumpSeed record component
      validatorList - the value for the validatorList record component
      reserveStake - the value for the reserveStake record component
      poolMint - the value for the poolMint record component
      managerFeeAccount - the value for the managerFeeAccount record component
      tokenProgramId - the value for the tokenProgramId record component
      totalLamports - the value for the totalLamports record component
      poolTokenSupply - the value for the poolTokenSupply record component
      lastUpdateEpoch - the value for the lastUpdateEpoch record component
      lockUp - the value for the lockUp record component
      epochFee - the value for the epochFee record component
      nextEpochFee - the value for the nextEpochFee record component
      preferredDepositValidatorVoteAddress - the value for the preferredDepositValidatorVoteAddress record component
      preferredWithdrawValidatorVoteAddress - the value for the preferredWithdrawValidatorVoteAddress record component
      stakeDepositFee - the value for the stakeDepositFee record component
      stakeWithdrawalFee - the value for the stakeWithdrawalFee record component
      nextStakeWithdrawalFee - the value for the nextStakeWithdrawalFee record component
      stakeReferralFee - the value for the stakeReferralFee record component
      solDepositAuthority - the value for the solDepositAuthority record component
      solDepositFee - the value for the solDepositFee record component
      solReferralFee - the value for the solReferralFee record component
      solWithdrawAuthority - the value for the solWithdrawAuthority record component
      solWithdrawalFee - the value for the solWithdrawalFee record component
      nextSolWithdrawalFee - the value for the nextSolWithdrawalFee record component
      lastEpochPoolTokenSupply - the value for the lastEpochPoolTokenSupply record component
      lastEpochTotalLamports - the value for the lastEpochTotalLamports record component
  • Method Details

    • calculateSolPrice

      public BigDecimal calculateSolPrice(MathContext mathContext)
    • calculateSolPrice

      public BigDecimal calculateSolPrice(int scale, RoundingMode roundingMode)
    • parseProgramData

      public static StakePoolState parseProgramData(byte[] data)
    • parseProgramData

      public static StakePoolState parseProgramData(software.sava.core.accounts.PublicKey address, byte[] data)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • address

      public software.sava.core.accounts.PublicKey address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • accountType

      public AccountType accountType()
      Returns the value of the accountType record component.
      Returns:
      the value of the accountType record component
    • manager

      public software.sava.core.accounts.PublicKey manager()
      Returns the value of the manager record component.
      Returns:
      the value of the manager record component
    • staker

      public software.sava.core.accounts.PublicKey staker()
      Returns the value of the staker record component.
      Returns:
      the value of the staker record component
    • stakeDepositAuthority

      public software.sava.core.accounts.PublicKey stakeDepositAuthority()
      Returns the value of the stakeDepositAuthority record component.
      Returns:
      the value of the stakeDepositAuthority record component
    • stakeWithdrawBumpSeed

      public int stakeWithdrawBumpSeed()
      Returns the value of the stakeWithdrawBumpSeed record component.
      Returns:
      the value of the stakeWithdrawBumpSeed record component
    • validatorList

      public software.sava.core.accounts.PublicKey validatorList()
      Returns the value of the validatorList record component.
      Returns:
      the value of the validatorList record component
    • reserveStake

      public software.sava.core.accounts.PublicKey reserveStake()
      Returns the value of the reserveStake record component.
      Returns:
      the value of the reserveStake record component
    • poolMint

      public software.sava.core.accounts.PublicKey poolMint()
      Returns the value of the poolMint record component.
      Returns:
      the value of the poolMint record component
    • managerFeeAccount

      public software.sava.core.accounts.PublicKey managerFeeAccount()
      Returns the value of the managerFeeAccount record component.
      Returns:
      the value of the managerFeeAccount record component
    • tokenProgramId

      public software.sava.core.accounts.PublicKey tokenProgramId()
      Returns the value of the tokenProgramId record component.
      Returns:
      the value of the tokenProgramId record component
    • totalLamports

      public BigDecimal totalLamports()
      Returns the value of the totalLamports record component.
      Returns:
      the value of the totalLamports record component
    • poolTokenSupply

      public BigDecimal poolTokenSupply()
      Returns the value of the poolTokenSupply record component.
      Returns:
      the value of the poolTokenSupply record component
    • lastUpdateEpoch

      public long lastUpdateEpoch()
      Returns the value of the lastUpdateEpoch record component.
      Returns:
      the value of the lastUpdateEpoch record component
    • lockUp

      public LockUp lockUp()
      Returns the value of the lockUp record component.
      Returns:
      the value of the lockUp record component
    • epochFee

      public StakePoolState.Fee epochFee()
      Returns the value of the epochFee record component.
      Returns:
      the value of the epochFee record component
    • nextEpochFee

      public StakePoolState.FutureEpochFee nextEpochFee()
      Returns the value of the nextEpochFee record component.
      Returns:
      the value of the nextEpochFee record component
    • preferredDepositValidatorVoteAddress

      public software.sava.core.accounts.PublicKey preferredDepositValidatorVoteAddress()
      Returns the value of the preferredDepositValidatorVoteAddress record component.
      Returns:
      the value of the preferredDepositValidatorVoteAddress record component
    • preferredWithdrawValidatorVoteAddress

      public software.sava.core.accounts.PublicKey preferredWithdrawValidatorVoteAddress()
      Returns the value of the preferredWithdrawValidatorVoteAddress record component.
      Returns:
      the value of the preferredWithdrawValidatorVoteAddress record component
    • stakeDepositFee

      public StakePoolState.Fee stakeDepositFee()
      Returns the value of the stakeDepositFee record component.
      Returns:
      the value of the stakeDepositFee record component
    • stakeWithdrawalFee

      public StakePoolState.Fee stakeWithdrawalFee()
      Returns the value of the stakeWithdrawalFee record component.
      Returns:
      the value of the stakeWithdrawalFee record component
    • nextStakeWithdrawalFee

      public StakePoolState.FutureEpochFee nextStakeWithdrawalFee()
      Returns the value of the nextStakeWithdrawalFee record component.
      Returns:
      the value of the nextStakeWithdrawalFee record component
    • stakeReferralFee

      public int stakeReferralFee()
      Returns the value of the stakeReferralFee record component.
      Returns:
      the value of the stakeReferralFee record component
    • solDepositAuthority

      public software.sava.core.accounts.PublicKey solDepositAuthority()
      Returns the value of the solDepositAuthority record component.
      Returns:
      the value of the solDepositAuthority record component
    • solDepositFee

      public StakePoolState.Fee solDepositFee()
      Returns the value of the solDepositFee record component.
      Returns:
      the value of the solDepositFee record component
    • solReferralFee

      public int solReferralFee()
      Returns the value of the solReferralFee record component.
      Returns:
      the value of the solReferralFee record component
    • solWithdrawAuthority

      public software.sava.core.accounts.PublicKey solWithdrawAuthority()
      Returns the value of the solWithdrawAuthority record component.
      Returns:
      the value of the solWithdrawAuthority record component
    • solWithdrawalFee

      public StakePoolState.Fee solWithdrawalFee()
      Returns the value of the solWithdrawalFee record component.
      Returns:
      the value of the solWithdrawalFee record component
    • nextSolWithdrawalFee

      public StakePoolState.FutureEpochFee nextSolWithdrawalFee()
      Returns the value of the nextSolWithdrawalFee record component.
      Returns:
      the value of the nextSolWithdrawalFee record component
    • lastEpochPoolTokenSupply

      public long lastEpochPoolTokenSupply()
      Returns the value of the lastEpochPoolTokenSupply record component.
      Returns:
      the value of the lastEpochPoolTokenSupply record component
    • lastEpochTotalLamports

      public long lastEpochTotalLamports()
      Returns the value of the lastEpochTotalLamports record component.
      Returns:
      the value of the lastEpochTotalLamports record component