CredentialQueryBuilder

Fluent query builder for credentials.

Example:

val query = CredentialQueryBuilder().apply {
byIssuer("did:key:issuer")
byType("PersonCredential")
notExpired()
valid()
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Collection IDs requested via byCollection. Wallet implementations must use these for collection-based filtering.

Link copied to clipboard

Tags requested via byTag. Wallet implementations must use these for tag-based filtering.

Functions

Link copied to clipboard
fun byCollection(collectionId: String)

Filter by collection (requires CredentialCollections capability).

Link copied to clipboard
fun byIssuer(issuerDid: String)

Filter by issuer DID.

Link copied to clipboard
fun bySubject(subjectId: String)

Filter by subject ID.

Link copied to clipboard
fun byTag(tag: String)

Filter by tag (requires CredentialTagging capability).

Link copied to clipboard
fun byType(type: String)

Filter by credential type.

Link copied to clipboard
fun byTypes(vararg types: String)

Filter by multiple credential types.

Link copied to clipboard
fun expired()

Filter to only expired credentials.

Link copied to clipboard

Filter to only non-expired credentials.

Link copied to clipboard

Filter to only non-revoked credentials.

Link copied to clipboard
fun revoked()

Filter to only revoked credentials.

Link copied to clipboard

Get the query predicate. This is the public API for getting the predicate function.

Link copied to clipboard
fun valid()

Filter to only valid credentials (not expired, not revoked, has proof).