@pagopa/io-react-native-wallet 3.6.2 → 3.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/IoWallet.js +5 -3
- package/lib/commonjs/IoWallet.js.map +1 -1
- package/lib/commonjs/api/index.js +19 -19
- package/lib/commonjs/api/index.js.map +1 -1
- package/lib/commonjs/client/generated/wallet-provider.js +23 -4
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/client/index.js +9 -11
- package/lib/commonjs/client/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js +23 -23
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/api/types.js +3 -3
- package/lib/commonjs/credential/issuance/api/types.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +3 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +13 -13
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
- package/lib/commonjs/credential/issuance/common/errors.js +0 -3
- package/lib/commonjs/credential/issuance/common/errors.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js +4 -4
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +18 -18
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +10 -10
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +24 -15
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/index.js +8 -8
- package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +7 -7
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +3 -3
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +30 -30
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +37 -37
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +16 -16
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +32 -28
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/index.js +8 -8
- package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +18 -17
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/offer/common/errors.js +0 -6
- package/lib/commonjs/credential/offer/common/errors.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.0.0/index.js +3 -3
- package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +4 -4
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +4 -4
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js +5 -5
- package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/index.js +1 -1
- package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +8 -8
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/types.js +11 -11
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/errors.js +24 -23
- package/lib/commonjs/credential/presentation/common/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/dcql.js +38 -35
- package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/mdoc.js +20 -22
- package/lib/commonjs/credential/presentation/common/utils/mdoc.js.map +1 -1
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +10 -10
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +17 -12
- package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js +20 -20
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/index.js +4 -4
- package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +6 -6
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/types.js +12 -12
- package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +2 -2
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js +3 -3
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js +11 -7
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/06-evaluate-dcql-query.js +24 -16
- package/lib/commonjs/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js +31 -26
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/index.js +5 -5
- package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +11 -11
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +2 -2
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/types.js +3 -3
- package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/credential/status/api/types.js +6 -6
- package/lib/commonjs/credential/status/api/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +15 -12
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/index.js +1 -1
- package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/types.js +18 -18
- package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +4 -4
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js +2 -2
- package/lib/commonjs/credential/status/v1.3.3/03-get-status.js.map +1 -1
- package/lib/commonjs/credential/status/v1.3.3/index.js +3 -3
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +7 -7
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +54 -55
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
- package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +0 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +35 -35
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +11 -11
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +26 -20
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +93 -93
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +8 -8
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -1
- package/lib/commonjs/index.js +15 -15
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mdoc/index.js +13 -5
- package/lib/commonjs/mdoc/index.js.map +1 -1
- package/lib/commonjs/mdoc/utils.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +9 -9
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -3
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +9 -9
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +18 -18
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +3 -3
- package/lib/commonjs/sd-jwt/utils.js.map +1 -1
- package/lib/commonjs/trust/api/TrustAnchorConfig.js +4 -4
- package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -1
- package/lib/commonjs/trust/common/build-chain.js +5 -2
- package/lib/commonjs/trust/common/build-chain.js.map +1 -1
- package/lib/commonjs/trust/common/errors.js +51 -44
- package/lib/commonjs/trust/common/errors.js.map +1 -1
- package/lib/commonjs/trust/common/types.js +22 -22
- package/lib/commonjs/trust/common/types.js.map +1 -1
- package/lib/commonjs/trust/common/utils.js +45 -45
- package/lib/commonjs/trust/common/utils.js.map +1 -1
- package/lib/commonjs/trust/common/verify-chain.js +96 -96
- package/lib/commonjs/trust/common/verify-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/build-chain.js +2 -2
- package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/entities.js +1 -1
- package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/index.js +3 -3
- package/lib/commonjs/trust/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/mappers.js +2 -2
- package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/types.js +46 -46
- package/lib/commonjs/trust/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/verify-chain.js +3 -3
- package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -1
- package/lib/commonjs/trust/v1.3.3/entities.js +1 -1
- package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -1
- package/lib/commonjs/trust/v1.3.3/types.js +2 -2
- package/lib/commonjs/trust/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/utils/auth.js +2 -2
- package/lib/commonjs/utils/auth.js.map +1 -1
- package/lib/commonjs/utils/callbacks.js +47 -51
- package/lib/commonjs/utils/callbacks.js.map +1 -1
- package/lib/commonjs/utils/credentials.js +3 -3
- package/lib/commonjs/utils/credentials.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +23 -25
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -2
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/dpop.js +5 -5
- package/lib/commonjs/utils/dpop.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +19 -19
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +51 -50
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/jwk.js +5 -6
- package/lib/commonjs/utils/jwk.js.map +1 -1
- package/lib/commonjs/utils/logging.js +15 -14
- package/lib/commonjs/utils/logging.js.map +1 -1
- package/lib/commonjs/utils/mappers.js +6 -8
- package/lib/commonjs/utils/mappers.js.map +1 -1
- package/lib/commonjs/utils/misc.js +6 -5
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +28 -28
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/pop.js +5 -5
- package/lib/commonjs/utils/pop.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/x509.js +2 -2
- package/lib/commonjs/utils/x509.js.map +1 -1
- package/lib/commonjs/utils/zod.js +1 -1
- package/lib/commonjs/utils/zod.js.map +1 -1
- package/lib/commonjs/wallet-instance/common/wallet-instance.js +5 -5
- package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.0.0/index.js +2 -2
- package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.3.3/index.js +2 -2
- package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/api/types.js +7 -7
- package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/common/types.js +7 -7
- package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +5 -5
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +2 -2
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +20 -20
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/api/types.js +5 -5
- package/lib/commonjs/wallet-unit-attestation/api/types.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js +4 -4
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js +32 -29
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/wallet-unit-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/module/IoWallet.js +6 -4
- package/lib/module/IoWallet.js.map +1 -1
- package/lib/module/api/index.js +19 -19
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +17 -1
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/client/index.js +10 -12
- package/lib/module/client/index.js.map +1 -1
- package/lib/module/credential/issuance/api/IssuerConfig.js +23 -23
- package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -1
- package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -1
- package/lib/module/credential/issuance/api/types.js +3 -3
- package/lib/module/credential/issuance/api/types.js.map +1 -1
- package/lib/module/credential/issuance/common/02-start-user-authorization.js +4 -1
- package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +6 -6
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
- package/lib/module/credential/issuance/common/errors.js +0 -3
- package/lib/module/credential/issuance/common/errors.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/index.js +5 -5
- package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +17 -17
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +11 -11
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +25 -16
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/index.js +9 -9
- package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/mappers.js +7 -7
- package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +4 -4
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +31 -31
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +28 -28
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +16 -16
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +34 -30
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/index.js +9 -9
- package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/mappers.js +18 -17
- package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/offer/common/errors.js +0 -6
- package/lib/module/credential/offer/common/errors.js.map +1 -1
- package/lib/module/credential/offer/v1.0.0/index.js +3 -3
- package/lib/module/credential/offer/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +5 -5
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +3 -3
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js +6 -6
- package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js.map +1 -1
- package/lib/module/credential/offer/v1.3.3/index.js +1 -1
- package/lib/module/credential/offer/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js +8 -8
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
- package/lib/module/credential/presentation/api/types.js +11 -11
- package/lib/module/credential/presentation/api/types.js.map +1 -1
- package/lib/module/credential/presentation/common/errors.js +21 -21
- package/lib/module/credential/presentation/common/errors.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/dcql.js +38 -35
- package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/mdoc.js +20 -22
- package/lib/module/credential/presentation/common/utils/mdoc.js.map +1 -1
- package/lib/module/credential/presentation/common/utils/sd-jwt.js +10 -10
- package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +16 -11
- package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js +12 -12
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/index.js +5 -5
- package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/mappers.js +6 -6
- package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/types.js +12 -12
- package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/utils.js +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +2 -2
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +1 -1
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js +3 -3
- package/lib/module/credential/presentation/v1.3.3/04-verify-certificate-chain.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js +12 -8
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/06-evaluate-dcql-query.js +25 -17
- package/lib/module/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js +31 -26
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/index.js +6 -6
- package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/mappers.js +11 -11
- package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +4 -3
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/types.js +3 -3
- package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/module/credential/status/api/index.js.map +1 -1
- package/lib/module/credential/status/api/types.js +6 -6
- package/lib/module/credential/status/api/types.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js +15 -12
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/index.js +1 -1
- package/lib/module/credential/status/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/types.js +17 -17
- package/lib/module/credential/status/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/01-status-list.js +4 -4
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/03-get-status.js +3 -2
- package/lib/module/credential/status/v1.3.3/03-get-status.js.map +1 -1
- package/lib/module/credential/status/v1.3.3/index.js +3 -3
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +8 -8
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +54 -56
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
- package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/index.js +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js +0 -1
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/types.js +35 -35
- package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +11 -11
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/index.js +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js +27 -21
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/types.js +93 -93
- package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/utils.js +8 -8
- package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -1
- package/lib/module/index.js +10 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/mdoc/index.js +13 -5
- package/lib/module/mdoc/index.js.map +1 -1
- package/lib/module/mdoc/utils.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +9 -9
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +3 -3
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +9 -9
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +18 -18
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +3 -3
- package/lib/module/sd-jwt/utils.js.map +1 -1
- package/lib/module/trust/api/TrustAnchorConfig.js +4 -4
- package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -1
- package/lib/module/trust/common/build-chain.js +5 -2
- package/lib/module/trust/common/build-chain.js.map +1 -1
- package/lib/module/trust/common/errors.js +46 -37
- package/lib/module/trust/common/errors.js.map +1 -1
- package/lib/module/trust/common/types.js +22 -22
- package/lib/module/trust/common/types.js.map +1 -1
- package/lib/module/trust/common/utils.js +45 -45
- package/lib/module/trust/common/utils.js.map +1 -1
- package/lib/module/trust/common/verify-chain.js +96 -96
- package/lib/module/trust/common/verify-chain.js.map +1 -1
- package/lib/module/trust/v1.0.0/build-chain.js +2 -2
- package/lib/module/trust/v1.0.0/build-chain.js.map +1 -1
- package/lib/module/trust/v1.0.0/entities.js +1 -1
- package/lib/module/trust/v1.0.0/entities.js.map +1 -1
- package/lib/module/trust/v1.0.0/index.js +3 -3
- package/lib/module/trust/v1.0.0/index.js.map +1 -1
- package/lib/module/trust/v1.0.0/mappers.js +2 -2
- package/lib/module/trust/v1.0.0/mappers.js.map +1 -1
- package/lib/module/trust/v1.0.0/types.js +46 -46
- package/lib/module/trust/v1.0.0/types.js.map +1 -1
- package/lib/module/trust/v1.0.0/verify-chain.js +3 -3
- package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -1
- package/lib/module/trust/v1.3.3/entities.js +1 -1
- package/lib/module/trust/v1.3.3/entities.js.map +1 -1
- package/lib/module/trust/v1.3.3/types.js +2 -2
- package/lib/module/trust/v1.3.3/types.js.map +1 -1
- package/lib/module/utils/auth.js +2 -2
- package/lib/module/utils/auth.js.map +1 -1
- package/lib/module/utils/callbacks.js +47 -51
- package/lib/module/utils/callbacks.js.map +1 -1
- package/lib/module/utils/credentials.js +3 -3
- package/lib/module/utils/credentials.js.map +1 -1
- package/lib/module/utils/crypto.js +23 -25
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -3
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/dpop.js +5 -5
- package/lib/module/utils/dpop.js.map +1 -1
- package/lib/module/utils/error-codes.js +19 -19
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +47 -46
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/jwk.js +4 -5
- package/lib/module/utils/jwk.js.map +1 -1
- package/lib/module/utils/logging.js +15 -14
- package/lib/module/utils/logging.js.map +1 -1
- package/lib/module/utils/mappers.js +6 -8
- package/lib/module/utils/mappers.js.map +1 -1
- package/lib/module/utils/misc.js +7 -6
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +28 -28
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/pop.js +5 -5
- package/lib/module/utils/pop.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/x509.js +2 -2
- package/lib/module/utils/x509.js.map +1 -1
- package/lib/module/utils/zod.js +1 -1
- package/lib/module/utils/zod.js.map +1 -1
- package/lib/module/wallet-instance/common/wallet-instance.js +6 -6
- package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -1
- package/lib/module/wallet-instance/v1.0.0/index.js +3 -3
- package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -1
- package/lib/module/wallet-instance/v1.3.3/index.js +3 -3
- package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/api/types.js +7 -7
- package/lib/module/wallet-instance-attestation/api/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/common/types.js +7 -7
- package/lib/module/wallet-instance-attestation/common/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js +5 -5
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js +2 -2
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +20 -20
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/utils.js +1 -1
- package/lib/module/wallet-instance-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/module/wallet-unit-attestation/api/types.js +5 -5
- package/lib/module/wallet-unit-attestation/api/types.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/index.js +4 -4
- package/lib/module/wallet-unit-attestation/v1.3.3/index.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js +32 -29
- package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/types.js +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/types.js.map +1 -1
- package/lib/module/wallet-unit-attestation/v1.3.3/utils.js.map +1 -1
- package/lib/typescript/IoWallet.d.ts +4 -4
- package/lib/typescript/IoWallet.d.ts.map +1 -1
- package/lib/typescript/api/index.d.ts +14 -14
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +33 -0
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/client/index.d.ts +2 -2
- package/lib/typescript/client/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +8 -8
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +30 -30
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +2 -2
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +5 -5
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +1 -1
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +52 -52
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/index.d.ts +2 -2
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +30 -30
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +25 -25
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/types.d.ts +8 -11
- package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +2 -2
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/common/errors.d.ts +0 -1
- package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -2
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +2 -2
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +130 -130
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +8 -8
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +538 -59
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts +1 -1
- package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/api/index.d.ts +1 -1
- package/lib/typescript/credential/offer/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/common/errors.d.ts +0 -2
- package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/03-validate-credential-offer.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +3 -3
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts +12 -12
- package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts +17 -17
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +19 -19
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/index.d.ts +1 -1
- package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/types.d.ts +72 -72
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/errors.d.ts +24 -24
- package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +5 -5
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/mdoc.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +51 -51
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +10 -10
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-certificate-chain.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/06-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +41 -41
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +2 -2
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/index.d.ts +3 -3
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-assertion.d.ts +3 -3
- package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/status-list.d.ts +11 -11
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/api/types.d.ts +12 -12
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +7 -7
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/types.d.ts +27 -27
- package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/api/index.d.ts +11 -11
- package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +168 -165
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/index.d.ts +11 -11
- package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/common/get-status-l10n-ids.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +72 -71
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +89 -89
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +158 -157
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +186 -186
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +12 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/utils.d.ts +2 -2
- package/lib/typescript/mdoc/utils.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +10 -10
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +15 -15
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +17 -17
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -1
- package/lib/typescript/trust/api/index.d.ts +11 -11
- package/lib/typescript/trust/api/index.d.ts.map +1 -1
- package/lib/typescript/trust/common/build-chain.d.ts +3 -3
- package/lib/typescript/trust/common/build-chain.d.ts.map +1 -1
- package/lib/typescript/trust/common/errors.d.ts +43 -43
- package/lib/typescript/trust/common/errors.d.ts.map +1 -1
- package/lib/typescript/trust/common/types.d.ts +37 -37
- package/lib/typescript/trust/common/types.d.ts.map +1 -1
- package/lib/typescript/trust/common/utils.d.ts +17 -17
- package/lib/typescript/trust/common/utils.d.ts.map +1 -1
- package/lib/typescript/trust/common/verify-chain.d.ts +9 -9
- package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/entities.d.ts +325 -325
- package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/mappers.d.ts +42 -42
- package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/types.d.ts +331 -331
- package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -1
- package/lib/typescript/trust/v1.3.3/entities.d.ts +24 -24
- package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -1
- package/lib/typescript/trust/v1.3.3/types.d.ts +206 -206
- package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/utils/auth.d.ts +1 -1
- package/lib/typescript/utils/callbacks.d.ts +1 -1
- package/lib/typescript/utils/callbacks.d.ts.map +1 -1
- package/lib/typescript/utils/credentials.d.ts.map +1 -1
- package/lib/typescript/utils/crypto.d.ts +1 -1
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/dpop.d.ts +3 -3
- package/lib/typescript/utils/dpop.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +18 -18
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +49 -51
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/integrity.d.ts +9 -9
- package/lib/typescript/utils/integrity.d.ts.map +1 -1
- package/lib/typescript/utils/jwk.d.ts +3 -3
- package/lib/typescript/utils/jwk.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +10 -10
- package/lib/typescript/utils/logging.d.ts.map +1 -1
- package/lib/typescript/utils/mappers.d.ts.map +1 -1
- package/lib/typescript/utils/misc.d.ts +2 -2
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +13 -13
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/parser.d.ts +2 -2
- package/lib/typescript/utils/parser.d.ts.map +1 -1
- package/lib/typescript/utils/pop.d.ts +2 -2
- package/lib/typescript/utils/pop.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/utils/x509.d.ts.map +1 -1
- package/lib/typescript/utils/zod.d.ts +5 -5
- package/lib/typescript/utils/zod.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/api/index.d.ts +19 -19
- package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts +15 -15
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts +10 -10
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts +5 -5
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +12 -12
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +14 -14
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/mappers.d.ts +10 -10
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +5 -5
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.3.3/utils.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/api/index.d.ts +20 -20
- package/lib/typescript/wallet-unit-attestation/api/index.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/api/types.d.ts +10 -10
- package/lib/typescript/wallet-unit-attestation/api/types.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/mappers.d.ts +11 -11
- package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts +7 -7
- package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts.map +1 -1
- package/package.json +15 -12
- package/src/IoWallet.ts +11 -9
- package/src/api/index.ts +27 -27
- package/src/client/generated/wallet-provider.ts +22 -0
- package/src/client/index.ts +14 -13
- package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +1 -1
- package/src/credential/issuance/api/02-start-user-authorization.ts +9 -8
- package/src/credential/issuance/api/03-complete-user-authorization.ts +41 -40
- package/src/credential/issuance/api/04-authorize-access.ts +4 -3
- package/src/credential/issuance/api/05-obtain-credential.ts +8 -7
- package/src/credential/issuance/api/06-verify-and-parse-credential.ts +3 -2
- package/src/credential/issuance/api/IssuerConfig.ts +20 -19
- package/src/credential/issuance/api/index.ts +4 -4
- package/src/credential/issuance/api/mrtd-pop/index.ts +39 -38
- package/src/credential/issuance/api/mrtd-pop/types.ts +27 -27
- package/src/credential/issuance/api/types.ts +9 -8
- package/src/credential/issuance/common/02-start-user-authorization.ts +20 -14
- package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +39 -34
- package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +32 -29
- package/src/credential/issuance/common/errors.ts +0 -4
- package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +7 -5
- package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +22 -20
- package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +24 -21
- package/src/credential/issuance/mrtd-pop/index.ts +7 -6
- package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +3 -2
- package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +15 -14
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +45 -43
- package/src/credential/issuance/v1.0.0/04-authorize-access.ts +17 -15
- package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +39 -22
- package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +5 -4
- package/src/credential/issuance/v1.0.0/index.ts +11 -10
- package/src/credential/issuance/v1.0.0/mappers.ts +12 -11
- package/src/credential/issuance/v1.0.0/types.ts +2 -1
- package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +8 -6
- package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +33 -30
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +54 -51
- package/src/credential/issuance/v1.3.3/04-authorize-access.ts +20 -18
- package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +49 -43
- package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +5 -4
- package/src/credential/issuance/v1.3.3/index.ts +11 -10
- package/src/credential/issuance/v1.3.3/mappers.ts +28 -25
- package/src/credential/offer/api/01-resolve-credential-offer.ts +1 -1
- package/src/credential/offer/api/03-validate-credential-offer.ts +2 -1
- package/src/credential/offer/api/index.ts +2 -2
- package/src/credential/offer/common/errors.ts +0 -8
- package/src/credential/offer/v1.0.0/index.ts +5 -4
- package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +5 -3
- package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +6 -4
- package/src/credential/offer/v1.3.3/03-validate-credential-offer.ts +6 -4
- package/src/credential/offer/v1.3.3/index.ts +2 -1
- package/src/credential/presentation/api/01-start-flow.ts +4 -4
- package/src/credential/presentation/api/02-evaluate-rp-trust.ts +1 -1
- package/src/credential/presentation/api/03-get-request-object.ts +1 -1
- package/src/credential/presentation/api/04-verify-certificate-chain.ts +1 -1
- package/src/credential/presentation/api/05-verify-request-object.ts +1 -1
- package/src/credential/presentation/api/06-evaluate-dcql-query.ts +14 -14
- package/src/credential/presentation/api/07-send-authorization-response.ts +21 -19
- package/src/credential/presentation/api/RelyingPartyConfig.ts +8 -7
- package/src/credential/presentation/api/index.ts +4 -4
- package/src/credential/presentation/api/types.ts +68 -66
- package/src/credential/presentation/common/errors.ts +32 -35
- package/src/credential/presentation/common/utils/dcql.ts +34 -30
- package/src/credential/presentation/common/utils/http.ts +2 -2
- package/src/credential/presentation/common/utils/mdoc.ts +17 -15
- package/src/credential/presentation/common/utils/sd-jwt.ts +19 -16
- package/src/credential/presentation/v1.0.0/01-start-flow.ts +4 -3
- package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +3 -2
- package/src/credential/presentation/v1.0.0/03-get-request-object.ts +6 -5
- package/src/credential/presentation/v1.0.0/05-verify-request-object.ts +14 -12
- package/src/credential/presentation/v1.0.0/06-evaluate-dcql-query.ts +26 -15
- package/src/credential/presentation/v1.0.0/07-send-authorization-response.ts +23 -21
- package/src/credential/presentation/v1.0.0/index.ts +6 -5
- package/src/credential/presentation/v1.0.0/mappers.ts +9 -8
- package/src/credential/presentation/v1.0.0/types.ts +11 -10
- package/src/credential/presentation/v1.0.0/utils.jwks.ts +4 -3
- package/src/credential/presentation/v1.0.0/utils.ts +4 -3
- package/src/credential/presentation/v1.3.3/01-start-flow.ts +5 -3
- package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +3 -2
- package/src/credential/presentation/v1.3.3/03-get-request-object.ts +4 -2
- package/src/credential/presentation/v1.3.3/04-verify-certificate-chain.ts +9 -7
- package/src/credential/presentation/v1.3.3/05-verify-request-object.ts +24 -14
- package/src/credential/presentation/v1.3.3/06-evaluate-dcql-query.ts +37 -23
- package/src/credential/presentation/v1.3.3/07-send-authorization-response.ts +40 -32
- package/src/credential/presentation/v1.3.3/index.ts +7 -6
- package/src/credential/presentation/v1.3.3/mappers.ts +13 -12
- package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +9 -7
- package/src/credential/presentation/v1.3.3/types.ts +3 -3
- package/src/credential/status/api/index.ts +4 -4
- package/src/credential/status/api/status-assertion.ts +7 -6
- package/src/credential/status/api/status-list.ts +17 -17
- package/src/credential/status/api/types.ts +12 -11
- package/src/credential/status/v1.0.0/01-status-assertion.ts +22 -16
- package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +27 -17
- package/src/credential/status/v1.0.0/index.ts +2 -1
- package/src/credential/status/v1.0.0/mappers.ts +2 -1
- package/src/credential/status/v1.0.0/types.ts +17 -16
- package/src/credential/status/v1.3.3/01-status-list.ts +9 -7
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +3 -1
- package/src/credential/status/v1.3.3/03-get-status.ts +6 -4
- package/src/credential/status/v1.3.3/index.ts +3 -2
- package/src/credential/trustmark/api/index.ts +11 -11
- package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +14 -13
- package/src/credential/trustmark/v1.0.0/index.ts +2 -1
- package/src/credential/trustmark/v1.3.3/index.ts +2 -1
- package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +48 -47
- package/src/credentials-catalogue/api/index.ts +14 -12
- package/src/credentials-catalogue/common/get-status-l10n-ids.ts +4 -4
- package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +7 -6
- package/src/credentials-catalogue/v1.0.0/index.ts +2 -1
- package/src/credentials-catalogue/v1.0.0/mappers.ts +2 -3
- package/src/credentials-catalogue/v1.0.0/types.ts +32 -31
- package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +14 -14
- package/src/credentials-catalogue/v1.3.3/fetch-translations.ts +4 -3
- package/src/credentials-catalogue/v1.3.3/index.ts +2 -1
- package/src/credentials-catalogue/v1.3.3/mappers.ts +34 -27
- package/src/credentials-catalogue/v1.3.3/types.ts +82 -81
- package/src/credentials-catalogue/v1.3.3/utils.ts +14 -12
- package/src/index.ts +23 -23
- package/src/mdoc/index.ts +26 -11
- package/src/mdoc/utils.ts +6 -4
- package/src/sd-jwt/__test__/types.test.ts +6 -6
- package/src/sd-jwt/__test__/utils.test.ts +2 -2
- package/src/sd-jwt/index.ts +10 -8
- package/src/sd-jwt/types.ts +14 -13
- package/src/sd-jwt/utils.ts +10 -9
- package/src/trust/api/TrustAnchorConfig.ts +3 -2
- package/src/trust/api/index.ts +19 -16
- package/src/trust/common/build-chain.ts +28 -18
- package/src/trust/common/errors.ts +58 -50
- package/src/trust/common/types.ts +22 -21
- package/src/trust/common/utils.ts +65 -64
- package/src/trust/common/verify-chain.ts +140 -138
- package/src/trust/v1.0.0/build-chain.ts +1 -1
- package/src/trust/v1.0.0/entities.ts +18 -16
- package/src/trust/v1.0.0/index.ts +5 -4
- package/src/trust/v1.0.0/mappers.ts +3 -2
- package/src/trust/v1.0.0/types.ts +43 -42
- package/src/trust/v1.0.0/verify-chain.ts +3 -2
- package/src/trust/v1.3.3/entities.ts +6 -4
- package/src/trust/v1.3.3/types.ts +10 -9
- package/src/utils/auth.ts +1 -1
- package/src/utils/callbacks.ts +38 -38
- package/src/utils/credentials.ts +7 -5
- package/src/utils/crypto.ts +36 -36
- package/src/utils/decoder.ts +7 -5
- package/src/utils/dpop.ts +5 -6
- package/src/utils/error-codes.ts +20 -20
- package/src/utils/errors.ts +89 -87
- package/src/utils/integrity.ts +11 -11
- package/src/utils/jwk.ts +4 -4
- package/src/utils/logging.ts +21 -20
- package/src/utils/mappers.ts +14 -11
- package/src/utils/misc.ts +15 -12
- package/src/utils/par.ts +30 -29
- package/src/utils/parser.ts +4 -4
- package/src/utils/pop.ts +4 -5
- package/src/utils/string.ts +2 -2
- package/src/utils/x509.ts +5 -4
- package/src/utils/zod.ts +4 -4
- package/src/wallet-instance/api/index.ts +24 -24
- package/src/wallet-instance/common/wallet-instance.ts +8 -7
- package/src/wallet-instance/v1.0.0/index.ts +5 -4
- package/src/wallet-instance/v1.3.3/index.ts +5 -4
- package/src/wallet-instance-attestation/api/index.ts +18 -17
- package/src/wallet-instance-attestation/api/types.ts +12 -11
- package/src/wallet-instance-attestation/common/types.ts +7 -6
- package/src/wallet-instance-attestation/v1.0.0/index.ts +3 -2
- package/src/wallet-instance-attestation/v1.0.0/issuing.ts +22 -20
- package/src/wallet-instance-attestation/v1.0.0/mappers.ts +2 -2
- package/src/wallet-instance-attestation/v1.0.0/types.ts +10 -9
- package/src/wallet-instance-attestation/v1.0.0/utils.ts +3 -2
- package/src/wallet-instance-attestation/v1.3.3/index.ts +4 -3
- package/src/wallet-instance-attestation/v1.3.3/issuing.ts +25 -23
- package/src/wallet-instance-attestation/v1.3.3/types.ts +3 -2
- package/src/wallet-instance-attestation/v1.3.3/utils.ts +3 -2
- package/src/wallet-unit-attestation/api/index.ts +23 -23
- package/src/wallet-unit-attestation/api/types.ts +11 -10
- package/src/wallet-unit-attestation/v1.3.3/index.ts +6 -5
- package/src/wallet-unit-attestation/v1.3.3/issuing.ts +42 -34
- package/src/wallet-unit-attestation/v1.3.3/types.ts +3 -2
- package/src/wallet-unit-attestation/v1.3.3/utils.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
|
|
2
2
|
import { ValidationFailed } from "./errors";
|
|
3
|
-
import {
|
|
3
|
+
import { Logger, LogLevel } from "./logging";
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Decode a form_post.jwt and return the final JWT.
|
|
@@ -40,8 +40,8 @@ export const getJwtFromFormPost = async formData => {
|
|
|
40
40
|
const jwt = responseJwt.replace(lineExpressionRegex, "");
|
|
41
41
|
const decodedJwt = decodeJwt(jwt);
|
|
42
42
|
return {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
decodedJwt,
|
|
44
|
+
jwt
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["decode","decodeJwt","ValidationFailed","
|
|
1
|
+
{"version":3,"names":["decode","decodeJwt","ValidationFailed","Logger","LogLevel","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","match","exec","responseJwt","jwt","replace","decodedJwt","log","ERROR","message"],"sourceRoot":"../../../src","sources":["utils/decoder.ts"],"mappings":"AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AAIjE,SAASC,gBAAgB,QAAQ,UAAU;AAC3C,SAASC,MAAM,EAAEC,QAAQ,QAAQ,WAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,MAChCC,QAAgB,IAC0C;EAC1D,MAAMC,aAAa,GAAG,iDAAiD;EACvE,MAAMC,mBAAmB,GAAG,sBAAsB;EAElD,MAAMC,KAAK,GAAGF,aAAa,CAACG,IAAI,CAACJ,QAAQ,CAAC;EAC1C,IAAIG,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,EAAE;IACrB,MAAME,WAAW,GAAGF,KAAK,CAAC,CAAC,CAAC;IAE5B,IAAIE,WAAW,EAAE;MACf,MAAMC,GAAG,GAAGD,WAAW,CAACE,OAAO,CAACL,mBAAmB,EAAE,EAAE,CAAC;MACxD,MAAMM,UAAU,GAAGb,SAAS,CAACW,GAAG,CAAC;MACjC,OAAO;QAAEE,UAAU;QAAEF;MAAI,CAAC;IAC5B;EACF;EAEAT,MAAM,CAACY,GAAG,CACRX,QAAQ,CAACY,KAAK,EACb,uDAAsDV,QAAS,EAClE,CAAC;EACD,MAAM,IAAIJ,gBAAgB,CAAC;IACzBe,OAAO,EAAG,uDAAsDX,QAAS;EAC3E,CAAC,CAAC;AACJ,CAAC"}
|
package/lib/module/utils/dpop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
1
|
import { SignJWT } from "@pagopa/io-react-native-jwt";
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Create a signed DPoP token
|
|
@@ -12,14 +12,14 @@ import { SignJWT } from "@pagopa/io-react-native-jwt";
|
|
|
12
12
|
export const createDPopToken = async (payload, crypto) => {
|
|
13
13
|
const jwk = await crypto.getPublicKey();
|
|
14
14
|
return new SignJWT(crypto).setPayload(payload).setProtectedHeader({
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
jwk,
|
|
16
|
+
typ: "dpop+jwt"
|
|
17
17
|
}).setIssuedAt().setExpirationTime("1h").sign();
|
|
18
18
|
};
|
|
19
19
|
export const DPoPPayload = z.object({
|
|
20
|
-
|
|
20
|
+
ath: z.string().optional(),
|
|
21
21
|
htm: z.enum(["POST", "GET"]),
|
|
22
22
|
htu: z.string(),
|
|
23
|
-
|
|
23
|
+
jti: z.string()
|
|
24
24
|
});
|
|
25
25
|
//# sourceMappingURL=dpop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["SignJWT","z","createDPopToken","payload","crypto","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","DPoPPayload","object","ath","string","optional","htm","enum","htu","jti"],"sourceRoot":"../../../src","sources":["utils/dpop.ts"],"mappings":"AAAA,SAA6BA,OAAO,QAAQ,6BAA6B;AACzE,OAAO,KAAKC,CAAC,MAAM,KAAK;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG,MAAAA,CAC7BC,OAAoB,EACpBC,MAAqB,KACD;EACpB,MAAMC,GAAG,GAAG,MAAMD,MAAM,CAACE,YAAY,CAAC,CAAC;EACvC,OAAO,IAAIN,OAAO,CAACI,MAAM,CAAC,CACvBG,UAAU,CAACJ,OAAO,CAAC,CACnBK,kBAAkB,CAAC;IAClBH,GAAG;IACHI,GAAG,EAAE;EACP,CAAC,CAAC,CACDC,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,IAAI,CAAC,CACvBC,IAAI,CAAC,CAAC;AACX,CAAC;AAGD,OAAO,MAAMC,WAAW,GAAGZ,CAAC,CAACa,MAAM,CAAC;EAClCC,GAAG,EAAEd,CAAC,CAACe,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BC,GAAG,EAAEjB,CAAC,CAACkB,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;EAC5BC,GAAG,EAAEnB,CAAC,CAACe,MAAM,CAAC,CAAC;EACfK,GAAG,EAAEpB,CAAC,CAACe,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -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,47 +11,44 @@ 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
|
-
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"
|
|
22
|
+
StatusAttestationRequestFailed: "ERR_STATUS_ATTESTATION_REQUEST_FAILED"
|
|
23
23
|
};
|
|
24
24
|
export const WalletProviderResponseErrorCodes = {
|
|
25
|
-
WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR",
|
|
26
|
-
/**
|
|
27
|
-
* An error code thrown when an error occurs during the wallet instance creation process.
|
|
28
|
-
*/
|
|
29
|
-
WalletInstanceCreationFailed: "ERR_IO_WALLET_INSTANCE_CREATION_FAILED",
|
|
30
25
|
/**
|
|
31
26
|
* An error code thrown when validation fail
|
|
32
27
|
*/
|
|
33
28
|
WalletInstanceAttestationIssuingFailed: "ERR_IO_WALLET_INSTANCE_ATTESTATION_ISSUING_FAILED",
|
|
29
|
+
/**
|
|
30
|
+
* An error code thrown when an error occurs during the wallet instance creation process.
|
|
31
|
+
*/
|
|
32
|
+
WalletInstanceCreationFailed: "ERR_IO_WALLET_INSTANCE_CREATION_FAILED",
|
|
34
33
|
/**
|
|
35
34
|
* An error code thrown when the requester does not pass the integrity checks when interacting with the Wallet Provider.
|
|
36
35
|
*/
|
|
37
36
|
WalletInstanceIntegrityFailed: "ERR_IO_WALLET_INSTANCE_INTEGRITY_FAILED",
|
|
38
37
|
/**
|
|
39
|
-
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is
|
|
38
|
+
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is not found.
|
|
40
39
|
*/
|
|
41
|
-
|
|
40
|
+
WalletInstanceNotFound: "ERR_IO_WALLET_INSTANCE_NOT_FOUND",
|
|
42
41
|
/**
|
|
43
|
-
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is
|
|
42
|
+
* An error code thrown when obtaining a wallet instance attestation but the wallet instance is revoked.
|
|
44
43
|
*/
|
|
45
|
-
|
|
44
|
+
WalletInstanceRevoked: "ERR_IO_WALLET_INSTANCE_REVOKED",
|
|
45
|
+
WalletProviderGenericError: "ERR_IO_WALLET_PROVIDER_GENERIC_ERROR"
|
|
46
46
|
};
|
|
47
47
|
export const RelyingPartyResponseErrorCodes = {
|
|
48
|
-
RelyingPartyGenericError: "ERR_RP_GENERIC_ERROR",
|
|
49
48
|
/**
|
|
50
49
|
* An error code thrown then the Relying Party rejects the Wallet's Authorization Response.
|
|
51
50
|
*/
|
|
52
|
-
InvalidAuthorizationResponse: "ERR_RP_INVALID_AUTHORIZATION_RESPONSE"
|
|
51
|
+
InvalidAuthorizationResponse: "ERR_RP_INVALID_AUTHORIZATION_RESPONSE",
|
|
52
|
+
RelyingPartyGenericError: "ERR_RP_GENERIC_ERROR"
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=error-codes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IssuerResponseErrorCodes","
|
|
1
|
+
{"version":3,"names":["IssuerResponseErrorCodes","CredentialInvalidStatus","CredentialIssuingNotSynchronous","CredentialRequestFailed","IssuerGenericError","MrtdChallengeInitRequestFailed","StatusAttestationRequestFailed","WalletProviderResponseErrorCodes","WalletInstanceAttestationIssuingFailed","WalletInstanceCreationFailed","WalletInstanceIntegrityFailed","WalletInstanceNotFound","WalletInstanceRevoked","WalletProviderGenericError","RelyingPartyResponseErrorCodes","InvalidAuthorizationResponse","RelyingPartyGenericError"],"sourceRoot":"../../../src","sources":["utils/error-codes.ts"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG;EACtC;AACF;AACA;EACEC,uBAAuB,EAAE,+BAA+B;EACxD;AACF;AACA;EACEC,+BAA+B,EAAE,wCAAwC;EACzE;AACF;AACA;EACEC,uBAAuB,EAAE,+BAA+B;EACxDC,kBAAkB,EAAE,0BAA0B;EAC9C;AACF;AACA;EACEC,8BAA8B,EAAE,wCAAwC;EACxE;AACF;AACA;EACEC,8BAA8B,EAAE;AAClC,CAAU;AAEV,OAAO,MAAMC,gCAAgC,GAAG;EAC9C;AACF;AACA;EACEC,sCAAsC,EACpC,mDAAmD;EACrD;AACF;AACA;EACEC,4BAA4B,EAAE,wCAAwC;EACtE;AACF;AACA;EACEC,6BAA6B,EAAE,yCAAyC;EACxE;AACF;AACA;EACEC,sBAAsB,EAAE,kCAAkC;EAC1D;AACF;AACA;EACEC,qBAAqB,EAAE,gCAAgC;EACvDC,0BAA0B,EAAE;AAC9B,CAAU;AAEV,OAAO,MAAMC,8BAA8B,GAAG;EAC5C;AACF;AACA;EACEC,4BAA4B,EAAE,uCAAuC;EACrEC,wBAAwB,EAAE;AAC5B,CAAU"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnexpectedStatusCodeError as SdkUnexpectedStatusCodeError } from "@pagopa/io-wallet-utils";
|
|
2
2
|
import { IssuerResponseErrorCodes, RelyingPartyResponseErrorCodes, WalletProviderResponseErrorCodes } from "./error-codes";
|
|
3
|
-
export { IssuerResponseErrorCodes,
|
|
3
|
+
export { IssuerResponseErrorCodes, RelyingPartyResponseErrorCodes, WalletProviderResponseErrorCodes };
|
|
4
4
|
|
|
5
5
|
// An error reason that supports both a string and a generic JSON object
|
|
6
6
|
|
|
@@ -50,7 +50,6 @@ export const withMappedErrors = (fn, sourceError, mapError) => {
|
|
|
50
50
|
throw e;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
54
53
|
/**
|
|
55
54
|
* A generic Error that all other io-wallet specific Error subclasses extend.
|
|
56
55
|
*
|
|
@@ -71,44 +70,17 @@ export class IoWalletError extends Error {
|
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
|
|
74
|
-
/**
|
|
75
|
-
* An error subclass thrown when validation fail
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
export class ValidationFailed extends IoWalletError {
|
|
79
|
-
code = "ERR_IO_WALLET_VALIDATION_FAILED";
|
|
80
|
-
|
|
81
|
-
/** The Claim for which the validation failed. */
|
|
82
|
-
|
|
83
|
-
/** Reason code for the validation failure. */
|
|
84
|
-
|
|
85
|
-
constructor(_ref3) {
|
|
86
|
-
let {
|
|
87
|
-
message,
|
|
88
|
-
claim = "unspecified",
|
|
89
|
-
reason = "unspecified"
|
|
90
|
-
} = _ref3;
|
|
91
|
-
super(serializeAttrs({
|
|
92
|
-
message,
|
|
93
|
-
claim,
|
|
94
|
-
reason
|
|
95
|
-
}));
|
|
96
|
-
this.claim = claim;
|
|
97
|
-
this.reason = reason;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
73
|
/**
|
|
102
74
|
* An error subclass thrown when an HTTP request has a status code different from the one expected.
|
|
103
75
|
*/
|
|
104
76
|
export class UnexpectedStatusCodeError extends IoWalletError {
|
|
105
77
|
code = "ERR_UNEXPECTED_STATUS_CODE";
|
|
106
|
-
constructor(
|
|
78
|
+
constructor(_ref3) {
|
|
107
79
|
let {
|
|
108
80
|
message,
|
|
109
81
|
reason,
|
|
110
82
|
statusCode
|
|
111
|
-
} =
|
|
83
|
+
} = _ref3;
|
|
112
84
|
super(serializeAttrs({
|
|
113
85
|
message,
|
|
114
86
|
reason,
|
|
@@ -131,27 +103,55 @@ export class IssuerResponseError extends UnexpectedStatusCodeError {
|
|
|
131
103
|
}
|
|
132
104
|
|
|
133
105
|
/**
|
|
134
|
-
* An error subclass thrown when a
|
|
106
|
+
* An error subclass thrown when a Relying Party HTTP request fails.
|
|
135
107
|
* The specific error can be found in the `code` property.
|
|
136
108
|
*/
|
|
137
|
-
export class
|
|
109
|
+
export class RelyingPartyResponseError extends UnexpectedStatusCodeError {
|
|
138
110
|
constructor(params) {
|
|
139
111
|
super(params);
|
|
140
|
-
this.
|
|
141
|
-
this.code = params.code ?? WalletProviderResponseErrorCodes.WalletProviderGenericError;
|
|
112
|
+
this.code = params.code ?? RelyingPartyResponseErrorCodes.RelyingPartyGenericError;
|
|
142
113
|
}
|
|
143
114
|
}
|
|
144
115
|
|
|
145
116
|
/**
|
|
146
|
-
* An error subclass thrown when
|
|
117
|
+
* An error subclass thrown when validation fail
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
export class ValidationFailed extends IoWalletError {
|
|
121
|
+
/** The Claim for which the validation failed. */
|
|
122
|
+
|
|
123
|
+
code = "ERR_IO_WALLET_VALIDATION_FAILED";
|
|
124
|
+
|
|
125
|
+
/** Reason code for the validation failure. */
|
|
126
|
+
|
|
127
|
+
constructor(_ref4) {
|
|
128
|
+
let {
|
|
129
|
+
claim = "unspecified",
|
|
130
|
+
message,
|
|
131
|
+
reason = "unspecified"
|
|
132
|
+
} = _ref4;
|
|
133
|
+
super(serializeAttrs({
|
|
134
|
+
claim,
|
|
135
|
+
message,
|
|
136
|
+
reason
|
|
137
|
+
}));
|
|
138
|
+
this.claim = claim;
|
|
139
|
+
this.reason = reason;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* An error subclass thrown when a Wallet Provider HTTP request fails.
|
|
147
145
|
* The specific error can be found in the `code` property.
|
|
148
146
|
*/
|
|
149
|
-
export class
|
|
147
|
+
export class WalletProviderResponseError extends UnexpectedStatusCodeError {
|
|
150
148
|
constructor(params) {
|
|
151
149
|
super(params);
|
|
152
|
-
this.
|
|
150
|
+
this.reason = params.reason;
|
|
151
|
+
this.code = params.code ?? WalletProviderResponseErrorCodes.WalletProviderGenericError;
|
|
153
152
|
}
|
|
154
153
|
}
|
|
154
|
+
|
|
155
155
|
/**
|
|
156
156
|
* Function to extract the error message from the Entity Configuration's supported error codes.
|
|
157
157
|
* @param errorCode The error code to map to a meaningful message
|
|
@@ -162,8 +162,8 @@ export class RelyingPartyResponseError extends UnexpectedStatusCodeError {
|
|
|
162
162
|
*/
|
|
163
163
|
export function extractErrorMessageFromIssuerConf(errorCode, _ref5) {
|
|
164
164
|
let {
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
credentialType,
|
|
166
|
+
issuerConf
|
|
167
167
|
} = _ref5;
|
|
168
168
|
const credentialConfiguration = issuerConf.credential_configurations_supported[credentialType];
|
|
169
169
|
if (!credentialConfiguration) {
|
|
@@ -172,10 +172,11 @@ export function extractErrorMessageFromIssuerConf(errorCode, _ref5) {
|
|
|
172
172
|
const {
|
|
173
173
|
issuance_errors_supported
|
|
174
174
|
} = credentialConfiguration;
|
|
175
|
-
|
|
175
|
+
const errorConfig = issuance_errors_supported === null || issuance_errors_supported === void 0 ? void 0 : issuance_errors_supported[errorCode];
|
|
176
|
+
if (!errorConfig) {
|
|
176
177
|
return undefined;
|
|
177
178
|
}
|
|
178
|
-
const localesList =
|
|
179
|
+
const localesList = errorConfig.display;
|
|
179
180
|
return localesList.reduce((acc, _ref6) => {
|
|
180
181
|
let {
|
|
181
182
|
locale,
|
|
@@ -220,10 +221,6 @@ export class ResponseErrorBuilder {
|
|
|
220
221
|
constructor(ErrorClass) {
|
|
221
222
|
this.ErrorClass = ErrorClass;
|
|
222
223
|
}
|
|
223
|
-
handle(status, params) {
|
|
224
|
-
this.errorCases[status] = params;
|
|
225
|
-
return this;
|
|
226
|
-
}
|
|
227
224
|
buildFrom(originalError) {
|
|
228
225
|
const params = this.errorCases[originalError.statusCode] ?? this.errorCases["*"];
|
|
229
226
|
if (params) {
|
|
@@ -234,6 +231,10 @@ export class ResponseErrorBuilder {
|
|
|
234
231
|
}
|
|
235
232
|
return originalError;
|
|
236
233
|
}
|
|
234
|
+
handle(status, params) {
|
|
235
|
+
this.errorCases[status] = params;
|
|
236
|
+
return this;
|
|
237
|
+
}
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UnexpectedStatusCodeError","SdkUnexpectedStatusCodeError","IssuerResponseErrorCodes","RelyingPartyResponseErrorCodes","WalletProviderResponseErrorCodes","serializeAttrs","attrs","Object","entries","filter","_ref","v","undefined","map","_ref2","k","Array","isArray","join","JSON","stringify","_","withMappedErrors","fn","sourceError","mapError","e","IoWalletError","Error","code","constructor","message","name","
|
|
1
|
+
{"version":3,"names":["UnexpectedStatusCodeError","SdkUnexpectedStatusCodeError","IssuerResponseErrorCodes","RelyingPartyResponseErrorCodes","WalletProviderResponseErrorCodes","serializeAttrs","attrs","Object","entries","filter","_ref","v","undefined","map","_ref2","k","Array","isArray","join","JSON","stringify","_","withMappedErrors","fn","sourceError","mapError","e","IoWalletError","Error","code","constructor","message","name","_ref3","reason","statusCode","IssuerResponseError","params","IssuerGenericError","RelyingPartyResponseError","RelyingPartyGenericError","ValidationFailed","_ref4","claim","WalletProviderResponseError","WalletProviderGenericError","extractErrorMessageFromIssuerConf","errorCode","_ref5","credentialType","issuerConf","credentialConfiguration","credential_configurations_supported","issuance_errors_supported","errorConfig","localesList","display","reduce","acc","_ref6","locale","rest","makeErrorTypeGuard","ErrorClass","error","isIssuerResponseError","isWalletProviderResponseError","isRelyingPartyResponseError","ResponseErrorBuilder","errorCases","buildFrom","originalError","handle","status","UnimplementedFeatureError","feature","version","sdkUnexpectedStatusCodeToIssuerError","err"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAAA,SAASA,yBAAyB,IAAIC,4BAA4B,QAAQ,yBAAyB;AAKnG,S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AyB,SAAS/C,aAAa,CAAC;EAC3DE,IAAI,GAAG,qCAAqC;EAE5CC,WAAWA,CAAC6C,OAAe,EAAEC,OAAe,EAAE;IAC5C,KAAK,CAAE,YAAWA,OAAQ,kCAAiCD,OAAQ,EAAC,CAAC;EACvE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,oCAAoC,GAAIC,GAAY,IAAK;EACpE,IAAIA,GAAG,YAAY7E,4BAA4B,EAAE;IAC/C,MAAM,IAAImC,mBAAmB,CAAC;MAC5BP,IAAI,EAAE3B,wBAAwB,CAACoC,kBAAkB;MACjDP,OAAO,EAAE+C,GAAG,CAAC/C,OAAO;MACpBG,MAAM,EAAE4C,GAAG,CAAC5C,MAAM;MAClBC,UAAU,EAAE2C,GAAG,CAAC3C;IAClB,CAAC,CAAC;EACJ;EACA,MAAM2C,GAAG;AACX,CAAC"}
|
package/lib/module/utils/jwk.js
CHANGED
|
@@ -26,7 +26,6 @@ export const JWK = z.object({
|
|
|
26
26
|
/** JWK "use" (Public Key Use) Parameter. */
|
|
27
27
|
use: z.string().optional(),
|
|
28
28
|
x: z.string().optional(),
|
|
29
|
-
y: z.string().optional(),
|
|
30
29
|
/** JWK "x5c" (X.509 Certificate Chain) Parameter. */
|
|
31
30
|
x5c: z.array(z.string()).optional(),
|
|
32
31
|
/** JWK "x5t" (X.509 Certificate SHA-1 Thumbprint) Parameter. */
|
|
@@ -34,9 +33,9 @@ export const JWK = z.object({
|
|
|
34
33
|
/** "x5t#S256" (X.509 Certificate SHA-256 Thumbprint) Parameter. */
|
|
35
34
|
"x5t#S256": z.string().optional(),
|
|
36
35
|
/** JWK "x5u" (X.509 URL) Parameter. */
|
|
37
|
-
x5u: z.string().optional()
|
|
36
|
+
x5u: z.string().optional(),
|
|
37
|
+
y: z.string().optional()
|
|
38
38
|
});
|
|
39
|
-
|
|
40
39
|
/**
|
|
41
40
|
* Ensure key values are encoded using base64url and not just base64, as defined in https://datatracker.ietf.org/doc/html/rfc7517
|
|
42
41
|
*
|
|
@@ -47,10 +46,10 @@ export const JWK = z.object({
|
|
|
47
46
|
*/
|
|
48
47
|
export function fixBase64EncodingOnKey(key) {
|
|
49
48
|
const {
|
|
50
|
-
x,
|
|
51
|
-
y,
|
|
52
49
|
e,
|
|
53
50
|
n,
|
|
51
|
+
x,
|
|
52
|
+
y,
|
|
54
53
|
...pk
|
|
55
54
|
} = key;
|
|
56
55
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["removePadding","thumbprint","z","JWK","object","alg","string","optional","crv","d","dp","dq","e","ext","boolean","k","key_ops","array","kid","kty","enum","n","p","q","qi","use","x","
|
|
1
|
+
{"version":3,"names":["removePadding","thumbprint","z","JWK","object","alg","string","optional","crv","d","dp","dq","e","ext","boolean","k","key_ops","array","kid","kty","enum","n","p","q","qi","use","x","x5c","x5t","x5u","y","fixBase64EncodingOnKey","key","pk","JWKS","keys","isSameThumbprint","jwkA","jwkB","thumbprintJwkA","thumbprintJwkB","Promise","all"],"sourceRoot":"../../../src","sources":["utils/jwk.ts"],"mappings":"AAAA,SAAiBA,aAAa,EAAEC,UAAU,QAAQ,6BAA6B;AAC/E,SAASC,CAAC,QAAQ,KAAK;AAGvB,OAAO,MAAMC,GAAG,GAAGD,CAAC,CAACE,MAAM,CAAC;EAC1B;EACAC,GAAG,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BC,GAAG,EAAEN,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BE,CAAC,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxBG,EAAE,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBI,EAAE,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBK,CAAC,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AAC;EACF,OAAOC,cAAc,KAAKC,cAAc;AAC1C,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logger interface which can be provided to the Logger class as a custom implementation.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* Supported debug levels.
|
|
7
3
|
*/
|
|
@@ -13,6 +9,10 @@ export let LogLevel = /*#__PURE__*/function (LogLevel) {
|
|
|
13
9
|
return LogLevel;
|
|
14
10
|
}({});
|
|
15
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Logger interface which can be provided to the Logger class as a custom implementation.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
16
|
/**
|
|
17
17
|
* Logger singleton class which provides a simple logging interface with an init function to set the logging context and
|
|
18
18
|
* a static log function to log messages based on the debug level.
|
|
@@ -23,8 +23,9 @@ export let LogLevel = /*#__PURE__*/function (LogLevel) {
|
|
|
23
23
|
*/
|
|
24
24
|
export class Logger {
|
|
25
25
|
static instance = null;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
constructor() {
|
|
27
|
+
/* Private constructor to prevent direct instantiation */
|
|
28
|
+
}
|
|
28
29
|
|
|
29
30
|
// Public static method to get the Logger instance
|
|
30
31
|
static getInstance() {
|
|
@@ -34,11 +35,6 @@ export class Logger {
|
|
|
34
35
|
return Logger.instance;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
// Method to initialize the logging context
|
|
38
|
-
initLogging(loggingCtx) {
|
|
39
|
-
Logger.loggingContext = loggingCtx;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
38
|
// Method to log based on the level which wraps the null check for the logging context
|
|
43
39
|
static log(level, msg) {
|
|
44
40
|
if (Logger.loggingContext) {
|
|
@@ -46,17 +42,22 @@ export class Logger {
|
|
|
46
42
|
case LogLevel.DEBUG:
|
|
47
43
|
Logger.loggingContext.logDebug(msg);
|
|
48
44
|
break;
|
|
45
|
+
case LogLevel.ERROR:
|
|
46
|
+
Logger.loggingContext.logError(msg);
|
|
47
|
+
break;
|
|
49
48
|
case LogLevel.INFO:
|
|
50
49
|
Logger.loggingContext.logInfo(msg);
|
|
51
50
|
break;
|
|
52
51
|
case LogLevel.WARN:
|
|
53
52
|
Logger.loggingContext.logWarn(msg);
|
|
54
53
|
break;
|
|
55
|
-
case LogLevel.ERROR:
|
|
56
|
-
Logger.loggingContext.logError(msg);
|
|
57
|
-
break;
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
}
|
|
57
|
+
|
|
58
|
+
// Method to initialize the logging context
|
|
59
|
+
initLogging(loggingCtx) {
|
|
60
|
+
Logger.loggingContext = loggingCtx;
|
|
61
|
+
}
|
|
61
62
|
}
|
|
62
63
|
//# sourceMappingURL=logging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LogLevel","Logger","instance","constructor","getInstance","
|
|
1
|
+
{"version":3,"names":["LogLevel","Logger","instance","constructor","getInstance","log","level","msg","loggingContext","DEBUG","logDebug","ERROR","logError","INFO","logInfo","WARN","logWarn","initLogging","loggingCtx"],"sourceRoot":"../../../src","sources":["utils/logging.ts"],"mappings":"AAAA;AACA;AACA;AACA,WAAYA,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;;AAOpB;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,MAAM,CAAC;EAClB,OAAeC,QAAQ,GAAkB,IAAI;EAGrCC,WAAWA,CAAA,EAAG;IACpB;EAAA;;EAGF;EACA,OAAcC,WAAWA,CAAA,EAAW;IAClC,IAAIH,MAAM,CAACC,QAAQ,KAAK,IAAI,EAAE;MAC5BD,MAAM,CAACC,QAAQ,GAAG,IAAID,MAAM,CAAC,CAAC;IAChC;IACA,OAAOA,MAAM,CAACC,QAAQ;EACxB;;EAEA;EACA,OAAcG,GAAGA,CAACC,KAAe,EAAEC,GAAW,EAAQ;IACpD,IAAIN,MAAM,CAACO,cAAc,EAAE;MACzB,QAAQF,KAAK;QACX,KAAKN,QAAQ,CAACS,KAAK;UACjBR,MAAM,CAACO,cAAc,CAACE,QAAQ,CAACH,GAAG,CAAC;UACnC;QACF,KAAKP,QAAQ,CAACW,KAAK;UACjBV,MAAM,CAACO,cAAc,CAACI,QAAQ,CAACL,GAAG,CAAC;UACnC;QACF,KAAKP,QAAQ,CAACa,IAAI;UAChBZ,MAAM,CAACO,cAAc,CAACM,OAAO,CAACP,GAAG,CAAC;UAClC;QACF,KAAKP,QAAQ,CAACe,IAAI;UAChBd,MAAM,CAACO,cAAc,CAACQ,OAAO,CAACT,GAAG,CAAC;UAClC;MACJ;IACF;EACF;;EAEA;EACOU,WAAWA,CAACC,UAA0B,EAAQ;IACnDjB,MAAM,CAACO,cAAc,GAAGU,UAAU;EACpC;AACF"}
|
|
@@ -41,10 +41,9 @@ export function createMapper(mapper, config) {
|
|
|
41
41
|
* @fn The function to wrap
|
|
42
42
|
* @return The original function with the mapper applied to its return value
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
export const withMapper = (mapper, fn) => function wrappedFunction() {
|
|
46
|
+
return mapper(fn(...arguments));
|
|
48
47
|
};
|
|
49
48
|
|
|
50
49
|
/**
|
|
@@ -54,9 +53,8 @@ export const withMapper = (mapper, fn) => {
|
|
|
54
53
|
* @fn The function to wrap
|
|
55
54
|
* @return The original function with the mapper applied to its return value
|
|
56
55
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
};
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
|
+
export const withMapperAsync = (mapper, fn) => async function wrappedAsyncFunction() {
|
|
58
|
+
return mapper(await fn(...arguments));
|
|
61
59
|
};
|
|
62
60
|
//# sourceMappingURL=mappers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMapper","mapper","config","inputSchema","outputSchema","input","transform","pipe","parse","withMapper","fn","wrappedFunction","arguments","withMapperAsync","wrappedAsyncFunction"],"sourceRoot":"../../../src","sources":["utils/mappers.ts"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["createMapper","mapper","config","inputSchema","outputSchema","input","transform","pipe","parse","withMapper","fn","wrappedFunction","arguments","withMapperAsync","wrappedAsyncFunction"],"sourceRoot":"../../../src","sources":["utils/mappers.ts"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA,OAAO,SAASA,YAAYA,CAC1BC,MAAuB,EACvBC,MAKC,EACD;EACA,IAAI,CAACA,MAAM,EAAE;IACX,OAAOD,MAAM;EACf;EAEA,MAAM;IAAEE,WAAW;IAAEC;EAAa,CAAC,GAAGF,MAAM;EAE5C,IAAIC,WAAW,EAAE;IACf,OAAQE,KAAc,IACpBF,WAAW,CAACG,SAAS,CAACL,MAAM,CAAC,CAACM,IAAI,CAACH,YAAY,CAAC,CAACI,KAAK,CAACH,KAAK,CAAC;EACjE;EAEA,OAAQA,KAAQ,IAAKD,YAAY,CAACI,KAAK,CAACP,MAAM,CAACI,KAAK,CAAC,CAAC;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,UAAU,GAAGA,CACxBR,MAAuB,EACvBS,EAAqB,KAErB,SAASC,eAAeA,CAAA,EAAa;EACnC,OAAOV,MAAM,CAACS,EAAE,CAAC,GAAAE,SAAO,CAAC,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAC7BZ,MAAuB,EACvBS,EAA8B,KAE9B,eAAeI,oBAAoBA,CAAA,EAAa;EAC9C,OAAOb,MAAM,CAAC,MAAMS,EAAE,CAAC,GAAAE,SAAO,CAAC,CAAC;AAClC,CAAC"}
|
package/lib/module/utils/misc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IoWalletError, UnexpectedStatusCodeError } from "./errors";
|
|
2
1
|
import { sha256 } from "js-sha256";
|
|
3
|
-
import {
|
|
2
|
+
import { IoWalletError, UnexpectedStatusCodeError } from "./errors";
|
|
3
|
+
import { Logger, LogLevel } from "./logging";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Check if a response is in the expected status, otherwise throw an error
|
|
@@ -15,11 +15,11 @@ export const hasStatusOrThrow = (status, customError) => async res => {
|
|
|
15
15
|
Logger.log(LogLevel.ERROR, `Http request failed. Expected ${status}, got ${res.status}, url: ${res.url}`);
|
|
16
16
|
throw new ErrorClass({
|
|
17
17
|
message: `Http request failed. Expected ${status}, got ${res.status}, url: ${res.url}`,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
reason: await parseRawHttpResponse(res),
|
|
19
|
+
// Pass the response body as reason so the original error can surface
|
|
20
|
+
statusCode: res.status
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
|
|
23
23
|
return res;
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -33,6 +33,7 @@ export const parseRawHttpResponse = response => {
|
|
|
33
33
|
|
|
34
34
|
// extract a type from an async function output
|
|
35
35
|
// helpful to bind the input of a function to the output of another
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
37
|
/**
|
|
37
38
|
* TODO [SIW-1310]: replace this function with a cryptographically secure one.
|
|
38
39
|
* @param size - The size of the string to generate
|
|
@@ -65,7 +66,7 @@ export const getCredentialHashWithouDiscloures = async credential => {
|
|
|
65
66
|
export const safeJsonParse = (text, withDefault) => {
|
|
66
67
|
try {
|
|
67
68
|
return JSON.parse(text);
|
|
68
|
-
} catch
|
|
69
|
+
} catch {
|
|
69
70
|
return withDefault ?? null;
|
|
70
71
|
}
|
|
71
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IoWalletError","UnexpectedStatusCodeError","
|
|
1
|
+
{"version":3,"names":["sha256","IoWalletError","UnexpectedStatusCodeError","Logger","LogLevel","hasStatusOrThrow","status","customError","res","ErrorClass","log","ERROR","url","message","reason","parseRawHttpResponse","statusCode","response","_response$headers$get","headers","get","includes","json","text","generateRandomAlphaNumericString","size","Array","from","Math","floor","random","toString","join","generateRandomBytes","Uint8Array","length","getCredentialHashWithouDiscloures","credential","tildeIndex","indexOf","slice","safeJsonParse","withDefault","JSON","parse","assert","condition","msg","arguments","undefined"],"sourceRoot":"../../../src","sources":["utils/misc.ts"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAElC,SAASC,aAAa,EAAEC,yBAAyB,QAAQ,UAAU;AACnE,SAASC,MAAM,EAAEC,QAAQ,QAAQ,WAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAC3BA,CAACC,MAAc,EAAEC,WAA8C,KAC/D,MAAOC,GAAa,IAAwB;EAC1C,IAAIA,GAAG,CAACF,MAAM,KAAKA,MAAM,EAAE;IACzB,MAAMG,UAAU,GAAGF,WAAW,IAAIL,yBAAyB;IAC3DC,MAAM,CAACO,GAAG,CACRN,QAAQ,CAACO,KAAK,EACb,iCAAgCL,MAAO,SAAQE,GAAG,CAACF,MAAO,UAASE,GAAG,CAACI,GAAI,EAC9E,CAAC;IACD,MAAM,IAAIH,UAAU,CAAC;MACnBI,OAAO,EAAG,iCAAgCP,MAAO,SAAQE,GAAG,CAACF,MAAO,UAASE,GAAG,CAACI,GAAI,EAAC;MACtFE,MAAM,EAAE,MAAMC,oBAAoB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