diff --git a/package.json b/package.json index 96b34636..932e9e3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sphereon/did-auth-siop", - "version": "0.6.0-unstable.0", + "version": "0.6.0-unstable.2", "source": "src/index.ts", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -28,25 +28,24 @@ "node": ">=18" }, "dependencies": { + "@astronautlabs/jsonpath": "^1.1.2", "@sphereon/did-uni-client": "^0.6.1", - "qs": "^6.11.2", - "@sphereon/pex": "^3.0.0", + "@sphereon/pex": "^3.0.1", "@sphereon/pex-models": "^2.1.5", - "@sphereon/ssi-types": "^0.18.0", + "@sphereon/ssi-types": "0.18.1", "@sphereon/wellknown-dids-client": "^0.1.3", - "@astronautlabs/jsonpath": "^1.1.2", - "sha.js": "^2.4.11", "cross-fetch": "^4.0.0", "did-jwt": "6.11.6", "did-resolver": "^4.1.0", "events": "^3.3.0", "language-tags": "^1.0.9", "multiformats": "^11.0.2", + "qs": "^6.11.2", + "sha.js": "^2.4.11", "uint8arrays": "^3.1.1", "uuid": "^9.0.0" }, "devDependencies": { - "@types/qs": "^6.9.11", "@digitalcredentials/did-method-key": "^2.0.3", "@digitalcredentials/ed25519-signature-2020": "^3.0.2", "@digitalcredentials/jsonld-signatures": "^9.3.2", @@ -57,6 +56,8 @@ "did-resolver": "^4.1.0", "@types/jest": "^29.5.11", "@types/language-tags": "^1.0.4", + "@types/qs": "^6.9.11", + "@types/sha.js": "^2.4.4", "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^5.52.0", "@typescript-eslint/parser": "^5.52.0", @@ -87,10 +88,7 @@ }, "resolutions": { "isomorphic-webcrypto": "npm:@sphereon/isomorphic-webcrypto@^2.4.0-unstable.4", - "esline/**/strip-ansi": "6.0.1", - "@sd-jwt/utils": "0.1.2-alpha.2", - "@sd-jwt/decode": "0.1.2-alpha.1", - "@sd-jwt/types": "0.1.2-alpha.3" + "esline/**/strip-ansi": "6.0.1" }, "files": [ "dist" diff --git a/src/authorization-response/AuthorizationResponse.ts b/src/authorization-response/AuthorizationResponse.ts index 46792334..1009c70b 100644 --- a/src/authorization-response/AuthorizationResponse.ts +++ b/src/authorization-response/AuthorizationResponse.ts @@ -1,3 +1,5 @@ +import { Hasher } from '@sphereon/ssi-types'; + import { AuthorizationRequest, VerifyAuthorizationRequestOpts } from '../authorization-request'; import { assertValidVerifyAuthorizationRequestOpts } from '../authorization-request/Opts'; import { IDToken } from '../id-token'; @@ -16,14 +18,14 @@ export class AuthorizationResponse { private readonly _options?: AuthorizationResponseOpts; - constructor({ + private constructor({ authorizationResponsePayload, idToken, responseOpts, authorizationRequest, }: { authorizationResponsePayload: AuthorizationResponsePayload; - idToken: IDToken; + idToken?: IDToken; responseOpts?: AuthorizationResponseOpts; authorizationRequest?: AuthorizationRequest; }) { @@ -64,7 +66,7 @@ export class AuthorizationResponse { if (responseOpts) { assertValidResponseOpts(responseOpts); } - const idToken = await IDToken.fromIDToken(authorizationResponsePayload.id_token); + const idToken = authorizationResponsePayload.id_token ? await IDToken.fromIDToken(authorizationResponsePayload.id_token) : undefined; return new AuthorizationResponse({ authorizationResponsePayload, idToken, responseOpts }); } @@ -99,10 +101,10 @@ export class AuthorizationResponse { JSON.stringify(verifiedAuthorizationRequest.presentationDefinitions) ) as PresentationDefinitionWithLocation[]; const wantsIdToken = await authorizationRequest.containsResponseType(ResponseType.ID_TOKEN); - // const hasVpToken = await authorizationRequest.containsResponseType(ResponseType.VP_TOKEN); + const hasVpToken = await authorizationRequest.containsResponseType(ResponseType.VP_TOKEN); const idToken = wantsIdToken ? await IDToken.fromVerifiedAuthorizationRequest(verifiedAuthorizationRequest, responseOpts) : undefined; - const idTokenPayload = wantsIdToken ? await idToken.payload() : undefined; + const idTokenPayload = idToken ? await idToken.payload() : undefined; const authorizationResponsePayload = await createResponsePayload(authorizationRequest, responseOpts, idTokenPayload); const response = new AuthorizationResponse({ authorizationResponsePayload, @@ -111,21 +113,30 @@ export class AuthorizationResponse { authorizationRequest, }); - const wrappedPresentations = await extractPresentationsFromAuthorizationResponse(response, { hasher: verifyOpts.hasher }); + /*let nonce = idTokenPayload?.nonce + const state = response._payload.state + */ - await assertValidVerifiablePresentations({ - presentationDefinitions, - presentations: wrappedPresentations, - verificationCallback: verifyOpts.verification.presentationVerificationCallback, - opts: { ...responseOpts.presentationExchange, hasher: verifyOpts.hasher }, - }); + if (hasVpToken) { + const wrappedPresentations = await extractPresentationsFromAuthorizationResponse(response, { hasher: verifyOpts.hasher }); + + await assertValidVerifiablePresentations({ + presentationDefinitions, + presentations: wrappedPresentations, + verificationCallback: verifyOpts.verification.presentationVerificationCallback, + opts: { ...responseOpts.presentationExchange, hasher: verifyOpts.hasher }, + }); + /*if (!nonce) { + nonce = wrappedPresentations[0].decoded.nonce + }*/ + } return response; } public async verify(verifyOpts: VerifyAuthorizationResponseOpts): Promise { // Merge payloads checks for inconsistencies in properties which are present in both the auth request and request object - const merged = await this.mergedPayloads(true); + const merged = await this.mergedPayloads({ consistencyCheck: true, hasher: verifyOpts.hasher }); if (verifyOpts.state && merged.state !== verifyOpts.state) { throw Error(SIOPErrors.BAD_STATE); } @@ -133,12 +144,23 @@ export class AuthorizationResponse { const verifiedIdToken = await this.idToken?.verify(verifyOpts); const oid4vp = await verifyPresentations(this, verifyOpts); + const nonce = merged.nonce ?? verifiedIdToken.payload.nonce ?? oid4vp.nonce; + const state = merged.state ?? verifiedIdToken.payload.state; + + if (!state) { + throw Error(`State is required`); + } else if (oid4vp.presentationDefinitions.length > 0 && !nonce) { + throw Error('Nonce is required when using OID4VP'); + } + return { authorizationResponse: this, verifyOpts, + nonce, + state, correlationId: verifyOpts.correlationId, - ...(this.idToken ? { idToken: verifiedIdToken } : {}), - ...(oid4vp ? { oid4vpSubmission: oid4vp } : {}), + ...(this.idToken && { idToken: verifiedIdToken }), + ...(oid4vp && { oid4vpSubmission: oid4vp }), }; } @@ -154,24 +176,36 @@ export class AuthorizationResponse { return this._options; } - get idToken(): IDToken { + get idToken(): IDToken | undefined { return this._idToken; } - public async getMergedProperty(key: string, consistencyCheck?: boolean): Promise { - const merged = await this.mergedPayloads(consistencyCheck); + public async getMergedProperty(key: string, opts?: { consistencyCheck?: boolean; hasher?: Hasher }): Promise { + const merged = await this.mergedPayloads(opts); return merged[key] as T; } - public async mergedPayloads(consistencyCheck?: boolean): Promise { + public async mergedPayloads(opts?: { consistencyCheck?: boolean; hasher?: Hasher }): Promise { + let nonce: string | undefined = this._payload.nonce; + if (this._payload?.vp_token) { + const presentations = await extractPresentationsFromAuthorizationResponse(this, opts); + // We do not verify them, as that is done elsewhere. So we simply can take the first nonce + if (!nonce) { + nonce = presentations[0].decoded.nonce; + } + } const idTokenPayload = await this.idToken?.payload(); - if (consistencyCheck !== false && idTokenPayload) { + if (opts?.consistencyCheck !== false && idTokenPayload) { Object.entries(idTokenPayload).forEach((entry) => { if (typeof entry[0] === 'string' && this.payload[entry[0]] && this.payload[entry[0]] !== entry[1]) { throw Error(`Mismatch in Authorization Request and Request object value for ${entry[0]}`); } }); } - return { ...this.payload, ...idTokenPayload }; + if (!nonce && this._idToken) { + nonce = (await this._idToken.payload()).nonce; + } + + return { ...this.payload, ...idTokenPayload, nonce }; } } diff --git a/src/authorization-response/OpenID4VP.ts b/src/authorization-response/OpenID4VP.ts index 8c525fac..32f77075 100644 --- a/src/authorization-response/OpenID4VP.ts +++ b/src/authorization-response/OpenID4VP.ts @@ -39,9 +39,8 @@ export const verifyPresentations = async ( idPayload = await authorizationResponse.idToken.payload(); } // todo: Probably wise to check against request for the location of the submission_data - const presentationSubmission = authorizationResponse.payload.presentation_submission - ? authorizationResponse.payload.presentation_submission - : idPayload?._vp_token?.presentation_submission; + const presentationSubmission = idPayload?._vp_token?.presentation_submission ?? authorizationResponse.payload.presentation_submission; + await assertValidVerifiablePresentations({ presentationDefinitions, presentations, @@ -54,6 +53,13 @@ export const verifyPresentations = async ( }, }); + const nonces: Set = new Set(presentations.map((presentation) => presentation.decoded.nonce)); + if (presentations.length > 0 && nonces.size !== 1) { + throw Error(`${nonces.size} nonce values found for ${presentations.length}. Should be 1`); + } + + const nonce = nonces[0]; + const revocationVerification = verifyOpts.verification?.revocationOpts ? verifyOpts.verification.revocationOpts.revocationVerification : RevocationVerification.IF_PRESENT; @@ -65,7 +71,7 @@ export const verifyPresentations = async ( await verifyRevocation(vp, verifyOpts.verification.revocationOpts.revocationVerificationCallback, revocationVerification); } } - return { presentations, presentationDefinitions, submissionData: presentationSubmission }; + return { nonce, presentations, presentationDefinitions, submissionData: presentationSubmission }; }; export const extractPresentationsFromAuthorizationResponse = async ( diff --git a/src/id-token/Payload.ts b/src/id-token/Payload.ts index 48ad849f..70b03815 100644 --- a/src/id-token/Payload.ts +++ b/src/id-token/Payload.ts @@ -34,7 +34,7 @@ export const createIDTokenPayload = async ( const rpSupportedVersions = authorizationRequestVersionDiscovery(payload); const maxRPVersion = rpSupportedVersions.reduce( (previous, current) => (current.valueOf() > previous.valueOf() ? current : previous), - SupportedVersion.SIOPv2_ID1 + SupportedVersion.SIOPv2_D12_OID4VP_D18 ); if (responseOpts.version && rpSupportedVersions.length > 0 && !rpSupportedVersions.includes(responseOpts.version)) { throw Error(`RP does not support spec version ${responseOpts.version}, supported versions: ${rpSupportedVersions.toString()}`); diff --git a/src/op/OP.ts b/src/op/OP.ts index 5d9f6925..2f8e8677 100644 --- a/src/op/OP.ts +++ b/src/op/OP.ts @@ -125,7 +125,7 @@ export class OP { SupportedVersion.SIOPv2_ID1 ); } - const correlationId = responseOpts?.correlationId || verifiedAuthorizationRequest.correlationId || uuidv4(); + const correlationId = responseOpts?.correlationId ?? verifiedAuthorizationRequest.correlationId ?? uuidv4(); try { // IF using DIRECT_POST, the response_uri takes precedence over the redirect_uri let responseUri = verifiedAuthorizationRequest.responseURI; diff --git a/src/rp/RP.ts b/src/rp/RP.ts index 2c48eb3d..1e58ce68 100644 --- a/src/rp/RP.ts +++ b/src/rp/RP.ts @@ -1,5 +1,6 @@ import { EventEmitter } from 'events'; +import { Hasher } from '@sphereon/ssi-types'; import { v4 as uuidv4 } from 'uuid'; import { @@ -136,6 +137,7 @@ export class RP { authorizationResponsePayload: AuthorizationResponsePayload, opts?: { correlationId?: string; + hasher?: Hasher; audience?: string; state?: string; nonce?: string; @@ -296,6 +298,7 @@ export class RP { authorizationResponse: AuthorizationResponse, opts: { correlationId: string; + hasher?: Hasher; state?: string; nonce?: string; verification?: InternalVerification | ExternalVerification; @@ -308,9 +311,17 @@ export class RP { let state = opts?.state ?? this._verifyResponseOptions.state; let nonce = opts?.nonce ?? this._verifyResponseOptions.nonce; if (this.sessionManager) { - const resNonce = (await authorizationResponse.getMergedProperty('nonce', false)) as string; - const resState = (await authorizationResponse.getMergedProperty('state', false)) as string; - correlationId = await this.sessionManager.getCorrelationIdByNonce(resNonce, false); + const resNonce = (await authorizationResponse.getMergedProperty('nonce', { + consistencyCheck: false, + hasher: opts.hasher ?? this._verifyResponseOptions.hasher, + })) as string; + const resState = (await authorizationResponse.getMergedProperty('state', { + consistencyCheck: false, + hasher: opts.hasher ?? this._verifyResponseOptions.hasher, + })) as string; + if (resNonce && !correlationId) { + correlationId = await this.sessionManager.getCorrelationIdByNonce(resNonce, false); + } if (!correlationId) { correlationId = await this.sessionManager.getCorrelationIdByState(resState, false); } diff --git a/src/schemas/validation/index.ts b/src/schemas/validation/index.ts index a7d57c60..3970f4e3 100644 --- a/src/schemas/validation/index.ts +++ b/src/schemas/validation/index.ts @@ -1,2 +1,15 @@ -import { AuthorizationRequestPayloadVD11Schema, AuthorizationRequestPayloadVID1Schema, AuthorizationResponseOptsSchema, /*CreateAuthorizationRequestOptsSchema, */RPRegistrationMetadataPayloadSchema } from './schemaValidation.js'; -export { AuthorizationRequestPayloadVID1Schema, AuthorizationRequestPayloadVD11Schema, RPRegistrationMetadataPayloadSchema, /*CreateAuthorizationRequestOptsSchema, */AuthorizationResponseOptsSchema } +import { + AuthorizationRequestPayloadVD11Schema, + AuthorizationRequestPayloadVID1Schema, + AuthorizationResponseOptsSchema, + RPRegistrationMetadataPayloadSchema + /*CreateAuthorizationRequestOptsSchema, */ +} from './schemaValidation.js'; + +export { + AuthorizationRequestPayloadVID1Schema, + AuthorizationRequestPayloadVD11Schema, + RPRegistrationMetadataPayloadSchema, + AuthorizationResponseOptsSchema + /*CreateAuthorizationRequestOptsSchema, */ +}; diff --git a/src/types/SIOP.types.ts b/src/types/SIOP.types.ts index e6cce7f9..65e49339 100644 --- a/src/types/SIOP.types.ts +++ b/src/types/SIOP.types.ts @@ -571,6 +571,7 @@ export interface VerifiedOpenID4VPSubmission { submissionData: PresentationSubmission; presentationDefinitions: PresentationDefinitionWithLocation[]; presentations: WrappedVerifiablePresentation[]; + nonce: string; } export interface VerifiedAuthorizationResponse { @@ -580,6 +581,9 @@ export interface VerifiedAuthorizationResponse { oid4vpSubmission?: VerifiedOpenID4VPSubmission; + nonce?: string; + state: string; + idToken?: VerifiedIDToken; verifyOpts?: VerifyAuthorizationResponseOpts; } diff --git a/test/IT.spec.ts b/test/IT.spec.ts index b8a023e1..4e25e2c2 100644 --- a/test/IT.spec.ts +++ b/test/IT.spec.ts @@ -365,7 +365,7 @@ describe('RP and OP interaction should', () => { const rp = RP.builder({ requestVersion: SupportedVersion.SIOPv2_ID1 }) .withClientId(WELL_KNOWN_OPENID_FEDERATION) .withScope('test') - .withResponseType(ResponseType.ID_TOKEN) + .withResponseType([ResponseType.ID_TOKEN, ResponseType.VP_TOKEN]) .withRedirectUri(EXAMPLE_REDIRECT_URL) .withWellknownDIDVerifyCallback(verifyCallback) .withPresentationVerification(presentationVerificationCallback) @@ -377,7 +377,7 @@ describe('RP and OP interaction should', () => { client_id: rpMockEntity.did, idTokenSigningAlgValuesSupported: [SigningAlgo.EDDSA], requestObjectSigningAlgValuesSupported: [SigningAlgo.EDDSA, SigningAlgo.ES256], - responseTypesSupported: [ResponseType.ID_TOKEN], + responseTypesSupported: [ResponseType.ID_TOKEN, ResponseType.VP_TOKEN], vpFormatsSupported: { jwt_vc: { alg: [SigningAlgo.EDDSA] } }, scopesSupported: [Scope.OPENID_DIDAUTHN, Scope.OPENID], subjectTypesSupported: [SubjectType.PAIRWISE], diff --git a/yarn.lock b/yarn.lock index b3a7e7e2..b94475a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1275,41 +1275,33 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@sd-jwt/core@0.1.2-alpha.0": - version "0.1.2-alpha.0" - resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.1.2-alpha.0.tgz#a1b6ed2c7efc6d71d8fcd063b6624cf77c1eb21f" - integrity sha512-x4MVXar6WmPauZDRJ3aHwaY8o/bHzN77Ts7o43JKuuqIBFjPgAcSlRtd/Xk1rWhazFai4MCIwJDSQ1OQRJtNug== - dependencies: - buffer "*" - -"@sd-jwt/core@^0.1.2-alpha.2": - version "0.1.2-alpha.2" - resolved "https://registry.yarnpkg.com/@sd-jwt/core/-/core-0.1.2-alpha.2.tgz#572680c388f8c9d0922b849ac87b43c5c88e2672" - integrity sha512-MNBzv3TtBRwnlYoCrzS0tMcQIdesiN4H3XbCYbZr7Ku0lLbBJtWR2hp6xEyC3VQPlphC6XCUNOvNoRhDsVgVmg== +"@sd-jwt/decode@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.2.0.tgz#44211418fd0884a160f8223feedfe04ae52398c4" + integrity sha512-nmiZN3SQ4ApapEu+rS1h/YAkDIq3exgN7swSCsEkrxSEwnBSbXtISIY/sv+EmwnehF1rcKbivHfHNxOWYtlxvg== dependencies: - "@sd-jwt/decode" "workspace:*" - "@sd-jwt/types" "workspace:*" - "@sd-jwt/utils" "workspace:*" + "@sd-jwt/types" "0.2.0" + "@sd-jwt/utils" "0.2.0" -"@sd-jwt/decode@0.1.2-alpha.1", "@sd-jwt/decode@workspace:*": - version "0.1.2-alpha.1" - resolved "https://registry.yarnpkg.com/@sd-jwt/decode/-/decode-0.1.2-alpha.1.tgz#163c6bf4f0702c6d310ccc3f3f3c726863d8c30e" - integrity sha512-gm6iQeNVZFErk2yvhsK1Q48koGbJPGh6yFDEd9ACdprOkzHI/TAz9ytJbxmHk4wTmpy1MBxnKuljzaSGOcQXEw== +"@sd-jwt/present@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/present/-/present-0.2.0.tgz#01ecbd09dd21287be892b36d754a79c8629387f2" + integrity sha512-6xDBiB+UqCwW8k7O7OUJ7BgC/8zcO+AD5ZX1k4I6yjDM9vscgPulSVxT/yUH+Aov3cZ/BKvfKC0qDEZkHmP/kg== dependencies: - "@sd-jwt/types" "workspace:*" - "@sd-jwt/utils" "workspace:*" + "@sd-jwt/types" "0.2.0" + "@sd-jwt/utils" "0.2.0" -"@sd-jwt/types@0.1.2-alpha.3", "@sd-jwt/types@workspace:*": - version "0.1.2-alpha.3" - resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.1.2-alpha.3.tgz#5e42ceb18a6b6e3cb9cdc9607a2c3d27d7ab12df" - integrity sha512-xeP2Z+Ub8nsdbuT2JqQDYs93C1TTNm9efZI8+rAxlyeUuCl2sbJnWiUR39kU6jlYKYs1U7c31wMf8aP4yMMUdg== +"@sd-jwt/types@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/types/-/types-0.2.0.tgz#3cb50392e1b76ce69453f403c71c937a6e202352" + integrity sha512-16WFRcL/maG0/JxN9UCSx07/vJ2SDbGscv9gDLmFLgJzhJcGPer41XfI6aDfVARYP430wHFixChfY/n7qC1L/Q== -"@sd-jwt/utils@0.1.2-alpha.2", "@sd-jwt/utils@workspace:*": - version "0.1.2-alpha.2" - resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.1.2-alpha.2.tgz#df94cc675bb0a43df44f327ec5142260ccf49add" - integrity sha512-jl6Tk7agFdi9Ebeg3S3HdI7wl0uvelknSKM/X5DGx6a5EomJyx40dOc+KKeNf22me+8l8QJ7a0JyNkD/RP3KQQ== +"@sd-jwt/utils@0.2.0", "@sd-jwt/utils@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sd-jwt/utils/-/utils-0.2.0.tgz#ef52b744116e874f72ec01978f0631ad5a131eb7" + integrity sha512-oHCfRYVHCb5RNwdq3eHAt7P9d7TsEaSM1TTux+xl1I9PeQGLtZETnto9Gchtzn8FlTrMdVsLlcuAcK6Viwj1Qw== dependencies: - "@sd-jwt/types" "workspace:*" + "@sd-jwt/types" "0.2.0" buffer "*" "@sinclair/typebox@^0.27.8": @@ -1344,27 +1336,29 @@ resolved "https://registry.yarnpkg.com/@sphereon/pex-models/-/pex-models-2.1.5.tgz#ba4474a3783081392b72403c4c8ee6da3d2e5585" integrity sha512-7THexvdYUK/Dh8olBB46ErT9q/RnecnMdb5r2iwZ6be0Dt4vQLAUN7QU80H0HZBok4jRTb8ydt12x0raBSTHOg== -"@sphereon/pex@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-3.0.0.tgz#97ac049b279a50115f02c85185d1f348af9d6b91" - integrity sha512-viD3Enwt/Wf/RoTBbZXttNAcE0Scyb+UufwkNaLU4sD2nNkvi3VuJ4dSMMFGm3QlIgBWxSm1N4DnSm+LRMZidQ== +"@sphereon/pex@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sphereon/pex/-/pex-3.0.1.tgz#e7d9d36c7c921ab97190a735c67e0a2632432e3b" + integrity sha512-rj+GhFfV5JLyo7dTIA3htWlrT+f6tayF9JRAGxdsIYBfYictLi9BirQ++JRBXsiq7T5zMnfermz4RGi3cvt13Q== dependencies: "@astronautlabs/jsonpath" "^1.1.2" - "@sd-jwt/core" "^0.1.2-alpha.2" + "@sd-jwt/decode" "^0.2.0" + "@sd-jwt/present" "^0.2.0" + "@sd-jwt/utils" "^0.2.0" "@sphereon/pex-models" "^2.1.5" - "@sphereon/ssi-types" "0.18.0" + "@sphereon/ssi-types" "0.18.1" ajv "^8.12.0" ajv-formats "^2.1.1" jwt-decode "^3.1.2" nanoid "^3.3.7" string.prototype.matchall "^4.0.10" -"@sphereon/ssi-types@0.18.0", "@sphereon/ssi-types@^0.18.0": - version "0.18.0" - resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.18.0.tgz#b4f3a4a9e4e5b28719ce729b679d71d9d220cc26" - integrity sha512-D2n42NAhHCwpL4K7BqQXO9dYQ8n3st/1eJQrLqokJ18B9r2gury3km4cp+ZdiIxfefUaP9RBCeuWaiRUvjZ94w== +"@sphereon/ssi-types@0.18.1": + version "0.18.1" + resolved "https://registry.yarnpkg.com/@sphereon/ssi-types/-/ssi-types-0.18.1.tgz#c00e4939149f4e441fae56af860735886a4c33a5" + integrity sha512-uM0gb1woyc0R+p+qh8tVDi15ZWmpzo9BP0iBp/yRkJar7gAfgwox/yvtEToaH9jROKnDCwL3DDQCDeNucpMkwg== dependencies: - "@sd-jwt/core" "0.1.2-alpha.0" + "@sd-jwt/decode" "^0.2.0" jwt-decode "^3.1.2" "@sphereon/ssi-types@^0.9.0": @@ -1791,6 +1785,13 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== +"@types/sha.js@^2.4.4": + version "2.4.4" + resolved "https://registry.yarnpkg.com/@types/sha.js/-/sha.js-2.4.4.tgz#36be3d0bbc02f790617181709831fd4fc4be942d" + integrity sha512-Qukd+D6S2Hm0wLVt2Vh+/eWBIoUt+wF8jWjBsG4F8EFQRwKtYvtXCPcNl2OEUQ1R+eTr3xuSaBYUyM3WD1x/Qw== + dependencies: + "@types/node" "*" + "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"