Overview
Thecredentials sub-client manages W3C Verifiable Credentials and SD-JWT selective disclosures. You can retrieve individual credentials, list credentials with filters, verify credential JWTs, and create selective-disclosure presentations.
credentials.get()
Retrieve a single Verifiable Credential by its ID.Parameters
The unique credential identifier.
Response: VerifiableCredential
Unique credential identifier.
Credential types (always includes
'VerifiableCredential').DID of the credential issuer.
DID of the credential subject (the holder).
ISO 8601 timestamp when the credential was issued.
ISO 8601 timestamp when the credential expires, or
null if it does not expire.Current status:
'active', 'revoked', or 'expired'.The credential in compact JWT format.
The credential subject claims (key-value pairs).
credentials.list()
List Verifiable Credentials with optional filters.Parameters
Filter credentials by principal (subject) ID.
Filter by credential type (e.g.,
'IdentityCredential', 'EmploymentCredential').Filter by credential status.
Page number for pagination (default: 1).
Number of results per page (default: 20, max: 100).
Response: ListCredentialsResponse
Array of Verifiable Credential objects.
Total number of matching credentials.
credentials.verify()
Verify a Verifiable Credential JWT. Checks the signature, expiration, revocation status, and issuer trust chain.Parameters
The Verifiable Credential in compact JWT format.
Response: VerifyCredentialResponse
Whether the credential is valid.
DID of the credential issuer (present when valid).
DID of the credential subject (present when valid).
The credential subject claims (present when valid).
ISO 8601 expiration timestamp, or
null if the credential does not expire.Reason for invalidity (present when
valid is false): 'expired', 'revoked', 'invalid_signature', or 'untrusted_issuer'.credentials.present()
Create a selective-disclosure presentation from an SD-JWT. Only the specified claims are disclosed in the resulting presentation JWT.Parameters
The SD-JWT credential to create a presentation from.
List of claim names to disclose in the presentation. All other claims remain hidden.
The intended verifier DID or URL. Included in the holder binding JWT if provided.
A nonce value for replay protection in the holder binding.
Response: PresentCredentialResponse
The SD-JWT presentation containing only the disclosed claims.
The claim names that were disclosed.
The key binding JWT proving the holder’s possession of the credential.