Interface OracleObject

All Superinterfaces:
LedgerObject
All Known Implementing Classes:
ImmutableOracleObject

@Beta @Immutable public interface OracleObject extends LedgerObject
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.

  • Method Details

    • builder

      Construct a OracleObject builder.
      Returns:
      An ImmutableOracleObject.Builder.
    • ledgerEntryType

      @Derived default LedgerObject.LedgerEntryType ledgerEntryType()
      The type of ledger object, which will always be "Oracle" in this case.
      Returns:
      Always returns LedgerObject.LedgerEntryType.ORACLE.
    • flags

      @Derived default Flags flags()
      A bit-map of boolean flags. No flags are defined for OracleObject, 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 List of PriceDataWrapper.
    • 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.
      Returns:
      An Optional OracleUri.
    • 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 String containing the owner node hint.
    • previousTransactionId

      Hash256 previousTransactionId()
      The identifying hash of the transaction that most recently modified this object.
      Returns:
      A Hash256 containing 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 UnsignedInteger representing the previous transaction ledger sequence.
    • index

      Hash256 index()
      The unique ID of the OracleObject.
      Returns:
      A Hash256 containing the ID.