@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createClientAttestationPopJwt","fetchMrtdPopInit","UnexpectedStatusCodeError","SdkUnexpectedStatusCodeError","
|
|
1
|
+
{"version":3,"names":["createClientAttestationPopJwt","fetchMrtdPopInit","UnexpectedStatusCodeError","SdkUnexpectedStatusCodeError","createSignJwtFromCryptoContext","createVerifyJwtFromJwks","partialCallbacks","IssuerResponseError","IssuerResponseErrorCodes","ResponseErrorBuilder","Logger","LogLevel","createInitChallenge","config","initChallenge","issuerConf","initUrl","mrtd_auth_session","mrtd_pop_jwt_nonce","context","appFetch","fetch","walletInstanceAttestation","wiaCryptoContext","clientAttestationDPoP","authorizationServer","credential_issuer","callbacks","generateRandom","signJwt","clientAttestation","sdkConfig","signer","alg","method","publicJwk","getPublicKey","initResult","verifyJwt","keys","mrtdAuthSession","mrtdPopJwtNonce","popInitEndpoint","walletAttestation","catch","handleInitChallengeError","challenge","mrtd_pop_nonce","mrtdPopNonce","mrz","pop_verify_endpoint","popVerifyEndpoint","e","log","ERROR","handle","code","MrtdChallengeInitRequestFailed","message","buildFrom"],"sourceRoot":"../../../../../src","sources":["credential/issuance/mrtd-pop/02-init-challenge.ts"],"mappings":"AAAA,SACEA,6BAA6B,EAC7BC,gBAAgB,QACX,0BAA0B;AACjC,SAEEC,yBAAyB,IAAIC,4BAA4B,QACpD,yBAAyB;AAIhC,SACEC,8BAA8B,EAC9BC,uBAAuB,EACvBC,gBAAgB,QACX,0BAA0B;AACjC,SACEC,mBAAmB,EACnBC,wBAAwB,EACxBC,oBAAoB,QACf,uBAAuB;AAC9B,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AAMzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CACjCC,MAAc,EACe;EAC7B,OAAO,eAAeC,aAAaA,CACjCC,UAAU,EACVC,OAAO,EACPC,iBAAiB,EACjBC,kBAAkB,EAClBC,OAAO,EACP;IACA,MAAM;MACJC,QAAQ,GAAGC,KAAK;MAChBC,yBAAyB;MACzBC;IACF,CAAC,GAAGJ,OAAO;IAEX,MAAMK,qBAAqB,GAAG,MAAMxB,6BAA6B,CAAC;MAChEyB,mBAAmB,EAAEV,UAAU,C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AAO,EAAE;EACX,CAAC,CAAC,CACDC,SAAS,CAACP,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SignJWT } from "@pagopa/io-react-native-jwt";
|
|
2
2
|
import { createClientAttestationPopJwt, fetchMrtdPopVerify } from "@pagopa/io-wallet-oauth2";
|
|
3
|
-
import { sdkUnexpectedStatusCodeToIssuerError } from "../../../utils/errors";
|
|
4
3
|
import { createSignJwtFromCryptoContext, partialCallbacks } from "../../../utils/callbacks";
|
|
4
|
+
import { sdkUnexpectedStatusCodeToIssuerError } from "../../../utils/errors";
|
|
5
5
|
/**
|
|
6
6
|
* Factory function to create `validateChallenge` for MRTD PoP flow.
|
|
7
7
|
* The factory is needed to inject version specific SDK configuration.
|
|
@@ -18,51 +18,51 @@ export function createValidateChallenge(config) {
|
|
|
18
18
|
const aud = issuerConf.credential_issuer;
|
|
19
19
|
const wiaPublicJwk = await wiaCryptoContext.getPublicKey();
|
|
20
20
|
const clientAttestationDPoP = await createClientAttestationPopJwt({
|
|
21
|
-
|
|
21
|
+
authorizationServer: aud,
|
|
22
22
|
callbacks: {
|
|
23
23
|
generateRandom: partialCallbacks.generateRandom,
|
|
24
24
|
signJwt: createSignJwtFromCryptoContext(wiaCryptoContext)
|
|
25
25
|
},
|
|
26
26
|
clientAttestation: walletInstanceAttestation,
|
|
27
|
-
|
|
27
|
+
config: config.sdkConfig,
|
|
28
28
|
signer: {
|
|
29
|
-
method: "jwk",
|
|
30
29
|
alg: "ES256",
|
|
30
|
+
method: "jwk",
|
|
31
31
|
publicJwk: wiaPublicJwk
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
const mrtdValidationJwt = await new SignJWT(wiaCryptoContext).setProtectedHeader({
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
kid: wiaPublicJwk.kid,
|
|
36
|
+
typ: "mrtd-ias+jwt"
|
|
37
37
|
}).setPayload({
|
|
38
|
-
iss: wiaPublicJwk.kid,
|
|
39
38
|
aud,
|
|
40
39
|
document_type: "cie",
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
ias,
|
|
41
|
+
iss: wiaPublicJwk.kid,
|
|
42
|
+
mrtd
|
|
43
43
|
}).setIssuedAt().setExpirationTime("5m").sign();
|
|
44
44
|
const verifyResult = await fetchMrtdPopVerify({
|
|
45
|
-
popVerifyEndpoint: verifyUrl,
|
|
46
|
-
mrtdAuthSession: mrtd_auth_session,
|
|
47
|
-
mrtdPopNonce: mrtd_pop_nonce,
|
|
48
|
-
clientAttestationDPoP,
|
|
49
|
-
mrtdValidationJwt,
|
|
50
|
-
walletAttestation: walletInstanceAttestation,
|
|
51
45
|
callbacks: {
|
|
52
46
|
fetch: appFetch,
|
|
53
47
|
...partialCallbacks
|
|
54
|
-
}
|
|
48
|
+
},
|
|
49
|
+
clientAttestationDPoP,
|
|
50
|
+
mrtdAuthSession: mrtd_auth_session,
|
|
51
|
+
mrtdPopNonce: mrtd_pop_nonce,
|
|
52
|
+
mrtdValidationJwt,
|
|
53
|
+
popVerifyEndpoint: verifyUrl,
|
|
54
|
+
walletAttestation: walletInstanceAttestation
|
|
55
55
|
}).catch(sdkUnexpectedStatusCodeToIssuerError);
|
|
56
56
|
return {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
mrtd_val_pop_nonce: verifyResult.mrtdValPopNonce,
|
|
58
|
+
redirect_uri: verifyResult.redirectUri
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
export const buildChallengeCallbackUrl = async (redirectUri, valPopNonce, authSession) => {
|
|
63
63
|
const params = new URLSearchParams({
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
mrtd_auth_session: authSession,
|
|
65
|
+
mrtd_val_pop_nonce: valPopNonce
|
|
66
66
|
});
|
|
67
67
|
const callbackUrl = `${redirectUri}?${params}`;
|
|
68
68
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SignJWT","createClientAttestationPopJwt","fetchMrtdPopVerify","
|
|
1
|
+
{"version":3,"names":["SignJWT","createClientAttestationPopJwt","fetchMrtdPopVerify","createSignJwtFromCryptoContext","partialCallbacks","sdkUnexpectedStatusCodeToIssuerError","createValidateChallenge","config","validateChallenge","issuerConf","verifyUrl","mrtd_auth_session","mrtd_pop_nonce","mrtd","ias","context","appFetch","fetch","walletInstanceAttestation","wiaCryptoContext","aud","credential_issuer","wiaPublicJwk","getPublicKey","clientAttestationDPoP","authorizationServer","callbacks","generateRandom","signJwt","clientAttestation","sdkConfig","signer","alg","method","publicJwk","mrtdValidationJwt","setProtectedHeader","kid","typ","setPayload","document_type","iss","setIssuedAt","setExpirationTime","sign","verifyResult","mrtdAuthSession","mrtdPopNonce","popVerifyEndpoint","walletAttestation","catch","mrtd_val_pop_nonce","mrtdValPopNonce","redirect_uri","redirectUri","buildChallengeCallbackUrl","valPopNonce","authSession","params","URLSearchParams","callbackUrl"],"sourceRoot":"../../../../../src","sources":["credential/issuance/mrtd-pop/03-validate-challenge.ts"],"mappings":"AAEA,SAASA,OAAO,QAAQ,6BAA6B;AACrD,SACEC,6BAA6B,EAC7BC,kBAAkB,QACb,0BAA0B;AAIjC,SACEC,8BAA8B,EAC9BC,gBAAgB,QACX,0BAA0B;AACjC,SAASC,oCAAoC,QAAQ,uBAAuB;AAM5E;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,MAAc,EACmB;EACjC,OAAO,eAAeC,iBAAiBA,CACrCC,UAAU,EACVC,SAAS,EACTC,iBAAiB,EACjBC,cAAc,EACdC,IAAI,EACJC,GAAG,EACHC,OAAO,EACP;IACA,MAAM;MACJC,QAAQ,GAAGC,KAAK;MAChBC,yBAAyB;MACzBC;IACF,CAAC,GAAGJ,OAAO;IAEX,MAAMK,GAAG,GAAGX,UAAU,CAACY,iBAAiB;IAExC,MAAMC,YAAY,GAAG,MAAMH,gBAAgB,CAACI,YAAY,CAAC,CAAC;IAE1D,MAAMC,qBAAq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OD,WAAW,EAAEE,WAAW,EAAEC,WAAW,KAAK;EAC/C,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;IACjChD,iBAAiB,EAAE8C,WAAW;IAC9BN,kBAAkB,EAAEK;EACtB,CAAC,CAAC;EAEF,MAAMI,WAAW,GAAI,GAAEN,WAAY,IAAGI,MAAO,EAAC;EAC9C,OAAO;IAAEE;EAAY,CAAC;AACxB,CAAC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { sdkConfigV1_0, sdkConfigV1_3 } from "../../../utils/config";
|
|
2
2
|
import { verifyAndParseChallengeInfo } from "./01-verify-and-parse-challenge-info";
|
|
3
3
|
import { createInitChallenge } from "./02-init-challenge";
|
|
4
|
-
import {
|
|
4
|
+
import { buildChallengeCallbackUrl, createValidateChallenge } from "./03-validate-challenge";
|
|
5
5
|
export const MRTDPoPv1_0 = {
|
|
6
|
-
|
|
6
|
+
buildChallengeCallbackUrl,
|
|
7
7
|
initChallenge: createInitChallenge({
|
|
8
8
|
sdkConfig: sdkConfigV1_0
|
|
9
9
|
}),
|
|
10
10
|
validateChallenge: createValidateChallenge({
|
|
11
11
|
sdkConfig: sdkConfigV1_0
|
|
12
12
|
}),
|
|
13
|
-
|
|
13
|
+
verifyAndParseChallengeInfo
|
|
14
14
|
};
|
|
15
15
|
export const MRTDPoPv1_3 = {
|
|
16
|
-
|
|
16
|
+
buildChallengeCallbackUrl,
|
|
17
17
|
initChallenge: createInitChallenge({
|
|
18
18
|
sdkConfig: sdkConfigV1_3
|
|
19
19
|
}),
|
|
20
20
|
validateChallenge: createValidateChallenge({
|
|
21
21
|
sdkConfig: sdkConfigV1_3
|
|
22
22
|
}),
|
|
23
|
-
|
|
23
|
+
verifyAndParseChallengeInfo
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sdkConfigV1_0","sdkConfigV1_3","verifyAndParseChallengeInfo","createInitChallenge","
|
|
1
|
+
{"version":3,"names":["sdkConfigV1_0","sdkConfigV1_3","verifyAndParseChallengeInfo","createInitChallenge","buildChallengeCallbackUrl","createValidateChallenge","MRTDPoPv1_0","initChallenge","sdkConfig","validateChallenge","MRTDPoPv1_3"],"sourceRoot":"../../../../../src","sources":["credential/issuance/mrtd-pop/index.ts"],"mappings":"AAEA,SAASA,aAAa,EAAEC,aAAa,QAAQ,uBAAuB;AACpE,SAASC,2BAA2B,QAAQ,sCAAsC;AAClF,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,SACEC,yBAAyB,EACzBC,uBAAuB,QAClB,yBAAyB;AAEhC,OAAO,MAAMC,WAAuB,GAAG;EACrCF,yBAAyB;EACzBG,aAAa,EAAEJ,mBAAmB,CAAC;IAAEK,SAAS,EAAER;EAAc,CAAC,CAAC;EAChES,iBAAiB,EAAEJ,uBAAuB,CAAC;IAAEG,SAAS,EAAER;EAAc,CAAC,CAAC;EACxEE;AACF,CAAC;AAED,OAAO,MAAMQ,WAAuB,GAAG;EACrCN,yBAAyB;EACzBG,aAAa,EAAEJ,mBAAmB,CAAC;IAAEK,SAAS,EAAEP;EAAc,CAAC,CAAC;EAChEQ,iBAAiB,EAAEJ,uBAAuB,CAAC;IAAEG,SAAS,EAAEP;EAAc,CAAC,CAAC;EACxEC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getCredentialIssuerEntityConfiguration","mapToIssuerConfig","evaluateIssuerTrust","issuerUrl","context","arguments","length","undefined","issuerConf","appFetch"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getCredentialIssuerEntityConfiguration","mapToIssuerConfig","evaluateIssuerTrust","issuerUrl","context","arguments","length","undefined","issuerConf","appFetch"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts"],"mappings":"AAEA,SAASA,sCAAsC,QAAQ,gCAAgC;AACvF,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,OAAO,MAAMC,mBAAuD,GAAG,eAAAA,CACrEC,SAAS,EAEN;EAAA,IADHC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEZ,MAAMG,UAAU,GAAG,MAAMR,sCAAsC,CAACG,SAAS,EAAE;IACzEM,QAAQ,EAAEL,OAAO,CAACK;EACpB,CAAC,CAAC;EAEF,OAAO;IAAED,UAAU,EAAEP,iBAAiB,CAACO,UAAU;EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { IoWalletError } from "../../../utils/errors";
|
|
2
|
+
import { Logger, LogLevel } from "../../../utils/logging";
|
|
1
3
|
import { generateRandomAlphaNumericString } from "../../../utils/misc";
|
|
2
4
|
import { makeParRequest } from "../../../utils/par";
|
|
3
|
-
import { LogLevel, Logger } from "../../../utils/logging";
|
|
4
|
-
import { IoWalletError } from "../../../utils/errors";
|
|
5
5
|
import { selectCredentialDefinition, selectResponseMode } from "../common/02-start-user-authorization";
|
|
6
6
|
export const startUserAuthorization = async (issuerConf, credentialIds, proof, ctx) => {
|
|
7
7
|
const {
|
|
8
|
-
|
|
9
|
-
walletInstanceAttestation,
|
|
8
|
+
appFetch = fetch,
|
|
10
9
|
redirectUri,
|
|
11
|
-
|
|
10
|
+
walletInstanceAttestation,
|
|
11
|
+
wiaCryptoContext
|
|
12
12
|
} = ctx;
|
|
13
13
|
const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
|
|
14
14
|
if (!clientId) {
|
|
@@ -20,8 +20,8 @@ export const startUserAuthorization = async (issuerConf, credentialIds, proof, c
|
|
|
20
20
|
const aud = issuerConf.credential_issuer;
|
|
21
21
|
const responseMode = selectResponseMode(issuerConf, credentialIds);
|
|
22
22
|
const getPar = makeParRequest({
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
appFetch,
|
|
24
|
+
wiaCryptoContext
|
|
25
25
|
});
|
|
26
26
|
const credentialDefinition = credentialIds.map(c => selectCredentialDefinition(issuerConf, c));
|
|
27
27
|
if (proof.proofType === "mrtd-pop") {
|
|
@@ -32,25 +32,25 @@ export const startUserAuthorization = async (issuerConf, credentialIds, proof, c
|
|
|
32
32
|
* See https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/credential-issuance-endpoint.html#pushed-authorization-request-endpoint
|
|
33
33
|
*/
|
|
34
34
|
credentialDefinition.push({
|
|
35
|
-
type: "it_l2+document_proof",
|
|
36
|
-
idphinting: proof.idpHinting,
|
|
37
35
|
challenge_method: "mrtd+ias",
|
|
38
|
-
challenge_redirect_uri: redirectUri
|
|
36
|
+
challenge_redirect_uri: redirectUri,
|
|
37
|
+
idphinting: proof.idpHinting,
|
|
38
|
+
type: "it_l2+document_proof"
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
const issuerRequestUri = await getPar(parEndpoint, walletInstanceAttestation, {
|
|
42
42
|
aud,
|
|
43
|
+
authorizationDetails: credentialDefinition,
|
|
43
44
|
clientId,
|
|
44
45
|
codeVerifier,
|
|
45
46
|
redirectUri,
|
|
46
|
-
responseMode
|
|
47
|
-
authorizationDetails: credentialDefinition
|
|
47
|
+
responseMode
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
|
-
issuerRequestUri,
|
|
51
50
|
clientId,
|
|
52
51
|
codeVerifier,
|
|
53
52
|
credentialDefinition,
|
|
53
|
+
issuerRequestUri,
|
|
54
54
|
responseMode
|
|
55
55
|
};
|
|
56
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["IoWalletError","Logger","LogLevel","generateRandomAlphaNumericString","makeParRequest","selectCredentialDefinition","selectResponseMode","startUserAuthorization","issuerConf","credentialIds","proof","ctx","appFetch","fetch","redirectUri","walletInstanceAttestation","wiaCryptoContext","clientId","getPublicKey","then","_","kid","log","ERROR","codeVerifier","parEndpoint","pushed_authorization_request_endpoint","aud","credential_issuer","responseMode","getPar","credentialDefinition","map","c","proofType","push","challenge_method","challenge_redirect_uri","idphinting","idpHinting","type","issuerRequestUri","authorizationDetails"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/02-start-user-authorization.ts"],"mappings":"AAEA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gCAAgC,QAAQ,qBAAqB;AACtE,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SACEC,0BAA0B,EAC1BC,kBAAkB,QACb,uCAAuC;AAE9C,OAAO,MAAMC,sBAA6D,GACxE,MAAAA,CAAOC,UAAU,EAAEC,aAAa,EAAEC,KAAK,EAAEC,GAAG,KAAK;EAC/C,MAAM;IACJC,QAAQ,GAAGC,KAAK;IAChBC,WAAW;IACXC,yBAAyB;IACzBC;EACF,CAAC,GAAGL,GAAG;EAEP,MAAMM,QAAQ,GAAG,MAAMD,gBAAgB,CAACE,YAAY,CAAC,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,GAAG,CAAC;EAEzE,IAAI,CAACJ,QAAQ,EAAE;IACbhB,MAAM,CAACqB,GAAG,CACRpB,QAAQ,CAACqB,KAAK,EACb,kCAAiCN,QAAS,0BAC7C,CAAC;IACD,MAAM,IAAIjB,aAAa,CAAC,qBAAqB,CAAC;EAChD;EACA,MAAMwB,YAAY,GAAGrB,gCAAgC,CAAC,EAAE,CAAC;EACzD,MAAMsB,WAAW,GAAGjB,UAAU,CAACkB,qCAAqC;EACpE,MAAMC,GAAG,GAAGnB,UAAU,CAACoB,iBAAiB;EACxC,MAAMC,YAAY,GAAGvB,kBAAkB,CAACE,UAAU,EAAEC,aAAa,CAAC;EAClE,MAAMqB,MAAM,GAAG1B,cAAc,CAAC;IAAEQ,QAAQ;IAAEI;EAAiB,CAAC,CAAC;EAE7D,MAAMe,oBAAoB,GAAGtB,aAAa,CAACuB,GAAG,CAAEC,CAAC,IAC/C5B,0BAA0B,CAACG,UAAU,EAAEyB,CAAC,CAC1C,CAAC;EAED,IAAIvB,KAAK,CAACwB,SAAS,KAAK,UAAU,EAAE;IAClC;AACN;AACA;AACA;AACA;AACA;IACMH,oBAAoB,CAACI,IAAI,CAAC;MACxBC,gBAAgB,EAAE,UAAU;MAC5BC,sBAAsB,EAAEvB,WAAW;MACnCwB,UAAU,EAAE5B,KAAK,CAAC6B,UAAU;MAC5BC,IAAI,EAAE;IACR,CAAC,CAAC;EACJ;EAEA,MAAMC,gBAAgB,GAAG,MAAMX,MAAM,CACnCL,WAAW,EACXV,yBAAyB,EACzB;IACEY,GAAG;IACHe,oBAAoB,EAAEX,oBAAoB;IAC1Cd,QAAQ;IACRO,YAAY;IACZV,WAAW;IACXe;EACF,CACF,CAAC;EAED,OAAO;IACLZ,QAAQ;IACRO,YAAY;IACZO,oBAAoB;IACpBU,gBAAgB;IAChBZ;EACF,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { AuthorizationChallengeResultShape, AuthorizationErrorShape, AuthorizationResultShape } from "../../../utils/auth";
|
|
2
|
-
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
3
|
-
import parseUrl from "parse-url";
|
|
4
|
-
import { IssuerResponseError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
|
|
5
1
|
import { decode, SignJWT } from "@pagopa/io-react-native-jwt";
|
|
6
|
-
import
|
|
2
|
+
import parseUrl from "parse-url";
|
|
3
|
+
import { AuthorizationChallengeResultShape, AuthorizationErrorShape, AuthorizationResultShape } from "../../../utils/auth";
|
|
7
4
|
import { getJwtFromFormPost } from "../../../utils/decoder";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { IssuerResponseError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
|
|
6
|
+
import { Logger, LogLevel } from "../../../utils/logging";
|
|
7
|
+
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
11
8
|
import { RemotePresentation as RemotePresentationFlow } from "../../presentation/v1.0.0";
|
|
9
|
+
import { RawRequestObject } from "../../presentation/v1.0.0/types";
|
|
10
|
+
import { AuthorizationError, AuthorizationIdpError } from "../common/errors";
|
|
11
|
+
import { ResponseUriResultShape } from "./types";
|
|
12
12
|
export const continueUserAuthorizationWithMRTDPoPChallenge = async authRedirectUrl => {
|
|
13
13
|
Logger.log(LogLevel.DEBUG, `The requested credential is a PersonIdentificationData and requires MRTD PoP, starting MRTD PoP validation from auth redirect`);
|
|
14
14
|
const query = parseUrl(authRedirectUrl).query;
|
|
@@ -73,19 +73,19 @@ export const getRequestedCredentialToBePresented = async function (issuerRequest
|
|
|
73
73
|
};
|
|
74
74
|
export const completeUserAuthorizationWithFormPostJwtMode = async (requestObject, _issuerConfig, evaluatedDcqlQuery, _ref) => {
|
|
75
75
|
let {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
appFetch = fetch,
|
|
77
|
+
wiaCryptoContext
|
|
78
78
|
} = _ref;
|
|
79
79
|
Logger.log(LogLevel.DEBUG, `The requeste credential is not a PersonIdentificationData, completing the user authorization with form_post.jwt mode`);
|
|
80
80
|
const authRequestObject = {
|
|
81
|
-
nonce: requestObject.nonce,
|
|
82
81
|
clientId: requestObject.client_id,
|
|
82
|
+
nonce: requestObject.nonce,
|
|
83
83
|
responseUri: requestObject.response_uri
|
|
84
84
|
};
|
|
85
85
|
const remotePresentation = await RemotePresentationFlow.prepareRemotePresentations(evaluatedDcqlQuery, authRequestObject);
|
|
86
86
|
const authzResponsePayload = await createAuthzResponsePayload({
|
|
87
|
-
state: requestObject.state,
|
|
88
87
|
remotePresentation,
|
|
88
|
+
state: requestObject.state,
|
|
89
89
|
wiaCryptoContext
|
|
90
90
|
});
|
|
91
91
|
Logger.log(LogLevel.DEBUG, `Authz response payload: ${authzResponsePayload}`);
|
|
@@ -103,11 +103,11 @@ export const completeUserAuthorizationWithFormPostJwtMode = async (requestObject
|
|
|
103
103
|
response: authzResponsePayload
|
|
104
104
|
}).toString();
|
|
105
105
|
const resUriRes = await appFetch(requestObject.response_uri, {
|
|
106
|
-
|
|
106
|
+
body,
|
|
107
107
|
headers: {
|
|
108
108
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
method: "POST"
|
|
111
111
|
}).then(hasStatusOrThrow(200, IssuerResponseError)).then(reqUri => reqUri.json());
|
|
112
112
|
const responseUri = ResponseUriResultShape.safeParse(resUriRes);
|
|
113
113
|
if (!responseUri.success) {
|
|
@@ -152,16 +152,16 @@ export const parseAuthorizationResponse = authRes => {
|
|
|
152
152
|
*/
|
|
153
153
|
const createAuthzResponsePayload = async _ref2 => {
|
|
154
154
|
let {
|
|
155
|
-
state,
|
|
156
155
|
remotePresentation,
|
|
156
|
+
state,
|
|
157
157
|
wiaCryptoContext
|
|
158
158
|
} = _ref2;
|
|
159
159
|
const {
|
|
160
160
|
kid
|
|
161
161
|
} = await wiaCryptoContext.getPublicKey();
|
|
162
162
|
return new SignJWT(wiaCryptoContext).setProtectedHeader({
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
kid,
|
|
164
|
+
typ: "jwt"
|
|
165
165
|
}).setPayload({
|
|
166
166
|
/**
|
|
167
167
|
* TODO [SIW-2264]: `state` coming from `requestObject` is marked as `optional`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["decode","SignJWT","parseUrl","AuthorizationChallengeResultShape","AuthorizationErrorShape","AuthorizationResultShape","getJwtFromFormPost","IssuerResponseError","UnimplementedFeatureError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","RemotePresentation","RemotePresentationFlow","RawRequestObject","AuthorizationError","AuthorizationIdpError","ResponseUriResultShape","continueUserAuthorizationWithMRTDPoPChallenge","authRedirectUrl","log","DEBUG","query","authResParsed","safeParse","success","authErr","ERROR","error","message","JSON","stringify","data","error_description","buildAuthorizationUrl","issuerRequestUri","clientId","issuerConf","idpHint","authzRequestEndpoint","authorization_endpoint","params","URLSearchParams","client_id","request_uri","append","authUrl","completePidUserAuthorizationWithQueryMode","parseAuthorizationResponse","completeEaaUserAuthorizationWithQueryMode","getRequestedCredentialToBePresented","appFetch","arguments","length","undefined","fetch","toString","requestObject","method","then","res","text","jws","reqObj","header","protectedHeader","payload","reason","completeUserAuthorizationWithFormPostJwtMode","_issuerConfig","evaluatedDcqlQuery","_ref","wiaCryptoContext","authRequestObject","nonce","responseUri","response_uri","remotePresentation","prepareRemotePresentations","authzResponsePayload","createAuthzResponsePayload","state","body","response","resUriRes","headers","reqUri","json","redirect_uri","cbRes","decodedJwt","authRes","_ref2","kid","getPublicKey","setProtectedHeader","typ","setPayload","vp_token","presentations","reduce","_ref3","credentialId","vpToken","setIssuedAt","setExpirationTime","sign"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/03-complete-user-authorization.ts"],"mappings":"AAAA,SAEEA,MAAM,EACNC,OAAO,QACF,6BAA6B;AACpC,OAAOC,QAAQ,MAAM,WAAW;AAKhC,SACEC,iCAAiC,EACjCC,uBAAuB,EAEvBC,wBAAwB,QACnB,qBAAqB;AAC5B,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SACEC,mBAAmB,EACnBC,yBAAyB,EACzBC,gBAAgB,QACX,uBAAuB;AAC9B,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,kBAAkB,IAAIC,sBAAsB,QAAQ,2BAA2B;AACxF,SAASC,gBAAgB,QAAQ,iCAAiC;AAClE,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,kBAAkB;AAC5E,SAASC,sBAAsB,QAAQ,SAAS;AAEhD,OAAO,MAAMC,6CAA2G,GACtH,MAAOC,eAAe,IAAK;EACzBV,MAAM,CAACW,GAAG,CACRV,QAA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CAAC,GAAG,CAAC,CAAC,CAAC;IAC3BiB,QAAQ,EAAErB,kBAAkB,CAACsB,aAAa,CAACC,MAAM,CAC/C,CAACF,QAAQ,EAAAG,KAAA;MAAA,IAAE;QAAEC,YAAY;QAAEC;MAAQ,CAAC,GAAAF,KAAA;MAAA,OAAM;QACxC,GAAGH,QAAQ;QACX,CAACI,YAAY,GAAGC;MAClB,CAAC;IAAA,CAAC,EACF,CAAC,CACH;EACF,CAAC,CAAC,CACDC,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,IAAI,CAAC,CACvBC,IAAI,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from "uuid";
|
|
2
|
-
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
3
2
|
import { createDPopToken } from "../../../utils/dpop";
|
|
4
|
-
import { createPopToken } from "../../../utils/pop";
|
|
5
|
-
import { TokenResponse } from "./types";
|
|
6
3
|
import { IssuerResponseError, ValidationFailed } from "../../../utils/errors";
|
|
7
|
-
import {
|
|
4
|
+
import { Logger, LogLevel } from "../../../utils/logging";
|
|
5
|
+
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
6
|
+
import { createPopToken } from "../../../utils/pop";
|
|
8
7
|
import * as WalletInstanceAttestation from "../../../wallet-instance-attestation/v1.0.0/utils";
|
|
8
|
+
import { TokenResponse } from "./types";
|
|
9
9
|
export const authorizeAccess = async (issuerConf, code, redirectUri, codeVerifier, context) => {
|
|
10
10
|
const {
|
|
11
11
|
appFetch = fetch,
|
|
12
|
+
dPopCryptoContext,
|
|
12
13
|
walletInstanceAttestation,
|
|
13
|
-
wiaCryptoContext
|
|
14
|
-
dPopCryptoContext
|
|
14
|
+
wiaCryptoContext
|
|
15
15
|
} = context;
|
|
16
16
|
const aud = issuerConf.credential_issuer;
|
|
17
17
|
const iss = WalletInstanceAttestation.decode(walletInstanceAttestation).payload.cnf.jwk.kid;
|
|
@@ -23,28 +23,28 @@ export const authorizeAccess = async (issuerConf, code, redirectUri, codeVerifie
|
|
|
23
23
|
}, dPopCryptoContext);
|
|
24
24
|
Logger.log(LogLevel.DEBUG, `Token request DPoP: ${tokenRequestSignedDPop}`);
|
|
25
25
|
const signedWiaPoP = await createPopToken({
|
|
26
|
-
jti: `${uuidv4()}`,
|
|
27
26
|
aud,
|
|
28
|
-
iss
|
|
27
|
+
iss,
|
|
28
|
+
jti: `${uuidv4()}`
|
|
29
29
|
}, wiaCryptoContext);
|
|
30
30
|
Logger.log(LogLevel.DEBUG, `WIA DPoP token: ${signedWiaPoP}`);
|
|
31
31
|
const requestBody = {
|
|
32
|
-
grant_type: "authorization_code",
|
|
33
32
|
code,
|
|
34
33
|
code_verifier: codeVerifier,
|
|
34
|
+
grant_type: "authorization_code",
|
|
35
35
|
redirect_uri: redirectUri
|
|
36
36
|
};
|
|
37
37
|
const authorizationRequestFormBody = new URLSearchParams(requestBody);
|
|
38
38
|
Logger.log(LogLevel.DEBUG, `Auth form request body: ${authorizationRequestFormBody}`);
|
|
39
39
|
const tokenRes = await appFetch(tokenUrl, {
|
|
40
|
-
|
|
40
|
+
body: authorizationRequestFormBody.toString(),
|
|
41
41
|
headers: {
|
|
42
42
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
43
43
|
DPoP: tokenRequestSignedDPop,
|
|
44
44
|
"OAuth-Client-Attestation": walletInstanceAttestation,
|
|
45
45
|
"OAuth-Client-Attestation-PoP": signedWiaPoP
|
|
46
46
|
},
|
|
47
|
-
|
|
47
|
+
method: "POST"
|
|
48
48
|
}).then(hasStatusOrThrow(200, IssuerResponseError)).then(res => res.json()).then(body => TokenResponse.safeParse(body));
|
|
49
49
|
if (!tokenRes.success) {
|
|
50
50
|
Logger.log(LogLevel.ERROR, `Token Response validation failed: ${tokenRes.error.message}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["v4","uuidv4","
|
|
1
|
+
{"version":3,"names":["v4","uuidv4","createDPopToken","IssuerResponseError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","createPopToken","WalletInstanceAttestation","TokenResponse","authorizeAccess","issuerConf","code","redirectUri","codeVerifier","context","appFetch","fetch","dPopCryptoContext","walletInstanceAttestation","wiaCryptoContext","aud","credential_issuer","iss","decode","payload","cnf","jwk","kid","tokenUrl","token_endpoint","tokenRequestSignedDPop","htm","htu","jti","log","DEBUG","signedWiaPoP","requestBody","code_verifier","grant_type","redirect_uri","authorizationRequestFormBody","URLSearchParams","tokenRes","body","toString","headers","DPoP","method","then","res","json","safeParse","success","ERROR","error","message","reason","accessToken","data"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/04-authorize-access.ts"],"mappings":"AAAA,SAASA,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAInC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAC7E,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,OAAO,KAAKC,yBAAyB,MAAM,mDAAmD;AAC9F,SAASC,aAAa,QAAQ,SAAS;AAEvC,OAAO,MAAMC,eAA+C,GAAG,MAAAA,CAC7DC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,OAAO,KACJ;EACH,MAAM;IACJC,QAAQ,GAAGC,KAAK;IAChBC,iBAAiB;IACjBC,yBAAyB;IACzBC;EACF,CAAC,GAAGL,OAAO;EACX,MAAMM,GAAG,GAAGV,UAAU,CAACW,iBAAiB;EACxC,MAAMC,GAAG,GAAGf,yBAAyB,CAACgB,MAAM,CAACL,yBAAyB,CAAC,CACpEM,OAAO,CAACC,GAAG,CAACC,GAAG,CAACC,GAAG;EAEtB,MAAMC,QAAQ,GAAGlB,UAAU,CAACmB,cAAc;EAE1C,MAAMC,sBAAsB,GAAG,MAAM9B,eAAe,CAClD;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,CAACR,IAAI,CAAC,CAAC;EAEhD,IAAI,CAACD,QAAQ,CAACU,OAAO,EAAE;IACrBlD,MAAM,CAAC+B,GAAG,CACR9B,QAAQ,CAACkD,KAAK,EACb,qCAAoCX,QAAQ,CAACY,KAAK,CAACC,OAAQ,EAC9D,CAAC;IAED,MAAM,IAAItD,gBAAgB,CAAC;MACzBsD,OAAO,EAAE,kCAAkC;MAC3CC,MAAM,EAAEd,QAAQ,CAACY,KAAK,CAACC;IACzB,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEE,WAAW,EAAEf,QAAQ,CAACgB;EAAK,CAAC;AACvC,CAAC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
|
|
2
2
|
import { v4 as uuidv4 } from "uuid";
|
|
3
|
-
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
4
|
-
import { IssuerResponseError, IssuerResponseErrorCodes, ResponseErrorBuilder, UnexpectedStatusCodeError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
|
|
5
3
|
import { createDPopToken } from "../../../utils/dpop";
|
|
6
|
-
import {
|
|
4
|
+
import { IoWalletError, IssuerResponseError, IssuerResponseErrorCodes, ResponseErrorBuilder, UnexpectedStatusCodeError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
|
|
5
|
+
import { Logger, LogLevel } from "../../../utils/logging";
|
|
6
|
+
import { hasStatusOrThrow } from "../../../utils/misc";
|
|
7
7
|
import { CredentialResponse, NonceResponse } from "./types";
|
|
8
8
|
export const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
|
9
9
|
const jwk = await ctx.getPublicKey();
|
|
10
10
|
return new SignJWT(ctx).setPayload({
|
|
11
11
|
nonce
|
|
12
12
|
}).setProtectedHeader({
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
jwk,
|
|
14
|
+
typ: "openid4vci-proof+jwt"
|
|
15
15
|
}).setAudience(audience).setIssuer(issuer).setIssuedAt().setExpirationTime("5min").sign();
|
|
16
16
|
};
|
|
17
17
|
export const obtainCredential = async (issuerConf, accessToken, clientId, credentialDefinition, context) => {
|
|
18
|
+
var _credentialRes$data$c;
|
|
18
19
|
const {
|
|
19
|
-
credentialCryptoContext,
|
|
20
20
|
appFetch = fetch,
|
|
21
|
+
credentialCryptoContext,
|
|
21
22
|
dPopCryptoContext
|
|
22
23
|
} = context;
|
|
23
24
|
const {
|
|
@@ -32,10 +33,10 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
|
|
|
32
33
|
const {
|
|
33
34
|
c_nonce
|
|
34
35
|
} = await appFetch(nonceUrl, {
|
|
35
|
-
method: "POST",
|
|
36
36
|
headers: {
|
|
37
37
|
"Content-Type": "application/json"
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
|
+
method: "POST"
|
|
39
40
|
}).then(hasStatusOrThrow(200)).then(res => res.json()).then(body => NonceResponse.parse(body));
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -76,20 +77,20 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
|
|
|
76
77
|
};
|
|
77
78
|
Logger.log(LogLevel.DEBUG, `Credential request body: ${JSON.stringify(credentialRequestFormBody)}`);
|
|
78
79
|
const tokenRequestSignedDPop = await createDPopToken({
|
|
80
|
+
ath: await sha256ToBase64(accessToken.access_token),
|
|
79
81
|
htm: "POST",
|
|
80
82
|
htu: credentialUrl,
|
|
81
|
-
jti: `${uuidv4()}
|
|
82
|
-
ath: await sha256ToBase64(accessToken.access_token)
|
|
83
|
+
jti: `${uuidv4()}`
|
|
83
84
|
}, dPopCryptoContext);
|
|
84
85
|
Logger.log(LogLevel.DEBUG, `Token request DPoP: ${tokenRequestSignedDPop}`);
|
|
85
86
|
const credentialRes = await appFetch(credentialUrl, {
|
|
86
|
-
|
|
87
|
+
body: JSON.stringify(credentialRequestFormBody),
|
|
87
88
|
headers: {
|
|
89
|
+
Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
|
|
88
90
|
"Content-Type": "application/json",
|
|
89
|
-
DPoP: tokenRequestSignedDPop
|
|
90
|
-
Authorization: `${accessToken.token_type} ${accessToken.access_token}`
|
|
91
|
+
DPoP: tokenRequestSignedDPop
|
|
91
92
|
},
|
|
92
|
-
|
|
93
|
+
method: "POST"
|
|
93
94
|
}).then(hasStatusOrThrow(200)).then(res => res.json()).then(body => CredentialResponse.safeParse(body)).catch(handleObtainCredentialError);
|
|
94
95
|
if (!credentialRes.success) {
|
|
95
96
|
Logger.log(LogLevel.ERROR, `Credential Response validation failed: ${credentialRes.error.message}`);
|
|
@@ -102,11 +103,19 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
|
|
|
102
103
|
|
|
103
104
|
// Extract the format corresponding to the credential_configuration_id used
|
|
104
105
|
const issuerCredentialConfig = issuerConf.credential_configurations_supported[credential_configuration_id];
|
|
106
|
+
const credential = (_credentialRes$data$c = credentialRes.data.credentials[0]) === null || _credentialRes$data$c === void 0 ? void 0 : _credentialRes$data$c.credential;
|
|
107
|
+
if (!credential) {
|
|
108
|
+
throw new IoWalletError(`No credential found in the response for credential_configuration_id ${credential_configuration_id}`);
|
|
109
|
+
}
|
|
110
|
+
const format = issuerCredentialConfig === null || issuerCredentialConfig === void 0 ? void 0 : issuerCredentialConfig.format;
|
|
111
|
+
if (!format) {
|
|
112
|
+
throw new IoWalletError(`No format found for credential_configuration_id ${credential_configuration_id} in the issuer configuration`);
|
|
113
|
+
}
|
|
105
114
|
|
|
106
115
|
// TODO: [SIW-2264] Handle multiple credentials
|
|
107
116
|
return {
|
|
108
|
-
credential
|
|
109
|
-
format
|
|
117
|
+
credential,
|
|
118
|
+
format
|
|
110
119
|
};
|
|
111
120
|
};
|
|
112
121
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","
|
|
1
|
+
{"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","createDPopToken","IoWalletError","IssuerResponseError","IssuerResponseErrorCodes","ResponseErrorBuilder","UnexpectedStatusCodeError","UnimplementedFeatureError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","CredentialResponse","NonceResponse","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","_credentialRes$data$c","appFetch","fetch","credentialCryptoContext","dPopCryptoContext","credential_configuration_id","credential_identifier","credentialUrl","credential_endpoint","issuerUrl","credential_issuer","nonceUrl","nonce_endpoint","c_nonce","headers","method","then","res","json","body","parse","signedNonceProof","log","DEBUG","containsCredentialDefinition","authorization_details","some","c","credential_identifiers","includes","ERROR","message","credentialRequestFormBody","proof","jwt","proof_type","JSON","stringify","tokenRequestSignedDPop","ath","access_token","htm","htu","jti","credentialRes","Authorization","token_type","DPoP","safeParse","catch","handleObtainCredentialError","success","error","reason","data","issuerCredentialConfig","credential_configurations_supported","credential","credentials","format","e","handle","code","CredentialIssuingNotSynchronous","CredentialInvalidStatus","CredentialRequestFailed","buildFrom","obtainCredentialsBatch"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/05-obtain-credential.ts"],"mappings":"AAAA,SAEEA,cAAc,EACdC,OAAO,QACF,6BAA6B;AACpC,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAInC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SACEC,aAAa,EACbC,mBAAmB,EACnBC,wBAAwB,EACxBC,oBAAoB,EACpBC,yBAAyB,EACzBC,yBAAyB,EACzBC,gBAAgB,QACX,uBAAuB;AAC9B,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,kBAAkB,EAAEC,aAAa,QAAQ,SAAS;AAE3D,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAC9BC,KAAa,EACbC,MAAc,EACdC,QAAg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EACX,CAAC,CAAC,CACDmC,SAAS,CAACN,CAAC,CAAC;AACjB,CAAC;AAED,OAAO,MAAMO,sBAA6D,GACxEA,CAAA,KAAM;EACJ,MAAM,IAAI/F,yBAAyB,CAAC,wBAAwB,EAAE,OAAO,CAAC;AACxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IoWalletError","Logger","LogLevel","verifyAndParseCredentialMDoc","verifyAndParseCredentialSdJwt","verifyAndParseCredential","issuerConf","credential","credentialConfigurationId","context","x509CertRoot","_issuerConf$credentia","format","credential_configurations_supported","log","DEBUG","message","ERROR"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/06-verify-and-parse-credential.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["IoWalletError","Logger","LogLevel","verifyAndParseCredentialMDoc","verifyAndParseCredentialSdJwt","verifyAndParseCredential","issuerConf","credential","credentialConfigurationId","context","x509CertRoot","_issuerConf$credentia","format","credential_configurations_supported","log","DEBUG","message","ERROR"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/06-verify-and-parse-credential.ts"],"mappings":"AAEA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,4BAA4B,QAAQ,+CAA+C;AAC5F,SAASC,6BAA6B,QAAQ,gDAAgD;AAE9F,OAAO,MAAMC,wBAAiE,GAC5E,MAAAA,CACEC,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YAAY,KACT;EAAA,IAAAC,qBAAA;EACH,MAAMC,MAAM,IAAAD,qBAAA,GACVL,UAAU,CAACO,mCAAmC,CAACL,yBAAyB,CAAC,cAAAG,qBAAA,uBAAzEA,qBAAA,CACIC,MAAM;EAEZ,QAAQA,MAAM;IACZ,KAAK,WAAW;MAAE;QAChBX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,wCAAwC,CAAC;QACpE,OAAOX,6BAA6B,CAClCE,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OACF,CAAC;MACH;IACA,KAAK,UAAU;MAAE;QACfR,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,uCAAuC,CAAC;QACnE,OAAOZ,4BAA4B,CACjCG,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YACF,CAAC;MACH;IAEA;MAAS;QACP,MAAMM,OAAO,GAAI,kCAAiCJ,MAAO,EAAC;QAC1DX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACe,KAAK,EAAED,OAAO,CAAC;QACnC,MAAM,IAAIhB,aAAa,CAACgB,OAAO,CAAC;MAClC;EACF;AACF,CAAC"}
|