Home

Awesome

ssb-uri

standard-readme compliant

Uniform Resource Identifier (URI) utilities for Secure Scuttlebutt (SSB)

Table of Contents

Install

npm install --save ssb-uri

Usage

const ssbUri = require("ssb-uri");

ssbUri.fromSigilLink("%g3hPVPDEO1Aj/uPl0+J2NlhFB2bbFLIHlty+YuqFZ3w=.sha256");
// => 'ssb:message:sha256:g3hPVPDEO1Aj_uPl0-J2NlhFB2bbFLIHlty-YuqFZ3w='

ssbUri.toSigilLink(
  "ssb:message:sha256:g3hPVPDEO1Aj_uPl0-J2NlhFB2bbFLIHlty-YuqFZ3w="
);
// => '%g3hPVPDEO1Aj/uPl0+J2NlhFB2bbFLIHlty+YuqFZ3w=.sha256'

API

ssbUri.fromSigilLink(sigilLinkString)

Takes an SSB sigil link as input and returns an SSB URI. Any errors are thrown.

ssbUri.toSigilLink(uriLinkString)

Takes an SSB URI as input and returns an SSB sigil link. Any errors are thrown.

Maintainers

@fraction

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2018 Fraction