Crates.io | alloy-provider |
lib.rs | alloy-provider |
version | |
source | src |
created_at | 2023-12-18 08:42:21.231706 |
updated_at | 2024-11-07 23:52:00.845375 |
description | Interface with an Ethereum blockchain |
homepage | https://github.com/alloy-rs/alloy |
repository | https://github.com/alloy-rs/alloy |
max_upload_size | |
id | 1073195 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Interface with an Ethereum blockchain.
This crate contains the Provider
trait, which exposes Ethereum JSON-RPC
methods. Providers in alloy are similar to ethers.js
providers. They manage
an RpcClient
and allow other parts of the program to easily make RPC calls.
Unlike an ethers.js
Provider, an alloy Provider is network-aware. It is
parameterized with a Network
from [alloy-networks
]. This allows the Provider
to expose a consistent interface to the rest of the program, while adjusting
request and response types to match the underlying blockchain.
Providers can be composed via stacking. For example, a Provider
that tracks
the nonce for a given address can be stacked onto a Provider
that signs
transactions to create a Provider
that can send signed transactions with
correct nonces.
The ProviderBuilder
struct can quickly create a stacked provider, similar to
tower::ServiceBuilder
.
pubsub
- Enable support for subscription methods.ws
- Enable WebSocket support. Implicitly enables pubsub
.ipc
- Enable IPC support. Implicitly enables pubsub
.TODO :)