Update README to document common feature flags for providers (websock… (#1493)
* Update README to document common feature flags for providers (websockets, ipc and https) * Update README as per review comment suggestion Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * Separate openssl and rustls toml examples as per review comment Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
parent
12292dd920
commit
cf2aa07eb5
39
README.md
39
README.md
|
@ -100,6 +100,45 @@ in the transactions which are fetched over JSON-RPC.
|
||||||
- [ ] FFI Bindings (see note)
|
- [ ] FFI Bindings (see note)
|
||||||
- [ ] CLI for common operations
|
- [ ] 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 the `rustls` or `openssl` feature.
|
||||||
|
feature-flags.
|
||||||
|
|
||||||
|
To enable `rustls`:
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
|
||||||
|
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
|
## 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
|
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
|
||||||
|
|
Loading…
Reference in New Issue