PrivateKeySigner class

Local private-key implementation of Web3Signer.

Wraps SigningHandler and TransactionHandler so that EthereumProvider can delegate uniformly whether the signer is local or external.

Implemented types

Constructors

PrivateKeySigner({required EthPrivateKey credentials, required Web3Client getClient(), required int getChainId()})
PrivateKeySigner.fromHex(String privateKeyHex, {required Web3Client getClient(), required int getChainId()})
Factory from hex private key string.
factory

Properties

address String
EIP-55 checksummed address of the signer.
no setteroverride
credentials EthPrivateKey
Expose underlying credentials for advanced use.
no setter
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
sendTransaction(Map<String, dynamic> txParams) Future<String>
Sign and send a transaction described by txParams (EIP-1193 eth_sendTransaction params: from, to, value, data, gas, ...).
override
signMessage(String method, String from, dynamic message, String password) Future<String>
Sign a message for method (personal_sign, eth_sign, eth_signTypedData*). Called after dialog confirmation.
override
signTransaction(Transaction transaction, int chainId) Future<Uint8List>
Optional: sign a raw Transaction and return signed bytes. Default implementation throws UnsupportedError – override if you need low-level signing.
override
toString() String
A string representation of this object.
inherited

Operators

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