@netrunner/registry-log
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

registry-log

The registry log is a secure distributed append-only log for domains.

npm install @netrunner/registry-log

registry-log requires the hypercore library and changes the encoding/decoding methods. The API is exactly the same as the hypercore API.

const ram = require("random-access-memory");
const { registryLog } = require("@netrunner/registry-log");

const feed = registryLog(filename => ram(filename));

feed.ready(() => {
    feed.append({
        key: Buffer.from("the public key"),
        sig: Buffer.from("fake sig"),
        created: Date.now(),
        name: "google",
        target: "http://www.google.com"
    }, (err) => {
        if (err) return console.log(err);
        feed.get(0, (err, entry) => {
            if (err) return console.log(err);
            console.log(entry);
        });
    });
});

Readme

Keywords

Package Sidebar

Install

npm i @netrunner/registry-log

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

53.4 kB

Total Files

35

Last publish

Collaborators

  • phoenix344