XCBAddress class

Represents an Core Block Chain address.

Annotations
  • @immutable

Constructors

XCBAddress(Uint8List addressBytes)
An ethereum address from the raw address bytes.
const
XCBAddress.fromHex(String hex)
Parses an Core Block Chain 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
XCBAddress.fromPublicKey(Uint8List publicKey, int networkId)
Constructs an Core Block Chain 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 44 characters or 22 bytes, and prefixed with "0x".
no setter
hexNo0x → String
A hexadecimal representation of this address, padded to a length of 44 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

isValidAddress() → bool
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

Static Properties

basicAddress → RegExp
final
xcbAddrLength → int
final

Constants

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