Record Class NonceAccount
java.lang.Object
java.lang.Record
software.sava.solana.programs.system.NonceAccount
public record NonceAccount(software.sava.core.accounts.PublicKey address, int version, NonceAccount.State state, software.sava.core.accounts.PublicKey authority, byte[] nonce, long lamportsPerSignature)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final software.sava.core.rpc.Filterstatic final BiFunction<software.sava.core.accounts.PublicKey, byte[], NonceAccount> static final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionNonceAccount(software.sava.core.accounts.PublicKey address, int version, NonceAccount.State state, software.sava.core.accounts.PublicKey authority, byte[] nonce, long lamportsPerSignature) Creates an instance of aNonceAccountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.sava.core.accounts.PublicKeyaddress()Returns the value of theaddressrecord component.software.sava.core.tx.Instructionsoftware.sava.core.tx.InstructionadvanceNonceAccount(software.sava.core.accounts.SolanaAccounts solanaAccounts) software.sava.core.accounts.PublicKeyReturns the value of theauthorityrecord component.static software.sava.core.rpc.FiltercreateAuthorityFilter(software.sava.core.accounts.PublicKey authority) static software.sava.core.rpc.FiltercreateNonceFilter(byte[] nonce) static software.sava.core.rpc.FiltercreateStateFilter(StakeState state) static software.sava.core.rpc.FiltercreateVersionFilter(int version) static software.sava.core.rpc.FiltercreateVersionFilter(long lamportsPerSignature) 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 thelamportsPerSignaturerecord component.byte[]nonce()Returns the value of thenoncerecord component.static NonceAccountread(byte[] data, int offset) static NonceAccountread(software.sava.core.accounts.PublicKey address, byte[] data) static NonceAccountread(software.sava.core.accounts.PublicKey address, byte[] data, int offset) static NonceAccountread(software.sava.rpc.json.http.response.AccountInfo<byte[]> accountInfo) voidsetNonce(software.sava.core.accounts.SolanaAccounts solanaAccounts, software.sava.core.tx.Transaction transaction) voidsetNonce(software.sava.core.tx.Transaction transaction) state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.intversion()Returns the value of theversionrecord 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 -
VERSION_OFFSET
public static final int VERSION_OFFSET- See Also:
-
STATE_OFFSET
public static final int STATE_OFFSET- See Also:
-
AUTHORITY_OFFSET
public static final int AUTHORITY_OFFSET- See Also:
-
NONCE_OFFSET
public static final int NONCE_OFFSET- See Also:
-
LAMPORTS_PER_SIG_OFFSET
public static final int LAMPORTS_PER_SIG_OFFSET- See Also:
-
FACTORY
-
-
Constructor Details
-
NonceAccount
public NonceAccount(software.sava.core.accounts.PublicKey address, int version, NonceAccount.State state, software.sava.core.accounts.PublicKey authority, byte[] nonce, long lamportsPerSignature) Creates an instance of aNonceAccountrecord class.- Parameters:
address- the value for theaddressrecord componentversion- the value for theversionrecord componentstate- the value for thestaterecord componentauthority- the value for theauthorityrecord componentnonce- the value for thenoncerecord componentlamportsPerSignature- the value for thelamportsPerSignaturerecord component
-
-
Method Details
-
createVersionFilter
public static software.sava.core.rpc.Filter createVersionFilter(int version) -
createStateFilter
-
createAuthorityFilter
public static software.sava.core.rpc.Filter createAuthorityFilter(software.sava.core.accounts.PublicKey authority) -
createNonceFilter
public static software.sava.core.rpc.Filter createNonceFilter(byte[] nonce) -
createVersionFilter
public static software.sava.core.rpc.Filter createVersionFilter(long lamportsPerSignature) -
read
-
read
public static NonceAccount read(software.sava.rpc.json.http.response.AccountInfo<byte[]> accountInfo) -
read
-
read
public static NonceAccount read(software.sava.core.accounts.PublicKey address, byte[] data, int offset) -
advanceNonceAccount
public software.sava.core.tx.Instruction advanceNonceAccount() -
advanceNonceAccount
public software.sava.core.tx.Instruction advanceNonceAccount(software.sava.core.accounts.SolanaAccounts solanaAccounts) -
setNonce
public void setNonce(software.sava.core.tx.Transaction transaction) -
setNonce
public void setNonce(software.sava.core.accounts.SolanaAccounts solanaAccounts, software.sava.core.tx.Transaction transaction) -
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
-
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
authority
public software.sava.core.accounts.PublicKey authority()Returns the value of theauthorityrecord component.- Returns:
- the value of the
authorityrecord component
-
nonce
public byte[] nonce()Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-
lamportsPerSignature
public long lamportsPerSignature()Returns the value of thelamportsPerSignaturerecord component.- Returns:
- the value of the
lamportsPerSignaturerecord component
-