@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.36.1-feature.vdx24.einvoice.inbox.127 → 0.36.1-feature.vdx24.einvoice.inbox.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
- package/src/services/Siopv2MachineService.ts +15 -3
- package/src/session/OID4VP.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -646,11 +646,14 @@ async function createVerifiablePresentationForFormat(credential, identifier, con
|
|
|
646
646
|
nonce,
|
|
647
647
|
aud: audience
|
|
648
648
|
};
|
|
649
|
+
const holder = getIdentifierString(identifier);
|
|
650
|
+
logger.debug(`Creating SD-JWT presentation with holder: ${holder}`);
|
|
649
651
|
const presentationResult = await agent.createSdJwtPresentation({
|
|
650
652
|
presentation: decodedSdJwt.compactSdJwtVc,
|
|
651
653
|
kb: {
|
|
652
654
|
payload: kbJwtPayload
|
|
653
|
-
}
|
|
655
|
+
},
|
|
656
|
+
holder
|
|
654
657
|
});
|
|
655
658
|
return presentationResult.presentation;
|
|
656
659
|
}
|
|
@@ -1454,7 +1457,15 @@ var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType
|
|
|
1454
1457
|
const firstVC = firstUniqueDC.uniformVerifiableCredential;
|
|
1455
1458
|
let holder;
|
|
1456
1459
|
if (CredentialMapper4.isSdJwtDecodedCredential(firstVC)) {
|
|
1457
|
-
|
|
1460
|
+
const cnf = firstVC.decodedPayload.cnf;
|
|
1461
|
+
if (cnf?.jwk) {
|
|
1462
|
+
holder = `did:jwk:${encodeJoseBlob(cnf.jwk)}#0`;
|
|
1463
|
+
} else if (cnf?.kid) {
|
|
1464
|
+
const kid = cnf.kid;
|
|
1465
|
+
holder = kid.includes("#") ? kid.split("#")[0] : kid;
|
|
1466
|
+
} else {
|
|
1467
|
+
holder = firstVC.decodedPayload.sub;
|
|
1468
|
+
}
|
|
1458
1469
|
} else {
|
|
1459
1470
|
holder = Array.isArray(firstVC.credentialSubject) ? firstVC.credentialSubject[0].id : firstVC.credentialSubject.id;
|
|
1460
1471
|
}
|