Applesauce
    Preparing search index...

    Function isValidSeal

    • Checks that an event is a seal and that its id and signature are valid.

      The seal's signature is the ONLY authorship proof in a NIP-59 envelope — the gift wrap is signed by a throwaway key that says nothing about who wrote the message, and the rumor is unsigned by definition. Everything downstream that attributes a rumor to an author (notably getSealRumor's rumor.pubkey !== seal.pubkey binding) rests on this check having passed.

      Cheap to repeat: verifyWrappedEvent -> nostr-tools' verifyEvent memoises both outcomes on the event via verifiedSymbol, so calls after the first are a symbol read. That is what makes it affordable to re-assert this at every boundary a seal can enter through rather than trusting the caller to have checked.

      Parameters

      Returns event is KnownEvent<13>