Commit Graph

19 Commits

Author SHA1 Message Date
DaniPopes 4fd742f8ce
feat: windows ipc provider (named pipe) (#1976)
* fmt: imports

* fix: ipc tests

* fmt

* chore: move ws macros

* chore: gate ipc to unix family

* chore: make tokio optional

* feat: initial named_pipe

* feat: windows ipc

* chore: update Provider

* chore: clippy

* chore: use Path instead of OsStr

* chore: clippy

* fix: docs

* lf

* lf

* test: better subscription tests

* docs

* fix: ipc doctest

* chore: make winapi optional

* fix: optional tokio
2023-01-03 16:15:51 +02:00
Noah Citron fa0ce0c750
feat: retry client wasm support (#1877)
* wasm support for retry client

* fix conection err check

* fix lockfile

* remove unused comment
2022-11-22 13:16:23 -08:00
Matthias Seitz de1020c91e
chore: export quorum's JsonRpcClientWrapper (#1439) 2022-06-30 10:04:43 -07:00
Meet Mangukiya e3ab2feada
feat(providers): add `RetryClient` (#1302)
* feat(providers): add RateAwareClient

* feat(providers): add RetryClient

* remove RateAwareClient

* feat(providers): add RetryPolicy, Backoff traits and some implementations

* remove backoff abstractions

* fix doc tests

* add helper methods for RetryClient Provider

* remove backoff wasm dependency

* remove conflicitng impl for TryFrom<&str>, etc.

* update docs and remove backoff crate dependency

* fix tests

* fix backoff formula

* use value, string is not leading to corerct serialization

* catch 429 error thrown as JsonRpcError

* fix requests_enqueued, make backoff and max retries configurable

* fix doc tests

* fix tests

* use match statement

* revert incorrect change

* ms precision backoffs, remove reduntant continue
2022-05-27 14:02:16 -07:00
Matthias Seitz 02ad93a1cf
feat(provider): add RwClient (#1016)
* feat(provider): add RwClient

* docs: fix failing doc test
2022-04-13 13:21:52 -07:00
oblique 367f3444ec
fix: Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` (#1012) 2022-03-13 13:58:29 +02:00
th4s a97526d6fe
Add authorization for http and websocket (#829)
* Added  basic and bearer authentication for http and websocket transport

* Improved api for websocket `connect_with_auth`

* Bugfix in doc

* Moved use statement into non-wasm imports

* Adapted changelog

* Fixed doc test

* Added constructors for Authorization

* Improved code quality and implemented feedback

* Made bas64 crate for basic auth encoding non-optional

* Added `Display` for `Authorization` instead of `into_auth_string`
2022-01-27 12:04:53 +02:00
Matthias Seitz d2b59d7097
chore: silence unused ws macro (#788) 2022-01-13 02:59:02 +02:00
Matthias Seitz f4c89c6cb1
ci: test on windows targets (#682)
* ci: test on windows targets

* make ipc optional

* fix: only activate ipc on unix families

* add cfg

* only check default members

* no parallel limits

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-12-13 23:25:10 +02:00
James Prestwich e9d40120a7
chore: re-export http client error in providers transports (#570)
* chore: re-export http client error in providers transports

* chore: re-export we client error in providers transports
2021-11-10 18:53:07 +02:00
Matthias Seitz 824bedbd42
feat: add quorum provider (#409)
* feat: add quorum provider

* feat: add quorum provider example

* fix: make compile with wasm32

* feat: normalize requests with block height

* fix: lowercase eth_call

* chore: fix doctest

* chore: remove Sync/Send requirement

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-08-29 14:03:53 +03:00
Georgios Konstantopoulos 38c7f5030f
chore: remove cyclical dependencies (#410)
* chore(core): remove ethers dep

* chore(providers): remove ethers dep

tests using higher-rank crates are temporarily disabled

* chore(middleware): remove ethers dep and move tests over from providers

* chore(signers): remove ethers dep

* fix(contracts): correctly determine ethers sub-crates & remove ethers

* fix: re-enable tests for all members

* fix: make contract compile without middleware dep

move over the test using middleware to ethers-middleware

* chore: cargo fmt

* chore(contract): add missing import

* WIP

* WIP

* fix(middleware): use rustls as dev dep

* chore: cargo fmt

* fix: use different key for nonce manager to avoid nonce conflicts

* chore: fix celo test ported over to middlewares

the test had the same private key with an existing middleware test,
causing potential nonce reuses

it now also uses a different storage contract, so we had to change
it to use u256 instead of string

* fix(middleware): enable contracts/celo feature

* chore: ignore non-eip2718 txs to rinkeby
2021-08-29 00:06:29 +03:00
Matthias Seitz d35444cc49
feat: add wasm http provider support (#403)
* fix: use on wasm only

* feat: enable http provider in wasm

* add http example

* chore: add more verbosity to example

* fix: double webpack issue

* use mnemonic builder
2021-08-24 01:28:05 +03:00
Matthias Seitz ea566663d4
feat: wasm support (#390)
* feat: partial wasm32 support

* make compile for wasm32

* feat: att async-trait attr

* make compatible with wasm

* add type alias for archs

* rustfmt

* add wasm ci

* make compile with wasm-pack test

* make compile with wasm-pack test

* make compile with wasm-pack test

* make compile with wasm-pack test

* ci: disable wasmpack

* feat: use wasm timer delay

* feat: add wasm provider

* rustfmt

* misc refactor

* add wasm example

* make example a directory

* untrack error log

* move profile to root

* fix unused imports

* ci: enable wasm-pack test

* style: unify websocket implementations

* fix: typos

* fix: make policy compatible with wasm target

* chore: do not include ethers-wasm example as top level workspace member

* chore: modify wasm32 dependencies

* chore: make note about getrandom

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-08-23 12:56:44 +03:00
Austin Abell 42b10cca9a
feat: implement IPC transport support (#260)
* Initial IPC setup

* Cleanup

* Oops

* change futures dependency reference

* Document, add prints, cleanup

* Fix logic

* Make result type consistent with crate

* Setup geth ipc config and tests

* Cleanup subscription test

* Switch hash function to siphash

* Update dep usage for ordering

* Use tempfile for better cleanup (and OS support)

* Replace prints with tracing logs

* Ignore test with Celo feat

* chore: remove debug logs and use default geth ipc path

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2021-04-08 09:52:31 +03:00
Georgios Konstantopoulos 1ece5d2020
Contract & Provider eth_subscribe support (#100)
* fix(block): fix block decoding from ws

* feat(pubsub): add pubsub traits and sub stream

Also use DeserializeOwned alias

* feat(transports): add notification type

* feat(ws): rewrite Ws for subscription support

* feat(provider): add eth_subscribe

* fix(celo): disable some celo tests due to ganache incompatibilities

* test(rinkeby): fix flaky test

* feat(contract): WS subscription bindings (#101)

* feat(middleware): add subscriptions to middleware methods

* feat(contract): add subscribe method to contracts
2020-11-30 11:33:06 +02:00
Georgios Konstantopoulos 09413dca6f
feat: add a mock transport (#99)
* feat: add a mock transport

* ci: fix libusb issue
2020-11-27 14:57:44 +02:00
Georgios Konstantopoulos da20a042d7
chore(provider): make websockets optional (#45) 2020-07-02 18:33:16 +03:00
Georgios Konstantopoulos 0cfeadadf4
Websockets + TLS for Async-Std / Tokio (#30)
* fix: relax trait bounds on JsonRpcClient

* refactor(provider): move http client to separate dir

* feat(provider): add initial Websocket support over Stream/Sink + Tungstenite

* test(provider): add websocket test

* feat(provider): add convenience method using tokio/async-std behind a feature flag

* test(provider): add websocket ssl test

* feat(provider): add TLS websockets for tokio/async-std

* docs(provider): add websocket docs / examples

* fix(provider): make tokio an optional dep
2020-06-21 10:17:11 +03:00