@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.78.280 → 0.34.1-feature.SSISDK.78.306

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
@@ -391,7 +391,7 @@ var oid4vciRequireAuthorizationGuard = /* @__PURE__ */ __name((ctx, _event) => {
391
391
  if (!openID4VCIClientState) {
392
392
  throw Error("Missing openID4VCI client state in context");
393
393
  }
394
- if (openID4VCIClientState.authorizationRequestOpts) {
394
+ if (openID4VCIClientState.authorizationURL && openID4VCIClientState.authorizationRequestOpts) {
395
395
  return !ctx.openID4VCIClientState?.authorizationCodeResponse;
396
396
  } else if (openID4VCIClientState.credentialOffer?.supportedFlows?.includes(import_oid4vci_common.AuthzFlowType.AUTHORIZATION_CODE_FLOW)) {
397
397
  return !ctx.openID4VCIClientState?.authorizationCodeResponse;
@@ -678,6 +678,10 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
678
678
  target: OID4VCIMachineStates.startFirstPartApplicationFlow,
679
679
  cond: OID4VCIMachineGuards.isFirstPartyApplication
680
680
  },
681
+ {
682
+ target: OID4VCIMachineStates.prepareAuthorizationRequest,
683
+ cond: OID4VCIMachineGuards.requireAuthorizationGuard
684
+ },
681
685
  {
682
686
  target: OID4VCIMachineStates.initiateAuthorizationRequest,
683
687
  cond: OID4VCIMachineGuards.requireAuthorizationGuard
@@ -753,6 +757,10 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
753
757
  target: OID4VCIMachineStates.startFirstPartApplicationFlow,
754
758
  cond: OID4VCIMachineGuards.isFirstPartyApplication
755
759
  },
760
+ {
761
+ target: OID4VCIMachineStates.prepareAuthorizationRequest,
762
+ cond: OID4VCIMachineGuards.requireAuthorizationGuard
763
+ },
756
764
  {
757
765
  target: OID4VCIMachineStates.verifyPin,
758
766
  cond: OID4VCIMachineGuards.requirePinGuard
@@ -1766,7 +1774,7 @@ var mapCredentialToAccept = /* @__PURE__ */ __name(async (args) => {
1766
1774
  });
1767
1775
  let uniformVerifiableCredential;
1768
1776
  if (import_ssi_types.CredentialMapper.isSdJwtDecodedCredential(wrappedVerifiableCredential.credential)) {
1769
- uniformVerifiableCredential = await (0, import_ssi_types.sdJwtDecodedCredentialToUniformCredential)(wrappedVerifiableCredential.credential);
1777
+ uniformVerifiableCredential = (0, import_ssi_types.sdJwtDecodedCredentialToUniformCredential)(wrappedVerifiableCredential.credential);
1770
1778
  } else if (import_ssi_types.CredentialMapper.isSdJwtEncoded(wrappedVerifiableCredential.credential)) {
1771
1779
  if (!hasher) {
1772
1780
  return Promise.reject("a hasher is required for encoded SD-JWT credentials");