UNPKG

@sphereon/openid4vci-client

Version:

OpenID for Verifiable Credential Issuance (OpenID4VCI) client

39 lines (38 loc) 1.79 kB
import { EndpointMetadata, IssuanceInitiationRequestPayload, IssuanceInitiationWithBaseUrl, OpenID4VCIServerMetadata, OpenIDResponse, WellKnownEndpoints } from './types'; export declare class MetadataClient { static async: any; /** * Retrieve metadata using the Initiation obtained from a previous step * * @param initiation */ static retrieveAllMetadataFromInitiation(initiation: IssuanceInitiationWithBaseUrl): Promise<EndpointMetadata>; /** * Retrieve the metada using the initiation request obtained from a previous step * @param initiationRequest */ static retrieveAllMetadataFromInitiationRequest(initiationRequest: IssuanceInitiationRequestPayload): Promise<EndpointMetadata>; /** * Retrieve all metadata from an issuer * @param issuer The issuer URL */ static retrieveAllMetadata(issuer: string, opts?: { errorOnNotFound: boolean; }): Promise<EndpointMetadata | undefined>; /** * Retrieve only the OID4VCI metadata for the issuer. So no OIDC/OAuth2 metadata * * @param issuerHost The issuer hostname */ static retrieveOpenID4VCIServerMetadata(issuerHost: string): Promise<OpenIDResponse<OpenID4VCIServerMetadata> | undefined>; /** * Allows to retrieve information from a well-known location * * @param host The host * @param endpointType The endpoint type, currently supports OID4VCI, OIDC and OAuth2 endpoint types * @param opts Options, like for instance whether an error should be thrown in case the endpoint doesn't exist */ static retrieveWellknown<T>(host: string, endpointType: WellKnownEndpoints, opts?: { errorOnNotFound?: boolean; }): Promise<OpenIDResponse<T>>; }