Overview
Grantex publishes a W3C Decentralized Identifier (DID) document that enables any party to verify Grantex-issued Verifiable Credentials without contacting the Grantex API. The DID document contains the public keys used to sign VCs and is hosted at a well-known URL following thedid:web method.
did:web:grantex.dev
The Grantex DID follows the did:web method specification. The DIDdid:web:grantex.dev resolves to:
DID Document Structure
Verification Methods
The DID document contains two verification methods:Relationship to JWKS
The RS256 key in the DID document is the same key available via the JWKS endpoint (/.well-known/jwks.json). The two endpoints serve different ecosystems:
Both resolve to the same underlying RSA key pair. If you are only verifying grant tokens (JWTs), use the JWKS endpoint. If you are verifying Verifiable Credentials, use the DID document.
How Verification Works
When a verifier receives a Grantex-issued Verifiable Credential (VC-JWT), the verification process is:Example: Verifying Without the Grantex SDK
Any JWT library can verify Grantex VCs. Here is a minimal example usingjose (TypeScript) and PyJWT (Python):
Agent DIDs
Every agent registered in Grantex receives a DID in the formatdid:grantex:ag_XXXX. This DID serves as the agent’s cryptographic identity and appears in:
- The
agtclaim of grant tokens - The
credentialSubject.idfield of Verifiable Credentials - Audit log entries
Service Endpoints
The DID document declares two service endpoints:GrantexAuthService
The primary Grantex API endpoint. Verifiers can use this to access the token verification API, JWKS, and other endpoints.StatusList2021Service
The base URL for StatusList2021 credentials. Verifiers append the status list ID to check revocation.Self-Hosting
When self-hosting Grantex, the DID document is served from your own domain. Thedid:web method resolves based on the domain in the DID string:
Configure the
ISSUER_DID environment variable in your auth service deployment to set the DID that appears in issued VCs. The auth service automatically generates the DID document from the signing key.
W3C Standards Alignment
API Reference
Next Steps
- Verifiable Credentials — issue and verify W3C VCs
- FIDO2 / WebAuthn — human presence verification
- Grant Token — the standard JWT-based grant token
- Token Verification — offline JWT verification via JWKS