Skip to content

Commit 68f7f81

Browse files
author
nostronaut
committed
mmr: add mmr feature
1 parent 3daeb11 commit 68f7f81

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

crates/nostr/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ nip19 = ["dep:bech32"]
2525
nip21 = ["nip19"]
2626
nip46 = ["nip04"]
2727
nip47 = ["nip04"]
28+
mmr = []
2829

2930
[dependencies]
3031
aes = { version = "0.8", optional = true }

crates/nostr/src/event/builder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use core::fmt;
77
#[cfg(not(target_arch = "wasm32"))]
88
use std::time::Instant;
9-
9+
#[cfg(feature = "mmr")]
1010
use bitcoin_hashes::sha256::Hash;
1111
#[cfg(target_arch = "wasm32")]
1212
use instant::Instant;
@@ -172,6 +172,7 @@ impl EventBuilder {
172172
}
173173

174174
/// Build MMR [`Event`]
175+
#[cfg(feature = "mmr")]
175176
pub fn to_mmr_event(
176177
self,
177178
keys: &Keys,
@@ -186,6 +187,7 @@ impl EventBuilder {
186187
}
187188

188189
/// Build unsigned MMR [`Event`]
190+
#[cfg(feature = "mmr")]
189191
pub fn to_unsigned_mmr_event(
190192
self,
191193
pubkey: XOnlyPublicKey,

0 commit comments

Comments
 (0)