SubstrateEcdsaSigner.fromKeyBytes constructor

SubstrateEcdsaSigner.fromKeyBytes(
  1. List<int> keyBytes
)

Factory method to create an ETHSigner from a byte representation of a private key.

Implementation

factory SubstrateEcdsaSigner.fromKeyBytes(List<int> keyBytes) {
  final signingKey = ECDSAPrivateKey.fromBytes(
      keyBytes, CryptoSignerConst.generatorSecp256k1);
  return SubstrateEcdsaSigner._(ECDSASigningKey(signingKey));
}