@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.78.279 → 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.js CHANGED
@@ -311,7 +311,7 @@ var oid4vciRequireAuthorizationGuard = /* @__PURE__ */ __name((ctx, _event) => {
311
311
  if (!openID4VCIClientState) {
312
312
  throw Error("Missing openID4VCI client state in context");
313
313
  }
314
- if (openID4VCIClientState.authorizationRequestOpts) {
314
+ if (openID4VCIClientState.authorizationURL && openID4VCIClientState.authorizationRequestOpts) {
315
315
  return !ctx.openID4VCIClientState?.authorizationCodeResponse;
316
316
  } else if (openID4VCIClientState.credentialOffer?.supportedFlows?.includes(AuthzFlowType.AUTHORIZATION_CODE_FLOW)) {
317
317
  return !ctx.openID4VCIClientState?.authorizationCodeResponse;
@@ -598,6 +598,10 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
598
598
  target: OID4VCIMachineStates.startFirstPartApplicationFlow,
599
599
  cond: OID4VCIMachineGuards.isFirstPartyApplication
600
600
  },
601
+ {
602
+ target: OID4VCIMachineStates.prepareAuthorizationRequest,
603
+ cond: OID4VCIMachineGuards.requireAuthorizationGuard
604
+ },
601
605
  {
602
606
  target: OID4VCIMachineStates.initiateAuthorizationRequest,
603
607
  cond: OID4VCIMachineGuards.requireAuthorizationGuard
@@ -673,6 +677,10 @@ var createOID4VCIMachine = /* @__PURE__ */ __name((opts) => {
673
677
  target: OID4VCIMachineStates.startFirstPartApplicationFlow,
674
678
  cond: OID4VCIMachineGuards.isFirstPartyApplication
675
679
  },
680
+ {
681
+ target: OID4VCIMachineStates.prepareAuthorizationRequest,
682
+ cond: OID4VCIMachineGuards.requireAuthorizationGuard
683
+ },
676
684
  {
677
685
  target: OID4VCIMachineStates.verifyPin,
678
686
  cond: OID4VCIMachineGuards.requirePinGuard
@@ -1686,7 +1694,7 @@ var mapCredentialToAccept = /* @__PURE__ */ __name(async (args) => {
1686
1694
  });
1687
1695
  let uniformVerifiableCredential;
1688
1696
  if (CredentialMapper.isSdJwtDecodedCredential(wrappedVerifiableCredential.credential)) {
1689
- uniformVerifiableCredential = await sdJwtDecodedCredentialToUniformCredential(wrappedVerifiableCredential.credential);
1697
+ uniformVerifiableCredential = sdJwtDecodedCredentialToUniformCredential(wrappedVerifiableCredential.credential);
1690
1698
  } else if (CredentialMapper.isSdJwtEncoded(wrappedVerifiableCredential.credential)) {
1691
1699
  if (!hasher) {
1692
1700
  return Promise.reject("a hasher is required for encoded SD-JWT credentials");