diff --git a/src/contract/mod.rs b/src/contract/mod.rs index 2accec3..961c1d6 100644 --- a/src/contract/mod.rs +++ b/src/contract/mod.rs @@ -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, /// 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 diff --git a/src/lib.rs b/src/lib.rs index cde857d..e33f807 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, /// 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, diff --git a/src/oracles.rs b/src/oracles.rs index 21786f0..be0f69f 100644 --- a/src/oracles.rs +++ b/src/oracles.rs @@ -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 { let msg = &self.outcome_messages.get(index)?;