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

Download history 520/week @ 2025-09-23 878/week @ 2025-09-30 1079/week @ 2025-10-07 1268/week @ 2025-10-14 1665/week @ 2025-10-21 2260/week @ 2025-10-28 1866/week @ 2025-11-04 2041/week @ 2025-11-11 3025/week @ 2025-11-18 2962/week @ 2025-11-25 3032/week @ 2025-12-02 3450/week @ 2025-12-09 2983/week @ 2025-12-16 2693/week @ 2025-12-23 3074/week @ 2025-12-30 2482/week @ 2026-01-06

11,717 downloads per month
Used in 6 crates (2 directly)

MPL-2.0 license

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 body
  • Transaction - Transaction data with all fields
  • [Log] - Event log from contract execution
  • Trace - Execution trace information
  • Address - 20-byte Ethereum address
  • Hash - 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