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

49 lines (48 loc) • 2.21 kB
import { JsonObject, SingleOrArray } from "../../../types.mjs"; import { ClaimFormat } from "../models/ClaimFormat.mjs"; import { W3cJsonLdVerifiableCredential } from "../data-integrity/models/W3cJsonLdVerifiableCredential.mjs"; import { Jwt } from "../../../crypto/jose/jwt/Jwt.mjs"; import { W3cJwtVerifiableCredential } from "./W3cJwtVerifiableCredential.mjs"; import { W3cHolder } from "../models/presentation/W3cHolder.mjs"; import { W3cPresentation } from "../models/presentation/W3cPresentation.mjs"; import "../models/index.mjs"; import "../index.mjs"; import "../../../index.mjs"; //#region src/modules/vc/jwt-vc/W3cJwtVerifiablePresentation.d.ts interface W3cJwtVerifiablePresentationOptions { jwt: Jwt; } declare class W3cJwtVerifiablePresentation { readonly jwt: Jwt; private _presentation; constructor(options: W3cJwtVerifiablePresentationOptions); static fromSerializedJwt(serializedJwt: string): W3cJwtVerifiablePresentation; /** * Get the W3cPresentation from the JWT payload. This does not include the JWT wrapper, * and thus is not suitable for sharing. If you need a JWT, use the `serializedJwt` property. * * All properties and getters from the `W3cPresentation` interface are implemented as getters * on the `W3cJwtVerifiablePresentation` class itself, so you can also use this directly * instead of accessing the inner `presentation` property. */ get presentation(): W3cPresentation; get serializedJwt(): string; get context(): (string | JsonObject)[]; get id(): string | undefined; get type(): string[]; get holder(): string | W3cHolder | undefined; get verifiableCredential(): SingleOrArray<W3cJwtVerifiableCredential | W3cJsonLdVerifiableCredential>; get holderId(): string | null; /** * The {@link ClaimFormat} of the presentation. For JWT presentations this is always `jwt_vp`. */ get claimFormat(): ClaimFormat.JwtVp; /** * Get the encoded variant of the W3C Verifiable Presentation. For JWT presentations this is * a JWT string. */ get encoded(): string; } //#endregion export { W3cJwtVerifiablePresentation, W3cJwtVerifiablePresentationOptions }; //# sourceMappingURL=W3cJwtVerifiablePresentation.d.mts.map