Sigil documentation
ReferenceRust referencesigil-core

sigil-core · artifact

Source declarations, signatures and documentation for artifact.

Source: sigil/node/sigil-core/src/artifact.rs. SHA-256: c4cc452c9390e6399bcc2ccf3ccfad9c724dff07beadaa9df347eb14ff704234.

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.

artifact::WeftRootCommitment

Typed Weft root metadata attached to an artifact commitment.

The enclosing [ArtifactCommitment] still commits to exact bytes with its blake3 field. For Weft, those bytes SHOULD be the canonical Weft manifest; this extension carries the large-payload Merkle root without pretending that the root is the byte digest of the manifest or original payload.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WeftRootCommitment {
/// Weft Merkle root over ordered chunk IDs.

pub root: SigilHash,
/// Configured chunk size in bytes.

pub chunk_size: u64,
/// Number of chunks in the manifest.

pub chunk_count: u64,
/// Original payload byte length.

pub total_len: u64,
/// CID of the committed Weft manifest.

pub manifest_cid: String
}

Source line: 18.

artifact::WeftRootCommitment::new

Build a validated Weft root commitment.

pub fn new(
        root: SigilHash,
        chunk_size: u64,
        chunk_count: u64,
        total_len: u64,
        manifest_cid: String,
    ) -> Result<Self, String>;

Source line: 33.

artifact::WeftRootCommitment::deterministic_root_cid

Deterministic CID-like identity for a Weft Merkle root.

pub fn deterministic_root_cid(root: &SigilHash) -> String;

Source line: 62.

artifact::WeftRootCommitment::root_cid

Deterministic CID-like identity for this Weft Merkle root.

pub fn root_cid(&self) -> String;

Source line: 67.

artifact::ArtifactCommitment

Canonical off-chain artifact commitment recorded by Sigil transactions, receipts, metadata manifests, and RPC responses.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ArtifactCommitment {
/// Weave content ID. Sigil's deterministic fallback CID form is

/// `weave:blake3:<hex>`.

pub cid: String,
/// BLAKE3 digest of the exact committed bytes.

pub blake3: SigilHash,
/// Exact artifact byte length.

pub byte_len: u64,
/// Optional Weft root metadata for sharded large-blob artifacts.

#[serde(default, skip_serializing_if = "Option::is_none")]
pub weft: Option<WeftRootCommitment>,
/// Media type such as `application/json` or `model/gltf-binary`.

pub media_type: String,
/// Schema identifier for deterministic interpretation.

pub schema: String,
/// Producer DID that created or published the artifact.

pub producer_did: String,
/// Producer signature over the domain-separated commitment envelope.

pub signature: Vec<u8>,
/// Block height at which this commitment became visible.

pub created_height: u64
}

Source line: 75.

artifact::ArtifactCommitment::deterministic_cid

Build the deterministic Sigil/Weave CID form used until a concrete mounted Weave model adapter supplies a stronger native CID verifier.

pub fn deterministic_cid(blake3: &SigilHash) -> String;

Source line: 101.

artifact::ArtifactCommitment::verifies_bytes

Verify byte length, BLAKE3 digest, and the deterministic CID binding.

pub fn verifies_bytes(&self, bytes: &[u8]) -> bool;

Source line: 106.

artifact::ArtifactCommitment::has_verified_identity

Return true when the commitment has the required content-addressing fields and is bound to the deterministic CID form.

pub fn has_verified_identity(&self) -> bool;

Source line: 114.

On this page