ETHPublicKey class

Class representing an Ethereum public key, providing methods for conversion, verification, and address generation.

Constructors

ETHPublicKey(String pubHex)
Creates an ETHPublicKey instance from a hexadecimal public key string.
factory
ETHPublicKey.fromBytes(List<int> keyBytes)
Creates an ETHPublicKey instance from a list of bytes representing the public 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
toAddress() ETHAddress
Converts the public key to an Ethereum address.
toBytes([PubKeyModes mode = PubKeyModes.compressed]) List<int>
Retrieves the raw bytes of the public key.
toHex([PubKeyModes mode = PubKeyModes.compressed]) String
Converts the public key to a hexadecimal string.
toString() String
A string representation of this object.
override
verifyPersonalMessage(List<int> messageDigest, List<int> signature, {bool hashMessage = true, int? payloadLength}) bool
Verifies the signature of a personal message using the public key.

Operators

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

Static Methods

getPublicKey(List<int> messageDigest, List<int> signature, {bool hashMessage = true, int? payloadLength}) ETHPublicKey?