PrivateKeySigner class

Signer implementation using a private key.

Implemented types

Constructors

PrivateKeySigner(Uint8List privateKey, int chainId)
PrivateKeySigner.createRandom(int chainId)
Creates a random signer.
factory
PrivateKeySigner.fromHex(String hex, int chainId)
Creates a signer from a hex-encoded private key.
factory
PrivateKeySigner.fromMnemonic(List<String> words, int chainId, {String path = "m/44'/60'/0'/0/0"})
Creates a signer from a mnemonic phrase.
factory

Properties

address EthereumAddress
The signer's Ethereum address.
no setteroverride
chainId int
The chain ID.
final
hashCode int
The hash code for this object.
no setterinherited
privateKey Uint8List
The private key bytes.
final
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
signAuthorization(Authorization authorization) Future<Uint8List>
Signs an EIP-7702 authorization.
override
signHash(Uint8List hash) Future<Uint8List>
Signs a raw hash directly without any prefix.
override
signMessage(String message) Future<Uint8List>
Signs a personal message (EIP-191).
override
signTransaction(TransactionRequest transaction) Future<Uint8List>
Signs a transaction and returns the signed transaction bytes.
override
signTypedData(EIP712TypedData typedData) Future<Uint8List>
Signs typed data (EIP-712).
override
toString() String
A string representation of this object.
inherited

Operators

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