25 releases (10 breaking)

0.11.0+deprecated Sep 19, 2023
0.9.0 Jul 20, 2023
0.2.0 Mar 29, 2023

#11 in #noosphere

Download history 27/week @ 2024-09-18 44/week @ 2024-09-25

506 downloads per month

MIT/Apache

785KB
17K SLoC

API Stability: Alpha

noosphere-sphere

High-level access to content, address books and other features of spheres


lib.rs:

This crate implements content, petname and other forms of acccess to spheres. If you have storage and network primitives on your platform, you can initialize a [SphereContext] and use it to work with and synchronize spheres, as well as traverse the broader Noosphere data graph.

In order to initialize a [SphereContext], you need a [Did] (like an ID) for a Sphere, a [Storage] primitive and an [Author] (which represents whoever or whatever is trying to access the Sphere inquestion).

Once you have a [SphereContext], you can begin reading from, writing to and traversing the Noosphere content graph.

#
#
#
sphere_context.write("foo", "text/plain", "bar".as_ref(), None).await?;
sphere_context.save(None).await?;
#
#

You can also use a [SphereContext] to access petnames in the sphere:

#
#
#
sphere_context.set_petname("cdata", Some("did:key:example".into())).await?;
sphere_context.save(None).await?;
#
#

Dependencies

~17–34MB
~509K SLoC