Trait dlc_manager::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§
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.