A Scuttlebutt client library written in Rust.
Go to file
glyph 15c5e77da6 Merge pull request 'Add TanglesThread struct import for args' (#61) from tangle_docs_fix into main
Reviewed-on: #61
2022-11-22 13:09:02 +00:00
examples remove unneeded imports 2022-11-22 09:44:55 +02:00
git_hooks Add git hook 2022-01-15 08:45:02 -05:00
src add TanglesThread struct import for args 2022-11-22 15:07:12 +02:00
.gitignore add lockfile to git ignore list 2022-06-29 16:01:42 +01:00
CHANGELOG.md add changelog and bump version 2022-02-26 14:27:39 +02:00
Cargo.toml bump version 2022-08-09 08:26:39 +01:00
LICENSE.txt add license 2022-02-15 11:18:52 +02:00
README.md update docs and doc example code to use new keystore selector 2022-05-11 14:14:25 +02:00



The Golgi complex (aka. Golgi apparatus or Golgi body) packages proteins into membrane-bound vesicles inside the cell before the vesicles are sent to their destination.


Golgi is an asynchronous, experimental Scuttlebutt client that aims to facilitate Scuttlebutt application development. It provides a high-level API for interacting with an sbot instance and uses the kuska-ssb libraries to make RPC calls.


Golgi offers the ability to invoke individual RPC methods while also providing a number of convenience methods which may involve multiple RPC calls and / or the processing of data received from those calls. The Sbot struct is the primary means of interacting with the library.

Features include the ability to publish messages of various kinds; to retrieve messages (e.g. about and description messages) and formulate queries; to follow, unfollow, block and unblock a peer; to query the social graph; and to generate pub invite codes.

Example Usage

Basic usage is demonstrated below. Visit the examples directory in the golgi repository for more comprehensive examples.

use golgi::{GolgiError, Sbot, sbot::Keystore};

pub async fn run() -> Result<(), GolgiError> {
    // Attempt to initialise a connection to an sbot instance using the
    // secret file at the Patchwork path and the default IP address, port
    // and network key (aka. capabilities key).
    let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;

    // Call the `whoami` RPC method to retrieve the public key for the sbot
    // identity.
    let id = sbot_client.whoami().await?;
    // Print the public key (identity) to `stdout`.
    println!("{}", id);

    // Compose an SSB post message type.
    let post = SsbMessageContent::Post {
        text: "Biology, eh?!".to_string(),
        mentions: None,

    // Publish the post.
    let post_msg_reference = sbot_client.publish(post).await?;

    // Print the reference (sigil-link) for the published post.
    println!("{}", post_msg_reference);