-
- All Known Subinterfaces:
MessageVisitor.LegacyMessageView
,MessageVisitor.Version0MessageView
- Enclosing interface:
- MessageVisitor<T>
public static interface MessageVisitor.MessageView
Interface representing a view of a Solana Message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countAccountsSigned()
Returns the count of signed accounts in the message.int
countAccountsSignedReadOnly()
Returns the count of read-only signed accounts in the message.int
countAccountsUnsignedReadOnly()
Returns the count of read-only unsigned accounts in the message.PublicKey
feePayer()
Returns the public key of the fee payer for the transaction.boolean
isSigner(PublicKey account)
Checks if the given account is a signer.Blockhash
recentBlockHash()
Returns the recent blockhash for the transaction.java.nio.ByteBuffer
signature(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.ByteBuffer
transaction()
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
PublicKey
objects 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
ByteBuffer
containing the signature data
-
feePayer
PublicKey feePayer()
Returns the public key of the fee payer for the transaction.- Returns:
- the
PublicKey
of the fee payer
-
recentBlockHash
Blockhash recentBlockHash()
Returns the recent blockhash for the transaction.- Returns:
- the
Blockhash
of the recent blockhash
-
isSigner
boolean isSigner(PublicKey account)
Checks if the given account is a signer.- Parameters:
account
- the account to check- Returns:
true
if the account is a signer,false
otherwise
-
-