Uniform Resource Identifier (URI) utilities for Secure Scuttlebutt (SSB)
npm install --save ssb-uri
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'
Takes an SSB sigil link as input and returns an SSB URI. Any errors are thrown.
Takes an SSB URI as input and returns an SSB sigil link. Any errors are thrown.
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2018 Fraction