Skip to content

Commit fecadbd

Browse files
committed
nwc: add NostrWalletConnectOptions::relay method
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent b2d2622 commit fecadbd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

crates/nwc/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929

3030
- Add notification support for real-time payment updates (https://github.com/rust-nostr/nostr/pull/953)
3131
- Add Monitor to NostrWalletConnectOptions (https://github.com/rust-nostr/nostr/pull/989)
32+
- Add `NostrWalletConnectOptions::relay` method
33+
34+
### Deprecated
35+
36+
- Deprecate `NostrWalletConnectOptions::connection_mode` method
3237

3338
## v0.42.0 - 2025/05/20
3439

crates/nwc/src/options.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ impl NostrWalletConnectOptions {
3838
}
3939

4040
/// Set connection mode
41+
#[deprecated(
42+
since = "0.43.0",
43+
note = "Use `NostrWalletConnectOptions::relay` instead"
44+
)]
4145
pub fn connection_mode(self, mode: ConnectionMode) -> Self {
4246
Self {
4347
relay: self.relay.connection_mode(mode),
@@ -58,4 +62,12 @@ impl NostrWalletConnectOptions {
5862
self.monitor = Some(monitor);
5963
self
6064
}
65+
66+
/// Set relay options
67+
pub fn relay(self, opts: RelayOptions) -> Self {
68+
Self {
69+
relay: opts,
70+
..self
71+
}
72+
}
6173
}

0 commit comments

Comments
 (0)