Skip to main content

Crate choreo_content

Crate choreo_content 

Source
Expand description

Choreographr Coordination Platform tools.

This crate implements the read/write tooling for the Choreographr Coordination Platform: a Substrate runtime (choreo-runtime) running pallet-content and its companion pallets, with content payloads stored on a local IPFS node and indexed by acuity-index.

§Threading model

The daemon stays thread-only. This crate owns a tokio sidecar runtime (runtime) used only to drive subxt (node RPC + tx submission). IPFS (ipfs, via ureq) and the indexer (indexer, via tungstenite in synchronous mode) make no use of the sidecar, so only signed chain writes and on-chain state reads go through it.

§Public surface

All four modules expose ContentError-returning, blocking execute_* functions. The daemon registers thin Tool wrappers over them under the coord tool group.

Re-exports§

pub use error::ContentError;

Modules§

acuity_runtime
chain
Substrate chain client — subxt against the Coordination Platform node.
config
Hardcoded Coordination Platform endpoint + identity configuration.
encode
Content protocol: protobuf ItemMessage encoding/decoding, mixin construction, deterministic item-id derivation, and CID <-> sha2-256-digest conversion.
error
Structured error type for the Coordination Platform tools.
image
Publish-time image processing: turn a local image file into the fully specified ImageSpec the content protocol expects.
indexer
Synchronous client for the acuity-index WebSocket JSON-RPC API.
ipfs
Blocking IPFS client — reads/writes content payloads on the local daemon.
orchestrate
High-level operations — the pipelines the daemon’s thin Tool wrappers call.
prelude
Convenience: every module re-exports its central public types under a single choreo_content:: path for the daemon’s thin tool wrappers.
runtime
Sidecar tokio runtime for the Coordination Platform’s subxt client.

Functions§

init
Uniffi-style init hook: build the sidecar runtime. The daemon calls this from main(). Idempotent.