Record Class StakeAccount
java.lang.Object
java.lang.Record
software.sava.solana.programs.stake.StakeAccount
public record StakeAccount(software.sava.core.accounts.PublicKey address, StakeState state, long rentExemptReserve, software.sava.core.accounts.PublicKey stakeAuthority, software.sava.core.accounts.PublicKey withdrawAuthority, LockUp lockup, software.sava.core.accounts.PublicKey voterPublicKey, long stake, long activationEpoch, long deActivationEpoch, double warmupCoolDownRate, long creditsObserved, byte stakeFlags)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final software.sava.core.rpc.Filterstatic final intstatic final BiFunction<software.sava.core.accounts.PublicKey, byte[], StakeAccount> 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 int -
Constructor Summary
ConstructorsConstructorDescriptionStakeAccount(software.sava.core.accounts.PublicKey address, StakeState state, long rentExemptReserve, software.sava.core.accounts.PublicKey stakeAuthority, software.sava.core.accounts.PublicKey withdrawAuthority, LockUp lockup, software.sava.core.accounts.PublicKey voterPublicKey, long stake, long activationEpoch, long deActivationEpoch, double warmupCoolDownRate, long creditsObserved, byte stakeFlags) Creates an instance of aStakeAccountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theactivationEpochrecord component.software.sava.core.accounts.PublicKeyaddress()Returns the value of theaddressrecord component.static software.sava.core.rpc.FiltercreateCustodianFilter(software.sava.core.accounts.PublicKey custodian) static software.sava.core.rpc.FiltercreateStakeAuthorityFilter(software.sava.core.accounts.PublicKey stakeAuthority) static software.sava.core.rpc.FiltercreateStateFilter(StakeState state) static software.sava.core.rpc.FiltercreateVoterFilter(software.sava.core.accounts.PublicKey voterPublicKey) static software.sava.core.rpc.FiltercreateWithdrawAuthorityFilter(software.sava.core.accounts.PublicKey stakeAuthority) longReturns the value of thecreditsObservedrecord component.longReturns the value of thedeActivationEpochrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisSet(int mask) lockup()Returns the value of thelockuprecord component.static StakeAccountread(byte[] data, int offset) static StakeAccountread(software.sava.core.accounts.PublicKey address, byte[] data) static StakeAccountread(software.sava.core.accounts.PublicKey address, byte[] data, int offset) longReturns the value of therentExemptReserverecord component.longstake()Returns the value of thestakerecord component.software.sava.core.accounts.PublicKeyReturns the value of thestakeAuthorityrecord component.byteReturns the value of thestakeFlagsrecord component.state()Returns the value of thestaterecord component.state(long currentEpoch) final StringtoString()Returns a string representation of this record class.software.sava.core.accounts.PublicKeyReturns the value of thevoterPublicKeyrecord component.doubleReturns the value of thewarmupCoolDownRaterecord component.software.sava.core.accounts.PublicKeyReturns the value of thewithdrawAuthorityrecord component.
-
Field Details
-
BYTES
public static final int BYTES- See Also:
-
DATA_SIZE_FILTER
public static final software.sava.core.rpc.Filter DATA_SIZE_FILTER -
STATE_OFFSET
public static final int STATE_OFFSET- See Also:
-
RENT_EXEMPT_RESERVE_OFFSET
public static final int RENT_EXEMPT_RESERVE_OFFSET- See Also:
-
STAKE_AUTHORITY_OFFSET
public static final int STAKE_AUTHORITY_OFFSET- See Also:
-
WITHDRAW_AUTHORITY_OFFSET
public static final int WITHDRAW_AUTHORITY_OFFSET- See Also:
-
LOCKUP_OFFSET
public static final int LOCKUP_OFFSET- See Also:
-
LOCKUP_TIMESTAMP_OFFSET
public static final int LOCKUP_TIMESTAMP_OFFSET- See Also:
-
LOCKUP_EPOCH_OFFSET
public static final int LOCKUP_EPOCH_OFFSET- See Also:
-
LOCKUP_CUSTODIAN_OFFSET
public static final int LOCKUP_CUSTODIAN_OFFSET- See Also:
-
VOTER_PUBLIC_KEY_OFFSET
public static final int VOTER_PUBLIC_KEY_OFFSET- See Also:
-
STAKE_OFFSET
public static final int STAKE_OFFSET- See Also:
-
ACTIVATION_EPOCH_OFFSET
public static final int ACTIVATION_EPOCH_OFFSET- See Also:
-
DE_ACTIVATION_EPOCH_OFFSET
public static final int DE_ACTIVATION_EPOCH_OFFSET- See Also:
-
WARMUP_COOLDOWN_RATE_OFFSET
public static final int WARMUP_COOLDOWN_RATE_OFFSET- See Also:
-
CREDITS_OBSERVED_OFFSET
public static final int CREDITS_OBSERVED_OFFSET- See Also:
-
STAKE_FLAGS_OFFSET
public static final int STAKE_FLAGS_OFFSET- See Also:
-
MUST_FULLY_ACTIVATE_BEFORE_DEACTIVATION_IS_PERMITTED
public static final int MUST_FULLY_ACTIVATE_BEFORE_DEACTIVATION_IS_PERMITTED- See Also:
-
FACTORY
-
-
Constructor Details
-
StakeAccount
public StakeAccount(software.sava.core.accounts.PublicKey address, StakeState state, long rentExemptReserve, software.sava.core.accounts.PublicKey stakeAuthority, software.sava.core.accounts.PublicKey withdrawAuthority, LockUp lockup, software.sava.core.accounts.PublicKey voterPublicKey, long stake, long activationEpoch, long deActivationEpoch, double warmupCoolDownRate, long creditsObserved, byte stakeFlags) Creates an instance of aStakeAccountrecord class.- Parameters:
address- the value for theaddressrecord componentstate- the value for thestaterecord componentrentExemptReserve- the value for therentExemptReserverecord componentstakeAuthority- the value for thestakeAuthorityrecord componentwithdrawAuthority- the value for thewithdrawAuthorityrecord componentlockup- the value for thelockuprecord componentvoterPublicKey- the value for thevoterPublicKeyrecord componentstake- the value for thestakerecord componentactivationEpoch- the value for theactivationEpochrecord componentdeActivationEpoch- the value for thedeActivationEpochrecord componentwarmupCoolDownRate- the value for thewarmupCoolDownRaterecord componentcreditsObserved- the value for thecreditsObservedrecord componentstakeFlags- the value for thestakeFlagsrecord component
-
-
Method Details
-
state
-
createStateFilter
-
createStakeAuthorityFilter
public static software.sava.core.rpc.Filter createStakeAuthorityFilter(software.sava.core.accounts.PublicKey stakeAuthority) -
createWithdrawAuthorityFilter
public static software.sava.core.rpc.Filter createWithdrawAuthorityFilter(software.sava.core.accounts.PublicKey stakeAuthority) -
createCustodianFilter
public static software.sava.core.rpc.Filter createCustodianFilter(software.sava.core.accounts.PublicKey custodian) -
createVoterFilter
public static software.sava.core.rpc.Filter createVoterFilter(software.sava.core.accounts.PublicKey voterPublicKey) -
isSet
public boolean isSet(int mask) -
read
-
read
-
read
public static StakeAccount read(software.sava.core.accounts.PublicKey address, byte[] data, int offset) -
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
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
rentExemptReserve
public long rentExemptReserve()Returns the value of therentExemptReserverecord component.- Returns:
- the value of the
rentExemptReserverecord component
-
stakeAuthority
public software.sava.core.accounts.PublicKey stakeAuthority()Returns the value of thestakeAuthorityrecord component.- Returns:
- the value of the
stakeAuthorityrecord component
-
withdrawAuthority
public software.sava.core.accounts.PublicKey withdrawAuthority()Returns the value of thewithdrawAuthorityrecord component.- Returns:
- the value of the
withdrawAuthorityrecord component
-
lockup
Returns the value of thelockuprecord component.- Returns:
- the value of the
lockuprecord component
-
voterPublicKey
public software.sava.core.accounts.PublicKey voterPublicKey()Returns the value of thevoterPublicKeyrecord component.- Returns:
- the value of the
voterPublicKeyrecord component
-
stake
public long stake()Returns the value of thestakerecord component.- Returns:
- the value of the
stakerecord component
-
activationEpoch
public long activationEpoch()Returns the value of theactivationEpochrecord component.- Returns:
- the value of the
activationEpochrecord component
-
deActivationEpoch
public long deActivationEpoch()Returns the value of thedeActivationEpochrecord component.- Returns:
- the value of the
deActivationEpochrecord component
-
warmupCoolDownRate
public double warmupCoolDownRate()Returns the value of thewarmupCoolDownRaterecord component.- Returns:
- the value of the
warmupCoolDownRaterecord component
-
creditsObserved
public long creditsObserved()Returns the value of thecreditsObservedrecord component.- Returns:
- the value of the
creditsObservedrecord component
-
stakeFlags
public byte stakeFlags()Returns the value of thestakeFlagsrecord component.- Returns:
- the value of the
stakeFlagsrecord component
-