@sphereon/ssi-sdk.siopv2-oid4vp-op-auth 0.34.1-feature.SSISDK.45.74 → 0.34.1-feature.SSISDK.45.92

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 CHANGED
@@ -425,7 +425,7 @@ var plugin_schema_default = {
425
425
  // src/agent/DidAuthSiopOpAuthenticator.ts
426
426
  var import_did_auth_siop5 = require("@sphereon/did-auth-siop");
427
427
  var import_ssi_sdk6 = require("@sphereon/ssi-sdk.data-store");
428
- var import_ssi_types7 = require("@sphereon/ssi-types");
428
+ var import_ssi_types8 = require("@sphereon/ssi-types");
429
429
  var import_uuid2 = require("uuid");
430
430
 
431
431
  // src/session/functions.ts
@@ -864,19 +864,19 @@ var LOGGER_NAMESPACE = "sphereon:siopv2-oid4vp:op-auth";
864
864
  var DEFAULT_JWT_PROOF_TYPE = "JwtProof2020";
865
865
 
866
866
  // src/types/siop-service/index.ts
867
- var Siopv2HolderEvent = /* @__PURE__ */ (function(Siopv2HolderEvent2) {
867
+ var Siopv2HolderEvent = /* @__PURE__ */ function(Siopv2HolderEvent2) {
868
868
  Siopv2HolderEvent2["CONTACT_IDENTITY_CREATED"] = "contact_identity_created";
869
869
  Siopv2HolderEvent2["IDENTIFIER_CREATED"] = "identifier_created";
870
870
  return Siopv2HolderEvent2;
871
- })({});
872
- var SupportedLanguage = /* @__PURE__ */ (function(SupportedLanguage2) {
871
+ }({});
872
+ var SupportedLanguage = /* @__PURE__ */ function(SupportedLanguage2) {
873
873
  SupportedLanguage2["ENGLISH"] = "en";
874
874
  SupportedLanguage2["DUTCH"] = "nl";
875
875
  return SupportedLanguage2;
876
- })({});
876
+ }({});
877
877
 
878
878
  // src/types/machine/index.ts
879
- var Siopv2MachineStates = /* @__PURE__ */ (function(Siopv2MachineStates2) {
879
+ var Siopv2MachineStates = /* @__PURE__ */ function(Siopv2MachineStates2) {
880
880
  Siopv2MachineStates2["createConfig"] = "createConfig";
881
881
  Siopv2MachineStates2["getSiopRequest"] = "getSiopRequest";
882
882
  Siopv2MachineStates2["getSelectableCredentials"] = "getSelectableCredentials";
@@ -892,14 +892,14 @@ var Siopv2MachineStates = /* @__PURE__ */ (function(Siopv2MachineStates2) {
892
892
  Siopv2MachineStates2["error"] = "error";
893
893
  Siopv2MachineStates2["done"] = "done";
894
894
  return Siopv2MachineStates2;
895
- })({});
896
- var Siopv2MachineAddContactStates = /* @__PURE__ */ (function(Siopv2MachineAddContactStates2) {
895
+ }({});
896
+ var Siopv2MachineAddContactStates = /* @__PURE__ */ function(Siopv2MachineAddContactStates2) {
897
897
  Siopv2MachineAddContactStates2["idle"] = "idle";
898
898
  Siopv2MachineAddContactStates2["executing"] = "executing";
899
899
  Siopv2MachineAddContactStates2["next"] = "next";
900
900
  return Siopv2MachineAddContactStates2;
901
- })({});
902
- var Siopv2MachineEvents = /* @__PURE__ */ (function(Siopv2MachineEvents2) {
901
+ }({});
902
+ var Siopv2MachineEvents = /* @__PURE__ */ function(Siopv2MachineEvents2) {
903
903
  Siopv2MachineEvents2["NEXT"] = "NEXT";
904
904
  Siopv2MachineEvents2["PREVIOUS"] = "PREVIOUS";
905
905
  Siopv2MachineEvents2["DECLINE"] = "DECLINE";
@@ -908,8 +908,8 @@ var Siopv2MachineEvents = /* @__PURE__ */ (function(Siopv2MachineEvents2) {
908
908
  Siopv2MachineEvents2["CREATE_CONTACT"] = "CREATE_CONTACT";
909
909
  Siopv2MachineEvents2["SET_SELECTED_CREDENTIALS"] = "SET_SELECTED_CREDENTIALS";
910
910
  return Siopv2MachineEvents2;
911
- })({});
912
- var Siopv2MachineGuards = /* @__PURE__ */ (function(Siopv2MachineGuards2) {
911
+ }({});
912
+ var Siopv2MachineGuards = /* @__PURE__ */ function(Siopv2MachineGuards2) {
913
913
  Siopv2MachineGuards2["hasNoContactGuard"] = "Siopv2HasNoContactGuard";
914
914
  Siopv2MachineGuards2["createContactGuard"] = "Siopv2CreateContactGuard";
915
915
  Siopv2MachineGuards2["hasContactGuard"] = "Siopv2HasContactGuard";
@@ -919,8 +919,8 @@ var Siopv2MachineGuards = /* @__PURE__ */ (function(Siopv2MachineGuards2) {
919
919
  Siopv2MachineGuards2["siopOnlyGuard"] = "Siopv2IsSiopOnlyGuard";
920
920
  Siopv2MachineGuards2["siopWithOID4VPGuard"] = "Siopv2IsSiopWithOID4VPGuard";
921
921
  return Siopv2MachineGuards2;
922
- })({});
923
- var Siopv2MachineServices = /* @__PURE__ */ (function(Siopv2MachineServices2) {
922
+ }({});
923
+ var Siopv2MachineServices = /* @__PURE__ */ function(Siopv2MachineServices2) {
924
924
  Siopv2MachineServices2["getSiopRequest"] = "getSiopRequest";
925
925
  Siopv2MachineServices2["getSelectableCredentials"] = "getSelectableCredentials";
926
926
  Siopv2MachineServices2["retrieveContact"] = "retrieveContact";
@@ -928,7 +928,7 @@ var Siopv2MachineServices = /* @__PURE__ */ (function(Siopv2MachineServices2) {
928
928
  Siopv2MachineServices2["sendResponse"] = "sendResponse";
929
929
  Siopv2MachineServices2["createConfig"] = "createConfig";
930
930
  return Siopv2MachineServices2;
931
- })({});
931
+ }({});
932
932
 
933
933
  // src/types/identifier/index.ts
934
934
  var DID_PREFIX = "did";
@@ -1351,6 +1351,7 @@ var import_ssi_sdk_ext3 = require("@sphereon/ssi-sdk-ext.identifier-resolution")
1351
1351
  var import_ssi_sdk3 = require("@sphereon/ssi-sdk.credential-store");
1352
1352
  var import_ssi_sdk4 = require("@sphereon/ssi-sdk.data-store");
1353
1353
  var import_ssi_types6 = require("@sphereon/ssi-types");
1354
+ var import_ssi_types7 = require("@sphereon/ssi-types");
1354
1355
  var import_ssi_sdk5 = require("@sphereon/ssi-sdk.core");
1355
1356
  var import_dcql = require("dcql");
1356
1357
 
@@ -1393,7 +1394,7 @@ __name(convertToDcqlCredentials, "convertToDcqlCredentials");
1393
1394
 
1394
1395
  // src/services/Siopv2MachineService.ts
1395
1396
  var import_ssi_sdk_ext4 = require("@sphereon/ssi-sdk-ext.did-utils");
1396
- var logger3 = import_ssi_types6.Loggers.DEFAULT.get(LOGGER_NAMESPACE);
1397
+ var logger3 = import_ssi_types7.Loggers.DEFAULT.get(LOGGER_NAMESPACE);
1397
1398
  var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType, args, context) => {
1398
1399
  const { agent } = context;
1399
1400
  const { credentials } = args;
@@ -1416,7 +1417,7 @@ var siopSendAuthorizationResponse = /* @__PURE__ */ __name(async (connectionType
1416
1417
  let identifier;
1417
1418
  const digitalCredential = firstUniqueDC.digitalCredential;
1418
1419
  const firstVC = firstUniqueDC.uniformVerifiableCredential;
1419
- const holder = import_ssi_types6.CredentialMapper.isSdJwtDecodedCredential(firstVC) ? firstVC.decodedPayload.cnf?.jwk ? (
1420
+ const holder = import_ssi_types7.CredentialMapper.isSdJwtDecodedCredential(firstVC) ? firstVC.decodedPayload.cnf?.jwk ? (
1420
1421
  //doesn't apply to did:jwk only, as you can represent any DID key as a JWK. So whenever you encounter a JWK it doesn't mean it had to come from a did:jwk in the system. It just can always be represented as a did:jwk
1421
1422
  `did:jwk:${(0, import_ssi_sdk5.encodeJoseBlob)(firstVC.decodedPayload.cnf?.jwk)}#0`
1422
1423
  ) : firstVC.decodedPayload.sub : Array.isArray(firstVC.credentialSubject) ? firstVC.credentialSubject[0].id : firstVC.credentialSubject.id;
@@ -1498,7 +1499,7 @@ var getSelectableCredentials = /* @__PURE__ */ __name(async (dcqlQuery, context)
1498
1499
  };
1499
1500
  const { agent } = agentContext;
1500
1501
  const uniqueVerifiableCredentials = await agent.crsGetUniqueCredentials({
1501
- filter: (0, import_ssi_sdk3.verifiableCredentialForRoleFilter)(import_ssi_sdk4.CredentialRole.HOLDER)
1502
+ filter: (0, import_ssi_sdk3.verifiableCredentialForRoleFilter)(import_ssi_types6.CredentialRole.HOLDER)
1502
1503
  });
1503
1504
  const branding = await agent.ibGetCredentialBranding();
1504
1505
  const dcqlCredentialsWithCredentials = new Map(uniqueVerifiableCredentials.map((vc) => [
@@ -1569,7 +1570,7 @@ var translateCorrelationIdToName = /* @__PURE__ */ __name(async (correlationId,
1569
1570
  }, "translateCorrelationIdToName");
1570
1571
 
1571
1572
  // src/agent/DidAuthSiopOpAuthenticator.ts
1572
- var logger4 = import_ssi_types7.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
1573
+ var logger4 = import_ssi_types8.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
1573
1574
  var didAuthSiopOpAuthenticatorMethods = [
1574
1575
  "cmGetContacts",
1575
1576
  "cmGetContact",
@@ -1787,7 +1788,7 @@ var DidAuthSiopOpAuthenticator = class {
1787
1788
  alias: correlationId,
1788
1789
  origin: import_ssi_sdk6.IdentityOrigin.EXTERNAL,
1789
1790
  roles: [
1790
- import_ssi_sdk6.CredentialRole.ISSUER
1791
+ import_ssi_types8.CredentialRole.ISSUER
1791
1792
  ],
1792
1793
  identifier: {
1793
1794
  type: correlationId.startsWith("did:") ? import_ssi_sdk6.CorrelationIdentifierType.DID : import_ssi_sdk6.CorrelationIdentifierType.URL,
@@ -1844,11 +1845,11 @@ var DidAuthSiopOpAuthenticator = class {
1844
1845
  };
1845
1846
 
1846
1847
  // src/machine/CallbackStateListener.ts
1847
- var import_ssi_types8 = require("@sphereon/ssi-types");
1848
- var logger5 = import_ssi_types8.Loggers.DEFAULT.options("sphereon:siopv2-oid4vp:op-auth", {
1849
- defaultLogLevel: import_ssi_types8.LogLevel.DEBUG,
1848
+ var import_ssi_types9 = require("@sphereon/ssi-types");
1849
+ var logger5 = import_ssi_types9.Loggers.DEFAULT.options("sphereon:siopv2-oid4vp:op-auth", {
1850
+ defaultLogLevel: import_ssi_types9.LogLevel.DEBUG,
1850
1851
  methods: [
1851
- import_ssi_types8.LogMethod.CONSOLE
1852
+ import_ssi_types9.LogMethod.CONSOLE
1852
1853
  ]
1853
1854
  }).get("sphereon:siopv2-oid4vp:op-auth");
1854
1855
  var OID4VPCallbackStateListener = /* @__PURE__ */ __name((callbacks) => {
@@ -1881,8 +1882,8 @@ var OID4VPCallbackStateListener = /* @__PURE__ */ __name((callbacks) => {
1881
1882
  var import_ssi_sdk7 = require("@sphereon/ssi-sdk.agent-config");
1882
1883
  var import_ssi_sdk8 = require("@sphereon/ssi-sdk.core");
1883
1884
  var import_ssi_sdk9 = require("@sphereon/ssi-sdk.xstate-machine-persistence");
1884
- var import_ssi_types9 = require("@sphereon/ssi-types");
1885
- var logger6 = import_ssi_types9.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
1885
+ var import_ssi_types10 = require("@sphereon/ssi-types");
1886
+ var logger6 = import_ssi_types10.Loggers.DEFAULT.options(LOGGER_NAMESPACE, {}).get(LOGGER_NAMESPACE);
1886
1887
  var Siopv2OID4VPLinkHandler = class extends import_ssi_sdk8.LinkHandlerAdapter {
1887
1888
  static {
1888
1889
  __name(this, "Siopv2OID4VPLinkHandler");