Package org.xrpl.xrpl4j.model.ledger
Interface OracleObject
- All Superinterfaces:
LedgerObject
- All Known Implementing Classes:
ImmutableOracleObject
An Oracle ledger entry holds data associated with a single price oracle object.
This interface will be marked Beta until the featurePriceOracle amendment is enabled on mainnet. Its API
is subject to change.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.xrpl.xrpl4j.model.ledger.LedgerObject
LedgerObject.LedgerEntryType -
Method Summary
Modifier and TypeMethodDescriptionDescribes the type of asset, such as "currency", "commodity", or "index".builder()Construct aOracleObjectbuilder.default Flagsflags()A bit-map of boolean flags.index()The unique ID of theOracleObject.com.google.common.primitives.UnsignedIntegerThe time the data was last updated, represented in Unix time.default LedgerObject.LedgerEntryTypeThe type of ledger object, which will always be "Oracle" in this case.owner()The XRPL account with update and delete privileges for the oracle.A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.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.An array of up to 10 PriceData objects, each representing the price information for a token pair.provider()An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA.uri()An optional Universal Resource Identifier to reference price data off-chain.
-
Method Details
-
builder
Construct aOracleObjectbuilder.- Returns:
- An
ImmutableOracleObject.Builder.
-
ledgerEntryType
The type of ledger object, which will always be "Oracle" in this case.- Returns:
- Always returns
LedgerObject.LedgerEntryType.ORACLE.
-
flags
A bit-map of boolean flags. No flags are defined forOracleObject, so this value is always 0.- Returns:
- Always
Flags.UNSET.
-
owner
Address owner()The XRPL account with update and delete privileges for the oracle. It's recommended to set up multi-signing on this account.- Returns:
- An
Address.
-
provider
OracleProvider provider()An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA. This field is a string, up to 256 ASCII hex encoded characters (0x20-0x7E).- Returns:
- An
OracleProvider.
-
priceDataSeries
List<PriceDataWrapper> priceDataSeries()An array of up to 10 PriceData objects, each representing the price information for a token pair. More than five PriceData objects require two owner reserves.- Returns:
- A
ListofPriceDataWrapper.
-
assetClass
String assetClass()Describes the type of asset, such as "currency", "commodity", or "index". This field is a string, up to 16 ASCII hex encoded characters (0x20-0x7E).- Returns:
- A
String.
-
lastUpdateTime
com.google.common.primitives.UnsignedInteger lastUpdateTime()The time the data was last updated, represented in Unix time.- Returns:
- An
UnsignedInteger.
-
uri
An optional Universal Resource Identifier to reference price data off-chain. This field is limited to 256 bytes. -
ownerNode
String ownerNode()A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.
- Returns:
- A
Stringcontaining the owner node hint.
-
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.
-
index
Hash256 index()The unique ID of theOracleObject.- Returns:
- A
Hash256containing the ID.
-