View Source FastEIP55 (Fast EIP-55 v0.1.0)

Github link: https://github.com/gregors/fast_eip_55 Rust-powered Keccak version of EIP-55

Provides EIP-55 encoding and validation functions.

Link to this section Summary

Functions

Encodes an Ethereum address into an EIP-55 checksummed address.

Determines whether the given Ethereum address has a valid EIP-55 checksum.

Link to this section Functions

Encodes an Ethereum address into an EIP-55 checksummed address.

Examples

iex> alias FastEIP55, as: EIP55 iex> EIP55.encode("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed")

iex> EIP55.encode(<<90, 174, 182, 5, 63, 62, 148, 201, 185, 160, 159, 51, 102, 148, 53, 231, 239, 27, 234, 237>>)

iex> EIP55.encode("not an address")

Determines whether the given Ethereum address has a valid EIP-55 checksum.

Examples

iex> alias FastEIP55, as: EIP55 iex> EIP55.valid?("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") true

iex> EIP55.valid?("0x5AAEB6053f3e94c9b9a09f33669435e7ef1beaed") false

iex> EIP55.valid?("not an address") false