PrivateKeySigner constructor

PrivateKeySigner(
  1. Uint8List privateKey,
  2. int chainId
)

Implementation

PrivateKeySigner(this.privateKey, this.chainId) {
  if (privateKey.length != 32) {
    throw ArgumentError('Private key must be 32 bytes');
  }
  _address = EthereumAddress.fromPublicKey(
    Secp256k1.getPublicKey(privateKey),
    Keccak256.hash,
  );
}