UNPKG

@blockchain-lab-um/oidc-types

Version:

Types for OIDC.

34 lines (31 loc) 936 B
import { SupportedCredentialFormats } from './credential.js'; type Credential = { format: SupportedCredentialFormats; } & ({ format: 'jwt_vc_json' | 'jwt_vc_json-ld' | 'ldp_vc'; types: string[]; } | { format: 'mso_mdoc'; doctype: string; }); type Credentials = (string | Credential)[]; interface Grants { authorization_code?: { issuer_state?: string; }; 'urn:ietf:params:oauth:grant-type:pre-authorized_code'?: { 'pre-authorized_code': string; user_pin_required?: boolean; }; } interface CredentialOfferRequest { credentials: Credentials; grants?: ('urn:ietf:params:oauth:grant-type:pre-authorized_code' | 'authorization_code')[]; userPinRequired?: boolean; } interface CredentialOffer { credential_issuer: string; credentials: Credentials; grants?: Grants; } export type { Credential, CredentialOffer, CredentialOfferRequest, Credentials, Grants };