isValid property

  1. @override
bool get isValid
override

Validates the integrity of this metadata.

Important: Must be called when receiving new metadata from the network to verify the fingerprint matches the seed and public key.

Returns: true if fingerprint is valid (signature matches seed and public key), false otherwise (invalid or tampered metadata)

Implementation

@override
bool get isValid {
  if (_status == 0) {
    // meta from network, try to verify
    if (checkValid()) {
      // correct
      _status = 1;
    } else {
      // error
      _status = -1;
    }
  }
  return _status > 0;
}