hypersync-client
Rust crate for Envio's HyperSync client. The most performant way to access HyperSync, with direct access to the underlying Rust implementation and no FFI overhead.
Full API documentation on docs.rs
What is HyperSync?
HyperSync is Envio's high-performance blockchain data retrieval layer. It is a purpose-built alternative to JSON-RPC endpoints, offering up to 2000x faster data access across 70+ EVM-compatible networks and Fuel.
HyperSync lets you query logs, transactions, blocks, and traces with flexible filtering and field selection, returning only the data you need in binary formats for maximum throughput.
If you need a full indexing framework on top of HyperSync with GraphQL APIs and schema management, see HyperIndex.
Features
- Maximum performance: Direct Rust implementation with no FFI overhead
- Arrow and Parquet format support: Stream blockchain data as Apache Arrow record batches for in-memory analytics, or write directly to Parquet files
- Binary transport: Uses CapnProto serialization to minimize bandwidth and maximize throughput
- Flexible queries: Filter logs, transactions, blocks, and traces with granular control
- Field selection: Choose exactly which fields to return, reducing unnecessary data transfer
- Automatic pagination: Handles large datasets with built-in pagination
- Event decoding: Decode ABI-encoded event data directly in the stream
- Real-time updates: Live height streaming via Server-Sent Events
- Production ready: Built-in rate limiting, automatic retries, and error handling
- Async/await: Built on Tokio for fully asynchronous operation
- 70+ networks: Access any HyperSync-supported network
Installation
Add to your Cargo.toml:
[]
= "1"
= { = "1", = ["full"] }
= "1"
API Token
An API token is required to use HyperSync. Get your token here, then set it as an environment variable:
Quick Start
Query ERC-20 Transfer events from USDC on Ethereum mainnet:
use ;
async
See the examples directory for more usage patterns including wallet transactions, block streaming, and decoded event output.
Main Types
Client- Main client for interacting with HyperSync serversnet_types::Query- Query builder for specifying what data to fetchStreamConfig- Configuration for streaming operationsQueryResponse- Response containing blocks, transactions, logs, and tracesArrowResponse- Response in Apache Arrow format for high-performance processing
Connecting to Different Networks
Change the chain_id (or use url) to connect to any supported network:
use Client;
#
See the full list of supported networks and URLs.
What you can build
The Rust client is well suited for performance-critical applications that need direct, low-latency access to blockchain data:
- Blockchain indexers: Build custom data pipelines without the overhead of JSON-RPC
- Data analytics: Scan entire chain histories in seconds, not hours
- Block explorers: Power responsive, real-time interfaces with comprehensive data access
- ETL pipelines: Extract and transform on-chain data at scale using Apache Arrow output
- Monitoring tools: Track wallet activity, token transfers, and contract events in near real-time
- Security tooling: Scan token approvals and transaction history across 70+ chains. See Snubb, a CLI tool built with HyperSync that scans outstanding token approvals across 70 chains simultaneously
Documentation
- API Reference (docs.rs)
- HyperSync Documentation
- Query Reference
- All Client Libraries (Node.js, Python, Go)
FAQ
How does this compare to using JSON-RPC? HyperSync retrieves data up to 2000x faster than traditional JSON-RPC. Scanning the entire Arbitrum chain for sparse log data takes seconds instead of hours.
Do I need an API token? Yes. Get one here.
Which networks are supported? 70+ EVM-compatible networks and Fuel. See the full list.
What serialization formats are supported?
CapnProto (recommended for performance) and JSON. Both are available via SerializationFormat.
Is there an Arrow output format?
Yes. Use stream_arrow to receive data as Apache Arrow record batches, which integrates directly with analytics and DataFrame libraries.
What is the difference between this and the other HyperSync clients? This is the native Rust implementation. The Python and Node.js clients are built on top of this crate via FFI bindings. If you don't need Rust specifically, those clients give you the same HyperSync performance in your preferred language.
What is the difference between HyperSync and HyperIndex? HyperSync is the raw data access layer. Use it when you need direct, low-level access to blockchain data in your own pipeline. HyperIndex is the full indexing framework built on top of HyperSync, with schema management, event handlers, and a GraphQL API.