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 printed with EIP-55 mixed-case checksum encoding. Addresses checksums may optionally be verified when parsing with Address::from_str_checksum.

Features

This crate supports the following features:

  • default std: Additional integration with Rust standard library types. Notably, this includes std::error::Error implementation on the ParseAddressError and conversions from Vec<u8>.
  • default checksum: Include code for encoding and verifying EIP-55 checksummed addresses. This requires Keccak-256 (provided by the sha3 crate) hashing to be done on the address string.
  • serde: Serialization traits for the serde crate. Note that the implementation is very much geared towards JSON serialiazation with serde_json.
  • macros: Adds the address procedural macro for compile-time verified address literals.

Macros

Procedural 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

An Ethereum public address.

Enums

Represents an error parsing an address from a string.