@pagopa/io-react-native-wallet 3.6.2 → 3.6.4
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/lib/commonjs/IoWallet.js +5 -3
- package/lib/commonjs/IoWallet.js.map +1 -1
- package/lib/commonjs/api/index.js +19 -19
- package/lib/commonjs/api/index.js.map +1 -1
- package/lib/commonjs/client/generated/wallet-provider.js +23 -4
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/client/index.js +9 -11
- package/lib/commonjs/client/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js +23 -23
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/types.js +3 -3
- package/lib/commonjs/credential/issuance/api/types.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +3 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +13 -13
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/errors.js +0 -3
- package/lib/commonjs/credential/issuance/common/errors.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js +4 -4
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +18 -18
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +10 -10
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +24 -15
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/index.js +8 -8
- package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +7 -7
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +3 -3
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +30 -30
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +37 -37
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +16 -16
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +32 -28
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/index.js +8 -8
- package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +18 -17
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/offer/common/errors.js +0 -6
- package/lib/commonjs/credential/offer/common/errors.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.0.0/index.js +3 -3
- package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +4 -4
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +4 -4
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js +5 -5
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/index.js +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +8 -8
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/types.js +11 -11
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/errors.js +24 -23
- package/lib/commonjs/credential/presentation/common/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/dcql.js +38 -35
- package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/mdoc.js +20 -22
- package/lib/commonjs/credential/presentation/common/utils/mdoc.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +10 -10
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +17 -12
- package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js +20 -20
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/index.js +4 -4
- package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +6 -6
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/types.js +12 -12
- package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +2 -2
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js +3 -3
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js +11 -7
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/06-evaluate-dcql-query.js +24 -16
- package/lib/commonjs/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js +31 -26
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/index.js +5 -5
- package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +11 -11
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +2 -2
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/types.js +3 -3
- package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/credential/status/api/types.js +6 -6
- package/lib/commonjs/credential/status/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +15 -12
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/index.js +1 -1
- package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/types.js +18 -18
- package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +4 -4
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js +2 -2
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/index.js +3 -3
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +7 -7
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +54 -55
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +0 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +35 -35
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +11 -11
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +26 -20
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +93 -93
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +8 -8
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -1
- package/lib/commonjs/index.js +15 -15
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mdoc/index.js +13 -5
- package/lib/commonjs/mdoc/index.js.map +1 -1
- package/lib/commonjs/mdoc/utils.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +9 -9
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -3
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +9 -9
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +18 -18
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +3 -3
- package/lib/commonjs/sd-jwt/utils.js.map +1 -1
- package/lib/commonjs/trust/api/TrustAnchorConfig.js +4 -4
- package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -1
- package/lib/commonjs/trust/common/build-chain.js +5 -2
- package/lib/commonjs/trust/common/build-chain.js.map +1 -1
- package/lib/commonjs/trust/common/errors.js +51 -44
- package/lib/commonjs/trust/common/errors.js.map +1 -1
- package/lib/commonjs/trust/common/types.js +22 -22
- package/lib/commonjs/trust/common/types.js.map +1 -1
- package/lib/commonjs/trust/common/utils.js +45 -45
- package/lib/commonjs/trust/common/utils.js.map +1 -1
- package/lib/commonjs/trust/common/verify-chain.js +96 -96
- package/lib/commonjs/trust/common/verify-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/build-chain.js +2 -2
- package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/entities.js +1 -1
- package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/index.js +3 -3
- package/lib/commonjs/trust/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/mappers.js +2 -2
- package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/types.js +46 -46
- package/lib/commonjs/trust/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/verify-chain.js +3 -3
- package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.3.3/entities.js +1 -1
- package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -1
- package/lib/commonjs/trust/v1.3.3/types.js +2 -2
- package/lib/commonjs/trust/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/utils/auth.js +2 -2
- package/lib/commonjs/utils/auth.js.map +1 -1
- package/lib/commonjs/utils/callbacks.js +47 -51
- package/lib/commonjs/utils/callbacks.js.map +1 -1
- package/lib/commonjs/utils/credentials.js +3 -3
- package/lib/commonjs/utils/credentials.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +23 -25
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -2
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/dpop.js +5 -5
- package/lib/commonjs/utils/dpop.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +19 -19
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +51 -50
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/jwk.js +5 -6
- package/lib/commonjs/utils/jwk.js.map +1 -1
- package/lib/commonjs/utils/logging.js +15 -14
- package/lib/commonjs/utils/logging.js.map +1 -1
- package/lib/commonjs/utils/mappers.js +6 -8
- package/lib/commonjs/utils/mappers.js.map +1 -1
- package/lib/commonjs/utils/misc.js +6 -5
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +28 -28
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/pop.js +5 -5
- package/lib/commonjs/utils/pop.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/x509.js +2 -2
- package/lib/commonjs/utils/x509.js.map +1 -1
- package/lib/commonjs/utils/zod.js +1 -1
- package/lib/commonjs/utils/zod.js.map +1 -1
- package/lib/commonjs/wallet-instance/common/wallet-instance.js +5 -5
- package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.0.0/index.js +2 -2
- package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.3.3/index.js +2 -2
- package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/api/types.js +7 -7
- package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/common/types.js +7 -7
- package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +5 -5
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +20 -20
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/api/types.js +5 -5
- package/lib/commonjs/wallet-unit-attestation/api/types.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js +4 -4
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js +32 -29
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/module/IoWallet.js +6 -4
- package/lib/module/IoWallet.js.map +1 -1
- package/lib/module/api/index.js +19 -19
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +17 -1
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/client/index.js +10 -12
- package/lib/module/client/index.js.map +1 -1
- package/lib/module/credential/issuance/api/IssuerConfig.js +23 -23
- package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -1
- package/lib/module/credential/issuance/api/types.js +3 -3
- package/lib/module/credential/issuance/api/types.js.map +1 -1
- package/lib/module/credential/issuance/common/02-start-user-authorization.js +4 -1
- package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +6 -6
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
- package/lib/module/credential/issuance/common/errors.js +0 -3
- package/lib/module/credential/issuance/common/errors.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/index.js +5 -5
- package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +17 -17
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +11 -11
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +25 -16
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/index.js +9 -9
- package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/mappers.js +7 -7
- package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +4 -4
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +31 -31
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +28 -28
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +16 -16
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +34 -30
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/index.js +9 -9
- package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/mappers.js +18 -17
- package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/offer/common/errors.js +0 -6
- package/lib/module/credential/offer/common/errors.js.map +1 -1
- package/lib/module/credential/offer/v1.0.0/index.js +3 -3
- package/lib/module/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +5 -5
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +3 -3
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js +6 -6
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/index.js +1 -1
- package/lib/module/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js +8 -8
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
- package/lib/module/credential/presentation/api/types.js +11 -11
- package/lib/module/credential/presentation/api/types.js.map +1 -1
- package/lib/module/credential/presentation/common/errors.js +21 -21
- package/lib/module/credential/presentation/common/errors.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/dcql.js +38 -35
- package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/mdoc.js +20 -22
- package/lib/module/credential/presentation/common/utils/mdoc.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/sd-jwt.js +10 -10
- package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +16 -11
- package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js +12 -12
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/index.js +5 -5
- package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/mappers.js +6 -6
- package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/types.js +12 -12
- package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/utils.js +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +2 -2
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +1 -1
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js +3 -3
- package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js +12 -8
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/06-evaluate-dcql-query.js +25 -17
- package/lib/module/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js +31 -26
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/index.js +6 -6
- package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/mappers.js +11 -11
- package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +4 -3
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/types.js +3 -3
- package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/module/credential/status/api/index.js.map +1 -1
- package/lib/module/credential/status/api/types.js +6 -6
- package/lib/module/credential/status/api/types.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js +15 -12
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/index.js +1 -1
- package/lib/module/credential/status/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/types.js +17 -17
- package/lib/module/credential/status/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/01-status-list.js +4 -4
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/03-get-status.js +3 -2
- package/lib/module/credential/status/v1.3.3/03-get-status.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/index.js +3 -3
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +8 -8
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +54 -56
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/index.js +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js +0 -1
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/types.js +35 -35
- package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +11 -11
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/index.js +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js +27 -21
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/types.js +93 -93
- package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/utils.js +8 -8
- package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -1
- package/lib/module/index.js +10 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/mdoc/index.js +13 -5
- package/lib/module/mdoc/index.js.map +1 -1
- package/lib/module/mdoc/utils.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +9 -9
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +3 -3
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +9 -9
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +18 -18
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +3 -3
- package/lib/module/sd-jwt/utils.js.map +1 -1
- package/lib/module/trust/api/TrustAnchorConfig.js +4 -4
- package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -1
- package/lib/module/trust/common/build-chain.js +5 -2
- package/lib/module/trust/common/build-chain.js.map +1 -1
- package/lib/module/trust/common/errors.js +46 -37
- package/lib/module/trust/common/errors.js.map +1 -1
- package/lib/module/trust/common/types.js +22 -22
- package/lib/module/trust/common/types.js.map +1 -1
- package/lib/module/trust/common/utils.js +45 -45
- package/lib/module/trust/common/utils.js.map +1 -1
- package/lib/module/trust/common/verify-chain.js +96 -96
- package/lib/module/trust/common/verify-chain.js.map +1 -1
- package/lib/module/trust/v1.0.0/build-chain.js +2 -2
- package/lib/module/trust/v1.0.0/build-chain.js.map +1 -1
- package/lib/module/trust/v1.0.0/entities.js +1 -1
- package/lib/module/trust/v1.0.0/entities.js.map +1 -1
- package/lib/module/trust/v1.0.0/index.js +3 -3
- package/lib/module/trust/v1.0.0/index.js.map +1 -1
- package/lib/module/trust/v1.0.0/mappers.js +2 -2
- package/lib/module/trust/v1.0.0/mappers.js.map +1 -1
- package/lib/module/trust/v1.0.0/types.js +46 -46
- package/lib/module/trust/v1.0.0/types.js.map +1 -1
- package/lib/module/trust/v1.0.0/verify-chain.js +3 -3
- package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -1
- package/lib/module/trust/v1.3.3/entities.js +1 -1
- package/lib/module/trust/v1.3.3/entities.js.map +1 -1
- package/lib/module/trust/v1.3.3/types.js +2 -2
- package/lib/module/trust/v1.3.3/types.js.map +1 -1
- package/lib/module/utils/auth.js +2 -2
- package/lib/module/utils/auth.js.map +1 -1
- package/lib/module/utils/callbacks.js +47 -51
- package/lib/module/utils/callbacks.js.map +1 -1
- package/lib/module/utils/credentials.js +3 -3
- package/lib/module/utils/credentials.js.map +1 -1
- package/lib/module/utils/crypto.js +23 -25
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -3
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/dpop.js +5 -5
- package/lib/module/utils/dpop.js.map +1 -1
- package/lib/module/utils/error-codes.js +19 -19
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +47 -46
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/jwk.js +4 -5
- package/lib/module/utils/jwk.js.map +1 -1
- package/lib/module/utils/logging.js +15 -14
- package/lib/module/utils/logging.js.map +1 -1
- package/lib/module/utils/mappers.js +6 -8
- package/lib/module/utils/mappers.js.map +1 -1
- package/lib/module/utils/misc.js +7 -6
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +28 -28
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/pop.js +5 -5
- package/lib/module/utils/pop.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/x509.js +2 -2
- package/lib/module/utils/x509.js.map +1 -1
- package/lib/module/utils/zod.js +1 -1
- package/lib/module/utils/zod.js.map +1 -1
- package/lib/module/wallet-instance/common/wallet-instance.js +6 -6
- package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -1
- package/lib/module/wallet-instance/v1.0.0/index.js +3 -3
- package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -1
- package/lib/module/wallet-instance/v1.3.3/index.js +3 -3
- package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/api/types.js +7 -7
- package/lib/module/wallet-instance-attestation/api/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/common/types.js +7 -7
- package/lib/module/wallet-instance-attestation/common/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js +5 -5
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +20 -20
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/utils.js +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/module/wallet-unit-attestation/api/types.js +5 -5
- package/lib/module/wallet-unit-attestation/api/types.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/index.js +4 -4
- package/lib/module/wallet-unit-attestation/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js +32 -29
- package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/types.js +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/typescript/IoWallet.d.ts +4 -4
- package/lib/typescript/IoWallet.d.ts.map +1 -1
- package/lib/typescript/api/index.d.ts +14 -14
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +33 -0
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/client/index.d.ts +2 -2
- package/lib/typescript/client/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +8 -8
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +30 -30
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +2 -2
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +5 -5
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +1 -1
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +52 -52
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/index.d.ts +2 -2
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +30 -30
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +25 -25
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/types.d.ts +8 -11
- package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +2 -2
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/errors.d.ts +0 -1
- package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -2
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +2 -2
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +130 -130
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +8 -8
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +538 -59
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts +1 -1
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/api/index.d.ts +1 -1
- package/lib/typescript/credential/offer/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/common/errors.d.ts +0 -2
- package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/03-validate-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +3 -3
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts +12 -12
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts +17 -17
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +19 -19
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/index.d.ts +1 -1
- package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/types.d.ts +72 -72
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/errors.d.ts +24 -24
- package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +5 -5
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/mdoc.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +51 -51
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +10 -10
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-certificate-chain.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +41 -41
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +2 -2
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/index.d.ts +3 -3
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-assertion.d.ts +3 -3
- package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-list.d.ts +11 -11
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/types.d.ts +12 -12
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +7 -7
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/types.d.ts +27 -27
- package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/api/index.d.ts +11 -11
- package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +168 -165
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/index.d.ts +11 -11
- package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/common/get-status-l10n-ids.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +72 -71
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +89 -89
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +158 -157
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +186 -186
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +12 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/utils.d.ts +2 -2
- package/lib/typescript/mdoc/utils.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +10 -10
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +15 -15
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +17 -17
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -1
- package/lib/typescript/trust/api/index.d.ts +11 -11
- package/lib/typescript/trust/api/index.d.ts.map +1 -1
- package/lib/typescript/trust/common/build-chain.d.ts +3 -3
- package/lib/typescript/trust/common/build-chain.d.ts.map +1 -1
- package/lib/typescript/trust/common/errors.d.ts +43 -43
- package/lib/typescript/trust/common/errors.d.ts.map +1 -1
- package/lib/typescript/trust/common/types.d.ts +37 -37
- package/lib/typescript/trust/common/types.d.ts.map +1 -1
- package/lib/typescript/trust/common/utils.d.ts +17 -17
- package/lib/typescript/trust/common/utils.d.ts.map +1 -1
- package/lib/typescript/trust/common/verify-chain.d.ts +9 -9
- package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/entities.d.ts +325 -325
- package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/mappers.d.ts +42 -42
- package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/types.d.ts +331 -331
- package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -1
- package/lib/typescript/trust/v1.3.3/entities.d.ts +24 -24
- package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -1
- package/lib/typescript/trust/v1.3.3/types.d.ts +206 -206
- package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/utils/auth.d.ts +1 -1
- package/lib/typescript/utils/callbacks.d.ts +1 -1
- package/lib/typescript/utils/callbacks.d.ts.map +1 -1
- package/lib/typescript/utils/credentials.d.ts.map +1 -1
- package/lib/typescript/utils/crypto.d.ts +1 -1
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/dpop.d.ts +3 -3
- package/lib/typescript/utils/dpop.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +18 -18
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +49 -51
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/integrity.d.ts +9 -9
- package/lib/typescript/utils/integrity.d.ts.map +1 -1
- package/lib/typescript/utils/jwk.d.ts +3 -3
- package/lib/typescript/utils/jwk.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +10 -10
- package/lib/typescript/utils/logging.d.ts.map +1 -1
- package/lib/typescript/utils/mappers.d.ts.map +1 -1
- package/lib/typescript/utils/misc.d.ts +2 -2
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +13 -13
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/parser.d.ts +2 -2
- package/lib/typescript/utils/parser.d.ts.map +1 -1
- package/lib/typescript/utils/pop.d.ts +2 -2
- package/lib/typescript/utils/pop.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/utils/x509.d.ts.map +1 -1
- package/lib/typescript/utils/zod.d.ts +5 -5
- package/lib/typescript/utils/zod.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/api/index.d.ts +19 -19
- package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts +15 -15
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts +10 -10
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts +5 -5
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +12 -12
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +14 -14
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/mappers.d.ts +10 -10
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +5 -5
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/utils.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/api/index.d.ts +20 -20
- package/lib/typescript/wallet-unit-attestation/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/api/types.d.ts +10 -10
- package/lib/typescript/wallet-unit-attestation/api/types.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/mappers.d.ts +11 -11
- package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts +7 -7
- package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts.map +1 -1
- package/package.json +15 -12
- package/src/IoWallet.ts +11 -9
- package/src/api/index.ts +27 -27
- package/src/client/generated/wallet-provider.ts +22 -0
- package/src/client/index.ts +14 -13
- package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +1 -1
- package/src/credential/issuance/api/02-start-user-authorization.ts +9 -8
- package/src/credential/issuance/api/03-complete-user-authorization.ts +41 -40
- package/src/credential/issuance/api/04-authorize-access.ts +4 -3
- package/src/credential/issuance/api/05-obtain-credential.ts +8 -7
- package/src/credential/issuance/api/06-verify-and-parse-credential.ts +3 -2
- package/src/credential/issuance/api/IssuerConfig.ts +20 -19
- package/src/credential/issuance/api/index.ts +4 -4
- package/src/credential/issuance/api/mrtd-pop/index.ts +39 -38
- package/src/credential/issuance/api/mrtd-pop/types.ts +27 -27
- package/src/credential/issuance/api/types.ts +9 -8
- package/src/credential/issuance/common/02-start-user-authorization.ts +20 -14
- package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +39 -34
- package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +32 -29
- package/src/credential/issuance/common/errors.ts +0 -4
- package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +7 -5
- package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +22 -20
- package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +24 -21
- package/src/credential/issuance/mrtd-pop/index.ts +7 -6
- package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +3 -2
- package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +15 -14
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +45 -43
- package/src/credential/issuance/v1.0.0/04-authorize-access.ts +17 -15
- package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +39 -22
- package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +5 -4
- package/src/credential/issuance/v1.0.0/index.ts +11 -10
- package/src/credential/issuance/v1.0.0/mappers.ts +12 -11
- package/src/credential/issuance/v1.0.0/types.ts +2 -1
- package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +8 -6
- package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +33 -30
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +54 -51
- package/src/credential/issuance/v1.3.3/04-authorize-access.ts +20 -18
- package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +49 -43
- package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +5 -4
- package/src/credential/issuance/v1.3.3/index.ts +11 -10
- package/src/credential/issuance/v1.3.3/mappers.ts +28 -25
- package/src/credential/offer/api/01-resolve-credential-offer.ts +1 -1
- package/src/credential/offer/api/03-validate-credential-offer.ts +2 -1
- package/src/credential/offer/api/index.ts +2 -2
- package/src/credential/offer/common/errors.ts +0 -8
- package/src/credential/offer/v1.0.0/index.ts +5 -4
- package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +5 -3
- package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +6 -4
- package/src/credential/offer/v1.3.3/03-validate-credential-offer.ts +6 -4
- package/src/credential/offer/v1.3.3/index.ts +2 -1
- package/src/credential/presentation/api/01-start-flow.ts +4 -4
- package/src/credential/presentation/api/02-evaluate-rp-trust.ts +1 -1
- package/src/credential/presentation/api/03-get-request-object.ts +1 -1
- package/src/credential/presentation/api/04-verify-certificate-chain.ts +1 -1
- package/src/credential/presentation/api/05-verify-request-object.ts +1 -1
- package/src/credential/presentation/api/06-evaluate-dcql-query.ts +14 -14
- package/src/credential/presentation/api/07-send-authorization-response.ts +21 -19
- package/src/credential/presentation/api/RelyingPartyConfig.ts +8 -7
- package/src/credential/presentation/api/index.ts +4 -4
- package/src/credential/presentation/api/types.ts +68 -66
- package/src/credential/presentation/common/errors.ts +32 -35
- package/src/credential/presentation/common/utils/dcql.ts +34 -30
- package/src/credential/presentation/common/utils/http.ts +2 -2
- package/src/credential/presentation/common/utils/mdoc.ts +17 -15
- package/src/credential/presentation/common/utils/sd-jwt.ts +19 -16
- package/src/credential/presentation/v1.0.0/01-start-flow.ts +4 -3
- package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +3 -2
- package/src/credential/presentation/v1.0.0/03-get-request-object.ts +6 -5
- package/src/credential/presentation/v1.0.0/05-verify-request-object.ts +14 -12
- package/src/credential/presentation/v1.0.0/06-evaluate-dcql-query.ts +26 -15
- package/src/credential/presentation/v1.0.0/07-send-authorization-response.ts +23 -21
- package/src/credential/presentation/v1.0.0/index.ts +6 -5
- package/src/credential/presentation/v1.0.0/mappers.ts +9 -8
- package/src/credential/presentation/v1.0.0/types.ts +11 -10
- package/src/credential/presentation/v1.0.0/utils.jwks.ts +4 -3
- package/src/credential/presentation/v1.0.0/utils.ts +4 -3
- package/src/credential/presentation/v1.3.3/01-start-flow.ts +5 -3
- package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +3 -2
- package/src/credential/presentation/v1.3.3/03-get-request-object.ts +4 -2
- package/src/credential/presentation/v1.3.3/04-verify-certificate-chain.ts +9 -7
- package/src/credential/presentation/v1.3.3/05-verify-request-object.ts +24 -14
- package/src/credential/presentation/v1.3.3/06-evaluate-dcql-query.ts +37 -23
- package/src/credential/presentation/v1.3.3/07-send-authorization-response.ts +40 -32
- package/src/credential/presentation/v1.3.3/index.ts +7 -6
- package/src/credential/presentation/v1.3.3/mappers.ts +13 -12
- package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +9 -7
- package/src/credential/presentation/v1.3.3/types.ts +3 -3
- package/src/credential/status/api/index.ts +4 -4
- package/src/credential/status/api/status-assertion.ts +7 -6
- package/src/credential/status/api/status-list.ts +17 -17
- package/src/credential/status/api/types.ts +12 -11
- package/src/credential/status/v1.0.0/01-status-assertion.ts +22 -16
- package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +27 -17
- package/src/credential/status/v1.0.0/index.ts +2 -1
- package/src/credential/status/v1.0.0/mappers.ts +2 -1
- package/src/credential/status/v1.0.0/types.ts +17 -16
- package/src/credential/status/v1.3.3/01-status-list.ts +9 -7
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +3 -1
- package/src/credential/status/v1.3.3/03-get-status.ts +6 -4
- package/src/credential/status/v1.3.3/index.ts +3 -2
- package/src/credential/trustmark/api/index.ts +11 -11
- package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +14 -13
- package/src/credential/trustmark/v1.0.0/index.ts +2 -1
- package/src/credential/trustmark/v1.3.3/index.ts +2 -1
- package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +48 -47
- package/src/credentials-catalogue/api/index.ts +14 -12
- package/src/credentials-catalogue/common/get-status-l10n-ids.ts +4 -4
- package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +7 -6
- package/src/credentials-catalogue/v1.0.0/index.ts +2 -1
- package/src/credentials-catalogue/v1.0.0/mappers.ts +2 -3
- package/src/credentials-catalogue/v1.0.0/types.ts +32 -31
- package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +14 -14
- package/src/credentials-catalogue/v1.3.3/fetch-translations.ts +4 -3
- package/src/credentials-catalogue/v1.3.3/index.ts +2 -1
- package/src/credentials-catalogue/v1.3.3/mappers.ts +34 -27
- package/src/credentials-catalogue/v1.3.3/types.ts +82 -81
- package/src/credentials-catalogue/v1.3.3/utils.ts +14 -12
- package/src/index.ts +23 -23
- package/src/mdoc/index.ts +26 -11
- package/src/mdoc/utils.ts +6 -4
- package/src/sd-jwt/__test__/types.test.ts +6 -6
- package/src/sd-jwt/__test__/utils.test.ts +2 -2
- package/src/sd-jwt/index.ts +10 -8
- package/src/sd-jwt/types.ts +14 -13
- package/src/sd-jwt/utils.ts +10 -9
- package/src/trust/api/TrustAnchorConfig.ts +3 -2
- package/src/trust/api/index.ts +19 -16
- package/src/trust/common/build-chain.ts +28 -18
- package/src/trust/common/errors.ts +58 -50
- package/src/trust/common/types.ts +22 -21
- package/src/trust/common/utils.ts +65 -64
- package/src/trust/common/verify-chain.ts +140 -138
- package/src/trust/v1.0.0/build-chain.ts +1 -1
- package/src/trust/v1.0.0/entities.ts +18 -16
- package/src/trust/v1.0.0/index.ts +5 -4
- package/src/trust/v1.0.0/mappers.ts +3 -2
- package/src/trust/v1.0.0/types.ts +43 -42
- package/src/trust/v1.0.0/verify-chain.ts +3 -2
- package/src/trust/v1.3.3/entities.ts +6 -4
- package/src/trust/v1.3.3/types.ts +10 -9
- package/src/utils/auth.ts +1 -1
- package/src/utils/callbacks.ts +38 -38
- package/src/utils/credentials.ts +7 -5
- package/src/utils/crypto.ts +36 -36
- package/src/utils/decoder.ts +7 -5
- package/src/utils/dpop.ts +5 -6
- package/src/utils/error-codes.ts +20 -20
- package/src/utils/errors.ts +89 -87
- package/src/utils/integrity.ts +11 -11
- package/src/utils/jwk.ts +4 -4
- package/src/utils/logging.ts +21 -20
- package/src/utils/mappers.ts +14 -11
- package/src/utils/misc.ts +15 -12
- package/src/utils/par.ts +30 -29
- package/src/utils/parser.ts +4 -4
- package/src/utils/pop.ts +4 -5
- package/src/utils/string.ts +2 -2
- package/src/utils/x509.ts +5 -4
- package/src/utils/zod.ts +4 -4
- package/src/wallet-instance/api/index.ts +24 -24
- package/src/wallet-instance/common/wallet-instance.ts +8 -7
- package/src/wallet-instance/v1.0.0/index.ts +5 -4
- package/src/wallet-instance/v1.3.3/index.ts +5 -4
- package/src/wallet-instance-attestation/api/index.ts +18 -17
- package/src/wallet-instance-attestation/api/types.ts +12 -11
- package/src/wallet-instance-attestation/common/types.ts +7 -6
- package/src/wallet-instance-attestation/v1.0.0/index.ts +3 -2
- package/src/wallet-instance-attestation/v1.0.0/issuing.ts +22 -20
- package/src/wallet-instance-attestation/v1.0.0/mappers.ts +2 -2
- package/src/wallet-instance-attestation/v1.0.0/types.ts +10 -9
- package/src/wallet-instance-attestation/v1.0.0/utils.ts +3 -2
- package/src/wallet-instance-attestation/v1.3.3/index.ts +4 -3
- package/src/wallet-instance-attestation/v1.3.3/issuing.ts +25 -23
- package/src/wallet-instance-attestation/v1.3.3/types.ts +3 -2
- package/src/wallet-instance-attestation/v1.3.3/utils.ts +3 -2
- package/src/wallet-unit-attestation/api/index.ts +23 -23
- package/src/wallet-unit-attestation/api/types.ts +11 -10
- package/src/wallet-unit-attestation/v1.3.3/index.ts +6 -5
- package/src/wallet-unit-attestation/v1.3.3/issuing.ts +42 -34
- package/src/wallet-unit-attestation/v1.3.3/types.ts +3 -2
- package/src/wallet-unit-attestation/v1.3.3/utils.ts +1 -0
|
@@ -8,11 +8,11 @@ export const PresentationParams = z.object({
|
|
|
8
8
|
});
|
|
9
9
|
export const WalletMetadata = z.object({
|
|
10
10
|
authorization_endpoint: z.string().url(),
|
|
11
|
-
client_id_schemes_supported: z.array(z.string()).optional(),
|
|
12
11
|
client_id_prefixes_supported: z.array(z.string()).optional(),
|
|
13
|
-
|
|
14
|
-
response_modes_supported: z.array(z.string()).optional(),
|
|
12
|
+
client_id_schemes_supported: z.array(z.string()).optional(),
|
|
15
13
|
request_object_signing_alg_values_supported: z.array(z.string()).optional(),
|
|
14
|
+
response_modes_supported: z.array(z.string()).optional(),
|
|
15
|
+
response_types_supported: z.array(z.string()).optional(),
|
|
16
16
|
vp_formats_supported: z.record(z.string(), z.object({
|
|
17
17
|
"sd-jwt_alg_values": z.array(z.string()).optional() // alg_values_supported?
|
|
18
18
|
}))
|
|
@@ -37,28 +37,28 @@ export const RequestObjectWalletCapabilities = z.object({
|
|
|
37
37
|
export const ErrorResponse = z.enum(["invalid_request_object", "invalid_request_uri", "vp_formats_not_supported", "invalid_request", "access_denied", "invalid_client"]);
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* A
|
|
41
|
-
* Used with DCQL queries
|
|
40
|
+
* A pair that associate a key tag with a credential, used in DCQL queries
|
|
42
41
|
*/
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
|
-
*
|
|
44
|
+
* A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
|
|
46
45
|
*/
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
|
-
*
|
|
48
|
+
* An object that defines claims to disclose. Nested claims must use a nested structure.
|
|
49
|
+
* @example { name: true, address: { country: true } }
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* A
|
|
53
|
+
* A object that associate the information needed to multiple remote presentation
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* A object that associate the information needed to multiple remote presentation
|
|
58
|
+
* Used with DCQL queries
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Common Request Object type, decoupled from specific IT-Wallet versions
|
|
63
63
|
*/
|
|
64
64
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["z","PresentationParams","object","client_id","string","nonempty","request","optional","request_uri","url","request_uri_method","enum","state","WalletMetadata","authorization_endpoint","
|
|
1
|
+
{"version":3,"names":["z","PresentationParams","object","client_id","string","nonempty","request","optional","request_uri","url","request_uri_method","enum","state","WalletMetadata","authorization_endpoint","client_id_prefixes_supported","array","client_id_schemes_supported","request_object_signing_alg_values_supported","response_modes_supported","response_types_supported","vp_formats_supported","record","RequestObjectWalletCapabilities","wallet_metadata","wallet_nonce","ErrorResponse"],"sourceRoot":"../../../../../src","sources":["credential/presentation/api/types.ts"],"mappings":"AAIA,OAAO,KAAKA,CAAC,MAAM,KAAK;AAKxB,OAAO,MAAMC,kBAAkB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACzCC,SAAS,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAChCC,OAAO,EAAEN,CAAC,CAACI,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAC9BC,WAAW,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC,CAACK,GAAG,CAAC,CAAC,CAACF,QAAQ,CAAC,CAAC;EACxCG,kBAAkB,EAAEV,CAAC,CAACW,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAACJ,QAAQ,CAAC,CAAC;EACtDK,KAAK,EAAEZ,CAAC,CAACI,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAGF,OAAO,MAAMM,cAAc,GAAGb,CAAC,CAACE,MAAM,CAAC;EACrCY,sBAAsB,EAAEd,CAAC,CAACI,MAAM,CAAC,CAAC,CAACK,GAAG,CAAC,CAAC;EACxCM,4BAA4B,EAAEf,CAAC,CAACgB,KAAK,CAAChB,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAC5DU,2B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
1
|
import { IoWalletError, serializeAttrs } from "../../../utils/errors";
|
|
2
2
|
export { DcqlError } from "dcql";
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* An error subclass thrown when auth request decode fail
|
|
6
5
|
*
|
|
7
6
|
*/
|
|
8
7
|
export class AuthRequestDecodeError extends IoWalletError {
|
|
9
|
-
code = "ERR_IO_WALLET_AUTHENTICATION_REQUEST_DECODE_FAILED";
|
|
10
|
-
|
|
11
8
|
/** The Claim for which the validation failed. */
|
|
12
9
|
|
|
10
|
+
code = "ERR_IO_WALLET_AUTHENTICATION_REQUEST_DECODE_FAILED";
|
|
11
|
+
|
|
13
12
|
/** Reason code for the validation failure. */
|
|
14
13
|
|
|
15
14
|
constructor(message) {
|
|
16
15
|
let claim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
|
|
17
16
|
let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
|
|
18
17
|
super(serializeAttrs({
|
|
19
|
-
message,
|
|
20
18
|
claim,
|
|
19
|
+
message,
|
|
21
20
|
reason
|
|
22
21
|
}));
|
|
23
22
|
this.claim = claim;
|
|
@@ -26,18 +25,17 @@ export class AuthRequestDecodeError extends IoWalletError {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* Error thrown when one or more credentials cannot be found in the wallet
|
|
29
|
+
* and the presentation request cannot be satisfied.
|
|
31
30
|
*/
|
|
32
|
-
export class
|
|
33
|
-
code = "
|
|
34
|
-
|
|
31
|
+
export class CredentialsNotFoundError extends IoWalletError {
|
|
32
|
+
code = "ERR_CREDENTIALS_NOT_FOUND";
|
|
35
33
|
/**
|
|
36
|
-
* @param
|
|
34
|
+
* @param details The details of the credentials that could not be found.
|
|
37
35
|
*/
|
|
38
|
-
constructor(
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
constructor(details) {
|
|
37
|
+
super("One or more credentials cannot be found in the wallet");
|
|
38
|
+
this.details = details;
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -86,18 +84,20 @@ export class MissingDataError extends IoWalletError {
|
|
|
86
84
|
super(message);
|
|
87
85
|
}
|
|
88
86
|
}
|
|
87
|
+
|
|
89
88
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
89
|
+
* When selecting a public key from an entity configuration, and no one meets the requirements for the scenario
|
|
90
|
+
*
|
|
92
91
|
*/
|
|
93
|
-
export class
|
|
94
|
-
code = "
|
|
92
|
+
export class NoSuitableKeysFoundInEntityConfiguration extends IoWalletError {
|
|
93
|
+
code = "ERR_NO_SUITABLE_KEYS_NOT_FOUND";
|
|
94
|
+
|
|
95
95
|
/**
|
|
96
|
-
* @param
|
|
96
|
+
* @param scenario describe the scenario in which the error arise
|
|
97
97
|
*/
|
|
98
|
-
constructor(
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
constructor(scenario) {
|
|
99
|
+
const message = `Entity configuration do not provide any suitable keys (${scenario}).`;
|
|
100
|
+
super(message);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IoWalletError","serializeAttrs","DcqlError","AuthRequestDecodeError","code","constructor","message","claim","arguments","length","undefined","reason","
|
|
1
|
+
{"version":3,"names":["IoWalletError","serializeAttrs","DcqlError","AuthRequestDecodeError","code","constructor","message","claim","arguments","length","undefined","reason","CredentialsNotFoundError","details","InvalidQRCodeError","InvalidRequestObjectError","MissingDataError","missingAttributes","NoSuitableKeysFoundInEntityConfiguration","scenario"],"sourceRoot":"../../../../../src","sources":["credential/presentation/common/errors.ts"],"mappings":"AAEA,SAASA,aAAa,EAAEC,cAAc,QAAQ,uBAAuB;AACrE,SAASC,SAAS,QAAQ,MAAM;AAWhC;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASH,aAAa,CAAC;EACxD;;EAGAI,IAA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,SAAShB,aAAa,CAAC;EAClDI,IAAI,GAAG,kBAAkB;;EAEzB;AACF;AACA;EACEC,WAAWA,CAACY,iBAAyB,EAAE;IACrC,MAAMX,OAAO,GAAI,kCAAiCW,iBAAkB,GAAE;IACtE,KAAK,CAACX,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMY,wCAAwC,SAASlB,aAAa,CAAC;EAC1EI,IAAI,GAAG,gCAAgC;;EAEvC;AACF;AACA;EACEC,WAAWA,CAACc,QAAgB,EAAE;IAC5B,MAAMb,OAAO,GAAI,0DAAyDa,QAAS,IAAG;IACtF,KAAK,CAACb,OAAO,CAAC;EAChB;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isObject } from "../../../../utils/object";
|
|
2
|
-
import { IoWalletError } from "../../../../utils/errors";
|
|
3
1
|
import { LEGACY_SD_JWT } from "../../../../sd-jwt/types";
|
|
2
|
+
import { IoWalletError } from "../../../../utils/errors";
|
|
3
|
+
import { isObject } from "../../../../utils/object";
|
|
4
4
|
/**
|
|
5
5
|
* Extract only successful matches from the DCQL query result.
|
|
6
6
|
*/
|
|
@@ -20,40 +20,38 @@ const getDcqlQueryFailedMatches = result => Object.entries(result.credential_mat
|
|
|
20
20
|
/**
|
|
21
21
|
* Extract details related to failed credentials
|
|
22
22
|
*/
|
|
23
|
-
export const extractFailedCredentialsDetails = queryResult => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return Object.values(c.meta.issues).flat();
|
|
31
|
-
}
|
|
32
|
-
if (c.claims.failed_claim_sets) {
|
|
33
|
-
return c.claims.failed_claim_sets.flatMap(cs => Object.values(cs.issues).flat());
|
|
34
|
-
}
|
|
35
|
-
return [];
|
|
36
|
-
});
|
|
37
|
-
if ((credential === null || credential === void 0 ? void 0 : credential.format) === "mso_mdoc") {
|
|
38
|
-
var _credential$meta;
|
|
39
|
-
return {
|
|
40
|
-
id,
|
|
41
|
-
issues,
|
|
42
|
-
format: credential.format,
|
|
43
|
-
doctypeValue: (_credential$meta = credential.meta) === null || _credential$meta === void 0 ? void 0 : _credential$meta.doctype_value
|
|
44
|
-
};
|
|
23
|
+
export const extractFailedCredentialsDetails = queryResult => getDcqlQueryFailedMatches(queryResult).map(_ref3 => {
|
|
24
|
+
var _match$failed_credent;
|
|
25
|
+
let [id, match] = _ref3;
|
|
26
|
+
const credential = queryResult.credentials.find(c => c.id === id);
|
|
27
|
+
const issues = (_match$failed_credent = match.failed_credentials) === null || _match$failed_credent === void 0 ? void 0 : _match$failed_credent.flatMap(c => {
|
|
28
|
+
if ("issues" in c.meta) {
|
|
29
|
+
return Object.values(c.meta.issues).flat();
|
|
45
30
|
}
|
|
46
|
-
if (
|
|
47
|
-
return
|
|
48
|
-
id,
|
|
49
|
-
issues,
|
|
50
|
-
format: credential.format,
|
|
51
|
-
vctValues: credential.meta && "vct_values" in credential.meta ? credential.meta.vct_values : []
|
|
52
|
-
};
|
|
31
|
+
if (c.claims.failed_claim_sets) {
|
|
32
|
+
return c.claims.failed_claim_sets.flatMap(cs => Object.values(cs.issues).flat());
|
|
53
33
|
}
|
|
54
|
-
|
|
34
|
+
return [];
|
|
55
35
|
});
|
|
56
|
-
|
|
36
|
+
if ((credential === null || credential === void 0 ? void 0 : credential.format) === "mso_mdoc") {
|
|
37
|
+
var _credential$meta;
|
|
38
|
+
return {
|
|
39
|
+
doctypeValue: (_credential$meta = credential.meta) === null || _credential$meta === void 0 ? void 0 : _credential$meta.doctype_value,
|
|
40
|
+
format: credential.format,
|
|
41
|
+
id,
|
|
42
|
+
issues
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if ((credential === null || credential === void 0 ? void 0 : credential.format) === "dc+sd-jwt" || (credential === null || credential === void 0 ? void 0 : credential.format) === LEGACY_SD_JWT) {
|
|
46
|
+
return {
|
|
47
|
+
format: credential.format,
|
|
48
|
+
id,
|
|
49
|
+
issues,
|
|
50
|
+
vctValues: credential.meta && "vct_values" in credential.meta ? credential.meta.vct_values : []
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
throw new IoWalletError(`Unsupported format: ${credential === null || credential === void 0 ? void 0 : credential.format}`);
|
|
54
|
+
});
|
|
57
55
|
|
|
58
56
|
/**
|
|
59
57
|
* Extract a compact list of claims from the `dcql` result.
|
|
@@ -120,7 +118,12 @@ export const getPresentationFrameFromDcqlMatch = (match, originalQuery) => {
|
|
|
120
118
|
|
|
121
119
|
// Build a presentation frame from each claim's path
|
|
122
120
|
return getValidDcqlClaims(match).reduce((acc, c) => {
|
|
123
|
-
|
|
121
|
+
var _typedQueryClaims$c$c;
|
|
122
|
+
const path = (_typedQueryClaims$c$c = typedQueryClaims[c.claim_index]) === null || _typedQueryClaims$c$c === void 0 ? void 0 : _typedQueryClaims$c$c.path;
|
|
123
|
+
if (!path) {
|
|
124
|
+
throw new Error(`Claim at index ${c.claim_index} does not have a path in the original query.`);
|
|
125
|
+
}
|
|
126
|
+
const pf = pathToPresentationFrame(path, c.output);
|
|
124
127
|
// Merge objects with the same key to not lose objects that are already in the accumulator
|
|
125
128
|
for (const [key, value] of Object.entries(pf)) {
|
|
126
129
|
acc[key] = isObject(value) ? Object.assign(value, acc[key]) : value;
|
|
@@ -145,7 +148,7 @@ export const getValidDcqlClaims = match => {
|
|
|
145
148
|
// We select claims in the order they are defined in the set
|
|
146
149
|
if (validClaimSet) {
|
|
147
150
|
var _validClaimSet$valid_;
|
|
148
|
-
return ((_validClaimSet$valid_ = validClaimSet.valid_claim_indexes) === null || _validClaimSet$valid_ === void 0 ? void 0 : _validClaimSet$valid_.map(i => validClaims.find(c => c.claim_index === i))) ?? [];
|
|
151
|
+
return ((_validClaimSet$valid_ = validClaimSet.valid_claim_indexes) === null || _validClaimSet$valid_ === void 0 ? void 0 : _validClaimSet$valid_.map(i => validClaims.find(c => c.claim_index === i)).filter(c => c != null)) ?? [];
|
|
149
152
|
}
|
|
150
153
|
return validClaims;
|
|
151
154
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["LEGACY_SD_JWT","IoWalletError","isObject","getDcqlQueryMatches","result","Object","entries","credential_matches","filter","_ref","match","success","getDcqlQueryFailedMatches","_ref2","extractFailedCredentialsDetails","queryResult","map","_ref3","_match$failed_credent","id","credential","credentials","find","c","issues","failed_credentials","flatMap","meta","values","flat","claims","failed_claim_sets","cs","format","_credential$meta","doctypeValue","doctype_value","vctValues","vct_values","getClaimsFromDcqlMatch","getValidDcqlClaims","output","_ref4","name","value","pathToPresentationFrame","path","claim","segment","rest","undefined","maybeArrayClaim","Array","isArray","reduce","acc","i","getPresentationFrameFromDcqlMatch","originalQuery","_originalQuery$creden","queryClaims","_ref5","credential_query_id","length","typedQueryClaims","_typedQueryClaims$c$c","claim_index","Error","pf","key","assign","_match$valid_credenti","_match$valid_credenti2","validClaims","valid_credentials","valid_claims","validClaimSet","valid_claim_sets","_validClaimSet$valid_","valid_claim_indexes"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/dcql.ts"],"mappings":"AAKA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAASC,QAAQ,QAAQ,0BAA0B;AAYnD;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAIC,MAAuB,IACzDC,MAAM,CAACC,OAAO,CAACF,MAAM,CAACG,kBAAkB,CAAC,CAACC,MAAM,CAC9CC,IAAA;EAAA,IAAC,GAAGC,KAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,OAAO,KAAK,IAAI;AAAA,CACvC,CAAiC;;AAEnC;AACA;AACA;AACA,MAAMC,yBAAyB,GAAIR,MAAuB,IACxDC,MAAM,CAACC,OAAO,CAACF,MAAM,CAACG,kBAAkB,CAAC,CAACC,MAAM,CAC9CK,KAAA;EAAA,IAAC,GAAGH,KAAK,CAAC,GAA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,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAAC2C,WAAW,KAAKV,CAAC,CAAC,CAAC,CACzDhD,MAAM,CAAEe,CAAC,IAAiCA,CAAC,IAAI,IAAI,CAAC,KAAI,EAAE;EAEjE;EAEA,OAAOkD,WAAW;AACpB,CAAC"}
|
|
@@ -7,32 +7,30 @@ import { getValidDcqlClaims } from "./dcql";
|
|
|
7
7
|
* @param credentials The raw mdoc credentials
|
|
8
8
|
* @returns List of `dcql` compatible objects
|
|
9
9
|
*/
|
|
10
|
-
export const mapCredentialsToObj = async credentialsMdoc => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
let [, el] = _ref2;
|
|
17
|
-
return {
|
|
18
|
-
...ac,
|
|
19
|
-
[el.elementIdentifier]: el.elementValue
|
|
20
|
-
};
|
|
21
|
-
}, {});
|
|
10
|
+
export const mapCredentialsToObj = async credentialsMdoc => await Promise.all(credentialsMdoc.map(async credential => {
|
|
11
|
+
const issuerSigned = await CBOR.decodeIssuerSigned(b64utob64(credential[1]));
|
|
12
|
+
const namespaces = Object.entries(issuerSigned.nameSpaces).reduce((acc, _ref) => {
|
|
13
|
+
let [ns, nsClaims] = _ref;
|
|
14
|
+
const flattenNsClaims = Object.entries(nsClaims).reduce((ac, _ref2) => {
|
|
15
|
+
let [, el] = _ref2;
|
|
22
16
|
return {
|
|
23
|
-
...
|
|
24
|
-
[
|
|
17
|
+
...ac,
|
|
18
|
+
[el.elementIdentifier]: el.elementValue
|
|
25
19
|
};
|
|
26
20
|
}, {});
|
|
27
21
|
return {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
cryptographic_holder_binding: true,
|
|
31
|
-
namespaces,
|
|
32
|
-
original_credential: credential
|
|
22
|
+
...acc,
|
|
23
|
+
[ns]: flattenNsClaims
|
|
33
24
|
};
|
|
34
|
-
})
|
|
35
|
-
|
|
25
|
+
}, {});
|
|
26
|
+
return {
|
|
27
|
+
credential_format: "mso_mdoc",
|
|
28
|
+
cryptographic_holder_binding: true,
|
|
29
|
+
doctype: issuerSigned.issuerAuth.payload.docType || "missing_doctype",
|
|
30
|
+
namespaces,
|
|
31
|
+
original_credential: credential
|
|
32
|
+
};
|
|
33
|
+
}));
|
|
36
34
|
|
|
37
35
|
/**
|
|
38
36
|
* Extract a compact list of claims from the `dcql` result.
|
|
@@ -46,8 +44,8 @@ export const getClaimsFromDcqlMatch = match => getValidDcqlClaims(match).flatMap
|
|
|
46
44
|
return Object.entries(output).flatMap(_ref4 => {
|
|
47
45
|
let [ns, nsClaims] = _ref4;
|
|
48
46
|
return Object.keys(nsClaims).map(claimName => ({
|
|
49
|
-
namespace: ns,
|
|
50
47
|
name: claimName,
|
|
48
|
+
namespace: ns,
|
|
51
49
|
value: nsClaims[claimName]
|
|
52
50
|
}));
|
|
53
51
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CBOR","b64utob64","getValidDcqlClaims","mapCredentialsToObj","credentialsMdoc","Promise","all","map","credential","issuerSigned","decodeIssuerSigned","namespaces","Object","entries","nameSpaces","reduce","acc","_ref","ns","nsClaims","flattenNsClaims","ac","_ref2","el","elementIdentifier","elementValue","credential_format","doctype","issuerAuth","payload","docType","
|
|
1
|
+
{"version":3,"names":["CBOR","b64utob64","getValidDcqlClaims","mapCredentialsToObj","credentialsMdoc","Promise","all","map","credential","issuerSigned","decodeIssuerSigned","namespaces","Object","entries","nameSpaces","reduce","acc","_ref","ns","nsClaims","flattenNsClaims","ac","_ref2","el","elementIdentifier","elementValue","credential_format","cryptographic_holder_binding","doctype","issuerAuth","payload","docType","original_credential","getClaimsFromDcqlMatch","match","flatMap","_ref3","output","_ref4","keys","claimName","name","namespace","value","getPresentationFrameFromClaims","requestedClaims","_ref5","existingNamespace"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/mdoc.ts"],"mappings":"AAEA,SAASA,IAAI,QAAQ,kCAAkC;AACvD,SAASC,SAAS,QAAQ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AEC;EAAO,CAAC,GAAAD,KAAA;EAAA,OAC3CxB,MAAM,CAACC,OAAO,CAACwB,MAAM,CAAC,CAACF,OAAO,CAACG,KAAA;IAAA,IAAC,CAACpB,EAAE,EAAEC,QAAQ,CAAC,GAAAmB,KAAA;IAAA,OAC5C1B,MAAM,CAAC2B,IAAI,CAACpB,QAAQ,CAAC,CAACZ,GAAG,CAAEiC,SAAS,KAAM;MACxCC,IAAI,EAAED,SAAS;MACfE,SAAS,EAAExB,EAAE;MACbyB,KAAK,EAAExB,QAAQ,CAACqB,SAAS;IAC3B,CAAC,CAAC,CAAC;EAAA,CACL,CAAC;AAAA,CACH,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,8BAA8B,GAAGA,CAC5CC,eAAsC,EACtCd,OAAe,MACQ;EACvB,CAACA,OAAO,GAAGc,eAAe,CAAC9B,MAAM,CAAC,CAACC,GAAG,EAAA8B,KAAA,KAA0B;IAAA,IAAxB;MAAEL,IAAI;MAAEC;IAAU,CAAC,GAAAI,KAAA;IACzD,IAAIJ,SAAS,EAAE;MACb1B,GAAG,CAAC0B,SAAS,CAAC,KAAK,CAAC,CAAC;MACrB,MAAMK,iBAAiB,GAAG/B,GAAG,CAAC0B,SAAS,CAA4B;MACnEK,iBAAiB,CAACN,IAAI,CAAC,GAAG,IAAI;IAChC,CAAC,MAAM;MACLzB,GAAG,CAACyB,IAAI,CAAC,GAAG,IAAI;IAClB;IACA,OAAOzB,GAAG;EACZ,CAAC,EAAE,CAAC,CAAsB;AAC5B,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SDJwtInstance } from "@sd-jwt/core";
|
|
2
|
-
import { getClaims } from "@sd-jwt/decode";
|
|
3
2
|
import { digest } from "@sd-jwt/crypto-nodejs";
|
|
4
|
-
import {
|
|
3
|
+
import { getClaims } from "@sd-jwt/decode";
|
|
5
4
|
import { LEGACY_SD_JWT } from "../../../../sd-jwt/types";
|
|
6
5
|
import { fixLegacyCredentialSdJwt } from "../../../../utils/credentials";
|
|
6
|
+
import { IoWalletError } from "../../../../utils/errors";
|
|
7
7
|
/**
|
|
8
8
|
* List of claims to remove from the SD-JWT before evaluating the DCQL query.
|
|
9
9
|
*/
|
|
@@ -18,10 +18,10 @@ const getClaimsFromDecodedSdJwt = async decodedRawSdJwt => {
|
|
|
18
18
|
throw new IoWalletError("Can't decode SD-JWT");
|
|
19
19
|
}
|
|
20
20
|
const claims = await getClaims(decodedRawSdJwt.jwt.payload, decodedRawSdJwt.disclosures ?? [], digest);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
return Object.fromEntries(Object.entries(claims).filter(_ref => {
|
|
22
|
+
let [key] = _ref;
|
|
23
|
+
return !NON_DISCLOSABLE_CLAIMS.includes(key);
|
|
24
|
+
}));
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -39,11 +39,11 @@ export const mapCredentialsToObj = async credentials => {
|
|
|
39
39
|
const decodedRawSdJwt = await sdJwt.decode(fixLegacyCredentialSdJwt(credential[1]));
|
|
40
40
|
const claims = await getClaimsFromDecodedSdJwt(decodedRawSdJwt);
|
|
41
41
|
return {
|
|
42
|
-
vct: (_decodedRawSdJwt$jwt2 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt2 === void 0 || (_decodedRawSdJwt$jwt2 = _decodedRawSdJwt$jwt2.payload) === null || _decodedRawSdJwt$jwt2 === void 0 ? void 0 : _decodedRawSdJwt$jwt2.vct,
|
|
43
|
-
credential_format: ((_decodedRawSdJwt$jwt3 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt3 === void 0 || (_decodedRawSdJwt$jwt3 = _decodedRawSdJwt$jwt3.header) === null || _decodedRawSdJwt$jwt3 === void 0 ? void 0 : _decodedRawSdJwt$jwt3.typ) === LEGACY_SD_JWT ? LEGACY_SD_JWT : "dc+sd-jwt",
|
|
44
|
-
cryptographic_holder_binding: true,
|
|
45
42
|
claims,
|
|
46
|
-
|
|
43
|
+
credential_format: ((_decodedRawSdJwt$jwt2 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt2 === void 0 || (_decodedRawSdJwt$jwt2 = _decodedRawSdJwt$jwt2.header) === null || _decodedRawSdJwt$jwt2 === void 0 ? void 0 : _decodedRawSdJwt$jwt2.typ) === LEGACY_SD_JWT ? LEGACY_SD_JWT : "dc+sd-jwt",
|
|
44
|
+
cryptographic_holder_binding: true,
|
|
45
|
+
original_credential: credential,
|
|
46
|
+
vct: (_decodedRawSdJwt$jwt3 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt3 === void 0 || (_decodedRawSdJwt$jwt3 = _decodedRawSdJwt$jwt3.payload) === null || _decodedRawSdJwt$jwt3 === void 0 ? void 0 : _decodedRawSdJwt$jwt3.vct
|
|
47
47
|
};
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SDJwtInstance","
|
|
1
|
+
{"version":3,"names":["SDJwtInstance","digest","getClaims","LEGACY_SD_JWT","fixLegacyCredentialSdJwt","IoWalletError","NON_DISCLOSABLE_CLAIMS","getClaimsFromDecodedSdJwt","decodedRawSdJwt","_decodedRawSdJwt$jwt","jwt","payload","claims","disclosures","Object","fromEntries","entries","filter","_ref","key","includes","mapCredentialsToObj","credentials","sdJwt","hasher","Promise","all","map","credential","_decodedRawSdJwt$jwt2","_decodedRawSdJwt$jwt3","decode","credential_format","header","typ","cryptographic_holder_binding","original_credential","vct"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/sd-jwt.ts"],"mappings":"AAEA,SAAqBA,aAAa,QAAQ,cAAc;AACxD,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,SAAS,QAAQ,gBAAgB;AAI1C,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,SAASC,aAAa,QAAQ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eAAe,CAACE,GAAG,cAAAmB,qBAAA,gBAAAA,qBAAA,GAAnBA,qBAAA,CAAqBI,MAAM,cAAAJ,qBAAA,uBAA3BA,qBAAA,CAA6BK,GAAG,MAAK/B,aAAa,GAC9CA,aAAa,GACb,WAAW;MACjBgC,4BAA4B,EAAE,IAAI;MAClCC,mBAAmB,EAAER,UAAU;MAC/BS,GAAG,GAAAP,qBAAA,GAAEtB,eAAe,CAACE,GAAG,cAAAoB,qBAAA,gBAAAA,qBAAA,GAAnBA,qBAAA,CAAqBnB,OAAO,cAAAmB,qBAAA,uBAA5BA,qBAAA,CAA8BO;IACrC,CAAC;EACH,CAAC,CACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvalidQRCodeError } from "../common/errors";
|
|
2
1
|
import { PresentationParams } from "../api/types";
|
|
2
|
+
import { InvalidQRCodeError } from "../common/errors";
|
|
3
3
|
export const startFlowFromQR = params => {
|
|
4
4
|
const result = PresentationParams.safeParse({
|
|
5
5
|
...params,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["PresentationParams","InvalidQRCodeError","startFlowFromQR","params","result","safeParse","request_uri_method","success","error","message","data","request_uri"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/01-start-flow.ts"],"mappings":"AAEA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,SAASC,kBAAkB,QAAQ,kBAAkB;AAErD,OAAO,MAAMC,eAAyD,GACpEC,MAAM,IACH;EACH,MAAMC,MAAM,GAAGJ,kBAAkB,CAACK,SAAS,CAAC;IAC1C,GAAGF,MAAM;IACTG,kBAAkB,EAAEH,MAAM,CAACG,kBAAkB,IAAI;EACnD,CAAC,CAAC;EAEF,IAAI,CAACF,MAAM,CAACG,OAAO,EAAE,MAAM,IAAIN,kBAAkB,CAACG,MAAM,CAACI,KAAK,CAACC,OAAO,CAAC;EAEvE,IAAI,CAACL,MAAM,CAACM,IAAI,CAACC,WAAW,EAAE;IAC5B,MAAM,IAAIV,kBAAkB,CAC1B,+DACF,CAAC;EACH;EAEA,OAAOG,MAAM,CAACM,IAAI;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRelyingPartyEntityConfiguration","mapToRelyingPartyConfig","evaluateRelyingPartyTrust","rpUrl","appFetch","fetch","arguments","length","undefined","rpEntityConfiguration","rpConf"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/02-evaluate-rp-trust.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getRelyingPartyEntityConfiguration","mapToRelyingPartyConfig","evaluateRelyingPartyTrust","rpUrl","appFetch","fetch","arguments","length","undefined","rpEntityConfiguration","rpConf"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/02-evaluate-rp-trust.ts"],"mappings":"AAEA,SAASA,kCAAkC,QAAQ,gCAAgC;AACnF,SAASC,uBAAuB,QAAQ,WAAW;AAEnD,OAAO,MAAMC,yBAA6E,GACxF,eAAAA,CAAOC,KAAK,EAAgC;EAAA,IAA9B;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACrC,MAAMG,qBAAqB,GAAG,MAAMT,kCAAkC,CACpEG,KAAK,EACL;IAAEC;EAAS,CACb,CAAC;EACD,OAAO;IACLM,MAAM,EAAET,uBAAuB,CAACQ,qBAAqB;EACvD,CAAC;AACH,CAAC"}
|
|
@@ -31,11 +31,11 @@ export const getRequestObject = async function (authorizationRequestUrl) {
|
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
const requestObjectEncodedJwt = await appFetch(requestUri, {
|
|
34
|
-
|
|
34
|
+
body: formUrlEncodedBody.toString(),
|
|
35
35
|
headers: {
|
|
36
36
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
method: "POST"
|
|
39
39
|
}).then(hasStatusOrThrow(200, RelyingPartyResponseError)).then(res => res.text());
|
|
40
40
|
return {
|
|
41
41
|
requestObjectEncodedJwt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RelyingPartyResponseError","hasStatusOrThrow","RequestObjectWalletCapabilities","InvalidQRCodeError","getRequestObject","authorizationRequestUrl","appFetch","fetch","walletCapabilities","arguments","length","undefined","authorizationUrl","URL","requestUri","searchParams","get","wallet_metadata","wallet_nonce","parse","formUrlEncodedBody","URLSearchParams","JSON","stringify","requestObjectEncodedJwt","
|
|
1
|
+
{"version":3,"names":["RelyingPartyResponseError","hasStatusOrThrow","RequestObjectWalletCapabilities","InvalidQRCodeError","getRequestObject","authorizationRequestUrl","appFetch","fetch","walletCapabilities","arguments","length","undefined","authorizationUrl","URL","requestUri","searchParams","get","wallet_metadata","wallet_nonce","parse","formUrlEncodedBody","URLSearchParams","JSON","stringify","requestObjectEncodedJwt","body","toString","headers","method","then","res","text"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/03-get-request-object.ts"],"mappings":"AAEA,SAASA,yBAAyB,QAAQ,uBAAuB;AACjE,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,+BAA+B,QAAQ,cAAc;AAC9D,SAASC,kBAAkB,QAAQ,kBAAkB;AAErD,OAAO,MAAMC,gBAA2D,GACtE,eAAAA,CACEC,uBAAuB,EAEpB;EAAA,IADH;IAAEC,QAAQ,GAAGC,KAAK;IAAEC;EAAmB,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE7C,MAAMG,gBAAgB,GAAG,IAAIC,GAAG,CAACR,uBAAuB,CAAC;;EAEzD;AACJ;AACA;AACA;AACA;EACI,MAAMS,UAAU,GACdF,gBAAgB,CAACG,YAAY,CAACC,GAAG,CAAC,aAAa,CAAC,IAAIL,SAAS;EAC/D,IAAI,CAACG,UAAU,EAAE;IACf,MAAM,IAAIX,kBAAkB,CAC1B,8DACF,CAAC;EACH;EAEA,IAAIK,kBAAkB,EAAE;IACtB;IACA,MAAM;MAAES,eAAe;MAAEC;IAAa,CAAC,GACrChB,+BAA+B,CAACiB,KAAK,CAACX,kBAAkB,CAAC;IAE3D,MAAMY,kBAAkB,GAAG,IAAIC,eAAe,CAAC;MAC7CJ,eAAe,EAAEK,IAAI,CAACC,SAAS,CAACN,eAAe,CAAC;MAChD,IAAIC,YAAY,IAAI;QAAEA;MAAa,CAAC;IACtC,CAAC,CAAC;IAEF,MAAMM,uBAAuB,GAAG,MAAMlB,QAAQ,CAACQ,UAAU,EAAE;MACzDW,IAAI,EAAEL,kBAAkB,CAACM,QAAQ,CAAC,CAAC;MACnCC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,MAAM,EAAE;IACV,CAAC,CAAC,CACCC,IAAI,CAAC5B,gBAAgB,CAAC,GAAG,EAAED,yBAAyB,CAAC,CAAC,CACtD6B,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC;IAE5B,OAAO;MACLP;IACF,CAAC;EACH;EAEA,MAAMA,uBAAuB,GAAG,MAAMlB,QAAQ,CAACQ,UAAU,EAAE;IACzDc,MAAM,EAAE;EACV,CAAC,CAAC,CACCC,IAAI,CAAC5B,gBAAgB,CAAC,GAAG,EAAED,yBAAyB,CAAC,CAAC,CACtD6B,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC;EAE5B,OAAO;IACLP;EACF,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { decode as decodeJwt, verify } from "@pagopa/io-react-native-jwt";
|
|
2
2
|
import { IoWalletError } from "../../../utils/errors";
|
|
3
3
|
import { InvalidRequestObjectError } from "../common/errors";
|
|
4
|
-
import { RawRequestObject } from "./types";
|
|
5
4
|
import { mapToRequestObject } from "./mappers";
|
|
5
|
+
import { RawRequestObject } from "./types";
|
|
6
6
|
import { getJwksFromRpConfig } from "./utils.jwks";
|
|
7
7
|
export const verifyRequestObject = async (requestObjectEncodedJwt, _ref) => {
|
|
8
8
|
let {
|
|
@@ -20,7 +20,7 @@ export const verifyRequestObject = async (requestObjectEncodedJwt, _ref) => {
|
|
|
20
20
|
await verify(requestObjectEncodedJwt, pubKey, {
|
|
21
21
|
issuer: clientId
|
|
22
22
|
});
|
|
23
|
-
} catch
|
|
23
|
+
} catch {
|
|
24
24
|
throw new InvalidRequestObjectError("The Request Object signature verification failed");
|
|
25
25
|
}
|
|
26
26
|
const rawRequestObject = validateRequestObjectShape({
|
|
@@ -70,7 +70,7 @@ const getSigPublicKey = (rpConf, kid) => {
|
|
|
70
70
|
const pubKey = keys.find(k => k.kid === kid);
|
|
71
71
|
if (!pubKey) throw new Error();
|
|
72
72
|
return pubKey;
|
|
73
|
-
} catch
|
|
73
|
+
} catch {
|
|
74
74
|
throw new InvalidRequestObjectError(`The public key for signature verification (${kid}) cannot be found in the Entity Configuration`);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["decode","decodeJwt","verify","IoWalletError","InvalidRequestObjectError","
|
|
1
|
+
{"version":3,"names":["decode","decodeJwt","verify","IoWalletError","InvalidRequestObjectError","mapToRequestObject","RawRequestObject","getJwksFromRpConfig","verifyRequestObject","requestObjectEncodedJwt","_ref","clientId","rpConf","state","requestObjectJwt","pubKey","getSigPublicKey","protectedHeader","kid","issuer","rawRequestObject","validateRequestObjectShape","header","payload","isClientIdMatch","client_id","subject","requestObject","requestObjectParse","safeParse","success","data","formatFlattenedZodErrors","error","flatten","keys","find","k","Error","errors","Object","entries","fieldErrors","map","_ref2","key","join"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/05-verify-request-object.ts"],"mappings":"AAAA,SAASA,MAAM,IAAIC,SAAS,EAAEC,MAAM,Q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|
1
|
-
import {
|
|
1
|
+
import { DcqlError, DcqlQuery } from "dcql";
|
|
2
2
|
import { isValiError } from "valibot";
|
|
3
|
+
import { LEGACY_SD_JWT } from "../../../sd-jwt/types";
|
|
4
|
+
import { IoWalletError } from "../../../utils/errors";
|
|
3
5
|
import { CredentialsNotFoundError } from "../common/errors";
|
|
4
|
-
import * as sdJwtUtils from "../common/utils/sd-jwt";
|
|
5
6
|
import { extractFailedCredentialsDetails, getClaimsFromDcqlMatch, getDcqlQueryMatches, getPresentationFrameFromDcqlMatch } from "../common/utils/dcql";
|
|
6
|
-
import
|
|
7
|
+
import * as sdJwtUtils from "../common/utils/sd-jwt";
|
|
7
8
|
export const evaluateDcqlQuery = async (query, credentialsSdJwt) => {
|
|
8
9
|
const credentials = await sdJwtUtils.mapCredentialsToObj(credentialsSdJwt);
|
|
9
10
|
const credentialsByVct = credentials.reduce((acc, c) => {
|
|
@@ -39,22 +40,26 @@ export const evaluateDcqlQuery = async (query, credentialsSdJwt) => {
|
|
|
39
40
|
const {
|
|
40
41
|
vct
|
|
41
42
|
} = matchOutput;
|
|
42
|
-
const
|
|
43
|
+
const cred = credentialsByVct[vct];
|
|
44
|
+
if (!cred) {
|
|
45
|
+
throw new IoWalletError(`Credential with vct ${vct} not found in the provided credentials`);
|
|
46
|
+
}
|
|
47
|
+
const [keyTag, credential] = cred;
|
|
43
48
|
const requiredDisclosures = getClaimsFromDcqlMatch(match);
|
|
44
49
|
const presentationFrame = getPresentationFrameFromDcqlMatch(match, parsedQuery);
|
|
45
50
|
return {
|
|
51
|
+
credential,
|
|
52
|
+
format: matchOutput.credential_format,
|
|
46
53
|
id,
|
|
47
|
-
vct,
|
|
48
54
|
keyTag,
|
|
49
|
-
format: matchOutput.credential_format,
|
|
50
|
-
credential,
|
|
51
|
-
requiredDisclosures,
|
|
52
55
|
presentationFrame,
|
|
53
56
|
// When it is a match but no credential_sets are found, the credential is required by default
|
|
54
57
|
// See https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#section-6.4.2
|
|
55
58
|
purposes: purposes ?? [{
|
|
56
59
|
required: true
|
|
57
|
-
}]
|
|
60
|
+
}],
|
|
61
|
+
requiredDisclosures,
|
|
62
|
+
vct
|
|
58
63
|
};
|
|
59
64
|
}
|
|
60
65
|
throw new Error(`Unsupported credential format: ${matchOutput === null || matchOutput === void 0 ? void 0 : matchOutput.credential_format}`);
|
|
@@ -63,9 +68,9 @@ export const evaluateDcqlQuery = async (query, credentialsSdJwt) => {
|
|
|
63
68
|
// Invalid DCQL query structure. Remap to `DcqlError` for consistency.
|
|
64
69
|
if (isValiError(error)) {
|
|
65
70
|
throw new DcqlError({
|
|
66
|
-
|
|
71
|
+
cause: error.issues,
|
|
67
72
|
code: "PARSE_ERROR",
|
|
68
|
-
|
|
73
|
+
message: "Failed to parse the provided DCQL query"
|
|
69
74
|
});
|
|
70
75
|
}
|
|
71
76
|
|