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.
"<sha256> <abs-path>\n"
The file path entries (any order)
The aggregate hash as lowercase hex
import { computeAggregateHash } from '@kehto/nip/5a';const hex = computeAggregateHash([{ path: '/index.html', sha256: 'aa…' }]); Copy
import { computeAggregateHash } from '@kehto/nip/5a';const hex = computeAggregateHash([{ path: '/index.html', sha256: 'aa…' }]);
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.