Overview
SD-JWT (Selective Disclosure JWT) extends Grantex’s Verifiable Credential support with privacy-preserving selective disclosure. Instead of revealing all credential claims to every verifier, agents can choose which fields to disclose per interaction.SD-JWT builds on the existing VC-JWT infrastructure. Pass
credentialFormat: "sd-jwt" during token exchange to receive an SD-JWT instead of a standard VC-JWT.Why Selective Disclosure?
In agentic commerce, an agent may interact with many services, each needing different information:- A payment processor needs to verify budget authorization, but doesn’t need the principal’s identity
- A content API needs to verify scopes, but doesn’t need to know the developer
- A compliance auditor needs full disclosure of all claims
How It Works
SD-JWT Format
An SD-JWT consists of three parts separated by~:
- Issuer JWT: A standard JWT containing visible claims and SHA-256 hashes of selective claims in a
_sdarray - Disclosures: Base64url-encoded JSON arrays of
[salt, claim_name, claim_value] - Trailing
~: Indicates the end of disclosures
Issuance Flow
Presentation Flow
When presenting to a verifier, the agent selects which fields to reveal:Verification
Any party can verify an SD-JWT presentation:Default Selective Fields
By default, the following credential subject fields are selectively disclosable:| Field | Description | Always visible? |
|---|---|---|
id (agentDid) | Agent’s DID identifier | Yes |
type | Credential type (AIAgent) | Yes |
grantId | Grant record ID | Yes |
principalId | End-user who authorized | No (selective) |
developerId | Developer organization | No (selective) |
scopes | Authorized scopes | No (selective) |
delegationDepth | Delegation chain depth | No (selective) |
Verifiable Intent Compatibility
SD-JWT enables Grantex credentials to be compatible with Verifiable Intent frameworks like the Mastercard model. By selectively disclosing only the fields relevant to a specific transaction, agents can:- Prove authorization without revealing identity
- Demonstrate scope without exposing the full grant
- Verify delegation chains without leaking organizational structure
SDK Support
TypeScript
Python
API Reference
Token Exchange with SD-JWT
sdJwtCredential alongside the standard grantToken.
Verify SD-JWT Presentation
Security Considerations
- Disclosures are salted with 128-bit cryptographic random values to prevent correlation attacks
- The
_sdarray contains SHA-256 hashes that bind disclosures to the issuer JWT - Tampered or fabricated disclosures are detected by hash mismatch
- The issuer JWT signature covers the
_sdarray, preventing hash substitution - SD-JWT verification requires the same public key infrastructure as VC-JWT (Grantex JWKS/DID)