Skip to content

Commit

Permalink
pool: bump async-wsocket to v0.9
Browse files Browse the repository at this point in the history
This `async-wsocket` version include the patch to make `arti-client` work with `tungstenite`.

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
  • Loading branch information
yukibtc committed Sep 14, 2024
1 parent 3300306 commit 178b64e
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
* pool: avoid `Relay` clone in `RelayPool::connect_relay` method ([Yuki Kishimoto])
* pool: `RelayPool::send_event` and `RelayPool::batch_event` send only to relays with `WRITE` flag ([Yuki Kishimoto])
* pool: `RelayPool::subscribe_with_id`, `RelayPool::get_events_of` and `RelayPool::stream_events_of` REQ events only to relays with `READ` flag ([Yuki Kishimoto])
* pool: bump `async-wsocket` to `v0.9` ([Yuki Kishimoto])
* signer: update NIP-04 and NIP-44 methods signature ([Yuki Kishimoto])
* webln: bump `webln` to `v0.3` ([Yuki Kishimoto])
* sqlite: deprecate `SQLiteDatabase` in favor of LMDB ([Yuki Kishimoto])
Expand Down
43 changes: 37 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ web-sys = { version = "0.3", default-features = false }
[patch.crates-io]
# Patch needed to reduce bindings size
bip39 = { git = "https://github.com/rust-bitcoin/rust-bip39", rev = "256a00e7c23c5b2ecc04df90894f60248c8d56d5" }
# TODO: remove when https://github.com/snapview/tungstenite-rs/pull/431 will be merged
tungstenite = { git = "https://github.com/yukibtc/tungstenite-rs", branch = "tor" }

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion crates/nostr-relay-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nip11 = ["nostr/nip11"]

[dependencies]
async-utility.workspace = true
async-wsocket = { version = "0.8", features = ["socks"] }
async-wsocket = { version = "0.9", features = ["socks"] }
atomic-destructor = { workspace = true, features = ["tracing"] }
negentropy = { workspace = true, features = ["std"] }
negentropy-deprecated = { workspace = true, features = ["std"] }
Expand Down
11 changes: 0 additions & 11 deletions crates/nostr-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,6 @@ The following crate feature flags are available:
| `nip57` | Yes | Enable NIP-57: Zaps |
| `nip59` | Yes | Enable NIP-59: Gift Wrap |

### Tor embedded client

The library used under the hood for websocket require a little fix ([PR here](https://github.com/snapview/tungstenite-rs/pull/431))
to work with [`arti-client`](https://crates.io/crates/arti-client) (the pure rust tor implementation).
Until it's merged and released, if you are interested to use the embedded tor client, you have to add the following lines in your `Cargo.toml`:

```toml
[patch.crates-io]
tungstenite = { git = "https://github.com/yukibtc/tungstenite-rs", branch = "tor" }
```

## Supported NIPs

Look at <https://github.com/rust-nostr/nostr/tree/master/crates/nostr#supported-nips>
Expand Down
8 changes: 0 additions & 8 deletions crates/nostr-sdk/src/client/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,6 @@ impl Connection {
}

/// Use embedded tor client
///
/// The library used under the hood for websocket require a little change ([PR here](https://github.com/snapview/tungstenite-rs/pull/431)).
/// Until it's merged, you have to add the following lines in your `Cargo.toml`:
///
/// ```toml
/// [patch.crates-io]
/// tungstenite = { git = "https://github.com/yukibtc/tungstenite-rs", branch = "tor" }
/// ```
#[inline]
#[cfg(all(feature = "tor", not(target_os = "android"), not(target_os = "ios")))]
pub fn embedded_tor(mut self) -> Self {
Expand Down

0 comments on commit 178b64e

Please sign in to comment.