fix misspelling of EventAnnouncement

This commit is contained in:
conduition
2024-03-06 22:27:00 +00:00
parent 6a39346f4b
commit 423da8f486
3 changed files with 11 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ use secp::Point;
use crate::{
consts::{P2TR_DUST_VALUE, P2TR_SCRIPT_PUBKEY_SIZE},
errors::Error,
oracles::EventAnnouncment,
oracles::EventAnnouncement,
parties::{MarketMaker, Player},
spend_info::FundingSpendInfo,
};
@@ -44,10 +44,10 @@ pub struct ContractParameters {
pub players: BTreeSet<Player>,
/// The event whose outcome determines the payouts.
pub event: EventAnnouncment,
pub event: EventAnnouncement,
/// A mapping of payout weights under different outcomes. Attestation indexes should
/// align with [`self.event.outcome_messages`][EventAnnouncment::outcome_messages].
/// align with [`self.event.outcome_messages`][EventAnnouncement::outcome_messages].
///
/// If this map does not contain a key of [`Outcome::Expiry`], then there is no expiry
/// condition, and the money simply remains locked in the funding outpoint until the

View File

@@ -1,22 +1,19 @@
//! THIS IS A PLACEHOLDER PACKAGE. DO NOT INSTALL THIS.
pub(crate) mod consts;
pub(crate) mod contract;
pub(crate) mod errors;
pub(crate) mod oracles;
pub(crate) mod parties;
pub(crate) mod spend_info;
pub mod contract;
pub mod hashlock;
pub use secp;
pub use parties::{MarketMaker, Player};
use contract::{
outcome::{OutcomeSignatures, OutcomeTransactionBuildOutput},
split::SplitTransactionBuildOutput,
ContractParameters, SigMap, WinCondition,
};
use errors::Error;
@@ -26,6 +23,10 @@ use secp::{Point, Scalar};
use std::collections::BTreeMap;
pub use contract::{ContractParameters, Outcome, SigMap, WinCondition};
pub use oracles::EventAnnouncement;
pub use parties::{MarketMaker, Player};
/// Represents the combined output of building all transactions and precomputing
/// all necessary data for a ticketed DLC.
pub struct TicketedDLC {
@@ -92,7 +93,7 @@ pub struct ContractSignatures {
/// [`Outcome::Expiry`] payout condition.
pub expiry_tx_signature: Option<CompactSignature>,
/// An ordered vector of adaptor signatures, corresponding to each of the outcomes
/// in [`EventAnnouncement::outcomes`]. Each adaptor signature can be decrypted
/// in [`EventAnnouncement::outcome_messages`]. Each adaptor signature can be decrypted
/// by the [`EventAnnouncement`]'s oracle producing an attestation signature using
/// [`EventAnnouncement::attestation_secret`].
pub outcome_tx_signatures: Vec<AdaptorSignature>,

View File

@@ -2,7 +2,7 @@ use secp::{MaybePoint, MaybeScalar, Point, Scalar};
/// An oracle's announcement of a future event.
#[derive(Debug, Clone)]
pub struct EventAnnouncment {
pub struct EventAnnouncement {
/// The signing oracle's pubkey
pub oracle_pubkey: Point,
@@ -16,7 +16,7 @@ pub struct EventAnnouncment {
pub expiry: u32,
}
impl EventAnnouncment {
impl EventAnnouncement {
/// Computes the oracle's locking point for the given outcome index.
pub fn attestation_lock_point(&self, index: usize) -> Option<MaybePoint> {
let msg = &self.outcome_messages.get(index)?;