What are attestations?
An attestation is a cryptographically signed proof that a verification occurred. It:- Uses ES256 (ECDSA P-256) signatures
- Is formatted as a JWT
- Can be verified independently
- Can be stored on-chain
Requesting attestations
Fail-closed contract
AttestationResult
Lifecycle state of the attestation. One of
ISSUED, BLOCKED, or UNVERIFIABLE.Signed JWT string. Present only when
status == ISSUED; None otherwise.Machine-readable failure code:
"SIGNING_FAILURE" when signing failed, "CRYPTO_UNAVAILABLE" when the cryptography / PyJWT package is not installed, None on success.Human-readable failure detail.
None on success.Property.
True only when status is AttestationStatus.ISSUED. You must check this flag before you use token.AttestationStatus values
| Status | Meaning | token | error_code |
|---|---|---|---|
ISSUED | QWED signed the attestation. | JWT string | None |
BLOCKED | Crypto is available but signing failed (key error, JWT error). Hard block. | None | SIGNING_FAILURE |
UNVERIFIABLE | cryptography / PyJWT not installed. QWED did not attempt signing. | None | CRYPTO_UNAVAILABLE |
VALID / EXPIRED / REVOKED | Lifecycle states for previously issued attestations during verification. | — | — |
Caller pattern
Key lifecycle auditability
EveryIssuerKeyPair records generated_at (epoch seconds) and key_continuity_policy. QWED emits a structured log entry (attestation.key_generated) on every new key generation, so you can audit continuity events.
Policy for the issuer key pair. Must be one of
"ephemeral" (in-memory, non-persistent — default) or "persistent" (durably stored, e.g. external KMS). Any other value raises ValueError.AttestationService.get_issuer_info() now includes key_generated_at and key_continuity_policy alongside the existing issuer registry fields.
Attestation structure
Header
Payload
Verifying attestations
Using the API
Using the SDK
Trust anchors
QWED maintains a registry of trusted attestation issuers:| Issuer DID | Name | Status |
|---|---|---|
did:qwed:node:production | QWED Production | ✅ Active |
did:qwed:node:staging | QWED Staging | ✅ Active |
Attestation chains
Link multiple attestations together:Use cases
- Audit Trails - Prove AI outputs were verified
- Compliance - Regulatory verification records
- Blockchain - Anchor proofs on-chain
- Badges - Show verification status in UIs