@inrupt/solid-client-vc / lookup/derive

Module: lookup/derive#

References#

default#

Renames and re-exports getVerifiableCredentialAllFromShape

Functions#

getVerifiableCredentialAllFromShape#

getVerifiableCredentialAllFromShape(holderEndpoint, vcShape, options?): Promise<VerifiableCredential[]>

Look up VCs from a given holder according to a subset of their claims, such as the VC type, or any property associated to the subject in the VC. The holder is expected to implement the W3C VC Holder HTTP API.

Since

0.1.0

Parameters#

Name

Type

Description

holderEndpoint

string

The /derive endpoint of the holder.

vcShape

Partial<VerifiableCredential>

The subset of claims you expect the matching VCs to contain.

options?

Partial<{ fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response> ; includeExpiredVc: boolean }>

Optional parameter: - options.fetch: An alternative fetch function to make the HTTP request, compatible with the browser-native fetch API. This can be typically used for authentication. Note that if it is omitted, and @inrupt/solid-client-authn-browser is in your dependencies, the default session is picked up. - options.includeExpiredVc: include expired VC matching the shape in the result set.

Returns#

Promise<VerifiableCredential[]>

A list of VCs matching the given VC shape. The list may be empty if the holder does not hold any matching VC.

Defined in#

src/lookup/derive.ts:99