Interface AccountCurrenciesResult
-
- All Superinterfaces:
XrplResult
- All Known Implementing Classes:
ImmutableAccountCurrenciesResult
@Immutable public interface AccountCurrenciesResult extends XrplResult
The result of an account_currencies rippled call.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static ImmutableAccountCurrenciesResult.Builder
builder()
Optional<LedgerIndex>
ledgerCurrentIndex()
The ledger index of the current open ledger, which was used when retrieving this information.default LedgerIndex
ledgerCurrentIndexSafe()
Optional<Hash256>
ledgerHash()
The identifying Hash of the ledger version used to generate this response.default Hash256
ledgerHashSafe()
LedgerIndex
ledgerIndex()
Deprecated.When requesting Account Channels from a non-validated ledger, the result will not contain this field.default LedgerIndex
ledgerIndexSafe()
List<String>
receiveCurrencies()
Array of currency codes for currencies that this account can receive.List<String>
sendCurrencies()
Array of currency codes for currencies that this account can send.boolean
validated()
If true, the information in this response comes from a validated ledger version.-
Methods inherited from interface org.xrpl.xrpl4j.model.client.XrplResult
status
-
-
-
-
Method Detail
-
builder
static ImmutableAccountCurrenciesResult.Builder builder()
-
ledgerHash
Optional<Hash256> ledgerHash()
The identifying Hash of the ledger version used to generate this response.- Returns:
- A
Hash256
containing the ledger hash.
-
ledgerHashSafe
@Auxiliary default Hash256 ledgerHashSafe()
- Returns:
- The value of
ledgerHash()
. - Throws:
IllegalStateException
- IfledgerHash()
is empty.
-
ledgerIndex
@Deprecated @Nullable LedgerIndex ledgerIndex()
Deprecated.When requesting Account Channels from a non-validated ledger, the result will not contain this field. To prevent this class from throwing an error when requesting Account Currencies from a non-validated ledger, this field is currently marked asNullable
. However, this field will beOptional
in a future release.The Ledger Index of the ledger version used to generate this response.- Returns:
- A
LedgerIndex
.
-
ledgerIndexSafe
@Auxiliary default LedgerIndex ledgerIndexSafe()
- Returns:
- The value of
ledgerIndex()
. - Throws:
IllegalStateException
- IfledgerIndex()
is null.
-
ledgerCurrentIndex
Optional<LedgerIndex> ledgerCurrentIndex()
The ledger index of the current open ledger, which was used when retrieving this information. Only present in responses to requests with ledger_index = "current".- Returns:
- An optionally-present
LedgerIndex
representing the current ledger index.
-
ledgerCurrentIndexSafe
@Auxiliary default LedgerIndex ledgerCurrentIndexSafe()
- Returns:
- The value of
ledgerCurrentIndex()
. - Throws:
IllegalStateException
- IfledgerCurrentIndex()
is empty.
-
validated
boolean validated()
If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.- Returns:
true
if the information in this response comes from a validated ledger version,false
if not.
-
receiveCurrencies
List<String> receiveCurrencies()
Array of currency codes for currencies that this account can receive.- Returns:
- Array of currencies that this account can receive.
-
-