@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { parseAuthorizeRequest as sdkParseAuthorizeRequest } from "@pagopa/io-wallet-oid4vp";
|
|
2
|
+
import { partialCallbacks } from "../../../utils/callbacks";
|
|
3
|
+
import { mapToRequestObject } from "./mappers";
|
|
4
|
+
import { mapSdkRequestObjectError } from "./sdkErrorMapper";
|
|
5
|
+
import { InvalidRequestObjectError } from "../common/errors";
|
|
6
|
+
export const verifyRequestObject = async (requestObjectEncodedJwt, _ref) => {
|
|
7
|
+
let {
|
|
8
|
+
clientId,
|
|
9
|
+
rpConf
|
|
10
|
+
} = _ref;
|
|
11
|
+
const parsedRequestObject = await sdkParseAuthorizeRequest({
|
|
12
|
+
requestObjectJwt: requestObjectEncodedJwt,
|
|
13
|
+
callbacks: {
|
|
14
|
+
verifyJwt: partialCallbacks.verifyJwt
|
|
15
|
+
}
|
|
16
|
+
}).catch(mapSdkRequestObjectError);
|
|
17
|
+
const payload = parsedRequestObject.payload;
|
|
18
|
+
const isClientIdMatch = clientId === payload.client_id && clientId === rpConf.subject;
|
|
19
|
+
if (!isClientIdMatch) {
|
|
20
|
+
throw new InvalidRequestObjectError("Client ID does not match Request Object or Entity Configuration");
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
requestObject: mapToRequestObject(payload)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=04-verify-request-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["parseAuthorizeRequest","sdkParseAuthorizeRequest","partialCallbacks","mapToRequestObject","mapSdkRequestObjectError","InvalidRequestObjectError","verifyRequestObject","requestObjectEncodedJwt","_ref","clientId","rpConf","parsedRequestObject","requestObjectJwt","callbacks","verifyJwt","catch","payload","isClientIdMatch","client_id","subject","requestObject"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/04-verify-request-object.ts"],"mappings":"AACA,SAASA,qBAAqB,IAAIC,wBAAwB,QAAQ,0BAA0B;AAC5F,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,yBAAyB,QAAQ,kBAAkB;AAE5D,OAAO,MAAMC,mBAAiE,GAC5E,MAAAA,CAAOC,uBAAuB,EAAAC,IAAA,KAA2B;EAAA,IAAzB;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAAF,IAAA;EAClD,MAAMG,mBAAmB,GAAG,MAAMV,wBAAwB,CAAC;IACzDW,gBAAgB,EAAEL,uBAAuB;IACzCM,SAAS,EAAE;MACTC,SAAS,EAAEZ,gBAAgB,CAACY;IAC9B;EACF,CAAC,CAAC,CAACC,KAAK,CAACX,wBAAwB,CAAC;EAElC,MAAMY,OAAO,GAAGL,mBAAmB,CAACK,OAAO;EAE3C,MAAMC,eAAe,GACnBR,QAAQ,KAAKO,OAAO,CAACE,SAAS,IAAIT,QAAQ,KAAKC,MAAM,CAACS,OAAO;EAE/D,IAAI,CAACF,eAAe,EAAE;IACpB,MAAM,IAAIZ,yBAAyB,CACjC,iEACF,CAAC;EACH;EAEA,OAAO;IACLe,aAAa,EAAEjB,kBAAkB,CAACa,OAAO;EAC3C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { DcqlQuery, DcqlError } from "dcql";
|
|
2
|
+
import { isValiError } from "valibot";
|
|
3
|
+
import { CredentialsNotFoundError } from "../common/errors";
|
|
4
|
+
import * as mdocUtils from "./utils.mdoc";
|
|
5
|
+
import * as sdJwtUtils from "../common/utils/sd-jwt";
|
|
6
|
+
import { getClaimsFromDcqlMatch } from "./utils.mdoc";
|
|
7
|
+
import { extractFailedCredentialsDetails, getDcqlQueryMatches, getPresentationFrameFromDcqlMatch } from "../common/utils/dcql";
|
|
8
|
+
export const evaluateDcqlQuery = async function (query, credentialsSdJwt) {
|
|
9
|
+
let credentialsMdoc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
10
|
+
const credentials = (await Promise.all([sdJwtUtils.mapCredentialsToObj(credentialsSdJwt), mdocUtils.mapCredentialsToObj(credentialsMdoc)])).flat();
|
|
11
|
+
|
|
12
|
+
// Build a dictionary <id>:<credential> to map DCQL matches with the raw credential
|
|
13
|
+
const credentialsById = credentials.reduce((acc, c) => ({
|
|
14
|
+
...acc,
|
|
15
|
+
["vct" in c ? c.vct : c.doctype]: c.original_credential
|
|
16
|
+
}), {});
|
|
17
|
+
try {
|
|
18
|
+
// Validate the query
|
|
19
|
+
const parsedQuery = DcqlQuery.parse(query);
|
|
20
|
+
DcqlQuery.validate(parsedQuery);
|
|
21
|
+
const queryResult = DcqlQuery.query(parsedQuery, credentials);
|
|
22
|
+
if (!queryResult.can_be_satisfied) {
|
|
23
|
+
throw new CredentialsNotFoundError(extractFailedCredentialsDetails(queryResult));
|
|
24
|
+
}
|
|
25
|
+
return getDcqlQueryMatches(queryResult).map(_ref => {
|
|
26
|
+
var _queryResult$credenti, _match$valid_credenti;
|
|
27
|
+
let [id, match] = _ref;
|
|
28
|
+
const purposes = (_queryResult$credenti = queryResult.credential_sets) === null || _queryResult$credenti === void 0 || (_queryResult$credenti = _queryResult$credenti.filter(set => {
|
|
29
|
+
var _set$matching_options;
|
|
30
|
+
return (_set$matching_options = set.matching_options) === null || _set$matching_options === void 0 ? void 0 : _set$matching_options.flat().includes(id);
|
|
31
|
+
})) === null || _queryResult$credenti === void 0 ? void 0 : _queryResult$credenti.map(credentialSet => {
|
|
32
|
+
var _credentialSet$purpos;
|
|
33
|
+
return {
|
|
34
|
+
description: (_credentialSet$purpos = credentialSet.purpose) === null || _credentialSet$purpos === void 0 ? void 0 : _credentialSet$purpos.toString(),
|
|
35
|
+
required: Boolean(credentialSet.required)
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
const matchOutput = (_match$valid_credenti = match.valid_credentials[0]) === null || _match$valid_credenti === void 0 ? void 0 : _match$valid_credenti.meta.output;
|
|
39
|
+
if ((matchOutput === null || matchOutput === void 0 ? void 0 : matchOutput.credential_format) === "dc+sd-jwt") {
|
|
40
|
+
const {
|
|
41
|
+
vct
|
|
42
|
+
} = matchOutput;
|
|
43
|
+
const [keyTag, credential] = credentialsById[vct];
|
|
44
|
+
const requiredDisclosures = getClaimsFromDcqlMatch(match);
|
|
45
|
+
const presentationFrame = getPresentationFrameFromDcqlMatch(match, parsedQuery);
|
|
46
|
+
return {
|
|
47
|
+
id,
|
|
48
|
+
vct,
|
|
49
|
+
keyTag,
|
|
50
|
+
format: matchOutput.credential_format,
|
|
51
|
+
credential,
|
|
52
|
+
requiredDisclosures,
|
|
53
|
+
presentationFrame,
|
|
54
|
+
// When it is a match but no credential_sets are found, the credential is required by default
|
|
55
|
+
// See https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#section-6.4.2
|
|
56
|
+
purposes: purposes ?? [{
|
|
57
|
+
required: true
|
|
58
|
+
}]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
if ((matchOutput === null || matchOutput === void 0 ? void 0 : matchOutput.credential_format) === "mso_mdoc") {
|
|
62
|
+
const {
|
|
63
|
+
doctype
|
|
64
|
+
} = matchOutput;
|
|
65
|
+
const [keyTag, credential] = credentialsById[doctype];
|
|
66
|
+
const requiredDisclosures = mdocUtils.getClaimsFromDcqlMatch(match);
|
|
67
|
+
const presentationFrame = mdocUtils.getPresentationFrameFromClaims(requiredDisclosures, doctype);
|
|
68
|
+
return {
|
|
69
|
+
id,
|
|
70
|
+
doctype,
|
|
71
|
+
keyTag,
|
|
72
|
+
format: matchOutput.credential_format,
|
|
73
|
+
credential,
|
|
74
|
+
requiredDisclosures,
|
|
75
|
+
presentationFrame,
|
|
76
|
+
purposes: purposes ?? [{
|
|
77
|
+
required: true
|
|
78
|
+
}]
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
throw new Error(`Unsupported credential format: ${matchOutput === null || matchOutput === void 0 ? void 0 : matchOutput.credential_format}`);
|
|
82
|
+
});
|
|
83
|
+
} catch (error) {
|
|
84
|
+
// Invalid DCQL query structure. Remap to `DcqlError` for consistency.
|
|
85
|
+
if (isValiError(error)) {
|
|
86
|
+
throw new DcqlError({
|
|
87
|
+
message: "Failed to parse the provided DCQL query",
|
|
88
|
+
code: "PARSE_ERROR",
|
|
89
|
+
cause: error.issues
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Let other errors propagate so they can be caught with `err instanceof DcqlError`
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=05-evaluate-dcql-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DcqlQuery","DcqlError","isValiError","CredentialsNotFoundError","mdocUtils","sdJwtUtils","getClaimsFromDcqlMatch","extractFailedCredentialsDetails","getDcqlQueryMatches","getPresentationFrameFromDcqlMatch","evaluateDcqlQuery","query","credentialsSdJwt","credentialsMdoc","arguments","length","undefined","credentials","Promise","all","mapCredentialsToObj","flat","credentialsById","reduce","acc","c","vct","doctype","original_credential","parsedQuery","parse","validate","queryResult","can_be_satisfied","map","_ref","_queryResult$credenti","_match$valid_credenti","id","match","purposes","credential_sets","filter","set","_set$matching_options","matching_options","includes","credentialSet","_credentialSet$purpos","description","purpose","toString","required","Boolean","matchOutput","valid_credentials","meta","output","credential_format","keyTag","credential","requiredDisclosures","presentationFrame","format","getPresentationFrameFromClaims","Error","error","message","code","cause","issues"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/05-evaluate-dcql-query.ts"],"mappings":"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"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { createAuthorizationResponse as sdkCreateAuthorizationResponse, fetchAuthorizationResponse as sdkFetchAuthorizationResponse } from "@pagopa/io-wallet-oid4vp";
|
|
2
|
+
import { partialCallbacks } from "../../../utils/callbacks";
|
|
3
|
+
import { mapSdkAuthorizationResponseError } from "./sdkErrorMapper";
|
|
4
|
+
import { generateRandomAlphaNumericString, hasStatusOrThrow } from "../../../utils/misc";
|
|
5
|
+
import { IoWalletError, RelyingPartyResponseError } from "../../../utils/errors";
|
|
6
|
+
import { AuthorizationResponse } from "./types";
|
|
7
|
+
import { buildDirectPostBody } from "../common/utils/http";
|
|
8
|
+
import { prepareVpToken } from "../../../sd-jwt";
|
|
9
|
+
import { createCryptoContextFor } from "../../../utils/crypto";
|
|
10
|
+
import { prepareVpTokenMdoc } from "../../../mdoc";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Prepares remote presentations for a set of credentials.
|
|
14
|
+
*
|
|
15
|
+
* For each credential, this function:
|
|
16
|
+
* - Validates the credential format (currently supports 'mso_mdoc' or 'dc+sd-jwt').
|
|
17
|
+
* - Generates a verifiable presentation token (vpToken) using the appropriate method.
|
|
18
|
+
* - For ISO 18013-7, generates a special nonce with minimum entropy of 16.
|
|
19
|
+
*
|
|
20
|
+
* @param credentials - An array of credential items containing format, credential data, requested claims, and key information.
|
|
21
|
+
* @param authRequestObject - The authentication request object containing nonce, clientId, and responseUri.
|
|
22
|
+
* @returns A promise that resolves to an object containing an array of presentations and the generated nonce.
|
|
23
|
+
* @throws {CredentialNotFoundError} When the credential format is unsupported.
|
|
24
|
+
*/
|
|
25
|
+
export const prepareRemotePresentations = async (credentials, authRequestObject) => {
|
|
26
|
+
// In case of ISO 18013-7 we need a nonce, it shall have a minimum entropy of 16
|
|
27
|
+
const generatedNonce = generateRandomAlphaNumericString(16);
|
|
28
|
+
const presentations = await Promise.all(credentials.map(async item => {
|
|
29
|
+
const {
|
|
30
|
+
format
|
|
31
|
+
} = item;
|
|
32
|
+
if (format === "dc+sd-jwt") {
|
|
33
|
+
const {
|
|
34
|
+
vp_token
|
|
35
|
+
} = await prepareVpToken(authRequestObject.nonce, authRequestObject.clientId, [item.credential, item.presentationFrame, createCryptoContextFor(item.keyTag)]);
|
|
36
|
+
return {
|
|
37
|
+
requestedClaims: item.requiredDisclosures.map(_ref => {
|
|
38
|
+
let {
|
|
39
|
+
name
|
|
40
|
+
} = _ref;
|
|
41
|
+
return name;
|
|
42
|
+
}),
|
|
43
|
+
credentialId: item.id,
|
|
44
|
+
vpToken: vp_token,
|
|
45
|
+
format
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (format === "mso_mdoc") {
|
|
49
|
+
const {
|
|
50
|
+
vp_token
|
|
51
|
+
} = await prepareVpTokenMdoc(authRequestObject.nonce, generatedNonce, authRequestObject.clientId, authRequestObject.responseUri, item.doctype, item.keyTag, [item.credential, item.presentationFrame, createCryptoContextFor(item.keyTag)]);
|
|
52
|
+
return {
|
|
53
|
+
requestedClaims: item.requiredDisclosures.map(_ref2 => {
|
|
54
|
+
let {
|
|
55
|
+
name
|
|
56
|
+
} = _ref2;
|
|
57
|
+
return name;
|
|
58
|
+
}),
|
|
59
|
+
credentialId: item.id,
|
|
60
|
+
vpToken: vp_token,
|
|
61
|
+
format: "mso_mdoc"
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
throw new IoWalletError(`${format} format is not supported.`);
|
|
65
|
+
}));
|
|
66
|
+
return {
|
|
67
|
+
presentations,
|
|
68
|
+
generatedNonce
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export const sendAuthorizationResponse = async function (requestObject, remotePresentation, rpConf) {
|
|
72
|
+
let {
|
|
73
|
+
appFetch = fetch
|
|
74
|
+
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
75
|
+
try {
|
|
76
|
+
const {
|
|
77
|
+
presentations
|
|
78
|
+
} = remotePresentation;
|
|
79
|
+
const rpJwks = {
|
|
80
|
+
jwks: rpConf.jwks,
|
|
81
|
+
encrypted_response_enc_values_supported: rpConf.encrypted_response_enc_values_supported
|
|
82
|
+
};
|
|
83
|
+
const vp_token = presentations.reduce((acc, p) => {
|
|
84
|
+
(acc[p.credentialId] ??= []).push(p.vpToken);
|
|
85
|
+
return acc;
|
|
86
|
+
}, {});
|
|
87
|
+
const {
|
|
88
|
+
jarm
|
|
89
|
+
} = await sdkCreateAuthorizationResponse({
|
|
90
|
+
requestObject,
|
|
91
|
+
rpJwks,
|
|
92
|
+
vp_token,
|
|
93
|
+
callbacks: {
|
|
94
|
+
encryptJwe: partialCallbacks.encryptJwe,
|
|
95
|
+
generateRandom: partialCallbacks.generateRandom
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
return await sdkFetchAuthorizationResponse({
|
|
99
|
+
authorizationResponseJarm: jarm.responseJwe,
|
|
100
|
+
presentationResponseUri: requestObject.response_uri,
|
|
101
|
+
callbacks: {
|
|
102
|
+
fetch: appFetch
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
} catch (err) {
|
|
106
|
+
throw mapSdkAuthorizationResponseError(err);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
export const sendAuthorizationErrorResponse = async function (requestObject, _ref3) {
|
|
110
|
+
let {
|
|
111
|
+
error,
|
|
112
|
+
errorDescription
|
|
113
|
+
} = _ref3;
|
|
114
|
+
let {
|
|
115
|
+
appFetch = fetch
|
|
116
|
+
} = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
117
|
+
const requestBody = await buildDirectPostBody(requestObject, {
|
|
118
|
+
error,
|
|
119
|
+
error_description: errorDescription
|
|
120
|
+
});
|
|
121
|
+
return await appFetch(requestObject.response_uri, {
|
|
122
|
+
method: "POST",
|
|
123
|
+
headers: {
|
|
124
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
125
|
+
},
|
|
126
|
+
body: requestBody
|
|
127
|
+
}).then(hasStatusOrThrow(200, RelyingPartyResponseError)).then(res => res.json()).then(AuthorizationResponse.parse);
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=06-send-authorization-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createAuthorizationResponse","sdkCreateAuthorizationResponse","fetchAuthorizationResponse","sdkFetchAuthorizationResponse","partialCallbacks","mapSdkAuthorizationResponseError","generateRandomAlphaNumericString","hasStatusOrThrow","IoWalletError","RelyingPartyResponseError","AuthorizationResponse","buildDirectPostBody","prepareVpToken","createCryptoContextFor","prepareVpTokenMdoc","prepareRemotePresentations","credentials","authRequestObject","generatedNonce","presentations","Promise","all","map","item","format","vp_token","nonce","clientId","credential","presentationFrame","keyTag","requestedClaims","requiredDisclosures","_ref","name","credentialId","id","vpToken","responseUri","doctype","_ref2","sendAuthorizationResponse","requestObject","remotePresentation","rpConf","appFetch","fetch","arguments","length","undefined","rpJwks","jwks","encrypted_response_enc_values_supported","reduce","acc","p","push","jarm","callbacks","encryptJwe","generateRandom","authorizationResponseJarm","responseJwe","presentationResponseUri","response_uri","err","sendAuthorizationErrorResponse","_ref3","error","errorDescription","requestBody","error_description","method","headers","body","then","res","json","parse"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/06-send-authorization-response.ts"],"mappings":"AAAA,SACEA,2BAA2B,IAAIC,8BAA8B,EAC7DC,0BAA0B,IAAIC,6BAA6B,QACtD,0BAA0B;AAEjC,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,gCAAgC,QAAQ,kBAAkB;AACnE,SACEC,gCAAgC,EAChCC,gBAAgB,QACX,qBAAqB;AAC5B,SACEC,aAAa,EACbC,yBAAyB,QACpB,uBAAuB;AAC9B,SAASC,qBAAqB,QAAQ,SAAS;AAC/C,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAASC,sBAAsB,QAAQ,uBAAuB;AAC9D,SAASC,kBAAkB,QAAQ,eAAe;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA+E,GAC1F,MAAAA,CAAOC,WAAW,EAAEC,iBAAiB,KAAK;EACxC;EACA,MAAMC,cAAc,GAAGZ,gCAAgC,CAAC,EAAE,CAAC;EAE3D,MAAMa,aAAa,GAAG,MAAMC,OAAO,CAACC,GAAG,CACrCL,WAAW,CAACM,GAAG,CAAC,MAAOC,IAAI,IAAK;IAC9B,MAAM;MAAEC;IAAO,CAAC,GAAGD,IAAI;IAEvB,IAAIC,MAAM,KAAK,WAAW,EAAE;MAC1B,MAAM;QAAEC;MAAS,CAAC,GAAG,MAAMb,cAAc,CACvCK,iBAAiB,CAACS,KAAK,EACvBT,iBAAiB,CAACU,QAAQ,EAC1B,CACEJ,IAAI,CAACK,UAAU,EACfL,IAAI,CAACM,iBAAiB,EACtBhB,sBAAsB,CAACU,IAAI,CAACO,MAAM,CAAC,CAEvC,CAAC;MAED,OAAO;QACLC,eAAe,EAAER,IAAI,CAACS,mBAAmB,CAACV,GAAG,CAACW,IAAA;UAAA,IAAC;YAAEC;UAAK,CAAC,GAAAD,IAAA;UAAA,OAAKC,IAAI;QAAA,EAAC;QACjEC,YAAY,EAAEZ,IAAI,CAACa,EAAE;QACrBC,OAAO,EAAEZ,QAAQ;QACjBD;MACF,CAAC;IACH;IAEA,IAAIA,MAAM,KAAK,UAAU,EAAE;MACzB,MAAM;QAAEC;MAAS,CAAC,GAAG,MAAMX,kBAAkB,CAC3CG,iBAAiB,CAACS,KAAK,EACvBR,cAAc,EACdD,iBAAiB,CAACU,QAAQ,EAC1BV,iBAAiB,CAACqB,WAAW,EAC7Bf,IAAI,CAACgB,OAAO,EACZhB,IAAI,CAACO,MAAM,EACX,CACEP,IAAI,CAACK,UAAU,EACfL,IAAI,CAACM,iBAAiB,EACtBhB,sBAAsB,CAACU,IAAI,CAACO,MAAM,CAAC,CAEvC,CAAC;MAED,OAAO;QACLC,eAAe,EAAER,IAAI,CAACS,mBAAmB,CAACV,GAAG,CAACkB,KAAA;UAAA,IAAC;YAAEN;UAAK,CAAC,GAAAM,KAAA;UAAA,OAAKN,IAAI;QAAA,EAAC;QACjEC,YAAY,EAAEZ,IAAI,CAACa,EAAE;QACrBC,OAAO,EAAEZ,QAAQ;QACjBD,MAAM,EAAE;MACV,CAAC;IACH;IAEA,MAAM,IAAIhB,aAAa,CAAE,GAAEgB,MAAO,2BAA0B,CAAC;EAC/D,CAAC,CACH,CAAC;EAED,OAAO;IACLL,aAAa;IACbD;EACF,CAAC;AACH,CAAC;AAEH,OAAO,MAAMuB,yBAA6E,GACxF,eAAAA,CACEC,aAAa,EACbC,kBAAkB,EAClBC,MAAM,EAEH;EAAA,IADH;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEzB,IAAI;IACF,MAAM;MAAE5B;IAAc,CAAC,GAAGwB,kBAAkB;IAC5C,MAAMO,MAAM,GAAG;MACbC,IAAI,EAAEP,MAAM,CAACO,IAAI;MACjBC,uCAAuC,EACrCR,MAAM,CAACQ;IACX,CAAC;IAED,MAAM3B,QAAQ,GAAGN,aAAa,CAACkC,MAAM,CACnC,CAACC,GAAG,EAAEC,CAAC,KAAK;MACV,CAACD,GAAG,CAACC,CAAC,CAACpB,YAAY,CAAC,KAAK,EAAE,EAAEqB,IAAI,CAACD,CAAC,CAAClB,OAAO,CAAC;MAC5C,OAAOiB,GAAG;IACZ,CAAC,EACD,CAAC,CACH,CAAC;IAED,MAAM;MAAEG;IAAK,CAAC,GAAG,MAAMxD,8BAA8B,CAAC;MACpDyC,aAAa;MACbQ,MAAM;MACNzB,QAAQ;MACRiC,SAAS,EAAE;QACTC,UAAU,EAAEvD,gBAAgB,CAACuD,UAAU;QACvCC,cAAc,EAAExD,gBAAgB,CAACwD;MACnC;IACF,CAAC,CAAC;IAEF,OAAO,MAAMzD,6BAA6B,CAAC;MACzC0D,yBAAyB,EAAEJ,IAAI,CAACK,WAAW;MAC3CC,uBAAuB,EAAErB,aAAa,CAACsB,YAAY;MACnDN,SAAS,EAAE;QAAEZ,KAAK,EAAED;MAAS;IAC/B,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOoB,GAAG,EAAE;IACZ,MAAM5D,gCAAgC,CAAC4D,GAAG,CAAC;EAC7C;AACF,CAAC;AAEH,OAAO,MAAMC,8BAAuF,GAClG,eAAAA,CACExB,aAAa,EAAAyB,KAAA,EAGV;EAAA,IAFH;IAAEC,KAAK;IAAEC;EAAiB,CAAC,GAAAF,KAAA;EAAA,IAC3B;IAAEtB,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEzB,MAAMuB,WAAW,GAAG,MAAM3D,mBAAmB,CAAC+B,aAAa,EAAE;IAC3D0B,KAAK;IACLG,iBAAiB,EAAEF;EACrB,CAAC,CAAC;EAEF,OAAO,MAAMxB,QAAQ,CAACH,aAAa,CAACsB,YAAY,EAAE;IAChDQ,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACP,cAAc,EAAE;IAClB,CAAC;IACDC,IAAI,EAAEJ;EACR,CAAC,CAAC,CACCK,IAAI,CAACpE,gBAAgB,CAAC,GAAG,EAAEE,yBAAyB,CAAC,CAAC,CACtDkE,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAACjE,qBAAqB,CAACoE,KAAK,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { startFlowFromQR } from "./01-start-flow";
|
|
2
|
+
import { evaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
|
|
3
|
+
import { getRequestObject } from "./03-get-request-object";
|
|
4
|
+
import { verifyRequestObject } from "./04-verify-request-object";
|
|
5
|
+
import { evaluateDcqlQuery } from "./05-evaluate-dcql-query";
|
|
6
|
+
import { prepareRemotePresentations, sendAuthorizationResponse, sendAuthorizationErrorResponse } from "./06-send-authorization-response";
|
|
7
|
+
export const RemotePresentation = {
|
|
8
|
+
startFlowFromQR,
|
|
9
|
+
evaluateRelyingPartyTrust,
|
|
10
|
+
getRequestObject,
|
|
11
|
+
verifyRequestObject,
|
|
12
|
+
evaluateDcqlQuery,
|
|
13
|
+
prepareRemotePresentations,
|
|
14
|
+
sendAuthorizationResponse,
|
|
15
|
+
sendAuthorizationErrorResponse
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["startFlowFromQR","evaluateRelyingPartyTrust","getRequestObject","verifyRequestObject","evaluateDcqlQuery","prepareRemotePresentations","sendAuthorizationResponse","sendAuthorizationErrorResponse","RemotePresentation"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/index.ts"],"mappings":"AACA,SAASA,eAAe,QAAQ,iBAAiB;AACjD,SAASC,yBAAyB,QAAQ,wBAAwB;AAClE,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SACEC,0BAA0B,EAC1BC,yBAAyB,EACzBC,8BAA8B,QACzB,kCAAkC;AAEzC,OAAO,MAAMC,kBAAyC,GAAG;EACvDR,eAAe;EACfC,yBAAyB;EACzBC,gBAAgB;EAChBC,mBAAmB;EACnBC,iBAAiB;EACjBC,0BAA0B;EAC1BC,yBAAyB;EACzBC;AACF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createMapper } from "../../../utils/mappers";
|
|
2
|
+
export const mapToRelyingPartyConfig = createMapper(x => {
|
|
3
|
+
const {
|
|
4
|
+
federation_entity,
|
|
5
|
+
openid_credential_verifier
|
|
6
|
+
} = x.payload.metadata;
|
|
7
|
+
return {
|
|
8
|
+
subject: x.payload.sub,
|
|
9
|
+
jwks: openid_credential_verifier.jwks,
|
|
10
|
+
federation_entity,
|
|
11
|
+
encrypted_response_enc_values_supported: openid_credential_verifier.encrypted_response_enc_values_supported
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
export const mapToRequestObject = createMapper(x => ({
|
|
15
|
+
iss: x.iss,
|
|
16
|
+
client_id: x.client_id,
|
|
17
|
+
dcql_query: x.dcql_query,
|
|
18
|
+
nonce: x.nonce,
|
|
19
|
+
response_uri: x.response_uri,
|
|
20
|
+
state: x.state,
|
|
21
|
+
response_mode: x.response_mode,
|
|
22
|
+
response_type: x.response_type
|
|
23
|
+
}));
|
|
24
|
+
//# sourceMappingURL=mappers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createMapper","mapToRelyingPartyConfig","x","federation_entity","openid_credential_verifier","payload","metadata","subject","sub","jwks","encrypted_response_enc_values_supported","mapToRequestObject","iss","client_id","dcql_query","nonce","response_uri","state","response_mode","response_type"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/mappers.ts"],"mappings":"AACA,SAASA,YAAY,QAAQ,wBAAwB;AAKrD,OAAO,MAAMC,uBAAuB,GAAGD,YAAY,CAGhDE,CAAC,IAAK;EACP,MAAM;IAAEC,iBAAiB;IAAEC;EAA2B,CAAC,GAAGF,CAAC,CAACG,OAAO,CAACC,QAAQ;EAE5E,OAAO;IACLC,OAAO,EAAEL,CAAC,CAACG,OAAO,CAACG,GAAG;IACtBC,IAAI,EAAEL,0BAA0B,CAACK,IAAI;IACrCN,iBAAiB;IACjBO,uCAAuC,EACrCN,0BAA0B,CAACM;EAC/B,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,GAAGX,YAAY,CAG3CE,CAAC,KAAM;EACRU,GAAG,EAAEV,CAAC,CAACU,GAAG;EACVC,SAAS,EAAEX,CAAC,CAACW,SAAS;EACtBC,UAAU,EAAEZ,CAAC,CAACY,UAAU;EACxBC,KAAK,EAAEb,CAAC,CAACa,KAAK;EACdC,YAAY,EAAEd,CAAC,CAACc,YAAY;EAC5BC,KAAK,EAAEf,CAAC,CAACe,KAAK;EACdC,aAAa,EAAEhB,CAAC,CAACgB,aAAa;EAC9BC,aAAa,EAAEjB,CAAC,CAACiB;AACnB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ValidationError as SdkValidationError } from "@openid4vc/utils";
|
|
2
|
+
import { FetchAuthorizationResponseError as SdkFetchAuthorizationResponseError, CreateAuthorizationResponseError as SdkCreateAuthorizationResponseError } from "@pagopa/io-wallet-oid4vp";
|
|
3
|
+
import { RelyingPartyResponseError, RelyingPartyResponseErrorCodes, ResponseErrorBuilder } from "../../../utils/errors";
|
|
4
|
+
import { Oauth2JwtParseError as SdkOauth2JwtParseError } from "@pagopa/io-wallet-oauth2";
|
|
5
|
+
import { InvalidRequestObjectError } from "../common/errors";
|
|
6
|
+
import { UnexpectedStatusCodeError as SdkUnexpectedStatusCodeError } from "@pagopa/io-wallet-utils";
|
|
7
|
+
/**
|
|
8
|
+
* Helper to create a generic RelyingPartyResponseError
|
|
9
|
+
*/
|
|
10
|
+
const toRelyingPartyResponseError = function (message, statusCode) {
|
|
11
|
+
let code = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : RelyingPartyResponseErrorCodes.RelyingPartyGenericError;
|
|
12
|
+
return new RelyingPartyResponseError({
|
|
13
|
+
code,
|
|
14
|
+
message,
|
|
15
|
+
reason: message,
|
|
16
|
+
statusCode
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Mapping Sdk errors during Request Object retrieval (Fetch/QR)
|
|
22
|
+
*/
|
|
23
|
+
export const mapSdkFetchAuthRequestError = err => {
|
|
24
|
+
if (err instanceof SdkUnexpectedStatusCodeError) {
|
|
25
|
+
throw toRelyingPartyResponseError(err.message, err.statusCode);
|
|
26
|
+
}
|
|
27
|
+
throw err;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Mapping Sdk errors during JWT parsing and verification
|
|
32
|
+
*/
|
|
33
|
+
export const mapSdkRequestObjectError = err => {
|
|
34
|
+
if (err instanceof SdkValidationError) {
|
|
35
|
+
throw new InvalidRequestObjectError("The Request Object structure is invalid", err.message);
|
|
36
|
+
}
|
|
37
|
+
if (err instanceof SdkOauth2JwtParseError) {
|
|
38
|
+
throw new InvalidRequestObjectError("The Request Object is not a valid JWT");
|
|
39
|
+
}
|
|
40
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
41
|
+
throw new InvalidRequestObjectError(message);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Mapping Sdk errors during Authorization Response submission (JARM / Post)
|
|
46
|
+
*/
|
|
47
|
+
export const mapSdkAuthorizationResponseError = err => {
|
|
48
|
+
if (err instanceof SdkUnexpectedStatusCodeError) {
|
|
49
|
+
throw new ResponseErrorBuilder(RelyingPartyResponseError).handle(400, {
|
|
50
|
+
code: RelyingPartyResponseErrorCodes.InvalidAuthorizationResponse,
|
|
51
|
+
message: "The Authorization Response contains invalid parameters or it is malformed"
|
|
52
|
+
}).handle(403, {
|
|
53
|
+
code: RelyingPartyResponseErrorCodes.InvalidAuthorizationResponse,
|
|
54
|
+
message: "The Authorization Response was forbidden"
|
|
55
|
+
}).handle("*", {
|
|
56
|
+
code: RelyingPartyResponseErrorCodes.RelyingPartyGenericError,
|
|
57
|
+
message: "Unable to successfully send the Authorization Response"
|
|
58
|
+
}).buildFrom(err);
|
|
59
|
+
}
|
|
60
|
+
if (err instanceof SdkCreateAuthorizationResponseError || err instanceof SdkFetchAuthorizationResponseError) {
|
|
61
|
+
throw toRelyingPartyResponseError(err.message, err.statusCode ?? 400);
|
|
62
|
+
}
|
|
63
|
+
throw err;
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=sdkErrorMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ValidationError","SdkValidationError","FetchAuthorizationResponseError","SdkFetchAuthorizationResponseError","CreateAuthorizationResponseError","SdkCreateAuthorizationResponseError","RelyingPartyResponseError","RelyingPartyResponseErrorCodes","ResponseErrorBuilder","Oauth2JwtParseError","SdkOauth2JwtParseError","InvalidRequestObjectError","UnexpectedStatusCodeError","SdkUnexpectedStatusCodeError","toRelyingPartyResponseError","message","statusCode","code","arguments","length","undefined","RelyingPartyGenericError","reason","mapSdkFetchAuthRequestError","err","mapSdkRequestObjectError","Error","String","mapSdkAuthorizationResponseError","handle","InvalidAuthorizationResponse","buildFrom"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/sdkErrorMapper.ts"],"mappings":"AAAA,SAASA,eAAe,IAAIC,kBAAkB,QAAQ,kBAAkB;AACxE,SACEC,+BAA+B,IAAIC,kCAAkC,EACrEC,gCAAgC,IAAIC,mCAAmC,QAClE,0BAA0B;AACjC,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,oBAAoB,QACf,uBAAuB;AAC9B,SAASC,mBAAmB,IAAIC,sBAAsB,QAAQ,0BAA0B;AACxF,SAASC,yBAAyB,QAAQ,kBAAkB;AAC5D,SAASC,yBAAyB,IAAIC,4BAA4B,QAAQ,yBAAyB;AAGnG;AACA;AACA;AACA,MAAMC,2BAA2B,GAAG,SAAAA,CAClCC,OAAe,EACfC,UAAkB;EAAA,IAClBC,IAAmC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGX,8BAA8B,CAACc,wBAAwB;EAAA,OAE7F,IAAIf,yBAAyB,CAAC;IAC5BW,IAAI;IACJF,OAAO;IACPO,MAAM,EAAEP,OAAO;IACfC;EACF,CAAC,CAAC;AAAA;;AAEJ;AACA;AACA;AACA,OAAO,MAAMO,2BAA2B,GAAIC,GAAY,IAAK;EAC3D,IAAIA,GAAG,YAAYX,4BAA4B,EAAE;IAC/C,MAAMC,2BAA2B,CAACU,GAAG,CAACT,OAAO,EAAES,GAAG,CAACR,UAAU,CAAC;EAChE;EAEA,MAAMQ,GAAG;AACX,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAID,GAAY,IAAK;EACxD,IAAIA,GAAG,YAAYvB,kBAAkB,EAAE;IACrC,MAAM,IAAIU,yBAAyB,CACjC,yCAAyC,EACzCa,GAAG,CAACT,OACN,CAAC;EACH;EAEA,IAAIS,GAAG,YAAYd,sBAAsB,EAAE;IACzC,MAAM,IAAIC,yBAAyB,CACjC,uCACF,CAAC;EACH;EAEA,MAAMI,OAAO,GAAGS,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACT,OAAO,GAAGY,MAAM,CAACH,GAAG,CAAC;EAChE,MAAM,IAAIb,yBAAyB,CAACI,OAAO,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMa,gCAAgC,GAAIJ,GAAY,IAAK;EAChE,IAAIA,GAAG,YAAYX,4BAA4B,EAAE;IAC/C,MAAM,IAAIL,oBAAoB,CAACF,yBAAyB,CAAC,CACtDuB,MAAM,CAAC,GAAG,EAAE;MACXZ,IAAI,EAAEV,8BAA8B,CAACuB,4BAA4B;MACjEf,OAAO,EACL;IACJ,CAAC,CAAC,CACDc,MAAM,CAAC,GAAG,EAAE;MACXZ,IAAI,EAAEV,8BAA8B,CAACuB,4BAA4B;MACjEf,OAAO,EAAE;IACX,CAAC,CAAC,CACDc,MAAM,CAAC,GAAG,EAAE;MACXZ,IAAI,EAAEV,8BAA8B,CAACc,wBAAwB;MAC7DN,OAAO,EAAE;IACX,CAAC,CAAC,CACDgB,SAAS,CAACP,GAAG,CAAC;EACnB;EAEA,IACEA,GAAG,YAAYnB,mCAAmC,IAClDmB,GAAG,YAAYrB,kCAAkC,EACjD;IACA,MAAMW,2BAA2B,CAACU,GAAG,CAACT,OAAO,EAAES,GAAG,CAACR,UAAU,IAAI,GAAG,CAAC;EACvE;EAEA,MAAMQ,GAAG;AACX,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { zOpenid4vpAuthorizationRequestPayload as sdkRequestObjectPayload } from "@pagopa/io-wallet-oid4vp";
|
|
3
|
+
export const RequestObjectPayload = sdkRequestObjectPayload;
|
|
4
|
+
export const AuthorizationResponse = z.object({
|
|
5
|
+
status: z.string().optional(),
|
|
6
|
+
response_code: z.string().optional(),
|
|
7
|
+
redirect_uri: z.string().optional()
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["z","zOpenid4vpAuthorizationRequestPayload","sdkRequestObjectPayload","RequestObjectPayload","AuthorizationResponse","object","status","string","optional","response_code","redirect_uri"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/types.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AACxB,SAASC,qCAAqC,IAAIC,uBAAuB,QAAQ,0BAA0B;AAG3G,OAAO,MAAMC,oBAAoB,GAAGD,uBAAuB;AAG3D,OAAO,MAAME,qBAAqB,GAAGJ,CAAC,CAACK,MAAM,CAAC;EAC5CC,MAAM,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BC,aAAa,EAAET,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACpCE,YAAY,EAAEV,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CBOR } from "@pagopa/io-react-native-iso18013";
|
|
2
|
+
import { b64utob64 } from "jsrsasign";
|
|
3
|
+
import { getValidDcqlClaims } from "../common/utils/dcql";
|
|
4
|
+
/**
|
|
5
|
+
* Convert a list of credential in mdoc format to a list of objects
|
|
6
|
+
* with namespaces for correct parsing by the `dcql` library.
|
|
7
|
+
* @param credentials The raw mdoc credentials
|
|
8
|
+
* @returns List of `dcql` compatible objects
|
|
9
|
+
*/
|
|
10
|
+
export const mapCredentialsToObj = async credentialsMdoc => {
|
|
11
|
+
return await Promise.all(credentialsMdoc.map(async credential => {
|
|
12
|
+
const issuerSigned = await CBOR.decodeIssuerSigned(b64utob64(credential[1]));
|
|
13
|
+
const namespaces = Object.entries(issuerSigned.nameSpaces).reduce((acc, _ref) => {
|
|
14
|
+
let [ns, nsClaims] = _ref;
|
|
15
|
+
const flattenNsClaims = Object.entries(nsClaims).reduce((ac, _ref2) => {
|
|
16
|
+
let [, el] = _ref2;
|
|
17
|
+
return {
|
|
18
|
+
...ac,
|
|
19
|
+
[el.elementIdentifier]: el.elementValue
|
|
20
|
+
};
|
|
21
|
+
}, {});
|
|
22
|
+
return {
|
|
23
|
+
...acc,
|
|
24
|
+
[ns]: flattenNsClaims
|
|
25
|
+
};
|
|
26
|
+
}, {});
|
|
27
|
+
return {
|
|
28
|
+
credential_format: "mso_mdoc",
|
|
29
|
+
doctype: issuerSigned.issuerAuth.payload.docType || "missing_doctype",
|
|
30
|
+
cryptographic_holder_binding: true,
|
|
31
|
+
namespaces,
|
|
32
|
+
original_credential: credential
|
|
33
|
+
};
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Extract a compact list of claims from the `dcql` result.
|
|
39
|
+
* @param match The DCQL query match
|
|
40
|
+
* @returns The list of claims in {@link EvaluatedDisclosure} format
|
|
41
|
+
*/
|
|
42
|
+
export const getClaimsFromDcqlMatch = match => getValidDcqlClaims(match).flatMap(_ref3 => {
|
|
43
|
+
let {
|
|
44
|
+
output
|
|
45
|
+
} = _ref3;
|
|
46
|
+
return Object.entries(output).flatMap(_ref4 => {
|
|
47
|
+
let [ns, nsClaims] = _ref4;
|
|
48
|
+
return Object.keys(nsClaims).map(claimName => ({
|
|
49
|
+
namespace: ns,
|
|
50
|
+
name: claimName,
|
|
51
|
+
value: nsClaims[claimName]
|
|
52
|
+
}));
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Build a presentation frame from the requested claims for selective disclosure.
|
|
58
|
+
* @param requestedClaims Claims in {@link EvaluatedDisclosure} format
|
|
59
|
+
* @param docType mdoc doctype
|
|
60
|
+
* @returns A presentation frame for ISO18013
|
|
61
|
+
* @example { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": { first_name: true } } }
|
|
62
|
+
*/
|
|
63
|
+
export const getPresentationFrameFromClaims = (requestedClaims, docType) => ({
|
|
64
|
+
[docType]: requestedClaims.reduce((acc, _ref5) => {
|
|
65
|
+
let {
|
|
66
|
+
name,
|
|
67
|
+
namespace
|
|
68
|
+
} = _ref5;
|
|
69
|
+
if (namespace) {
|
|
70
|
+
acc[namespace] ??= {};
|
|
71
|
+
const existingNamespace = acc[namespace];
|
|
72
|
+
existingNamespace[name] = true;
|
|
73
|
+
} else {
|
|
74
|
+
acc[name] = true;
|
|
75
|
+
}
|
|
76
|
+
return acc;
|
|
77
|
+
}, {})
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=utils.mdoc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CBOR","b64utob64","getValidDcqlClaims","mapCredentialsToObj","credentialsMdoc","Promise","all","map","credential","issuerSigned","decodeIssuerSigned","namespaces","Object","entries","nameSpaces","reduce","acc","_ref","ns","nsClaims","flattenNsClaims","ac","_ref2","el","elementIdentifier","elementValue","credential_format","doctype","issuerAuth","payload","docType","cryptographic_holder_binding","original_credential","getClaimsFromDcqlMatch","match","flatMap","_ref3","output","_ref4","keys","claimName","namespace","name","value","getPresentationFrameFromClaims","requestedClaims","_ref5","existingNamespace"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.3.3/utils.mdoc.ts"],"mappings":"AAAA,SAASA,IAAI,QAAQ,kCAAkC;AACvD,SAASC,SAAS,QAAQ,WAAW;AAOrC,SAASC,kBAAkB,QAAQ,sBAAsB;AAMzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,MACjCC,eAAkC,IACM;EACxC,OAAO,MAAMC,OAAO,CAACC,GAAG,CACtBF,eAAe,CAACG,GAAG,CAAC,MAAOC,UAAU,IAAK;IACxC,MAAMC,YAAY,GAAG,MAAMT,IAAI,CAACU,kBAAkB,CAChDT,SAAS,CAACO,UAAU,CAAC,CAAC,CAAC,CACzB,CAAC;IAED,MAAMG,UAAU,GAAGC,MAAM,CAACC,OAAO,CAACJ,YAAY,CAACK,UAAU,CAAC,CAACC,MAAM,CAC/D,CAACC,GAAG,EAAAC,IAAA,KAAqB;MAAA,IAAnB,CAACC,EAAE,EAAEC,QAAQ,CAAC,GAAAF,IAAA;MAClB,MAAMG,eAAe,GAAGR,MAAM,CAACC,OAAO,CAACM,QAAQ,CAAC,CAACJ,MAAM,CACrD,CAACM,EAAE,EAAAC,KAAA;QAAA,IAAE,GAAGC,EAAE,CAAC,GAAAD,KAAA;QAAA,OAAM;UACf,GAAGD,EAAE;UACL,CAACE,EAAE,CAACC,iBAAiB,GAAGD,EAAE,CAACE;QAC7B,CAAC;MAAA,CAAC,EACF,CAAC,CACH,CAAC;MAED,OAAO;QACL,GAAGT,GAAG;QACN,CAACE,EAAE,GAAGE;MACR,CAAC;IACH,CAAC,EACD,CAAC,CACH,CAAC;IAED,OAAO;MACLM,iBAAiB,EAAE,UAAU;MAC7BC,OAAO,EAAElB,YAAY,CAACmB,UAAU,CAACC,OAAO,CAACC,OAAO,IAAI,iBAAiB;MACrEC,4BAA4B,EAAE,IAAI;MAClCpB,UAAU;MACVqB,mBAAmB,EAAExB;IACvB,CAAC;EACH,CAAC,CACH,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMyB,sBAAsB,GACjCC,KAAsC,IAEtChC,kBAAkB,CAACgC,KAAK,CAAC,CAACC,OAAO,CAACC,KAAA;EAAA,IAAC;IAAEC;EAAO,CAAC,GAAAD,KAAA;EAAA,OAC3CxB,MAAM,CAACC,OAAO,CAACwB,MAAM,CAAC,CAACF,OAAO,CAACG,KAAA;IAAA,IAAC,CAACpB,EAAE,EAAEC,QAAQ,CAAC,GAAAmB,KAAA;IAAA,OAC5C1B,MAAM,CAAC2B,IAAI,CAACpB,QAAQ,CAAC,CAACZ,GAAG,CAAEiC,SAAS,KAAM;MACxCC,SAAS,EAAEvB,EAAE;MACbwB,IAAI,EAAEF,SAAS;MACfG,KAAK,EAAExB,QAAQ,CAACqB,SAAS;IAC3B,CAAC,CAAC,CAAC;EAAA,CACL,CAAC;AAAA,CACH,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,8BAA8B,GAAGA,CAC5CC,eAAsC,EACtCf,OAAe,MACQ;EACvB,CAACA,OAAO,GAAGe,eAAe,CAAC9B,MAAM,CAAC,CAACC,GAAG,EAAA8B,KAAA,KAA0B;IAAA,IAAxB;MAAEJ,IAAI;MAAED;IAAU,CAAC,GAAAK,KAAA;IACzD,IAAIL,SAAS,EAAE;MACbzB,GAAG,CAACyB,SAAS,CAAC,KAAK,CAAC,CAAC;MACrB,MAAMM,iBAAiB,GAAG/B,GAAG,CAACyB,SAAS,CAA4B;MACnEM,iBAAiB,CAACL,IAAI,CAAC,GAAG,IAAI;IAChC,CAAC,MAAM;MACL1B,GAAG,CAAC0B,IAAI,CAAC,GAAG,IAAI;IAClB;IACA,OAAO1B,GAAG;EACZ,CAAC,EAAE,CAAC,CAAsB;AAC5B,CAAC,CAAC"}
|
|
@@ -1,22 +1,40 @@
|
|
|
1
|
-
# Credential Status
|
|
1
|
+
# Credential Status
|
|
2
2
|
|
|
3
|
-
This flow is used to obtain
|
|
3
|
+
This flow is used to obtain the credential status from its credential issuer. The following methods are currently supported:
|
|
4
|
+
- Status Assertion (v1.0.0)
|
|
5
|
+
- Token Status List (v1.3.3)
|
|
6
|
+
|
|
7
|
+
Each step in the flow is imported from the related file which is named with a sequential number.
|
|
8
|
+
|
|
9
|
+
#### Status assertion
|
|
4
10
|
The credential status assertion is a JWT which contains the credential status which indicates if the credential is valid or not (see [OAuth Status Assertions](https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/credential-revocation.html#oauth-status-assertions)).
|
|
5
11
|
The status assertion is supposed to be stored securely along with the credential. It has a limited lifetime and should be refreshed periodically according to the `exp` field in the JWT payload.
|
|
6
12
|
|
|
13
|
+
#### Status list
|
|
14
|
+
The status list is a byte array embedded in a JWT/CWT, where a sequence of bits is used to represent the status of a digital credential. Each credential references the status list it is part of and the index to access its status. The following is an example for a SD-JWT credential:
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"status": {
|
|
18
|
+
"status_list": {
|
|
19
|
+
"idx": 1000,
|
|
20
|
+
"uri": "https://status-list.issuer.example"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
7
26
|
## Sequence Diagram
|
|
8
27
|
|
|
9
28
|
```mermaid
|
|
10
29
|
graph TD;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
0[getStatusAssertion]
|
|
31
|
+
1[verifyAndParseStatusAssertion]
|
|
32
|
+
2[getStatusList]
|
|
33
|
+
3[verifyAndParseStatusList]
|
|
34
|
+
0 --> 1
|
|
35
|
+
2 --> 3
|
|
17
36
|
```
|
|
18
37
|
|
|
19
|
-
|
|
20
38
|
## Mapped results
|
|
21
39
|
|
|
22
40
|
The following errors are mapped to a `IssuerResponseError` with specific codes.
|
|
@@ -27,23 +45,30 @@ The following errors are mapped to a `IssuerResponseError` with specific codes.
|
|
|
27
45
|
|
|
28
46
|
## Example
|
|
29
47
|
|
|
48
|
+
The status assertion and list APIs are exposed under the namespaces `statusAssertion` and `statusList` respectively, and before using them it necessary to ensure they are supported:
|
|
49
|
+
```ts
|
|
50
|
+
if (CredentialStatus.statusAssertion.isSupported) {
|
|
51
|
+
// Safely invoke status assertion APIs...
|
|
52
|
+
}
|
|
53
|
+
if (CredentialStatus.statusList.isSupported) {
|
|
54
|
+
// Safely invoke status list APIs...
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
30
58
|
<details>
|
|
31
59
|
<summary>Credential status assertion flow</summary>
|
|
32
60
|
|
|
33
61
|
```ts
|
|
34
|
-
|
|
35
|
-
const credentialIssuerUrl = "https://issuer.example.com";
|
|
36
|
-
const startFlow: Credential.Status.StartFlow = () => ({
|
|
37
|
-
issuerUrl: credentialIssuerUrl, // Let's assum
|
|
38
|
-
});
|
|
62
|
+
import { IoWallet } from "@pagopa/io-react-native-wallet";
|
|
39
63
|
|
|
40
|
-
const {
|
|
64
|
+
const wallet = new IoWallet({ version: "1.0.0" });
|
|
65
|
+
|
|
66
|
+
const credentialIssuerUrl = "https://issuer.example.com";
|
|
41
67
|
|
|
42
|
-
|
|
43
|
-
const { issuerConf } = await Credential.Status.evaluateIssuerTrust(issuerUrl);
|
|
68
|
+
const { issuerConf } = await wallet.CredentialIssuance.evaluateIssuerTrust(credentialIssuerUrl);
|
|
44
69
|
|
|
45
70
|
// Get the credential assertion
|
|
46
|
-
const res = await
|
|
71
|
+
const res = await wallet.CredentialStatus.statusAssertion.get(
|
|
47
72
|
issuerConf,
|
|
48
73
|
credential,
|
|
49
74
|
format,
|
|
@@ -52,7 +77,7 @@ const res = await Credential.Status.statusAssertion(
|
|
|
52
77
|
|
|
53
78
|
// Verify and parse the status assertion
|
|
54
79
|
const { parsedStatusAssertion } =
|
|
55
|
-
await
|
|
80
|
+
await wallet.CredentialStatus.statusAssertion.verifyAndParse(
|
|
56
81
|
issuerConf,
|
|
57
82
|
res.statusAssertion,
|
|
58
83
|
credential,
|
|
@@ -66,3 +91,36 @@ return {
|
|
|
66
91
|
```
|
|
67
92
|
|
|
68
93
|
</details>
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary>Credential status list flow</summary>
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import { IoWallet } from "@pagopa/io-react-native-wallet";
|
|
100
|
+
|
|
101
|
+
const wallet = new IoWallet({ version: "1.3.3" });
|
|
102
|
+
|
|
103
|
+
const credentialIssuerUrl = "https://issuer.example.com";
|
|
104
|
+
|
|
105
|
+
const { issuerConf } = await wallet.CredentialIssuance.evaluateIssuerTrust(credentialIssuerUrl);
|
|
106
|
+
|
|
107
|
+
// Get the status list
|
|
108
|
+
const res = await wallet.CredentialStatus.statusList.get(
|
|
109
|
+
credential,
|
|
110
|
+
format,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
// Verify and parse the status list response to get the credential status
|
|
114
|
+
const { status } =
|
|
115
|
+
await wallet.CredentialStatus.statusList.verifyAndParse(
|
|
116
|
+
issuerConf,
|
|
117
|
+
res
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
statusList: res.statusList,
|
|
122
|
+
status,
|
|
123
|
+
};
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</details>
|