EthereumWallet class

Ethereum wallet allowing to manage cryptographic keys and derive deterministic identities for a given entity.

Constructors

EthereumWallet.fromMnemonic(String mnemonic, {String hdPath = DEFAULT_HD_PATH, Uint8List entityAddressHash})
Creates an Ethereum wallet for the given mnemonic, using the (optional) HD path. If an entityAddress is defined, the results private key, public key and address will be a unique derivation for the given entity that no one else will be able to correlate.
EthereumWallet.random({int size = 192, String hdPath = DEFAULT_HD_PATH, Uint8List entityAddressHash})
Creates a new Ethereum wallet using a random mnemonic and the (optional) HD path. If an entityAddress is defined, the results private key, public key and address will be a unique derivation for the given entity that no one else will be able to correlate.

Properties

address String
read-only
addressAsync Future<String>
read-only
entityAddressHash Uint8List
final
hashCode int
The hash code for this object.
read-only, inherited
hdPath String
final
mnemonic String
final
privateKey String
Returns an Hexadecimal representation of the private key derived from the current mnemonic
read-only
privateKeyAsync Future<String>
Returns an Hexadecimal representation of the private key derived from the current mnemonic
read-only
privateKeyBytes Uint8List
Returns a byte array representation of the private key derived from the current mnemonic. If entityAddress is set, its bytes will be used to derive a new private key, unique to this entity.
read-only
privateKeyBytesAsync Future<Uint8List>
Returns a byte array representation of the private key derived from the current mnemonic. If entityAddress is set, its bytes will be used to derive a new private key, unique to this entity.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
publicKey({bool uncompressed = false}) String
Returns an Hexadecimal representation of the public key derived from the current mnemonic
publicKeyAsync({bool uncompressed = false}) Future<String>
Returns an Hexadecimal representation of the public key derived from the current mnemonic
publicKeyBytes({bool uncompressed = false}) Uint8List
Returns a byte array representation of the public key derived from the current mnemonic
publicKeyBytesAsync({bool uncompressed = false}) Future<Uint8List>
Returns a byte array representation of the public key derived from the current mnemonic
sign(String payload, {int chainId}) String
Sign the given payload using the private key and return a hex signature
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

randomAsync({int size = 192, String hdPath = DEFAULT_HD_PATH, Uint8List entityAddressHash}) Future<EthereumWallet>
Creates a new Ethereum wallet using a random mnemonic and the (optional) HD path. If an entityAddress is defined, the results private key, public key and address will be a unique derivation for the given entity that no one else will be able to correlate.