zeuge
Version:
zeuge creates permanence for the content behind web2 URIs
39 lines (28 loc) • 945 B
Markdown
# zeuge
`zeuge` (German for "witness") is the basic primitive to build a
backward-compatible tracking system for generating unique and universal content
identifiers that are hosted through URLs.
`zeuge`'s focus is on making identifier generation (and hence validation) as
simple as possible. Anyone on a shell can do it using regular tools and without
additional context (e.g. without knowing anything additional about a file's
format or encoding).
```bash
curl -s https://bitcoin.org/bitcoin.pdf | openssl dgst -sha3-256
# SHA3-256(stdin)= 9a3ca9de6a5af14df0d06fd735eb6a0de9206b5be883cf891b1b1aaa84307627
```
## installation
```bash
npm i zeuge
```
## usage
```js
import { identify } from "zeuge";
(async () => {
const url = "https://bitcoin.org/bitcoin.pdf";
const digest = await identify(url);
console.log(digest);
// 9a3ca9de6a5af14df0d06fd735eb6a0de9206b5be883cf891b1b1aaa84307627
})();
```
## license
See LICENSE file.