Oracle

Trait Oracle 

Source
pub trait Oracle {
    // Required methods
    fn get_public_key(&self) -> XOnlyPublicKey;
    fn get_announcement(
        &self,
        event_id: &str,
    ) -> Result<OracleAnnouncement, Error>;
    fn get_attestation(
        &self,
        event_id: &str,
    ) -> Result<OracleAttestation, Error>;
}
Expand description

Oracle trait provides access to oracle information.

Required Methods§

Source

fn get_public_key(&self) -> XOnlyPublicKey

Returns the public key of the oracle.

Source

fn get_announcement(&self, event_id: &str) -> Result<OracleAnnouncement, Error>

Returns the announcement for the event with the given id if found.

Source

fn get_attestation(&self, event_id: &str) -> Result<OracleAttestation, Error>

Returns the attestation for the event with the given id if found.

Implementors§