pub struct PinHeader {
pub v: u32,
pub model: String,
pub model_hash: Option<String>,
pub source_hash: String,
pub vec_hash: String,
pub vec_dtype: String,
pub vec_dim: u32,
pub ts: String,
pub extra: BTreeMap<String, String>,
}Expand description
The signed portion of a Pin.
Two pins are considered equivalent iff their headers canonicalize to
identical bytes. Optional fields (model_hash,
extra) are omitted from the canonical form when
unset, never written as null — this matters because adding a
null would change the byte sequence the signature commits to.
You normally do not construct PinHeader directly; obtain one from
Signer::pin or
Signer::pin_with_options.
Fields§
§v: u32Protocol version. Must equal PROTOCOL_VERSION.
model: StringEmbedding model identifier.
model_hash: Option<String>Optional content hash of the model weights.
source_hash: StringSHA-256 of the source text (UTF-8 NFC).
vec_hash: StringSHA-256 of the embedding vector under the declared dtype.
vec_dtype: String"f32" or "f64".
vec_dim: u32Embedding dimensionality.
ts: StringRFC 3339 / ISO 8601 timestamp in UTC, e.g. "2026-05-05T12:00:00Z".
extra: BTreeMap<String, String>Producer-defined string-to-string metadata, signed alongside the rest of the header. Omitted from the canonical form when empty.