import { SDJWTConfig, Verifier, kbPayload, kbHeader, DisclosureFrame } from '@sd-jwt/types'; import { z } from 'zod'; import { SdJwtPayload, SDJwtInstance, VerifierOptions } from '@sd-jwt/core'; declare const BackgroundImageSchema: z.ZodObject<{ /** REQUIRED. A URI pointing to the background image. */ uri: z.ZodString; /** OPTIONAL. An "integrity metadata" string as described in Section 7. */ 'uri#integrity': z.ZodOptional; }, z.core.$loose>; type BackgroundImage = z.infer; /** * Logo metadata used in rendering a credential. */ declare const LogoSchema: z.ZodObject<{ /** REQUIRED. A URI pointing to the logo image. */ uri: z.ZodString; /** OPTIONAL. An "integrity metadata" string as described in Section 7. */ 'uri#integrity': z.ZodOptional; /** OPTIONAL. A string containing alternative text for the logo image. */ alt_text: z.ZodOptional; }, z.core.$loose>; type Logo = z.infer; /** * The simple rendering method is intended for applications that do not support SVG. */ declare const SimpleRenderingSchema: z.ZodObject<{ /** OPTIONAL. Logo metadata to display for the credential. */ logo: z.ZodOptional; /** OPTIONAL. A string containing alternative text for the logo image. */ alt_text: z.ZodOptional; }, z.core.$loose>>; /** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */ background_color: z.ZodOptional; /** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */ text_color: z.ZodOptional; /** OPTIONAL. An object containing information about the background image to be displayed for the type. */ background_image: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; type SimpleRendering = z.infer; /** Enum of valid values for rendering orientation. */ declare const OrientationSchema: z.ZodEnum<{ portrait: "portrait"; landscape: "landscape"; }>; /** Enum of valid values for rendering color schemes. */ declare const ColorSchemeSchema: z.ZodEnum<{ light: "light"; dark: "dark"; }>; /** Enum of valid values for rendering contrast. */ declare const ContrastSchema: z.ZodEnum<{ normal: "normal"; high: "high"; }>; /** * Properties that describe the display preferences for an SVG template rendering. */ declare const SvgTemplatePropertiesSchema: z.ZodObject<{ /** OPTIONAL. Orientation optimized for the template. */ orientation: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>; type SvgTemplateProperties = z.infer; /** * SVG rendering metadata containing URI and optional integrity and properties. */ declare const SvgTemplateRenderingSchema: z.ZodObject<{ /** REQUIRED. A URI pointing to the SVG template. */ uri: z.ZodString; /** OPTIONAL. An "integrity metadata" string as described in Section 7. */ 'uri#integrity': z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>; type SvgTemplateRendering = z.infer; /** * Rendering metadata, either simple or SVG-based, for a credential. */ declare const RenderingSchema: z.ZodPipe; /** OPTIONAL. A string containing alternative text for the logo image. */ alt_text: z.ZodOptional; }, z.core.$loose>>; /** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */ background_color: z.ZodOptional; /** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */ text_color: z.ZodOptional; /** OPTIONAL. An object containing information about the background image to be displayed for the type. */ background_image: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; /** OPTIONAL. Array of SVG template rendering objects. */ svg_templates: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; /** * OPTIONAL. Array of SVG template rendering objects. * @deprecated use `svg_templates` (plural) instead. */ svg_template: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; }, z.core.$loose>, z.ZodTransform<{ svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; svg_templates?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; svg_template?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; }>>; type Rendering = z.infer; /** * Display metadata associated with a credential type. */ declare const DisplaySchema: z.ZodPipe; /** * REQUIRED (preferred). Language tag according to RFC 5646. * Alias for `lang` - either `lang` or `locale` must be provided. */ locale: z.ZodOptional; /** REQUIRED. Human-readable name for the credential type. */ name: z.ZodString; /** OPTIONAL. Description of the credential type for end users. */ description: z.ZodOptional; /** OPTIONAL. Rendering information (simple or SVG) for the credential. */ rendering: z.ZodOptional; /** OPTIONAL. A string containing alternative text for the logo image. */ alt_text: z.ZodOptional; }, z.core.$loose>>; /** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */ background_color: z.ZodOptional; /** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */ text_color: z.ZodOptional; /** OPTIONAL. An object containing information about the background image to be displayed for the type. */ background_image: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; /** OPTIONAL. Array of SVG template rendering objects. */ svg_templates: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; /** * OPTIONAL. Array of SVG template rendering objects. * @deprecated use `svg_templates` (plural) instead. */ svg_template: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; }, z.core.$loose>, z.ZodTransform<{ svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; svg_templates?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; svg_template?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; }>>>; }, z.core.$loose>, z.ZodTransform<{ locale: string | undefined; name: string; description?: string | undefined; rendering?: { svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; name: string; lang?: string | undefined; locale?: string | undefined; description?: string | undefined; rendering?: { svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; } | undefined; }>>; type Display = z.infer; /** * Claim path within the credential's JSON structure. * Example: ["address", "street_address"] */ declare const ClaimPathSchema: z.ZodArray>; type ClaimPath = z.infer; /** * Display metadata for a specific claim. */ declare const ClaimDisplaySchema: z.ZodPipe; /** * REQUIRED (preferred). Language tag according to RFC 5646. * Alias for `lang` - either `lang` or `locale` must be provided. */ locale: z.ZodOptional; /** REQUIRED. Human-readable label for the claim. */ label: z.ZodString; /** OPTIONAL. Description of the claim for end users. */ description: z.ZodOptional; }, z.core.$loose>, z.ZodTransform<{ locale: string | undefined; label: string; description?: string | undefined; }, { [x: string]: unknown; label: string; lang?: string | undefined; locale?: string | undefined; description?: string | undefined; }>>; type ClaimDisplay = z.infer; /** * Indicates whether a claim is selectively disclosable. */ declare const ClaimSelectiveDisclosureSchema: z.ZodEnum<{ never: "never"; always: "always"; allowed: "allowed"; }>; type ClaimSelectiveDisclosure = z.infer; /** * Metadata for individual claims in the credential type. */ declare const ClaimSchema: z.ZodObject<{ /** * REQUIRED. Array of one or more paths to the claim in the credential subject. * Each path is an array of strings (or null for array elements). */ path: z.ZodArray>; /** OPTIONAL. Display metadata in multiple languages. */ display: z.ZodOptional; /** * REQUIRED (preferred). Language tag according to RFC 5646. * Alias for `lang` - either `lang` or `locale` must be provided. */ locale: z.ZodOptional; /** REQUIRED. Human-readable label for the claim. */ label: z.ZodString; /** OPTIONAL. Description of the claim for end users. */ description: z.ZodOptional; }, z.core.$loose>, z.ZodTransform<{ locale: string | undefined; label: string; description?: string | undefined; }, { [x: string]: unknown; label: string; lang?: string | undefined; locale?: string | undefined; description?: string | undefined; }>>>>; /** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */ sd: z.ZodOptional>; /** * OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload * of the SD-JWT VC. Default is false if not specified. */ mandatory: z.ZodOptional; /** * OPTIONAL. Unique string identifier for referencing the claim in an SVG template. * Must consist of alphanumeric characters or underscores and must not start with a digit. */ svg_id: z.ZodOptional; }, z.core.$loose>; type Claim = z.infer; /** * Type metadata for a specific Verifiable Credential (VC) type. * Reference: https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-13.html#name-type-metadata-format */ declare const TypeMetadataFormatSchema: z.ZodObject<{ /** REQUIRED. A URI uniquely identifying the credential type. */ vct: z.ZodString; /** OPTIONAL. Human-readable name for developers. */ name: z.ZodOptional; /** OPTIONAL. Human-readable description for developers. */ description: z.ZodOptional; /** OPTIONAL. URI of another type that this one extends. */ extends: z.ZodOptional; /** OPTIONAL. Integrity metadata for the 'extends' field. */ 'extends#integrity': z.ZodOptional; /** OPTIONAL. Array of localized display metadata for the type. */ display: z.ZodOptional; /** * REQUIRED (preferred). Language tag according to RFC 5646. * Alias for `lang` - either `lang` or `locale` must be provided. */ locale: z.ZodOptional; /** REQUIRED. Human-readable name for the credential type. */ name: z.ZodString; /** OPTIONAL. Description of the credential type for end users. */ description: z.ZodOptional; /** OPTIONAL. Rendering information (simple or SVG) for the credential. */ rendering: z.ZodOptional; /** OPTIONAL. A string containing alternative text for the logo image. */ alt_text: z.ZodOptional; }, z.core.$loose>>; /** OPTIONAL. RGB color value for the credential background (e.g., "#FFFFFF"). */ background_color: z.ZodOptional; /** OPTIONAL. RGB color value for the credential text (e.g., "#000000"). */ text_color: z.ZodOptional; /** OPTIONAL. An object containing information about the background image to be displayed for the type. */ background_image: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>>; /** OPTIONAL. Array of SVG template rendering objects. */ svg_templates: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; /** * OPTIONAL. Array of SVG template rendering objects. * @deprecated use `svg_templates` (plural) instead. */ svg_template: z.ZodOptional; /** REQUIRED if more than one SVG template is present. */ properties: z.ZodOptional>; /** OPTIONAL. Color scheme optimized for the template. */ color_scheme: z.ZodOptional>; /** OPTIONAL. Contrast level optimized for the template. */ contrast: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>>>; }, z.core.$loose>, z.ZodTransform<{ svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; svg_templates?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; svg_template?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; }>>>; }, z.core.$loose>, z.ZodTransform<{ locale: string | undefined; name: string; description?: string | undefined; rendering?: { svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; } | undefined; }, { [x: string]: unknown; name: string; lang?: string | undefined; locale?: string | undefined; description?: string | undefined; rendering?: { svg_templates: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; properties?: { [x: string]: unknown; orientation?: "portrait" | "landscape" | undefined; color_scheme?: "light" | "dark" | undefined; contrast?: "normal" | "high" | undefined; } | undefined; }[] | undefined; simple?: { [x: string]: unknown; logo?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; alt_text?: string | undefined; } | undefined; background_color?: string | undefined; text_color?: string | undefined; background_image?: { [x: string]: unknown; uri: string; 'uri#integrity'?: string | undefined; } | undefined; } | undefined; } | undefined; }>>>>; /** OPTIONAL. Array of claim metadata. */ claims: z.ZodOptional>; /** OPTIONAL. Display metadata in multiple languages. */ display: z.ZodOptional; /** * REQUIRED (preferred). Language tag according to RFC 5646. * Alias for `lang` - either `lang` or `locale` must be provided. */ locale: z.ZodOptional; /** REQUIRED. Human-readable label for the claim. */ label: z.ZodString; /** OPTIONAL. Description of the claim for end users. */ description: z.ZodOptional; }, z.core.$loose>, z.ZodTransform<{ locale: string | undefined; label: string; description?: string | undefined; }, { [x: string]: unknown; label: string; lang?: string | undefined; locale?: string | undefined; description?: string | undefined; }>>>>; /** OPTIONAL. Controls whether the claim must, may, or must not be selectively disclosed. */ sd: z.ZodOptional>; /** * OPTIONAL. A boolean indicating whether the claim must be present in the Unsecured Payload * of the SD-JWT VC. Default is false if not specified. */ mandatory: z.ZodOptional; /** * OPTIONAL. Unique string identifier for referencing the claim in an SVG template. * Must consist of alphanumeric characters or underscores and must not start with a digit. */ svg_id: z.ZodOptional; }, z.core.$loose>>>; }, z.core.$loose>; /** * The resolved type metadata. If you just want to use the type metadata, you should use `typeMetadata`. * In case additional processing is needed (e.g. for extensions in type metadata), you can use the `typeMetadataChain` */ type ResolvedTypeMetadata = { /** * The merged type metadata based on the resolved `vct` document and all `extends` values. */ mergedTypeMetadata: TypeMetadataFormat; /** * The original type metadata documents, ordered from the extending type to the last extended type. */ typeMetadataChain: [TypeMetadataFormat, ...TypeMetadataFormat[]]; /** * The vct values present in the type metadata chain. This can be used for matching against e.g. * DCQL queries which can query an underlying type. */ vctValues: [string, ...string[]]; }; type TypeMetadataFormat = z.infer; type VcTFetcher = (uri: string, integrity?: string) => Promise; type StatusListFetcher = (uri: string) => Promise; type StatusValidator = (status: number) => Promise; /** * Configuration for SD-JWT-VC */ type SDJWTVCConfig = SDJWTConfig & { statusListFetcher?: StatusListFetcher; statusValidator?: StatusValidator; vctFetcher?: VcTFetcher; statusVerifier?: Verifier; loadTypeMetadataFormat?: boolean; timeout?: number; maxVctExtendsDepth?: number; }; interface SDJWTVCStatusReference { status_list: { idx: number; uri: string; }; } interface SdJwtVcPayload extends SdJwtPayload { iss?: string; nbf?: number; exp?: number; cnf?: unknown; vct: string; 'vct#integrity'?: string; status?: SDJWTVCStatusReference; sub?: string; iat?: number; } type VerificationResult = { payload: SdJwtVcPayload; header: Record | undefined; kb: { payload: kbPayload; header: kbHeader; } | undefined; typeMetadata?: ResolvedTypeMetadata; }; declare class SDJwtVcInstance extends SDJwtInstance { /** * The type of the SD-JWT-VC set in the header.typ field. */ protected type: string; protected userConfig: SDJWTVCConfig; constructor(userConfig?: SDJWTVCConfig); /** * Validates if the disclosureFrame contains any reserved fields. If so it will throw an error. * @param disclosureFrame */ protected validateReservedFields(disclosureFrame: DisclosureFrame): void; /** * Fetches the status list from the uri with a timeout of 10 seconds. * @param uri The URI to fetch from. * @returns A promise that resolves to a compact JWT. */ private statusListFetcher; /** * Validates the status, throws an error if the status is not 0. * @param status * @returns */ private statusValidator; /** * Verifies the SD-JWT-VC. It will validate the signature, the keybindings when required, the status, and the VCT. * @param currentDate current time in seconds */ verify(encodedSDJwt: string, options?: VerifierOptions): Promise; /** * Gets VCT Metadata of the raw SD-JWT-VC. Returns the type metadata format. If the SD-JWT-VC is invalid or does not contain a vct claim, an error is thrown. * * It may return `undefined` if the fetcher returned an undefined value (instead of throwing an error). * * @param encodedSDJwt * @returns */ getVct(encodedSDJwt: string): Promise; /** * Validates the integrity of the response if the integrity is passed. If the integrity does not match, an error is thrown. * @param integrity * @param response */ private validateIntegrity; /** * Fetches the content from the url with a timeout of 10 seconds. * @param url * @returns */ private fetchWithIntegrity; /** * Verifies the VCT of the SD-JWT-VC. Returns the type metadata format. * Resolves the full extends chain according to spec sections 6.4, 8.2, and 9.5. * @param result * @returns */ private fetchVct; /** * Checks if two claim paths are equal by comparing each element. * @param path1 First claim path * @param path2 Second claim path * @returns True if paths are equal, false otherwise */ private claimPathsEqual; /** * Validates that extending claim metadata respects the constraints from spec section 9.5.1. * @param baseClaim The base claim metadata * @param extendingClaim The extending claim metadata * @throws SDJWTException if validation fails */ private validateClaimExtension; /** * Merges two type metadata formats, with the extending metadata overriding the base metadata. * According to spec section 9.5: * - All claim metadata from the extended type are inherited * - The child type can add new claims or properties * - If the child type defines claim metadata with the same path as the extended type, * the child type's object will override the corresponding object from the extended type * According to spec section 9.5.1: * - sd property can only be changed from 'allowed' (or omitted) to 'always' or 'never' * - sd property cannot be changed from 'always' or 'never' to a different value * According to spec section 8.2: * - If the extending type defines its own display property, the original display metadata is ignored * Note: The spec also mentions 'mandatory' property constraints, but this is not currently * defined in the Claim type and will be validated when that property is added to the type. * @param base The base type metadata format * @param extending The extending type metadata format * @returns The merged type metadata format */ private mergeTypeMetadata; /** * Resolves the full VCT chain by recursively fetching extended type metadata. * Implements security considerations from spec section 10.3 for circular dependencies. * @param vct The VCT URI to resolve * @param integrity Optional integrity metadata for the VCT * @param depth Current depth in the chain * @param visitedVcts Set of already visited VCT URIs to detect circular dependencies * @returns The fully resolved and merged type metadata format */ private resolveVctExtendsChain; /** * Fetches and verifies the VCT Metadata for a VCT value. * @param result * @returns */ private fetchSingleVct; /** * Verifies the status of the SD-JWT-VC. * @param result * @param options */ private verifyStatus; } export { type BackgroundImage, BackgroundImageSchema, type Claim, type ClaimDisplay, ClaimDisplaySchema, type ClaimPath, ClaimPathSchema, ClaimSchema, type ClaimSelectiveDisclosure, ClaimSelectiveDisclosureSchema, ColorSchemeSchema, ContrastSchema, type Display, DisplaySchema, type Logo, LogoSchema, OrientationSchema, type Rendering, RenderingSchema, type ResolvedTypeMetadata, type SDJWTVCConfig, type SDJWTVCStatusReference, SDJwtVcInstance, type SdJwtVcPayload, type SimpleRendering, SimpleRenderingSchema, type StatusListFetcher, type StatusValidator, type SvgTemplateProperties, SvgTemplatePropertiesSchema, type SvgTemplateRendering, SvgTemplateRenderingSchema, type TypeMetadataFormat, TypeMetadataFormatSchema, type VcTFetcher, type VerificationResult };