Documentation
    Preparing search index...

    Function resolveNapplet

    • Resolve a napplet end-to-end from a candidate manifest event: verify the signature, parse the manifest, verify the NIP-5A aggregate, fetch and verify every blob, then assemble the verified /index.html.

      The returned (dTag, aggregateHash) is computed from the verified bytes and is the napplet's identity. Any failure throws a NappletResolutionError — the caller must fail closed (never render unverified bytes).

      Returns Promise<ResolvedNapplet>

      The ResolvedNapplet

      NappletResolutionError on signature, manifest, aggregate, blob-hash, blob-availability, or missing-index failures

      import { resolveNapplet } from '@kehto/nip/5d';
      const napplet = await resolveNapplet({ event, fetchBlob });
      iframe.srcdoc = napplet.indexHtml; // sandbox="allow-scripts", opaque origin