https://github.com/ssbc/ssb-uri-rs
Utilities for recognising and converting Secure Scuttlebutt (SSB) URIs
https://github.com/ssbc/ssb-uri-rs
Last synced: 7 months ago
JSON representation
Utilities for recognising and converting Secure Scuttlebutt (SSB) URIs
- Host: GitHub
- URL: https://github.com/ssbc/ssb-uri-rs
- Owner: ssbc
- Created: 2021-09-22T14:13:54.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T07:07:20.000Z (almost 4 years ago)
- Last Synced: 2025-06-09T15:37:56.751Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 42 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSES/CC0-1.0.txt
Awesome Lists containing this project
README
# ssb-uri-rs
Utilities for recognising and converting Secure Scuttlebutt (SSB) URIs according to the [SSB URI Specification](https://github.com/ssb-ngi-pointer/ssb-uri-spec).
[](https://crates.io/crates/ssb-uri-rs)
## Example
```rust
use ssb_uri_rs;
let example_uri = "ssb:message/sha256/g3hPVPDEO1Aj_uPl0-J2NlhFB2bbFLIHlty-YuqFZ3w=";
assert!(ssb_uri_rs::is_classic_msg_uri(example_uri)?);
let example_sigil = ssb_uri_rs::msg_uri_to_sigil(example_uri)?;
assert_eq!(example_sigil, "%g3hPVPDEO1Aj/uPl0+J2NlhFB2bbFLIHlty+YuqFZ3w=.sha256");
```
## Documentation
Use `cargo doc` to generate and serve the Rust documentation for this library:
```bash
git clone git@github.com:ssb-ngi-pointer/ssb-uri-rs.git
cd ssb-uri-rs
cargo doc --no-deps --open
```
## License
LGPL-3.0.