EthereumAddress class

Represents an Ethereum address with validation and checksum support.

Supports EIP-55 checksum encoding for mixed-case addresses.

Available extensions

Constructors

EthereumAddress(Uint8List bytes)
Creates an EthereumAddress from raw bytes.
EthereumAddress.fromHex(String hex)
Creates an EthereumAddress from a hex string.
factory
EthereumAddress.fromPublicKey(Uint8List publicKey, Uint8List keccak256(Uint8List))
Creates an EthereumAddress from a public key.
factory

Properties

addressBytes Uint8List

Available on EthereumAddress, provided by the EthereumAddressCompat extension

no setter
bytes Uint8List
The raw 20-byte address.
final
hashCode int
The hash code for this object.
no setteroverride
hex String
Returns the address as a lowercase hex string with 0x prefix.
no setter
hexEip55 String

Available on EthereumAddress, provided by the EthereumAddressCompat extension

no setter
isZero bool
Checks if this is the zero address.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toChecksum(Uint8List keccak256(Uint8List)) String
Returns the address as a checksummed hex string (EIP-55).
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

zero EthereumAddress
Returns the zero address (0x0000...0000).
no setter

Static Methods

isValid(String address) bool
Validates if a string is a valid Ethereum address.
isValidChecksum(String address, Uint8List keccak256(Uint8List)) bool
Validates if a checksummed address has the correct checksum.