ethereum
6.1.1, released 2 years ago by darticulate.com
Ethereum JSON RPC 2.0 client for Dart
WASM-ready
What it does
Provides a client to access the Ethereum JSON RPC API. It maps Ethereum RPC data types to Dart types and supports HTTP and WebSocket communication.
AI-written summary of version 6.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to interact with an Ethereum node via JSON RPC in a Dart or Flutter app
- You prefer a lightweight client without heavy abstractions
Skip it when
- You require full admin API support
- You are already using a higher-level library like web3dart
Strengths
- Cross‑platform support (Android, iOS, Web, Windows, macOS, Linux)
- Supports both HTTP and WebSocket endpoints
- Compatible with Dart 3
- Maps RPC types to native Dart types
Weaknesses
- Admin API implementation incomplete
- Limited documentation beyond basic examples
- No code generation or declarative patterns
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
import 'package:ethereum/ethereum.dart';
final client = EthereumClient(
Uri.parse('https://mainnet.infura.io/v3/YOUR-PROJECT-ID'),
);
Future<void> getBlockNumber() async {
final blockNumber = await client.ethBlockNumber();
print('Latest block: $blockNumber');
}
Alternatives
Packages that do the same job and could replace ethereum.
Works with
Packages commonly used together with ethereum: ones it builds on, ones built on it, and its own family.