privateKey property

Uint8List? privateKey

Implementation

Uint8List? get privateKey => _privateKey;
void privateKey=(Uint8List? value)

Implementation

void set privateKey(Uint8List? value) {
  trueOrThrow(
      value != null, FormatException('Private key must be defined.', value));
  trueOrThrow(value?.length == 32,
      FormatException('Private key must be 32 bytes.', value));
  trueOrThrow(privateKeyVerify(value!) == true,
      FormatException('Invalid private key', value));

  this._privateKey = value;
  this._publicKey = publicKeyCreate(value, true);
  this._identifier = hash160(this.publicKey!);
  this._fingerprint =
      this._identifier?.sublist(0, 4).buffer.asByteData().getUint32(0) ?? 0;
}