@pagopa/io-react-native-wallet 2.5.0 → 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/client/generated/wallet-provider.js +48 -42
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/client/index.js +1 -1
- package/lib/commonjs/client/index.js.map +1 -1
- 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 -81
- 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/client/generated/wallet-provider.js +37 -31
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/client/index.js +2 -2
- package/lib/module/client/index.js.map +1 -1
- 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 -78
- 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 +141 -138
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- 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 +41 -6
- 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 -34
- 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/client/generated/wallet-provider.ts +53 -46
- package/src/client/index.ts +3 -3
- 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 +72 -9
- 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 -118
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["z","UnixTime","CredentialPurpose","object","id","string","description","category","subcategory","claims_required","array","claim_recommended","CredentialIssuer","organization_name","organization_code","organization_country","contacts","optional","homepage_uri","logo_uri","policy_uri","tos_uri","AuthenticSource","source_type","enum","user_information","CredentialFormat","configuration_id","format","vct","url","docType","schema_uri","Claim","name","taxonomy_ref","display_name","DigitalCredential","version","credential_type","legal_type","validity_info","max_validity_days","number","status_methods","allowed_states","authentication","user_auth_required","boolean","min_loa","supported_eid_schemes","purposes","issuers","authentic_sources","formats","claims","DigitalCredentialsCatalogue","header","typ","alg","kid","payload","catalog_version","taxonomy_uri","credentials","iat","exp"],"sourceRoot":"../../../src","sources":["credentials-catalogue/types.ts"],"mappings":"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"}
|
package/lib/module/pid/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["SdJwt"],"sourceRoot":"../../../src","sources":["pid/index.ts"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,UAAU;AACjC,SAASA,KAAK"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getValueFromDisclosures } from "../../sd-jwt/converters";
|
|
2
|
-
import { PID } from "./types";
|
|
3
|
-
export function pidFromToken(sdJwt, disclosures) {
|
|
4
|
-
const placeOfBirth = getValueFromDisclosures(disclosures, "place_of_birth");
|
|
5
|
-
return PID.parse({
|
|
6
|
-
issuer: sdJwt.payload.iss,
|
|
7
|
-
issuedAt: new Date(getValueFromDisclosures(disclosures, "iat") * 1000),
|
|
8
|
-
expiration: new Date(sdJwt.payload.exp * 1000),
|
|
9
|
-
claims: {
|
|
10
|
-
uniqueId: getValueFromDisclosures(disclosures, "unique_id"),
|
|
11
|
-
givenName: getValueFromDisclosures(disclosures, "given_name"),
|
|
12
|
-
familyName: getValueFromDisclosures(disclosures, "family_name"),
|
|
13
|
-
birthDate: getValueFromDisclosures(disclosures, "birth_date"),
|
|
14
|
-
...(placeOfBirth && placeOfBirth),
|
|
15
|
-
taxIdCode: getValueFromDisclosures(disclosures, "tax_id_code")
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=converters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getValueFromDisclosures","PID","pidFromToken","sdJwt","disclosures","placeOfBirth","parse","issuer","payload","iss","issuedAt","Date","expiration","exp","claims","uniqueId","givenName","familyName","birthDate","taxIdCode"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/converters.ts"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,yBAAyB;AAEjE,SAASC,GAAG,QAAQ,SAAS;AAE7B,OAAO,SAASC,YAAYA,CAACC,KAAe,EAAEC,WAAyB,EAAO;EAC5E,MAAMC,YAAY,GAAGL,uBAAuB,CAACI,WAAW,EAAE,gBAAgB,CAAC;EAC3E,OAAOH,GAAG,CAACK,KAAK,CAAC;IACfC,MAAM,EAAEJ,KAAK,CAACK,OAAO,CAACC,GAAG;IACzBC,QAAQ,EAAE,IAAIC,IAAI,CAACX,uBAAuB,CAACI,WAAW,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;IACtEQ,UAAU,EAAE,IAAID,IAAI,CAACR,KAAK,CAACK,OAAO,CAACK,GAAG,GAAG,IAAI,CAAC;IAC9CC,MAAM,EAAE;MACNC,QAAQ,EAAEf,uBAAuB,CAACI,WAAW,EAAE,WAAW,CAAC;MAC3DY,SAAS,EAAEhB,uBAAuB,CAACI,WAAW,EAAE,YAAY,CAAC;MAC7Da,UAAU,EAAEjB,uBAAuB,CAACI,WAAW,EAAE,aAAa,CAAC;MAC/Dc,SAAS,EAAElB,uBAAuB,CAACI,WAAW,EAAE,YAAY,CAAC;MAC7D,IAAIC,YAAY,IAAIA,YAAY,CAAC;MACjCc,SAAS,EAAEnB,uBAAuB,CAACI,WAAW,EAAE,aAAa;IAC/D;EACF,CAAC,CAAC;AACJ"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { decode as decodeJwt, verify as verifyJwt } from "../../sd-jwt";
|
|
2
|
-
import { pidFromToken } from "./converters";
|
|
3
|
-
import { SdJwt4VC } from "../../sd-jwt/types";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Decode a given SD-JWT with Disclosures to get the parsed PID object they define.
|
|
7
|
-
* It ensures provided data is in a valid shape.
|
|
8
|
-
*
|
|
9
|
-
* It DOES NOT verify token signature nor check disclosures are correctly referenced by the SD-JWT.
|
|
10
|
-
* Use {@link verify} instead
|
|
11
|
-
*
|
|
12
|
-
* @function
|
|
13
|
-
* @param token The encoded token that represents a valid sd-jwt for verifiable credentials
|
|
14
|
-
*
|
|
15
|
-
* @returns The validated PID object along with the parsed SD-JWT token and the parsed disclosures
|
|
16
|
-
* @throws A decoding error if the token doesn't resolve in a valid SD-JWT
|
|
17
|
-
* @throws A validation error if the provided data doesn't result in a valid PID
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
export function decode(token) {
|
|
21
|
-
let {
|
|
22
|
-
sdJwt,
|
|
23
|
-
disclosures: disclosuresWithOriginal
|
|
24
|
-
} = decodeJwt(token, SdJwt4VC);
|
|
25
|
-
const disclosures = disclosuresWithOriginal.map(d => d.decoded);
|
|
26
|
-
const pid = pidFromToken(sdJwt, disclosures);
|
|
27
|
-
return {
|
|
28
|
-
pid,
|
|
29
|
-
sdJwt,
|
|
30
|
-
disclosures
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Verify a given SD-JWT with Disclosures to get the parsed PID object they define.
|
|
36
|
-
* Same as {@link decode} plus:
|
|
37
|
-
* - token signature verification
|
|
38
|
-
* - ensure disclosures are well-defined inside the SD-JWT
|
|
39
|
-
*
|
|
40
|
-
* @async @function
|
|
41
|
-
*
|
|
42
|
-
* @todo implement signature validation
|
|
43
|
-
* @todo check disclosures in sd-jwt
|
|
44
|
-
*
|
|
45
|
-
* @param token The encoded token that represents a valid sd-jwt for verifiable credentials
|
|
46
|
-
*
|
|
47
|
-
* @returns {VerifyResult} The validated PID object along with the parsed SD-JWT token and the parsed disclosures
|
|
48
|
-
* @throws A decoding error if the token doesn't resolve in a valid SD-JWT
|
|
49
|
-
* @throws A validation error if the provided data doesn't result in a valid PID
|
|
50
|
-
* @throws A validation error if the provided disclosures are not defined in the SD-JWT
|
|
51
|
-
* @throws Invalid signature error if the token signature is not valid
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
export async function verify(token) {
|
|
55
|
-
const decoded = decode(token);
|
|
56
|
-
const publicKey = decoded.sdJwt.payload.cnf.jwk;
|
|
57
|
-
await verifyJwt(token, publicKey, SdJwt4VC);
|
|
58
|
-
return decoded;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Result object for {@link verify}
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
export { PID } from "./types";
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["decode","decodeJwt","verify","verifyJwt","pidFromToken","SdJwt4VC","token","sdJwt","disclosures","disclosuresWithOriginal","map","d","decoded","pid","publicKey","payload","cnf","jwk","PID"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/index.ts"],"mappings":"AAAA,SAASA,MAAM,IAAIC,SAAS,EAAEC,MAAM,IAAIC,SAAS,QAAQ,cAAc;AAEvE,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAAqBC,QAAQ,QAAQ,oBAAoB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASL,MAAMA,CAACM,KAAa,EAAgB;EAClD,IAAI;IAAEC,KAAK;IAAEC,WAAW,EAAEC;EAAwB,CAAC,GAAGR,SAAS,CAC7DK,KAAK,EACLD,QACF,CAAC;EACD,MAAMG,WAAW,GAAGC,uBAAuB,CAACC,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,OAAO,CAAC;EACjE,MAAMC,GAAG,GAAGT,YAAY,CAACG,KAAK,EAAEC,WAAW,CAAC;EAE5C,OAAO;IAAEK,GAAG;IAAEN,KAAK;IAAEC;EAAY,CAAC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeN,MAAMA,CAACI,KAAa,EAAyB;EACjE,MAAMM,OAAO,GAAGZ,MAAM,CAACM,KAAK,CAAC;EAC7B,MAAMQ,SAAS,GAAGF,OAAO,CAACL,KAAK,CAACQ,OAAO,CAACC,GAAG,CAACC,GAAG;EAC/C,MAAMd,SAAS,CAACG,KAAK,EAAEQ,SAAS,EAAET,QAAQ,CAAC;EAE3C,OAAOO,OAAO;AAChB;;AAWA;AACA;AACA;;AAGA,SAASM,GAAG,QAAQ,SAAS"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
const VerificationEvidence = z.object({
|
|
3
|
-
type: z.string(),
|
|
4
|
-
record: z.object({
|
|
5
|
-
type: z.string(),
|
|
6
|
-
source: z.object({
|
|
7
|
-
organization_name: z.string(),
|
|
8
|
-
organization_id: z.string(),
|
|
9
|
-
country_code: z.string()
|
|
10
|
-
})
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
const Verification = z.object({
|
|
14
|
-
trustFramework: z.literal("eidas"),
|
|
15
|
-
assuranceLevel: z.string(),
|
|
16
|
-
evidence: z.array(VerificationEvidence)
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Data structure for the PID.
|
|
21
|
-
* It contains PID claims in plain text as well as verification data with the issuer's information
|
|
22
|
-
*
|
|
23
|
-
* @see https://italia.github.io/eidas-it-wallet-docs/en/pid-data-model.html
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export const PID = z.object({
|
|
27
|
-
issuer: z.string(),
|
|
28
|
-
issuedAt: z.date(),
|
|
29
|
-
expiration: z.date(),
|
|
30
|
-
verification: Verification.optional(),
|
|
31
|
-
claims: z.object({
|
|
32
|
-
uniqueId: z.string(),
|
|
33
|
-
givenName: z.string(),
|
|
34
|
-
familyName: z.string(),
|
|
35
|
-
birthDate: z.string(),
|
|
36
|
-
placeOfBirth: z.object({
|
|
37
|
-
country: z.string(),
|
|
38
|
-
locality: z.string()
|
|
39
|
-
}).optional(),
|
|
40
|
-
taxIdCode: z.string()
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["z","VerificationEvidence","object","type","string","record","source","organization_name","organization_id","country_code","Verification","trustFramework","literal","assuranceLevel","evidence","array","PID","issuer","issuedAt","date","expiration","verification","optional","claims","uniqueId","givenName","familyName","birthDate","placeOfBirth","country","locality","taxIdCode"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/types.ts"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,MAAMC,oBAAoB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACpCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAChBC,MAAM,EAAEL,CAAC,CAACE,MAAM,CAAC;IACfC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;IAChBE,MAAM,EAAEN,CAAC,CAACE,MAAM,CAAC;MACfK,iBAAiB,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC;MAC7BI,eAAe,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC;MAC3BK,YAAY,EAAET,CAAC,CAACI,MAAM,CAAC;IACzB,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAMM,YAAY,GAAGV,CAAC,CAACE,MAAM,CAAC;EAC5BS,cAAc,EAAEX,CAAC,CAACY,OAAO,CAAC,OAAO,CAAC;EAClCC,cAAc,EAAEb,CAAC,CAACI,MAAM,CAAC,CAAC;EAC1BU,QAAQ,EAAEd,CAAC,CAACe,KAAK,CAACd,oBAAoB;AACxC,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMe,GAAG,GAAGhB,CAAC,CAACE,MAAM,CAAC;EAC1Be,MAAM,EAAEjB,CAAC,CAACI,MAAM,CAAC,CAAC;EAClBc,QAAQ,EAAElB,CAAC,CAACmB,IAAI,CAAC,CAAC;EAClBC,UAAU,EAAEpB,CAAC,CAACmB,IAAI,CAAC,CAAC;EACpBE,YAAY,EAAEX,YAAY,CAACY,QAAQ,CAAC,CAAC;EACrCC,MAAM,EAAEvB,CAAC,CAACE,MAAM,CAAC;IACfsB,QAAQ,EAAExB,CAAC,CAACI,MAAM,CAAC,CAAC;IACpBqB,SAAS,EAAEzB,CAAC,CAACI,MAAM,CAAC,CAAC;IACrBsB,UAAU,EAAE1B,CAAC,CAACI,MAAM,CAAC,CAAC;IACtBuB,SAAS,EAAE3B,CAAC,CAACI,MAAM,CAAC,CAAC;IACrBwB,YAAY,EAAE5B,CAAC,CACZE,MAAM,CAAC;MACN2B,OAAO,EAAE7B,CAAC,CAACI,MAAM,CAAC,CAAC;MACnB0B,QAAQ,EAAE9B,CAAC,CAACI,MAAM,CAAC;IACrB,CAAC,CAAC,CACDkB,QAAQ,CAAC,CAAC;IACbS,SAAS,EAAE/B,CAAC,CAACI,MAAM,CAAC;EACtB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getValueFromDisclosures } from "../converters";
|
|
2
|
-
const disclosures = [["6w1_soRXFgaHKfpYn3cvfQ", "given_name", "Mario"], ["fuNp97Hf3wV6y48y-QZhIg", "birth_date", "1980-10-01"], ["p-9LzyWHZBVDvhXDWkN2xA", "place_of_birth", {
|
|
3
|
-
country: "IT",
|
|
4
|
-
locality: "Rome"
|
|
5
|
-
}]];
|
|
6
|
-
describe("getValueFromDisclosures", () => {
|
|
7
|
-
it("should return correct value for given_name", () => {
|
|
8
|
-
const success = getValueFromDisclosures(disclosures, "given_name");
|
|
9
|
-
expect(success).toBe("Mario");
|
|
10
|
-
});
|
|
11
|
-
it("should return correct value for place_of_birth", () => {
|
|
12
|
-
const success = getValueFromDisclosures(disclosures, "place_of_birth");
|
|
13
|
-
expect(success).toEqual({
|
|
14
|
-
country: "IT",
|
|
15
|
-
locality: "Rome"
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
it("should fail", () => {
|
|
19
|
-
const success = getValueFromDisclosures(disclosures, "given_surname");
|
|
20
|
-
expect(success).toBeUndefined();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
//# sourceMappingURL=converters.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getValueFromDisclosures","disclosures","country","locality","describe","it","success","expect","toBe","toEqual","toBeUndefined"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/converters.test.ts"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,eAAe;AAGvD,MAAMC,WAAyB,GAAG,CAChC,CAAC,wBAAwB,EAAE,YAAY,EAAE,OAAO,CAAC,EACjD,CAAC,wBAAwB,EAAE,YAAY,EAAE,YAAY,CAAC,EACtD,CACE,wBAAwB,EACxB,gBAAgB,EAChB;EAAEC,OAAO,EAAE,IAAI;EAAEC,QAAQ,EAAE;AAAO,CAAC,CACpC,CACF;AAEDC,QAAQ,CAAC,yBAAyB,EAAE,MAAM;EACxCC,EAAE,CAAC,4CAA4C,EAAE,MAAM;IACrD,MAAMC,OAAO,GAAGN,uBAAuB,CAACC,WAAW,EAAE,YAAY,CAAC;IAClEM,MAAM,CAACD,OAAO,CAAC,CAACE,IAAI,CAAC,OAAO,CAAC;EAC/B,CAAC,CAAC;EACFH,EAAE,CAAC,gDAAgD,EAAE,MAAM;IACzD,MAAMC,OAAO,GAAGN,uBAAuB,CAACC,WAAW,EAAE,gBAAgB,CAAC;IACtEM,MAAM,CAACD,OAAO,CAAC,CAACG,OAAO,CAAC;MAAEP,OAAO,EAAE,IAAI;MAAEC,QAAQ,EAAE;IAAO,CAAC,CAAC;EAC9D,CAAC,CAAC;EACFE,EAAE,CAAC,aAAa,EAAE,MAAM;IACtB,MAAMC,OAAO,GAAGN,uBAAuB,CAACC,WAAW,EAAE,eAAe,CAAC;IACrEM,MAAM,CAACD,OAAO,CAAC,CAACI,aAAa,CAAC,CAAC;EACjC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { decode, disclose } from "../index";
|
|
3
|
-
import { decodeBase64, encodeBase64 } from "@pagopa/io-react-native-jwt";
|
|
4
|
-
import { SdJwt4VC } from "../types";
|
|
5
|
-
import { pid } from "../__mocks__/sd-jwt";
|
|
6
|
-
const {
|
|
7
|
-
token,
|
|
8
|
-
signed,
|
|
9
|
-
tokenizedDisclosures
|
|
10
|
-
} = pid;
|
|
11
|
-
const sdJwt = {
|
|
12
|
-
header: {
|
|
13
|
-
kid: "-F_6Uga8n3VegjY2U7YUHK1zLoaD-NPTc63RMISnLaw",
|
|
14
|
-
typ: "dc+sd-jwt",
|
|
15
|
-
alg: "ES256"
|
|
16
|
-
},
|
|
17
|
-
payload: {
|
|
18
|
-
_sd: ["0q1D5Jmav6pQaEh_J_Fcv_uNNMQIgCyhQOxqlY4l3qU", "KCJ-AVNv88d-xj6sUIAOJxFnbUh3rHXDKkIH1lFqbRs", "M9lo9YxDNIXrAq2qWeiCA40zpJ_zYfFdR_4AEALcRtU", "czgjUk0nqRCswShChCjdS6A1-v47d_qTCSFIvIHhMoI", "nGnQr7clm3tfTp8yjL_uHrDSOtzR2PVb8S7GeLdAqBQ", "xNIVwlpSsaZ8CJSf0gz5x_75VRWWc6V1mlpejdCrqUs"],
|
|
19
|
-
sub: "216f8946-9ecb-4819-9309-c076f34a7e11",
|
|
20
|
-
_sd_alg: "sha-256",
|
|
21
|
-
vct: "PersonIdentificationData",
|
|
22
|
-
"vct#integrity": "13e25888ac7b8a3a6d61440da787fccc81654e61085732bcacd89b36aec32675",
|
|
23
|
-
iss: "https://pre.eid.wallet.ipzs.it",
|
|
24
|
-
issuing_country: "IT",
|
|
25
|
-
issuing_authority: "Istituto Poligrafico e Zecca dello Stato",
|
|
26
|
-
cnf: {
|
|
27
|
-
jwk: {
|
|
28
|
-
kty: "EC",
|
|
29
|
-
crv: "P-256",
|
|
30
|
-
kid: "Rv3W-EiKpvBTyk5yZxvrev-7MDB6SlzUCBo_CQjjddU",
|
|
31
|
-
x: "0Wox7QtyPqByg35MH_XyCcnd5Le-Jm0AXHlUgDBA03Y",
|
|
32
|
-
y: "eEhVvg1JPqNd3DTSa4mGDGBlwY6NP-EZbLbNFXSXwIg"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
exp: 1751546576,
|
|
36
|
-
status: {
|
|
37
|
-
status_assertion: {
|
|
38
|
-
credential_hash_alg: "sha-256"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
// In the very same order than tokenizedDisclosures
|
|
45
|
-
const disclosures = [["kJDEP8EaNTEMBDOZzZzT4w", "unique_id", "TINIT-LVLDAA85T50G702B"], ["zIAyUFvPfIpE1zBqxI5haQ", "birth_date", "1985-12-10"], ["Gr3R3s290OkQUm-NFTu96A", "tax_id_code", "TINIT-LVLDAA85T50G702B"], ["GxORalMAelfZ0edFJjjYUw", "given_name", "Ada"], ["_vV5RIkl0IOEXKots9kt1w", "family_name", "Lovelace"], ["Cj5tccR72Jwrze2TW4a-wg", "iat", 1720010575]];
|
|
46
|
-
it("Ensures example data correctness", () => {
|
|
47
|
-
expect(JSON.parse(decodeBase64(encodeBase64(JSON.stringify(sdJwt.header))))).toEqual(sdJwt.header);
|
|
48
|
-
expect([signed, ...tokenizedDisclosures].join("~")).toBe(token);
|
|
49
|
-
});
|
|
50
|
-
describe("decode", () => {
|
|
51
|
-
it("should decode a valid token", () => {
|
|
52
|
-
const result = decode(token, SdJwt4VC);
|
|
53
|
-
expect(result).toEqual({
|
|
54
|
-
sdJwt,
|
|
55
|
-
disclosures: disclosures.map((decoded, i) => ({
|
|
56
|
-
decoded,
|
|
57
|
-
encoded: tokenizedDisclosures[i]
|
|
58
|
-
}))
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
it("should decode with default decoder", () => {
|
|
62
|
-
const result = decode(token);
|
|
63
|
-
expect(result).toEqual({
|
|
64
|
-
sdJwt,
|
|
65
|
-
disclosures: disclosures.map((decoded, i) => ({
|
|
66
|
-
decoded,
|
|
67
|
-
encoded: tokenizedDisclosures[i]
|
|
68
|
-
}))
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
it("should accept only decoders that extend SdJwt4VC", () => {
|
|
72
|
-
const validDecoder = SdJwt4VC.and(z.object({
|
|
73
|
-
payload: z.object({
|
|
74
|
-
customField: z.string()
|
|
75
|
-
})
|
|
76
|
-
}));
|
|
77
|
-
const invalidDecoder = z.object({
|
|
78
|
-
payload: z.object({
|
|
79
|
-
customField: z.string()
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
try {
|
|
83
|
-
// ts is fine
|
|
84
|
-
decode(token, validDecoder);
|
|
85
|
-
// @ts-expect-error break types
|
|
86
|
-
decode(token, invalidDecoder);
|
|
87
|
-
} catch (error) {
|
|
88
|
-
// ignore actual result, just focus on types
|
|
89
|
-
// spot the error during type checking phase
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe("disclose", () => {
|
|
94
|
-
it("should encode a valid sdjwt (one claim)", async () => {
|
|
95
|
-
const result = await disclose(token, ["given_name"]);
|
|
96
|
-
const expected = {
|
|
97
|
-
token: `${signed}~WyJHeE9SYWxNQWVsZlowZWRGSmpqWVV3IiwiZ2l2ZW5fbmFtZSIsIkFkYSJd`,
|
|
98
|
-
paths: [{
|
|
99
|
-
claim: "given_name",
|
|
100
|
-
path: "verified_claims.claims._sd[3]"
|
|
101
|
-
}]
|
|
102
|
-
};
|
|
103
|
-
expect(result).toEqual(expected);
|
|
104
|
-
});
|
|
105
|
-
it("should encode a valid sdjwt (no claims)", async () => {
|
|
106
|
-
const result = await disclose(token, []);
|
|
107
|
-
const expected = {
|
|
108
|
-
token: `${signed}`,
|
|
109
|
-
paths: []
|
|
110
|
-
};
|
|
111
|
-
expect(result).toEqual(expected);
|
|
112
|
-
});
|
|
113
|
-
it("should encode a valid sdjwt (multiple claims)", async () => {
|
|
114
|
-
const result = await disclose(token, ["iat", "family_name"]);
|
|
115
|
-
const expected = {
|
|
116
|
-
token: `${signed}~WyJfdlY1UklrbDBJT0VYS290czlrdDF3IiwiZmFtaWx5X25hbWUiLCJMb3ZlbGFjZSJd~WyJDajV0Y2NSNzJKd3J6ZTJUVzRhLXdnIiwiaWF0IiwxNzIwMDEwNTc1XQ`,
|
|
117
|
-
paths: [{
|
|
118
|
-
claim: "iat",
|
|
119
|
-
path: "verified_claims.claims._sd[4]"
|
|
120
|
-
}, {
|
|
121
|
-
claim: "family_name",
|
|
122
|
-
path: "verified_claims.claims._sd[0]"
|
|
123
|
-
}]
|
|
124
|
-
};
|
|
125
|
-
expect(result).toEqual(expected);
|
|
126
|
-
});
|
|
127
|
-
it("should fail on unknown claim", async () => {
|
|
128
|
-
const fn = async () => disclose(token, ["unknown"]);
|
|
129
|
-
await expect(fn()).rejects.toEqual(expect.any(Error));
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["z","decode","disclose","decodeBase64","encodeBase64","SdJwt4VC","pid","token","signed","tokenizedDisclosures","sdJwt","header","kid","typ","alg","payload","_sd","sub","_sd_alg","vct","iss","issuing_country","issuing_authority","cnf","jwk","kty","crv","x","y","exp","status","status_assertion","credential_hash_alg","disclosures","it","expect","JSON","parse","stringify","toEqual","join","toBe","describe","result","map","decoded","i","encoded","validDecoder","and","object","customField","string","invalidDecoder","error","expected","paths","claim","path","fn","rejects","any","Error"],"sourceRoot":"../../../../src","sources":["sd-jwt/__test__/index.test.ts"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AACvB,SAASC,MAAM,EAAEC,QAAQ,QAAQ,UAAU;AAE3C,SAASC,YAAY,EAAEC,YAAY,QAAQ,6BAA6B;AACxE,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,GAAG,QAAQ,qBAAqB;AAEzC,MAAM;EAAEC,KAAK;EAAEC,MAAM;EAAEC;AAAqB,CAAC,GAAGH,GAAG;AAEnD,MAAMI,KAAK,GAAG;EACZC,MAAM,EAAE;IACNC,GAAG,EAAE,6CAA6C;IAClDC,GAAG,EAAE,WAAW;IAChBC,GAAG,EAAE;EACP,CAAC;EACDC,OAAO,EAAE;IACPC,GAAG,EAAE,CACH,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,EAC7C,6CAA6C,CAC9C;IACDC,GAAG,EAAE,sCAAsC;IAC3CC,OAAO,EAAE,SAAS;IAClBC,GAAG,EAAE,0BAA0B;IAC/B,eAAe,EACb,kEAAkE;IACpEC,GAAG,EAAE,gCAAgC;IACrCC,eAAe,EAAE,IAAI;IACrBC,iBAAiB,EAAE,0CAA0C;IAC7DC,GAAG,EAAE;MACHC,GAAG,EAAE;QACHC,GAAG,EAAE,IAAI;QACTC,GAAG,EAAE,OAAO;QACZd,GAAG,EAAE,6CAA6C;QAClDe,CAAC,EAAE,6CAA6C;QAChDC,CAAC,EAAE;MACL;IACF,CAAC;IACDC,GAAG,EAAE,UAAU;IACfC,MAAM,EAAE;MACNC,gBAAgB,EAAE;QAChBC,mBAAmB,EAAE;MACvB;IACF;EACF;AACF,CAAC;;AAED;AACA,MAAMC,WAAW,GAAG,CAClB,CAAC,wBAAwB,EAAE,WAAW,EAAE,wBAAwB,CAAC,EACjE,CAAC,wBAAwB,EAAE,YAAY,EAAE,YAAY,CAAC,EACtD,CAAC,wBAAwB,EAAE,aAAa,EAAE,wBAAwB,CAAC,EACnE,CAAC,wBAAwB,EAAE,YAAY,EAAE,KAAK,CAAC,EAC/C,CAAC,wBAAwB,EAAE,aAAa,EAAE,UAAU,CAAC,EACrD,CAAC,wBAAwB,EAAE,KAAK,EAAE,UAAU,CAAC,CAC9C;AACDC,EAAE,CAAC,kCAAkC,EAAE,MAAM;EAC3CC,MAAM,CACJC,IAAI,CAACC,KAAK,CAAClC,YAAY,CAACC,YAAY,CAACgC,IAAI,CAACE,SAAS,CAAC5B,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CACrE,CAAC,CAAC4B,OAAO,CAAC7B,KAAK,CAACC,MAAM,CAAC;EACvBwB,MAAM,CAAC,CAAC3B,MAAM,EAAE,GAAGC,oBAAoB,CAAC,CAAC+B,IAAI,CAAC,GAAG,CAAC,CAAC,CAACC,IAAI,CAAClC,KAAK,CAAC;AACjE,CAAC,CAAC;AAEFmC,QAAQ,CAAC,QAAQ,EAAE,MAAM;EACvBR,EAAE,CAAC,6BAA6B,EAAE,MAAM;IACtC,MAAMS,MAAM,GAAG1C,MAAM,CAACM,KAAK,EAAEF,QAAQ,CAAC;IACtC8B,MAAM,CAACQ,MAAM,CAAC,CAACJ,OAAO,CAAC;MACrB7B,KAAK;MACLuB,WAAW,EAAEA,WAAW,CAACW,GAAG,CAAC,CAACC,OAAO,EAAEC,CAAC,MAAM;QAC5CD,OAAO;QACPE,OAAO,EAAEtC,oBAAoB,CAACqC,CAAC;MACjC,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFZ,EAAE,CAAC,oCAAoC,EAAE,MAAM;IAC7C,MAAMS,MAAM,GAAG1C,MAAM,CAACM,KAAK,CAAC;IAC5B4B,MAAM,CAACQ,MAAM,CAAC,CAACJ,OAAO,CAAC;MACrB7B,KAAK;MACLuB,WAAW,EAAEA,WAAW,CAACW,GAAG,CAAC,CAACC,OAAO,EAAEC,CAAC,MAAM;QAC5CD,OAAO;QACPE,OAAO,EAAEtC,oBAAoB,CAACqC,CAAC;MACjC,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFZ,EAAE,CAAC,kDAAkD,EAAE,MAAM;IAC3D,MAAMc,YAAY,GAAG3C,QAAQ,CAAC4C,GAAG,CAC/BjD,CAAC,CAACkD,MAAM,CAAC;MAAEnC,OAAO,EAAEf,CAAC,CAACkD,MAAM,CAAC;QAAEC,WAAW,EAAEnD,CAAC,CAACoD,MAAM,CAAC;MAAE,CAAC;IAAE,CAAC,CAC7D,CAAC;IACD,MAAMC,cAAc,GAAGrD,CAAC,CAACkD,MAAM,CAAC;MAC9BnC,OAAO,EAAEf,CAAC,CAACkD,MAAM,CAAC;QAAEC,WAAW,EAAEnD,CAAC,CAACoD,MAAM,CAAC;MAAE,CAAC;IAC/C,CAAC,CAAC;IAEF,IAAI;MACF;MACAnD,MAAM,CAACM,KAAK,EAAEyC,YAAY,CAAC;MAC3B;MACA/C,MAAM,CAACM,KAAK,EAAE8C,cAAc,CAAC;IAC/B,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd;MACA;IAAA;EAEJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFZ,QAAQ,CAAC,UAAU,EAAE,MAAM;EACzBR,EAAE,CAAC,yCAAyC,EAAE,YAAY;IACxD,MAAMS,MAAM,GAAG,MAAMzC,QAAQ,CAACK,KAAK,EAAE,CAAC,YAAY,CAAC,CAAC;IACpD,MAAMgD,QAAQ,GAAG;MACfhD,KAAK,EAAG,GAAEC,MAAO,+DAA8D;MAC/EgD,KAAK,EAAE,CAAC;QAAEC,KAAK,EAAE,YAAY;QAAEC,IAAI,EAAE;MAAgC,CAAC;IACxE,CAAC;IAEDvB,MAAM,CAACQ,MAAM,CAAC,CAACJ,OAAO,CAACgB,QAAQ,CAAC;EAClC,CAAC,CAAC;EAEFrB,EAAE,CAAC,yCAAyC,EAAE,YAAY;IACxD,MAAMS,MAAM,GAAG,MAAMzC,QAAQ,CAACK,KAAK,EAAE,EAAE,CAAC;IACxC,MAAMgD,QAAQ,GAAG;MAAEhD,KAAK,EAAG,GAAEC,MAAO,EAAC;MAAEgD,KAAK,EAAE;IAAG,CAAC;IAElDrB,MAAM,CAACQ,MAAM,CAAC,CAACJ,OAAO,CAACgB,QAAQ,CAAC;EAClC,CAAC,CAAC;EAEFrB,EAAE,CAAC,+CAA+C,EAAE,YAAY;IAC9D,MAAMS,MAAM,GAAG,MAAMzC,QAAQ,CAACK,KAAK,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAC5D,MAAMgD,QAAQ,GAAG;MACfhD,KAAK,EAAG,GAAEC,MAAO,kIAAiI;MAClJgD,KAAK,EAAE,CACL;QACEC,KAAK,EAAE,KAAK;QACZC,IAAI,EAAE;MACR,CAAC,EACD;QACED,KAAK,EAAE,aAAa;QACpBC,IAAI,EAAE;MACR,CAAC;IAEL,CAAC;IAEDvB,MAAM,CAACQ,MAAM,CAAC,CAACJ,OAAO,CAACgB,QAAQ,CAAC;EAClC,CAAC,CAAC;EAEFrB,EAAE,CAAC,8BAA8B,EAAE,YAAY;IAC7C,MAAMyB,EAAE,GAAG,MAAAA,CAAA,KAAYzD,QAAQ,CAACK,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC;IAEnD,MAAM4B,MAAM,CAACwB,EAAE,CAAC,CAAC,CAAC,CAACC,OAAO,CAACrB,OAAO,CAACJ,MAAM,CAAC0B,GAAG,CAACC,KAAK,CAAC,CAAC;EACvD,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export function getValueFromDisclosures(disclosures, claimName) {
|
|
2
|
-
var _disclosures$find;
|
|
3
|
-
const value = (_disclosures$find = disclosures.find(_ref => {
|
|
4
|
-
let [, name] = _ref;
|
|
5
|
-
return name === claimName;
|
|
6
|
-
})) === null || _disclosures$find === void 0 ? void 0 : _disclosures$find[2];
|
|
7
|
-
// value didn't found, we return nothing
|
|
8
|
-
if (!value) {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
// value is not a string, it's probably fine
|
|
12
|
-
if (typeof value !== "string") {
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
// value is a string, we try to parse it
|
|
16
|
-
// maybe it's a serialized object
|
|
17
|
-
try {
|
|
18
|
-
return JSON.parse(value);
|
|
19
|
-
} catch (error) {
|
|
20
|
-
// It's definitely a string
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=converters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getValueFromDisclosures","disclosures","claimName","_disclosures$find","value","find","_ref","name","undefined","JSON","parse","error"],"sourceRoot":"../../../src","sources":["sd-jwt/converters.ts"],"mappings":"AAEA,OAAO,SAASA,uBAAuBA,CACrCC,WAAyB,EACzBC,SAAiB,EACjB;EAAA,IAAAC,iBAAA;EACA,MAAMC,KAAK,IAAAD,iBAAA,GAAGF,WAAW,CAACI,IAAI,CAACC,IAAA;IAAA,IAAC,GAAGC,IAAI,CAAC,GAAAD,IAAA;IAAA,OAAKC,IAAI,KAAKL,SAAS;EAAA,EAAC,cAAAC,iBAAA,uBAAlDA,iBAAA,CAAqD,CAAC,CAAC;EACrE;EACA,IAAI,CAACC,KAAK,EAAE;IACV,OAAOI,SAAS;EAClB;EACA;EACA,IAAI,OAAOJ,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EACA;EACA;EACA,IAAI;IACF,OAAOK,IAAI,CAACC,KAAK,CAACN,KAAK,CAAC;EAC1B,CAAC,CAAC,OAAOO,KAAK,EAAE;IACd;IACA,OAAOP,KAAK;EACd;AACF"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* When claims are requested but not found in the credential
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export class ClaimsNotFoundBetweenDisclosures extends Error {
|
|
6
|
-
code = "ERR_CLAIMS_NOT_FOUND";
|
|
7
|
-
|
|
8
|
-
/** The Claims not found */
|
|
9
|
-
|
|
10
|
-
constructor(claims) {
|
|
11
|
-
const c = Array.isArray(claims) ? claims : [claims];
|
|
12
|
-
const message = `Some requested claims are not present in the disclosurable values, claims: ${c.join(", ")}`;
|
|
13
|
-
super(message);
|
|
14
|
-
this.claims = c;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* When the SD-JWT does not contain an hashed reference to a given set of claims
|
|
20
|
-
*/
|
|
21
|
-
export class ClaimsNotFoundInToken extends Error {
|
|
22
|
-
code = "ERR_CLAIMS_NOT_FOUND_IN_TOKEN";
|
|
23
|
-
|
|
24
|
-
/** The Claims not found */
|
|
25
|
-
|
|
26
|
-
constructor(claims) {
|
|
27
|
-
const claimsArray = Array.isArray(claims) ? claims : [claims];
|
|
28
|
-
super(`Some requested claims are not present in the disclosurable values: ${claimsArray.join(", ")}`);
|
|
29
|
-
this.claims = claimsArray;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ClaimsNotFoundBetweenDisclosures","Error","code","constructor","claims","c","Array","isArray","message","join","ClaimsNotFoundInToken","claimsArray"],"sourceRoot":"../../../src","sources":["sd-jwt/errors.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gCAAgC,SAASC,KAAK,CAAC;EAC1DC,IAAI,GAAG,sBAAsB;;EAE7B;;EAGAC,WAAWA,CAACC,MAAyB,EAAE;IACrC,MAAMC,CAAC,GAAGC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;IACnD,MAAMI,OAAO,GAAI,8EAA6EH,CAAC,CAACI,IAAI,CAClG,IACF,CAAE,EAAC;IACH,KAAK,CAACD,OAAO,CAAC;IACd,IAAI,CAACJ,MAAM,GAAGC,CAAC;EACjB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMK,qBAAqB,SAAST,KAAK,CAAC;EAC/CC,IAAI,GAAG,+BAA+B;;EAEtC;;EAGAC,WAAWA,CAACC,MAAyB,EAAE;IACrC,MAAMO,WAAW,GAAGL,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;IAC7D,KAAK,CACF,sEAAqEO,WAAW,CAACF,IAAI,CACpF,IACF,CAAE,EACJ,CAAC;IACD,IAAI,CAACL,MAAM,GAAGO,WAAW;EAC3B;AACF"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { sha256ToBase64 } from "@pagopa/io-react-native-jwt";
|
|
2
|
-
import { ValidationFailed } from "../utils/errors";
|
|
3
|
-
export const verifyDisclosure = async (_ref, claims) => {
|
|
4
|
-
let {
|
|
5
|
-
encoded,
|
|
6
|
-
decoded
|
|
7
|
-
} = _ref;
|
|
8
|
-
let hash = await sha256ToBase64(encoded);
|
|
9
|
-
if (!claims.includes(hash)) {
|
|
10
|
-
throw new ValidationFailed({
|
|
11
|
-
message: "Validation of disclosure failed",
|
|
12
|
-
claim: `${decoded}`,
|
|
13
|
-
reason: "Disclosure hash not found in claims"
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=verifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sha256ToBase64","ValidationFailed","verifyDisclosure","_ref","claims","encoded","decoded","hash","includes","message","claim","reason"],"sourceRoot":"../../../src","sources":["sd-jwt/verifier.ts"],"mappings":"AAAA,SAASA,cAAc,QAAQ,6BAA6B;AAE5D,SAASC,gBAAgB,QAAQ,iBAAiB;AAGlD,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAAAC,IAAA,EAE9BC,MAAoC,KACjC;EAAA,IAFH;IAAEC,OAAO;IAAEC;EAA+B,CAAC,GAAAH,IAAA;EAG3C,IAAII,IAAI,GAAG,MAAMP,cAAc,CAACK,OAAO,CAAC;EACxC,IAAI,CAACD,MAAM,CAACI,QAAQ,CAACD,IAAI,CAAC,EAAE;IAC1B,MAAM,IAAIN,gBAAgB,CAAC;MACzBQ,OAAO,EAAE,iCAAiC;MAC1CC,KAAK,EAAG,GAAEJ,OAAQ,EAAC;MACnBK,MAAM,EAAE;IACV,CAAC,CAAC;EACJ;AACF,CAAC"}
|