@pagopa/io-react-native-wallet 2.5.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -7
- package/lib/commonjs/IoWallet.js +47 -0
- package/lib/commonjs/IoWallet.js.map +1 -0
- package/lib/commonjs/api/index.js +51 -0
- package/lib/commonjs/api/index.js.map +1 -0
- package/lib/commonjs/credential/index.js +1 -9
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +37 -44
- package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js +6 -0
- package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js +6 -0
- package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js +6 -0
- package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/04-authorize-access.js +6 -0
- package/lib/commonjs/credential/issuance/api/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/05-obtain-credential.js +6 -0
- package/lib/commonjs/credential/issuance/api/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js +6 -0
- package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js +67 -0
- package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/index.js +6 -0
- package/lib/commonjs/credential/issuance/api/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js +17 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js +2 -0
- package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/api/types.js +26 -0
- package/lib/commonjs/credential/issuance/api/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +55 -0
- package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +178 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +183 -0
- package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/authorization.js +56 -0
- package/lib/commonjs/credential/issuance/common/authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/common/errors.js +35 -0
- package/lib/commonjs/credential/issuance/common/errors.js.map +1 -0
- package/lib/commonjs/credential/issuance/index.js +8 -68
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
- package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +25 -37
- package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +24 -46
- package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js +8 -24
- package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +19 -0
- package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +63 -0
- package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +195 -0
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +69 -0
- package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +148 -0
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +34 -0
- package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/index.js +28 -0
- package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +28 -0
- package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/types.js +44 -0
- package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +24 -0
- package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +92 -0
- package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +187 -0
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +75 -0
- package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +143 -0
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +34 -0
- package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/index.js +28 -0
- package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +73 -0
- package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/types.js +14 -0
- package/lib/commonjs/credential/issuance/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credential/offer/README.md +103 -119
- package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js +6 -0
- package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/api/02-extract-grant-details.js +6 -0
- package/lib/commonjs/credential/offer/api/02-extract-grant-details.js.map +1 -0
- package/lib/commonjs/credential/offer/api/index.js +17 -0
- package/lib/commonjs/credential/offer/api/index.js.map +1 -0
- package/lib/commonjs/credential/offer/api/types.js +6 -0
- package/lib/commonjs/credential/offer/api/types.js.map +1 -0
- package/lib/commonjs/credential/offer/common/errors.js +22 -0
- package/lib/commonjs/credential/offer/common/errors.js.map +1 -0
- package/lib/commonjs/credential/offer/index.js +7 -7
- package/lib/commonjs/credential/offer/index.js.map +1 -1
- package/lib/commonjs/credential/offer/v1.0.0/index.js +17 -0
- package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +62 -0
- package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +25 -0
- package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
- package/lib/commonjs/credential/offer/v1.3.3/index.js +14 -0
- package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/README.md +12 -9
- package/lib/commonjs/credential/presentation/api/01-start-flow.js +6 -0
- package/lib/commonjs/credential/presentation/api/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js +6 -0
- package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/03-get-request-object.js +6 -0
- package/lib/commonjs/credential/presentation/api/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/04-verify-request-object.js +6 -0
- package/lib/commonjs/credential/presentation/api/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js +6 -0
- package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js +6 -0
- package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +31 -0
- package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/index.js +17 -0
- package/lib/commonjs/credential/presentation/api/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/api/types.js +74 -0
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/errors.js +121 -0
- package/lib/commonjs/credential/presentation/common/errors.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/dcql.js +164 -0
- package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/http.js +28 -0
- package/lib/commonjs/credential/presentation/common/utils/http.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +56 -0
- package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -0
- package/lib/commonjs/credential/presentation/common/utils.js +28 -0
- package/lib/commonjs/credential/presentation/common/utils.js.map +1 -0
- package/lib/commonjs/credential/presentation/index.js +7 -80
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +21 -0
- package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +21 -0
- package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +58 -0
- package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js +86 -0
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +85 -0
- package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js +165 -0
- package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/index.js +24 -0
- package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +33 -0
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/types.js +46 -0
- package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js +27 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js +27 -0
- package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +23 -0
- package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +22 -0
- package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +37 -0
- package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js +33 -0
- package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +105 -0
- package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js +137 -0
- package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/index.js +24 -0
- package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +32 -0
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +74 -0
- package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/types.js +19 -0
- package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js +88 -0
- package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +77 -19
- package/lib/commonjs/credential/status/api/index.js +17 -0
- package/lib/commonjs/credential/status/api/index.js.map +1 -0
- package/lib/commonjs/credential/status/api/status-assertion.js +6 -0
- package/lib/commonjs/credential/status/api/status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/api/status-list.js +6 -0
- package/lib/commonjs/credential/status/api/status-list.js.map +1 -0
- package/lib/commonjs/credential/status/api/types.js +2 -0
- package/lib/commonjs/credential/status/api/types.js.map +1 -0
- package/lib/commonjs/credential/status/index.js +21 -12
- package/lib/commonjs/credential/status/index.js.map +1 -1
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +71 -0
- package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +74 -0
- package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/index.js +20 -0
- package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/mappers.js +10 -0
- package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credential/status/v1.0.0/types.js +81 -0
- package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +48 -0
- package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +24 -0
- package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js +20 -0
- package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +5 -1
- package/lib/commonjs/credential/trustmark/api/index.js +6 -0
- package/lib/commonjs/credential/trustmark/api/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +10 -3
- package/lib/commonjs/credential/trustmark/index.js.map +1 -1
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +70 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js +12 -0
- package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/README.md +8 -2
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +84 -0
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/api/index.js +6 -0
- package/lib/commonjs/credentials-catalogue/api/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/index.js +10 -3
- package/lib/commonjs/credentials-catalogue/index.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +33 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +12 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +29 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +99 -0
- package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +47 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +12 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +61 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +156 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +57 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -0
- package/lib/commonjs/index.js +21 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mdoc/index.js +22 -3
- package/lib/commonjs/mdoc/index.js.map +1 -1
- package/lib/commonjs/mdoc/utils.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +0 -61
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -12
- package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +20 -164
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +26 -50
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/utils.js +5 -7
- package/lib/commonjs/sd-jwt/utils.js.map +1 -1
- package/lib/commonjs/trust/README.md +24 -11
- package/lib/commonjs/trust/api/TrustAnchorConfig.js +29 -0
- package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -0
- package/lib/commonjs/trust/api/index.js +6 -0
- package/lib/commonjs/trust/api/index.js.map +1 -0
- package/lib/commonjs/trust/common/build-chain.js +118 -0
- package/lib/commonjs/trust/common/build-chain.js.map +1 -0
- package/lib/commonjs/trust/common/errors.js +134 -0
- package/lib/commonjs/trust/common/errors.js.map +1 -0
- package/lib/commonjs/trust/common/types.js +82 -0
- package/lib/commonjs/trust/common/types.js.map +1 -0
- package/lib/commonjs/trust/common/utils.js +139 -0
- package/lib/commonjs/trust/common/utils.js.map +1 -0
- package/lib/commonjs/trust/common/verify-chain.js +193 -0
- package/lib/commonjs/trust/common/verify-chain.js.map +1 -0
- package/lib/commonjs/trust/index.js +9 -8
- package/lib/commonjs/trust/index.js.map +1 -1
- package/lib/commonjs/trust/v1.0.0/build-chain.js +15 -0
- package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/entities.js +51 -0
- package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/index.js +18 -0
- package/lib/commonjs/trust/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/mappers.js +21 -0
- package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/types.js +159 -0
- package/lib/commonjs/trust/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/trust/v1.0.0/verify-chain.js +19 -0
- package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -0
- package/lib/commonjs/trust/v1.3.3/entities.js +43 -0
- package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -0
- package/lib/commonjs/trust/v1.3.3/types.js +54 -0
- package/lib/commonjs/trust/v1.3.3/types.js.map +1 -0
- package/lib/commonjs/utils/callbacks.js +101 -0
- package/lib/commonjs/utils/callbacks.js.map +1 -0
- package/lib/commonjs/utils/config.js +23 -0
- package/lib/commonjs/utils/config.js.map +1 -0
- package/lib/commonjs/utils/credentials.js +9 -6
- package/lib/commonjs/utils/credentials.js.map +1 -1
- package/lib/commonjs/utils/errors.js +68 -5
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/mappers.js +71 -0
- package/lib/commonjs/utils/mappers.js.map +1 -0
- package/lib/commonjs/utils/misc.js +19 -4
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/object.js +20 -0
- package/lib/commonjs/utils/object.js.map +1 -0
- package/lib/commonjs/utils/par.js +5 -4
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/zod.js +3 -1
- package/lib/commonjs/utils/zod.js.map +1 -1
- package/lib/commonjs/wallet-instance/README.md +8 -5
- package/lib/commonjs/wallet-instance/api/index.js +6 -0
- package/lib/commonjs/wallet-instance/api/index.js.map +1 -0
- package/lib/commonjs/wallet-instance/common/wallet-instance.js +75 -0
- package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -0
- package/lib/commonjs/wallet-instance/index.js +13 -83
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance/v1.0.0/index.js +15 -0
- package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/wallet-instance/v1.3.3/index.js +15 -0
- package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -2
- package/lib/commonjs/wallet-instance-attestation/api/index.js +6 -0
- package/lib/commonjs/wallet-instance-attestation/api/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/api/types.js +30 -0
- package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/common/types.js +34 -0
- package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/index.js +10 -53
- package/lib/commonjs/wallet-instance-attestation/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +17 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +106 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +19 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +46 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +37 -0
- package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +19 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +12 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js +42 -0
- package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
- package/lib/module/IoWallet.js +40 -0
- package/lib/module/IoWallet.js.map +1 -0
- package/lib/module/api/index.js +43 -0
- package/lib/module/api/index.js.map +1 -0
- package/lib/module/credential/index.js +1 -5
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/README.md +37 -44
- package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js +2 -0
- package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/api/02-start-user-authorization.js +2 -0
- package/lib/module/credential/issuance/api/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/api/03-complete-user-authorization.js +2 -0
- package/lib/module/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/api/04-authorize-access.js +2 -0
- package/lib/module/credential/issuance/api/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/api/05-obtain-credential.js +2 -0
- package/lib/module/credential/issuance/api/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js +2 -0
- package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/api/IssuerConfig.js +60 -0
- package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -0
- package/lib/module/credential/issuance/api/index.js +2 -0
- package/lib/module/credential/issuance/api/index.js.map +1 -0
- package/lib/module/credential/issuance/api/mrtd-pop/index.js +3 -0
- package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -0
- package/lib/module/credential/issuance/api/mrtd-pop/types.js +2 -0
- package/lib/module/credential/issuance/api/mrtd-pop/types.js.map +1 -0
- package/lib/module/credential/issuance/api/types.js +17 -0
- package/lib/module/credential/issuance/api/types.js.map +1 -0
- package/lib/module/credential/issuance/common/02-start-user-authorization.js +47 -0
- package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +171 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +176 -0
- package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
- package/lib/module/credential/issuance/common/authorization.js +48 -0
- package/lib/module/credential/issuance/common/authorization.js.map +1 -0
- package/lib/module/credential/issuance/common/errors.js +28 -0
- package/lib/module/credential/issuance/common/errors.js.map +1 -0
- package/lib/module/credential/issuance/index.js +4 -9
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
- package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +24 -38
- package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +22 -46
- package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
- package/lib/module/credential/issuance/mrtd-pop/index.js +6 -1
- package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +12 -0
- package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +56 -0
- package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +182 -0
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +60 -0
- package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +140 -0
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +27 -0
- package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/index.js +21 -0
- package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/mappers.js +21 -0
- package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/issuance/v1.0.0/types.js +22 -0
- package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +17 -0
- package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +85 -0
- package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +174 -0
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +66 -0
- package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +135 -0
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +27 -0
- package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/index.js +21 -0
- package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/mappers.js +66 -0
- package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credential/issuance/v1.3.3/types.js +5 -0
- package/lib/module/credential/issuance/v1.3.3/types.js.map +1 -0
- package/lib/module/credential/offer/README.md +103 -119
- package/lib/module/credential/offer/api/01-resolve-credential-offer.js +2 -0
- package/lib/module/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/api/02-extract-grant-details.js +2 -0
- package/lib/module/credential/offer/api/02-extract-grant-details.js.map +1 -0
- package/lib/module/credential/offer/api/index.js +3 -0
- package/lib/module/credential/offer/api/index.js.map +1 -0
- package/lib/module/credential/offer/api/types.js +2 -0
- package/lib/module/credential/offer/api/types.js.map +1 -0
- package/lib/module/credential/offer/common/errors.js +14 -0
- package/lib/module/credential/offer/common/errors.js.map +1 -0
- package/lib/module/credential/offer/index.js +4 -4
- package/lib/module/credential/offer/index.js.map +1 -1
- package/lib/module/credential/offer/v1.0.0/index.js +10 -0
- package/lib/module/credential/offer/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +55 -0
- package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +18 -0
- package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
- package/lib/module/credential/offer/v1.3.3/index.js +7 -0
- package/lib/module/credential/offer/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/presentation/README.md +12 -9
- package/lib/module/credential/presentation/api/01-start-flow.js +2 -0
- package/lib/module/credential/presentation/api/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js +2 -0
- package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/api/03-get-request-object.js +2 -0
- package/lib/module/credential/presentation/api/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/api/04-verify-request-object.js +2 -0
- package/lib/module/credential/presentation/api/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js +2 -0
- package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/api/06-send-authorization-response.js +2 -0
- package/lib/module/credential/presentation/api/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js +23 -0
- package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
- package/lib/module/credential/presentation/api/index.js +3 -0
- package/lib/module/credential/presentation/api/index.js.map +1 -0
- package/lib/module/credential/presentation/api/types.js +64 -0
- package/lib/module/credential/presentation/api/types.js.map +1 -0
- package/lib/module/credential/presentation/common/errors.js +103 -0
- package/lib/module/credential/presentation/common/errors.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/dcql.js +152 -0
- package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/http.js +21 -0
- package/lib/module/credential/presentation/common/utils/http.js.map +1 -0
- package/lib/module/credential/presentation/common/utils/sd-jwt.js +49 -0
- package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -0
- package/lib/module/credential/presentation/common/utils.js +21 -0
- package/lib/module/credential/presentation/common/utils.js.map +1 -0
- package/lib/module/credential/presentation/index.js +4 -11
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +14 -0
- package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +14 -0
- package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +51 -0
- package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js +79 -0
- package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +76 -0
- package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js +155 -0
- package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/index.js +17 -0
- package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/mappers.js +25 -0
- package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/types.js +36 -0
- package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js +20 -0
- package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +20 -0
- package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +16 -0
- package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +15 -0
- package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +30 -0
- package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js +26 -0
- package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +97 -0
- package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js +129 -0
- package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/index.js +17 -0
- package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/mappers.js +24 -0
- package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +65 -0
- package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/types.js +9 -0
- package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -0
- package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js +79 -0
- package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
- package/lib/module/credential/status/README.md +77 -19
- package/lib/module/credential/status/api/index.js +14 -0
- package/lib/module/credential/status/api/index.js.map +1 -0
- package/lib/module/credential/status/api/status-assertion.js +2 -0
- package/lib/module/credential/status/api/status-assertion.js.map +1 -0
- package/lib/module/credential/status/api/status-list.js +2 -0
- package/lib/module/credential/status/api/status-list.js.map +1 -0
- package/lib/module/credential/status/api/types.js +2 -0
- package/lib/module/credential/status/api/types.js.map +1 -0
- package/lib/module/credential/status/index.js +3 -4
- package/lib/module/credential/status/index.js.map +1 -1
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js +64 -0
- package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +67 -0
- package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/index.js +13 -0
- package/lib/module/credential/status/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/mappers.js +3 -0
- package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credential/status/v1.0.0/types.js +71 -0
- package/lib/module/credential/status/v1.0.0/types.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/01-status-list.js +41 -0
- package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +17 -0
- package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
- package/lib/module/credential/status/v1.3.3/index.js +13 -0
- package/lib/module/credential/status/v1.3.3/index.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +5 -1
- package/lib/module/credential/trustmark/api/index.js +2 -0
- package/lib/module/credential/trustmark/api/index.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +2 -2
- package/lib/module/credential/trustmark/index.js.map +1 -1
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +61 -0
- package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/v1.0.0/index.js +5 -0
- package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -0
- package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js +5 -0
- package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/v1.3.3/index.js +5 -0
- package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -0
- package/lib/module/credentials-catalogue/README.md +8 -2
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +73 -0
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/api/index.js +2 -0
- package/lib/module/credentials-catalogue/api/index.js.map +1 -0
- package/lib/module/credentials-catalogue/index.js +2 -1
- package/lib/module/credentials-catalogue/index.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +26 -0
- package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/index.js +5 -0
- package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js +22 -0
- package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.0.0/types.js +89 -0
- package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +39 -0
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/index.js +5 -0
- package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js +54 -0
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/types.js +141 -0
- package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -0
- package/lib/module/credentials-catalogue/v1.3.3/utils.js +50 -0
- package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -0
- package/lib/module/index.js +9 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/mdoc/index.js +19 -2
- package/lib/module/mdoc/index.js.map +1 -1
- package/lib/module/mdoc/utils.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +1 -62
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/utils.test.js +3 -12
- package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +19 -147
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +21 -44
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/utils.js +5 -7
- package/lib/module/sd-jwt/utils.js.map +1 -1
- package/lib/module/trust/README.md +24 -11
- package/lib/module/trust/api/TrustAnchorConfig.js +21 -0
- package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -0
- package/lib/module/trust/api/index.js +2 -0
- package/lib/module/trust/api/index.js.map +1 -0
- package/lib/module/trust/common/build-chain.js +111 -0
- package/lib/module/trust/common/build-chain.js.map +1 -0
- package/lib/module/trust/common/errors.js +116 -0
- package/lib/module/trust/common/errors.js.map +1 -0
- package/lib/module/trust/common/types.js +69 -0
- package/lib/module/trust/common/types.js.map +1 -0
- package/lib/module/trust/common/utils.js +126 -0
- package/lib/module/trust/common/utils.js.map +1 -0
- package/lib/module/trust/common/verify-chain.js +188 -0
- package/lib/module/trust/common/verify-chain.js.map +1 -0
- package/lib/module/trust/index.js +3 -5
- package/lib/module/trust/index.js.map +1 -1
- package/lib/module/trust/v1.0.0/build-chain.js +8 -0
- package/lib/module/trust/v1.0.0/build-chain.js.map +1 -0
- package/lib/module/trust/v1.0.0/entities.js +41 -0
- package/lib/module/trust/v1.0.0/entities.js.map +1 -0
- package/lib/module/trust/v1.0.0/index.js +11 -0
- package/lib/module/trust/v1.0.0/index.js.map +1 -0
- package/lib/module/trust/v1.0.0/mappers.js +14 -0
- package/lib/module/trust/v1.0.0/mappers.js.map +1 -0
- package/lib/module/trust/v1.0.0/types.js +150 -0
- package/lib/module/trust/v1.0.0/types.js.map +1 -0
- package/lib/module/trust/v1.0.0/verify-chain.js +12 -0
- package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -0
- package/lib/module/trust/v1.3.3/entities.js +37 -0
- package/lib/module/trust/v1.3.3/entities.js.map +1 -0
- package/lib/module/trust/v1.3.3/types.js +46 -0
- package/lib/module/trust/v1.3.3/types.js.map +1 -0
- package/lib/module/utils/callbacks.js +94 -0
- package/lib/module/utils/callbacks.js.map +1 -0
- package/lib/module/utils/config.js +16 -0
- package/lib/module/utils/config.js.map +1 -0
- package/lib/module/utils/credentials.js +9 -6
- package/lib/module/utils/credentials.js.map +1 -1
- package/lib/module/utils/errors.js +62 -2
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/mappers.js +62 -0
- package/lib/module/utils/mappers.js.map +1 -0
- package/lib/module/utils/misc.js +15 -1
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/object.js +11 -0
- package/lib/module/utils/object.js.map +1 -0
- package/lib/module/utils/par.js +5 -4
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/zod.js +1 -0
- package/lib/module/utils/zod.js.map +1 -1
- package/lib/module/wallet-instance/README.md +8 -5
- package/lib/module/wallet-instance/api/index.js +2 -0
- package/lib/module/wallet-instance/api/index.js.map +1 -0
- package/lib/module/wallet-instance/common/wallet-instance.js +65 -0
- package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -0
- package/lib/module/wallet-instance/index.js +2 -80
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance/v1.0.0/index.js +8 -0
- package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -0
- package/lib/module/wallet-instance/v1.3.3/index.js +8 -0
- package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/README.md +8 -2
- package/lib/module/wallet-instance-attestation/api/index.js +2 -0
- package/lib/module/wallet-instance-attestation/api/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/api/types.js +22 -0
- package/lib/module/wallet-instance-attestation/api/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/common/types.js +25 -0
- package/lib/module/wallet-instance-attestation/common/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/index.js +2 -51
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js +10 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +100 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +11 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js +35 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +31 -0
- package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js +12 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +5 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js +32 -0
- package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
- package/lib/typescript/IoWallet.d.ts +28 -0
- package/lib/typescript/IoWallet.d.ts.map +1 -0
- package/lib/typescript/api/index.d.ts +29 -0
- package/lib/typescript/api/index.d.ts.map +1 -0
- package/lib/typescript/client/generated/wallet-provider.d.ts +14 -14
- package/lib/typescript/credential/index.d.ts +1 -5
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts +18 -0
- package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +48 -0
- package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +78 -0
- package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +33 -0
- package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +36 -0
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +36 -0
- package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +423 -0
- package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/index.d.ts +14 -0
- package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +74 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +34 -0
- package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/api/types.d.ts +64 -0
- package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +21 -0
- package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts +3 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts +3 -0
- package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/authorization.d.ts +21 -0
- package/lib/typescript/credential/issuance/common/authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/common/errors.d.ts +19 -0
- package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/index.d.ts +5 -11
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts +2 -24
- package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -22
- package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +3 -38
- package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts +2 -6
- package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +16 -0
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts +5 -0
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +307 -0
- package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts +43 -0
- package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +16 -0
- package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +5 -0
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +2309 -0
- package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/v1.3.3/types.d.ts +10 -0
- package/lib/typescript/credential/issuance/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts +22 -0
- package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts +13 -0
- package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/index.d.ts +6 -0
- package/lib/typescript/credential/offer/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/offer/api/types.d.ts +5 -0
- package/lib/typescript/credential/offer/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/offer/common/errors.d.ts +10 -0
- package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/offer/index.d.ts +5 -6
- package/lib/typescript/credential/offer/index.d.ts.map +1 -1
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts +25 -0
- package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts +16 -0
- package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -0
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +18 -0
- package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts +18 -0
- package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts +19 -0
- package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts +23 -0
- package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts +41 -0
- package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts +54 -0
- package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +185 -0
- package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/index.d.ts +12 -0
- package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/api/types.d.ts +207 -0
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/errors.d.ts +80 -0
- package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +293 -0
- package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/http.d.ts +11 -0
- package/lib/typescript/credential/presentation/common/utils/http.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts +14 -0
- package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/common/utils.d.ts +11 -0
- package/lib/typescript/credential/presentation/common/utils.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/index.d.ts +5 -12
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts +26 -0
- package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +143 -0
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +80 -0
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +11 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +11 -0
- package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts +18 -0
- package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +619 -0
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts +13 -0
- package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +3730 -0
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts +28 -0
- package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/index.d.ts +21 -0
- package/lib/typescript/credential/status/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/status-assertion.d.ts +49 -0
- package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/status-list.d.ts +40 -0
- package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/api/types.d.ts +16 -0
- package/lib/typescript/credential/status/api/types.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +3 -6
- package/lib/typescript/credential/status/index.d.ts.map +1 -1
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +47 -0
- package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.0.0/types.d.ts +782 -0
- package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/api/index.d.ts +49 -0
- package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +3 -3
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -1
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +613 -0
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/api/index.d.ts +18 -0
- package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/index.d.ts +3 -2
- package/lib/typescript/credentials-catalogue/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +54 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +844 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +168 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +1074 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +26 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/index.d.ts +4 -0
- package/lib/typescript/mdoc/index.d.ts.map +1 -1
- package/lib/typescript/mdoc/utils.d.ts +2 -2
- package/lib/typescript/mdoc/utils.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +58 -278
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +118 -153
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +247 -0
- package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -0
- package/lib/typescript/trust/api/index.d.ts +43 -0
- package/lib/typescript/trust/api/index.d.ts.map +1 -0
- package/lib/typescript/trust/common/build-chain.d.ts +21 -0
- package/lib/typescript/trust/common/build-chain.d.ts.map +1 -0
- package/lib/typescript/trust/common/errors.d.ts +103 -0
- package/lib/typescript/trust/common/errors.d.ts.map +1 -0
- package/lib/typescript/trust/common/types.d.ts +1306 -0
- package/lib/typescript/trust/common/types.d.ts.map +1 -0
- package/lib/typescript/trust/common/utils.d.ts +53 -0
- package/lib/typescript/trust/common/utils.d.ts.map +1 -0
- package/lib/typescript/trust/common/verify-chain.d.ts +27 -0
- package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -0
- package/lib/typescript/trust/index.d.ts +4 -5
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/v1.0.0/build-chain.d.ts +54 -0
- package/lib/typescript/trust/v1.0.0/build-chain.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/entities.d.ts +968 -0
- package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/mappers.d.ts +113 -0
- package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/types.d.ts +12744 -0
- package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts +57 -0
- package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -0
- package/lib/typescript/trust/v1.3.3/entities.d.ts +103 -0
- package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -0
- package/lib/typescript/trust/v1.3.3/types.d.ts +14620 -0
- package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -0
- package/lib/typescript/utils/auth.d.ts +2 -2
- package/lib/typescript/utils/callbacks.d.ts +21 -0
- package/lib/typescript/utils/callbacks.d.ts.map +1 -0
- package/lib/typescript/utils/config.d.ts +10 -0
- package/lib/typescript/utils/config.d.ts.map +1 -0
- package/lib/typescript/utils/credentials.d.ts +2 -3
- package/lib/typescript/utils/credentials.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +38 -3
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/mappers.d.ts +47 -0
- package/lib/typescript/utils/mappers.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts +7 -1
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/object.d.ts +4 -0
- package/lib/typescript/utils/object.d.ts.map +1 -0
- package/lib/typescript/utils/par.d.ts +2 -2
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/pop.d.ts +2 -2
- package/lib/typescript/utils/zod.d.ts +2 -0
- package/lib/typescript/utils/zod.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/api/index.d.ts +45 -0
- package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts +6 -0
- package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/index.d.ts +3 -35
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts +46 -0
- package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts +211 -0
- package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts +306 -0
- package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/index.d.ts +3 -34
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +91 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +710 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts +15 -0
- package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts +3 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +925 -0
- package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -0
- package/package.json +20 -13
- package/src/IoWallet.ts +50 -0
- package/src/api/index.ts +55 -0
- package/src/credential/index.ts +1 -5
- package/src/credential/issuance/README.md +37 -44
- package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +17 -0
- package/src/credential/issuance/api/02-start-user-authorization.ts +50 -0
- package/src/credential/issuance/api/03-complete-user-authorization.ts +102 -0
- package/src/credential/issuance/api/04-authorize-access.ts +37 -0
- package/src/credential/issuance/api/05-obtain-credential.ts +42 -0
- package/src/credential/issuance/api/06-verify-and-parse-credential.ts +42 -0
- package/src/credential/issuance/api/IssuerConfig.ts +65 -0
- package/src/credential/issuance/api/index.ts +21 -0
- package/src/credential/issuance/api/mrtd-pop/index.ts +104 -0
- package/src/credential/issuance/api/mrtd-pop/types.ts +37 -0
- package/src/credential/issuance/api/types.ts +34 -0
- package/src/credential/issuance/common/02-start-user-authorization.ts +86 -0
- package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +236 -0
- package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +261 -0
- package/src/credential/issuance/common/authorization.ts +89 -0
- package/src/credential/issuance/common/errors.ts +29 -0
- package/src/credential/issuance/index.ts +5 -62
- package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +20 -65
- package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +25 -56
- package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +34 -90
- package/src/credential/issuance/mrtd-pop/index.ts +4 -17
- package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +14 -0
- package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +68 -0
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +279 -0
- package/src/credential/issuance/v1.0.0/04-authorize-access.ts +93 -0
- package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +212 -0
- package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +46 -0
- package/src/credential/issuance/v1.0.0/index.ts +28 -0
- package/src/credential/issuance/v1.0.0/mappers.ts +29 -0
- package/src/credential/issuance/v1.0.0/types.ts +28 -0
- package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +19 -0
- package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +109 -0
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +249 -0
- package/src/credential/issuance/v1.3.3/04-authorize-access.ts +84 -0
- package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +188 -0
- package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +46 -0
- package/src/credential/issuance/v1.3.3/index.ts +28 -0
- package/src/credential/issuance/v1.3.3/mappers.ts +87 -0
- package/src/credential/issuance/v1.3.3/types.ts +6 -0
- package/src/credential/offer/README.md +103 -119
- package/src/credential/offer/api/01-resolve-credential-offer.ts +23 -0
- package/src/credential/offer/api/02-extract-grant-details.ts +13 -0
- package/src/credential/offer/api/index.ts +8 -0
- package/src/credential/offer/api/types.ts +5 -0
- package/src/credential/offer/common/errors.ts +17 -0
- package/src/credential/offer/index.ts +5 -16
- package/src/credential/offer/v1.0.0/index.ts +11 -0
- package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +60 -0
- package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +27 -0
- package/src/credential/offer/v1.3.3/index.ts +8 -0
- package/src/credential/presentation/README.md +12 -9
- package/src/credential/presentation/api/01-start-flow.ts +18 -0
- package/src/credential/presentation/api/02-evaluate-rp-trust.ts +19 -0
- package/src/credential/presentation/api/03-get-request-object.ts +20 -0
- package/src/credential/presentation/api/04-verify-request-object.ts +24 -0
- package/src/credential/presentation/api/05-evaluate-dcql-query.ts +54 -0
- package/src/credential/presentation/api/06-send-authorization-response.ts +67 -0
- package/src/credential/presentation/api/RelyingPartyConfig.ts +25 -0
- package/src/credential/presentation/api/index.ts +18 -0
- package/src/credential/presentation/api/types.ts +129 -0
- package/src/credential/presentation/common/errors.ts +116 -0
- package/src/credential/presentation/common/utils/dcql.ts +188 -0
- package/src/credential/presentation/common/utils/http.ts +30 -0
- package/src/credential/presentation/common/utils/sd-jwt.ts +68 -0
- package/src/credential/presentation/common/utils.ts +30 -0
- package/src/credential/presentation/index.ts +5 -71
- package/src/credential/presentation/v1.0.0/01-start-flow.ts +22 -0
- package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +14 -0
- package/src/credential/presentation/v1.0.0/03-get-request-object.ts +61 -0
- package/src/credential/presentation/v1.0.0/04-verify-request-object.ts +104 -0
- package/src/credential/presentation/v1.0.0/05-evaluate-dcql-query.ts +97 -0
- package/src/credential/presentation/v1.0.0/06-send-authorization-response.ts +196 -0
- package/src/credential/presentation/v1.0.0/index.ts +22 -0
- package/src/credential/presentation/v1.0.0/mappers.ts +35 -0
- package/src/credential/presentation/v1.0.0/types.ts +40 -0
- package/src/credential/presentation/v1.0.0/utils.jwks.ts +26 -0
- package/src/credential/presentation/v1.0.0/utils.ts +26 -0
- package/src/credential/presentation/v1.3.3/01-start-flow.ts +22 -0
- package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +15 -0
- package/src/credential/presentation/v1.3.3/03-get-request-object.ts +28 -0
- package/src/credential/presentation/v1.3.3/04-verify-request-object.ts +31 -0
- package/src/credential/presentation/v1.3.3/05-evaluate-dcql-query.ts +119 -0
- package/src/credential/presentation/v1.3.3/06-send-authorization-response.ts +160 -0
- package/src/credential/presentation/v1.3.3/index.ts +22 -0
- package/src/credential/presentation/v1.3.3/mappers.ts +34 -0
- package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +93 -0
- package/src/credential/presentation/v1.3.3/types.ts +12 -0
- package/src/credential/presentation/v1.3.3/utils.mdoc.ts +98 -0
- package/src/credential/status/README.md +77 -19
- package/src/credential/status/api/index.ts +23 -0
- package/src/credential/status/api/status-assertion.ts +57 -0
- package/src/credential/status/api/status-list.ts +50 -0
- package/src/credential/status/api/types.ts +15 -0
- package/src/credential/status/index.ts +3 -15
- package/src/credential/status/v1.0.0/01-status-assertion.ts +95 -0
- package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +87 -0
- package/src/credential/status/v1.0.0/index.ts +14 -0
- package/src/credential/status/v1.0.0/mappers.ts +8 -0
- package/src/credential/status/v1.0.0/types.ts +90 -0
- package/src/credential/status/v1.3.3/01-status-list.ts +50 -0
- package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +19 -0
- package/src/credential/status/v1.3.3/index.ts +14 -0
- package/src/credential/trustmark/README.md +5 -1
- package/src/credential/trustmark/api/index.ts +50 -0
- package/src/credential/trustmark/index.ts +3 -8
- package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +89 -0
- package/src/credential/trustmark/v1.0.0/index.ts +6 -0
- package/src/credential/trustmark/v1.3.3/get-credential-trustmark.ts +7 -0
- package/src/credential/trustmark/v1.3.3/index.ts +6 -0
- package/src/credentials-catalogue/README.md +8 -2
- package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +82 -0
- package/src/credentials-catalogue/api/index.ts +21 -0
- package/src/credentials-catalogue/index.ts +3 -2
- package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +41 -0
- package/src/credentials-catalogue/v1.0.0/index.ts +6 -0
- package/src/credentials-catalogue/v1.0.0/mappers.ts +20 -0
- package/src/credentials-catalogue/v1.0.0/types.ts +97 -0
- package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +52 -0
- package/src/credentials-catalogue/v1.3.3/index.ts +6 -0
- package/src/credentials-catalogue/v1.3.3/mappers.ts +75 -0
- package/src/credentials-catalogue/v1.3.3/types.ts +162 -0
- package/src/credentials-catalogue/v1.3.3/utils.ts +64 -0
- package/src/index.ts +18 -7
- package/src/mdoc/index.ts +43 -2
- package/src/mdoc/utils.ts +4 -2
- package/src/sd-jwt/__test__/types.test.ts +1 -77
- package/src/sd-jwt/__test__/utils.test.ts +3 -13
- package/src/sd-jwt/index.ts +19 -164
- package/src/sd-jwt/types.ts +33 -63
- package/src/sd-jwt/utils.ts +11 -8
- package/src/trust/README.md +24 -11
- package/src/trust/api/TrustAnchorConfig.ts +20 -0
- package/src/trust/api/index.ts +57 -0
- package/src/trust/common/build-chain.ts +161 -0
- package/src/trust/common/errors.ts +138 -0
- package/src/trust/common/types.ts +78 -0
- package/src/trust/common/utils.ts +150 -0
- package/src/trust/common/verify-chain.ts +293 -0
- package/src/trust/index.ts +4 -6
- package/src/trust/v1.0.0/build-chain.ts +8 -0
- package/src/trust/v1.0.0/entities.ts +93 -0
- package/src/trust/v1.0.0/index.ts +15 -0
- package/src/trust/v1.0.0/mappers.ts +15 -0
- package/src/trust/v1.0.0/types.ts +178 -0
- package/src/trust/v1.0.0/verify-chain.ts +12 -0
- package/src/trust/v1.3.3/entities.ts +51 -0
- package/src/trust/v1.3.3/types.ts +68 -0
- package/src/utils/callbacks.ts +84 -0
- package/src/utils/config.ts +18 -0
- package/src/utils/credentials.ts +10 -9
- package/src/utils/errors.ts +69 -6
- package/src/utils/mappers.ts +84 -0
- package/src/utils/misc.ts +16 -2
- package/src/utils/object.ts +15 -0
- package/src/utils/par.ts +3 -5
- package/src/utils/zod.ts +3 -0
- package/src/wallet-instance/README.md +8 -5
- package/src/wallet-instance/api/index.ts +53 -0
- package/src/wallet-instance/common/wallet-instance.ts +96 -0
- package/src/wallet-instance/index.ts +3 -120
- package/src/wallet-instance/v1.0.0/index.ts +14 -0
- package/src/wallet-instance/v1.3.3/index.ts +14 -0
- package/src/wallet-instance-attestation/README.md +8 -2
- package/src/wallet-instance-attestation/api/index.ts +48 -0
- package/src/wallet-instance-attestation/api/types.ts +25 -0
- package/src/wallet-instance-attestation/common/types.ts +25 -0
- package/src/wallet-instance-attestation/index.ts +3 -56
- package/src/wallet-instance-attestation/v1.0.0/index.ts +11 -0
- package/src/wallet-instance-attestation/v1.0.0/issuing.ts +154 -0
- package/src/wallet-instance-attestation/v1.0.0/mappers.ts +24 -0
- package/src/wallet-instance-attestation/v1.0.0/types.ts +59 -0
- package/src/wallet-instance-attestation/v1.0.0/utils.ts +37 -0
- package/src/wallet-instance-attestation/v1.3.3/index.ts +13 -0
- package/src/wallet-instance-attestation/v1.3.3/issuing.ts +7 -0
- package/src/wallet-instance-attestation/v1.3.3/types.ts +48 -0
- package/lib/commonjs/credential/issuance/01-start-flow.js +0 -2
- package/lib/commonjs/credential/issuance/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -32
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +0 -132
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +0 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +0 -259
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +0 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +0 -87
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +0 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +0 -168
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +0 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +0 -388
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
- package/lib/commonjs/credential/issuance/errors.js +0 -35
- package/lib/commonjs/credential/issuance/errors.js.map +0 -1
- package/lib/commonjs/credential/issuance/mrtd-pop/types.js +0 -57
- package/lib/commonjs/credential/issuance/mrtd-pop/types.js.map +0 -1
- package/lib/commonjs/credential/issuance/types.js +0 -43
- package/lib/commonjs/credential/issuance/types.js.map +0 -1
- package/lib/commonjs/credential/offer/01-start-flow.js +0 -75
- package/lib/commonjs/credential/offer/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/offer/02-fetch-credential-offer.js +0 -45
- package/lib/commonjs/credential/offer/02-fetch-credential-offer.js.map +0 -1
- package/lib/commonjs/credential/offer/errors.js +0 -22
- package/lib/commonjs/credential/offer/errors.js.map +0 -1
- package/lib/commonjs/credential/offer/types.js +0 -51
- package/lib/commonjs/credential/offer/types.js.map +0 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +0 -45
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +0 -34
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +0 -56
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +0 -32
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +0 -95
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +0 -39
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +0 -155
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +0 -307
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +0 -252
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +0 -1
- package/lib/commonjs/credential/presentation/errors.js +0 -121
- package/lib/commonjs/credential/presentation/errors.js.map +0 -1
- package/lib/commonjs/credential/presentation/types.js +0 -157
- package/lib/commonjs/credential/presentation/types.js.map +0 -1
- package/lib/commonjs/credential/status/01-start-flow.js +0 -2
- package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/status/02-status-assertion.js +0 -79
- package/lib/commonjs/credential/status/02-status-assertion.js.map +0 -1
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +0 -85
- package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
- package/lib/commonjs/credential/status/types.js +0 -81
- package/lib/commonjs/credential/status/types.js.map +0 -1
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -86
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js +0 -42
- package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
- package/lib/commonjs/credentials-catalogue/types.js +0 -99
- package/lib/commonjs/credentials-catalogue/types.js.map +0 -1
- package/lib/commonjs/pid/index.js +0 -11
- package/lib/commonjs/pid/index.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/converters.js +0 -25
- package/lib/commonjs/pid/sd-jwt/converters.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/index.js +0 -77
- package/lib/commonjs/pid/sd-jwt/index.js.map +0 -1
- package/lib/commonjs/pid/sd-jwt/types.js +0 -50
- package/lib/commonjs/pid/sd-jwt/types.js.map +0 -1
- package/lib/commonjs/sd-jwt/__test__/converters.test.js +0 -25
- package/lib/commonjs/sd-jwt/__test__/converters.test.js.map +0 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +0 -134
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +0 -1
- package/lib/commonjs/sd-jwt/converters.js +0 -30
- package/lib/commonjs/sd-jwt/converters.js.map +0 -1
- package/lib/commonjs/sd-jwt/errors.js +0 -40
- package/lib/commonjs/sd-jwt/errors.js.map +0 -1
- package/lib/commonjs/sd-jwt/verifier.js +0 -24
- package/lib/commonjs/sd-jwt/verifier.js.map +0 -1
- package/lib/commonjs/trust/build-chain.js +0 -255
- package/lib/commonjs/trust/build-chain.js.map +0 -1
- package/lib/commonjs/trust/errors.js +0 -134
- package/lib/commonjs/trust/errors.js.map +0 -1
- package/lib/commonjs/trust/types.js +0 -234
- package/lib/commonjs/trust/types.js.map +0 -1
- package/lib/commonjs/trust/utils.js +0 -70
- package/lib/commonjs/trust/utils.js.map +0 -1
- package/lib/commonjs/trust/verify-chain.js +0 -188
- package/lib/commonjs/trust/verify-chain.js.map +0 -1
- package/lib/commonjs/wallet-instance-attestation/issuing.js +0 -117
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +0 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +0 -69
- package/lib/commonjs/wallet-instance-attestation/types.js.map +0 -1
- package/lib/module/credential/issuance/01-start-flow.js +0 -2
- package/lib/module/credential/issuance/01-start-flow.js.map +0 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -25
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/module/credential/issuance/03-start-user-authorization.js +0 -125
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +0 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +0 -247
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +0 -1
- package/lib/module/credential/issuance/05-authorize-access.js +0 -78
- package/lib/module/credential/issuance/05-authorize-access.js.map +0 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +0 -160
- package/lib/module/credential/issuance/06-obtain-credential.js.map +0 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +0 -382
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
- package/lib/module/credential/issuance/errors.js +0 -28
- package/lib/module/credential/issuance/errors.js.map +0 -1
- package/lib/module/credential/issuance/mrtd-pop/types.js +0 -46
- package/lib/module/credential/issuance/mrtd-pop/types.js.map +0 -1
- package/lib/module/credential/issuance/types.js +0 -30
- package/lib/module/credential/issuance/types.js.map +0 -1
- package/lib/module/credential/offer/01-start-flow.js +0 -66
- package/lib/module/credential/offer/01-start-flow.js.map +0 -1
- package/lib/module/credential/offer/02-fetch-credential-offer.js +0 -38
- package/lib/module/credential/offer/02-fetch-credential-offer.js.map +0 -1
- package/lib/module/credential/offer/errors.js +0 -14
- package/lib/module/credential/offer/errors.js.map +0 -1
- package/lib/module/credential/offer/types.js +0 -41
- package/lib/module/credential/offer/types.js.map +0 -1
- package/lib/module/credential/presentation/01-start-flow.js +0 -36
- package/lib/module/credential/presentation/01-start-flow.js.map +0 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +0 -27
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
- package/lib/module/credential/presentation/03-get-request-object.js +0 -49
- package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +0 -25
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +0 -88
- package/lib/module/credential/presentation/05-verify-request-object.js.map +0 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +0 -32
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +0 -148
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +0 -296
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +0 -239
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +0 -1
- package/lib/module/credential/presentation/errors.js +0 -103
- package/lib/module/credential/presentation/errors.js.map +0 -1
- package/lib/module/credential/presentation/types.js +0 -146
- package/lib/module/credential/presentation/types.js.map +0 -1
- package/lib/module/credential/status/01-start-flow.js +0 -2
- package/lib/module/credential/status/01-start-flow.js.map +0 -1
- package/lib/module/credential/status/02-status-assertion.js +0 -72
- package/lib/module/credential/status/02-status-assertion.js.map +0 -1
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +0 -78
- package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
- package/lib/module/credential/status/types.js +0 -71
- package/lib/module/credential/status/types.js.map +0 -1
- package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -77
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js +0 -35
- package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
- package/lib/module/credentials-catalogue/types.js +0 -89
- package/lib/module/credentials-catalogue/types.js.map +0 -1
- package/lib/module/pid/index.js +0 -3
- package/lib/module/pid/index.js.map +0 -1
- package/lib/module/pid/sd-jwt/converters.js +0 -19
- package/lib/module/pid/sd-jwt/converters.js.map +0 -1
- package/lib/module/pid/sd-jwt/index.js +0 -66
- package/lib/module/pid/sd-jwt/index.js.map +0 -1
- package/lib/module/pid/sd-jwt/types.js +0 -43
- package/lib/module/pid/sd-jwt/types.js.map +0 -1
- package/lib/module/sd-jwt/__test__/converters.test.js +0 -23
- package/lib/module/sd-jwt/__test__/converters.test.js.map +0 -1
- package/lib/module/sd-jwt/__test__/index.test.js +0 -132
- package/lib/module/sd-jwt/__test__/index.test.js.map +0 -1
- package/lib/module/sd-jwt/converters.js +0 -24
- package/lib/module/sd-jwt/converters.js.map +0 -1
- package/lib/module/sd-jwt/errors.js +0 -32
- package/lib/module/sd-jwt/errors.js.map +0 -1
- package/lib/module/sd-jwt/verifier.js +0 -17
- package/lib/module/sd-jwt/verifier.js.map +0 -1
- package/lib/module/trust/build-chain.js +0 -238
- package/lib/module/trust/build-chain.js.map +0 -1
- package/lib/module/trust/errors.js +0 -116
- package/lib/module/trust/errors.js.map +0 -1
- package/lib/module/trust/types.js +0 -221
- package/lib/module/trust/types.js.map +0 -1
- package/lib/module/trust/utils.js +0 -60
- package/lib/module/trust/utils.js.map +0 -1
- package/lib/module/trust/verify-chain.js +0 -179
- package/lib/module/trust/verify-chain.js.map +0 -1
- package/lib/module/wallet-instance-attestation/issuing.js +0 -110
- package/lib/module/wallet-instance-attestation/issuing.js.map +0 -1
- package/lib/module/wallet-instance-attestation/types.js +0 -58
- package/lib/module/wallet-instance-attestation/types.js.map +0 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +0 -12
- package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +0 -47
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +0 -79
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +0 -34
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +0 -36
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +0 -43
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/errors.d.ts +0 -19
- package/lib/typescript/credential/issuance/errors.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts +0 -201
- package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts.map +0 -1
- package/lib/typescript/credential/issuance/types.d.ts +0 -96
- package/lib/typescript/credential/issuance/types.d.ts.map +0 -1
- package/lib/typescript/credential/offer/01-start-flow.d.ts +0 -172
- package/lib/typescript/credential/offer/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts +0 -20
- package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts.map +0 -1
- package/lib/typescript/credential/offer/errors.d.ts +0 -10
- package/lib/typescript/credential/offer/errors.d.ts.map +0 -1
- package/lib/typescript/credential/offer/types.d.ts +0 -264
- package/lib/typescript/credential/offer/types.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +0 -39
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +0 -19
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +0 -19
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +0 -23
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +0 -21
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +0 -21
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +0 -29
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +0 -97
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +0 -98
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/errors.d.ts +0 -73
- package/lib/typescript/credential/presentation/errors.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/types.d.ts +0 -792
- package/lib/typescript/credential/presentation/types.d.ts.map +0 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/status/02-status-assertion.d.ts +0 -24
- package/lib/typescript/credential/status/02-status-assertion.d.ts.map +0 -1
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +0 -22
- package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +0 -1
- package/lib/typescript/credential/status/types.d.ts +0 -782
- package/lib/typescript/credential/status/types.d.ts.map +0 -1
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
- package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts +0 -15
- package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts.map +0 -1
- package/lib/typescript/credentials-catalogue/types.d.ts +0 -844
- package/lib/typescript/credentials-catalogue/types.d.ts.map +0 -1
- package/lib/typescript/pid/index.d.ts +0 -3
- package/lib/typescript/pid/index.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/converters.d.ts +0 -4
- package/lib/typescript/pid/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/index.d.ts +0 -50
- package/lib/typescript/pid/sd-jwt/index.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +0 -196
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/converters.test.d.ts +0 -2
- package/lib/typescript/sd-jwt/__test__/converters.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/index.test.d.ts +0 -2
- package/lib/typescript/sd-jwt/__test__/index.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/converters.d.ts +0 -3
- package/lib/typescript/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/errors.d.ts +0 -20
- package/lib/typescript/sd-jwt/errors.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/verifier.d.ts +0 -3
- package/lib/typescript/sd-jwt/verifier.d.ts.map +0 -1
- package/lib/typescript/trust/build-chain.d.ts +0 -1299
- package/lib/typescript/trust/build-chain.d.ts.map +0 -1
- package/lib/typescript/trust/errors.d.ts +0 -103
- package/lib/typescript/trust/errors.d.ts.map +0 -1
- package/lib/typescript/trust/types.d.ts +0 -15945
- package/lib/typescript/trust/types.d.ts.map +0 -1
- package/lib/typescript/trust/utils.d.ts +0 -22
- package/lib/typescript/trust/utils.d.ts.map +0 -1
- package/lib/typescript/trust/verify-chain.d.ts +0 -39
- package/lib/typescript/trust/verify-chain.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +0 -34
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +0 -715
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +0 -1
- package/src/credential/issuance/01-start-flow.ts +0 -11
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -33
- package/src/credential/issuance/03-start-user-authorization.ts +0 -196
- package/src/credential/issuance/04-complete-user-authorization.ts +0 -372
- package/src/credential/issuance/05-authorize-access.ts +0 -129
- package/src/credential/issuance/06-obtain-credential.ts +0 -254
- package/src/credential/issuance/07-verify-and-parse-credential.ts +0 -572
- package/src/credential/issuance/errors.ts +0 -29
- package/src/credential/issuance/mrtd-pop/types.ts +0 -65
- package/src/credential/issuance/types.ts +0 -43
- package/src/credential/offer/01-start-flow.ts +0 -89
- package/src/credential/offer/02-fetch-credential-offer.ts +0 -54
- package/src/credential/offer/errors.ts +0 -17
- package/src/credential/offer/types.ts +0 -59
- package/src/credential/presentation/01-start-flow.ts +0 -42
- package/src/credential/presentation/02-evaluate-rp-trust.ts +0 -34
- package/src/credential/presentation/03-get-request-object.ts +0 -61
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +0 -34
- package/src/credential/presentation/05-verify-request-object.ts +0 -121
- package/src/credential/presentation/06-fetch-presentation-definition.ts +0 -48
- package/src/credential/presentation/07-evaluate-dcql-query.ts +0 -198
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +0 -408
- package/src/credential/presentation/08-send-authorization-response.ts +0 -329
- package/src/credential/presentation/errors.ts +0 -112
- package/src/credential/presentation/types.ts +0 -169
- package/src/credential/status/01-start-flow.ts +0 -9
- package/src/credential/status/02-status-assertion.ts +0 -115
- package/src/credential/status/03-verify-and-parse-status-assertion.ts +0 -110
- package/src/credential/status/types.ts +0 -90
- package/src/credential/trustmark/get-credential-trustmark.ts +0 -139
- package/src/credentials-catalogue/fetch-and-parse-catalogue.ts +0 -54
- package/src/credentials-catalogue/types.ts +0 -97
- package/src/pid/index.ts +0 -2
- package/src/pid/sd-jwt/converters.ts +0 -20
- package/src/pid/sd-jwt/index.ts +0 -74
- package/src/pid/sd-jwt/types.ts +0 -46
- package/src/sd-jwt/__test__/converters.test.ts +0 -27
- package/src/sd-jwt/__test__/index.test.ts +0 -152
- package/src/sd-jwt/converters.ts +0 -24
- package/src/sd-jwt/errors.ts +0 -39
- package/src/sd-jwt/verifier.ts +0 -18
- package/src/trust/build-chain.ts +0 -398
- package/src/trust/errors.ts +0 -138
- package/src/trust/types.ts +0 -259
- package/src/trust/utils.ts +0 -70
- package/src/trust/verify-chain.ts +0 -267
- package/src/wallet-instance-attestation/issuing.ts +0 -164
- package/src/wallet-instance-attestation/types.ts +0 -85
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.X509ValidationError = exports.TrustChainTokenMissingError = exports.TrustChainRenewalError = exports.TrustChainEmptyError = exports.TrustAnchorKidMissingError = exports.RelyingPartyNotAuthorizedError = exports.MissingX509CertsError = exports.MissingFederationFetchEndpointError = exports.FederationListParseError = exports.FederationError = exports.BuildTrustChainError = void 0;
|
|
7
|
-
var _errors = require("../utils/errors");
|
|
8
|
-
// Ensure this path is correct
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Base class for all federation-specific errors.
|
|
12
|
-
*/
|
|
13
|
-
class FederationError extends _errors.IoWalletError {
|
|
14
|
-
constructor(message, details) {
|
|
15
|
-
super(details ? (0, _errors.serializeAttrs)({
|
|
16
|
-
message,
|
|
17
|
-
...details
|
|
18
|
-
}) : message);
|
|
19
|
-
this.name = this.constructor.name;
|
|
20
|
-
this.details = details;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Error thrown when a trust chain is unexpectedly empty.
|
|
26
|
-
*/
|
|
27
|
-
exports.FederationError = FederationError;
|
|
28
|
-
class TrustChainEmptyError extends FederationError {
|
|
29
|
-
code = "ERR_FED_TRUST_CHAIN_EMPTY";
|
|
30
|
-
constructor() {
|
|
31
|
-
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Trust chain cannot be empty.";
|
|
32
|
-
super(message, undefined);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Error thrown when a token is unexpectedly missing from a trust chain during processing.
|
|
38
|
-
*/
|
|
39
|
-
exports.TrustChainEmptyError = TrustChainEmptyError;
|
|
40
|
-
class TrustChainTokenMissingError extends FederationError {
|
|
41
|
-
code = "ERR_FED_TRUST_CHAIN_TOKEN_MISSING";
|
|
42
|
-
constructor(message, details) {
|
|
43
|
-
super(message, details);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Error thrown when renewing a trust chain fails.
|
|
49
|
-
* This class itself might be used or could be considered a more general renewal error.
|
|
50
|
-
*/
|
|
51
|
-
exports.TrustChainTokenMissingError = TrustChainTokenMissingError;
|
|
52
|
-
class TrustChainRenewalError extends FederationError {
|
|
53
|
-
code = "ERR_FED_TRUST_CHAIN_RENEWAL_FAILED";
|
|
54
|
-
constructor(message, details) {
|
|
55
|
-
super(message, details);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.TrustChainRenewalError = TrustChainRenewalError;
|
|
59
|
-
class FederationListParseError extends FederationError {
|
|
60
|
-
code = "ERR_FED_FEDERATION_LIST_PARSE_FAILED";
|
|
61
|
-
constructor(message, details) {
|
|
62
|
-
super(message, details);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* General error thrown during the trust chain building process.
|
|
68
|
-
*/
|
|
69
|
-
exports.FederationListParseError = FederationListParseError;
|
|
70
|
-
class BuildTrustChainError extends FederationError {
|
|
71
|
-
code = "ERR_FED_BUILD_TRUST_CHAIN_FAILED";
|
|
72
|
-
constructor(message, details) {
|
|
73
|
-
super(message, details);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Error thrown when the Trust Anchor's key is missing a 'kid'.
|
|
79
|
-
*/
|
|
80
|
-
exports.BuildTrustChainError = BuildTrustChainError;
|
|
81
|
-
class TrustAnchorKidMissingError extends FederationError {
|
|
82
|
-
code = "ERR_FED_TRUST_ANCHOR_KID_MISSING";
|
|
83
|
-
constructor() {
|
|
84
|
-
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "Missing 'kid' in provided Trust Anchor key.";
|
|
85
|
-
super(message, undefined);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Error thrown if the Relying Party is not found in the Trust Anchor's federation list.
|
|
91
|
-
*/
|
|
92
|
-
exports.TrustAnchorKidMissingError = TrustAnchorKidMissingError;
|
|
93
|
-
class RelyingPartyNotAuthorizedError extends FederationError {
|
|
94
|
-
code = "ERR_FED_RELYING_PARTY_NOT_AUTHORIZED";
|
|
95
|
-
constructor(message, details) {
|
|
96
|
-
super(message, details);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Error thrown when a 'federation_fetch_endpoint' is missing in an entity's configuration.
|
|
102
|
-
*/
|
|
103
|
-
exports.RelyingPartyNotAuthorizedError = RelyingPartyNotAuthorizedError;
|
|
104
|
-
class MissingFederationFetchEndpointError extends FederationError {
|
|
105
|
-
code = "ERR_FED_MISSING_FEDERATION_FETCH_ENDPOINT";
|
|
106
|
-
constructor(message, details) {
|
|
107
|
-
super(message, details);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Error thrown when the X.509 certificate chain is missing in an entity's configuration.
|
|
113
|
-
*/
|
|
114
|
-
exports.MissingFederationFetchEndpointError = MissingFederationFetchEndpointError;
|
|
115
|
-
class MissingX509CertsError extends FederationError {
|
|
116
|
-
code = "ERR_FED_MISSING_X509_CERTS";
|
|
117
|
-
constructor(message) {
|
|
118
|
-
super(message, undefined);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Error thrown when an X.509 certificate validation fails.
|
|
124
|
-
* This is used to indicate issues with the certificate chain or signature verification.
|
|
125
|
-
*/
|
|
126
|
-
exports.MissingX509CertsError = MissingX509CertsError;
|
|
127
|
-
class X509ValidationError extends FederationError {
|
|
128
|
-
code = "ERR_FED_X509_VALIDATION_FAILED";
|
|
129
|
-
constructor(message, details) {
|
|
130
|
-
super(message, details);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.X509ValidationError = X509ValidationError;
|
|
134
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_errors","require","FederationError","IoWalletError","constructor","message","details","serializeAttrs","name","exports","TrustChainEmptyError","code","arguments","length","undefined","TrustChainTokenMissingError","TrustChainRenewalError","FederationListParseError","BuildTrustChainError","TrustAnchorKidMissingError","RelyingPartyNotAuthorizedError","MissingFederationFetchEndpointError","MissingX509CertsError","X509ValidationError"],"sourceRoot":"../../../src","sources":["trust/errors.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACmF;;AAEnF;AACA;AACA;AACO,MAAMC,eAAe,SAASC,qBAAa,CAAC;EAEjDC,WAAWA,CAACC,OAAe,EAAEC,OAAiC,EAAE;IAC9D,KAAK,CAACA,OAAO,GAAG,IAAAC,sBAAc,EAAC;MAAEF,OAAO;MAAE,GAAGC;IAAQ,CAAC,CAAC,GAAGD,OAAO,CAAC;IAClE,IAAI,CAACG,IAAI,GAAG,IAAI,CAACJ,WAAW,CAACI,IAAI;IACjC,IAAI,CAACF,OAAO,GAAGA,OAAO;EACxB;AACF;;AAEA;AACA;AACA;AAFAG,OAAA,CAAAP,eAAA,GAAAA,eAAA;AAGO,MAAMQ,oBAAoB,SAASR,eAAe,CAAC;EACxDS,IAAI,GAAG,2BAA2B;EAClCP,WAAWA,CAAA,EAA2C;IAAA,IAA1CC,OAAO,GAAAO,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,8BAA8B;IAClD,KAAK,CAACP,OAAO,EAAES,SAAS,CAAC;EAC3B;AACF;;AAEA;AACA;AACA;AAFAL,OAAA,CAAAC,oBAAA,GAAAA,oBAAA;AAGO,MAAMK,2BAA2B,SAASb,eAAe,CAAC;EAC/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sC;EAC7CP,WAAWA,CACTC,OAAe,EACfC,OAAqE,EACrE;IACA,KAAK,CAACD,OAAO,EAAEC,OAAO,CAAC;EACzB;AACF;;AAEA;AACA;AACA;AAFAG,OAAA,CAAAW,8BAAA,GAAAA,8BAAA;AAGO,MAAMC,mCAAmC,SAASnB,eAAe,CAAC;EACvES,IAAI,GAAG,2CAA2C;EAClDP,WAAWA,CACTC,OAAe,EACfC,OAA8D,EAC9D;IACA,KAAK,CAACD,OAAO,EAAEC,OAAO,CAAC;EACzB;AACF;;AAEA;AACA;AACA;AAFAG,OAAA,CAAAY,mCAAA,GAAAA,mCAAA;AAGO,MAAMC,qBAAqB,SAASpB,eAAe,CAAC;EACzDS,IAAI,GAAG,4BAA4B;EACnCP,WAAWA,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,EAAES,SAAS,CAAC;EAC3B;AACF;;AAEA;AACA;AACA;AACA;AAHAL,OAAA,CAAAa,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,mBAAmB,SAASrB,eAAe,CAAC;EACvDS,IAAI,GAAG,gCAAgC;EACvCP,WAAWA,CACTC,OAAe,EACfC,OAMC,EACD;IACA,KAAK,CAACD,OAAO,EAAEC,OAAO,CAAC;EACzB;AACF;AAACG,OAAA,CAAAc,mBAAA,GAAAA,mBAAA"}
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.WalletProviderEntityConfiguration = exports.TrustMark = exports.TrustAnchorEntityConfiguration = exports.RelyingPartyEntityConfiguration = exports.FederationListResponse = exports.EntityStatement = exports.EntityConfigurationHeader = exports.EntityConfiguration = exports.CredentialIssuerEntityConfiguration = void 0;
|
|
7
|
-
var _types = require("../sd-jwt/types");
|
|
8
|
-
var _jwk = require("../utils/jwk");
|
|
9
|
-
var z = _interopRequireWildcard(require("zod"));
|
|
10
|
-
var _types2 = require("../credential/presentation/types");
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
const TrustMark = z.object({
|
|
14
|
-
id: z.string(),
|
|
15
|
-
trust_mark: z.string()
|
|
16
|
-
});
|
|
17
|
-
exports.TrustMark = TrustMark;
|
|
18
|
-
const RelyingPartyMetadata = z.object({
|
|
19
|
-
application_type: z.string().optional(),
|
|
20
|
-
client_id: z.string().optional(),
|
|
21
|
-
client_name: z.string().optional(),
|
|
22
|
-
jwks: z.object({
|
|
23
|
-
keys: z.array(_jwk.JWK)
|
|
24
|
-
}),
|
|
25
|
-
contacts: z.array(z.string()).optional(),
|
|
26
|
-
presentation_definition: _types2.PresentationDefinition.optional(),
|
|
27
|
-
request_uris: z.array(z.string()).optional(),
|
|
28
|
-
authorization_signed_response_alg: z.string().optional(),
|
|
29
|
-
authorization_encrypted_response_alg: z.string().optional(),
|
|
30
|
-
authorization_encrypted_response_enc: z.string().optional()
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Display metadata for a credential, used by the issuer to
|
|
34
|
-
// instruct the Wallet Solution on how to render the credential correctly
|
|
35
|
-
const CredentialDisplayMetadata = z.object({
|
|
36
|
-
name: z.string(),
|
|
37
|
-
locale: z.string()
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
// Metadata for displaying issuer information
|
|
41
|
-
|
|
42
|
-
const CredentialIssuerDisplayMetadata = z.object({
|
|
43
|
-
name: z.string(),
|
|
44
|
-
locale: z.string()
|
|
45
|
-
});
|
|
46
|
-
const ClaimsMetadata = z.object({
|
|
47
|
-
path: z.array(z.union([z.string(), z.number(), z.null()])),
|
|
48
|
-
// https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-15.html#name-claims-path-pointer
|
|
49
|
-
display: z.array(CredentialDisplayMetadata)
|
|
50
|
-
});
|
|
51
|
-
const IssuanceErrorSupported = z.object({
|
|
52
|
-
display: z.array(z.object({
|
|
53
|
-
title: z.string(),
|
|
54
|
-
description: z.string(),
|
|
55
|
-
locale: z.string()
|
|
56
|
-
}))
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// Metadata for a credential which is supported by an Issuer
|
|
60
|
-
|
|
61
|
-
const SupportedCredentialMetadata = z.intersection(z.discriminatedUnion("format", [z.object({
|
|
62
|
-
format: z.literal("dc+sd-jwt"),
|
|
63
|
-
vct: z.string()
|
|
64
|
-
}), z.object({
|
|
65
|
-
format: z.literal("mso_mdoc"),
|
|
66
|
-
doctype: z.string()
|
|
67
|
-
})]), z.object({
|
|
68
|
-
scope: z.string(),
|
|
69
|
-
display: z.array(CredentialDisplayMetadata),
|
|
70
|
-
claims: z.array(ClaimsMetadata),
|
|
71
|
-
cryptographic_binding_methods_supported: z.array(z.string()),
|
|
72
|
-
credential_signing_alg_values_supported: z.array(z.string()),
|
|
73
|
-
authentic_source: z.string().optional(),
|
|
74
|
-
issuance_errors_supported: z.record(IssuanceErrorSupported).optional()
|
|
75
|
-
}));
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Supported formats for credentials issued by the Issuer API 1.0,
|
|
79
|
-
* compliant with IT-Wallet technical specifications 1.0.
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
const EntityStatement = z.object({
|
|
83
|
-
header: z.object({
|
|
84
|
-
typ: z.literal("entity-statement+jwt"),
|
|
85
|
-
alg: z.string(),
|
|
86
|
-
kid: z.string()
|
|
87
|
-
}),
|
|
88
|
-
payload: z.object({
|
|
89
|
-
iss: z.string(),
|
|
90
|
-
sub: z.string(),
|
|
91
|
-
jwks: z.object({
|
|
92
|
-
keys: z.array(_jwk.JWK)
|
|
93
|
-
}),
|
|
94
|
-
trust_marks: z.array(TrustMark).optional(),
|
|
95
|
-
iat: z.number(),
|
|
96
|
-
exp: z.number()
|
|
97
|
-
})
|
|
98
|
-
});
|
|
99
|
-
exports.EntityStatement = EntityStatement;
|
|
100
|
-
const EntityConfigurationHeader = z.object({
|
|
101
|
-
typ: z.literal("entity-statement+jwt"),
|
|
102
|
-
alg: z.string(),
|
|
103
|
-
kid: z.string()
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @see https://openid.net/specs/openid-federation-1_0-41.html
|
|
108
|
-
*/
|
|
109
|
-
exports.EntityConfigurationHeader = EntityConfigurationHeader;
|
|
110
|
-
const FederationEntityMetadata = z.object({
|
|
111
|
-
federation_fetch_endpoint: z.string().optional(),
|
|
112
|
-
federation_list_endpoint: z.string().optional(),
|
|
113
|
-
federation_resolve_endpoint: z.string().optional(),
|
|
114
|
-
federation_trust_mark_status_endpoint: z.string().optional(),
|
|
115
|
-
federation_trust_mark_list_endpoint: z.string().optional(),
|
|
116
|
-
federation_trust_mark_endpoint: z.string().optional(),
|
|
117
|
-
federation_historical_keys_endpoint: z.string().optional(),
|
|
118
|
-
endpoint_auth_signing_alg_values_supported: z.string().optional(),
|
|
119
|
-
organization_name: z.string().optional(),
|
|
120
|
-
homepage_uri: z.string().optional(),
|
|
121
|
-
policy_uri: z.string().optional(),
|
|
122
|
-
logo_uri: z.string().optional(),
|
|
123
|
-
contacts: z.array(z.string()).optional()
|
|
124
|
-
}).passthrough();
|
|
125
|
-
|
|
126
|
-
// Structure common to every Entity Configuration document
|
|
127
|
-
const BaseEntityConfiguration = z.object({
|
|
128
|
-
header: EntityConfigurationHeader,
|
|
129
|
-
payload: z.object({
|
|
130
|
-
iss: z.string(),
|
|
131
|
-
sub: z.string(),
|
|
132
|
-
iat: _types.UnixTime,
|
|
133
|
-
exp: _types.UnixTime,
|
|
134
|
-
authority_hints: z.array(z.string()).optional(),
|
|
135
|
-
metadata: z.object({
|
|
136
|
-
federation_entity: FederationEntityMetadata
|
|
137
|
-
}).passthrough(),
|
|
138
|
-
jwks: z.object({
|
|
139
|
-
keys: z.array(_jwk.JWK)
|
|
140
|
-
})
|
|
141
|
-
}).passthrough()
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// Entity configuration for a Trust Anchor (it has no specific metadata section)
|
|
145
|
-
|
|
146
|
-
const TrustAnchorEntityConfiguration = BaseEntityConfiguration;
|
|
147
|
-
|
|
148
|
-
// Entity configuration for a Credential Issuer
|
|
149
|
-
exports.TrustAnchorEntityConfiguration = TrustAnchorEntityConfiguration;
|
|
150
|
-
const CredentialIssuerEntityConfiguration = BaseEntityConfiguration.and(z.object({
|
|
151
|
-
payload: z.object({
|
|
152
|
-
jwks: z.object({
|
|
153
|
-
keys: z.array(_jwk.JWK)
|
|
154
|
-
}),
|
|
155
|
-
metadata: z.object({
|
|
156
|
-
openid_credential_issuer: z.object({
|
|
157
|
-
credential_issuer: z.string(),
|
|
158
|
-
credential_endpoint: z.string(),
|
|
159
|
-
revocation_endpoint: z.string().optional(),
|
|
160
|
-
nonce_endpoint: z.string(),
|
|
161
|
-
status_attestation_endpoint: z.string(),
|
|
162
|
-
display: z.array(CredentialIssuerDisplayMetadata),
|
|
163
|
-
credential_configurations_supported: z.record(SupportedCredentialMetadata),
|
|
164
|
-
jwks: z.object({
|
|
165
|
-
keys: z.array(_jwk.JWK)
|
|
166
|
-
}),
|
|
167
|
-
trust_frameworks_supported: z.array(z.string()),
|
|
168
|
-
evidence_supported: z.array(z.string())
|
|
169
|
-
}),
|
|
170
|
-
oauth_authorization_server: z.object({
|
|
171
|
-
authorization_endpoint: z.string(),
|
|
172
|
-
pushed_authorization_request_endpoint: z.string(),
|
|
173
|
-
token_endpoint: z.string(),
|
|
174
|
-
client_registration_types_supported: z.array(z.string()),
|
|
175
|
-
code_challenge_methods_supported: z.array(z.string()),
|
|
176
|
-
acr_values_supported: z.array(z.string()),
|
|
177
|
-
grant_types_supported: z.array(z.string()),
|
|
178
|
-
issuer: z.string(),
|
|
179
|
-
jwks: z.object({
|
|
180
|
-
keys: z.array(_jwk.JWK)
|
|
181
|
-
}),
|
|
182
|
-
scopes_supported: z.array(z.string()),
|
|
183
|
-
response_modes_supported: z.array(z.string()),
|
|
184
|
-
token_endpoint_auth_methods_supported: z.array(z.string()),
|
|
185
|
-
token_endpoint_auth_signing_alg_values_supported: z.array(z.string()),
|
|
186
|
-
request_object_signing_alg_values_supported: z.array(z.string())
|
|
187
|
-
}),
|
|
188
|
-
/**
|
|
189
|
-
* Credential Issuers act as Relying Party when they require the presentation of other credentials.
|
|
190
|
-
* This does not apply for PID issuance, which requires CIE authz.
|
|
191
|
-
*/
|
|
192
|
-
openid_credential_verifier: RelyingPartyMetadata.optional()
|
|
193
|
-
})
|
|
194
|
-
})
|
|
195
|
-
}));
|
|
196
|
-
|
|
197
|
-
// Entity configuration for a Relying Party
|
|
198
|
-
exports.CredentialIssuerEntityConfiguration = CredentialIssuerEntityConfiguration;
|
|
199
|
-
const RelyingPartyEntityConfiguration = BaseEntityConfiguration.and(z.object({
|
|
200
|
-
payload: z.object({
|
|
201
|
-
metadata: z.object({
|
|
202
|
-
openid_credential_verifier: RelyingPartyMetadata
|
|
203
|
-
})
|
|
204
|
-
})
|
|
205
|
-
}));
|
|
206
|
-
|
|
207
|
-
// Entity configuration for a Wallet Provider
|
|
208
|
-
exports.RelyingPartyEntityConfiguration = RelyingPartyEntityConfiguration;
|
|
209
|
-
const WalletProviderEntityConfiguration = BaseEntityConfiguration.and(z.object({
|
|
210
|
-
payload: z.object({
|
|
211
|
-
metadata: z.object({
|
|
212
|
-
wallet_provider: z.object({
|
|
213
|
-
token_endpoint: z.string(),
|
|
214
|
-
aal_values_supported: z.array(z.string()).optional(),
|
|
215
|
-
grant_types_supported: z.array(z.string()),
|
|
216
|
-
token_endpoint_auth_methods_supported: z.array(z.string()),
|
|
217
|
-
token_endpoint_auth_signing_alg_values_supported: z.array(z.string()),
|
|
218
|
-
jwks: z.object({
|
|
219
|
-
keys: z.array(_jwk.JWK)
|
|
220
|
-
})
|
|
221
|
-
}).passthrough()
|
|
222
|
-
})
|
|
223
|
-
})
|
|
224
|
-
}));
|
|
225
|
-
|
|
226
|
-
// Maps any entity configuration by the union of every possible shapes
|
|
227
|
-
exports.WalletProviderEntityConfiguration = WalletProviderEntityConfiguration;
|
|
228
|
-
const EntityConfiguration = z.union([WalletProviderEntityConfiguration, CredentialIssuerEntityConfiguration, TrustAnchorEntityConfiguration, RelyingPartyEntityConfiguration], {
|
|
229
|
-
description: "Any kind of Entity Configuration allowed in the ecosystem"
|
|
230
|
-
});
|
|
231
|
-
exports.EntityConfiguration = EntityConfiguration;
|
|
232
|
-
const FederationListResponse = z.array(z.string());
|
|
233
|
-
exports.FederationListResponse = FederationListResponse;
|
|
234
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_types2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","contacts","presentation_definition","PresentationDefinition","request_uris","authorization_signed_response_alg","authorization_encrypted_response_alg","authorization_encrypted_response_enc","CredentialDisplayMetadata","name","locale","CredentialIssuerDisplayMetadata","ClaimsMetadata","path","union","number","null","display","IssuanceErrorSupported","title","description","SupportedCredentialMetadata","intersection","discriminatedUnion","format","literal","vct","doctype","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","authentic_source","issuance_errors_supported","record","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","federation_trust_mark_endpoint","federation_historical_keys_endpoint","endpoint_auth_signing_alg_values_supported","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","UnixTime","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","nonce_endpoint","status_attestation_endpoint","credential_configurations_supported","trust_frameworks_supported","evidence_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","token_endpoint","client_registration_types_supported","code_challenge_methods_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","response_modes_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","openid_credential_verifier","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","FederationListResponse"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA0E,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,Y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AA,GAAAA,iCAAA;AAEO,MAAMG,mBAAmB,GAAGxI,CAAC,CAACqD,KAAK,CACxC,CACEgF,iCAAiC,EACjC3B,mCAAmC,EACnCD,8BAA8B,EAC9B2B,+BAA+B,CAChC,EACD;EACEzE,WAAW,EAAE;AACf,CACF,CAAC;AAAC7B,OAAA,CAAA0G,mBAAA,GAAAA,mBAAA;AAEK,MAAMC,sBAAsB,GAAGzI,CAAC,CAACsC,KAAK,CAACtC,CAAC,CAAC4B,MAAM,CAAC,CAAC,CAAC;AAACE,OAAA,CAAA2G,sBAAA,GAAAA,sBAAA"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.decode = void 0;
|
|
7
|
-
exports.getTrustAnchorX509Certificate = getTrustAnchorX509Certificate;
|
|
8
|
-
exports.verify = void 0;
|
|
9
|
-
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
|
10
|
-
var _errors = require("./errors");
|
|
11
|
-
// Verify a token signature
|
|
12
|
-
// The kid is extracted from the token header
|
|
13
|
-
const verify = async (token, kid, jwks) => {
|
|
14
|
-
const jwk = jwks.find(k => k.kid === kid);
|
|
15
|
-
if (!jwk) {
|
|
16
|
-
throw new Error(`Invalid kid: ${kid}, token: ${token}`);
|
|
17
|
-
}
|
|
18
|
-
const {
|
|
19
|
-
protectedHeader: header,
|
|
20
|
-
payload
|
|
21
|
-
} = await (0, _ioReactNativeJwt.verify)(token, jwk);
|
|
22
|
-
return {
|
|
23
|
-
header,
|
|
24
|
-
payload
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Return type for this function is necessary to avoid an issue during the bob build process.
|
|
30
|
-
* It seems like typescript can't correctly infer the return type of the function.
|
|
31
|
-
*/
|
|
32
|
-
exports.verify = verify;
|
|
33
|
-
const decode = token => {
|
|
34
|
-
const {
|
|
35
|
-
protectedHeader: header,
|
|
36
|
-
payload
|
|
37
|
-
} = (0, _ioReactNativeJwt.decode)(token);
|
|
38
|
-
return {
|
|
39
|
-
header,
|
|
40
|
-
payload
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Extracts the X.509 Trust Anchor certificate (Base64 encoded) from the
|
|
46
|
-
* Trust Anchor's Entity Configuration.
|
|
47
|
-
*
|
|
48
|
-
* @param trustAnchorEntity The entity configuration of the known trust anchor.
|
|
49
|
-
* @returns The Base64 encoded X.509 certificate string.
|
|
50
|
-
* @throws {FederationError} If the certificate cannot be derived.
|
|
51
|
-
*/
|
|
52
|
-
exports.decode = decode;
|
|
53
|
-
function getTrustAnchorX509Certificate(trustAnchorEntity) {
|
|
54
|
-
const taHeaderKid = trustAnchorEntity.header.kid;
|
|
55
|
-
const taSigningJwk = trustAnchorEntity.payload.jwks.keys.find(key => key.kid === taHeaderKid);
|
|
56
|
-
if (!taSigningJwk) {
|
|
57
|
-
throw new _errors.FederationError(`Cannot derive X.509 Trust Anchor certificate: JWK with kid '${taHeaderKid}' not found in Trust Anchor's JWKS.`, {
|
|
58
|
-
trustAnchorKid: taHeaderKid,
|
|
59
|
-
reason: "JWK not found for header kid"
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (taSigningJwk.x5c && taSigningJwk.x5c.length > 0 && taSigningJwk.x5c[0]) {
|
|
63
|
-
return taSigningJwk.x5c[0];
|
|
64
|
-
}
|
|
65
|
-
throw new _errors.FederationError(`Cannot derive X.509 Trust Anchor certificate: JWK with kid '${taHeaderKid}' does not contain a valid 'x5c' certificate array.`, {
|
|
66
|
-
trustAnchorKid: taHeaderKid,
|
|
67
|
-
reason: "Missing or empty x5c in JWK"
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_errors","verify","token","kid","jwks","jwk","find","k","Error","protectedHeader","header","payload","verifyJwt","exports","decode","decodeJwt","getTrustAnchorX509Certificate","trustAnchorEntity","taHeaderKid","taSigningJwk","keys","key","FederationError","trustAnchorKid","reason","x5c","length"],"sourceRoot":"../../../src","sources":["trust/utils.ts"],"mappings":";;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAMA,IAAAC,OAAA,GAAAD,OAAA;AAQA;AACA;AACO,MAAME,MAAM,GAAG,MAAAA,CACpBC,KAAa,EACbC,GAAW,EACXC,IAAW,KACc;EACzB,MAAMC,GAAG,GAAGD,IAAI,CAACE,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACJ,GAAG,KAAKA,GAAG,CAAC;EAC3C,IAAI,CAACE,GAAG,EAAE;IACR,MAAM,IAAIG,KAAK,CAAE,gBAAeL,GAAI,YAAWD,KAAM,EAAC,CAAC;EACzD;EACA,MAAM;IAAEO,eAAe,EAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,MAAM,IAAAC,wBAAS,EAACV,KAAK,EAAEG,GAAG,CAAC;EACxE,OAAO;IAAEK,MAAM;IAAEC;EAAQ,CAAC;AAC5B,CAAC;;AAED;AACA;AACA;AACA;AAHAE,OAAA,CAAAZ,MAAA,GAAAA,MAAA;AAIO,MAAMa,MAAM,GAAIZ,KAAa,IAAkB;EACpD,MAAM;IAAEO,eAAe,EAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAI,wBAAS,EAACb,KAAK,CAAC;EAC7D,OAAO;IAAEQ,MAAM;IAAEC;EAAQ,CAAC;AAC5B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPAE,OAAA,CAAAC,MAAA,GAAAA,MAAA;AAQO,SAASE,6BAA6BA,CAC3CC,iBAAiD,EACzC;EACR,MAAMC,WAAW,GAAGD,iBAAiB,CAACP,MAAM,CAACP,GAAG;EAChD,MAAMgB,YAAY,GAAGF,iBAAiB,CAACN,OAAO,CAACP,IAAI,CAACgB,IAAI,CAACd,IAAI,CAC1De,GAAG,IAAKA,GAAG,CAAClB,GAAG,KAAKe,WACvB,CAAC;EAED,IAAI,CAACC,YAAY,EAAE;IACjB,MAAM,IAAIG,uBAAe,CACtB,+DAA8DJ,WAAY,qCAAoC,EAC/G;MAAEK,cAAc,EAAEL,WAAW;MAAEM,MAAM,EAAE;IAA+B,CACxE,CAAC;EACH;EAEA,IAAIL,YAAY,CAACM,GAAG,IAAIN,YAAY,CAACM,GAAG,CAACC,MAAM,GAAG,CAAC,IAAIP,YAAY,CAACM,GAAG,CAAC,CAAC,CAAC,EAAE;IAC1E,OAAON,YAAY,CAACM,GAAG,CAAC,CAAC,CAAC;EAC5B;EAEA,MAAM,IAAIH,uBAAe,CACtB,+DAA8DJ,WAAY,qDAAoD,EAC/H;IAAEK,cAAc,EAAEL,WAAW;IAAEM,MAAM,EAAE;EAA8B,CACvE,CAAC;AACH"}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.renewTrustChain = renewTrustChain;
|
|
7
|
-
exports.validateTrustChain = validateTrustChain;
|
|
8
|
-
exports.verifyTrustChain = verifyTrustChain;
|
|
9
|
-
var _types = require("./types");
|
|
10
|
-
var z = _interopRequireWildcard(require("zod"));
|
|
11
|
-
var _utils = require("./utils");
|
|
12
|
-
var _errors = require("./errors");
|
|
13
|
-
var _ioReactNativeCrypto = require("@pagopa/io-react-native-crypto");
|
|
14
|
-
var _buildChain = require("./build-chain");
|
|
15
|
-
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); }
|
|
16
|
-
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; }
|
|
17
|
-
// The first element of the chain is supposed to be the Entity Configuration for the document issuer
|
|
18
|
-
const FirstElementShape = _types.EntityConfiguration;
|
|
19
|
-
// Each element but the first is supposed to be an Entity Statement
|
|
20
|
-
const MiddleElementShape = _types.EntityStatement;
|
|
21
|
-
// The last element of the chain can either be an Entity Statement
|
|
22
|
-
// or the Entity Configuration for the known Trust Anchor
|
|
23
|
-
const LastElementShape = z.union([_types.EntityStatement, _types.TrustAnchorEntityConfiguration]);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Validates a provided trust chain against a known trust anchor, including X.509 certificate checks.
|
|
27
|
-
*
|
|
28
|
-
* @param trustAnchorEntity The entity configuration of the known trust anchor (for JWT validation).
|
|
29
|
-
* @param chain The chain of statements to be validated.
|
|
30
|
-
* @param x509Options Options for X.509 certificate validation.
|
|
31
|
-
* @returns The list of parsed tokens representing the chain.
|
|
32
|
-
* @throws {FederationError} If the chain is not valid (JWT or X.509). Specific errors like TrustChainEmptyError, X509ValidationError may be thrown.
|
|
33
|
-
*/
|
|
34
|
-
async function validateTrustChain(trustAnchorEntity, chain, x509Options) {
|
|
35
|
-
// If the chain is empty, fail
|
|
36
|
-
if (chain.length === 0) {
|
|
37
|
-
throw new _errors.TrustChainEmptyError("Cannot verify empty trust chain.");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Select the expected token shape
|
|
41
|
-
const selectTokenShape = elementIndex => elementIndex === 0 ? FirstElementShape : elementIndex === chain.length - 1 ? LastElementShape : MiddleElementShape;
|
|
42
|
-
|
|
43
|
-
// Select the kid from the current index
|
|
44
|
-
const selectKid = currentIndex => {
|
|
45
|
-
const token = chain[currentIndex];
|
|
46
|
-
if (!token) {
|
|
47
|
-
throw new _errors.TrustChainTokenMissingError(`Token missing at index ${currentIndex} in trust chain.`, {
|
|
48
|
-
index: currentIndex
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
const shape = selectTokenShape(currentIndex);
|
|
52
|
-
return shape.parse((0, _utils.decode)(token)).header.kid;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// Select keys from the next token
|
|
56
|
-
// If the current token is the last, keys from trust anchor will be used
|
|
57
|
-
const selectKeys = currentIndex => {
|
|
58
|
-
if (currentIndex === chain.length - 1) {
|
|
59
|
-
return trustAnchorEntity.payload.jwks.keys;
|
|
60
|
-
}
|
|
61
|
-
const nextIndex = currentIndex + 1;
|
|
62
|
-
const nextToken = chain[nextIndex];
|
|
63
|
-
if (!nextToken) {
|
|
64
|
-
throw new _errors.TrustChainTokenMissingError(`Next token missing at index ${nextIndex} (needed for keys for token at ${currentIndex}).`, {
|
|
65
|
-
index: nextIndex
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
const shape = selectTokenShape(nextIndex);
|
|
69
|
-
return shape.parse((0, _utils.decode)(nextToken)).payload.jwks.keys;
|
|
70
|
-
};
|
|
71
|
-
const x509TrustAnchorCertBase64 = (0, _utils.getTrustAnchorX509Certificate)(trustAnchorEntity);
|
|
72
|
-
|
|
73
|
-
// Iterate the chain and validate each element's signature against the public keys of its next
|
|
74
|
-
// If there is no next, hence it's the end of the chain, and it must be verified by the Trust Anchor
|
|
75
|
-
const validationPromises = chain.map(async (tokenString, i) => {
|
|
76
|
-
const kidFromTokenHeader = selectKid(i);
|
|
77
|
-
const signerJwks = selectKeys(i);
|
|
78
|
-
|
|
79
|
-
// Step 1: Verify JWT signature
|
|
80
|
-
const parsedToken = await (0, _utils.verify)(tokenString, kidFromTokenHeader, signerJwks);
|
|
81
|
-
|
|
82
|
-
// Step 2: X.509 Certificate Chain Validation
|
|
83
|
-
const jwkUsedForVerification = signerJwks.find(k => k.kid === kidFromTokenHeader);
|
|
84
|
-
if (!jwkUsedForVerification) {
|
|
85
|
-
throw new _errors.FederationError(`JWK with kid '${kidFromTokenHeader}' was not found in signer's JWKS for token at index ${i}, though JWT verification passed.`, {
|
|
86
|
-
tokenIndex: i,
|
|
87
|
-
kid: kidFromTokenHeader
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
if (!jwkUsedForVerification.x5c || jwkUsedForVerification.x5c.length === 0) {
|
|
91
|
-
throw new _errors.MissingX509CertsError(`JWK with kid '${kidFromTokenHeader}' does not contain an X.509 certificate chain (x5c) for token at index ${i}.`);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// If the chain has more than one certificate AND
|
|
95
|
-
// the last certificate in the x5c chain is the same as the trust anchor,
|
|
96
|
-
// remove the anchor from the chain being passed, as it's supplied separately.
|
|
97
|
-
const certChainBase64 = jwkUsedForVerification.x5c.length > 1 && jwkUsedForVerification.x5c.at(-1) === x509TrustAnchorCertBase64 ? jwkUsedForVerification.x5c.slice(0, -1) : jwkUsedForVerification.x5c;
|
|
98
|
-
const x509ValidationResult = await (0, _ioReactNativeCrypto.verifyCertificateChain)(certChainBase64, x509TrustAnchorCertBase64, x509Options);
|
|
99
|
-
if (!x509ValidationResult.isValid) {
|
|
100
|
-
throw new _errors.X509ValidationError(`X.509 certificate chain validation failed for token at index ${i} (kid: ${kidFromTokenHeader}). Status: ${x509ValidationResult.validationStatus}. Error: ${x509ValidationResult.errorMessage}`, {
|
|
101
|
-
tokenIndex: i,
|
|
102
|
-
kid: kidFromTokenHeader,
|
|
103
|
-
x509ValidationStatus: x509ValidationResult.validationStatus,
|
|
104
|
-
x509ErrorMessage: x509ValidationResult.errorMessage
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return parsedToken;
|
|
108
|
-
});
|
|
109
|
-
return Promise.all(validationPromises);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Given a trust chain, obtain a new trust chain by fetching each element's fresh version
|
|
114
|
-
*
|
|
115
|
-
* @param chain The original chain
|
|
116
|
-
* @param appFetch (optional) fetch api implementation
|
|
117
|
-
* @returns A list of signed token that represent the trust chain, in the same order of the provided chain
|
|
118
|
-
* @throws {FederationError} If the chain is not valid
|
|
119
|
-
*/
|
|
120
|
-
async function renewTrustChain(chain) {
|
|
121
|
-
let appFetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : fetch;
|
|
122
|
-
return Promise.all(chain.map(async (token, index) => {
|
|
123
|
-
const decoded = (0, _utils.decode)(token);
|
|
124
|
-
const entityStatementResult = _types.EntityStatement.safeParse(decoded);
|
|
125
|
-
const entityConfigurationResult = _types.EntityConfiguration.safeParse(decoded);
|
|
126
|
-
if (entityConfigurationResult.success) {
|
|
127
|
-
return (0, _buildChain.getSignedEntityConfiguration)(entityConfigurationResult.data.payload.iss, {
|
|
128
|
-
appFetch
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
if (entityStatementResult.success) {
|
|
132
|
-
const entityStatement = entityStatementResult.data;
|
|
133
|
-
const parentBaseUrl = entityStatement.payload.iss;
|
|
134
|
-
const parentECJwt = await (0, _buildChain.getSignedEntityConfiguration)(parentBaseUrl, {
|
|
135
|
-
appFetch
|
|
136
|
-
});
|
|
137
|
-
const parentEC = _types.EntityConfiguration.parse((0, _utils.decode)(parentECJwt));
|
|
138
|
-
const federationFetchEndpoint = parentEC.payload.metadata.federation_entity.federation_fetch_endpoint;
|
|
139
|
-
if (!federationFetchEndpoint) {
|
|
140
|
-
throw new _errors.MissingFederationFetchEndpointError(`Parent EC at ${parentBaseUrl} is missing federation_fetch_endpoint, cannot renew ES for ${entityStatement.payload.sub}.`, {
|
|
141
|
-
entityBaseUrl: entityStatement.payload.sub,
|
|
142
|
-
missingInEntityUrl: parentBaseUrl
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
return (0, _buildChain.getSignedEntityStatement)(federationFetchEndpoint, entityStatement.payload.sub, {
|
|
146
|
-
appFetch
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
throw new _errors.TrustChainRenewalError(`Failed to renew trust chain. Reason: element #${index} failed to parse.`, {
|
|
150
|
-
originalChain: chain
|
|
151
|
-
});
|
|
152
|
-
}));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Verify a given trust chain is actually valid.
|
|
157
|
-
* It can handle fast chain renewal, which means we try to fetch a fresh version of each statement.
|
|
158
|
-
*
|
|
159
|
-
* @param trustAnchorEntity The entity configuration of the known trust anchor
|
|
160
|
-
* @param chain The chain of statements to be validated
|
|
161
|
-
* @param x509Options Options for the verification process
|
|
162
|
-
* @param appFetch (optional) fetch api implementation
|
|
163
|
-
* @param renewOnFail Whether to attempt to renew the trust chain if the initial validation fails
|
|
164
|
-
* @returns The result of the chain validation
|
|
165
|
-
* @throws {FederationError} If the chain is not valid
|
|
166
|
-
*/
|
|
167
|
-
async function verifyTrustChain(trustAnchorEntity, chain) {
|
|
168
|
-
let x509Options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
169
|
-
connectTimeout: 10000,
|
|
170
|
-
readTimeout: 10000,
|
|
171
|
-
requireCrl: true
|
|
172
|
-
};
|
|
173
|
-
let {
|
|
174
|
-
appFetch = fetch,
|
|
175
|
-
renewOnFail = true
|
|
176
|
-
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
177
|
-
try {
|
|
178
|
-
return validateTrustChain(trustAnchorEntity, chain, x509Options);
|
|
179
|
-
} catch (error) {
|
|
180
|
-
if (renewOnFail) {
|
|
181
|
-
const renewedChain = await renewTrustChain(chain, appFetch);
|
|
182
|
-
return validateTrustChain(trustAnchorEntity, renewedChain, x509Options);
|
|
183
|
-
} else {
|
|
184
|
-
throw error;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=verify-chain.js.map
|