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§
Sourcefn get_public_key(&self) -> XOnlyPublicKey
fn get_public_key(&self) -> XOnlyPublicKey
Returns the public key of the oracle.
Sourcefn get_announcement(&self, event_id: &str) -> Result<OracleAnnouncement, Error>
fn get_announcement(&self, event_id: &str) -> Result<OracleAnnouncement, Error>
Returns the announcement for the event with the given id if found.
Sourcefn get_attestation(&self, event_id: &str) -> Result<OracleAttestation, Error>
fn get_attestation(&self, event_id: &str) -> Result<OracleAttestation, Error>
Returns the attestation for the event with the given id if found.