1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # 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);
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
pub use ;
pub use ;