Skip to content
This repository was archived by the owner on Dec 24, 2021. It is now read-only.

phoenix344/registry-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
        });
    });
});

About

Domain registry log based on hypercore and protobuf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors