Skip to main content

Crate hashiverse_client_rust

Crate hashiverse_client_rust 

Source
Expand description

§hashiverse-client-rust — friendly Rust client wrapper

Hashiverse is your open-source decentralized X/Twitter replacement. This crate is the ergonomic Rust entry point: it picks sensible defaults for every pluggable trait in hashiverse_lib (sqlite client storage, on-disk key locker, DNSSEC-validated public bootstrap, native parallel PoW, real-time clock, HTTPS transport) so you can spin up a working client in a few lines.

let hashiverse = hashiverse_client_rust::HashiverseBuilder::new()
    .build_with_keyphrase("correct horse battery staple")
    .await?;

hashiverse.submit_post("<p>hello, hashiverse</p>").await?;

If you need to override a default, use the builder methods (HashiverseBuilder::data_dir, HashiverseBuilder::passphrase, HashiverseBuilder::bootstrap). If you need full control, build a hashiverse_lib::client::hashiverse_client::HashiverseClient directly against hashiverse_lib — this crate is opinionated by design and deliberately does not expose every knob.

Re-exports§

pub use hashiverse_lib;

Structs§

Hashiverse
A configured Hashiverse client. Deref into a hashiverse_lib::client::hashiverse_client::HashiverseClient for the full API.
HashiverseBuilder
Builder for a Hashiverse client with sensible defaults for every pluggable trait. See the crate-level docs for an example.