Documentation
    Preparing search index...

    Function computeAggregateHash

    • Compute the NIP-5A aggregate hash over a set of PathEntry files.

      Lines ("<sha256> <abs-path>\n") are sorted before hashing, so the result is independent of the input order.

      Parameters

      • entries: readonly PathEntry[]

        The file path entries (any order)

      Returns string

      The aggregate hash as lowercase hex

      import { computeAggregateHash } from '@kehto/nip/5a';
      const hex = computeAggregateHash([{ path: '/index.html', sha256: 'aa…' }]);