@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,12 +1,14 @@
|
|
|
1
|
-
import { BaseEntityConfiguration, EntityStatement } from "./types";
|
|
2
|
-
import { JWK } from "../../utils/jwk";
|
|
3
|
-
import * as z from "zod";
|
|
4
1
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
type CertificateValidationResult,
|
|
3
|
+
verifyCertificateChain,
|
|
4
|
+
type X509CertificateOptions,
|
|
5
|
+
} from "@pagopa/io-react-native-crypto";
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
|
|
8
|
+
import type { TrustApi } from "../api";
|
|
9
|
+
import type { TrustAnchorConfig } from "../api/TrustAnchorConfig";
|
|
10
|
+
|
|
11
|
+
import { JWK } from "../../utils/jwk";
|
|
10
12
|
import {
|
|
11
13
|
FederationError,
|
|
12
14
|
MissingFederationFetchEndpointError,
|
|
@@ -16,35 +18,141 @@ import {
|
|
|
16
18
|
TrustChainTokenMissingError,
|
|
17
19
|
X509ValidationError,
|
|
18
20
|
} from "./errors";
|
|
21
|
+
import { BaseEntityConfiguration, EntityStatement } from "./types";
|
|
19
22
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
type
|
|
23
|
-
|
|
23
|
+
decode,
|
|
24
|
+
getTrustAnchorX509Certificate,
|
|
25
|
+
type ParsedToken,
|
|
26
|
+
verify,
|
|
27
|
+
} from "./utils";
|
|
24
28
|
import {
|
|
25
29
|
getSignedEntityConfiguration,
|
|
26
30
|
getSignedEntityStatement,
|
|
27
31
|
} from "./utils";
|
|
28
|
-
import type { TrustApi } from "../api";
|
|
29
|
-
import type { TrustAnchorConfig } from "../api/TrustAnchorConfig";
|
|
30
32
|
|
|
31
|
-
export
|
|
32
|
-
EntityStatementShape: z.ZodType<EntityStatement>;
|
|
33
|
+
export interface BuilderConfig {
|
|
33
34
|
EntityConfigurationShape: z.ZodType<BaseEntityConfiguration>;
|
|
35
|
+
EntityStatementShape: z.ZodType<EntityStatement>;
|
|
34
36
|
/**
|
|
35
37
|
* The first element of the chain is supposed to be the Entity Configuration for the document issuer
|
|
36
38
|
*/
|
|
37
39
|
FirstElementShape: z.ZodType<BaseEntityConfiguration>;
|
|
40
|
+
/**
|
|
41
|
+
* The last element of the chain can either be an Entity Statement
|
|
42
|
+
* or the Entity Configuration for the known Trust Anchor
|
|
43
|
+
*/
|
|
44
|
+
LastElementShape: z.ZodType<BaseEntityConfiguration | EntityStatement>;
|
|
38
45
|
/**
|
|
39
46
|
* Each element but the first is supposed to be an Entity Statement
|
|
40
47
|
*/
|
|
41
48
|
MiddleElementShape: z.ZodType<EntityStatement>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Factory function to create `verifyTrustChain`.
|
|
53
|
+
* @param config Version specific Entity shapes
|
|
54
|
+
* @returns `verifyTrustChain` function compliant with the public API
|
|
55
|
+
*/
|
|
56
|
+
export function createVerifyTrustChain(
|
|
57
|
+
config: BuilderConfig,
|
|
58
|
+
): TrustApi["verifyTrustChain"] {
|
|
59
|
+
return async function verifyTrustChain(
|
|
60
|
+
trustAnchorEntity,
|
|
61
|
+
chain,
|
|
62
|
+
x509Options = {
|
|
63
|
+
connectTimeout: 10000,
|
|
64
|
+
readTimeout: 10000,
|
|
65
|
+
requireCrl: true,
|
|
66
|
+
},
|
|
67
|
+
{ appFetch = fetch, renewOnFail = true } = {},
|
|
68
|
+
) {
|
|
69
|
+
const validateTrustChain = createValidateTrustChain(config);
|
|
70
|
+
const renewTrustChain = createRenewTrustChain(config);
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
return await validateTrustChain(trustAnchorEntity, chain, x509Options);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (renewOnFail) {
|
|
76
|
+
const renewedChain = await renewTrustChain(chain, appFetch);
|
|
77
|
+
return validateTrustChain(trustAnchorEntity, renewedChain, x509Options);
|
|
78
|
+
} else {
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Factory function to create `renewTrustChain`.
|
|
87
|
+
* @param config Version specific Entity shapes
|
|
88
|
+
* @returns `renewTrustChain` function
|
|
89
|
+
*/
|
|
90
|
+
function createRenewTrustChain({
|
|
91
|
+
EntityConfigurationShape,
|
|
92
|
+
EntityStatementShape,
|
|
93
|
+
}: BuilderConfig) {
|
|
42
94
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
95
|
+
* Given a trust chain, obtain a new trust chain by fetching each element's fresh version
|
|
96
|
+
*
|
|
97
|
+
* @param chain The original chain
|
|
98
|
+
* @param appFetch (optional) fetch api implementation
|
|
99
|
+
* @returns A list of signed token that represent the trust chain, in the same order of the provided chain
|
|
100
|
+
* @throws {FederationError} If the chain is not valid
|
|
45
101
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
102
|
+
return async function renewTrustChain(
|
|
103
|
+
chain: string[],
|
|
104
|
+
appFetch: GlobalFetch["fetch"] = fetch,
|
|
105
|
+
): Promise<string[]> {
|
|
106
|
+
return Promise.all(
|
|
107
|
+
chain.map(async (token, index) => {
|
|
108
|
+
const decoded = decode(token);
|
|
109
|
+
|
|
110
|
+
const entityStatementResult = EntityStatementShape.safeParse(decoded);
|
|
111
|
+
const entityConfigurationResult =
|
|
112
|
+
EntityConfigurationShape.safeParse(decoded);
|
|
113
|
+
|
|
114
|
+
if (entityConfigurationResult.success) {
|
|
115
|
+
return getSignedEntityConfiguration(
|
|
116
|
+
entityConfigurationResult.data.payload.iss,
|
|
117
|
+
{ appFetch },
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
if (entityStatementResult.success) {
|
|
121
|
+
const entityStatement = entityStatementResult.data;
|
|
122
|
+
|
|
123
|
+
const parentBaseUrl = entityStatement.payload.iss;
|
|
124
|
+
const parentECJwt = await getSignedEntityConfiguration(
|
|
125
|
+
parentBaseUrl,
|
|
126
|
+
{ appFetch },
|
|
127
|
+
);
|
|
128
|
+
const parentEC = EntityConfigurationShape.parse(decode(parentECJwt));
|
|
129
|
+
|
|
130
|
+
const federationFetchEndpoint =
|
|
131
|
+
parentEC.payload.metadata.federation_entity
|
|
132
|
+
.federation_fetch_endpoint;
|
|
133
|
+
if (!federationFetchEndpoint) {
|
|
134
|
+
throw new MissingFederationFetchEndpointError(
|
|
135
|
+
`Parent EC at ${parentBaseUrl} is missing federation_fetch_endpoint, cannot renew ES for ${entityStatement.payload.sub}.`,
|
|
136
|
+
{
|
|
137
|
+
entityBaseUrl: entityStatement.payload.sub,
|
|
138
|
+
missingInEntityUrl: parentBaseUrl,
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
return getSignedEntityStatement(
|
|
143
|
+
federationFetchEndpoint,
|
|
144
|
+
entityStatement.payload.sub,
|
|
145
|
+
{ appFetch },
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
throw new TrustChainRenewalError(
|
|
149
|
+
`Failed to renew trust chain. Reason: element #${index} failed to parse.`,
|
|
150
|
+
{ originalChain: chain },
|
|
151
|
+
);
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
48
156
|
|
|
49
157
|
/**
|
|
50
158
|
* Factory function to create `validateTrustChain`.
|
|
@@ -53,8 +161,8 @@ export type BuilderConfig = {
|
|
|
53
161
|
*/
|
|
54
162
|
function createValidateTrustChain({
|
|
55
163
|
FirstElementShape,
|
|
56
|
-
MiddleElementShape,
|
|
57
164
|
LastElementShape,
|
|
165
|
+
MiddleElementShape,
|
|
58
166
|
}: BuilderConfig) {
|
|
59
167
|
/**
|
|
60
168
|
* Validates a provided trust chain against a known trust anchor, including X.509 certificate checks.
|
|
@@ -68,7 +176,7 @@ function createValidateTrustChain({
|
|
|
68
176
|
return async function validateTrustChain(
|
|
69
177
|
trustAnchorEntity: TrustAnchorConfig,
|
|
70
178
|
chain: string[],
|
|
71
|
-
x509Options: X509CertificateOptions
|
|
179
|
+
x509Options: X509CertificateOptions,
|
|
72
180
|
): Promise<ParsedToken[]> {
|
|
73
181
|
// If the chain is empty, fail
|
|
74
182
|
if (chain.length === 0) {
|
|
@@ -89,7 +197,7 @@ function createValidateTrustChain({
|
|
|
89
197
|
if (!token) {
|
|
90
198
|
throw new TrustChainTokenMissingError(
|
|
91
199
|
`Token missing at index ${currentIndex} in trust chain.`,
|
|
92
|
-
{ index: currentIndex }
|
|
200
|
+
{ index: currentIndex },
|
|
93
201
|
);
|
|
94
202
|
}
|
|
95
203
|
const shape = selectTokenShape(currentIndex);
|
|
@@ -108,7 +216,7 @@ function createValidateTrustChain({
|
|
|
108
216
|
if (!nextToken) {
|
|
109
217
|
throw new TrustChainTokenMissingError(
|
|
110
218
|
`Next token missing at index ${nextIndex} (needed for keys for token at ${currentIndex}).`,
|
|
111
|
-
{ index: nextIndex }
|
|
219
|
+
{ index: nextIndex },
|
|
112
220
|
);
|
|
113
221
|
}
|
|
114
222
|
const shape = selectTokenShape(nextIndex);
|
|
@@ -128,18 +236,18 @@ function createValidateTrustChain({
|
|
|
128
236
|
const parsedToken = await verify(
|
|
129
237
|
tokenString,
|
|
130
238
|
kidFromTokenHeader,
|
|
131
|
-
signerJwks
|
|
239
|
+
signerJwks,
|
|
132
240
|
);
|
|
133
241
|
|
|
134
242
|
// Step 2: X.509 Certificate Chain Validation
|
|
135
243
|
const jwkUsedForVerification = signerJwks.find(
|
|
136
|
-
(k) => k.kid === kidFromTokenHeader
|
|
244
|
+
(k) => k.kid === kidFromTokenHeader,
|
|
137
245
|
);
|
|
138
246
|
|
|
139
247
|
if (!jwkUsedForVerification) {
|
|
140
248
|
throw new FederationError(
|
|
141
249
|
`JWK with kid '${kidFromTokenHeader}' was not found in signer's JWKS for token at index ${i}, though JWT verification passed.`,
|
|
142
|
-
{
|
|
250
|
+
{ kid: kidFromTokenHeader, tokenIndex: i },
|
|
143
251
|
);
|
|
144
252
|
}
|
|
145
253
|
|
|
@@ -148,7 +256,7 @@ function createValidateTrustChain({
|
|
|
148
256
|
jwkUsedForVerification.x5c.length === 0
|
|
149
257
|
) {
|
|
150
258
|
throw new MissingX509CertsError(
|
|
151
|
-
`JWK with kid '${kidFromTokenHeader}' does not contain an X.509 certificate chain (x5c) for token at index ${i}
|
|
259
|
+
`JWK with kid '${kidFromTokenHeader}' does not contain an X.509 certificate chain (x5c) for token at index ${i}.`,
|
|
152
260
|
);
|
|
153
261
|
}
|
|
154
262
|
|
|
@@ -165,18 +273,18 @@ function createValidateTrustChain({
|
|
|
165
273
|
await verifyCertificateChain(
|
|
166
274
|
certChainBase64,
|
|
167
275
|
x509TrustAnchorCertBase64,
|
|
168
|
-
x509Options
|
|
276
|
+
x509Options,
|
|
169
277
|
);
|
|
170
278
|
|
|
171
279
|
if (!x509ValidationResult.isValid) {
|
|
172
280
|
throw new X509ValidationError(
|
|
173
281
|
`X.509 certificate chain validation failed for token at index ${i} (kid: ${kidFromTokenHeader}). Status: ${x509ValidationResult.validationStatus}. Error: ${x509ValidationResult.errorMessage}`,
|
|
174
282
|
{
|
|
175
|
-
tokenIndex: i,
|
|
176
283
|
kid: kidFromTokenHeader,
|
|
177
|
-
|
|
284
|
+
tokenIndex: i,
|
|
178
285
|
x509ErrorMessage: x509ValidationResult.errorMessage,
|
|
179
|
-
|
|
286
|
+
x509ValidationStatus: x509ValidationResult.validationStatus,
|
|
287
|
+
},
|
|
180
288
|
);
|
|
181
289
|
}
|
|
182
290
|
return parsedToken;
|
|
@@ -185,109 +293,3 @@ function createValidateTrustChain({
|
|
|
185
293
|
return Promise.all(validationPromises);
|
|
186
294
|
};
|
|
187
295
|
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Factory function to create `renewTrustChain`.
|
|
191
|
-
* @param config Version specific Entity shapes
|
|
192
|
-
* @returns `renewTrustChain` function
|
|
193
|
-
*/
|
|
194
|
-
function createRenewTrustChain({
|
|
195
|
-
EntityStatementShape,
|
|
196
|
-
EntityConfigurationShape,
|
|
197
|
-
}: BuilderConfig) {
|
|
198
|
-
/**
|
|
199
|
-
* Given a trust chain, obtain a new trust chain by fetching each element's fresh version
|
|
200
|
-
*
|
|
201
|
-
* @param chain The original chain
|
|
202
|
-
* @param appFetch (optional) fetch api implementation
|
|
203
|
-
* @returns A list of signed token that represent the trust chain, in the same order of the provided chain
|
|
204
|
-
* @throws {FederationError} If the chain is not valid
|
|
205
|
-
*/
|
|
206
|
-
return async function renewTrustChain(
|
|
207
|
-
chain: string[],
|
|
208
|
-
appFetch: GlobalFetch["fetch"] = fetch
|
|
209
|
-
): Promise<string[]> {
|
|
210
|
-
return Promise.all(
|
|
211
|
-
chain.map(async (token, index) => {
|
|
212
|
-
const decoded = decode(token);
|
|
213
|
-
|
|
214
|
-
const entityStatementResult = EntityStatementShape.safeParse(decoded);
|
|
215
|
-
const entityConfigurationResult =
|
|
216
|
-
EntityConfigurationShape.safeParse(decoded);
|
|
217
|
-
|
|
218
|
-
if (entityConfigurationResult.success) {
|
|
219
|
-
return getSignedEntityConfiguration(
|
|
220
|
-
entityConfigurationResult.data.payload.iss,
|
|
221
|
-
{ appFetch }
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
if (entityStatementResult.success) {
|
|
225
|
-
const entityStatement = entityStatementResult.data;
|
|
226
|
-
|
|
227
|
-
const parentBaseUrl = entityStatement.payload.iss;
|
|
228
|
-
const parentECJwt = await getSignedEntityConfiguration(
|
|
229
|
-
parentBaseUrl,
|
|
230
|
-
{ appFetch }
|
|
231
|
-
);
|
|
232
|
-
const parentEC = EntityConfigurationShape.parse(decode(parentECJwt));
|
|
233
|
-
|
|
234
|
-
const federationFetchEndpoint =
|
|
235
|
-
parentEC.payload.metadata.federation_entity
|
|
236
|
-
.federation_fetch_endpoint;
|
|
237
|
-
if (!federationFetchEndpoint) {
|
|
238
|
-
throw new MissingFederationFetchEndpointError(
|
|
239
|
-
`Parent EC at ${parentBaseUrl} is missing federation_fetch_endpoint, cannot renew ES for ${entityStatement.payload.sub}.`,
|
|
240
|
-
{
|
|
241
|
-
entityBaseUrl: entityStatement.payload.sub,
|
|
242
|
-
missingInEntityUrl: parentBaseUrl,
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
return getSignedEntityStatement(
|
|
247
|
-
federationFetchEndpoint,
|
|
248
|
-
entityStatement.payload.sub,
|
|
249
|
-
{ appFetch }
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
throw new TrustChainRenewalError(
|
|
253
|
-
`Failed to renew trust chain. Reason: element #${index} failed to parse.`,
|
|
254
|
-
{ originalChain: chain }
|
|
255
|
-
);
|
|
256
|
-
})
|
|
257
|
-
);
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Factory function to create `verifyTrustChain`.
|
|
263
|
-
* @param config Version specific Entity shapes
|
|
264
|
-
* @returns `verifyTrustChain` function compliant with the public API
|
|
265
|
-
*/
|
|
266
|
-
export function createVerifyTrustChain(
|
|
267
|
-
config: BuilderConfig
|
|
268
|
-
): TrustApi["verifyTrustChain"] {
|
|
269
|
-
return async function verifyTrustChain(
|
|
270
|
-
trustAnchorEntity,
|
|
271
|
-
chain,
|
|
272
|
-
x509Options = {
|
|
273
|
-
connectTimeout: 10000,
|
|
274
|
-
readTimeout: 10000,
|
|
275
|
-
requireCrl: true,
|
|
276
|
-
},
|
|
277
|
-
{ appFetch = fetch, renewOnFail = true } = {}
|
|
278
|
-
) {
|
|
279
|
-
const validateTrustChain = createValidateTrustChain(config);
|
|
280
|
-
const renewTrustChain = createRenewTrustChain(config);
|
|
281
|
-
|
|
282
|
-
try {
|
|
283
|
-
return await validateTrustChain(trustAnchorEntity, chain, x509Options);
|
|
284
|
-
} catch (error) {
|
|
285
|
-
if (renewOnFail) {
|
|
286
|
-
const renewedChain = await renewTrustChain(chain, appFetch);
|
|
287
|
-
return validateTrustChain(trustAnchorEntity, renewedChain, x509Options);
|
|
288
|
-
} else {
|
|
289
|
-
throw error;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
}
|
|
@@ -3,6 +3,6 @@ import { EntityStatement } from "../common/types";
|
|
|
3
3
|
import { EntityConfiguration } from "./types";
|
|
4
4
|
|
|
5
5
|
export const buildTrustChain = createBuildTrustChain({
|
|
6
|
-
EntityStatementShape: EntityStatement,
|
|
7
6
|
EntityConfigurationShape: EntityConfiguration,
|
|
7
|
+
EntityStatementShape: EntityStatement,
|
|
8
8
|
});
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
|
|
1
3
|
import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
type FetchOptions,
|
|
7
|
+
getSignedEntityConfiguration,
|
|
8
|
+
} from "../common/utils";
|
|
2
9
|
import {
|
|
3
|
-
WalletProviderEntityConfiguration,
|
|
4
10
|
CredentialIssuerEntityConfiguration,
|
|
5
11
|
EntityConfiguration,
|
|
6
12
|
RelyingPartyEntityConfiguration,
|
|
7
13
|
TrustAnchorEntityConfiguration,
|
|
14
|
+
WalletProviderEntityConfiguration,
|
|
8
15
|
} from "./types";
|
|
9
|
-
import type { z } from "zod";
|
|
10
|
-
import {
|
|
11
|
-
getSignedEntityConfiguration,
|
|
12
|
-
type FetchOptions,
|
|
13
|
-
} from "../common/utils";
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* Fetch and parse the entity configuration document for a given federation entity.
|
|
@@ -33,7 +35,7 @@ import {
|
|
|
33
35
|
async function fetchAndParseEntityConfiguration<T extends EntityConfiguration>(
|
|
34
36
|
entityBaseUrl: string,
|
|
35
37
|
schema: z.ZodType<T>,
|
|
36
|
-
{ appFetch = fetch }: FetchOptions = {}
|
|
38
|
+
{ appFetch = fetch }: FetchOptions = {},
|
|
37
39
|
): Promise<T> {
|
|
38
40
|
const responseText = await getSignedEntityConfiguration(entityBaseUrl, {
|
|
39
41
|
appFetch,
|
|
@@ -48,46 +50,46 @@ async function fetchAndParseEntityConfiguration<T extends EntityConfiguration>(
|
|
|
48
50
|
|
|
49
51
|
export const getWalletProviderEntityConfiguration = (
|
|
50
52
|
entityBaseUrl: string,
|
|
51
|
-
options?: FetchOptions
|
|
53
|
+
options?: FetchOptions,
|
|
52
54
|
) =>
|
|
53
55
|
fetchAndParseEntityConfiguration(
|
|
54
56
|
entityBaseUrl,
|
|
55
57
|
WalletProviderEntityConfiguration,
|
|
56
|
-
options
|
|
58
|
+
options,
|
|
57
59
|
);
|
|
58
60
|
|
|
59
61
|
export const getCredentialIssuerEntityConfiguration = (
|
|
60
62
|
entityBaseUrl: string,
|
|
61
|
-
options?: FetchOptions
|
|
63
|
+
options?: FetchOptions,
|
|
62
64
|
) =>
|
|
63
65
|
fetchAndParseEntityConfiguration(
|
|
64
66
|
entityBaseUrl,
|
|
65
67
|
CredentialIssuerEntityConfiguration,
|
|
66
|
-
options
|
|
68
|
+
options,
|
|
67
69
|
);
|
|
68
70
|
|
|
69
71
|
export const getTrustAnchorEntityConfiguration = (
|
|
70
72
|
entityBaseUrl: string,
|
|
71
|
-
options?: FetchOptions
|
|
73
|
+
options?: FetchOptions,
|
|
72
74
|
) =>
|
|
73
75
|
fetchAndParseEntityConfiguration(
|
|
74
76
|
entityBaseUrl,
|
|
75
77
|
TrustAnchorEntityConfiguration,
|
|
76
|
-
options
|
|
78
|
+
options,
|
|
77
79
|
);
|
|
78
80
|
|
|
79
81
|
export const getRelyingPartyEntityConfiguration = (
|
|
80
82
|
entityBaseUrl: string,
|
|
81
|
-
options?: FetchOptions
|
|
83
|
+
options?: FetchOptions,
|
|
82
84
|
) =>
|
|
83
85
|
fetchAndParseEntityConfiguration(
|
|
84
86
|
entityBaseUrl,
|
|
85
87
|
RelyingPartyEntityConfiguration,
|
|
86
|
-
options
|
|
88
|
+
options,
|
|
87
89
|
);
|
|
88
90
|
|
|
89
91
|
export const getEntityConfiguration = (
|
|
90
92
|
entityBaseUrl: string,
|
|
91
|
-
options?: FetchOptions
|
|
93
|
+
options?: FetchOptions,
|
|
92
94
|
) =>
|
|
93
95
|
fetchAndParseEntityConfiguration(entityBaseUrl, EntityConfiguration, options);
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { TrustApi } from "../api";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { withMapperAsync } from "../../utils/mappers";
|
|
4
|
-
import { mapToTrustAnchorConfig } from "./mappers";
|
|
5
4
|
import { buildTrustChain } from "./build-chain";
|
|
5
|
+
import { getTrustAnchorEntityConfiguration } from "./entities";
|
|
6
|
+
import { mapToTrustAnchorConfig } from "./mappers";
|
|
6
7
|
import { verifyTrustChain } from "./verify-chain";
|
|
7
8
|
|
|
8
9
|
export const Trust: TrustApi = {
|
|
10
|
+
buildTrustChain,
|
|
9
11
|
getTrustAnchorEntityConfiguration: withMapperAsync(
|
|
10
12
|
mapToTrustAnchorConfig,
|
|
11
|
-
getTrustAnchorEntityConfiguration
|
|
13
|
+
getTrustAnchorEntityConfiguration,
|
|
12
14
|
),
|
|
13
|
-
buildTrustChain,
|
|
14
15
|
verifyTrustChain,
|
|
15
16
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { TrustAnchorConfig } from "../api/TrustAnchorConfig";
|
|
2
|
+
|
|
1
3
|
import { createMapper } from "../../utils/mappers";
|
|
2
4
|
import { TrustAnchorEntityConfiguration } from "./types";
|
|
3
|
-
import type { TrustAnchorConfig } from "../api/TrustAnchorConfig";
|
|
4
5
|
|
|
5
6
|
export const mapToTrustAnchorConfig = createMapper<
|
|
6
7
|
TrustAnchorEntityConfiguration,
|
|
@@ -8,8 +9,8 @@ export const mapToTrustAnchorConfig = createMapper<
|
|
|
8
9
|
>((x) => {
|
|
9
10
|
const { federation_entity } = x.payload.metadata;
|
|
10
11
|
return {
|
|
12
|
+
federation_entity,
|
|
11
13
|
jwt: { header: x.header },
|
|
12
14
|
keys: x.payload.jwks.keys,
|
|
13
|
-
federation_entity,
|
|
14
15
|
};
|
|
15
16
|
});
|