UNPKG

@sphereon/openid4vci-client

Version:

OpenID for Verifiable Credential Issuance (OpenID4VCI) client

67 lines (66 loc) 1.93 kB
import { CredentialFormat } from '@sphereon/ssi-types'; import { OAuth2ASMetadata } from './OAuth2ASMetadata'; export interface OpenID4VCIServerMetadata { credential_endpoint: string; credentials_supported: CredentialsSupported; credential_issuer?: CredentialIssuer; token_endpoint?: string; authorization_server?: string; authorization_endpoint?: string; } export declare type Oauth2ASWithOID4VCIMetadata = OAuth2ASMetadata & OpenID4VCIServerMetadata; export interface CredentialIssuer { display?: IssuerDisplay; } export interface CredentialMetadata { display?: CredentialDisplay[]; formats: Formats; claims?: Claims; } export interface CredentialsSupported { [credentialId: string]: CredentialMetadata; } export interface CredentialDisplay { name: string; locale?: string; logo?: Logo; [x: string]: any; } export interface Logo { url?: string; alt_text?: string; description?: string; background_color?: string; text_color?: string; [x: string]: any; } export interface ClaimSupport { mandatory?: boolean; namespace?: string; value_type?: string; display?: ClaimDisplay[]; [x: string]: any; } export interface Claims { [claimId: string]: ClaimSupport; } export declare type OpenID4VCICredentialFormatTypes = CredentialFormat | 'mdl_iso' | 'ac_vc' | string; export interface CredentialFormatSupport { types: string[]; cryptographic_binding_methods_supported?: string[]; cryptographic_suites_supported?: string[]; [x: string]: any; } export declare type Formats = { [format in OpenID4VCICredentialFormatTypes]: CredentialFormatSupport; }; export interface ClaimDisplay { name?: string; locale?: string; [x: string]: any; } export interface IssuerDisplay { name?: string; locale?: string; [x: string]: any; }