Interface AccountSet
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutableAccountSet
AccountSet transaction modifies the properties of an account in the XRP Ledger.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThere are several options which can be either enabled or disabled for an account. -
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAccountSet.Builderbuilder()Construct a builder for this class.default voidCheck email hash length.default voidCheck tick size.default voidCheck transfer rate.Unique identifier of a flag to disable for this account.Optional<com.google.common.primitives.UnsignedInteger> A flag to disable for this account, as anUnsignedInteger.domain()The hex string of the lowercase ASCII of the domain for the account.Hash of an email address to be used for generating an avatar image.default AccountSetTransactionFlagsflags()Set ofAccountSetTransactionFlagss for thisAccountSet.Hexadecimal encoded public key for sending encrypted messages to this account.Sets an alternate account that is allowed to mint NFTokens on this account's behalf using NFTokenMint's `Issuer` field.default AccountSetNormalization method to try to getclearFlag()andclearFlagRawValue()to match.default AccountSetNormalization method to try to getsetFlag()andsetFlagRawValue()to match.setFlag()Unique identifier of a flag to enable for this account.Optional<com.google.common.primitives.UnsignedInteger> A flag to disable for this account, as anUnsignedInteger.Optional<com.google.common.primitives.UnsignedInteger> tickSize()Tick size to use for offers involving a currency issued by this address.Optional<com.google.common.primitives.UnsignedInteger> The fee to charge when users transfer this account's issued currencies, represented as billionths of a unit.An arbitrary 256-bit value.Optional<com.google.common.primitives.UnsignedInteger> Not used.Methods inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
account, accountTransactionId, delegate, fee, lastLedgerSequence, memos, networkId, sequence, signers, signingPublicKey, sourceTag, ticketSequence, transactionFlags, transactionSignature, transactionType, unknownFields, validateDelegateNotSameAsAccount
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutableAccountSet.Builder.
-
flags
Set ofAccountSetTransactionFlagss for thisAccountSet. Defaults toAccountSetTransactionFlags.empty().- Returns:
- An
AccountSetTransactionFlags.
-
clearFlag
Optional<AccountSet.AccountSetFlag> clearFlag()Unique identifier of a flag to disable for this account.If this field is empty, developers should check if
clearFlagRawValue()is also empty. IfclearFlagRawValue()is present, it means that theClearFlagfield of the transaction was not a validAccountSet.AccountSetFlagbut was still present in a validated transaction on ledger.Because the preferred way of setting account flags is with
AccountSet.AccountSetFlags, this field should not be set in conjunction with theflags()field.- Returns:
- An
Optionalof typeAccountSet.AccountSetFlagrepresenting the flag to disable on this account.
-
clearFlagRawValue
Optional<com.google.common.primitives.UnsignedInteger> clearFlagRawValue()A flag to disable for this account, as anUnsignedInteger.Developers should prefer setting
clearFlag()and leaving this field empty when constructing a newAccountSet. This field is used to serialize and deserialize the"ClearFlag"field in JSON, as someAccountSettransactions on the XRPL set the "ClearFlag" field to a number that is not recognized as an asf flag by rippled. Without this field, xrpl4j would fail to deserialize those transactions, asAccountSet.AccountSetFlagdoes not support arbitrary integer values.Additionally, using this field as the source of truth for JSON serialization/deserialization rather than
clearFlag()allows developers to recompute the hash of a transaction that was deserialized from a rippled RPC/WS result accurately. An alternative to this field would be to add an enum variant toAccountSet.AccountSetFlagfor unknown values, but binary serializing anAccountSetthat was constructed by deserializing JSON would result in a different binary blob than what exists on ledger.- Returns:
- An
OptionalUnsignedInteger.
-
normalizeClearFlag
Normalization method to try to getclearFlag()andclearFlagRawValue()to match.If neither field is present, there is nothing to do.
If both fields are present, there is nothing to do, but we will check that
clearFlag()'s underlying value equalsclearFlagRawValue().If
clearFlag()is present butclearFlagRawValue()is empty, we setclearFlagRawValue()to the underlying value ofclearFlag().If
clearFlag()is empty andclearFlagRawValue()is present, we will setclearFlag()to theAccountSet.AccountSetFlagvariant associated withclearFlagRawValue(), or leaveclearFlag()empty ifclearFlagRawValue()does not map to anAccountSet.AccountSetFlag.- Returns:
- A normalized
AccountSet.
-
setFlag
Optional<AccountSet.AccountSetFlag> setFlag()Unique identifier of a flag to enable for this account.If this field is empty, developers should check if
setFlagRawValue()is also empty. IfsetFlagRawValue()is present, it means that theClearFlagfield of the transaction was not a validAccountSet.AccountSetFlagbut was still present in a validated transaction on ledger.Because the preferred way of setting account flags is with
AccountSet.AccountSetFlags, this field should not be set in conjunction with theflags()field.- Returns:
- An
Optionalof typeAccountSet.AccountSetFlagrepresenting the flag to enable on this account.
-
setFlagRawValue
Optional<com.google.common.primitives.UnsignedInteger> setFlagRawValue()A flag to disable for this account, as anUnsignedInteger.Developers should prefer setting
setFlag()and leaving this field empty when constructing a newAccountSet. This field is used to serialize and deserialize the"ClearFlag"field in JSON, as someAccountSettransactions on the XRPL set the "ClearFlag" field to a number that is not recognized as an asf flag by rippled. Without this field, xrpl4j would fail to deserialize those transactions, asAccountSet.AccountSetFlagdoes not support arbitrary integer values.Additionally, using this field as the source of truth for JSON serialization/deserialization rather than
setFlag()allows developers to recompute the hash of a transaction that was deserialized from a rippled RPC/WS result accurately. An alternative to this field would be to add an enum variant toAccountSet.AccountSetFlagfor unknown values, but binary serializing anAccountSetthat was constructed by deserializing JSON would result in a different binary blob than what exists on ledger.- Returns:
- An
OptionalUnsignedInteger
-
normalizeSetFlag
Normalization method to try to getsetFlag()andsetFlagRawValue()to match.If neither field is present, there is nothing to do.
If both fields are present, there is nothing to do, but we will check that
setFlag()'s underlying value equalssetFlagRawValue().If
setFlag()is present butsetFlagRawValue()is empty, we setsetFlagRawValue()to the underlying value ofsetFlag().If
setFlag()is empty andsetFlagRawValue()is present, we will setsetFlag()to theAccountSet.AccountSetFlagvariant associated withsetFlagRawValue(), or leavesetFlag()empty ifsetFlagRawValue()does not map to anAccountSet.AccountSetFlag.- Returns:
- A normalized
AccountSet.
-
domain
The hex string of the lowercase ASCII of the domain for the account. For example, the domain example.com would be represented as "6578616D706C652E636F6D".To remove the Domain field from an account, send an
AccountSetwith this domain field set to an empty string. -
emailHash
Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. -
messageKey
Hexadecimal encoded public key for sending encrypted messages to this account. -
transferRate
Optional<com.google.common.primitives.UnsignedInteger> transferRate()The fee to charge when users transfer this account's issued currencies, represented as billionths of a unit. Cannot be more than 2000000000 or less than 1000000000, except for the special case 0 meaning no fee.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the transfer rate.
-
tickSize
Optional<com.google.common.primitives.UnsignedInteger> tickSize()Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are 3 to 15 inclusive, or 0 to disable.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the tick size.
-
mintAccount
Sets an alternate account that is allowed to mint NFTokens on this account's behalf using NFTokenMint's `Issuer` field. -
walletLocator
An arbitrary 256-bit value. If specified, the value is stored as part of the account but has no inherent meaning or requirements.- Returns:
- The 256-bit value as a hex encoded
String.
-
walletSize
Optional<com.google.common.primitives.UnsignedInteger> walletSize()Not used. This field is valid in AccountSet transactions but does nothing.- Returns:
- An optionally present
UnsignedInteger.
-
checkEmailHashLength
@Check default void checkEmailHashLength()Check email hash length. -
checkTransferRate
@Check default void checkTransferRate()Check transfer rate. -
checkTickSize
@Check default void checkTickSize()Check tick size.
-