VerifiedEventMemCache class

Bounded, in-memory LRU record of verified event id/signature pairs.

A matching id alone is not sufficient for reuse because an event id does not commit to its signature. Callers must validate the incoming event id from its payload before consulting hasVerifiedSignature.

Constructors

VerifiedEventMemCache({int maxSize = 5000})

Properties

hashCode int
The hash code for this object.
no setterinherited
maxSize int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Removes all verification state.
hasVerifiedSignature(String id, String? signature) bool
markVerified(String id, String? signature) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verifyOnce(Nip01Event event, EventVerifier verifier) Future<bool>
Runs at most one verification for the same validated id and signature.

Operators

operator ==(Object other) bool
The equality operator.
inherited