EthereumAddress class

Represents an Ethereum address.

Implemented types

Constructors

EthereumAddress(Uint8List addressBytes)
An ethereum address from the raw address bytes.
const
EthereumAddress.fromHex(String hex, {bool enforceEip55 = false})
Parses an Ethereum address from the hexadecimal representation. The representation must have a length of 20 bytes (or 40 hexadecimal chars), and can optionally be prefixed with "0x".
factory
EthereumAddress.fromPublicKey(Uint8List publicKey)
Constructs an Ethereum address from a public key. The address is formed by the last 20 bytes of the keccak hash of the public key.
factory

Properties

addressBytes Uint8List
final
hashCode int
The hash code for this object.
no setteroverride
hex String
A hexadecimal representation of this address, padded to a length of 40 characters or 20 bytes, and prefixed with "0x".
no setter
hexEip55 String
Returns this address in a hexadecimal representation, like with hex. The hexadecimal characters A-F in the address will be in lower- or uppercase depending on EIP 55.
no setter
hexNo0x String
A hexadecimal representation of this address, padded to a length of 40 characters or 20 bytes, but not prefixed with "0x".
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(EthereumAddress other) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

addressByteLength → const int
The length of an ethereum address, in bytes.