Expand description
§attestix
Offline verifier for credentials and delegation chains issued by the Attestix Python core — no Python runtime needed.
It reproduces the Attestix JCS-style canonical form byte-for-byte (see
canonicalize). This is not strict RFC 8785: Attestix additionally
NFC-normalizes every string value and object key, and collapses whole-number
floats to integers. See the canonical-form spec at
https://attestix.io/spec/bundle/v1 and the conformance vectors at
spec/verify/v1/vectors.json in https://github.com/VibeTensor/attestix.
§Quick start
use attestix::{verify_credential, parse_rfc3339};
use serde_json::Value;
let vc: Value = serde_json::from_str(r#"{ "...": "a full W3C VC JSON" }"#)?;
let now = parse_rfc3339("2026-06-01T00:00:00+00:00")?;
let result = verify_credential(&vc, now)?;
if result.verify() {
println!("credential is valid");
}The crate is no_std-friendly for the canonicalization and crypto core (the
std default feature only adds std::error::Error and the JSON/JWT helpers).
Structs§
- Credential
Result - Structured result of verifying a credential.
- Date
Time - Re-export of
time::OffsetDateTimeso downstream crates need not depend ontimedirectly to callverify_credential. APrimitiveDateTimewith aUtcOffset. - Delegation
Result - Structured result of verifying a two-link delegation chain.
Enums§
- Verify
Error - Errors raised while decoding inputs or verifying credentials / delegations.
Constants§
- ED25519_
MULTICODEC_ PREFIX - Multicodec prefix for an Ed25519 public key (
ed25519-pub).
Functions§
- canonicalize
- Produce the Attestix JCS-style canonical UTF-8 bytes for a JSON value.
- decode_
did_ key - Decode a full
did:key:z…string into the raw 32-byte Ed25519 public key. - decode_
multibase - Decode a
z…multibase body (the part afterdid:key:) into the raw key. - encode_
did_ key - Encode a raw 32-byte Ed25519 public key as a full
did:key:z…string. - encode_
multibase - Encode a raw 32-byte Ed25519 public key as the
z…multibase body. - parse_
rfc3339 - Parse an RFC 3339 / ISO 8601 timestamp (e.g.
2026-06-01T00:00:00+00:00) into anOffsetDateTimesuitable forverify_credential. - verify_
credential - Verify a full W3C VC JSON object against the wall-clock time
now. - verify_
delegation_ chain - Verify a parent→child delegation chain.