Appearance
How-to: Verify a Gateway Artifact
Use this when checking whether a napplet build matches the production-equivalent local loading path.
Commands
bash
pnpm --filter "./tests/fixtures/napplets/*" build
pnpm audit:csp
kehto paja --target-url http://127.0.0.1:5173 -- pnpm vite --host 127.0.0.1What to check
- Each napplet emits
dist/index.html. - Each napplet emits
dist/.nip5a-manifest.json. - The manifest has the expected
Rrequirements and optionalOdeclarations. - The manifest has one
xmatching the SHA-256 of the finalindex.html. - The shell verifies relay events and Blossom bytes, then assigns iframe
srcdoc. - Runtime injection stays outside the verified artifact bytes.
- The iframe remains opaque-origin.
Do not treat direct /napplets/<name>/ static serving as the canonical proof path.
Paja's loader and the shared prepareNappletSrcdoc helper own CSP and namespace injection. The helper receives verified resolved.indexHtml; its additions stay outside the signed artifact bytes. Executable regression tests reject raw srcdoc, unverified input, and removal of either CSP or namespace injection.