byCollection

fun byCollection(collectionId: String)

Filter by collection (requires CredentialCollections capability).

Collections are wallet-level metadata not embedded in the credential itself. Wallet implementations that support CredentialCollections must check requestedCollections after applying the standard predicate. Calling byCollection multiple times narrows the result: a credential must belong to ALL requested collections.

Implementations that do not store collection data must throw UnsupportedOperationException when requestedCollections is non-empty — silently ignoring the filter and returning all credentials is never acceptable.