@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
package/src/utils/dpop.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { type CryptoContext, SignJWT } from "@pagopa/io-react-native-jwt";
|
|
1
2
|
import * as z from "zod";
|
|
2
3
|
|
|
3
|
-
import { SignJWT, type CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Create a signed DPoP token
|
|
7
6
|
*
|
|
@@ -12,14 +11,14 @@ import { SignJWT, type CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
|
12
11
|
*/
|
|
13
12
|
export const createDPopToken = async (
|
|
14
13
|
payload: DPoPPayload,
|
|
15
|
-
crypto: CryptoContext
|
|
14
|
+
crypto: CryptoContext,
|
|
16
15
|
): Promise<string> => {
|
|
17
16
|
const jwk = await crypto.getPublicKey();
|
|
18
17
|
return new SignJWT(crypto)
|
|
19
18
|
.setPayload(payload)
|
|
20
19
|
.setProtectedHeader({
|
|
21
|
-
typ: "dpop+jwt",
|
|
22
20
|
jwk,
|
|
21
|
+
typ: "dpop+jwt",
|
|
23
22
|
})
|
|
24
23
|
.setIssuedAt()
|
|
25
24
|
.setExpirationTime("1h")
|
|
@@ -28,8 +27,8 @@ export const createDPopToken = async (
|
|
|
28
27
|
|
|
29
28
|
export type DPoPPayload = z.infer<typeof DPoPPayload>;
|
|
30
29
|
export const DPoPPayload = z.object({
|
|
31
|
-
|
|
30
|
+
ath: z.string().optional(),
|
|
32
31
|
htm: z.enum(["POST", "GET"]),
|
|
33
32
|
htu: z.string(),
|
|
34
|
-
|
|
33
|
+
jti: z.string(),
|
|
35
34
|
});
|
package/src/utils/error-codes.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export const IssuerResponseErrorCodes = {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Error code thrown when a credential status is invalid, either during issuance or when requesting a status attestation.
|
|
4
|
+
*/
|
|
5
|
+
CredentialInvalidStatus: "ERR_CREDENTIAL_INVALID_STATUS",
|
|
3
6
|
/**
|
|
4
7
|
* Error code thrown when a credential cannot be issued immediately because it follows the async flow.
|
|
5
8
|
*/
|
|
@@ -8,58 +11,55 @@ export const IssuerResponseErrorCodes = {
|
|
|
8
11
|
* Error code thrown when an error occurs while requesting a credential.
|
|
9
12
|
*/
|
|
10
13
|
CredentialRequestFailed: "ERR_CREDENTIAL_REQUEST_FAILED",
|
|
14
|
+
IssuerGenericError: "ERR_ISSUER_GENERIC_ERROR",
|
|
11
15
|
/**
|
|
12
|
-
* Error code thrown when
|
|
16
|
+
* Error code thrown when an error occurs while initializing the MRTD challenge.
|
|
13
17
|
*/
|
|
14
|
-
|
|
18
|
+
MrtdChallengeInitRequestFailed: "ERR_MRTD_CHALLENGE_INIT_REQUEST_FAILED",
|
|
15
19
|
/**
|
|
16
20
|
* Error code thrown when an error occurs while obtaining a status attestation for a credential.
|
|
17
21
|
*/
|
|
18
22
|
StatusAttestationRequestFailed: "ERR_STATUS_ATTESTATION_REQUEST_FAILED",
|
|
19
|
-
/**
|
|
20
|
-
* Error code thrown when an error occurs while initializing the MRTD challenge.
|
|
21
|
-
*/
|
|
22
|
-
MrtdChallengeInitRequestFailed: "ERR_MRTD_CHALLENGE_INIT_REQUEST_FAILED",
|
|
23
23
|
} as const;
|
|
24
24
|
|
|
25
25
|
export const WalletProviderResponseErrorCodes = {
|
|
26
|
-
WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR",
|
|
27
|
-
/**
|
|
28
|
-
* An error code thrown when an error occurs during the wallet instance creation process.
|
|
29
|
-
*/
|
|
30
|
-
WalletInstanceCreationFailed: "ERR_IO_WALLET_INSTANCE_CREATION_FAILED",
|
|
31
26
|
/**
|
|
32
27
|
* An error code thrown when validation fail
|
|
33
28
|
*/
|
|
34
29
|
WalletInstanceAttestationIssuingFailed:
|
|
35
30
|
"ERR_IO_WALLET_INSTANCE_ATTESTATION_ISSUING_FAILED",
|
|
36
31
|
/**
|
|
37
|
-
* An error code thrown when
|
|
32
|
+
* An error code thrown when an error occurs during the wallet instance creation process.
|
|
38
33
|
*/
|
|
39
|
-
|
|
34
|
+
WalletInstanceCreationFailed: "ERR_IO_WALLET_INSTANCE_CREATION_FAILED",
|
|
40
35
|
/**
|
|
41
|
-
* An error code thrown when
|
|
36
|
+
* An error code thrown when the requester does not pass the integrity checks when interacting with the Wallet Provider.
|
|
42
37
|
*/
|
|
43
|
-
|
|
38
|
+
WalletInstanceIntegrityFailed: "ERR_IO_WALLET_INSTANCE_INTEGRITY_FAILED",
|
|
44
39
|
/**
|
|
45
40
|
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is not found.
|
|
46
41
|
*/
|
|
47
42
|
WalletInstanceNotFound: "ERR_IO_WALLET_INSTANCE_NOT_FOUND",
|
|
43
|
+
/**
|
|
44
|
+
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is revoked.
|
|
45
|
+
*/
|
|
46
|
+
WalletInstanceRevoked: "ERR_IO_WALLET_INSTANCE_REVOKED",
|
|
47
|
+
WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR",
|
|
48
48
|
} as const;
|
|
49
49
|
|
|
50
50
|
export const RelyingPartyResponseErrorCodes = {
|
|
51
|
-
RelyingPartyGenericError: "ERR_RP_GENERIC_ERROR",
|
|
52
51
|
/**
|
|
53
52
|
* An error code thrown then the Relying Party rejects the Wallet's Authorization Response.
|
|
54
53
|
*/
|
|
55
54
|
InvalidAuthorizationResponse: "ERR_RP_INVALID_AUTHORIZATION_RESPONSE",
|
|
55
|
+
RelyingPartyGenericError: "ERR_RP_GENERIC_ERROR",
|
|
56
56
|
} as const;
|
|
57
57
|
|
|
58
58
|
export type IssuerResponseErrorCode =
|
|
59
59
|
(typeof IssuerResponseErrorCodes)[keyof typeof IssuerResponseErrorCodes];
|
|
60
60
|
|
|
61
|
-
export type WalletProviderResponseErrorCode =
|
|
62
|
-
(typeof WalletProviderResponseErrorCodes)[keyof typeof WalletProviderResponseErrorCodes];
|
|
63
|
-
|
|
64
61
|
export type RelyingPartyResponseErrorCode =
|
|
65
62
|
(typeof RelyingPartyResponseErrorCodes)[keyof typeof RelyingPartyResponseErrorCodes];
|
|
63
|
+
|
|
64
|
+
export type WalletProviderResponseErrorCode =
|
|
65
|
+
(typeof WalletProviderResponseErrorCodes)[keyof typeof WalletProviderResponseErrorCodes];
|
package/src/utils/errors.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { UnexpectedStatusCodeError as SdkUnexpectedStatusCodeError } from "@pagopa/io-wallet-utils";
|
|
2
|
+
|
|
2
3
|
import type { ProblemJson } from "../client/generated/wallet-provider";
|
|
3
4
|
import type { IssuerConfig } from "../credential/issuance/api";
|
|
5
|
+
|
|
4
6
|
import {
|
|
5
7
|
type IssuerResponseErrorCode,
|
|
6
8
|
IssuerResponseErrorCodes,
|
|
@@ -12,12 +14,12 @@ import {
|
|
|
12
14
|
|
|
13
15
|
export {
|
|
14
16
|
IssuerResponseErrorCodes,
|
|
15
|
-
WalletProviderResponseErrorCodes,
|
|
16
17
|
RelyingPartyResponseErrorCodes,
|
|
18
|
+
WalletProviderResponseErrorCodes,
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
// An error reason that supports both a string and a generic JSON object
|
|
20
|
-
type GenericErrorReason =
|
|
22
|
+
type GenericErrorReason = Record<string, unknown> | string;
|
|
21
23
|
|
|
22
24
|
/**
|
|
23
25
|
* utility to format a set of attributes into an error message string
|
|
@@ -30,7 +32,7 @@ type GenericErrorReason = string | Record<string, unknown>;
|
|
|
30
32
|
* @returns a human-readable serialization of the set
|
|
31
33
|
*/
|
|
32
34
|
export const serializeAttrs = (
|
|
33
|
-
attrs: Record<string, GenericErrorReason | number |
|
|
35
|
+
attrs: Record<string, GenericErrorReason | number | string[] | undefined>,
|
|
34
36
|
): string =>
|
|
35
37
|
Object.entries(attrs)
|
|
36
38
|
.filter(([, v]) => v !== undefined)
|
|
@@ -58,10 +60,10 @@ export const serializeAttrs = (
|
|
|
58
60
|
* (e) => new InvalidCredentialOfferError(e.message)
|
|
59
61
|
* );
|
|
60
62
|
*/
|
|
61
|
-
export const withMappedErrors = <T, E extends Error>(
|
|
63
|
+
export const withMappedErrors = <T, E extends Error, Args extends unknown[]>(
|
|
62
64
|
fn: () => T,
|
|
63
|
-
sourceError: new (...args:
|
|
64
|
-
mapError: (error: E) => Error
|
|
65
|
+
sourceError: new (...args: Args) => E,
|
|
66
|
+
mapError: (error: E) => Error,
|
|
65
67
|
): T => {
|
|
66
68
|
try {
|
|
67
69
|
return fn();
|
|
@@ -73,6 +75,14 @@ export const withMappedErrors = <T, E extends Error>(
|
|
|
73
75
|
}
|
|
74
76
|
};
|
|
75
77
|
|
|
78
|
+
type LocalizedIssuanceError = Record<
|
|
79
|
+
string,
|
|
80
|
+
{
|
|
81
|
+
description: string;
|
|
82
|
+
title: string;
|
|
83
|
+
}
|
|
84
|
+
>;
|
|
85
|
+
|
|
76
86
|
/**
|
|
77
87
|
* A generic Error that all other io-wallet specific Error subclasses extend.
|
|
78
88
|
*
|
|
@@ -86,7 +96,7 @@ export const withMappedErrors = <T, E extends Error>(
|
|
|
86
96
|
*/
|
|
87
97
|
export class IoWalletError extends Error {
|
|
88
98
|
/** A unique error code for the particular error subclass. */
|
|
89
|
-
code
|
|
99
|
+
code = "ERR_IO_WALLET_GENERIC";
|
|
90
100
|
|
|
91
101
|
constructor(message?: string) {
|
|
92
102
|
super(message);
|
|
@@ -94,41 +104,13 @@ export class IoWalletError extends Error {
|
|
|
94
104
|
}
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
/**
|
|
98
|
-
* An error subclass thrown when validation fail
|
|
99
|
-
*
|
|
100
|
-
*/
|
|
101
|
-
export class ValidationFailed extends IoWalletError {
|
|
102
|
-
code = "ERR_IO_WALLET_VALIDATION_FAILED";
|
|
103
|
-
|
|
104
|
-
/** The Claim for which the validation failed. */
|
|
105
|
-
claim: string;
|
|
106
|
-
|
|
107
|
-
/** Reason code for the validation failure. */
|
|
108
|
-
reason: string;
|
|
109
|
-
|
|
110
|
-
constructor({
|
|
111
|
-
message,
|
|
112
|
-
claim = "unspecified",
|
|
113
|
-
reason = "unspecified",
|
|
114
|
-
}: {
|
|
115
|
-
message: string;
|
|
116
|
-
claim?: string;
|
|
117
|
-
reason?: string;
|
|
118
|
-
}) {
|
|
119
|
-
super(serializeAttrs({ message, claim, reason }));
|
|
120
|
-
this.claim = claim;
|
|
121
|
-
this.reason = reason;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
107
|
/**
|
|
126
108
|
* An error subclass thrown when an HTTP request has a status code different from the one expected.
|
|
127
109
|
*/
|
|
128
110
|
export class UnexpectedStatusCodeError extends IoWalletError {
|
|
129
|
-
code
|
|
130
|
-
statusCode: number;
|
|
111
|
+
code = "ERR_UNEXPECTED_STATUS_CODE";
|
|
131
112
|
reason: GenericErrorReason;
|
|
113
|
+
statusCode: number;
|
|
132
114
|
|
|
133
115
|
constructor({
|
|
134
116
|
message,
|
|
@@ -164,53 +146,74 @@ export class IssuerResponseError extends UnexpectedStatusCodeError {
|
|
|
164
146
|
}
|
|
165
147
|
|
|
166
148
|
/**
|
|
167
|
-
* An error subclass thrown when a
|
|
149
|
+
* An error subclass thrown when a Relying Party HTTP request fails.
|
|
168
150
|
* The specific error can be found in the `code` property.
|
|
169
151
|
*/
|
|
170
|
-
export class
|
|
171
|
-
code:
|
|
172
|
-
reason: ProblemJson;
|
|
152
|
+
export class RelyingPartyResponseError extends UnexpectedStatusCodeError {
|
|
153
|
+
code: RelyingPartyResponseErrorCode;
|
|
173
154
|
|
|
174
155
|
constructor(params: {
|
|
175
|
-
code?:
|
|
156
|
+
code?: RelyingPartyResponseErrorCode;
|
|
176
157
|
message: string;
|
|
177
|
-
reason:
|
|
158
|
+
reason: GenericErrorReason;
|
|
178
159
|
statusCode: number;
|
|
179
160
|
}) {
|
|
180
161
|
super(params);
|
|
181
|
-
this.reason = params.reason;
|
|
182
162
|
this.code =
|
|
183
|
-
params.code ??
|
|
184
|
-
WalletProviderResponseErrorCodes.WalletProviderGenericError;
|
|
163
|
+
params.code ?? RelyingPartyResponseErrorCodes.RelyingPartyGenericError;
|
|
185
164
|
}
|
|
186
165
|
}
|
|
187
166
|
|
|
188
167
|
/**
|
|
189
|
-
* An error subclass thrown when
|
|
168
|
+
* An error subclass thrown when validation fail
|
|
169
|
+
*
|
|
170
|
+
*/
|
|
171
|
+
export class ValidationFailed extends IoWalletError {
|
|
172
|
+
/** The Claim for which the validation failed. */
|
|
173
|
+
claim: string;
|
|
174
|
+
|
|
175
|
+
code = "ERR_IO_WALLET_VALIDATION_FAILED";
|
|
176
|
+
|
|
177
|
+
/** Reason code for the validation failure. */
|
|
178
|
+
reason: string;
|
|
179
|
+
|
|
180
|
+
constructor({
|
|
181
|
+
claim = "unspecified",
|
|
182
|
+
message,
|
|
183
|
+
reason = "unspecified",
|
|
184
|
+
}: {
|
|
185
|
+
claim?: string;
|
|
186
|
+
message: string;
|
|
187
|
+
reason?: string;
|
|
188
|
+
}) {
|
|
189
|
+
super(serializeAttrs({ claim, message, reason }));
|
|
190
|
+
this.claim = claim;
|
|
191
|
+
this.reason = reason;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* An error subclass thrown when a Wallet Provider HTTP request fails.
|
|
190
197
|
* The specific error can be found in the `code` property.
|
|
191
198
|
*/
|
|
192
|
-
export class
|
|
193
|
-
code:
|
|
199
|
+
export class WalletProviderResponseError extends UnexpectedStatusCodeError {
|
|
200
|
+
code: WalletProviderResponseErrorCode;
|
|
201
|
+
reason: ProblemJson;
|
|
194
202
|
|
|
195
203
|
constructor(params: {
|
|
196
|
-
code?:
|
|
204
|
+
code?: WalletProviderResponseErrorCode;
|
|
197
205
|
message: string;
|
|
198
|
-
reason:
|
|
206
|
+
reason: ProblemJson;
|
|
199
207
|
statusCode: number;
|
|
200
208
|
}) {
|
|
201
209
|
super(params);
|
|
210
|
+
this.reason = params.reason;
|
|
202
211
|
this.code =
|
|
203
|
-
params.code ??
|
|
212
|
+
params.code ??
|
|
213
|
+
WalletProviderResponseErrorCodes.WalletProviderGenericError;
|
|
204
214
|
}
|
|
205
215
|
}
|
|
206
216
|
|
|
207
|
-
type LocalizedIssuanceError = {
|
|
208
|
-
[locale: string]: {
|
|
209
|
-
title: string;
|
|
210
|
-
description: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
|
|
214
217
|
/**
|
|
215
218
|
* Function to extract the error message from the Entity Configuration's supported error codes.
|
|
216
219
|
* @param errorCode The error code to map to a meaningful message
|
|
@@ -222,33 +225,34 @@ type LocalizedIssuanceError = {
|
|
|
222
225
|
export function extractErrorMessageFromIssuerConf(
|
|
223
226
|
errorCode: string,
|
|
224
227
|
{
|
|
225
|
-
issuerConf,
|
|
226
228
|
credentialType,
|
|
229
|
+
issuerConf,
|
|
227
230
|
}: {
|
|
228
|
-
issuerConf: IssuerConfig;
|
|
229
231
|
credentialType: string;
|
|
230
|
-
|
|
232
|
+
issuerConf: IssuerConfig;
|
|
233
|
+
},
|
|
231
234
|
): LocalizedIssuanceError | undefined {
|
|
232
235
|
const credentialConfiguration =
|
|
233
236
|
issuerConf.credential_configurations_supported[credentialType];
|
|
234
237
|
|
|
235
238
|
if (!credentialConfiguration) {
|
|
236
239
|
throw new IoWalletError(
|
|
237
|
-
`No configuration found for ${credentialType} in the provided EC
|
|
240
|
+
`No configuration found for ${credentialType} in the provided EC`,
|
|
238
241
|
);
|
|
239
242
|
}
|
|
240
243
|
|
|
241
244
|
const { issuance_errors_supported } = credentialConfiguration;
|
|
242
245
|
|
|
243
|
-
|
|
246
|
+
const errorConfig = issuance_errors_supported?.[errorCode];
|
|
247
|
+
if (!errorConfig) {
|
|
244
248
|
return undefined;
|
|
245
249
|
}
|
|
246
250
|
|
|
247
|
-
const localesList =
|
|
251
|
+
const localesList = errorConfig.display;
|
|
248
252
|
|
|
249
253
|
return localesList.reduce(
|
|
250
254
|
(acc, { locale, ...rest }) => ({ ...acc, [locale]: rest }),
|
|
251
|
-
{} as LocalizedIssuanceError
|
|
255
|
+
{} as LocalizedIssuanceError,
|
|
252
256
|
);
|
|
253
257
|
}
|
|
254
258
|
|
|
@@ -265,35 +269,35 @@ const makeErrorTypeGuard =
|
|
|
265
269
|
|
|
266
270
|
export const isIssuerResponseError = makeErrorTypeGuard(IssuerResponseError);
|
|
267
271
|
export const isWalletProviderResponseError = makeErrorTypeGuard(
|
|
268
|
-
WalletProviderResponseError
|
|
272
|
+
WalletProviderResponseError,
|
|
269
273
|
);
|
|
270
274
|
export const isRelyingPartyResponseError = makeErrorTypeGuard(
|
|
271
|
-
RelyingPartyResponseError
|
|
275
|
+
RelyingPartyResponseError,
|
|
272
276
|
);
|
|
273
277
|
|
|
278
|
+
interface ErrorCase<T> {
|
|
279
|
+
code: ExtractErrorCode<T>;
|
|
280
|
+
message: string;
|
|
281
|
+
reason?: GenericErrorReason;
|
|
282
|
+
}
|
|
283
|
+
|
|
274
284
|
// Mapping type between error classes and their allowed codes
|
|
275
285
|
type ErrorCodeMap =
|
|
276
286
|
| {
|
|
277
|
-
type: typeof IssuerResponseError;
|
|
278
287
|
code: IssuerResponseErrorCode;
|
|
288
|
+
type: typeof IssuerResponseError;
|
|
279
289
|
}
|
|
280
290
|
| {
|
|
281
|
-
|
|
282
|
-
|
|
291
|
+
code: RelyingPartyResponseErrorCode;
|
|
292
|
+
type: typeof RelyingPartyResponseError;
|
|
283
293
|
}
|
|
284
294
|
| {
|
|
285
|
-
|
|
286
|
-
|
|
295
|
+
code: WalletProviderResponseErrorCode;
|
|
296
|
+
type: typeof WalletProviderResponseError;
|
|
287
297
|
};
|
|
288
298
|
|
|
289
299
|
type ExtractErrorCode<T> = Extract<ErrorCodeMap, { type: T }>["code"];
|
|
290
300
|
|
|
291
|
-
type ErrorCase<T> = {
|
|
292
|
-
code: ExtractErrorCode<T>;
|
|
293
|
-
message: string;
|
|
294
|
-
reason?: GenericErrorReason;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
301
|
/**
|
|
298
302
|
* Builder class used to create specialized errors from type {@link UnexpectedStatusCodeError} that handles multiple status codes.
|
|
299
303
|
*
|
|
@@ -309,17 +313,10 @@ type ErrorCase<T> = {
|
|
|
309
313
|
* ```
|
|
310
314
|
*/
|
|
311
315
|
export class ResponseErrorBuilder<T extends typeof UnexpectedStatusCodeError> {
|
|
312
|
-
private errorCases: {
|
|
313
|
-
[K in number | "*"]?: ErrorCase<T>;
|
|
314
|
-
} = {};
|
|
316
|
+
private errorCases: Partial<Record<"*" | number, ErrorCase<T>>> = {};
|
|
315
317
|
|
|
316
318
|
constructor(private ErrorClass: T) {}
|
|
317
319
|
|
|
318
|
-
handle(status: number | "*", params: ErrorCase<T>) {
|
|
319
|
-
this.errorCases[status] = params;
|
|
320
|
-
return this;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
320
|
buildFrom(originalError: UnexpectedStatusCodeError) {
|
|
324
321
|
const params =
|
|
325
322
|
this.errorCases[originalError.statusCode] ?? this.errorCases["*"];
|
|
@@ -330,6 +327,11 @@ export class ResponseErrorBuilder<T extends typeof UnexpectedStatusCodeError> {
|
|
|
330
327
|
|
|
331
328
|
return originalError;
|
|
332
329
|
}
|
|
330
|
+
|
|
331
|
+
handle(status: "*" | number, params: ErrorCase<T>) {
|
|
332
|
+
this.errorCases[status] = params;
|
|
333
|
+
return this;
|
|
334
|
+
}
|
|
333
335
|
}
|
|
334
336
|
|
|
335
337
|
/**
|
package/src/utils/integrity.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type returned by the getHardwareSignatureWithAuthData function of {@link IntegrityContext}.
|
|
3
|
+
* It contains the signature and the authenticator data.
|
|
4
|
+
*/
|
|
5
|
+
export interface HardwareSignatureWithAuthData {
|
|
6
|
+
authenticatorData: string;
|
|
7
|
+
signature: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* Interface for the integrity context which provides the necessary functions to interact with the integrity service.
|
|
3
12
|
* The functions are platform specific and must be implemented in the platform specific code.
|
|
@@ -6,18 +15,9 @@
|
|
|
6
15
|
* getHardwareSignatureWithAuthData: signs the clientData and returns the signature with the authenticator data.
|
|
7
16
|
*/
|
|
8
17
|
export interface IntegrityContext {
|
|
9
|
-
getHardwareKeyTag: () => string;
|
|
10
18
|
getAttestation: (nonce: string) => Promise<string>;
|
|
19
|
+
getHardwareKeyTag: () => string;
|
|
11
20
|
getHardwareSignatureWithAuthData: (
|
|
12
|
-
clientData: string
|
|
21
|
+
clientData: string,
|
|
13
22
|
) => Promise<HardwareSignatureWithAuthData>;
|
|
14
23
|
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Type returned by the getHardwareSignatureWithAuthData function of {@link IntegrityContext}.
|
|
18
|
-
* It contains the signature and the authenticator data.
|
|
19
|
-
*/
|
|
20
|
-
export type HardwareSignatureWithAuthData = {
|
|
21
|
-
signature: string;
|
|
22
|
-
authenticatorData: string;
|
|
23
|
-
};
|
package/src/utils/jwk.ts
CHANGED
|
@@ -28,7 +28,6 @@ export const JWK = z.object({
|
|
|
28
28
|
/** JWK "use" (Public Key Use) Parameter. */
|
|
29
29
|
use: z.string().optional(),
|
|
30
30
|
x: z.string().optional(),
|
|
31
|
-
y: z.string().optional(),
|
|
32
31
|
/** JWK "x5c" (X.509 Certificate Chain) Parameter. */
|
|
33
32
|
x5c: z.array(z.string()).optional(),
|
|
34
33
|
/** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter. */
|
|
@@ -37,8 +36,11 @@ export const JWK = z.object({
|
|
|
37
36
|
"x5t#S256": z.string().optional(),
|
|
38
37
|
/** JWK "x5u" (X.509 URL) Parameter. */
|
|
39
38
|
x5u: z.string().optional(),
|
|
39
|
+
y: z.string().optional(),
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
export type JWKS = z.infer<typeof JWKS>;
|
|
43
|
+
|
|
42
44
|
/**
|
|
43
45
|
* Ensure key values are encoded using base64url and not just base64, as defined in https://datatracker.ietf.org/doc/html/rfc7517
|
|
44
46
|
*
|
|
@@ -48,7 +50,7 @@ export const JWK = z.object({
|
|
|
48
50
|
* @returns THe same input key with fixed values
|
|
49
51
|
*/
|
|
50
52
|
export function fixBase64EncodingOnKey(key: JWK): JWK {
|
|
51
|
-
const {
|
|
53
|
+
const { e, n, x, y, ...pk } = key;
|
|
52
54
|
|
|
53
55
|
return {
|
|
54
56
|
...pk,
|
|
@@ -58,8 +60,6 @@ export function fixBase64EncodingOnKey(key: JWK): JWK {
|
|
|
58
60
|
...(n ? { n: removePadding(n) } : {}),
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
|
-
|
|
62
|
-
export type JWKS = z.infer<typeof JWKS>;
|
|
63
63
|
export const JWKS = z.object({
|
|
64
64
|
keys: z.array(JWK),
|
|
65
65
|
});
|
package/src/utils/logging.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logger interface which can be provided to the Logger class as a custom implementation.
|
|
3
|
-
*/
|
|
4
|
-
export interface LoggingContext {
|
|
5
|
-
logDebug: (msg: string) => void;
|
|
6
|
-
logInfo: (msg: string) => void;
|
|
7
|
-
logWarn: (msg: string) => void;
|
|
8
|
-
logError: (msg: string) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
/**
|
|
12
2
|
* Supported debug levels.
|
|
13
3
|
*/
|
|
@@ -18,6 +8,16 @@ export enum LogLevel {
|
|
|
18
8
|
ERROR,
|
|
19
9
|
}
|
|
20
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Logger interface which can be provided to the Logger class as a custom implementation.
|
|
13
|
+
*/
|
|
14
|
+
export interface LoggingContext {
|
|
15
|
+
logDebug: (msg: string) => void;
|
|
16
|
+
logError: (msg: string) => void;
|
|
17
|
+
logInfo: (msg: string) => void;
|
|
18
|
+
logWarn: (msg: string) => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
21
|
/**
|
|
22
22
|
* Logger singleton class which provides a simple logging interface with an init function to set the logging context and
|
|
23
23
|
* a static log function to log messages based on the debug level.
|
|
@@ -30,8 +30,9 @@ export class Logger {
|
|
|
30
30
|
private static instance: Logger | null = null;
|
|
31
31
|
private static loggingContext?: LoggingContext;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
private constructor() {
|
|
34
|
+
/* Private constructor to prevent direct instantiation */
|
|
35
|
+
}
|
|
35
36
|
|
|
36
37
|
// Public static method to get the Logger instance
|
|
37
38
|
public static getInstance(): Logger {
|
|
@@ -41,11 +42,6 @@ export class Logger {
|
|
|
41
42
|
return Logger.instance;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
// Method to initialize the logging context
|
|
45
|
-
public initLogging(loggingCtx: LoggingContext): void {
|
|
46
|
-
Logger.loggingContext = loggingCtx;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
45
|
// Method to log based on the level which wraps the null check for the logging context
|
|
50
46
|
public static log(level: LogLevel, msg: string): void {
|
|
51
47
|
if (Logger.loggingContext) {
|
|
@@ -53,16 +49,21 @@ export class Logger {
|
|
|
53
49
|
case LogLevel.DEBUG:
|
|
54
50
|
Logger.loggingContext.logDebug(msg);
|
|
55
51
|
break;
|
|
52
|
+
case LogLevel.ERROR:
|
|
53
|
+
Logger.loggingContext.logError(msg);
|
|
54
|
+
break;
|
|
56
55
|
case LogLevel.INFO:
|
|
57
56
|
Logger.loggingContext.logInfo(msg);
|
|
58
57
|
break;
|
|
59
58
|
case LogLevel.WARN:
|
|
60
59
|
Logger.loggingContext.logWarn(msg);
|
|
61
60
|
break;
|
|
62
|
-
case LogLevel.ERROR:
|
|
63
|
-
Logger.loggingContext.logError(msg);
|
|
64
|
-
break;
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
63
|
}
|
|
64
|
+
|
|
65
|
+
// Method to initialize the logging context
|
|
66
|
+
public initLogging(loggingCtx: LoggingContext): void {
|
|
67
|
+
Logger.loggingContext = loggingCtx;
|
|
68
|
+
}
|
|
68
69
|
}
|
package/src/utils/mappers.ts
CHANGED
|
@@ -24,18 +24,21 @@ import * as z from "zod";
|
|
|
24
24
|
export function createMapper<I, O>(mapper: (input: I) => O): (input: I) => O;
|
|
25
25
|
export function createMapper<I, O>(
|
|
26
26
|
mapper: (input: I) => O,
|
|
27
|
-
config: { inputSchema: z.ZodType<I>; outputSchema: z.ZodType<O> }
|
|
27
|
+
config: { inputSchema: z.ZodType<I>; outputSchema: z.ZodType<O> },
|
|
28
28
|
): (input: unknown) => O;
|
|
29
29
|
export function createMapper<I, O>(
|
|
30
30
|
mapper: (input: I) => O,
|
|
31
|
-
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/unified-signatures
|
|
32
|
+
config: { outputSchema: z.ZodType<O> },
|
|
32
33
|
): (input: I) => O;
|
|
33
34
|
export function createMapper<I, O>(
|
|
34
35
|
mapper: (input: I) => O,
|
|
35
36
|
config?: {
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
38
|
inputSchema?: z.ZodType<I, any>;
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
40
|
outputSchema: z.ZodType<O, any>;
|
|
38
|
-
}
|
|
41
|
+
},
|
|
39
42
|
) {
|
|
40
43
|
if (!config) {
|
|
41
44
|
return mapper;
|
|
@@ -58,14 +61,14 @@ export function createMapper<I, O>(
|
|
|
58
61
|
* @fn The function to wrap
|
|
59
62
|
* @return The original function with the mapper applied to its return value
|
|
60
63
|
*/
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
65
|
export const withMapper = <A extends any[], I, O>(
|
|
62
66
|
mapper: (input: I) => O,
|
|
63
|
-
fn: (...args: A) => I
|
|
64
|
-
) =>
|
|
65
|
-
|
|
67
|
+
fn: (...args: A) => I,
|
|
68
|
+
) =>
|
|
69
|
+
function wrappedFunction(...args: A) {
|
|
66
70
|
return mapper(fn(...args));
|
|
67
71
|
};
|
|
68
|
-
};
|
|
69
72
|
|
|
70
73
|
/**
|
|
71
74
|
* Higher order function to pipe an async function return value to the provided mapper.
|
|
@@ -74,11 +77,11 @@ export const withMapper = <A extends any[], I, O>(
|
|
|
74
77
|
* @fn The function to wrap
|
|
75
78
|
* @return The original function with the mapper applied to its return value
|
|
76
79
|
*/
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
81
|
export const withMapperAsync = <A extends any[], I, O>(
|
|
78
82
|
mapper: (input: I) => O,
|
|
79
|
-
fn: (...args: A) => Promise<I
|
|
80
|
-
) =>
|
|
81
|
-
|
|
83
|
+
fn: (...args: A) => Promise<I>,
|
|
84
|
+
) =>
|
|
85
|
+
async function wrappedAsyncFunction(...args: A) {
|
|
82
86
|
return mapper(await fn(...args));
|
|
83
87
|
};
|
|
84
|
-
};
|