From 885d9ba430bb045c32f98e40e715850cc26ab603 Mon Sep 17 00:00:00 2001 From: Dave Belvedere Date: Thu, 21 Jul 2022 17:11:06 +1000 Subject: [PATCH 1/3] Update README to document common feature flags for providers (websockets, ipc and https) --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 5e76b95a1..d2ba04041 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,37 @@ in the transactions which are fetched over JSON-RPC. - [ ] FFI Bindings (see note) - [ ] CLI for common operations +### Websockets + +Websockets support is turned on via the feature-flag `ws`: + +```toml +[dependencies] + +ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws"] } +``` + +### Interprocess Communication (IPC) + +IPC support is turned on via the feature-flag `ipc`: + +```toml +[dependencies] + +ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ipc"] } +``` + +### HTTP Secure (HTTPS) + +If you are looking to connect to a HTTPS endpoint, then you need to enable TLS (`rustls`) and/or SSL (`openssl`) +feature-flags. + +```toml +[dependencies] + +ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["openssl", "rustls"] } +``` + ## Note on WASM and FFI bindings You should be able to build a wasm app that uses ethers-rs (see the [example](./examples/ethers-wasm) for reference). If ethers fails to From 7795d3ce1209a978b0bc0c51ed0c255b07669d5b Mon Sep 17 00:00:00 2001 From: Dave Belvedere <90095005+dbelv@users.noreply.github.com> Date: Thu, 21 Jul 2022 20:58:33 +1000 Subject: [PATCH 2/3] Update README as per review comment suggestion Co-authored-by: Matthias Seitz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2ba04041..e1a953a4e 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ipc"] } ### HTTP Secure (HTTPS) -If you are looking to connect to a HTTPS endpoint, then you need to enable TLS (`rustls`) and/or SSL (`openssl`) +If you are looking to connect to a HTTPS endpoint, then you need to enable the `rustls` or `openssl` feature. feature-flags. ```toml From c69a4fca5a19210774556a2c586ce1ef4456df10 Mon Sep 17 00:00:00 2001 From: Dave Belvedere Date: Thu, 21 Jul 2022 21:01:25 +1000 Subject: [PATCH 3/3] Separate openssl and rustls toml examples as per review comment --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1a953a4e..5a8232a55 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,18 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ipc"] } If you are looking to connect to a HTTPS endpoint, then you need to enable the `rustls` or `openssl` feature. feature-flags. +To enable `rustls`: ```toml [dependencies] -ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["openssl", "rustls"] } +ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls"] } +``` + +To enable `openssl`: +```toml +[dependencies] + +ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["openssl"] } ``` ## Note on WASM and FFI bindings