ETHPrivateKey class
Class representing an Ethereum private key, allowing for cryptographic operations and key-related functionality.
Constructors
- ETHPrivateKey(String privateKeyHex)
-
Creates an ETHPrivateKey instance from a hexadecimal private key string.
factory
-
ETHPrivateKey.fromBytes(List<
int> keyBytes) -
Creates an ETHPrivateKey instance from a list of bytes representing the private key.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
publicKey(
) → ETHPublicKey - Retrieves the corresponding Ethereum public key.
-
sign(
List< int> transactionDigest, {bool hashMessage = true}) → ETHSignature - Signs a transaction digest using the private key.
-
signPersonalMessage(
List< int> message, {int? payloadLength}) → String - Signs a personal message using the private key and returns the signature as a hexadecimal string.
-
toBytes(
) → List< int> - Retrieves the raw bytes of the private key.
-
toHex(
) → String - Converts the private key to a hexadecimal string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited