https://github.com/fraction/ssb-uri
Uniform Resource Identifier (URI) utilities for Secure Scuttlebutt (SSB)
https://github.com/fraction/ssb-uri
identifier secure-scuttlebutt sigil ssb uri
Last synced: 4 days ago
JSON representation
Uniform Resource Identifier (URI) utilities for Secure Scuttlebutt (SSB)
- Host: GitHub
- URL: https://github.com/fraction/ssb-uri
- Owner: fraction
- Created: 2018-11-20T20:37:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-09T20:52:08.000Z (over 3 years ago)
- Last Synced: 2025-04-07T01:11:19.066Z (6 months ago)
- Topics: identifier, secure-scuttlebutt, sigil, ssb, uri
- Language: JavaScript
- Homepage:
- Size: 221 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ssb-uri
[](https://github.com/RichardLitt/standard-readme)
> Uniform Resource Identifier (URI) utilities for Secure Scuttlebutt (SSB)
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)## Install
```sh
npm install --save ssb-uri
```## Usage
```js
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](https://github.com/fraction)
## Contribute
PRs accepted.
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
MIT © 2018 Fraction