preparePrivateKey method

void preparePrivateKey(
  1. Uint8List? cprivateKey, {
  2. bool exposePrivateKey = false,
})
inherited

Implementation

void preparePrivateKey(Uint8List? cprivateKey,
    {bool exposePrivateKey = false}) {
  privateKey = cprivateKey;
  if (exposePrivateKey) {
    privateKeyExposed = privateKey;
  }

  var key = EC.secp256k1.createPublicKey(
      BigInt.parse(HEX.encode(Uint8List.fromList(privateKey!)), radix: 16),
      true);

  publicKey = SimplePublicKey(key);
}