ClaimReward
[Source]
(Added by the [BalanceRewards amendment][].)
Opt-in + Claim
Section titled “Opt-in + Claim”{ "TransactionType": "ClaimReward", "Account": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm", "Issuer": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"}
Opt-out
Section titled “Opt-out”{ "TransactionType": "ClaimReward", "Account": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm", "Flags": 1}
Fields
Section titled “Fields”Field | JSON Type | [Internal Type][] | Description |
---|---|---|---|
Account | String | AccountID | The address of the account that is claiming the reward. |
Flags | Number | UInt32 | (Optional) Can have flag 1 set to opt-out of rewards. |
Issuer | String | AccountID | (Optional) The genesis account. |
ClaimReward Flags
Section titled “ClaimReward Flags”Transactions of the ClaimReward type support additional values in the Flags
field, as follows:
Flag Name | Hex Value | Decimal Value | Description |
---|---|---|---|
tfOptOut | 0x00000001 | 1 | The isOptOut flag in the ClaimReward code is used to opt-out an account from rewards by removing reward-related fields from the account object in the ledger if the sfFlags field in the transaction is set to 1. |
Special Transaction Cost
Section titled “Special Transaction Cost”The ClaimReward transaction has a standard transaction cost, which is the minimum transaction cost required for all transactions.
Error Cases
Section titled “Error Cases”Besides errors that can occur for all transactions, ClaimReward transactions can result in the following transaction result codes:
Error Code | Description |
---|---|
temDISABLED | Occurs if the feature is not enabled. |
temINVALID_FLAG | Occurs if the flag is set to a value other than 1. |
temMALFORMED | Occurs if the issuer is the same as the source account or if the flag and issuer are not correctly set. |
tecNO_ISSUER | Occurs if the issuer does not exist. |
terNO_ACCOUNT | Occurs if the sending account does not exist. |