Module com.lmax.solana4j.client
Package com.lmax.solana4j.client.api
Interface TransactionResponse.TransactionMetadata
-
- Enclosing interface:
- TransactionResponse
public static interface TransactionResponse.TransactionMetadata
Represents metadata associated with a transaction on the Solana blockchain. This interface provides detailed information about the transaction, such as errors, fees, balances, log messages, rewards, and more.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TransactionResponse.TransactionMetadata.LoadedAddresses
Represents the addresses loaded during a Solana transaction.static interface
TransactionResponse.TransactionMetadata.Reward
Represents a reward given to a validator or account on the Solana blockchain.static interface
TransactionResponse.TransactionMetadata.TokenBalance
Represents the balance of an SPL token in a Solana transaction or account.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getComputeUnitsConsumed()
Returns the number of compute units consumed during the transaction's execution.java.lang.Object
getErr()
Returns any error information associated with the transaction.long
getFee()
Returns the fee paid for processing the transaction.java.util.List<TransactionResponse.InnerInstruction>
getInnerInstructions()
Returns a list of inner instructions executed within the transaction.TransactionResponse.TransactionMetadata.LoadedAddresses
getLoadedAddresses()
Returns the addresses that were loaded during the transaction.java.util.List<java.lang.String>
getLogMessages()
Returns the log messages generated during the transaction.java.util.List<java.lang.Long>
getPostBalances()
Returns a list of balances after the transaction was processed.java.util.List<TransactionResponse.TransactionMetadata.TokenBalance>
getPostTokenBalances()
Returns a list of token balances after the transaction was processed.java.util.List<java.lang.Long>
getPreBalances()
Returns a list of balances before the transaction was processed.java.util.List<TransactionResponse.TransactionMetadata.TokenBalance>
getPreTokenBalances()
Returns a list of token balances before the transaction was processed.java.util.List<TransactionResponse.TransactionMetadata.Reward>
getRewards()
Returns a list of rewards distributed as part of the transaction.java.util.Map.Entry<java.lang.String,java.lang.Object>
getStatus()
Returns the transaction status, including the status type and message.
-
-
-
Method Detail
-
getErr
java.lang.Object getErr()
Returns any error information associated with the transaction. If the transaction was successful, this method returns null; otherwise, it returns an object representing the error.- Returns:
- an object representing the error, or null if the transaction was successful
-
getFee
long getFee()
Returns the fee paid for processing the transaction. The fee is deducted in lamports, which are the smallest unit of SOL.- Returns:
- the transaction fee in lamports
-
getInnerInstructions
java.util.List<TransactionResponse.InnerInstruction> getInnerInstructions()
Returns a list of inner instructions executed within the transaction. Inner instructions are additional program invocations that occur as part of the transaction.- Returns:
- a list of
TransactionResponse.InnerInstruction
objects representing the inner instructions
-
getLogMessages
java.util.List<java.lang.String> getLogMessages()
Returns the log messages generated during the transaction. These messages can provide insights into the execution of the transaction, including program-specific logging.- Returns:
- a list of log messages as strings
-
getPreBalances
java.util.List<java.lang.Long> getPreBalances()
Returns a list of balances before the transaction was processed. Each balance corresponds to an account involved in the transaction, represented in lamports.- Returns:
- a list of pre-transaction balances in lamports
-
getPostBalances
java.util.List<java.lang.Long> getPostBalances()
Returns a list of balances after the transaction was processed. Each balance corresponds to an account involved in the transaction, represented in lamports.- Returns:
- a list of post-transaction balances in lamports
-
getPreTokenBalances
java.util.List<TransactionResponse.TransactionMetadata.TokenBalance> getPreTokenBalances()
Returns a list of token balances before the transaction was processed. This provides the pre-transaction SPL token balances for accounts that hold tokens.- Returns:
- a list of
TransactionResponse.TransactionMetadata.TokenBalance
objects representing pre-transaction token balances
-
getPostTokenBalances
java.util.List<TransactionResponse.TransactionMetadata.TokenBalance> getPostTokenBalances()
Returns a list of token balances after the transaction was processed. This provides the post-transaction SPL token balances for accounts that hold tokens.- Returns:
- a list of
TransactionResponse.TransactionMetadata.TokenBalance
objects representing post-transaction token balances
-
getRewards
java.util.List<TransactionResponse.TransactionMetadata.Reward> getRewards()
Returns a list of rewards distributed as part of the transaction. Rewards may be given to validators or other participants in the network.- Returns:
- a list of
TransactionResponse.TransactionMetadata.Reward
objects representing the rewards distributed
-
getComputeUnitsConsumed
long getComputeUnitsConsumed()
Returns the number of compute units consumed during the transaction's execution. Compute units represent the computational resources used to process the transaction.- Returns:
- the number of compute units consumed
-
getLoadedAddresses
TransactionResponse.TransactionMetadata.LoadedAddresses getLoadedAddresses()
Returns the addresses that were loaded during the transaction. Loaded addresses may include writable or read-only addresses that provide data or permissions necessary for the transaction's execution.- Returns:
- the
TransactionResponse.TransactionMetadata.LoadedAddresses
object representing loaded addresses
-
getStatus
java.util.Map.Entry<java.lang.String,java.lang.Object> getStatus()
Returns the transaction status, including the status type and message. The status provides additional information on whether the transaction was successful and any related messages.- Returns:
- a
Map.Entry
containing the status type as the key and the status message as the value
-
-