Expand description
Implementation of Ethereum public addresses for Rust.
This crate provides an Address type for representing Ethereum public
addresses.
§Checksums
Addresses are by default formatted with ERC-55 mixed-case checksum
encoding. Addresses checksums may optionally be verified when parsing with
Address::from_str_checksum().
§address! Macro
This crate exports an address! macro that can be used for creating
compile-time address constants. Under the hood, it is implemented with
const fn and does not use procedural macros.
§Features
- default
std: Additional integration with Rust standard library types. Notably, this includesstd::error::Errorimplementation on theParseAddressErrortype and conversions fromVec<u8>. serde: Serialization traits for theserdecrate. Note that the implementation is very much geared towards JSON serialization withserde_json.sha3: Use the Rust Crypto Keccak-256 implementation (provided by thesha3crate) instead of the built-in one. Note that theaddress!macro will always use the built-in Keccak-256 implementation for checksum verification, assha3does not expose aconst fnAPI.
Macros§
- address
- Macro to create Ethereum public address values from string literals that get verified at compile time. A compiler error will be generated if an invalid address is specified.
Structs§
- Address
- An Ethereum public address.
Enums§
- Parse
Address Error - Represents an error parsing an address from a string.