sigil-core · evidence
Source declarations, signatures and documentation for evidence.
Source: sigil/node/sigil-core/src/evidence.rs. SHA-256: 16f65f8b5a50f6e3d5fb5c1b03a79b06ea4260444a325b2a3b59e5614073200b.
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.
evidence::MAX_EVIDENCE_LABEL_LEN
Maximum byte length of the anchor label.
pub const MAX_EVIDENCE_LABEL_LEN: usize;Source line: 31.
evidence::MAX_EVIDENCE_METADATA_BYTES
Maximum serialized byte size of the anchor metadata JSON.
pub const MAX_EVIDENCE_METADATA_BYTES: usize;Source line: 33.
evidence::MAX_EVIDENCE_URI_LEN
Maximum byte length of the optional content URI.
pub const MAX_EVIDENCE_URI_LEN: usize;Source line: 35.
evidence::MAX_EVIDENCE_CLIENT_NONCE_LEN
Maximum byte length of the client nonce.
pub const MAX_EVIDENCE_CLIENT_NONCE_LEN: usize;Source line: 37.
evidence::EvidenceAnchorData
Payload for an [crate::transaction::TransactionType::EvidenceAnchor]
transaction.
The digest is the lowercase hex-encoded BLAKE3-256 digest of the
anchored artifact. All fields are bounded so the payload stays small
enough for deterministic block propagation.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct EvidenceAnchorData {
/// Lowercase hex-encoded BLAKE3 digest (64 hex chars) of the artifact.
pub digest: String,
/// Bounded classification label, e.g. `"one.harness-archive.v1"`.
pub label: String,
/// Optional content-addressed URI for retrieval (Weft CID, IPFS, HTTPS).
pub uri: Option<String>,
/// Small JSON metadata object (bounded by [`MAX_EVIDENCE_METADATA_BYTES`]).
pub metadata: serde_json::Value,
/// Client-chosen nonce; participates in the deterministic anchor ID so
/// re-anchoring the same digest is possible while accidental duplicate
/// submission is rejected.
pub client_nonce: String
}Source line: 46.
evidence::EvidenceAnchorData::validate
Validate the payload. Called by the executor; SDK callers should validate before signing to fail fast.
pub fn validate(&self) -> Result<(), CoreError>;Source line: 64.
evidence::EvidenceAnchorData::digest_hash
The digest as a typed [SigilHash].
pub fn digest_hash(&self) -> Result<SigilHash, CoreError>;Source line: 95.
evidence::EvidenceAnchorRecord
On-chain record produced by a successful EvidenceAnchor execution.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct EvidenceAnchorRecord {
/// Deterministic anchor ID (`evidence:anchor:<blake3 hex>`).
pub anchor_id: String,
/// Lowercase hex BLAKE3 digest of the anchored artifact.
pub digest: String,
/// Classification label from the anchor payload.
pub label: String,
/// Optional content URI from the anchor payload.
pub uri: Option<String>,
/// Metadata JSON from the anchor payload.
pub metadata: serde_json::Value,
/// DID of the account that anchored (the transaction sender).
pub anchor_did: String,
/// Block height at which the anchor transaction executed.
pub anchored_at_height: u64,
/// Hex hash of the anchor transaction.
pub tx_hash: String
}Source line: 102.
evidence::evidence_anchor_id
Derive the deterministic anchor ID for an evidence anchor.
The ID is evidence:anchor:<hex> where the hex is a domain-separated
BLAKE3 hash over (chain_id, anchor_did, digest, client_nonce). It is
stable across nodes and replays, so duplicate submissions of the same
logical anchor are rejected deterministically at execution time.
pub fn evidence_anchor_id(
chain_id: &str,
anchor_did: &str,
digest: &str,
client_nonce: &str,
) -> Result<String, CoreError>;Source line: 127.
evidence::validate_digest_hex
Validate that digest is exactly 64 lowercase hex characters.
Uppercase input is rejected rather than normalized: anchor payloads are consensus data, and canonical form must be unambiguous across clients.
pub fn validate_digest_hex(digest: &str) -> Result<(), CoreError>;Source line: 153.