pub struct OracleAttestation {
pub event_id: String,
pub oracle_public_key: XOnlyPublicKey,
pub signatures: Vec<Signature>,
pub outcomes: Vec<String>,
}
Expand description
An attestation from an oracle providing signatures over an outcome value.
Fields§
§event_id: String
The identifier of the announcement.
oracle_public_key: XOnlyPublicKey
The public key of the oracle.
signatures: Vec<Signature>
The signatures over the event outcome.
outcomes: Vec<String>
The set of strings representing the outcome value.
Implementations§
Source§impl OracleAttestation
impl OracleAttestation
Sourcepub fn validate<C: Verification>(
&self,
secp: &Secp256k1<C>,
announcement: &OracleAnnouncement,
) -> Result<(), Error>
pub fn validate<C: Verification>( &self, secp: &Secp256k1<C>, announcement: &OracleAnnouncement, ) -> Result<(), Error>
Returns whether the attestation satisfy validity checks.
Sourcepub fn nonces(&self) -> Vec<XOnlyPublicKey>
pub fn nonces(&self) -> Vec<XOnlyPublicKey>
Returns the nonces used by the oracle to sign the event outcome. This is used for finding the matching oracle announcement.
Trait Implementations§
Source§impl Clone for OracleAttestation
impl Clone for OracleAttestation
Source§fn clone(&self) -> OracleAttestation
fn clone(&self) -> OracleAttestation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OracleAttestation
impl Debug for OracleAttestation
Source§impl PartialEq for OracleAttestation
impl PartialEq for OracleAttestation
Source§impl Readable for OracleAttestation
impl Readable for OracleAttestation
Source§impl Type for OracleAttestation
impl Type for OracleAttestation
Source§impl Writeable for OracleAttestation
impl Writeable for OracleAttestation
impl Eq for OracleAttestation
impl StructuralPartialEq for OracleAttestation
Auto Trait Implementations§
impl Freeze for OracleAttestation
impl RefUnwindSafe for OracleAttestation
impl Send for OracleAttestation
impl Sync for OracleAttestation
impl Unpin for OracleAttestation
impl UnwindSafe for OracleAttestation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more