Module com.lmax.solana4j.client
Package com.lmax.solana4j.client.api
Interface TransactionResponse.TransactionMetadata.Reward
-
- Enclosing interface:
- TransactionResponse.TransactionMetadata
public static interface TransactionResponse.TransactionMetadata.Reward
Represents a reward given to a validator or account on the Solana blockchain. This interface provides access to details about the reward, including the recipient's public key, the amount of lamports rewarded, the post-reward balance, the reward type, and any commission involved.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getCommission()
Returns the commission percentage taken from the reward.long
getLamports()
Returns the amount of lamports received as a reward.long
getPostBalance()
Returns the post-reward balance of the account.java.lang.String
getPubkey()
Returns the public key of the account or validator receiving the reward.java.lang.String
getRewardType()
Returns the type of the reward.
-
-
-
Method Detail
-
getPubkey
java.lang.String getPubkey()
Returns the public key of the account or validator receiving the reward. The public key is a base58-encoded string representing the recipient's account.- Returns:
- the base58-encoded public key of the reward recipient
-
getLamports
long getLamports()
Returns the amount of lamports received as a reward. Lamports are the smallest unit of SOL, the native token of Solana.- Returns:
- the amount of lamports rewarded
-
getPostBalance
long getPostBalance()
Returns the post-reward balance of the account. This is the account's balance after the reward has been applied.- Returns:
- the post-reward balance in lamports
-
getRewardType
java.lang.String getRewardType()
Returns the type of the reward. The reward type may represent different categories, such as staking rewards or inflation rewards.- Returns:
- the string representing the type of the reward
-
getCommission
int getCommission()
Returns the commission percentage taken from the reward. This applies to validator rewards, where a percentage of the reward is taken as commission. If the commission is not applicable, this can return 0.- Returns:
- the commission percentage, or 0 if no commission is applied
-
-