27 releases
| 0.7.0 | Dec 10, 2025 |
|---|---|
| 0.6.0 | Nov 21, 2025 |
| 0.5.11 | Nov 14, 2025 |
| 0.5.2 | Jun 26, 2025 |
| 0.2.3 | Jul 15, 2024 |
#5 in #hyper-sync
11,717 downloads per month
Used in 6 crates
(2 directly)
79KB
1.5K
SLoC
HyperSync Format
Core data types and serialization formats for the HyperSync protocol.
This crate provides the fundamental data structures used to represent blockchain data in a standardized format, including blocks, transactions, logs, and traces.
Features
- Standard blockchain types: Comprehensive data structures for Ethereum-compatible chains
- Efficient serialization: Optimized JSON and binary serialization
- Type safety: Strong typing for addresses, hashes, and numeric values
- Hex encoding: Automatic handling of hexadecimal encoding/decoding
Key Types
Block- Complete block data including header and bodyTransaction- Transaction data with all fields- [
Log] - Event log from contract execution Trace- Execution trace informationAddress- 20-byte Ethereum addressHash- 32-byte cryptographic hash- [
Hex] - Wrapper for hexadecimal data
Example
use hypersync_format::{Address, Hash};
// Parse an Ethereum address
let addr: Address = "0x742d35Cc6634C0532925a3b8D400ACDCD5C94C33".parse()?;
println!("Address: {}", addr);
// Create a hash from hex string
let hash: Hash = "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef".parse()?;
println!("Hash: {}", hash);
Dependencies
~5–7MB
~129K SLoC