Canonicalization and protection¶
canonical ¶
Versioned canonical JSON and protected-payload ports.
SafeReference
module-attribute
¶
SafeReference = Annotated[str, StringConstraints(min_length=1, max_length=255), AfterValidator(_validate_safe_reference)]
OpaquePayload
module-attribute
¶
ExperimentalModel ¶
Bases: BaseModel
Strict, immutable base for the experimental public contract.
model_config
class-attribute
instance-attribute
¶
CanonicalizationError ¶
Bases: ValueError
Raised when a value cannot enter the canonical finance boundary.
KeyedCommitment ¶
ProtectedPayload ¶
CommitmentProvider ¶
Bases: Protocol
Host-owned proposal-scoped keyed commitment boundary.
Destruction must be idempotent so an interrupted erasure can resume safely.
verify
async
¶
verify(*, proposal_reference: str, canonical_payload: bytes, commitment: KeyedCommitment) -> bool
ProtectionCodec ¶
Bases: Protocol
Host-owned protection boundary for canonical private snapshots.
Destruction must be idempotent so an interrupted erasure can resume safely.
model_json_object ¶
model_json_object(model: BaseModel) -> JsonObject
Convert a host Pydantic model to a checked JSON object.
canonicalize_v1 ¶
Produce deterministic UTF-8 JSON for the internal canonical v1 profile.
commitment_payload_v1 ¶
Domain-separate a private snapshot commitment from every other digest.