UNPKG

@blockchain-lab-um/oidc-types

Version:

Types for OIDC.

30 lines (28 loc) 1.22 kB
declare const supportedCredentialFormatsWithTypes: readonly ["jwt_vc_json", "jwt_vc_json-ld", "ldp_vc"]; declare const supportedCredentialFormats: readonly ["jwt_vc_json", "jwt_vc_json-ld", "ldp_vc", "mso_mdoc"]; declare const supportedPresentationFormats: readonly ["jwt_vp_json", "jwt_vp_json-ld", "ldp_vp"]; type SupportedCredentialFormats = (typeof supportedCredentialFormats)[number]; type SupportedPresentationFormats = (typeof supportedPresentationFormats)[number]; type CredentialRequest = { format: SupportedCredentialFormats; proof?: Proof; } & ({ format: 'jwt_vc_json' | 'jwt_vc_json-ld' | 'ldp_vc'; types: string[]; } | { format: 'mso_mdoc'; doctype: string; }); interface JWTProof { proof_type: 'jwt'; jwt: string; } type Proof = JWTProof; interface CredentialResponse { format: SupportedCredentialFormats; credential?: string; acceptance_token?: string; c_nonce?: string; c_nonce_expires_in?: number; } export { type CredentialRequest, type CredentialResponse, type JWTProof, type Proof, type SupportedCredentialFormats, type SupportedPresentationFormats, supportedCredentialFormats, supportedCredentialFormatsWithTypes, supportedPresentationFormats };