Package org.xrpl.xrpl4j.model.ledger
Interface RippleStateObject
- All Superinterfaces:
LedgerObject
- All Known Implementing Classes:
ImmutableRippleStateObject
Represents the RippleState XRP Ledger Object.
There can only be one RippleStateObject per currency for any given pair of accounts. Since no account
is privileged in the XRP Ledger, a RippleStateObject sorts account addresses numerically, to ensure
a canonical form. Whichever address is numerically lower when decoded is deemed the "low account" and the
other is the "high account". The net balance of the trust line is stored from the low account's perspective.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionbalance()The balance of the trust line, from the perspective of the low account.builder()Construct a builder for this class.flags()A set of booleanRippleStateFlagscontaining options enabled for this object.The limit that the high account has set on the trust line.highNode()(Omitted in some historical ledgers) A hint indicating which page of the high account's owner directory links to this object, in case the directory consists of multiple pages.Optional<com.google.common.primitives.UnsignedInteger> The inbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000.Optional<com.google.common.primitives.UnsignedInteger> The outbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000.index()Unique identifier for thisRippleStateObject.default LedgerObject.LedgerEntryTypeThe type of ledger object.lowLimit()The limit that the low account has set on the trust line.lowNode()(Omitted in some historical ledgers) A hint indicating which page of the low account's owner directory links to this object, in case the directory consists of multiple pages.Optional<com.google.common.primitives.UnsignedInteger> The inbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000.Optional<com.google.common.primitives.UnsignedInteger> The outbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000.The identifying hash of the transaction that most recently modified this object.com.google.common.primitives.UnsignedIntegerThe index of the ledger that contains the transaction that most recently modified this object.
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutableRippleStateObject.Builder.
-
ledgerEntryType
The type of ledger object. In this case, this is always "RippleState".- Returns:
- Always
LedgerObject.LedgerEntryType.RIPPLE_STATE.
-
flags
RippleStateFlags flags()A set of booleanRippleStateFlagscontaining options enabled for this object.- Returns:
- The
RippleStateFlagsfor this object.
-
balance
IssuedCurrencyAmount balance()The balance of the trust line, from the perspective of the low account. A negative balance indicates that the low account has issued currency to the high account. The issuer in this is always set to the neutral value ACCOUNT_ONE.- Returns:
- An
IssuedCurrencyAmountcontaining the balance of this trust line.
-
lowLimit
IssuedCurrencyAmount lowLimit()The limit that the low account has set on the trust line. The issuer is the address of the low account that set this limit.- Returns:
- An
IssuedCurrencyAmountcontaining the low account's limit on this trust line.
-
highLimit
IssuedCurrencyAmount highLimit()The limit that the high account has set on the trust line. The issuer is the address of the high account that set this limit.- Returns:
- An
IssuedCurrencyAmountcontaining the high account's limit on this trust line.
-
previousTransactionId
Hash256 previousTransactionId()The identifying hash of the transaction that most recently modified this object.- Returns:
- A
Hash256containing the previous transaction hash.
-
previousTransactionLedgerSequence
com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()The index of the ledger that contains the transaction that most recently modified this object.- Returns:
- An
UnsignedIntegerrepresenting the previous transaction ledger sequence.
-
lowNode
(Omitted in some historical ledgers) A hint indicating which page of the low account's owner directory links to this object, in case the directory consists of multiple pages. -
highNode
(Omitted in some historical ledgers) A hint indicating which page of the high account's owner directory links to this object, in case the directory consists of multiple pages. -
lowQualityIn
Optional<com.google.common.primitives.UnsignedInteger> lowQualityIn()The inbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the low account's inbound quality.
-
lowQualityOut
Optional<com.google.common.primitives.UnsignedInteger> lowQualityOut()The outbound quality set by the low account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the low account's outbound quality.
-
highQualityIn
Optional<com.google.common.primitives.UnsignedInteger> highQualityIn()The inbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the high account's inbound quality.
-
highQualityOut
Optional<com.google.common.primitives.UnsignedInteger> highQualityOut()The outbound quality set by the high account, as an integer in the implied ratioLowQualityOut:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value.- Returns:
- An
Optionalof typeUnsignedIntegerrepresenting the high account's outbound quality.
-
index
Hash256 index()Unique identifier for thisRippleStateObject.- Returns:
- A
Hash256containing the ID.
-