@pagopa/io-react-native-wallet 2.5.1 → 3.0.0
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/README.md +41 -7
- package/lib/commonjs/IoWallet.js +47 -0
- package/lib/commonjs/IoWallet.js.map +1 -0
- package/lib/commonjs/api/index.js +51 -0
- package/lib/commonjs/api/index.js.map +1 -0
- package/lib/commonjs/credential/index.js +1 -9
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +37 -44
- package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js +6 -0
- package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js +6 -0
- package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js +6 -0
- package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/04-authorize-access.js +6 -0
- package/lib/commonjs/credential/issuance/api/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/05-obtain-credential.js +6 -0
- package/lib/commonjs/credential/issuance/api/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js +6 -0
- package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js +67 -0
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/index.js +6 -0
- package/lib/commonjs/credential/issuance/api/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js +17 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js +2 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/types.js +26 -0
- package/lib/commonjs/credential/issuance/api/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +55 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +178 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +183 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/authorization.js +56 -0
- package/lib/commonjs/credential/issuance/common/authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/errors.js +35 -0
- package/lib/commonjs/credential/issuance/common/errors.js.map +1 -0
- package/lib/commonjs/credential/issuance/index.js +8 -68
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
- 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 +25 -37
- 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 +24 -46
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js +8 -24
- 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 +19 -0
- package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +63 -0
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +195 -0
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +69 -0
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +148 -0
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +34 -0
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/index.js +28 -0
- package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +28 -0
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/types.js +44 -0
- package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +24 -0
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +92 -0
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +187 -0
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +75 -0
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +143 -0
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +34 -0
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/index.js +28 -0
- package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +73 -0
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/types.js +14 -0
- package/lib/commonjs/credential/issuance/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credential/offer/README.md +103 -119
- package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js +6 -0
- package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/api/02-extract-grant-details.js +6 -0
- package/lib/commonjs/credential/offer/api/02-extract-grant-details.js.map +1 -0
- package/lib/commonjs/credential/offer/api/index.js +17 -0
- package/lib/commonjs/credential/offer/api/index.js.map +1 -0
- package/lib/commonjs/credential/offer/api/types.js +6 -0
- package/lib/commonjs/credential/offer/api/types.js.map +1 -0
- package/lib/commonjs/credential/offer/common/errors.js +22 -0
- package/lib/commonjs/credential/offer/common/errors.js.map +1 -0
- package/lib/commonjs/credential/offer/index.js +7 -7
- package/lib/commonjs/credential/offer/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.0.0/index.js +17 -0
- package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +62 -0
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +25 -0
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/index.js +14 -0
- package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/README.md +12 -9
- package/lib/commonjs/credential/presentation/api/01-start-flow.js +6 -0
- package/lib/commonjs/credential/presentation/api/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js +6 -0
- package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/03-get-request-object.js +6 -0
- package/lib/commonjs/credential/presentation/api/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/04-verify-request-object.js +6 -0
- package/lib/commonjs/credential/presentation/api/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js +6 -0
- package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js +6 -0
- package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +31 -0
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/index.js +17 -0
- package/lib/commonjs/credential/presentation/api/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/types.js +74 -0
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/errors.js +121 -0
- package/lib/commonjs/credential/presentation/common/errors.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/dcql.js +164 -0
- package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/http.js +28 -0
- package/lib/commonjs/credential/presentation/common/utils/http.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +56 -0
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils.js +28 -0
- package/lib/commonjs/credential/presentation/common/utils.js.map +1 -0
- package/lib/commonjs/credential/presentation/index.js +7 -80
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +21 -0
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +21 -0
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +58 -0
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js +86 -0
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +85 -0
- package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js +165 -0
- package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/index.js +24 -0
- package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +33 -0
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/types.js +46 -0
- package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js +27 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js +27 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +23 -0
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +22 -0
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +37 -0
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js +33 -0
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +105 -0
- package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js +137 -0
- package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/index.js +24 -0
- package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +32 -0
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +74 -0
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/types.js +19 -0
- package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js +88 -0
- package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +77 -19
- package/lib/commonjs/credential/status/api/index.js +17 -0
- package/lib/commonjs/credential/status/api/index.js.map +1 -0
- package/lib/commonjs/credential/status/api/status-assertion.js +6 -0
- package/lib/commonjs/credential/status/api/status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/api/status-list.js +6 -0
- package/lib/commonjs/credential/status/api/status-list.js.map +1 -0
- package/lib/commonjs/credential/status/api/types.js +2 -0
- package/lib/commonjs/credential/status/api/types.js.map +1 -0
- package/lib/commonjs/credential/status/index.js +21 -12
- package/lib/commonjs/credential/status/index.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +71 -0
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +74 -0
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/index.js +20 -0
- package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/mappers.js +10 -0
- package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/types.js +81 -0
- package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +48 -0
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +24 -0
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js +20 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +5 -1
- package/lib/commonjs/credential/trustmark/api/index.js +6 -0
- package/lib/commonjs/credential/trustmark/api/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +10 -3
- package/lib/commonjs/credential/trustmark/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +70 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/README.md +8 -2
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +84 -0
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/api/index.js +6 -0
- package/lib/commonjs/credentials-catalogue/api/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/index.js +10 -3
- package/lib/commonjs/credentials-catalogue/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +33 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +12 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +29 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +99 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +47 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +12 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +61 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +156 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +57 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -0
- package/lib/commonjs/index.js +21 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mdoc/index.js +22 -3
- 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 +0 -61
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -12
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +20 -164
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +26 -50
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +5 -7
- package/lib/commonjs/sd-jwt/utils.js.map +1 -1
- package/lib/commonjs/trust/README.md +24 -11
- package/lib/commonjs/trust/api/TrustAnchorConfig.js +29 -0
- package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -0
- package/lib/commonjs/trust/api/index.js +6 -0
- package/lib/commonjs/trust/api/index.js.map +1 -0
- package/lib/commonjs/trust/common/build-chain.js +118 -0
- package/lib/commonjs/trust/common/build-chain.js.map +1 -0
- package/lib/commonjs/trust/common/errors.js +134 -0
- package/lib/commonjs/trust/common/errors.js.map +1 -0
- package/lib/commonjs/trust/common/types.js +82 -0
- package/lib/commonjs/trust/common/types.js.map +1 -0
- package/lib/commonjs/trust/common/utils.js +139 -0
- package/lib/commonjs/trust/common/utils.js.map +1 -0
- package/lib/commonjs/trust/common/verify-chain.js +193 -0
- package/lib/commonjs/trust/common/verify-chain.js.map +1 -0
- package/lib/commonjs/trust/index.js +9 -8
- package/lib/commonjs/trust/index.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/build-chain.js +15 -0
- package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/entities.js +51 -0
- package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/index.js +18 -0
- package/lib/commonjs/trust/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/mappers.js +21 -0
- package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/types.js +159 -0
- package/lib/commonjs/trust/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/verify-chain.js +19 -0
- package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -0
- package/lib/commonjs/trust/v1.3.3/entities.js +43 -0
- package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -0
- package/lib/commonjs/trust/v1.3.3/types.js +54 -0
- package/lib/commonjs/trust/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/utils/callbacks.js +101 -0
- package/lib/commonjs/utils/callbacks.js.map +1 -0
- package/lib/commonjs/utils/config.js +23 -0
- package/lib/commonjs/utils/config.js.map +1 -0
- package/lib/commonjs/utils/credentials.js +9 -6
- package/lib/commonjs/utils/credentials.js.map +1 -1
- package/lib/commonjs/utils/errors.js +68 -5
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/mappers.js +71 -0
- package/lib/commonjs/utils/mappers.js.map +1 -0
- package/lib/commonjs/utils/misc.js +19 -4
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/object.js +20 -0
- package/lib/commonjs/utils/object.js.map +1 -0
- package/lib/commonjs/utils/par.js +5 -4
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/zod.js +3 -1
- package/lib/commonjs/utils/zod.js.map +1 -1
- package/lib/commonjs/wallet-instance/README.md +8 -5
- package/lib/commonjs/wallet-instance/api/index.js +6 -0
- package/lib/commonjs/wallet-instance/api/index.js.map +1 -0
- package/lib/commonjs/wallet-instance/common/wallet-instance.js +75 -0
- package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -0
- package/lib/commonjs/wallet-instance/index.js +13 -83
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.0.0/index.js +15 -0
- package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/wallet-instance/v1.3.3/index.js +15 -0
- package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -2
- package/lib/commonjs/wallet-instance-attestation/api/index.js +6 -0
- package/lib/commonjs/wallet-instance-attestation/api/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/api/types.js +30 -0
- package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/common/types.js +34 -0
- package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/index.js +10 -53
- package/lib/commonjs/wallet-instance-attestation/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +17 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +106 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +19 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +46 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +37 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +19 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +12 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js +42 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
- package/lib/module/IoWallet.js +40 -0
- package/lib/module/IoWallet.js.map +1 -0
- package/lib/module/api/index.js +43 -0
- package/lib/module/api/index.js.map +1 -0
- package/lib/module/credential/index.js +1 -5
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/README.md +37 -44
- package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js +2 -0
- package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/api/02-start-user-authorization.js +2 -0
- package/lib/module/credential/issuance/api/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/api/03-complete-user-authorization.js +2 -0
- package/lib/module/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/api/04-authorize-access.js +2 -0
- package/lib/module/credential/issuance/api/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/api/05-obtain-credential.js +2 -0
- package/lib/module/credential/issuance/api/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js +2 -0
- package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/api/IssuerConfig.js +60 -0
- package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -0
- package/lib/module/credential/issuance/api/index.js +2 -0
- package/lib/module/credential/issuance/api/index.js.map +1 -0
- package/lib/module/credential/issuance/api/mrtd-pop/index.js +3 -0
- package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -0
- package/lib/module/credential/issuance/api/mrtd-pop/types.js +2 -0
- package/lib/module/credential/issuance/api/mrtd-pop/types.js.map +1 -0
- package/lib/module/credential/issuance/api/types.js +17 -0
- package/lib/module/credential/issuance/api/types.js.map +1 -0
- package/lib/module/credential/issuance/common/02-start-user-authorization.js +47 -0
- package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +171 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +176 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
- package/lib/module/credential/issuance/common/authorization.js +48 -0
- package/lib/module/credential/issuance/common/authorization.js.map +1 -0
- package/lib/module/credential/issuance/common/errors.js +28 -0
- package/lib/module/credential/issuance/common/errors.js.map +1 -0
- package/lib/module/credential/issuance/index.js +4 -9
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
- 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 +24 -38
- 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 +22 -46
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/index.js +6 -1
- 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 +12 -0
- package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +56 -0
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +182 -0
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +60 -0
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +140 -0
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +27 -0
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/index.js +21 -0
- package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/mappers.js +21 -0
- package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/types.js +22 -0
- package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +17 -0
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +85 -0
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +174 -0
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +66 -0
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +135 -0
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +27 -0
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/index.js +21 -0
- package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/mappers.js +66 -0
- package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/types.js +5 -0
- package/lib/module/credential/issuance/v1.3.3/types.js.map +1 -0
- package/lib/module/credential/offer/README.md +103 -119
- package/lib/module/credential/offer/api/01-resolve-credential-offer.js +2 -0
- package/lib/module/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/api/02-extract-grant-details.js +2 -0
- package/lib/module/credential/offer/api/02-extract-grant-details.js.map +1 -0
- package/lib/module/credential/offer/api/index.js +3 -0
- package/lib/module/credential/offer/api/index.js.map +1 -0
- package/lib/module/credential/offer/api/types.js +2 -0
- package/lib/module/credential/offer/api/types.js.map +1 -0
- package/lib/module/credential/offer/common/errors.js +14 -0
- package/lib/module/credential/offer/common/errors.js.map +1 -0
- package/lib/module/credential/offer/index.js +4 -4
- package/lib/module/credential/offer/index.js.map +1 -1
- package/lib/module/credential/offer/v1.0.0/index.js +10 -0
- package/lib/module/credential/offer/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +55 -0
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +18 -0
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/index.js +7 -0
- package/lib/module/credential/offer/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/presentation/README.md +12 -9
- package/lib/module/credential/presentation/api/01-start-flow.js +2 -0
- package/lib/module/credential/presentation/api/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js +2 -0
- package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/api/03-get-request-object.js +2 -0
- package/lib/module/credential/presentation/api/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/api/04-verify-request-object.js +2 -0
- package/lib/module/credential/presentation/api/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js +2 -0
- package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/api/06-send-authorization-response.js +2 -0
- package/lib/module/credential/presentation/api/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js +23 -0
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
- package/lib/module/credential/presentation/api/index.js +3 -0
- package/lib/module/credential/presentation/api/index.js.map +1 -0
- package/lib/module/credential/presentation/api/types.js +64 -0
- package/lib/module/credential/presentation/api/types.js.map +1 -0
- package/lib/module/credential/presentation/common/errors.js +103 -0
- package/lib/module/credential/presentation/common/errors.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/dcql.js +152 -0
- package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/http.js +21 -0
- package/lib/module/credential/presentation/common/utils/http.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/sd-jwt.js +49 -0
- package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -0
- package/lib/module/credential/presentation/common/utils.js +21 -0
- package/lib/module/credential/presentation/common/utils.js.map +1 -0
- package/lib/module/credential/presentation/index.js +4 -11
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +14 -0
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +14 -0
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +51 -0
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js +79 -0
- package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +76 -0
- package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js +155 -0
- package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/index.js +17 -0
- package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/mappers.js +25 -0
- package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/types.js +36 -0
- package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js +20 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +20 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +16 -0
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +15 -0
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +30 -0
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js +26 -0
- package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +97 -0
- package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js +129 -0
- package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/index.js +17 -0
- package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/mappers.js +24 -0
- package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +65 -0
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/types.js +9 -0
- package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js +79 -0
- package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
- package/lib/module/credential/status/README.md +77 -19
- package/lib/module/credential/status/api/index.js +14 -0
- package/lib/module/credential/status/api/index.js.map +1 -0
- package/lib/module/credential/status/api/status-assertion.js +2 -0
- package/lib/module/credential/status/api/status-assertion.js.map +1 -0
- package/lib/module/credential/status/api/status-list.js +2 -0
- package/lib/module/credential/status/api/status-list.js.map +1 -0
- package/lib/module/credential/status/api/types.js +2 -0
- package/lib/module/credential/status/api/types.js.map +1 -0
- package/lib/module/credential/status/index.js +3 -4
- package/lib/module/credential/status/index.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js +64 -0
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +67 -0
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/index.js +13 -0
- package/lib/module/credential/status/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/mappers.js +3 -0
- package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/types.js +71 -0
- package/lib/module/credential/status/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/01-status-list.js +41 -0
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +17 -0
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/index.js +13 -0
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +5 -1
- package/lib/module/credential/trustmark/api/index.js +2 -0
- package/lib/module/credential/trustmark/api/index.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +2 -2
- package/lib/module/credential/trustmark/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +61 -0
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/v1.0.0/index.js +5 -0
- package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js +5 -0
- package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/v1.3.3/index.js +5 -0
- package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -0
- package/lib/module/credentials-catalogue/README.md +8 -2
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +73 -0
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/api/index.js +2 -0
- package/lib/module/credentials-catalogue/api/index.js.map +1 -0
- package/lib/module/credentials-catalogue/index.js +2 -1
- package/lib/module/credentials-catalogue/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +26 -0
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/index.js +5 -0
- package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js +22 -0
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/types.js +89 -0
- package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +39 -0
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/index.js +5 -0
- package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js +54 -0
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/types.js +141 -0
- package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/utils.js +50 -0
- package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -0
- package/lib/module/index.js +9 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/mdoc/index.js +19 -2
- 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 +1 -62
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +3 -12
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +19 -147
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +21 -44
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +5 -7
- package/lib/module/sd-jwt/utils.js.map +1 -1
- package/lib/module/trust/README.md +24 -11
- package/lib/module/trust/api/TrustAnchorConfig.js +21 -0
- package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -0
- package/lib/module/trust/api/index.js +2 -0
- package/lib/module/trust/api/index.js.map +1 -0
- package/lib/module/trust/common/build-chain.js +111 -0
- package/lib/module/trust/common/build-chain.js.map +1 -0
- package/lib/module/trust/common/errors.js +116 -0
- package/lib/module/trust/common/errors.js.map +1 -0
- package/lib/module/trust/common/types.js +69 -0
- package/lib/module/trust/common/types.js.map +1 -0
- package/lib/module/trust/common/utils.js +126 -0
- package/lib/module/trust/common/utils.js.map +1 -0
- package/lib/module/trust/common/verify-chain.js +188 -0
- package/lib/module/trust/common/verify-chain.js.map +1 -0
- package/lib/module/trust/index.js +3 -5
- package/lib/module/trust/index.js.map +1 -1
- package/lib/module/trust/v1.0.0/build-chain.js +8 -0
- package/lib/module/trust/v1.0.0/build-chain.js.map +1 -0
- package/lib/module/trust/v1.0.0/entities.js +41 -0
- package/lib/module/trust/v1.0.0/entities.js.map +1 -0
- package/lib/module/trust/v1.0.0/index.js +11 -0
- package/lib/module/trust/v1.0.0/index.js.map +1 -0
- package/lib/module/trust/v1.0.0/mappers.js +14 -0
- package/lib/module/trust/v1.0.0/mappers.js.map +1 -0
- package/lib/module/trust/v1.0.0/types.js +150 -0
- package/lib/module/trust/v1.0.0/types.js.map +1 -0
- package/lib/module/trust/v1.0.0/verify-chain.js +12 -0
- package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -0
- package/lib/module/trust/v1.3.3/entities.js +37 -0
- package/lib/module/trust/v1.3.3/entities.js.map +1 -0
- package/lib/module/trust/v1.3.3/types.js +46 -0
- package/lib/module/trust/v1.3.3/types.js.map +1 -0
- package/lib/module/utils/callbacks.js +94 -0
- package/lib/module/utils/callbacks.js.map +1 -0
- package/lib/module/utils/config.js +16 -0
- package/lib/module/utils/config.js.map +1 -0
- package/lib/module/utils/credentials.js +9 -6
- package/lib/module/utils/credentials.js.map +1 -1
- package/lib/module/utils/errors.js +62 -2
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/mappers.js +62 -0
- package/lib/module/utils/mappers.js.map +1 -0
- package/lib/module/utils/misc.js +15 -1
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/object.js +11 -0
- package/lib/module/utils/object.js.map +1 -0
- package/lib/module/utils/par.js +5 -4
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/zod.js +1 -0
- package/lib/module/utils/zod.js.map +1 -1
- package/lib/module/wallet-instance/README.md +8 -5
- package/lib/module/wallet-instance/api/index.js +2 -0
- package/lib/module/wallet-instance/api/index.js.map +1 -0
- package/lib/module/wallet-instance/common/wallet-instance.js +65 -0
- package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -0
- package/lib/module/wallet-instance/index.js +2 -80
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance/v1.0.0/index.js +8 -0
- package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -0
- package/lib/module/wallet-instance/v1.3.3/index.js +8 -0
- package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/README.md +8 -2
- package/lib/module/wallet-instance-attestation/api/index.js +2 -0
- package/lib/module/wallet-instance-attestation/api/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/api/types.js +22 -0
- package/lib/module/wallet-instance-attestation/api/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/common/types.js +25 -0
- package/lib/module/wallet-instance-attestation/common/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/index.js +2 -51
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js +10 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +100 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +11 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js +35 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +31 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js +12 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +5 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js +32 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
- package/lib/typescript/IoWallet.d.ts +28 -0
- package/lib/typescript/IoWallet.d.ts.map +1 -0
- package/lib/typescript/api/index.d.ts +29 -0
- package/lib/typescript/api/index.d.ts.map +1 -0
- package/lib/typescript/client/generated/wallet-provider.d.ts +14 -14
- package/lib/typescript/credential/index.d.ts +1 -5
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts +18 -0
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +48 -0
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +78 -0
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +33 -0
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +36 -0
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +36 -0
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +423 -0
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/index.d.ts +14 -0
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +74 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +34 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/types.d.ts +64 -0
- package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +21 -0
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts +3 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts +3 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/authorization.d.ts +21 -0
- package/lib/typescript/credential/issuance/common/authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/errors.d.ts +19 -0
- package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/index.d.ts +5 -11
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts +2 -24
- 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 -22
- 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 +3 -38
- 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 +2 -6
- 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 +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +16 -0
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts +5 -0
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +307 -0
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts +43 -0
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +16 -0
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +5 -0
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +2309 -0
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/types.d.ts +10 -0
- package/lib/typescript/credential/issuance/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts +22 -0
- package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts +13 -0
- package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/index.d.ts +6 -0
- package/lib/typescript/credential/offer/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/types.d.ts +5 -0
- package/lib/typescript/credential/offer/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/offer/common/errors.d.ts +10 -0
- package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/offer/index.d.ts +5 -6
- package/lib/typescript/credential/offer/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts +25 -0
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts +16 -0
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +18 -0
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts +18 -0
- package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts +19 -0
- package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts +23 -0
- package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts +41 -0
- package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts +54 -0
- package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +185 -0
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/index.d.ts +12 -0
- package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/types.d.ts +207 -0
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/errors.d.ts +80 -0
- package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +293 -0
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/http.d.ts +11 -0
- package/lib/typescript/credential/presentation/common/utils/http.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts +14 -0
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils.d.ts +11 -0
- package/lib/typescript/credential/presentation/common/utils.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/index.d.ts +5 -12
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts +26 -0
- package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +143 -0
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +80 -0
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +11 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +11 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts +18 -0
- package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +619 -0
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts +13 -0
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +3730 -0
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts +28 -0
- package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/index.d.ts +21 -0
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/status-assertion.d.ts +49 -0
- package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/status-list.d.ts +40 -0
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/types.d.ts +16 -0
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +3 -6
- package/lib/typescript/credential/status/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +47 -0
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/types.d.ts +782 -0
- package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/api/index.d.ts +49 -0
- package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +3 -3
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +613 -0
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/api/index.d.ts +18 -0
- package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/index.d.ts +3 -2
- package/lib/typescript/credentials-catalogue/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +54 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +844 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +168 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +1074 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +26 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/index.d.ts +4 -0
- 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 +58 -278
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +118 -153
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +247 -0
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -0
- package/lib/typescript/trust/api/index.d.ts +43 -0
- package/lib/typescript/trust/api/index.d.ts.map +1 -0
- package/lib/typescript/trust/common/build-chain.d.ts +21 -0
- package/lib/typescript/trust/common/build-chain.d.ts.map +1 -0
- package/lib/typescript/trust/common/errors.d.ts +103 -0
- package/lib/typescript/trust/common/errors.d.ts.map +1 -0
- package/lib/typescript/trust/common/types.d.ts +1306 -0
- package/lib/typescript/trust/common/types.d.ts.map +1 -0
- package/lib/typescript/trust/common/utils.d.ts +53 -0
- package/lib/typescript/trust/common/utils.d.ts.map +1 -0
- package/lib/typescript/trust/common/verify-chain.d.ts +27 -0
- package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -0
- package/lib/typescript/trust/index.d.ts +4 -5
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/build-chain.d.ts +54 -0
- package/lib/typescript/trust/v1.0.0/build-chain.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/entities.d.ts +968 -0
- package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/mappers.d.ts +113 -0
- package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/types.d.ts +12744 -0
- package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts +57 -0
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -0
- package/lib/typescript/trust/v1.3.3/entities.d.ts +103 -0
- package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -0
- package/lib/typescript/trust/v1.3.3/types.d.ts +14620 -0
- package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/utils/auth.d.ts +2 -2
- package/lib/typescript/utils/callbacks.d.ts +21 -0
- package/lib/typescript/utils/callbacks.d.ts.map +1 -0
- package/lib/typescript/utils/config.d.ts +10 -0
- package/lib/typescript/utils/config.d.ts.map +1 -0
- package/lib/typescript/utils/credentials.d.ts +2 -3
- package/lib/typescript/utils/credentials.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +38 -3
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/mappers.d.ts +47 -0
- package/lib/typescript/utils/mappers.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts +7 -1
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/object.d.ts +4 -0
- package/lib/typescript/utils/object.d.ts.map +1 -0
- package/lib/typescript/utils/par.d.ts +2 -2
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/pop.d.ts +2 -2
- package/lib/typescript/utils/zod.d.ts +2 -0
- package/lib/typescript/utils/zod.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/api/index.d.ts +45 -0
- package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts +6 -0
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/index.d.ts +3 -35
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts +46 -0
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts +211 -0
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts +306 -0
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/index.d.ts +3 -34
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +91 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +710 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts +15 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +925 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -0
- package/package.json +20 -13
- package/src/IoWallet.ts +50 -0
- package/src/api/index.ts +55 -0
- package/src/credential/index.ts +1 -5
- package/src/credential/issuance/README.md +37 -44
- package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +17 -0
- package/src/credential/issuance/api/02-start-user-authorization.ts +50 -0
- package/src/credential/issuance/api/03-complete-user-authorization.ts +102 -0
- package/src/credential/issuance/api/04-authorize-access.ts +37 -0
- package/src/credential/issuance/api/05-obtain-credential.ts +42 -0
- package/src/credential/issuance/api/06-verify-and-parse-credential.ts +42 -0
- package/src/credential/issuance/api/IssuerConfig.ts +65 -0
- package/src/credential/issuance/api/index.ts +21 -0
- package/src/credential/issuance/api/mrtd-pop/index.ts +104 -0
- package/src/credential/issuance/api/mrtd-pop/types.ts +37 -0
- package/src/credential/issuance/api/types.ts +34 -0
- package/src/credential/issuance/common/02-start-user-authorization.ts +86 -0
- package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +236 -0
- package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +261 -0
- package/src/credential/issuance/common/authorization.ts +89 -0
- package/src/credential/issuance/common/errors.ts +29 -0
- package/src/credential/issuance/index.ts +5 -62
- package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +20 -65
- package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +25 -56
- package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +34 -90
- package/src/credential/issuance/mrtd-pop/index.ts +4 -17
- package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +14 -0
- package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +68 -0
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +279 -0
- package/src/credential/issuance/v1.0.0/04-authorize-access.ts +93 -0
- package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +212 -0
- package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +46 -0
- package/src/credential/issuance/v1.0.0/index.ts +28 -0
- package/src/credential/issuance/v1.0.0/mappers.ts +29 -0
- package/src/credential/issuance/v1.0.0/types.ts +28 -0
- package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +19 -0
- package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +109 -0
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +249 -0
- package/src/credential/issuance/v1.3.3/04-authorize-access.ts +84 -0
- package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +188 -0
- package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +46 -0
- package/src/credential/issuance/v1.3.3/index.ts +28 -0
- package/src/credential/issuance/v1.3.3/mappers.ts +87 -0
- package/src/credential/issuance/v1.3.3/types.ts +6 -0
- package/src/credential/offer/README.md +103 -119
- package/src/credential/offer/api/01-resolve-credential-offer.ts +23 -0
- package/src/credential/offer/api/02-extract-grant-details.ts +13 -0
- package/src/credential/offer/api/index.ts +8 -0
- package/src/credential/offer/api/types.ts +5 -0
- package/src/credential/offer/common/errors.ts +17 -0
- package/src/credential/offer/index.ts +5 -16
- package/src/credential/offer/v1.0.0/index.ts +11 -0
- package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +60 -0
- package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +27 -0
- package/src/credential/offer/v1.3.3/index.ts +8 -0
- package/src/credential/presentation/README.md +12 -9
- package/src/credential/presentation/api/01-start-flow.ts +18 -0
- package/src/credential/presentation/api/02-evaluate-rp-trust.ts +19 -0
- package/src/credential/presentation/api/03-get-request-object.ts +20 -0
- package/src/credential/presentation/api/04-verify-request-object.ts +24 -0
- package/src/credential/presentation/api/05-evaluate-dcql-query.ts +54 -0
- package/src/credential/presentation/api/06-send-authorization-response.ts +67 -0
- package/src/credential/presentation/api/RelyingPartyConfig.ts +25 -0
- package/src/credential/presentation/api/index.ts +18 -0
- package/src/credential/presentation/api/types.ts +129 -0
- package/src/credential/presentation/common/errors.ts +116 -0
- package/src/credential/presentation/common/utils/dcql.ts +188 -0
- package/src/credential/presentation/common/utils/http.ts +30 -0
- package/src/credential/presentation/common/utils/sd-jwt.ts +68 -0
- package/src/credential/presentation/common/utils.ts +30 -0
- package/src/credential/presentation/index.ts +5 -71
- package/src/credential/presentation/v1.0.0/01-start-flow.ts +22 -0
- package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +14 -0
- package/src/credential/presentation/v1.0.0/03-get-request-object.ts +61 -0
- package/src/credential/presentation/v1.0.0/04-verify-request-object.ts +104 -0
- package/src/credential/presentation/v1.0.0/05-evaluate-dcql-query.ts +97 -0
- package/src/credential/presentation/v1.0.0/06-send-authorization-response.ts +196 -0
- package/src/credential/presentation/v1.0.0/index.ts +22 -0
- package/src/credential/presentation/v1.0.0/mappers.ts +35 -0
- package/src/credential/presentation/v1.0.0/types.ts +40 -0
- package/src/credential/presentation/v1.0.0/utils.jwks.ts +26 -0
- package/src/credential/presentation/v1.0.0/utils.ts +26 -0
- package/src/credential/presentation/v1.3.3/01-start-flow.ts +22 -0
- package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +15 -0
- package/src/credential/presentation/v1.3.3/03-get-request-object.ts +28 -0
- package/src/credential/presentation/v1.3.3/04-verify-request-object.ts +31 -0
- package/src/credential/presentation/v1.3.3/05-evaluate-dcql-query.ts +119 -0
- package/src/credential/presentation/v1.3.3/06-send-authorization-response.ts +160 -0
- package/src/credential/presentation/v1.3.3/index.ts +22 -0
- package/src/credential/presentation/v1.3.3/mappers.ts +34 -0
- package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +93 -0
- package/src/credential/presentation/v1.3.3/types.ts +12 -0
- package/src/credential/presentation/v1.3.3/utils.mdoc.ts +98 -0
- package/src/credential/status/README.md +77 -19
- package/src/credential/status/api/index.ts +23 -0
- package/src/credential/status/api/status-assertion.ts +57 -0
- package/src/credential/status/api/status-list.ts +50 -0
- package/src/credential/status/api/types.ts +15 -0
- package/src/credential/status/index.ts +3 -15
- package/src/credential/status/v1.0.0/01-status-assertion.ts +95 -0
- package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +87 -0
- package/src/credential/status/v1.0.0/index.ts +14 -0
- package/src/credential/status/v1.0.0/mappers.ts +8 -0
- package/src/credential/status/v1.0.0/types.ts +90 -0
- package/src/credential/status/v1.3.3/01-status-list.ts +50 -0
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +19 -0
- package/src/credential/status/v1.3.3/index.ts +14 -0
- package/src/credential/trustmark/README.md +5 -1
- package/src/credential/trustmark/api/index.ts +50 -0
- package/src/credential/trustmark/index.ts +3 -8
- package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +89 -0
- package/src/credential/trustmark/v1.0.0/index.ts +6 -0
- package/src/credential/trustmark/v1.3.3/get-credential-trustmark.ts +7 -0
- package/src/credential/trustmark/v1.3.3/index.ts +6 -0
- package/src/credentials-catalogue/README.md +8 -2
- package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +82 -0
- package/src/credentials-catalogue/api/index.ts +21 -0
- package/src/credentials-catalogue/index.ts +3 -2
- package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +41 -0
- package/src/credentials-catalogue/v1.0.0/index.ts +6 -0
- package/src/credentials-catalogue/v1.0.0/mappers.ts +20 -0
- package/src/credentials-catalogue/v1.0.0/types.ts +97 -0
- package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +52 -0
- package/src/credentials-catalogue/v1.3.3/index.ts +6 -0
- package/src/credentials-catalogue/v1.3.3/mappers.ts +75 -0
- package/src/credentials-catalogue/v1.3.3/types.ts +162 -0
- package/src/credentials-catalogue/v1.3.3/utils.ts +64 -0
- package/src/index.ts +18 -7
- package/src/mdoc/index.ts +43 -2
- package/src/mdoc/utils.ts +4 -2
- package/src/sd-jwt/__test__/types.test.ts +1 -77
- package/src/sd-jwt/__test__/utils.test.ts +3 -13
- package/src/sd-jwt/index.ts +19 -164
- package/src/sd-jwt/types.ts +33 -63
- package/src/sd-jwt/utils.ts +11 -8
- package/src/trust/README.md +24 -11
- package/src/trust/api/TrustAnchorConfig.ts +20 -0
- package/src/trust/api/index.ts +57 -0
- package/src/trust/common/build-chain.ts +161 -0
- package/src/trust/common/errors.ts +138 -0
- package/src/trust/common/types.ts +78 -0
- package/src/trust/common/utils.ts +150 -0
- package/src/trust/common/verify-chain.ts +293 -0
- package/src/trust/index.ts +4 -6
- package/src/trust/v1.0.0/build-chain.ts +8 -0
- package/src/trust/v1.0.0/entities.ts +93 -0
- package/src/trust/v1.0.0/index.ts +15 -0
- package/src/trust/v1.0.0/mappers.ts +15 -0
- package/src/trust/v1.0.0/types.ts +178 -0
- package/src/trust/v1.0.0/verify-chain.ts +12 -0
- package/src/trust/v1.3.3/entities.ts +51 -0
- package/src/trust/v1.3.3/types.ts +68 -0
- package/src/utils/callbacks.ts +84 -0
- package/src/utils/config.ts +18 -0
- package/src/utils/credentials.ts +10 -9
- package/src/utils/errors.ts +69 -6
- package/src/utils/mappers.ts +84 -0
- package/src/utils/misc.ts +16 -2
- package/src/utils/object.ts +15 -0
- package/src/utils/par.ts +3 -5
- package/src/utils/zod.ts +3 -0
- package/src/wallet-instance/README.md +8 -5
- package/src/wallet-instance/api/index.ts +53 -0
- package/src/wallet-instance/common/wallet-instance.ts +96 -0
- package/src/wallet-instance/index.ts +3 -120
- package/src/wallet-instance/v1.0.0/index.ts +14 -0
- package/src/wallet-instance/v1.3.3/index.ts +14 -0
- package/src/wallet-instance-attestation/README.md +8 -2
- package/src/wallet-instance-attestation/api/index.ts +48 -0
- package/src/wallet-instance-attestation/api/types.ts +25 -0
- package/src/wallet-instance-attestation/common/types.ts +25 -0
- package/src/wallet-instance-attestation/index.ts +3 -56
- package/src/wallet-instance-attestation/v1.0.0/index.ts +11 -0
- package/src/wallet-instance-attestation/v1.0.0/issuing.ts +154 -0
- package/src/wallet-instance-attestation/v1.0.0/mappers.ts +24 -0
- package/src/wallet-instance-attestation/v1.0.0/types.ts +59 -0
- package/src/wallet-instance-attestation/v1.0.0/utils.ts +37 -0
- package/src/wallet-instance-attestation/v1.3.3/index.ts +13 -0
- package/src/wallet-instance-attestation/v1.3.3/issuing.ts +7 -0
- package/src/wallet-instance-attestation/v1.3.3/types.ts +48 -0
- package/lib/commonjs/credential/issuance/01-start-flow.js +0 -2
- package/lib/commonjs/credential/issuance/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -32
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +0 -132
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +0 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +0 -259
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +0 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +0 -87
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +0 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +0 -168
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +0 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +0 -388
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
- package/lib/commonjs/credential/issuance/errors.js +0 -35
- package/lib/commonjs/credential/issuance/errors.js.map +0 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/types.js +0 -57
- package/lib/commonjs/credential/issuance/mrtd-pop/types.js.map +0 -1
- package/lib/commonjs/credential/issuance/types.js +0 -43
- package/lib/commonjs/credential/issuance/types.js.map +0 -1
- package/lib/commonjs/credential/offer/01-start-flow.js +0 -75
- package/lib/commonjs/credential/offer/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/offer/02-fetch-credential-offer.js +0 -45
- package/lib/commonjs/credential/offer/02-fetch-credential-offer.js.map +0 -1
- package/lib/commonjs/credential/offer/errors.js +0 -22
- package/lib/commonjs/credential/offer/errors.js.map +0 -1
- package/lib/commonjs/credential/offer/types.js +0 -51
- package/lib/commonjs/credential/offer/types.js.map +0 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +0 -45
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +0 -34
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +0 -56
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +0 -32
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +0 -95
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +0 -39
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +0 -155
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +0 -307
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +0 -252
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +0 -1
- package/lib/commonjs/credential/presentation/errors.js +0 -121
- package/lib/commonjs/credential/presentation/errors.js.map +0 -1
- package/lib/commonjs/credential/presentation/types.js +0 -157
- package/lib/commonjs/credential/presentation/types.js.map +0 -1
- package/lib/commonjs/credential/status/01-start-flow.js +0 -2
- package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/status/02-status-assertion.js +0 -79
- package/lib/commonjs/credential/status/02-status-assertion.js.map +0 -1
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +0 -85
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
- package/lib/commonjs/credential/status/types.js +0 -81
- package/lib/commonjs/credential/status/types.js.map +0 -1
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -86
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js +0 -42
- package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
- package/lib/commonjs/credentials-catalogue/types.js +0 -99
- package/lib/commonjs/credentials-catalogue/types.js.map +0 -1
- package/lib/commonjs/pid/index.js +0 -11
- package/lib/commonjs/pid/index.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/converters.js +0 -25
- package/lib/commonjs/pid/sd-jwt/converters.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/index.js +0 -77
- package/lib/commonjs/pid/sd-jwt/index.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/types.js +0 -50
- package/lib/commonjs/pid/sd-jwt/types.js.map +0 -1
- package/lib/commonjs/sd-jwt/__test__/converters.test.js +0 -25
- package/lib/commonjs/sd-jwt/__test__/converters.test.js.map +0 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +0 -134
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +0 -1
- package/lib/commonjs/sd-jwt/converters.js +0 -30
- package/lib/commonjs/sd-jwt/converters.js.map +0 -1
- package/lib/commonjs/sd-jwt/errors.js +0 -40
- package/lib/commonjs/sd-jwt/errors.js.map +0 -1
- package/lib/commonjs/sd-jwt/verifier.js +0 -24
- package/lib/commonjs/sd-jwt/verifier.js.map +0 -1
- package/lib/commonjs/trust/build-chain.js +0 -255
- package/lib/commonjs/trust/build-chain.js.map +0 -1
- package/lib/commonjs/trust/errors.js +0 -134
- package/lib/commonjs/trust/errors.js.map +0 -1
- package/lib/commonjs/trust/types.js +0 -234
- package/lib/commonjs/trust/types.js.map +0 -1
- package/lib/commonjs/trust/utils.js +0 -70
- package/lib/commonjs/trust/utils.js.map +0 -1
- package/lib/commonjs/trust/verify-chain.js +0 -188
- package/lib/commonjs/trust/verify-chain.js.map +0 -1
- package/lib/commonjs/wallet-instance-attestation/issuing.js +0 -117
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +0 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +0 -69
- package/lib/commonjs/wallet-instance-attestation/types.js.map +0 -1
- package/lib/module/credential/issuance/01-start-flow.js +0 -2
- package/lib/module/credential/issuance/01-start-flow.js.map +0 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -25
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/module/credential/issuance/03-start-user-authorization.js +0 -125
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +0 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +0 -247
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +0 -1
- package/lib/module/credential/issuance/05-authorize-access.js +0 -78
- package/lib/module/credential/issuance/05-authorize-access.js.map +0 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +0 -160
- package/lib/module/credential/issuance/06-obtain-credential.js.map +0 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +0 -382
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
- package/lib/module/credential/issuance/errors.js +0 -28
- package/lib/module/credential/issuance/errors.js.map +0 -1
- package/lib/module/credential/issuance/mrtd-pop/types.js +0 -46
- package/lib/module/credential/issuance/mrtd-pop/types.js.map +0 -1
- package/lib/module/credential/issuance/types.js +0 -30
- package/lib/module/credential/issuance/types.js.map +0 -1
- package/lib/module/credential/offer/01-start-flow.js +0 -66
- package/lib/module/credential/offer/01-start-flow.js.map +0 -1
- package/lib/module/credential/offer/02-fetch-credential-offer.js +0 -38
- package/lib/module/credential/offer/02-fetch-credential-offer.js.map +0 -1
- package/lib/module/credential/offer/errors.js +0 -14
- package/lib/module/credential/offer/errors.js.map +0 -1
- package/lib/module/credential/offer/types.js +0 -41
- package/lib/module/credential/offer/types.js.map +0 -1
- package/lib/module/credential/presentation/01-start-flow.js +0 -36
- package/lib/module/credential/presentation/01-start-flow.js.map +0 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +0 -27
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
- package/lib/module/credential/presentation/03-get-request-object.js +0 -49
- package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +0 -25
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +0 -88
- package/lib/module/credential/presentation/05-verify-request-object.js.map +0 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +0 -32
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +0 -148
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +0 -296
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +0 -239
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +0 -1
- package/lib/module/credential/presentation/errors.js +0 -103
- package/lib/module/credential/presentation/errors.js.map +0 -1
- package/lib/module/credential/presentation/types.js +0 -146
- package/lib/module/credential/presentation/types.js.map +0 -1
- package/lib/module/credential/status/01-start-flow.js +0 -2
- package/lib/module/credential/status/01-start-flow.js.map +0 -1
- package/lib/module/credential/status/02-status-assertion.js +0 -72
- package/lib/module/credential/status/02-status-assertion.js.map +0 -1
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +0 -78
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
- package/lib/module/credential/status/types.js +0 -71
- package/lib/module/credential/status/types.js.map +0 -1
- package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -77
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js +0 -35
- package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
- package/lib/module/credentials-catalogue/types.js +0 -89
- package/lib/module/credentials-catalogue/types.js.map +0 -1
- package/lib/module/pid/index.js +0 -3
- package/lib/module/pid/index.js.map +0 -1
- package/lib/module/pid/sd-jwt/converters.js +0 -19
- package/lib/module/pid/sd-jwt/converters.js.map +0 -1
- package/lib/module/pid/sd-jwt/index.js +0 -66
- package/lib/module/pid/sd-jwt/index.js.map +0 -1
- package/lib/module/pid/sd-jwt/types.js +0 -43
- package/lib/module/pid/sd-jwt/types.js.map +0 -1
- package/lib/module/sd-jwt/__test__/converters.test.js +0 -23
- package/lib/module/sd-jwt/__test__/converters.test.js.map +0 -1
- package/lib/module/sd-jwt/__test__/index.test.js +0 -132
- package/lib/module/sd-jwt/__test__/index.test.js.map +0 -1
- package/lib/module/sd-jwt/converters.js +0 -24
- package/lib/module/sd-jwt/converters.js.map +0 -1
- package/lib/module/sd-jwt/errors.js +0 -32
- package/lib/module/sd-jwt/errors.js.map +0 -1
- package/lib/module/sd-jwt/verifier.js +0 -17
- package/lib/module/sd-jwt/verifier.js.map +0 -1
- package/lib/module/trust/build-chain.js +0 -238
- package/lib/module/trust/build-chain.js.map +0 -1
- package/lib/module/trust/errors.js +0 -116
- package/lib/module/trust/errors.js.map +0 -1
- package/lib/module/trust/types.js +0 -221
- package/lib/module/trust/types.js.map +0 -1
- package/lib/module/trust/utils.js +0 -60
- package/lib/module/trust/utils.js.map +0 -1
- package/lib/module/trust/verify-chain.js +0 -179
- package/lib/module/trust/verify-chain.js.map +0 -1
- package/lib/module/wallet-instance-attestation/issuing.js +0 -110
- package/lib/module/wallet-instance-attestation/issuing.js.map +0 -1
- package/lib/module/wallet-instance-attestation/types.js +0 -58
- package/lib/module/wallet-instance-attestation/types.js.map +0 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +0 -12
- package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +0 -47
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +0 -79
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +0 -34
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +0 -36
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +0 -43
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/errors.d.ts +0 -19
- package/lib/typescript/credential/issuance/errors.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts +0 -201
- package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/types.d.ts +0 -96
- package/lib/typescript/credential/issuance/types.d.ts.map +0 -1
- package/lib/typescript/credential/offer/01-start-flow.d.ts +0 -172
- package/lib/typescript/credential/offer/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts +0 -20
- package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts.map +0 -1
- package/lib/typescript/credential/offer/errors.d.ts +0 -10
- package/lib/typescript/credential/offer/errors.d.ts.map +0 -1
- package/lib/typescript/credential/offer/types.d.ts +0 -264
- package/lib/typescript/credential/offer/types.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +0 -39
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +0 -19
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +0 -19
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +0 -23
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +0 -21
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +0 -21
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +0 -29
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +0 -97
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +0 -98
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/errors.d.ts +0 -73
- package/lib/typescript/credential/presentation/errors.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/types.d.ts +0 -792
- package/lib/typescript/credential/presentation/types.d.ts.map +0 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/status/02-status-assertion.d.ts +0 -24
- package/lib/typescript/credential/status/02-status-assertion.d.ts.map +0 -1
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +0 -22
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +0 -1
- package/lib/typescript/credential/status/types.d.ts +0 -782
- package/lib/typescript/credential/status/types.d.ts.map +0 -1
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
- package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts +0 -15
- package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts.map +0 -1
- package/lib/typescript/credentials-catalogue/types.d.ts +0 -844
- package/lib/typescript/credentials-catalogue/types.d.ts.map +0 -1
- package/lib/typescript/pid/index.d.ts +0 -3
- package/lib/typescript/pid/index.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/converters.d.ts +0 -4
- package/lib/typescript/pid/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/index.d.ts +0 -50
- package/lib/typescript/pid/sd-jwt/index.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +0 -196
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/converters.test.d.ts +0 -2
- package/lib/typescript/sd-jwt/__test__/converters.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/index.test.d.ts +0 -2
- package/lib/typescript/sd-jwt/__test__/index.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/converters.d.ts +0 -3
- package/lib/typescript/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/errors.d.ts +0 -20
- package/lib/typescript/sd-jwt/errors.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/verifier.d.ts +0 -3
- package/lib/typescript/sd-jwt/verifier.d.ts.map +0 -1
- package/lib/typescript/trust/build-chain.d.ts +0 -1299
- package/lib/typescript/trust/build-chain.d.ts.map +0 -1
- package/lib/typescript/trust/errors.d.ts +0 -103
- package/lib/typescript/trust/errors.d.ts.map +0 -1
- package/lib/typescript/trust/types.d.ts +0 -15945
- package/lib/typescript/trust/types.d.ts.map +0 -1
- package/lib/typescript/trust/utils.d.ts +0 -22
- package/lib/typescript/trust/utils.d.ts.map +0 -1
- package/lib/typescript/trust/verify-chain.d.ts +0 -39
- package/lib/typescript/trust/verify-chain.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +0 -34
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +0 -715
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +0 -1
- package/src/credential/issuance/01-start-flow.ts +0 -11
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -33
- package/src/credential/issuance/03-start-user-authorization.ts +0 -196
- package/src/credential/issuance/04-complete-user-authorization.ts +0 -372
- package/src/credential/issuance/05-authorize-access.ts +0 -129
- package/src/credential/issuance/06-obtain-credential.ts +0 -254
- package/src/credential/issuance/07-verify-and-parse-credential.ts +0 -572
- package/src/credential/issuance/errors.ts +0 -29
- package/src/credential/issuance/mrtd-pop/types.ts +0 -65
- package/src/credential/issuance/types.ts +0 -43
- package/src/credential/offer/01-start-flow.ts +0 -89
- package/src/credential/offer/02-fetch-credential-offer.ts +0 -54
- package/src/credential/offer/errors.ts +0 -17
- package/src/credential/offer/types.ts +0 -59
- package/src/credential/presentation/01-start-flow.ts +0 -42
- package/src/credential/presentation/02-evaluate-rp-trust.ts +0 -34
- package/src/credential/presentation/03-get-request-object.ts +0 -61
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +0 -34
- package/src/credential/presentation/05-verify-request-object.ts +0 -121
- package/src/credential/presentation/06-fetch-presentation-definition.ts +0 -48
- package/src/credential/presentation/07-evaluate-dcql-query.ts +0 -198
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +0 -408
- package/src/credential/presentation/08-send-authorization-response.ts +0 -329
- package/src/credential/presentation/errors.ts +0 -112
- package/src/credential/presentation/types.ts +0 -169
- package/src/credential/status/01-start-flow.ts +0 -9
- package/src/credential/status/02-status-assertion.ts +0 -115
- package/src/credential/status/03-verify-and-parse-status-assertion.ts +0 -110
- package/src/credential/status/types.ts +0 -90
- package/src/credential/trustmark/get-credential-trustmark.ts +0 -139
- package/src/credentials-catalogue/fetch-and-parse-catalogue.ts +0 -54
- package/src/credentials-catalogue/types.ts +0 -97
- package/src/pid/index.ts +0 -2
- package/src/pid/sd-jwt/converters.ts +0 -20
- package/src/pid/sd-jwt/index.ts +0 -74
- package/src/pid/sd-jwt/types.ts +0 -46
- package/src/sd-jwt/__test__/converters.test.ts +0 -27
- package/src/sd-jwt/__test__/index.test.ts +0 -152
- package/src/sd-jwt/converters.ts +0 -24
- package/src/sd-jwt/errors.ts +0 -39
- package/src/sd-jwt/verifier.ts +0 -18
- package/src/trust/build-chain.ts +0 -398
- package/src/trust/errors.ts +0 -138
- package/src/trust/types.ts +0 -259
- package/src/trust/utils.ts +0 -70
- package/src/trust/verify-chain.ts +0 -267
- package/src/wallet-instance-attestation/issuing.ts +0 -164
- package/src/wallet-instance-attestation/types.ts +0 -85
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.obtainCredential = exports.createNonceProof = void 0;
|
|
7
|
-
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
|
8
|
-
var _misc = require("../../utils/misc");
|
|
9
|
-
var _errors = require("../../utils/errors");
|
|
10
|
-
var _types = require("./types");
|
|
11
|
-
var _dpop = require("../../utils/dpop");
|
|
12
|
-
var _uuid = require("uuid");
|
|
13
|
-
var _logging = require("../../utils/logging");
|
|
14
|
-
const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
|
15
|
-
const jwk = await ctx.getPublicKey();
|
|
16
|
-
return new _ioReactNativeJwt.SignJWT(ctx).setPayload({
|
|
17
|
-
nonce
|
|
18
|
-
}).setProtectedHeader({
|
|
19
|
-
typ: "openid4vci-proof+jwt",
|
|
20
|
-
jwk
|
|
21
|
-
}).setAudience(audience).setIssuer(issuer).setIssuedAt().setExpirationTime("5min").sign();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Obtains the credential from the issuer.
|
|
26
|
-
* The key pair of the credentialCryptoContext is used for Openid4vci proof JWT to be presented with the Access Token and the DPoP Proof JWT at the Credential Endpoint
|
|
27
|
-
* of the Credential Issuer to request the issuance of a credential linked to the public key contained in the JWT proof.
|
|
28
|
-
* The Openid4vci proof JWT incapsulates the nonce extracted from the token response from the {@link authorizeAccess} step.
|
|
29
|
-
* The credential request is sent to the Credential Endpoint of the Credential Issuer via HTTP POST with the type of the credential, its format, the access token and the JWT proof.
|
|
30
|
-
* @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
|
|
31
|
-
* @param accessToken The access token response returned by {@link authorizeAccess}
|
|
32
|
-
* @param clientId The client id returned by {@link startUserAuthorization}
|
|
33
|
-
* @param credentialDefinition The credential definition of the credential to be obtained returned by {@link authorizeAccess}
|
|
34
|
-
* @param context.credentialCryptoContext The crypto context used to obtain the credential
|
|
35
|
-
* @param context.dPopCryptoContext The DPoP crypto context
|
|
36
|
-
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
|
37
|
-
* @param operationType Specify the type of credential issuance (used for reissuing)
|
|
38
|
-
* @returns The credential response containing the credential
|
|
39
|
-
*/
|
|
40
|
-
exports.createNonceProof = createNonceProof;
|
|
41
|
-
const obtainCredential = async (issuerConf, accessToken, clientId, credentialDefinition, context, operationType) => {
|
|
42
|
-
const {
|
|
43
|
-
credentialCryptoContext,
|
|
44
|
-
appFetch = fetch,
|
|
45
|
-
dPopCryptoContext
|
|
46
|
-
} = context;
|
|
47
|
-
const {
|
|
48
|
-
credential_configuration_id,
|
|
49
|
-
credential_identifier
|
|
50
|
-
} = credentialDefinition;
|
|
51
|
-
const credentialUrl = issuerConf.openid_credential_issuer.credential_endpoint;
|
|
52
|
-
const issuerUrl = issuerConf.oauth_authorization_server.issuer;
|
|
53
|
-
const nonceUrl = issuerConf.openid_credential_issuer.nonce_endpoint;
|
|
54
|
-
|
|
55
|
-
// Fetch the nonce from the Credential Issuer
|
|
56
|
-
const {
|
|
57
|
-
c_nonce
|
|
58
|
-
} = await appFetch(nonceUrl, {
|
|
59
|
-
method: "POST",
|
|
60
|
-
headers: {
|
|
61
|
-
"Content-Type": "application/json"
|
|
62
|
-
}
|
|
63
|
-
}).then((0, _misc.hasStatusOrThrow)(200)).then(res => res.json()).then(body => _types.NonceResponse.parse(body));
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* JWT proof token to bind the request nonce to the key that will bind the holder User with the Credential
|
|
67
|
-
* This is presented along with the access token to the Credential Endpoint as proof of possession of the private key used to sign the Access Token.
|
|
68
|
-
* @see https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-proof-types
|
|
69
|
-
*/
|
|
70
|
-
const signedNonceProof = await createNonceProof(c_nonce, clientId, issuerUrl, credentialCryptoContext);
|
|
71
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Signed nonce proof: ${signedNonceProof}`);
|
|
72
|
-
|
|
73
|
-
// Validation of accessTokenResponse.authorization_details if contain credentialDefinition
|
|
74
|
-
const containsCredentialDefinition = accessToken.authorization_details.some(c => c.credential_configuration_id === credential_configuration_id && (credential_identifier ? c.credential_identifiers.includes(credential_identifier) : true));
|
|
75
|
-
if (!containsCredentialDefinition) {
|
|
76
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, `Credential definition not found in the access token response ${accessToken.authorization_details}`);
|
|
77
|
-
throw new _errors.ValidationFailed({
|
|
78
|
-
message: "The access token response does not contain the requested credential"
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The credential request body.
|
|
84
|
-
* We accept both `credential_identifier` (recommended) and `credential_configuration_id`
|
|
85
|
-
* when the Authorization Server does not support `credential_identifier`.
|
|
86
|
-
* @see https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-15.html#section-3.3.4
|
|
87
|
-
*/
|
|
88
|
-
const credentialRequestFormBody = credential_identifier ? {
|
|
89
|
-
credential_identifier: credential_identifier,
|
|
90
|
-
proof: {
|
|
91
|
-
jwt: signedNonceProof,
|
|
92
|
-
proof_type: "jwt"
|
|
93
|
-
}
|
|
94
|
-
} : {
|
|
95
|
-
credential_configuration_id: credential_configuration_id,
|
|
96
|
-
proof: {
|
|
97
|
-
jwt: signedNonceProof,
|
|
98
|
-
proof_type: "jwt"
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Credential request body: ${JSON.stringify(credentialRequestFormBody)}`);
|
|
102
|
-
const tokenRequestSignedDPop = await (0, _dpop.createDPopToken)({
|
|
103
|
-
htm: "POST",
|
|
104
|
-
htu: credentialUrl,
|
|
105
|
-
jti: `${(0, _uuid.v4)()}`,
|
|
106
|
-
ath: await (0, _ioReactNativeJwt.sha256ToBase64)(accessToken.access_token)
|
|
107
|
-
}, dPopCryptoContext);
|
|
108
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Token request DPoP: ${tokenRequestSignedDPop}`);
|
|
109
|
-
const credentialRes = await appFetch(credentialUrl, {
|
|
110
|
-
method: "POST",
|
|
111
|
-
headers: {
|
|
112
|
-
"Content-Type": "application/json",
|
|
113
|
-
DPoP: tokenRequestSignedDPop,
|
|
114
|
-
Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
|
|
115
|
-
...(operationType === "reissuing" && {
|
|
116
|
-
operationType
|
|
117
|
-
})
|
|
118
|
-
},
|
|
119
|
-
body: JSON.stringify(credentialRequestFormBody)
|
|
120
|
-
}).then((0, _misc.hasStatusOrThrow)(200)).then(res => res.json()).then(body => _types.CredentialResponse.safeParse(body)).catch(handleObtainCredentialError);
|
|
121
|
-
if (!credentialRes.success) {
|
|
122
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, `Credential Response validation failed: ${credentialRes.error.message}`);
|
|
123
|
-
throw new _errors.ValidationFailed({
|
|
124
|
-
message: "Credential Response validation failed",
|
|
125
|
-
reason: credentialRes.error.message
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Credential Response: ${JSON.stringify(credentialRes.data)}`);
|
|
129
|
-
|
|
130
|
-
// Extract the format corresponding to the credential_configuration_id used
|
|
131
|
-
const issuerCredentialConfig = issuerConf.openid_credential_issuer.credential_configurations_supported[credential_configuration_id];
|
|
132
|
-
|
|
133
|
-
// TODO: [SIW-2264] Handle multiple credentials
|
|
134
|
-
return {
|
|
135
|
-
credential: credentialRes.data.credentials.at(0).credential,
|
|
136
|
-
format: issuerCredentialConfig.format
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Handle the credential error by mapping it to a custom exception.
|
|
142
|
-
* If the error is not an instance of {@link UnexpectedStatusCodeError}, it is thrown as is.
|
|
143
|
-
* @param e - The error to be handled
|
|
144
|
-
* @throws {IssuerResponseError} with a specific code for more context
|
|
145
|
-
*/
|
|
146
|
-
exports.obtainCredential = obtainCredential;
|
|
147
|
-
const handleObtainCredentialError = e => {
|
|
148
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, `Error occurred while obtaining credential: ${e}`);
|
|
149
|
-
if (!(e instanceof _errors.UnexpectedStatusCodeError)) {
|
|
150
|
-
throw e;
|
|
151
|
-
}
|
|
152
|
-
throw new _errors.ResponseErrorBuilder(_errors.IssuerResponseError).handle(201, {
|
|
153
|
-
// Although it is technically not an error, we handle it as such to avoid
|
|
154
|
-
// changing the return type of `obtainCredential` and introduce a breaking change.
|
|
155
|
-
code: _errors.IssuerResponseErrorCodes.CredentialIssuingNotSynchronous,
|
|
156
|
-
message: "This credential cannot be issued synchronously. It will be available at a later time."
|
|
157
|
-
}).handle(403, {
|
|
158
|
-
code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
|
|
159
|
-
message: "Invalid status found for the given credential"
|
|
160
|
-
}).handle(404, {
|
|
161
|
-
code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
|
|
162
|
-
message: "Invalid status found for the given credential"
|
|
163
|
-
}).handle("*", {
|
|
164
|
-
code: _errors.IssuerResponseErrorCodes.CredentialRequestFailed,
|
|
165
|
-
message: "Unable to obtain the requested credential"
|
|
166
|
-
}).buildFrom(e);
|
|
167
|
-
};
|
|
168
|
-
//# sourceMappingURL=06-obtain-credential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_uuid","_logging","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","operationType","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credential_configuration_id","credential_identifier","credentialUrl","openid_credential_issuer","credential_endpoint","issuerUrl","oauth_authorization_server","nonceUrl","nonce_endpoint","c_nonce","method","headers","then","hasStatusOrThrow","res","json","body","NonceResponse","parse","signedNonceProof","Logger","log","LogLevel","DEBUG","containsCredentialDefinition","authorization_details","some","c","credential_identifiers","includes","ERROR","ValidationFailed","message","credentialRequestFormBody","proof","jwt","proof_type","JSON","stringify","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuidv4","ath","sha256ToBase64","access_token","credentialRes","DPoP","Authorization","token_type","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","error","reason","data","issuerCredentialConfig","credential_configurations_supported","credential","credentials","at","format","e","UnexpectedStatusCodeError","ResponseErrorBuilder","IssuerResponseError","handle","code","IssuerResponseErrorCodes","CredentialIssuingNotSynchronous","CredentialInvalidStatus","CredentialRequestFailed","buildFrom"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAsBO,MAAMO,gBAAgB,GAAG,MAAAA,CAC9BC,KAAa,EACbC,MAAc,EACdC,QAAgB,EAChBC,GAAkB,KACE;EACpB,MAAMC,GAAG,GAAG,MAAMD,GAAG,CAACE,YAAY,CAAC,CAAC;EACpC,OAAO,IAAIC,yBAAO,CAACH,GAAG,CAAC,CACpBI,UAAU,CAAC;IACVP;EACF,CAAC,CAAC,CACDQ,kBAAkB,CAAC;IAClBC,GAAG,EAAE,sBAAsB;IAC3BL;EACF,CAAC,CAAC,CACDM,WAAW,CAACR,QAAQ,CAAC,CACrBS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AAU,EAAEd,aAAa,CAACW,IAAI,CAACI,WAAW,CAACC,EAAE,CAAC,CAAC,CAAC,CAAEF,UAAU;IAC5DG,MAAM,EAAEL,sBAAsB,CAAEK;EAClC,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AALA7E,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAMA,MAAMkE,2BAA2B,GAAIW,CAAU,IAAK;EAClD9C,eAAM,CAACC,GAAG,CAACC,iBAAQ,CAACQ,KAAK,EAAG,8CAA6CoC,CAAE,EAAC,CAAC;EAE7E,IAAI,EAAEA,CAAC,YAAYC,iCAAyB,CAAC,EAAE;IAC7C,MAAMD,CAAC;EACT;EAEA,MAAM,IAAIE,4BAAoB,CAACC,2BAAmB,CAAC,CAChDC,MAAM,CAAC,GAAG,EAAE;IACX;IACA;IACAC,IAAI,EAAEC,gCAAwB,CAACC,+BAA+B;IAC9DzC,OAAO,EACL;EACJ,CAAC,CAAC,CACDsC,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,gCAAwB,CAACE,uBAAuB;IACtD1C,OAAO,EAAE;EACX,CAAC,CAAC,CACDsC,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,gCAAwB,CAACE,uBAAuB;IACtD1C,OAAO,EAAE;EACX,CAAC,CAAC,CACDsC,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,gCAAwB,CAACG,uBAAuB;IACtD3C,OAAO,EAAE;EACX,CAAC,CAAC,CACD4C,SAAS,CAACV,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -1,388 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.verifyAndParseCredential = void 0;
|
|
7
|
-
var _errors = require("../../utils/errors");
|
|
8
|
-
var _sdJwt = require("../../sd-jwt");
|
|
9
|
-
var _jwk = require("../../utils/jwk");
|
|
10
|
-
var _mdoc = require("../../mdoc");
|
|
11
|
-
var _const = require("../../mdoc/const");
|
|
12
|
-
var _logging = require("../../utils/logging");
|
|
13
|
-
var _converter = require("../../mdoc/converter");
|
|
14
|
-
var _core = require("@sd-jwt/core");
|
|
15
|
-
var _cryptoNodejs = require("@sd-jwt/crypto-nodejs");
|
|
16
|
-
var _parser = require("../../utils/parser");
|
|
17
|
-
// The credential as a collection of attributes in plain value
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Parse a Sd-Jwt credential according to the issuer configuration
|
|
21
|
-
* @param credentialConfig - the list of supported credentials, as defined in the issuer configuration with their claims metadata
|
|
22
|
-
* @param parsedCredentialRaw - the raw parsed credential
|
|
23
|
-
* @param ignoreMissingAttributes - skip error when attributes declared in the issuer configuration are not found within disclosures
|
|
24
|
-
* @param includeUndefinedAttributes - include attributes not explicitly declared in the issuer configuration
|
|
25
|
-
* @returns The parsed credential with attributes in plain value
|
|
26
|
-
*/
|
|
27
|
-
const parseCredentialSdJwt = function (credentialConfig, parsedCredentialRaw) {
|
|
28
|
-
let ignoreMissingAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
29
|
-
let includeUndefinedAttributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
30
|
-
const claimsMetadata = credentialConfig.claims || [];
|
|
31
|
-
|
|
32
|
-
// Check that all mandatory attributes defined in the issuer configuration are present in the credential
|
|
33
|
-
if (!ignoreMissingAttributes) {
|
|
34
|
-
const missingPaths = [];
|
|
35
|
-
const rootKeysToVerify = new Set(claimsMetadata.map(c => c.path[0]).filter(p => typeof p === "string"));
|
|
36
|
-
for (const rootKey of rootKeysToVerify) {
|
|
37
|
-
if (!(rootKey in parsedCredentialRaw)) {
|
|
38
|
-
missingPaths.push(rootKey);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (missingPaths.length > 0) {
|
|
42
|
-
const missing = missingPaths.join(", ");
|
|
43
|
-
const received = Object.keys(parsedCredentialRaw).join(", ");
|
|
44
|
-
throw new _errors.IoWalletError(`Some attributes are missing in the credential. Missing: [${missing}], received: [${received}]`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Helper to find display metadata for any given path
|
|
50
|
-
*/
|
|
51
|
-
const getDisplayNames = path => {
|
|
52
|
-
const match = claimsMetadata.find(c => (0, _parser.isPathEqual)(c.path, path));
|
|
53
|
-
if (!match) return undefined;
|
|
54
|
-
const nameMap = {};
|
|
55
|
-
for (const entry of match.display) {
|
|
56
|
-
nameMap[entry.locale] = entry.name;
|
|
57
|
-
}
|
|
58
|
-
return nameMap;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Recursive function to build the localized structure
|
|
63
|
-
*/
|
|
64
|
-
const processLevel = (currentData, currentPath) => {
|
|
65
|
-
// Handle Arrays
|
|
66
|
-
if (Array.isArray(currentData)) {
|
|
67
|
-
return currentData.map(item => processLevel(item, [...currentPath, null]));
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Handle Objects
|
|
71
|
-
if (typeof currentData !== "object" || currentData === null) {
|
|
72
|
-
return currentData;
|
|
73
|
-
}
|
|
74
|
-
const dataObj = currentData;
|
|
75
|
-
const result = {};
|
|
76
|
-
const processedKeys = new Set();
|
|
77
|
-
|
|
78
|
-
// Identify unique keys in config at this level
|
|
79
|
-
const configKeysAtThisLevel = [];
|
|
80
|
-
for (const claim of claimsMetadata) {
|
|
81
|
-
// Check if the claim path starts with the current path
|
|
82
|
-
if ((0, _parser.isPrefixOf)(currentPath, claim.path)) {
|
|
83
|
-
const nextPart = claim.path[currentPath.length];
|
|
84
|
-
if ((typeof nextPart === "string" || typeof nextPart === "number") && !configKeysAtThisLevel.includes(nextPart)) {
|
|
85
|
-
configKeysAtThisLevel.push(nextPart);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Process keys
|
|
91
|
-
for (const key of configKeysAtThisLevel) {
|
|
92
|
-
const stringKey = key.toString();
|
|
93
|
-
const dataValue = dataObj[stringKey];
|
|
94
|
-
if (dataValue === undefined) continue;
|
|
95
|
-
const newPath = [...currentPath, key];
|
|
96
|
-
let localizedNames = getDisplayNames(newPath);
|
|
97
|
-
|
|
98
|
-
// Fallback for arrays
|
|
99
|
-
if (!localizedNames && Array.isArray(dataValue)) {
|
|
100
|
-
localizedNames = getDisplayNames([...newPath, null]);
|
|
101
|
-
}
|
|
102
|
-
result[stringKey] = {
|
|
103
|
-
name: localizedNames || stringKey,
|
|
104
|
-
value: processLevel(dataValue, newPath)
|
|
105
|
-
};
|
|
106
|
-
processedKeys.add(key);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Handle Undefined Attributes
|
|
110
|
-
if (includeUndefinedAttributes) {
|
|
111
|
-
for (const [key, value] of Object.entries(dataObj)) {
|
|
112
|
-
if (!processedKeys.has(key)) {
|
|
113
|
-
result[key] = {
|
|
114
|
-
name: key,
|
|
115
|
-
value: value
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return result;
|
|
121
|
-
};
|
|
122
|
-
return processLevel(parsedCredentialRaw, []);
|
|
123
|
-
};
|
|
124
|
-
const parseCredentialMDoc = function (credentialConfig, _ref) {
|
|
125
|
-
let {
|
|
126
|
-
issuerSigned
|
|
127
|
-
} = _ref;
|
|
128
|
-
let ignoreMissingAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
129
|
-
let includeUndefinedAttributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
130
|
-
if (!credentialConfig) {
|
|
131
|
-
throw new _errors.IoWalletError("Credential type not supported by the issuer");
|
|
132
|
-
}
|
|
133
|
-
if (!credentialConfig.claims) {
|
|
134
|
-
throw new _errors.IoWalletError("Missing claims in the credential subject");
|
|
135
|
-
}
|
|
136
|
-
const attrDefinitions = credentialConfig.claims.map(_ref2 => {
|
|
137
|
-
let {
|
|
138
|
-
path: [namespace, attribute],
|
|
139
|
-
display
|
|
140
|
-
} = _ref2;
|
|
141
|
-
return [namespace, attribute, display];
|
|
142
|
-
});
|
|
143
|
-
if (!issuerSigned.nameSpaces) {
|
|
144
|
-
throw new _errors.IoWalletError("Missing claims in the credential");
|
|
145
|
-
}
|
|
146
|
-
const flatNamespaces = Object.entries(issuerSigned.nameSpaces).flatMap(_ref3 => {
|
|
147
|
-
let [namespace, values] = _ref3;
|
|
148
|
-
return values.map(v => [namespace, v.elementIdentifier, v.elementValue]);
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
// Check that all mandatory attributes defined in the issuer configuration are present in the disclosure set
|
|
152
|
-
// and filter the non present ones
|
|
153
|
-
const attrsNotInDisclosures = attrDefinitions.filter(_ref4 => {
|
|
154
|
-
let [attrDefNamespace, attrKey] = _ref4;
|
|
155
|
-
return !flatNamespaces.some(_ref5 => {
|
|
156
|
-
let [namespace, claim] = _ref5;
|
|
157
|
-
return attrDefNamespace === namespace && attrKey === claim;
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
if (attrsNotInDisclosures.length > 0) {
|
|
161
|
-
const missing = attrsNotInDisclosures.map(_ref6 => {
|
|
162
|
-
let [, attrKey] = _ref6;
|
|
163
|
-
return attrKey;
|
|
164
|
-
}).join(", ");
|
|
165
|
-
const received = flatNamespaces.map(_ref7 => {
|
|
166
|
-
let [, attrKey] = _ref7;
|
|
167
|
-
return attrKey;
|
|
168
|
-
}).join(", ");
|
|
169
|
-
if (!ignoreMissingAttributes) {
|
|
170
|
-
throw new _errors.IoWalletError(`Some attributes are missing in the credential. Missing: [${missing}], received: [${received}]`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Attributes defined in the issuer configuration and present in the disclosure set
|
|
175
|
-
const definedValues = attrDefinitions
|
|
176
|
-
// Retrieve the value from the corresponding disclosure
|
|
177
|
-
.map(_ref8 => {
|
|
178
|
-
var _flatNamespaces$find;
|
|
179
|
-
let [attrDefNamespace, attrKey, display] = _ref8;
|
|
180
|
-
return [attrDefNamespace, attrKey, {
|
|
181
|
-
display,
|
|
182
|
-
value: (_flatNamespaces$find = flatNamespaces.find(_ref9 => {
|
|
183
|
-
let [namespace, name] = _ref9;
|
|
184
|
-
return attrDefNamespace === namespace && name === attrKey;
|
|
185
|
-
})) === null || _flatNamespaces$find === void 0 ? void 0 : _flatNamespaces$find[2]
|
|
186
|
-
}];
|
|
187
|
-
})
|
|
188
|
-
//filter the not found elements
|
|
189
|
-
.filter(_ref10 => {
|
|
190
|
-
let [_, __, definition] = _ref10;
|
|
191
|
-
return definition.value !== undefined;
|
|
192
|
-
})
|
|
193
|
-
// Add a human-readable attribute name, with i18n, in the form { locale: name }
|
|
194
|
-
// Example: { "it-IT": "Nome", "en-EN": "Name", "es-ES": "Nombre" }
|
|
195
|
-
.reduce((acc, _ref11) => {
|
|
196
|
-
let [attrDefNamespace, attrKey, {
|
|
197
|
-
display,
|
|
198
|
-
value
|
|
199
|
-
}] = _ref11;
|
|
200
|
-
return {
|
|
201
|
-
...acc,
|
|
202
|
-
[(0, _mdoc.getParsedCredentialClaimKey)(attrDefNamespace, attrKey)]: {
|
|
203
|
-
value,
|
|
204
|
-
name: display.reduce((names, _ref12) => {
|
|
205
|
-
let {
|
|
206
|
-
locale,
|
|
207
|
-
name
|
|
208
|
-
} = _ref12;
|
|
209
|
-
return {
|
|
210
|
-
...names,
|
|
211
|
-
[locale]: name
|
|
212
|
-
};
|
|
213
|
-
}, {})
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}, {});
|
|
217
|
-
if (includeUndefinedAttributes) {
|
|
218
|
-
const undefinedValues = Object.fromEntries(Object.values(flatNamespaces).filter(_ref13 => {
|
|
219
|
-
let [namespace, key] = _ref13;
|
|
220
|
-
return !definedValues[(0, _mdoc.getParsedCredentialClaimKey)(namespace, key)];
|
|
221
|
-
}).map(_ref14 => {
|
|
222
|
-
let [namespace, key, value] = _ref14;
|
|
223
|
-
return [(0, _mdoc.getParsedCredentialClaimKey)(namespace, key), {
|
|
224
|
-
value,
|
|
225
|
-
name: key
|
|
226
|
-
}];
|
|
227
|
-
}));
|
|
228
|
-
return {
|
|
229
|
-
...definedValues,
|
|
230
|
-
...undefinedValues
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
return definedValues;
|
|
234
|
-
};
|
|
235
|
-
/**
|
|
236
|
-
* Given a credential, verify it's in the supported format
|
|
237
|
-
* and the credential is correctly signed
|
|
238
|
-
* and it's bound to the given key
|
|
239
|
-
*
|
|
240
|
-
* @param rawCredential The received credential
|
|
241
|
-
* @param issuerKeys The set of public keys of the issuer,
|
|
242
|
-
* which will be used to verify the signature
|
|
243
|
-
* @param holderBindingContext The access to the holder's key
|
|
244
|
-
*
|
|
245
|
-
* @throws If the signature verification fails
|
|
246
|
-
* @throws If the credential is not in the SdJwt4VC format
|
|
247
|
-
* @throws If the holder binding is not properly configured
|
|
248
|
-
*
|
|
249
|
-
*/
|
|
250
|
-
async function verifyCredentialSdJwt(rawCredential, issuerKeys, holderBindingContext) {
|
|
251
|
-
// TODO: change verification using sd-jwt library with 1.3.x update
|
|
252
|
-
const [decodedCredential, holderBindingKey] =
|
|
253
|
-
// parallel for optimization
|
|
254
|
-
await Promise.all([(0, _sdJwt.verify)(rawCredential, issuerKeys, _sdJwt.SdJwt4VC), holderBindingContext.getPublicKey()]);
|
|
255
|
-
const {
|
|
256
|
-
cnf
|
|
257
|
-
} = decodedCredential.sdJwt.payload;
|
|
258
|
-
if (!(await (0, _jwk.isSameThumbprint)(cnf.jwk, holderBindingKey))) {
|
|
259
|
-
const message = `Failed to verify holder binding, expected kid: ${holderBindingKey.kid}, got: ${decodedCredential.sdJwt.payload.cnf.jwk.kid}`;
|
|
260
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, message);
|
|
261
|
-
throw new _errors.IoWalletError(message);
|
|
262
|
-
}
|
|
263
|
-
const sdJwtInstance = new _core.SDJwtInstance({
|
|
264
|
-
hasher: _cryptoNodejs.digest
|
|
265
|
-
});
|
|
266
|
-
return await sdJwtInstance.decode(rawCredential);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Given a credential, verify it's in the supported format
|
|
271
|
-
* and the credential is correctly signed
|
|
272
|
-
* and it's bound to the given key
|
|
273
|
-
*
|
|
274
|
-
* @param rawCredential The received credential
|
|
275
|
-
* @param x509CertRoot The root certificate of the issuer,
|
|
276
|
-
* which will be used to verify the signature
|
|
277
|
-
* @param holderBindingContext The access to the holder's key
|
|
278
|
-
*
|
|
279
|
-
* @throws If the signature verification fails
|
|
280
|
-
* @throws If the credential is not in the SdJwt4VC format
|
|
281
|
-
* @throws If the holder binding is not properly configured
|
|
282
|
-
*
|
|
283
|
-
*/
|
|
284
|
-
async function verifyCredentialMDoc(rawCredential, x509CertRoot, holderBindingContext) {
|
|
285
|
-
const [decodedCredential, holderBindingKey] =
|
|
286
|
-
// parallel for optimization
|
|
287
|
-
await Promise.all([(0, _mdoc.verify)(rawCredential, x509CertRoot), holderBindingContext.getPublicKey()]);
|
|
288
|
-
if (!decodedCredential) {
|
|
289
|
-
throw new _errors.IoWalletError("No MDOC credentials found!");
|
|
290
|
-
}
|
|
291
|
-
const key = decodedCredential.issuerSigned.issuerAuth.payload.deviceKeyInfo.deviceKey;
|
|
292
|
-
if (!(await (0, _jwk.isSameThumbprint)(key, holderBindingKey))) {
|
|
293
|
-
throw new _errors.IoWalletError(`Failed to verify holder binding, holder binding key and mDoc deviceKey don't match`);
|
|
294
|
-
}
|
|
295
|
-
return decodedCredential;
|
|
296
|
-
}
|
|
297
|
-
const verifyAndParseCredentialSdJwt = async (issuerConf, credential, credentialConfigurationId, _ref15) => {
|
|
298
|
-
let {
|
|
299
|
-
credentialCryptoContext,
|
|
300
|
-
ignoreMissingAttributes,
|
|
301
|
-
includeUndefinedAttributes
|
|
302
|
-
} = _ref15;
|
|
303
|
-
const decoded = await verifyCredentialSdJwt(credential, issuerConf.openid_credential_issuer.jwks.keys, credentialCryptoContext);
|
|
304
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Decoded credential: ${JSON.stringify(decoded)}`);
|
|
305
|
-
const credentialConfig = issuerConf.openid_credential_issuer.credential_configurations_supported[credentialConfigurationId];
|
|
306
|
-
if (!credentialConfig) {
|
|
307
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, `Credential type not supported by the issuer: ${credentialConfigurationId}`);
|
|
308
|
-
throw new _errors.IoWalletError("Credential type not supported by the issuer");
|
|
309
|
-
}
|
|
310
|
-
const parsedCredentialRaw = await decoded.getClaims(_cryptoNodejs.digest);
|
|
311
|
-
const parsedCredential = parseCredentialSdJwt(credentialConfig, parsedCredentialRaw, ignoreMissingAttributes, includeUndefinedAttributes);
|
|
312
|
-
const issuedAt = typeof parsedCredentialRaw.iat === "number" ? new Date(parsedCredentialRaw.iat * 1000) : undefined;
|
|
313
|
-
if (typeof parsedCredentialRaw.exp !== "number") {
|
|
314
|
-
throw new _errors.IoWalletError("Invalid or missing expiration claim (exp)");
|
|
315
|
-
}
|
|
316
|
-
const expiration = new Date(parsedCredentialRaw.exp * 1000);
|
|
317
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, `Parsed credential: ${JSON.stringify(parsedCredential)}\nIssued at: ${issuedAt}`);
|
|
318
|
-
return {
|
|
319
|
-
parsedCredential,
|
|
320
|
-
expiration,
|
|
321
|
-
issuedAt
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
const verifyAndParseCredentialMDoc = async (issuerConf, credential, credentialConfigurationId, _ref16, x509CertRoot) => {
|
|
325
|
-
var _parsedCredential$get, _parsedCredential$get2;
|
|
326
|
-
let {
|
|
327
|
-
credentialCryptoContext,
|
|
328
|
-
ignoreMissingAttributes
|
|
329
|
-
} = _ref16;
|
|
330
|
-
if (!x509CertRoot) {
|
|
331
|
-
throw new _errors.IoWalletError("Missing x509CertRoot");
|
|
332
|
-
}
|
|
333
|
-
const decoded = await verifyCredentialMDoc(credential, x509CertRoot, credentialCryptoContext);
|
|
334
|
-
const credentialConfig = issuerConf.openid_credential_issuer.credential_configurations_supported[credentialConfigurationId];
|
|
335
|
-
const parsedCredential = parseCredentialMDoc(credentialConfig, decoded, ignoreMissingAttributes, ignoreMissingAttributes);
|
|
336
|
-
const expirationDate = (0, _converter.extractElementValueAsDate)(parsedCredential === null || parsedCredential === void 0 || (_parsedCredential$get = parsedCredential[(0, _mdoc.getParsedCredentialClaimKey)(_const.MDOC_DEFAULT_NAMESPACE, "expiry_date")]) === null || _parsedCredential$get === void 0 ? void 0 : _parsedCredential$get.value);
|
|
337
|
-
if (!expirationDate) {
|
|
338
|
-
throw new _errors.IoWalletError(`expirationDate must be present!!`);
|
|
339
|
-
}
|
|
340
|
-
expirationDate.setDate(expirationDate.getDate() + 1);
|
|
341
|
-
const maybeIssuedAt = (0, _converter.extractElementValueAsDate)(parsedCredential === null || parsedCredential === void 0 || (_parsedCredential$get2 = parsedCredential[(0, _mdoc.getParsedCredentialClaimKey)(_const.MDOC_DEFAULT_NAMESPACE, "issue_date")]) === null || _parsedCredential$get2 === void 0 ? void 0 : _parsedCredential$get2.value);
|
|
342
|
-
maybeIssuedAt === null || maybeIssuedAt === void 0 ? void 0 : maybeIssuedAt.setDate(maybeIssuedAt.getDate() + 1);
|
|
343
|
-
return {
|
|
344
|
-
parsedCredential,
|
|
345
|
-
credential,
|
|
346
|
-
credentialConfigurationId,
|
|
347
|
-
expiration: expirationDate,
|
|
348
|
-
issuedAt: maybeIssuedAt ?? undefined
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Verify and parse an encoded credential.
|
|
354
|
-
* @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
|
|
355
|
-
* @param credential The encoded credential returned by {@link obtainCredential}
|
|
356
|
-
* @param credentialConfigurationId The credential configuration ID that defines the provided credential
|
|
357
|
-
* @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
|
|
358
|
-
* @param context.ignoreMissingAttributes Skip error when attributes declared in the issuer configuration are not found within disclosures
|
|
359
|
-
* @param context.includeUndefinedAttributes Include attributes not explicitly declared in the issuer configuration
|
|
360
|
-
* @returns A parsed credential with attributes in plain value, the expiration and issuance date of the credential
|
|
361
|
-
* @throws {IoWalletError} If the credential signature is not verified with the Issuer key set
|
|
362
|
-
* @throws {IoWalletError} If the credential is not bound to the provided user key
|
|
363
|
-
* @throws {IoWalletError} If the credential data fail to parse
|
|
364
|
-
*/
|
|
365
|
-
const verifyAndParseCredential = async (issuerConf, credential, credentialConfigurationId, context, x509CertRoot) => {
|
|
366
|
-
var _issuerConf$openid_cr;
|
|
367
|
-
const format = (_issuerConf$openid_cr = issuerConf.openid_credential_issuer.credential_configurations_supported[credentialConfigurationId]) === null || _issuerConf$openid_cr === void 0 ? void 0 : _issuerConf$openid_cr.format;
|
|
368
|
-
switch (format) {
|
|
369
|
-
case "dc+sd-jwt":
|
|
370
|
-
{
|
|
371
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, "Parsing credential in dc+sd-jwt format");
|
|
372
|
-
return verifyAndParseCredentialSdJwt(issuerConf, credential, credentialConfigurationId, context);
|
|
373
|
-
}
|
|
374
|
-
case "mso_mdoc":
|
|
375
|
-
{
|
|
376
|
-
_logging.Logger.log(_logging.LogLevel.DEBUG, "Parsing credential in mso_mdoc format");
|
|
377
|
-
return verifyAndParseCredentialMDoc(issuerConf, credential, credentialConfigurationId, context, x509CertRoot);
|
|
378
|
-
}
|
|
379
|
-
default:
|
|
380
|
-
{
|
|
381
|
-
const message = `Unsupported credential format: ${format}`;
|
|
382
|
-
_logging.Logger.log(_logging.LogLevel.ERROR, message);
|
|
383
|
-
throw new _errors.IoWalletError(message);
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
exports.verifyAndParseCredential = verifyAndParseCredential;
|
|
388
|
-
//# sourceMappingURL=07-verify-and-parse-credential.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_errors","require","_sdJwt","_jwk","_mdoc","_const","_logging","_converter","_core","_cryptoNodejs","_parser","parseCredentialSdJwt","credentialConfig","parsedCredentialRaw","ignoreMissingAttributes","arguments","length","undefined","includeUndefinedAttributes","claimsMetadata","claims","missingPaths","rootKeysToVerify","Set","map","c","path","filter","p","rootKey","push","missing","join","received","Object","keys","IoWalletError","getDisplayNames","match","find","isPathEqual","nameMap","entry","display","locale","name","processLevel","currentData","currentPath","Array","isArray","item","dataObj","result","processedKeys","configKeysAtThisLevel","claim","isPrefixOf","nextPart","includes","key","stringKey","toString","dataValue","newPath","localizedNames","value","add","entries","has","parseCredentialMDoc","_ref","issuerSigned","attrDefinitions","_ref2","namespace","attribute","nameSpaces","flatNamespaces","flatMap","_ref3","values","v","elementIdentifier","elementValue","attrsNotInDisclosures","_ref4","attrDefNamespace","attrKey","some","_ref5","_ref6","_ref7","definedValues","_ref8","_flatNamespaces$find","_ref9","_ref10","_","__","definition","reduce","acc","_ref11","getParsedCredentialClaimKey","names","_ref12","undefinedValues","fromEntries","_ref13","_ref14","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","sdJwt","payload","isSameThumbprint","jwk","message","kid","Logger","log","LogLevel","ERROR","sdJwtInstance","SDJwtInstance","hasher","digest","decode","verifyCredentialMDoc","x509CertRoot","verifyMdoc","issuerAuth","deviceKeyInfo","deviceKey","verifyAndParseCredentialSdJwt","issuerConf","credential","credentialConfigurationId","_ref15","credentialCryptoContext","decoded","openid_credential_issuer","jwks","DEBUG","JSON","stringify","credential_configurations_supported","getClaims","parsedCredential","issuedAt","iat","Date","exp","expiration","verifyAndParseCredentialMDoc","_ref16","_parsedCredential$get","_parsedCredential$get2","expirationDate","extractElementValueAsDate","MDOC_DEFAULT_NAMESPACE","setDate","getDate","maybeIssuedAt","verifyAndParseCredential","context","_issuerConf$openid_cr","format","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/07-verify-and-parse-credential.ts"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAGA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAgCA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMU,oBAAoB,GAAG,SAAAA,CAC3BC,gBAAgC,EAChCC,mBAA4C,EAGvB;EAAA,IAFrBC,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IACxCG,0BAAmC,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE3C,MAAMI,cAAc,GAAGP,gBAAgB,CAACQ,MAAM,IAAI,EAAE;;EAEpD;EACA,IAAI,CAACN,uBAAuB,EAAE;IAC5B,MAAMO,YAAsB,GAAG,EAAE;IACjC,MAAMC,gBAAgB,GAAG,IAAIC,GAAG,CAC9BJ,cAAc,CACXK,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrBC,MAAM,CAAEC,CAAC,IAAkB,OAAOA,CAAC,KAAK,QAAQ,CACrD,CAAC;IAED,KAAK,MAAMC,OAAO,IAAIP,gBAAgB,EAAE;MACtC,IAAI,EAAEO,OAAO,IAAIhB,mBAAmB,CAAC,EAAE;QACr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Property(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AuthorizationIdpError = exports.AuthorizationError = void 0;
|
|
7
|
-
var _errors = require("../../utils/errors");
|
|
8
|
-
/**
|
|
9
|
-
* An error subclass thrown when an error occurs during the authorization process.
|
|
10
|
-
*/
|
|
11
|
-
class AuthorizationError extends _errors.IoWalletError {
|
|
12
|
-
code = "ERR_IO_WALLET_AUTHORIZATION_ERROR";
|
|
13
|
-
constructor(message) {
|
|
14
|
-
super(message);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* An error subclass thrown when an error occurs during the authorization process with the IDP.
|
|
20
|
-
* It contains the error and error description returned by the IDP.
|
|
21
|
-
*/
|
|
22
|
-
exports.AuthorizationError = AuthorizationError;
|
|
23
|
-
class AuthorizationIdpError extends _errors.IoWalletError {
|
|
24
|
-
code = "ERR_IO_WALLET_IDENTIFICATION_RESPONSE_PARSING_FAILED";
|
|
25
|
-
constructor(error, errorDescription) {
|
|
26
|
-
super((0, _errors.serializeAttrs)({
|
|
27
|
-
error,
|
|
28
|
-
errorDescription
|
|
29
|
-
}));
|
|
30
|
-
this.error = error;
|
|
31
|
-
this.errorDescription = errorDescription;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.AuthorizationIdpError = AuthorizationIdpError;
|
|
35
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_errors","require","AuthorizationError","IoWalletError","code","constructor","message","exports","AuthorizationIdpError","error","errorDescription","serializeAttrs"],"sourceRoot":"../../../../src","sources":["credential/issuance/errors.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACO,MAAMC,kBAAkB,SAASC,qBAAa,CAAC;EACpDC,IAAI,GAAG,mCAAmC;EAE1CC,WAAWA,CAACC,OAAgB,EAAE;IAC5B,KAAK,CAACA,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AAHAC,OAAA,CAAAL,kBAAA,GAAAA,kBAAA;AAIO,MAAMM,qBAAqB,SAASL,qBAAa,CAAC;EACvDC,IAAI,GAAG,sDAAsD;EAK7DC,WAAWA,CAACI,KAAa,EAAEC,gBAAyB,EAAE;IACpD,KAAK,CAAC,IAAAC,sBAAc,EAAC;MAAEF,KAAK;MAAEC;IAAiB,CAAC,CAAC,CAAC;IAClD,IAAI,CAACD,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EAC1C;AACF;AAACH,OAAA,CAAAC,qBAAA,GAAAA,qBAAA"}
|