Skip to main content

OracleFields

Trait OracleFields 

Source
pub trait OracleFields: LedgerObjectCommonFields {
    // Provided methods
    fn owner(&self) -> Result<AccountID> { ... }
    fn oracle_document_id(&self) -> Result<Option<u32>> { ... }
    fn provider(&self) -> Result<StandardBlob> { ... }
    fn asset_class(&self) -> Result<StandardBlob> { ... }
    fn last_update_time(&self) -> Result<u32> { ... }
    fn uri(&self) -> Result<Option<UriBlob>> { ... }
    fn owner_node(&self) -> Result<u64> { ... }
    fn previous_txn_id(&self) -> Result<Hash256> { ... }
    fn previous_txn_lgr_seq(&self) -> Result<u32> { ... }
}
Expand description

Trait providing access to fields specific to Oracle objects in any ledger.

Provided Methods§

Source

fn owner(&self) -> Result<AccountID>

The account with update and delete privileges for the oracle. It’s recommended to set up multi-signing on this account.

Source

fn oracle_document_id(&self) -> Result<Option<u32>>

The OracleDocumentID field (Optional).

Source

fn provider(&self) -> Result<StandardBlob>

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).

Source

fn asset_class(&self) -> Result<StandardBlob>

Arbitrary string to describe the type of asset, such as currency, commodity, or index. Must be formatted as hexadecimal representing ASCII characters (0x20-0x7E), maximum 16 bytes.

Source

fn last_update_time(&self) -> Result<u32>

The time the data was last updated, represented in Unix time. (Note: Unlike many other time values on the XRP Ledger, this value does not use the Ripple Epoch.)

Source

fn uri(&self) -> Result<Option<UriBlob>>

An optional Universal Resource Identifier to reference price data off-chain. This field is limited to 256 bytes.

Source

fn owner_node(&self) -> Result<u64>

A hint indicating which page of the oracle owner’s owner directory links to this entry, in case the directory consists of multiple pages.

Source

fn previous_txn_id(&self) -> Result<Hash256>

The hash of the previous transaction that modified this entry.

Source

fn previous_txn_lgr_seq(&self) -> Result<u32>

The ledger index that this object was most recently modified or created in.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§