sigil-node · weave
Source declarations, signatures and documentation for weave.
Source: sigil/node/sigil-node/src/weave.rs. SHA-256: 6bf11846dbe99d002a296a6921e1fb13f2419245f04a25cbd7177ef9d7bcefdf.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
weave::ArtifactMetadata
Metadata supplied when publishing an off-chain artifact.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ArtifactMetadata {
pub media_type: String,
pub schema: String,
pub producer_did: String,
pub signature: Vec<u8>,
pub created_height: u64
}Source line: 15.
weave::WeaveArtifactStore
Explicit boundary for Weave-backed content-addressed artifacts.
pub trait WeaveArtifactStore: Send + Sync {
fn put_artifact(
&self,
bytes: &[u8],
metadata: ArtifactMetadata,
) -> Result<ArtifactCommitment, NodeError>;
fn get_artifact(&self, cid_or_hash: &str) -> Result<Vec<u8>, NodeError>;
fn verify_artifact(&self, commitment: &ArtifactCommitment, bytes: &[u8]) -> bool;
fn pin_artifact(&self, commitment: &ArtifactCommitment) -> Result<(), NodeError>;
fn mirror_artifact(&self, commitment: &ArtifactCommitment) -> Result<(), NodeError>;
}Source line: 24.
weave::WeftArtifactPublication
Published Weft artifact returned by the local Sigil adapter.
#[derive(Debug, Clone)]
pub struct WeftArtifactPublication {
pub commitment: ArtifactCommitment,
pub manifest: weave_weft::manifest::WeftManifest,
pub manifest_bytes: Vec<u8>,
pub root_cid: String
}Source line: 38.
weave::LocalWeftArtifactStore
Concrete local Weft store used by Sigil RPC nodes.
#[derive(Debug, Clone)]
pub struct LocalWeftArtifactStore {
}Source line: 47.
weave::LocalWeftArtifactStore::open
pub fn open(path: impl AsRef<Path>, peer_id: impl Into<String>) -> Result<Self, NodeError>;Source line: 63.
weave::LocalWeftArtifactStore::publish_weft_artifact
pub fn publish_weft_artifact(
&self,
bytes: &[u8],
metadata: ArtifactMetadata,
chunk_size: Option<usize>,
) -> Result<WeftArtifactPublication, NodeError>;Source line: 71.
weave::LocalWeftArtifactStore::publish_weft_artifact_reader
pub fn publish_weft_artifact_reader<R: Read>(
&self,
reader: R,
metadata: ArtifactMetadata,
chunk_size: Option<usize>,
) -> Result<WeftArtifactPublication, NodeError>;Source line: 87.
weave::LocalWeftArtifactStore::fetch_weft_payload
pub async fn fetch_weft_payload(
&self,
root: weave_weft::WeftHash,
) -> Result<Vec<u8>, NodeError>;Source line: 178.
weave::LocalWeftArtifactStore::manifest_bytes
pub fn manifest_bytes(&self, root: weave_weft::WeftHash) -> Result<Option<Vec<u8>>, NodeError>;Source line: 188.
weave::LocalWeftArtifactStore::status
pub fn status(&self) -> Result<weave_weft::local::LocalWeftStatus, NodeError>;Source line: 194.
weave::CommitmentOnlyWeaveStore
Commitment-only verifier used when the Weave model package is not linked into the node binary. Retrieval/pin/mirror fail closed.
#[derive(Debug, Default, Clone, Copy)]
pub struct CommitmentOnlyWeaveStore;Source line: 306.
weave::commitment_for_bytes
Build a commitment without storing bytes. Useful for tests, RPC helpers, and future domain-specific transaction/RPC surfaces that already carry artifact metadata fields.
pub fn commitment_for_bytes(bytes: &[u8], metadata: ArtifactMetadata) -> ArtifactCommitment;Source line: 357.