-
- All Known Subinterfaces:
MessageVisitor.LegacyMessageView,MessageVisitor.Version0MessageView
- Enclosing interface:
- MessageVisitor<T>
public static interface MessageVisitor.MessageViewInterface representing a view of a Solana Message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountAccountsSigned()Returns the count of signed accounts in the message.intcountAccountsSignedReadOnly()Returns the count of read-only signed accounts in the message.intcountAccountsUnsignedReadOnly()Returns the count of read-only unsigned accounts in the message.PublicKeyfeePayer()Returns the public key of the fee payer for the transaction.booleanisSigner(PublicKey account)Checks if the given account is a signer.BlockhashrecentBlockHash()Returns the recent blockhash for the transaction.java.nio.ByteBuffersignature(PublicKey account)Retrieves the stored signature for the given account as aByteBuffer.java.util.List<PublicKey>signers()Returns the list of signer public keys for the transaction.java.util.List<PublicKey>staticAccounts()Returns the list of static accounts in the message.java.nio.ByteBuffertransaction()Returns a duplicate of the transaction data as aByteBuffer.
-
-
-
Method Detail
-
countAccountsSigned
int countAccountsSigned()
Returns the count of signed accounts in the message.- Returns:
- the number of signed accounts
-
countAccountsSignedReadOnly
int countAccountsSignedReadOnly()
Returns the count of read-only signed accounts in the message.- Returns:
- the number of read-only signed accounts
-
countAccountsUnsignedReadOnly
int countAccountsUnsignedReadOnly()
Returns the count of read-only unsigned accounts in the message.- Returns:
- the number of read-only unsigned accounts
-
staticAccounts
java.util.List<PublicKey> staticAccounts()
Returns the list of static accounts in the message.- Returns:
- a list of
PublicKeyobjects representing the static accounts
-
transaction
java.nio.ByteBuffer transaction()
Returns a duplicate of the transaction data as aByteBuffer.The returned buffer is created by calling
duplicate()on the underlying transaction data buffer. Its position is set to 0, its limit is set to its capacity, and its capacity will be the size of the transaction in bytes. Note that while the duplicate shares the same underlying data, modifications to its position, limit, or mark do not affect the original buffer.- Returns:
- a duplicate of the transaction data as a
ByteBuffer
-
signature
java.nio.ByteBuffer signature(PublicKey account)
Retrieves the stored signature for the given account as aByteBuffer.This method returns a read-only buffer containing the signature. The buffer's position is set to 0, and its limit is set to its capacity.
- Parameters:
account- the account whose signature is retrieved- Returns:
- a
ByteBuffercontaining the signature data
-
feePayer
PublicKey feePayer()
Returns the public key of the fee payer for the transaction.- Returns:
- the
PublicKeyof the fee payer
-
recentBlockHash
Blockhash recentBlockHash()
Returns the recent blockhash for the transaction.- Returns:
- the
Blockhashof the recent blockhash
-
isSigner
boolean isSigner(PublicKey account)
Checks if the given account is a signer.- Parameters:
account- the account to check- Returns:
trueif the account is a signer,falseotherwise
-
-