Alloy transport and signer implementations for browser-based Ethereum wallets via window.ethereum (EIP-1193).
This crate provides a bridge between Alloy and browser wallet extensions like MetaMask, Rabby, and Coinbase Wallet that implement the EIP-1193 standard.
Add this to your Cargo.toml:
[dependencies]
alloy-transport-window = "0.1"
alloy = { version = "1.4", default-features = false, features = ["contract", "signers", "rpc-types"] }Since this is a WASM-only crate, you'll need to target wasm32-unknown-unknown:
rustup target add wasm32-unknown-unknownSee the example/ directory for a full Dioxus web app demonstrating:
- Wallet connection with balance display
- Sending ETH transactions
- Querying blockchain data
- Calling Aave contracts
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.