weave-weft · manifest
Source declarations, signatures and documentation for manifest.
Reviewed implementation boundary: Producer signatures must be computed over the exact manifest before validate/from_bytes or publication; an empty signature is rejected. Reader interfaces do not establish constant-memory storage, and chain reference metadata alone does not submit or prove anchoring. See /libraries/weft/publish.
Source: sigil/weave/models/weft/src/manifest.rs. SHA-256: cb7be6078a653f6e254367b19df694084345eca58b0aa709c2a3a335e336e040.
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.
manifest::WEFT_MANIFEST_SCHEMA
Canonical schema string for Weft manifests.
pub const WEFT_MANIFEST_SCHEMA: &str;Source line: 9.
manifest::WEFT_MANIFEST_VERSION
Current manifest version.
pub const WEFT_MANIFEST_VERSION: u16;Source line: 11.
manifest::ManifestProducer
Producer identity and signature bytes.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ManifestProducer {
/// Producer DID.
pub did: String,
/// Optional key id, normally a DID URL.
pub signing_key_id: Option<String>,
/// Signature over [`WeftManifest::signing_payload`].
pub signature: Vec<u8>
}Source line: 15.
manifest::ArtifactMetadata
Higher-level artifact metadata carried by the manifest.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ArtifactMetadata {
/// Optional asset id supplied by an external registry such as MARS.
pub artifact_id: Option<String>,
/// Media type of the original payload.
pub media_type: String,
/// Schema for interpreting the original payload.
pub schema: String,
/// Optional MARS asset id. Informational until a concrete transaction is linked.
pub mars_asset_id: Option<String>,
/// Optional Sigil artifact commitment CID for the manifest or payload.
pub sigil_commitment_cid: Option<String>
}Source line: 26.
manifest::ParitySpec
Reserved parity/erasure-coding metadata.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ParitySpec {
/// Scheme name, for example `reed-solomon`.
pub scheme: String,
/// Data shard count.
pub data_shards: u16,
/// Parity shard count.
pub parity_shards: u16,
/// Must be true until parity fetch/reconstruction is implemented.
pub experimental: bool
}Source line: 41.
manifest::WeftManifest
A signed manifest committing a large artifact to chunk IDs and a Merkle root.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WeftManifest {
/// Schema identifier.
pub schema: String,
/// Manifest version.
pub version: u16,
/// Merkle root over ordered chunk IDs.
pub root: WeftHash,
/// Chunk size used for all chunks except the final chunk.
pub chunk_size: u64,
/// Number of chunks.
pub chunk_count: u64,
/// Original payload length in bytes.
pub total_len: u64,
/// Ordered chunk descriptors.
pub chunks: Vec<ChunkDescriptor>,
/// Reserved parity metadata.
pub parity: Option<ParitySpec>,
/// Producer DID and signature.
pub producer: ManifestProducer,
/// Artifact metadata for registry and Sigil consumers.
pub artifact: ArtifactMetadata
}Source line: 54.
manifest::WeftManifest::from_bytes
Build a manifest directly from payload bytes.
pub fn from_bytes(
bytes: &[u8],
config: ChunkConfig,
producer: ManifestProducer,
artifact: ArtifactMetadata,
) -> Result<Self>;Source line: 79.
manifest::WeftManifest::from_chunk_descriptors
Build a manifest from precomputed ordered chunk descriptors.
pub fn from_chunk_descriptors(
total_len: u64,
config: ChunkConfig,
chunks: Vec<ChunkDescriptor>,
producer: ManifestProducer,
artifact: ArtifactMetadata,
) -> Result<Self>;Source line: 108.
manifest::WeftManifest::to_canonical_bytes
Serialize with deterministic field order.
pub fn to_canonical_bytes(&self) -> Result<Vec<u8>>;Source line: 134.
manifest::WeftManifest::from_canonical_bytes
Deserialize canonical manifest bytes.
pub fn from_canonical_bytes(bytes: &[u8]) -> Result<Self>;Source line: 139.
manifest::WeftManifest::signing_payload
Return the bytes a producer signs. The signature field is cleared.
pub fn signing_payload(&self) -> Result<Vec<u8>>;Source line: 146.
manifest::WeftManifest::validate
Validate internal manifest consistency.
pub fn validate(&self) -> Result<()>;Source line: 153.