verify method

  1. @override
Future<bool> verify(
  1. Nip01Event event
)
override

Verifies a Nostr event using the Rust implementation.

This method waits for the Rust library to be initialized before performing the verification.

event The Nip01Event to be verified.

Returns a Future<bool> that resolves to true if the event is valid, false otherwise.

Implementation

@override
Future<bool> verify(Nip01Event event) async {
  await _isInitialized.future;

  return verifyNostrEvent(
    eventIdHex: event.id,
    pubKeyHex: event.pubKey,
    createdAt: BigInt.from(event.createdAt),
    kind: event.kind,
    tags: event.tags,
    content: event.content,
    signatureHex: event.sig,
  );
}