Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dlc-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ std = ["dlc/std", "dlc-messages/std", "dlc-trie/std", "bitcoin/std", "lightning/
fuzztarget = ["rand_chacha"]
parallel = ["dlc-trie/parallel"]
use-serde = ["serde", "dlc/use-serde", "dlc-messages/use-serde", "dlc-trie/use-serde"]
async = ["dep:futures"]

[dependencies]
async-trait = "0.1.50"
Expand All @@ -27,6 +28,7 @@ log = "0.4.14"
rand_chacha = {version = "0.3.1", optional = true}
secp256k1-zkp = {version = "0.11.0"}
serde = {version = "1.0", optional = true}
futures = { version = "0.3.31", optional = true }

[dev-dependencies]
bitcoin-rpc-provider = {path = "../bitcoin-rpc-provider"}
Expand Down
14 changes: 14 additions & 0 deletions dlc-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,23 @@ pub trait Oracle {
/// Returns the public key of the oracle.
fn get_public_key(&self) -> XOnlyPublicKey;
/// Returns the announcement for the event with the given id if found.
#[cfg(not(feature = "async"))]
fn get_announcement(&self, event_id: &str) -> Result<OracleAnnouncement, Error>;
/// Returns the attestation for the event with the given id if found.
#[cfg(not(feature = "async"))]
fn get_attestation(&self, event_id: &str) -> Result<OracleAttestation, Error>;
/// Returns the announcement for the event with the given id if found.
#[cfg(feature = "async")]
fn get_announcement(
&self,
event_id: &str,
) -> impl std::future::Future<Output = Result<OracleAnnouncement, Error>> + Send;
/// Returns the attestation for the event with the given id if found.
#[cfg(feature = "async")]
fn get_attestation(
&self,
event_id: &str,
) -> impl std::future::Future<Output = Result<OracleAttestation, Error>> + Send;
}

/// Represents a UTXO.
Expand Down
Loading