UNPKG

@credo-ts/core

Version:

<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1

61 lines • 2.56 kB
import { JsonObject, SingleOrArray } from "../../../types.mjs"; import { ClaimFormat } from "../models/ClaimFormat.mjs"; import { W3cV2DataIntegrityVerifiableCredential } from "./W3cV2DataIntegrityVerifiableCredential.mjs"; //#region src/modules/vc/data-integrity/W3cV2DataIntegrityVerifiablePresentation.d.ts export type W3cV2DataIntegritySecuredPresentation = Record<string, unknown> & { proof: unknown; }; type W3cV2DataIntegrityPresentationCredentialObjectEntry = { id?: string; type?: SingleOrArray<string>; proof?: unknown; verifiableCredential?: SingleOrArray<W3cV2DataIntegrityPresentationCredentialEntry>; }; export type W3cV2DataIntegrityPresentationCredentialEntry = W3cV2DataIntegrityVerifiableCredential | W3cV2DataIntegrityVerifiablePresentation | W3cV2DataIntegrityPresentationCredentialObjectEntry | string; export type W3cV2DataIntegrityResolvedPresentation = { context?: Array<string | JsonObject>; type?: SingleOrArray<string>; holder?: string | { id: string; [property: string]: unknown; }; holderId?: string; verifiableCredential?: SingleOrArray<W3cV2DataIntegrityPresentationCredentialEntry>; }; export interface W3cV2DataIntegrityVerifiablePresentationOptions { securedPresentation: W3cV2DataIntegritySecuredPresentation; resolvedPresentation: W3cV2DataIntegrityResolvedPresentation; } /** * Represents a Verifiable Presentation secured with Data Integrity proof(s). * * @see https://www.w3.org/TR/vc-data-integrity/ */ export declare class W3cV2DataIntegrityVerifiablePresentation { constructor(options: W3cV2DataIntegrityVerifiablePresentationOptions); static fromObject(presentation: W3cV2DataIntegritySecuredPresentation, resolvedPresentation: W3cV2DataIntegrityResolvedPresentation): W3cV2DataIntegrityVerifiablePresentation; /** * The original presentation object with embedded Data Integrity proof(s). */ readonly securedPresentation: W3cV2DataIntegritySecuredPresentation; /** * Resolved presentation is the parsed VP object used for traversal and validation. */ readonly resolvedPresentation: W3cV2DataIntegrityResolvedPresentation; /** * The JSON representation of this presentation. */ get encoded(): string; /** * The {@link ClaimFormat} of the presentation. * * For W3C VP Data Integrity presentations this is always `di_vp`. */ get claimFormat(): ClaimFormat.DiVp; /** * Validates the presentation and proof structure. */ validate(): void; } //#endregion //# sourceMappingURL=W3cV2DataIntegrityVerifiablePresentation.d.mts.map