PrivateKeySigner.fromHex constructor

PrivateKeySigner.fromHex(
  1. String hex,
  2. int chainId
)

Creates a signer from a hex-encoded private key.

Implementation

factory PrivateKeySigner.fromHex(String hex, int chainId) {
  return PrivateKeySigner(HexUtils.decode(hex), chainId);
}