@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 @@
|
|
|
1
|
+
{"version":3,"names":["_entities","require","_types","_mappers","_utils","fetchAndParseCatalogue","trustAnchorBaseUrl","appFetch","fetch","arguments","length","undefined","trustAnchorConfig","getTrustAnchorEntityConfiguration","trustAnchorJwks","payload","jwks","keys","discovery","fetchRegistry","sub","schema","RegistryDiscoveryJwt","endpoints","registries","Promise","all","credential_catalog","DigitalCredentialsCatalogueJwt","authentic_sources","AuthenticSourceRegistry","asJson","schema_registry","SchemaRegistry","mapToCredentialsCatalogue","exports"],"sourceRoot":"../../../../src","sources":["credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AATiF;;AAW1E,MAAMI,sBAAqD,GAAG,eAAAA,CACnEC,kBAAkB,EAEf;EAAA,IADH;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEzB,MAAMG,iBAAiB,GAAG,MAAM,IAAAC,2CAAiC,EAC/DP,kBAAkB,EAClB;IAAEC;EAAS,CACb,CAAC;EACD,MAAMO,eAAe,GAAGF,iBAAiB,CAACG,OAAO,CAACC,IAAI,CAACC,IAAI;EAE3D,MAAMC,SAAS,GAAG,MAAM,IAAAC,oBAAa,EAClC,GAAEP,iBAAiB,CAACG,OAAO,CAACK,GAAI,iCAAgC,EACjE;IACEC,MAAM,EAAEC,2BAAoB;IAC5BN,IAAI,EAAEF,eAAe;IACrBP;EACF,CACF,CAAC;EACD,MAAM;IAAEgB;EAAU,CAAC,GAAGL,SAAS,CAACH,OAAO;;EAEvC;EACA,MAAMS,UAAU,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACnC,IAAAP,oBAAa,EAACI,SAAS,CAACI,kBAAkB,EAAE;IAC1CN,MAAM,EAAEO,qCAA8B;IACtCZ,IAAI,EAAEF,eAAe;IACrBP;EACF,CAAC,CAAC,EACF,IAAAY,oBAAa,EAACI,SAAS,CAACM,iBAAiB,EAAE;IACzCR,MAAM,EAAES,8BAAuB;IAC/BC,MAAM,EAAE,IAAI;IACZxB;EACF,CAAC,CAAC,EACF,IAAAY,oBAAa,EAACI,SAAS,CAACS,eAAe,EAAE;IACvCX,MAAM,EAAEY,qBAAc;IACtBF,MAAM,EAAE,IAAI;IACZxB;EACF,CAAC,CAAC,CACH,CAAC;EAEF,OAAO,IAAA2B,kCAAyB,EAAC,CAAChB,SAAS,EAAE,GAAGM,UAAU,CAAC,CAAC;AAC9D,CAAC;AAACW,OAAA,CAAA9B,sBAAA,GAAAA,sBAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CredentialsCatalogue = void 0;
|
|
7
|
+
var _fetchAndParseCatalogue = require("./fetch-and-parse-catalogue");
|
|
8
|
+
const CredentialsCatalogue = {
|
|
9
|
+
fetchAndParseCatalogue: _fetchAndParseCatalogue.fetchAndParseCatalogue
|
|
10
|
+
};
|
|
11
|
+
exports.CredentialsCatalogue = CredentialsCatalogue;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_fetchAndParseCatalogue","require","CredentialsCatalogue","fetchAndParseCatalogue","exports"],"sourceRoot":"../../../../src","sources":["credentials-catalogue/v1.3.3/index.ts"],"mappings":";;;;;;AACA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,oBAA6C,GAAG;EAC3DC,sBAAsB,EAAtBA;AACF,CAAC;AAACC,OAAA,CAAAF,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mapToCredentialsCatalogue = void 0;
|
|
7
|
+
var _misc = require("../../utils/misc");
|
|
8
|
+
var _object = require("../../utils/object");
|
|
9
|
+
var _mappers = require("../../utils/mappers");
|
|
10
|
+
var _DigitalCredentialsCatalogue = require("../api/DigitalCredentialsCatalogue");
|
|
11
|
+
const mapToCredentialsCatalogue = (0, _mappers.createMapper)(_ref => {
|
|
12
|
+
let [discoveryJwt, catalogueJwt, authSourceRegistry, schemaRegistry] = _ref;
|
|
13
|
+
const authSourcesById = (0, _object.keyBy)(authSourceRegistry.authentic_sources, "entity_id");
|
|
14
|
+
const schemasByCredentialType = (0, _object.groupBy)(schemaRegistry.schemas, "credential_type");
|
|
15
|
+
const resolveAuthSource = _ref2 => {
|
|
16
|
+
let {
|
|
17
|
+
id
|
|
18
|
+
} = _ref2;
|
|
19
|
+
const as = authSourcesById.get(id);
|
|
20
|
+
(0, _misc.assert)(as, `AS ${id} must be present in the Authentic Source Registry`);
|
|
21
|
+
const {
|
|
22
|
+
ipa_code,
|
|
23
|
+
...rest
|
|
24
|
+
} = as.organization_info;
|
|
25
|
+
return {
|
|
26
|
+
id,
|
|
27
|
+
organization_code: ipa_code,
|
|
28
|
+
...rest
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const resolveFormats = credentialType => {
|
|
32
|
+
const schemas = schemasByCredentialType.get(credentialType);
|
|
33
|
+
(0, _misc.assert)(schemas, `Schemas for ${credentialType} must be present in the Schema Registry`);
|
|
34
|
+
return schemas.map(schema => ({
|
|
35
|
+
configuration_id: schema.id,
|
|
36
|
+
// TODO: [SIW-3978] Does schema ID corresponds to configuration_id?
|
|
37
|
+
...schema
|
|
38
|
+
}));
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
...catalogueJwt.payload,
|
|
42
|
+
taxonomy_uri: discoveryJwt.payload.endpoints.taxonomy,
|
|
43
|
+
credentials: catalogueJwt.payload.credentials.map(_ref3 => {
|
|
44
|
+
let {
|
|
45
|
+
authentic_sources,
|
|
46
|
+
credential_name,
|
|
47
|
+
...credential
|
|
48
|
+
} = _ref3;
|
|
49
|
+
return {
|
|
50
|
+
name: credential_name,
|
|
51
|
+
formats: resolveFormats(credential.credential_type),
|
|
52
|
+
authentic_sources: authentic_sources.map(resolveAuthSource),
|
|
53
|
+
...credential
|
|
54
|
+
};
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
}, {
|
|
58
|
+
outputSchema: _DigitalCredentialsCatalogue.DigitalCredentialsCatalogue
|
|
59
|
+
});
|
|
60
|
+
exports.mapToCredentialsCatalogue = mapToCredentialsCatalogue;
|
|
61
|
+
//# sourceMappingURL=mappers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_misc","require","_object","_mappers","_DigitalCredentialsCatalogue","mapToCredentialsCatalogue","createMapper","_ref","discoveryJwt","catalogueJwt","authSourceRegistry","schemaRegistry","authSourcesById","keyBy","authentic_sources","schemasByCredentialType","groupBy","schemas","resolveAuthSource","_ref2","id","as","get","assert","ipa_code","rest","organization_info","organization_code","resolveFormats","credentialType","map","schema","configuration_id","payload","taxonomy_uri","endpoints","taxonomy","credentials","_ref3","credential_name","credential","name","formats","credential_type","outputSchema","DigitalCredentialsCatalogue","exports"],"sourceRoot":"../../../../src","sources":["credentials-catalogue/v1.3.3/mappers.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAH,OAAA;AAYO,MAAMI,yBAAyB,GAAG,IAAAC,qBAAY,EASnDC,IAAA,IAAsE;EAAA,IAArE,CAACC,YAA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AEF,eAAe;QACrBG,OAAO,EAAEd,cAAc,CAACY,UAAU,CAACG,eAAe,CAAC;QACnD7B,iBAAiB,EAAEA,iBAAiB,CAACgB,GAAG,CAACZ,iBAAiB,CAAC;QAC3D,GAAGsB;MACL,CAAC;IAAA,CACH;EACF,CAAC;AACH,CAAC,EACD;EACEI,YAAY,EAAEC;AAChB,CACF,CAAC;AAACC,OAAA,CAAAzC,yBAAA,GAAAA,yBAAA"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SchemaRegistry = exports.Schema = exports.RegistryDiscoveryJwt = exports.DigitalCredentialsCatalogueJwt = exports.DigitalCredential = exports.AuthenticSourceRegistry = exports.AuthenticSource = void 0;
|
|
7
|
+
var z = _interopRequireWildcard(require("zod"));
|
|
8
|
+
var _zod2 = require("../../utils/zod");
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
const ASDataCapability = z.object({
|
|
12
|
+
dataset_id: z.string(),
|
|
13
|
+
domains: z.array(z.string()),
|
|
14
|
+
intended_purposes: z.array(z.string()),
|
|
15
|
+
available_claims: z.array(z.object({
|
|
16
|
+
claim_name: z.string(),
|
|
17
|
+
order: z.number(),
|
|
18
|
+
mandatory: z.boolean()
|
|
19
|
+
})),
|
|
20
|
+
user_information: z.string().optional()
|
|
21
|
+
});
|
|
22
|
+
const AuthenticSource = z.object({
|
|
23
|
+
entity_id: z.string(),
|
|
24
|
+
organization_info: z.object({
|
|
25
|
+
organization_name: z.string(),
|
|
26
|
+
organization_type: z.string(),
|
|
27
|
+
organization_country: z.string(),
|
|
28
|
+
ipa_code: z.string().optional(),
|
|
29
|
+
contacts: z.array(z.string()).optional(),
|
|
30
|
+
homepage_uri: z.string().optional(),
|
|
31
|
+
logo_uri: z.string().optional(),
|
|
32
|
+
policy_uri: z.string().optional()
|
|
33
|
+
}),
|
|
34
|
+
data_capabilities: z.array(ASDataCapability)
|
|
35
|
+
});
|
|
36
|
+
exports.AuthenticSource = AuthenticSource;
|
|
37
|
+
const Schema = z.object({
|
|
38
|
+
id: z.string(),
|
|
39
|
+
version: z.string(),
|
|
40
|
+
credential_type: z.string(),
|
|
41
|
+
format: z.enum(["dc+sd-jwt", "mso_mdoc"]),
|
|
42
|
+
docType: z.string().optional(),
|
|
43
|
+
vct: z.string().optional(),
|
|
44
|
+
schema_uri: z.string(),
|
|
45
|
+
"schema_uri#integrity": z.string(),
|
|
46
|
+
description: z.string().optional()
|
|
47
|
+
});
|
|
48
|
+
exports.Schema = Schema;
|
|
49
|
+
const CredentialPurpose = z.object({
|
|
50
|
+
id: z.string(),
|
|
51
|
+
description: z.string(),
|
|
52
|
+
claims_required: z.array(z.string()),
|
|
53
|
+
claim_recommended: z.array(z.string())
|
|
54
|
+
});
|
|
55
|
+
const CredentialIssuer = z.object({
|
|
56
|
+
id: z.string(),
|
|
57
|
+
organization_name: z.string(),
|
|
58
|
+
organization_code: z.string(),
|
|
59
|
+
organization_country: z.string(),
|
|
60
|
+
contacts: z.array(z.string()).optional(),
|
|
61
|
+
homepage_uri: z.string().optional(),
|
|
62
|
+
logo_uri: z.string().optional(),
|
|
63
|
+
policy_uri: z.string().optional(),
|
|
64
|
+
tos_uri: z.string().optional()
|
|
65
|
+
});
|
|
66
|
+
const DigitalCredential = z.object({
|
|
67
|
+
version: z.string(),
|
|
68
|
+
credential_type: z.string(),
|
|
69
|
+
credential_name: z.string(),
|
|
70
|
+
legal_type: z.string(),
|
|
71
|
+
description: z.string(),
|
|
72
|
+
validity_info: z.object({
|
|
73
|
+
max_validity_days: z.number(),
|
|
74
|
+
status_methods: z.array(z.string()),
|
|
75
|
+
allowed_states: z.array(z.string())
|
|
76
|
+
}),
|
|
77
|
+
authentication: z.object({
|
|
78
|
+
user_auth_required: z.boolean(),
|
|
79
|
+
min_loa: z.string(),
|
|
80
|
+
supported_eid_schemes: z.array(z.string())
|
|
81
|
+
}),
|
|
82
|
+
purposes: z.array(CredentialPurpose),
|
|
83
|
+
issuers: z.array(CredentialIssuer),
|
|
84
|
+
authentic_sources: z.array(z.object({
|
|
85
|
+
id: z.string(),
|
|
86
|
+
dataset_id: z.string()
|
|
87
|
+
}))
|
|
88
|
+
});
|
|
89
|
+
exports.DigitalCredential = DigitalCredential;
|
|
90
|
+
const JwtHeader = z.object({
|
|
91
|
+
typ: z.string(),
|
|
92
|
+
alg: z.string(),
|
|
93
|
+
kid: z.string(),
|
|
94
|
+
x5c: z.array(z.string()).optional()
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Schema registry, available at a dedicated endpoint.
|
|
99
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#schema-registry
|
|
100
|
+
*/
|
|
101
|
+
const SchemaRegistry = z.object({
|
|
102
|
+
version: z.string(),
|
|
103
|
+
last_modified: z.string(),
|
|
104
|
+
schemas: z.array(Schema)
|
|
105
|
+
});
|
|
106
|
+
exports.SchemaRegistry = SchemaRegistry;
|
|
107
|
+
/**
|
|
108
|
+
* Authentic Source registry, available at a dedicated endpoint.
|
|
109
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#authentic-source-registry
|
|
110
|
+
*/
|
|
111
|
+
const AuthenticSourceRegistry = z.object({
|
|
112
|
+
version: z.string(),
|
|
113
|
+
last_modified: z.string(),
|
|
114
|
+
authentic_sources: z.array(AuthenticSource)
|
|
115
|
+
});
|
|
116
|
+
exports.AuthenticSourceRegistry = AuthenticSourceRegistry;
|
|
117
|
+
/**
|
|
118
|
+
* The Digital Credentials Catalogue published by the Trust Anchor.
|
|
119
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#digital-credentials-catalog
|
|
120
|
+
*/
|
|
121
|
+
const DigitalCredentialsCatalogueJwt = z.object({
|
|
122
|
+
header: JwtHeader,
|
|
123
|
+
payload: z.object({
|
|
124
|
+
version: z.string(),
|
|
125
|
+
last_modified: z.string(),
|
|
126
|
+
credentials: z.array(DigitalCredential),
|
|
127
|
+
iat: _zod2.UnixTime,
|
|
128
|
+
exp: _zod2.UnixTime
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
exports.DigitalCredentialsCatalogueJwt = DigitalCredentialsCatalogueJwt;
|
|
132
|
+
/**
|
|
133
|
+
* Registry discovery info, used to discover all the Registry Infrastructure endpoints.
|
|
134
|
+
* This is the entrypoint to build the full catalogue.
|
|
135
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#registry-discovery-endpoint
|
|
136
|
+
*/
|
|
137
|
+
const RegistryDiscoveryJwt = z.object({
|
|
138
|
+
header: JwtHeader,
|
|
139
|
+
payload: z.object({
|
|
140
|
+
registry_version: z.string(),
|
|
141
|
+
last_updated: z.string(),
|
|
142
|
+
endpoints: z.object({
|
|
143
|
+
claims_registry: z.string(),
|
|
144
|
+
authentic_sources: z.string(),
|
|
145
|
+
credential_catalog: z.string(),
|
|
146
|
+
taxonomy: z.string(),
|
|
147
|
+
schema_registry: z.string(),
|
|
148
|
+
federation_list: z.string(),
|
|
149
|
+
federation_fetch: z.string(),
|
|
150
|
+
federation_resolve: z.string(),
|
|
151
|
+
federation_trust_mark_status: z.string()
|
|
152
|
+
})
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
exports.RegistryDiscoveryJwt = RegistryDiscoveryJwt;
|
|
156
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["z","_interopRequireWildcard","require","_zod2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ASDataCapability","object","dataset_id","string","domains","array","intended_purposes","available_claims","claim_name","order","number","mandatory","boolean","user_information","optional","AuthenticSource","entity_id","organization_info","organization_name","organization_type","organization_country","ipa_code","contacts","homepage_uri","logo_uri","policy_uri","data_capabilities","exports","Schema","id","version","credential_type","format","enum","docType","vct","schema_uri","description","CredentialPurpose","claims_required","claim_recommended","CredentialIssuer","organization_code","tos_uri","DigitalCredential","credential_name","legal_type","validity_info","max_validity_days","status_methods","allowed_states","authentication","user_auth_required","min_loa","supported_eid_schemes","purposes","issuers","authentic_sources","JwtHeader","typ","alg","kid","x5c","SchemaRegistry","last_modified","schemas","AuthenticSourceRegistry","DigitalCredentialsCatalogueJwt","header","payload","credentials","iat","UnixTime","exp","RegistryDiscoveryJwt","registry_version","last_updated","endpoints","claims_registry","credential_catalog","taxonomy","schema_registry","federation_list","federation_fetch","federation_resolve","federation_trust_mark_status"],"sourceRoot":"../../../../src","sources":["credentials-catalogue/v1.3.3/types.ts"],"mappings":";;;;;;AAAA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAA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AAC;IACxB0E,SAAS,EAAEvG,CAAC,CAAC2B,MAAM,CAAC;MAClB6E,eAAe,EAAExG,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC3BsD,iBAAiB,EAAEnF,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC7B4E,kBAAkB,EAAEzG,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC9B6E,QAAQ,EAAE1G,CAAC,CAAC6B,MAAM,CAAC,CAAC;MACpB8E,eAAe,EAAE3G,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC3B+E,eAAe,EAAE5G,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC3BgF,gBAAgB,EAAE7G,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC5BiF,kBAAkB,EAAE9G,CAAC,CAAC6B,MAAM,CAAC,CAAC;MAC9BkF,4BAA4B,EAAE/G,CAAC,CAAC6B,MAAM,CAAC;IACzC,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAACwB,OAAA,CAAA+C,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fetchRegistry = void 0;
|
|
7
|
+
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
|
8
|
+
var _misc = require("../../utils/misc");
|
|
9
|
+
var _errors = require("../../utils/errors");
|
|
10
|
+
/**
|
|
11
|
+
* Utility to fetch an entity from the Registry Infrastructure.
|
|
12
|
+
* The function supports both `application/json` and `application/jwt` responses.
|
|
13
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html
|
|
14
|
+
*
|
|
15
|
+
* @param url The url to fetch from
|
|
16
|
+
* @param params.schema The Zod schema to validate the response
|
|
17
|
+
* @param params.jwks JWKS to validate JWT signature
|
|
18
|
+
* @param params.appFetch Custom fetch implementation
|
|
19
|
+
* @param params.asJson Request a response in simple JSON format (no JWT)
|
|
20
|
+
* @returns The parsed entity
|
|
21
|
+
*/
|
|
22
|
+
const fetchRegistry = async (url, params) => {
|
|
23
|
+
const {
|
|
24
|
+
schema,
|
|
25
|
+
appFetch = fetch,
|
|
26
|
+
asJson = false
|
|
27
|
+
} = params;
|
|
28
|
+
const response = await appFetch(url, {
|
|
29
|
+
method: "GET",
|
|
30
|
+
headers: {
|
|
31
|
+
Accept: asJson ? "application/json" : "application/jwt"
|
|
32
|
+
}
|
|
33
|
+
}).then((0, _misc.hasStatusOrThrow)(200));
|
|
34
|
+
const contentType = response.headers.get("Content-Type");
|
|
35
|
+
if (contentType !== null && contentType !== void 0 && contentType.includes("application/json")) {
|
|
36
|
+
const responseJson = await response.json();
|
|
37
|
+
return schema.parse(responseJson);
|
|
38
|
+
}
|
|
39
|
+
if (contentType !== null && contentType !== void 0 && contentType.includes("application/jwt")) {
|
|
40
|
+
(0, _misc.assert)("jwks" in params, "params.jwks required when response is JWT");
|
|
41
|
+
const responseText = await response.text();
|
|
42
|
+
const responseJwt = (0, _ioReactNativeJwt.decode)(responseText);
|
|
43
|
+
const headerKid = responseJwt.protectedHeader.kid;
|
|
44
|
+
const signatureJwk = params.jwks.find(jwk => jwk.kid === headerKid);
|
|
45
|
+
if (!signatureJwk) {
|
|
46
|
+
throw new _errors.IoWalletError(`Could not find JWK with kid ${headerKid} in Trust Anchor's Entity Configuration`);
|
|
47
|
+
}
|
|
48
|
+
await (0, _ioReactNativeJwt.verify)(responseText, signatureJwk);
|
|
49
|
+
return schema.parse({
|
|
50
|
+
header: responseJwt.protectedHeader,
|
|
51
|
+
payload: responseJwt.payload
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
throw new _errors.IoWalletError(`Unsupported content-type: ${contentType}`);
|
|
55
|
+
};
|
|
56
|
+
exports.fetchRegistry = fetchRegistry;
|
|
57
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","fetchRegistry","url","params","schema","appFetch","fetch","asJson","response","method","headers","Accept","then","hasStatusOrThrow","contentType","get","includes","responseJson","json","parse","assert","responseText","text","responseJwt","decodeJwt","headerKid","protectedHeader","kid","signatureJwk","jwks","find","jwk","IoWalletError","verify","header","payload","exports"],"sourceRoot":"../../../../src","sources":["credentials-catalogue/v1.3.3/utils.ts"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,aAAa,GAAG,MAAAA,CAC3BC,GAAW,EACXC,MAA8B,KACf;EACf,MAAM;IAAEC,MAAM;IAAEC,QAAQ,GAAGC,KAAK;IAAEC,MAAM,GAAG;EAAM,CAAC,GAAGJ,MAAM;EAE3D,MAAMK,QAAQ,GAAG,MAAMH,QAAQ,CAACH,GAAG,EAAE;IACnCO,MAAM,EAAE,KAAK;IACbC,OAAO,EAAE;MACPC,MAAM,EAAEJ,MAAM,GAAG,kBAAkB,GAAG;IACxC;EACF,CAAC,CAAC,CAACK,IAAI,CAAC,IAAAC,sBAAgB,EAAC,GAAG,CAAC,CAAC;EAE9B,MAAMC,WAAW,GAAGN,QAAQ,CAACE,OAAO,CAACK,GAAG,CAAC,cAAc,CAAC;EAExD,IAAID,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEE,QAAQ,CAAC,kBAAkB,CAAC,EAAE;IAC7C,MAAMC,YAAY,GAAG,MAAMT,QAAQ,CAACU,IAAI,CAAC,CAAC;IAC1C,OAAOd,MAAM,CAACe,KAAK,CAACF,YAAY,CAAC;EACnC;EAEA,IAAIH,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEE,QAAQ,CAAC,iBAAiB,CAAC,EAAE;IAC5C,IAAAI,YAAM,EAAC,MAAM,IAAIjB,MAAM,EAAE,2CAA2C,CAAC;IAErE,MAAMkB,YAAY,GAAG,MAAMb,QAAQ,CAACc,IAAI,CAAC,CAAC;IAC1C,MAAMC,WAAW,GAAG,IAAAC,wBAAS,EAACH,YAAY,CAAC;IAC3C,MAAMI,SAAS,GAAGF,WAAW,CAACG,eAAe,CAACC,GAAG;IACjD,MAAMC,YAAY,GAAGzB,MAAM,CAAC0B,IAAI,CAACC,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACJ,GAAG,KAAKF,SAAS,CAAC;IACrE,IAAI,CAACG,YAAY,EAAE;MACjB,MAAM,IAAII,qBAAa,CACpB,+BAA8BP,SAAU,yCAC3C,CAAC;IACH;IACA,MAAM,IAAAQ,wBAAM,EAACZ,YAAY,EAAEO,YAAY,CAAC;IACxC,OAAOxB,MAAM,CAACe,KAAK,CAAC;MAClBe,MAAM,EAAEX,WAAW,CAACG,eAAe;MACnCS,OAAO,EAAEZ,WAAW,CAACY;IACvB,CAAC,CAAC;EACJ;EAEA,MAAM,IAAIH,qBAAa,CAAE,6BAA4BlB,WAAY,EAAC,CAAC;AACrE,CAAC;AAACsB,OAAA,CAAAnC,aAAA,GAAAA,aAAA"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -15,7 +15,14 @@ Object.defineProperty(exports, "AuthorizationDetails", {
|
|
|
15
15
|
return _par.AuthorizationDetails;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
exports.
|
|
18
|
+
exports.Errors = exports.CredentialsCatalogue = exports.CredentialStatus = exports.CredentialOffer = exports.CredentialIssuance = void 0;
|
|
19
|
+
Object.defineProperty(exports, "IoWallet", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _IoWallet.IoWallet;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.WalletInstanceAttestation = exports.WalletInstance = exports.Trustmark = exports.Trust = exports.SdJwt = exports.RemotePresentation = exports.Mdoc = exports.Logging = void 0;
|
|
19
26
|
Object.defineProperty(exports, "createCryptoContextFor", {
|
|
20
27
|
enumerable: true,
|
|
21
28
|
get: function () {
|
|
@@ -30,12 +37,20 @@ Object.defineProperty(exports, "fixBase64EncodingOnKey", {
|
|
|
30
37
|
});
|
|
31
38
|
var _jwk = require("./utils/jwk");
|
|
32
39
|
require("react-native-url-polyfill/auto");
|
|
33
|
-
var
|
|
34
|
-
exports.
|
|
40
|
+
var Trust = _interopRequireWildcard(require("./trust"));
|
|
41
|
+
exports.Trust = Trust;
|
|
35
42
|
var CredentialsCatalogue = _interopRequireWildcard(require("./credentials-catalogue"));
|
|
36
43
|
exports.CredentialsCatalogue = CredentialsCatalogue;
|
|
37
|
-
var
|
|
38
|
-
exports.
|
|
44
|
+
var CredentialIssuance = _interopRequireWildcard(require("./credential/issuance"));
|
|
45
|
+
exports.CredentialIssuance = CredentialIssuance;
|
|
46
|
+
var CredentialOffer = _interopRequireWildcard(require("./credential/offer"));
|
|
47
|
+
exports.CredentialOffer = CredentialOffer;
|
|
48
|
+
var CredentialStatus = _interopRequireWildcard(require("./credential/status"));
|
|
49
|
+
exports.CredentialStatus = CredentialStatus;
|
|
50
|
+
var RemotePresentation = _interopRequireWildcard(require("./credential/presentation"));
|
|
51
|
+
exports.RemotePresentation = RemotePresentation;
|
|
52
|
+
var Trustmark = _interopRequireWildcard(require("./credential/trustmark"));
|
|
53
|
+
exports.Trustmark = Trustmark;
|
|
39
54
|
var SdJwt = _interopRequireWildcard(require("./sd-jwt"));
|
|
40
55
|
exports.SdJwt = SdJwt;
|
|
41
56
|
var Mdoc = _interopRequireWildcard(require("./mdoc"));
|
|
@@ -44,14 +59,13 @@ var Errors = _interopRequireWildcard(require("./utils/errors"));
|
|
|
44
59
|
exports.Errors = Errors;
|
|
45
60
|
var WalletInstanceAttestation = _interopRequireWildcard(require("./wallet-instance-attestation"));
|
|
46
61
|
exports.WalletInstanceAttestation = WalletInstanceAttestation;
|
|
47
|
-
var Trust = _interopRequireWildcard(require("./trust"));
|
|
48
|
-
exports.Trust = Trust;
|
|
49
62
|
var WalletInstance = _interopRequireWildcard(require("./wallet-instance"));
|
|
50
63
|
exports.WalletInstance = WalletInstance;
|
|
51
64
|
var Logging = _interopRequireWildcard(require("./utils/logging"));
|
|
52
65
|
exports.Logging = Logging;
|
|
53
66
|
var _par = require("./utils/par");
|
|
54
67
|
var _crypto = require("./utils/crypto");
|
|
68
|
+
var _IoWallet = require("./IoWallet");
|
|
55
69
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
56
70
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
57
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_jwk","require","
|
|
1
|
+
{"version":3,"names":["_jwk","require","Trust","_interopRequireWildcard","exports","CredentialsCatalogue","CredentialIssuance","CredentialOffer","CredentialStatus","RemotePresentation","Trustmark","SdJwt","Mdoc","Errors","WalletInstanceAttestation","WalletInstance","Logging","_par","_crypto","_IoWallet","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AAGAA,OAAA;AAEA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAiCG,OAAA,CAAAF,KAAA,GAAAA,KAAA;AACjC,IAAAG,oBAAA,GAAAF,uBAAA,CAAAF,OAAA;AAAgEG,OAAA,CAAAC,oBAAA,GAAAA,oBAAA;AAChE,IAAAC,kBAAA,GAAAH,uBAAA,CAAAF,OAAA;AAA4DG,OAAA,CAAAE,kBAAA,GAAAA,kBAAA;AAC5D,IAAAC,eAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAAsDG,OAAA,CAAAG,eAAA,GAAAA,eAAA;AACtD,IAAAC,gBAAA,GAAAL,uBAAA,CAAAF,OAAA;AAAwDG,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AACxD,IAAAC,kBAAA,GAAAN,uBAAA,CAAAF,OAAA;AAAgEG,OAAA,CAAAK,kBAAA,GAAAA,kBAAA;AAChE,IAAAC,SAAA,GAAAP,uBAAA,CAAAF,OAAA;AAAoDG,OAAA,CAAAM,SAAA,GAAAA,SAAA;AACpD,IAAAC,KAAA,GAAAR,uBAAA,CAAAF,OAAA;AAAkCG,OAAA,CAAAO,KAAA,GAAAA,KAAA;AAClC,IAAAC,IAAA,GAAAT,uBAAA,CAAAF,OAAA;AAA+BG,OAAA,CAAAQ,IAAA,GAAAA,IAAA;AAC/B,IAAAC,MAAA,GAAAV,uBAAA,CAAAF,OAAA;AAAyCG,OAAA,CAAAS,MAAA,GAAAA,MAAA;AACzC,IAAAC,yBAAA,GAAAX,uBAAA,CAAAF,OAAA;AAA2EG,OAAA,CAAAU,yBAAA,GAAAA,yBAAA;AAC3E,IAAAC,cAAA,GAAAZ,uB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,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
|
@@ -4,15 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
verify: true
|
|
7
|
+
verify: true,
|
|
8
|
+
prepareVpTokenMdoc: true
|
|
8
9
|
};
|
|
9
|
-
exports.verify = void 0;
|
|
10
|
+
exports.verify = exports.prepareVpTokenMdoc = void 0;
|
|
10
11
|
var _ioReactNativeIso = require("@pagopa/io-react-native-iso18013");
|
|
11
12
|
var _jsrsasign = require("jsrsasign");
|
|
12
13
|
var _ioReactNativeCrypto = require("@pagopa/io-react-native-crypto");
|
|
13
|
-
var _errors = require("../trust/errors");
|
|
14
|
+
var _errors = require("../trust/common/errors");
|
|
14
15
|
var _errors2 = require("../utils/errors");
|
|
15
16
|
var _crypto = require("../utils/crypto");
|
|
17
|
+
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
|
16
18
|
var _utils = require("./utils");
|
|
17
19
|
Object.keys(_utils).forEach(function (key) {
|
|
18
20
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -86,4 +88,21 @@ const verifyMdocSignature = async (coseSign1, cert) => {
|
|
|
86
88
|
const signatureCorrect = await _ioReactNativeIso.COSE.verify(coseSign1, jwk);
|
|
87
89
|
if (!signatureCorrect) throw new Error("Invalid mDoc signature");
|
|
88
90
|
};
|
|
91
|
+
const prepareVpTokenMdoc = async (requestNonce, generatedNonce, clientId, responseUri, docType, keyTag, _ref) => {
|
|
92
|
+
let [verifiableCredential, presentationFrame] = _ref;
|
|
93
|
+
/* verifiableCredential is a IssuerSigned structure */
|
|
94
|
+
const documents = [{
|
|
95
|
+
issuerSignedContent: (0, _jsrsasign.b64utob64)(verifiableCredential),
|
|
96
|
+
alias: keyTag,
|
|
97
|
+
docType
|
|
98
|
+
}];
|
|
99
|
+
|
|
100
|
+
/* clientId,responseUri,requestNonce are retrieved by Auth Request Object */
|
|
101
|
+
/* create DeviceResponse as { documents: { docType, issuerSigned, deviceSigned }, version, status } */
|
|
102
|
+
const vp_token = await _ioReactNativeIso.ISO18013_7.generateOID4VPDeviceResponse(clientId, responseUri, requestNonce, generatedNonce, documents, presentationFrame);
|
|
103
|
+
return {
|
|
104
|
+
vp_token: (0, _ioReactNativeJwt.removePadding)(vp_token)
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
exports.prepareVpTokenMdoc = prepareVpTokenMdoc;
|
|
89
108
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ioReactNativeIso","require","_jsrsasign","_ioReactNativeCrypto","_errors","_errors2","_crypto","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","verify","token","x509CertRoot","_issuerSigned$issuerA","issuerSigned","CBOR","decodeIssuerSigned","IoWalletError","issuerAuth","unprotectedHeader","x5chain","Array","isArray","length","MissingX509CertsError","map","b64utob64","verifyX5chain","coseSign1","rawValue","verifyMdocSignature","options","arguments","undefined","connectTimeout","readTimeout","requireCrl","x509ValidationResult","verifyCertificateChain","isValid","X509ValidationError","validationStatus","errorMessage","x509ValidationStatus","x509ErrorMessage","cert","pemcert","convertBase64DerToPem","jwk","getSigninJwkFromCert","x","y","signatureCorrect","COSE","Error"],"sourceRoot":"../../../src","sources":["mdoc/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_ioReactNativeIso","require","_jsrsasign","_ioReactNativeCrypto","_errors","_errors2","_crypto","_ioReactNativeJwt","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","verify","token","x509CertRoot","_issuerSigned$issuerA","issuerSigned","CBOR","decodeIssuerSigned","IoWalletError","issuerAuth","unprotectedHeader","x5chain","Array","isArray","length","MissingX509CertsError","map","b64utob64","verifyX5chain","coseSign1","rawValue","verifyMdocSignature","options","arguments","undefined","connectTimeout","readTimeout","requireCrl","x509ValidationResult","verifyCertificateChain","isValid","X509ValidationError","validationStatus","errorMessage","x509ValidationStatus","x509ErrorMessage","cert","pemcert","convertBase64DerToPem","jwk","getSigninJwkFromCert","x","y","signatureCorrect","COSE","Error","prepareVpTokenMdoc","requestNonce","generatedNonce","clientId","responseUri","docType","keyTag","_ref","verifiableCredential","presentationFrame","documents","issuerSignedContent","alias","vp_token","ISO18013_7","generateOID4VPDeviceResponse","removePadding"],"sourceRoot":"../../../src","sources":["mdoc/index.ts"],"mappings":";;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAMA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAAQ,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEO,MAAMS,MAAM,GAAG,MAAAA,CACpBC,KAAa,EACbC,YAAoB,KAC6B;EAAA,IAAAC,qBAAA;EACjD;EACA,MAAMC,YAAY,GAAG,MAAMC,sBAAI,CAACC,kBAA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QAAQ,GAAG,MAAMC,4BAAU,CAACC,4BAA4B,CAC5DZ,QAAQ,EACRC,WAAW,EACXH,YAAY,EACZC,cAAc,EACdQ,SAAS,EACTD,iBACF,CAAC;EAED,OAAO;IACLI,QAAQ,EAAE,IAAAG,+BAAa,EAACH,QAAQ;EAClC,CAAC;AACH,CAAC;AAAC9D,OAAA,CAAAiD,kBAAA,GAAAA,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ioReactNativeIso","require","_types","_const","getParsedCredentialClaimKey","namespace","key","exports","getVerificationFromParsedCredential","parsedCredential","_parsedCredential$ver","verificationKey","MDOC_DEFAULT_NAMESPACE","verification","value","Verification","parse","undefined","getVerification","token","_namespace$find","issuerSigned","CBOR","decodeIssuerSigned","nameSpaces","find","x","elementIdentifier","elementValue"],"sourceRoot":"../../../src","sources":["mdoc/utils.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMG,2BAA2B,GAAGA,CAACC,SAAiB,EAAEC,GAAW,KACvE,GAAED,SAAU,IAAGC,GAAI,EAAC;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAC,OAAA,CAAAH,2BAAA,GAAAA,2BAAA;AAQO,MAAMI,mCAAmC,GAC9CC,
|
|
1
|
+
{"version":3,"names":["_ioReactNativeIso","require","_types","_const","getParsedCredentialClaimKey","namespace","key","exports","getVerificationFromParsedCredential","parsedCredential","_parsedCredential$ver","verificationKey","MDOC_DEFAULT_NAMESPACE","verification","value","Verification","parse","undefined","getVerification","token","_namespace$find","issuerSigned","CBOR","decodeIssuerSigned","nameSpaces","find","x","elementIdentifier","elementValue"],"sourceRoot":"../../../src","sources":["mdoc/utils.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,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@@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _types = require("../types");
|
|
4
|
-
describe("SdJwt4VC", () => {
|
|
5
|
-
it("should accept a valid token", () => {
|
|
6
|
-
// example provided at https://italia.github.io/eidas-it-wallet-docs/en/pid-data-model.html
|
|
7
|
-
const token = {
|
|
8
|
-
header: {
|
|
9
|
-
typ: "dc+sd-jwt",
|
|
10
|
-
alg: "RS512",
|
|
11
|
-
kid: "dB67gL7ck3TFiIAf7N6_7SHvqk0MDYMEQcoGGlkUAAw"
|
|
12
|
-
},
|
|
13
|
-
payload: {
|
|
14
|
-
_sd: ["0q1D5Jmav6pQaEh_J_Fcv_uNNMQIgCyhQOxqlY4l3qU", "KCJ-AVNv88d-xj6sUIAOJxFnbUh3rHXDKkIH1lFqbRs", "M9lo9YxDNIXrAq2qWeiCA40zpJ_zYfFdR_4AEALcRtU", "czgjUk0nqRCswShChCjdS6A1-v47d_qTCSFIvIHhMoI", "nGnQr7clm3tfTp8yjL_uHrDSOtzR2PVb8S7GeLdAqBQ", "xNIVwlpSsaZ8CJSf0gz5x_75VRWWc6V1mlpejdCrqUs"],
|
|
15
|
-
sub: "216f8946-9ecb-4819-9309-c076f34a7e11",
|
|
16
|
-
_sd_alg: "sha-256",
|
|
17
|
-
vct: "PersonIdentificationData",
|
|
18
|
-
"vct#integrity": "13e25888ac7b8a3a6d61440da787fccc81654e61085732bcacd89b36aec32675",
|
|
19
|
-
iss: "https://pidprovider.example.com",
|
|
20
|
-
issuing_country: "IT",
|
|
21
|
-
issuing_authority: "Istituto Poligrafico e Zecca dello Stato",
|
|
22
|
-
cnf: {
|
|
23
|
-
jwk: {
|
|
24
|
-
kty: "EC",
|
|
25
|
-
crv: "P-256",
|
|
26
|
-
kid: "zEv_qGSL5r0_F67j2dwEgUJmBgbMNSEJ5K_iH1PYc7A",
|
|
27
|
-
x: "0Pj7v_afNp9ETJx11JbYgkI7yQpd0rtiYuo5feuAN2o",
|
|
28
|
-
y: "XB62Um02vHqedkOzSfJ5hdtjPz-zmV9jmWh4sKgdD9o"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
exp: 1751107255,
|
|
32
|
-
status: {
|
|
33
|
-
status_assertion: {
|
|
34
|
-
credential_hash_alg: "sha-256"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const {
|
|
40
|
-
success
|
|
41
|
-
} = _types.SdJwt4VC.safeParse(token);
|
|
42
|
-
expect(success).toBe(true);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
describe("Disclosure", () => {
|
|
46
|
-
it("should accept a valid disclosure", () => {
|
|
47
|
-
// example provided at https://italia.github.io/eidas-it-wallet-docs/en/pid-data-model.html
|
|
48
|
-
const value = ["2GLC42sKQveCfGfryNRN9w", "evidence", [{
|
|
49
|
-
type: "electronic_record",
|
|
50
|
-
record: {
|
|
51
|
-
type: "eidas.it.cie",
|
|
52
|
-
source: {
|
|
53
|
-
organization_name: "Ministero dell'Interno",
|
|
54
|
-
organization_id: "m_it",
|
|
55
|
-
country_code: "IT"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}]];
|
|
59
|
-
const {
|
|
60
|
-
success
|
|
61
|
-
} = _types.Disclosure.safeParse(value);
|
|
62
|
-
expect(success).toBe(true);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
4
|
describe("Verification.time", () => {
|
|
66
5
|
test.each([["ISO string", "2025-09-09T10:00:00Z"], ["unix seconds", 1752122400], ["unix milliseconds", 1752122400000]])("accepts %s", (_label, time) => {
|
|
67
6
|
const value = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","describe","
|
|
1
|
+
{"version":3,"names":["_types","require","describe","test","each","_label","time","value","trust_framework","assurance_level","evidence","type","attestation","reference_number","date_of_issuance","voucher","organization","expect","Verification","safeParse","success","toBe","it"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/types.test.ts"],"mapp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
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _ = require("..");
|
|
4
3
|
var _sdJwt = require("../__mocks__/sd-jwt");
|
|
5
|
-
|
|
6
|
-
signed,
|
|
7
|
-
token
|
|
8
|
-
} = _sdJwt.pid;
|
|
4
|
+
var _ = require("..");
|
|
9
5
|
describe("SD-JWT getVerification", () => {
|
|
10
6
|
it("extracts the verification claims correctly", () => {
|
|
11
|
-
|
|
12
|
-
expect((0, _.getVerification)(`${signed}~${disclosure}`)).toEqual({
|
|
7
|
+
expect((0, _.getVerification)(_sdJwt.pid)).toEqual({
|
|
13
8
|
evidence: [{
|
|
14
9
|
attestation: {
|
|
15
10
|
date_of_issuance: "2025-06-23",
|
|
@@ -27,11 +22,7 @@ describe("SD-JWT getVerification", () => {
|
|
|
27
22
|
});
|
|
28
23
|
});
|
|
29
24
|
it("returns undefined when the verification claim is not found", () => {
|
|
30
|
-
expect((0, _.getVerification)(
|
|
31
|
-
});
|
|
32
|
-
it("throws when the verification claim is invalid", () => {
|
|
33
|
-
const disclosure = "WyJxTGxVdkNKY3hwX3d4MVY5dHFPbFFRIiwidmVyaWZpY2F0aW9uIix7InRydXN0X2ZyYW1ld29yayI6ICJpdF9jaWUiLCJhc3N1cmFuY2VfbGV2ZWwiOiAic3Vic3RhbnRpYWwifV0";
|
|
34
|
-
expect(() => (0, _.getVerification)(`${signed}~${disclosure}`)).toThrow();
|
|
25
|
+
expect((0, _.getVerification)(_sdJwt.legacyPid)).toBeUndefined();
|
|
35
26
|
});
|
|
36
27
|
});
|
|
37
28
|
//# sourceMappingURL=utils.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_sdJwt","require","_","describe","it","expect","getVerification","pid","toEqual","evidence","attestation","date_of_issuance","voucher","organization","type","reference_number","time","trust_framework","assurance_level","legacyPid","toBeUndefined"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/utils.test.ts"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAD,OAAA;AAEAE,QAAQ,CAAC,wBAAwB,EAAE,MAAM;EACvCC,EAAE,CAAC,4CAA4C,EAAE,MAAM;IACrDC,MAAM,CAAC,IAAAC,iBAAe,EAACC,UAAG,CAAC,CAAC,CAACC,OAAO,CAAC;MACnCC,QAAQ,EAAE,CACR;QACEC,WAAW,EAAE;UACXC,gBAAgB,EAAE,YAAY;UAC9BC,OAAO,EAAE;YAAEC,YAAY,EAAE;UAAyB,CAAC;UACnDC,IAAI,EAAE,qBAAqB;UAC3BC,gBAAgB,EAAE;QACpB,CAAC;QACDC,IAAI,EAAE,sBAAsB;QAC5BF,IAAI,EAAE;MACR,CAAC,CACF;MACDG,eAAe,EAAE,QAAQ;MACzBC,eAAe,EAAE;IACnB,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFd,EAAE,CAAC,4DAA4D,EAAE,MAAM;IACrEC,MAAM,CAAC,IAAAC,iBAAe,EAACa,gBAAS,CAAC,CAAC,CAACC,aAAa,CAAC,CAAC;EACpD,CAAC,CAAC;AACJ,CAAC,CAAC"}
|