@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.36.1-feature.vdx24.einvoice.inbox.138 → 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.cjs
CHANGED
|
@@ -703,11 +703,14 @@ async function createVerifiablePresentationForFormat(credential, identifier, con
|
|
|
703
703
|
nonce,
|
|
704
704
|
aud: audience
|
|
705
705
|
};
|
|
706
|
+
const holder = getIdentifierString(identifier);
|
|
707
|
+
logger.debug(`Creating SD-JWT presentation with holder: ${holder}`);
|
|
706
708
|
const presentationResult = await agent.createSdJwtPresentation({
|
|
707
709
|
presentation: decodedSdJwt.compactSdJwtVc,
|
|
708
710
|
kb: {
|
|
709
711
|
payload: kbJwtPayload
|
|
710
|
-
}
|
|
712
|
+
},
|
|
713
|
+
holder
|
|
711
714
|
});
|
|
712
715
|
return presentationResult.presentation;
|
|
713
716
|
}
|
|
@@ -1511,7 +1514,15 @@ var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType
|
|
|
1511
1514
|
const firstVC = firstUniqueDC.uniformVerifiableCredential;
|
|
1512
1515
|
let holder;
|
|
1513
1516
|
if (import_ssi_types6.CredentialMapper.isSdJwtDecodedCredential(firstVC)) {
|
|
1514
|
-
|
|
1517
|
+
const cnf = firstVC.decodedPayload.cnf;
|
|
1518
|
+
if (cnf?.jwk) {
|
|
1519
|
+
holder = `did:jwk:${(0, import_ssi_sdk4.encodeJoseBlob)(cnf.jwk)}#0`;
|
|
1520
|
+
} else if (cnf?.kid) {
|
|
1521
|
+
const kid = cnf.kid;
|
|
1522
|
+
holder = kid.includes("#") ? kid.split("#")[0] : kid;
|
|
1523
|
+
} else {
|
|
1524
|
+
holder = firstVC.decodedPayload.sub;
|
|
1525
|
+
}
|
|
1515
1526
|
} else {
|
|
1516
1527
|
holder = Array.isArray(firstVC.credentialSubject) ? firstVC.credentialSubject[0].id : firstVC.credentialSubject.id;
|
|
1517
1528
|
}
|