Skip to main content

Overview

The credentials 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

string
required
The unique credential identifier.

Response: VerifiableCredential

string
Unique credential identifier.
string[]
Credential types (always includes 'VerifiableCredential').
string
DID of the credential issuer.
string
DID of the credential subject (the holder).
string
ISO 8601 timestamp when the credential was issued.
string | null
ISO 8601 timestamp when the credential expires, or null if it does not expire.
string
Current status: 'active', 'revoked', or 'expired'.
string
The credential in compact JWT format.
Record<string, unknown>
The credential subject claims (key-value pairs).

credentials.list()

List Verifiable Credentials with optional filters.

Parameters

string
Filter credentials by principal (subject) ID.
string
Filter by credential type (e.g., 'IdentityCredential', 'EmploymentCredential').
'active' | 'revoked' | 'expired'
Filter by credential status.
number
Page number for pagination (default: 1).
number
Number of results per page (default: 20, max: 100).

Response: ListCredentialsResponse

VerifiableCredential[]
Array of Verifiable Credential objects.
number
Total number of matching credentials.

credentials.verify()

Verify a Verifiable Credential JWT. Checks the signature, expiration, revocation status, and issuer trust chain.

Parameters

string
required
The Verifiable Credential in compact JWT format.

Response: VerifyCredentialResponse

boolean
Whether the credential is valid.
string
DID of the credential issuer (present when valid).
string
DID of the credential subject (present when valid).
Record<string, unknown>
The credential subject claims (present when valid).
string | null
ISO 8601 expiration timestamp, or null if the credential does not expire.
string
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

string
required
The SD-JWT credential to create a presentation from.
string[]
required
List of claim names to disclose in the presentation. All other claims remain hidden.
string
The intended verifier DID or URL. Included in the holder binding JWT if provided.
string
A nonce value for replay protection in the holder binding.

Response: PresentCredentialResponse

string
The SD-JWT presentation containing only the disclosed claims.
string[]
The claim names that were disclosed.
string
The key binding JWT proving the holder’s possession of the credential.

Full example

Last modified on July 11, 2026