Documentation
    Preparing search index...

    Function createPajaLocalTarget

    • Build a local runtime target from an index.html file.

      The identity is computed from the file bytes: sha256 is the digest of the exact bytes and aggregateHash is the NIP-5A aggregate over [{ path: '/index.html', sha256 }], the same derivation Paja's resolver verifies for a published single-file napplet. Editing the file gives it a new identity.

      Parameters

      Returns Promise<PajaLocalTarget>

      The local target.

      Error when the file is not HTML or is empty.

      const target = await createPajaLocalTarget({ name: 'index.html', text: '<!doctype html>…' });
      target.dTag; // 'local-index'