@pagopa/io-react-native-wallet 1.7.1 → 2.0.0-next.1
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 +47 -1
- package/lib/commonjs/client/generated/wallet-provider.js +49 -20
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/credential/index.js +5 -1
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +27 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +17 -12
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +36 -29
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +27 -207
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +23 -20
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/const.js.map +1 -1
- package/lib/commonjs/credential/issuance/index.js +3 -3
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +14 -15
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +6 -4
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +34 -7
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +4 -126
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +80 -25
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +97 -117
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +86 -191
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +112 -176
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/README.md +74 -79
- package/lib/commonjs/credential/presentation/errors.js +42 -21
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +13 -13
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +53 -29
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/credential/status/01-start-flow.js +2 -0
- package/lib/commonjs/credential/status/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/status/02-status-attestation.js +73 -0
- package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +55 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +67 -0
- package/lib/commonjs/credential/status/index.js +27 -0
- package/lib/commonjs/credential/status/index.js.map +1 -0
- package/lib/commonjs/credential/status/types.js +48 -0
- package/lib/commonjs/credential/status/types.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +62 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +86 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +13 -0
- package/lib/commonjs/credential/trustmark/index.js.map +1 -0
- package/lib/commonjs/index.js +5 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/sd-jwt/types.js +18 -2
- package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +22 -34
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +11 -23
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +1 -7
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +5 -21
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/trust/README.md +147 -0
- package/lib/commonjs/trust/chain.js +153 -0
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/errors.js +133 -0
- package/lib/commonjs/trust/errors.js.map +1 -0
- package/lib/commonjs/trust/index.js +288 -0
- package/lib/commonjs/trust/index.js.map +1 -0
- package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
- package/lib/commonjs/trust/types.js.map +1 -0
- package/lib/commonjs/trust/utils.js +70 -0
- package/lib/commonjs/trust/utils.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +5 -112
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -0
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +22 -2
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +72 -4
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/logging.js +68 -0
- package/lib/commonjs/utils/logging.js.map +1 -0
- package/lib/commonjs/utils/misc.js +2 -0
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +17 -10
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/string.js +1 -12
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/wallet-instance/index.js +14 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +40 -15
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/credential/index.js +3 -1
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +17 -11
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +23 -20
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/const.js.map +1 -1
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +14 -15
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +34 -7
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/README.md +74 -79
- package/lib/module/credential/presentation/errors.js +30 -17
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +6 -6
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +49 -27
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/credential/status/01-start-flow.js +2 -0
- package/lib/module/credential/status/01-start-flow.js.map +1 -0
- package/lib/module/credential/status/02-status-attestation.js +66 -0
- package/lib/module/credential/status/02-status-attestation.js.map +1 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/module/credential/status/README.md +67 -0
- package/lib/module/credential/status/index.js +5 -0
- package/lib/module/credential/status/index.js.map +1 -0
- package/lib/module/credential/status/types.js +40 -0
- package/lib/module/credential/status/types.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +62 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +3 -0
- package/lib/module/credential/trustmark/index.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/sd-jwt/types.js +16 -1
- package/lib/module/pid/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +22 -34
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +11 -23
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +1 -7
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +4 -19
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/trust/README.md +147 -0
- package/lib/module/trust/chain.js +145 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/errors.js +115 -0
- package/lib/module/trust/errors.js.map +1 -0
- package/lib/module/trust/index.js +269 -0
- package/lib/module/trust/index.js.map +1 -0
- package/lib/module/{entity/trust → trust}/types.js +25 -46
- package/lib/module/trust/types.js.map +1 -0
- package/lib/module/trust/utils.js +60 -0
- package/lib/module/trust/utils.js.map +1 -0
- package/lib/module/utils/crypto.js +4 -107
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -0
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/error-codes.js +20 -1
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +61 -4
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/logging.js +62 -0
- package/lib/module/utils/logging.js.map +1 -0
- package/lib/module/utils/misc.js +2 -0
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +17 -9
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/string.js +0 -10
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/wallet-instance/index.js +13 -0
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/README.md +8 -3
- package/lib/module/wallet-instance-attestation/index.js +2 -2
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +16 -9
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +14 -18
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/credential/index.d.ts +3 -1
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +8 -3
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/errors.d.ts +25 -10
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +7 -8
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +137 -307
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +7 -0
- package/lib/typescript/credential/status/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/types.d.ts +305 -0
- package/lib/typescript/credential/status/types.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +4 -0
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +20 -72
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +24 -129
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/trust/chain.d.ts +23 -0
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/errors.d.ts +102 -0
- package/lib/typescript/trust/errors.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/index.d.ts +308 -281
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/types.d.ts +1714 -1301
- package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +22 -0
- package/lib/typescript/trust/utils.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts +0 -32
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +20 -0
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +55 -10
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +35 -0
- package/lib/typescript/utils/logging.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +8 -1
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts +0 -7
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/index.d.ts +8 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +60 -102
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +9 -10
- package/src/client/generated/wallet-provider.ts +52 -17
- package/src/credential/index.ts +4 -1
- package/src/credential/issuance/01-start-flow.ts +1 -1
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
- package/src/credential/issuance/03-start-user-authorization.ts +48 -22
- package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
- package/src/credential/issuance/05-authorize-access.ts +29 -11
- package/src/credential/issuance/06-obtain-credential.ts +61 -36
- package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
- package/src/credential/issuance/README.md +23 -20
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/index.ts +6 -3
- package/src/credential/presentation/01-start-flow.ts +19 -22
- package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
- package/src/credential/presentation/03-get-request-object.ts +36 -8
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
- package/src/credential/presentation/05-verify-request-object.ts +115 -30
- package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
- package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
- package/src/credential/presentation/08-send-authorization-response.ts +178 -260
- package/src/credential/presentation/README.md +74 -79
- package/src/credential/presentation/errors.ts +38 -15
- package/src/credential/presentation/index.ts +18 -19
- package/src/credential/presentation/types.ts +67 -64
- package/src/credential/status/01-start-flow.ts +9 -0
- package/src/credential/status/02-status-attestation.ts +105 -0
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
- package/src/credential/status/README.md +67 -0
- package/src/credential/status/index.ts +22 -0
- package/src/credential/status/types.ts +43 -0
- package/src/credential/trustmark/README.md +62 -0
- package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
- package/src/credential/trustmark/index.ts +8 -0
- package/src/index.ts +4 -0
- package/src/pid/sd-jwt/types.ts +18 -1
- package/src/sd-jwt/__test__/index.test.ts +36 -55
- package/src/sd-jwt/__test__/types.test.ts +16 -29
- package/src/sd-jwt/index.ts +1 -5
- package/src/sd-jwt/types.ts +2 -19
- package/src/trust/README.md +147 -0
- package/src/trust/chain.ts +227 -0
- package/src/trust/errors.ts +136 -0
- package/src/{entity/trust → trust}/index.ts +207 -25
- package/src/{entity/trust → trust}/types.ts +24 -37
- package/src/trust/utils.ts +70 -0
- package/src/utils/crypto.ts +4 -106
- package/src/utils/decoder.ts +6 -1
- package/src/utils/error-codes.ts +23 -0
- package/src/utils/errors.ts +119 -15
- package/src/utils/logging.ts +68 -0
- package/src/utils/misc.ts +5 -0
- package/src/utils/par.ts +19 -6
- package/src/utils/string.ts +0 -10
- package/src/wallet-instance/index.ts +30 -1
- package/src/wallet-instance-attestation/README.md +8 -3
- package/src/wallet-instance-attestation/index.ts +2 -2
- package/src/wallet-instance-attestation/issuing.ts +33 -12
- package/src/wallet-instance-attestation/types.ts +18 -22
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
- package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
- package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/commonjs/entity/trust/chain.js +0 -122
- package/lib/commonjs/entity/trust/chain.js.map +0 -1
- package/lib/commonjs/entity/trust/index.js +0 -148
- package/lib/commonjs/entity/trust/index.js.map +0 -1
- package/lib/commonjs/entity/trust/types.js.map +0 -1
- package/lib/commonjs/mdoc/converters.js +0 -26
- package/lib/commonjs/mdoc/converters.js.map +0 -1
- package/lib/commonjs/mdoc/index.js +0 -68
- package/lib/commonjs/mdoc/index.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
- package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/index.js +0 -20
- package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/types.js +0 -48
- package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/module/entity/trust/chain.js +0 -113
- package/lib/module/entity/trust/chain.js.map +0 -1
- package/lib/module/entity/trust/index.js +0 -131
- package/lib/module/entity/trust/index.js.map +0 -1
- package/lib/module/entity/trust/types.js.map +0 -1
- package/lib/module/mdoc/converters.js +0 -20
- package/lib/module/mdoc/converters.js.map +0 -1
- package/lib/module/mdoc/index.js +0 -60
- package/lib/module/mdoc/index.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
- package/lib/typescript/entity/trust/chain.d.ts +0 -26
- package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
- package/lib/typescript/entity/trust/index.d.ts.map +0 -1
- package/lib/typescript/mdoc/converters.d.ts +0 -8
- package/lib/typescript/mdoc/converters.d.ts.map +0 -1
- package/lib/typescript/mdoc/index.d.ts +0 -10
- package/lib/typescript/mdoc/index.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
- package/src/credential/issuance/02-get-issuer-config.ts +0 -67
- package/src/entity/openid-connect/issuer/index.ts +0 -27
- package/src/entity/openid-connect/issuer/types.ts +0 -76
- package/src/entity/trust/chain.ts +0 -154
- package/src/mdoc/converters.ts +0 -26
- package/src/mdoc/index.ts +0 -95
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -20,20 +20,19 @@ import { type Presentation } from "../credential/presentation/types";
|
|
20
20
|
export declare const decode: <S extends z.ZodType<{
|
21
21
|
header: {
|
22
22
|
alg: string;
|
23
|
-
typ: "vc+sd-jwt"
|
23
|
+
typ: "vc+sd-jwt";
|
24
24
|
kid?: string | undefined;
|
25
|
-
x5c?: string | undefined;
|
26
|
-
vctm?: string[] | undefined;
|
27
25
|
};
|
28
26
|
payload: {
|
29
27
|
iss: string;
|
30
28
|
status: {
|
31
|
-
|
29
|
+
status_attestation: {
|
32
30
|
credential_hash_alg: "sha-256";
|
33
31
|
};
|
34
32
|
};
|
35
|
-
|
33
|
+
sub: string;
|
36
34
|
exp: number;
|
35
|
+
_sd_alg: "sha-256";
|
37
36
|
cnf: {
|
38
37
|
jwk: {
|
39
38
|
kty: "RSA" | "EC";
|
@@ -60,40 +59,27 @@ export declare const decode: <S extends z.ZodType<{
|
|
60
59
|
x5u?: string | undefined;
|
61
60
|
};
|
62
61
|
};
|
63
|
-
|
64
|
-
_sd_alg: "sha-256";
|
65
|
-
expiry_date: string;
|
66
|
-
issuing_authority: string;
|
67
|
-
issuing_country: string;
|
62
|
+
vct: string;
|
68
63
|
iat?: number | undefined;
|
69
|
-
"vct#integrity"?: string | undefined;
|
70
|
-
verification?: {
|
71
|
-
trust_framework: "eidas";
|
72
|
-
assurance_level: string;
|
73
|
-
evidence: {
|
74
|
-
method: string;
|
75
|
-
};
|
76
|
-
} | undefined;
|
77
64
|
} & {
|
78
65
|
_sd: string[];
|
79
66
|
};
|
80
67
|
}, z.ZodTypeDef, {
|
81
68
|
header: {
|
82
69
|
alg: string;
|
83
|
-
typ: "vc+sd-jwt"
|
70
|
+
typ: "vc+sd-jwt";
|
84
71
|
kid?: string | undefined;
|
85
|
-
x5c?: string | undefined;
|
86
|
-
vctm?: string[] | undefined;
|
87
72
|
};
|
88
73
|
payload: {
|
89
74
|
iss: string;
|
90
75
|
status: {
|
91
|
-
|
76
|
+
status_attestation: {
|
92
77
|
credential_hash_alg: "sha-256";
|
93
78
|
};
|
94
79
|
};
|
95
|
-
|
80
|
+
sub: string;
|
96
81
|
exp: number;
|
82
|
+
_sd_alg: "sha-256";
|
97
83
|
cnf: {
|
98
84
|
jwk: {
|
99
85
|
kty: "RSA" | "EC";
|
@@ -120,20 +106,8 @@ export declare const decode: <S extends z.ZodType<{
|
|
120
106
|
x5u?: string | undefined;
|
121
107
|
};
|
122
108
|
};
|
123
|
-
|
124
|
-
_sd_alg: "sha-256";
|
125
|
-
expiry_date: string;
|
126
|
-
issuing_authority: string;
|
127
|
-
issuing_country: string;
|
109
|
+
vct: string;
|
128
110
|
iat?: number | undefined;
|
129
|
-
"vct#integrity"?: string | undefined;
|
130
|
-
verification?: {
|
131
|
-
trust_framework: "eidas";
|
132
|
-
assurance_level: string;
|
133
|
-
evidence: {
|
134
|
-
method: string;
|
135
|
-
};
|
136
|
-
} | undefined;
|
137
111
|
} & {
|
138
112
|
_sd: string[];
|
139
113
|
};
|
@@ -180,20 +154,19 @@ export declare const disclose: (token: string, claims: string[]) => Promise<{
|
|
180
154
|
export declare const verify: <S extends z.ZodType<{
|
181
155
|
header: {
|
182
156
|
alg: string;
|
183
|
-
typ: "vc+sd-jwt"
|
157
|
+
typ: "vc+sd-jwt";
|
184
158
|
kid?: string | undefined;
|
185
|
-
x5c?: string | undefined;
|
186
|
-
vctm?: string[] | undefined;
|
187
159
|
};
|
188
160
|
payload: {
|
189
161
|
iss: string;
|
190
162
|
status: {
|
191
|
-
|
163
|
+
status_attestation: {
|
192
164
|
credential_hash_alg: "sha-256";
|
193
165
|
};
|
194
166
|
};
|
195
|
-
|
167
|
+
sub: string;
|
196
168
|
exp: number;
|
169
|
+
_sd_alg: "sha-256";
|
197
170
|
cnf: {
|
198
171
|
jwk: {
|
199
172
|
kty: "RSA" | "EC";
|
@@ -220,40 +193,27 @@ export declare const verify: <S extends z.ZodType<{
|
|
220
193
|
x5u?: string | undefined;
|
221
194
|
};
|
222
195
|
};
|
223
|
-
|
224
|
-
_sd_alg: "sha-256";
|
225
|
-
expiry_date: string;
|
226
|
-
issuing_authority: string;
|
227
|
-
issuing_country: string;
|
196
|
+
vct: string;
|
228
197
|
iat?: number | undefined;
|
229
|
-
"vct#integrity"?: string | undefined;
|
230
|
-
verification?: {
|
231
|
-
trust_framework: "eidas";
|
232
|
-
assurance_level: string;
|
233
|
-
evidence: {
|
234
|
-
method: string;
|
235
|
-
};
|
236
|
-
} | undefined;
|
237
198
|
} & {
|
238
199
|
_sd: string[];
|
239
200
|
};
|
240
201
|
}, z.ZodTypeDef, {
|
241
202
|
header: {
|
242
203
|
alg: string;
|
243
|
-
typ: "vc+sd-jwt"
|
204
|
+
typ: "vc+sd-jwt";
|
244
205
|
kid?: string | undefined;
|
245
|
-
x5c?: string | undefined;
|
246
|
-
vctm?: string[] | undefined;
|
247
206
|
};
|
248
207
|
payload: {
|
249
208
|
iss: string;
|
250
209
|
status: {
|
251
|
-
|
210
|
+
status_attestation: {
|
252
211
|
credential_hash_alg: "sha-256";
|
253
212
|
};
|
254
213
|
};
|
255
|
-
|
214
|
+
sub: string;
|
256
215
|
exp: number;
|
216
|
+
_sd_alg: "sha-256";
|
257
217
|
cnf: {
|
258
218
|
jwk: {
|
259
219
|
kty: "RSA" | "EC";
|
@@ -280,20 +240,8 @@ export declare const verify: <S extends z.ZodType<{
|
|
280
240
|
x5u?: string | undefined;
|
281
241
|
};
|
282
242
|
};
|
283
|
-
|
284
|
-
_sd_alg: "sha-256";
|
285
|
-
expiry_date: string;
|
286
|
-
issuing_authority: string;
|
287
|
-
issuing_country: string;
|
243
|
+
vct: string;
|
288
244
|
iat?: number | undefined;
|
289
|
-
"vct#integrity"?: string | undefined;
|
290
|
-
verification?: {
|
291
|
-
trust_framework: "eidas";
|
292
|
-
assurance_level: string;
|
293
|
-
evidence: {
|
294
|
-
method: string;
|
295
|
-
};
|
296
|
-
} | undefined;
|
297
245
|
} & {
|
298
246
|
_sd: string[];
|
299
247
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAQrE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE3E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAQrE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM;;iBAIA,qBAAqB,EAAE;CA0BrC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,UACZ,MAAM,UACL,MAAM,EAAE;WACE,MAAM;WAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE;EAwCnE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WACV,MAAM,aACF,GAAG,GAAG,GAAG,EAAE;;iBAEqB,UAAU,EAAE;EAqBxD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,UAClB,MAAM,aACF,MAAM;cAGP,MAAM;EAyBjB,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC"}
|
@@ -29,50 +29,20 @@ export type DisclosureWithEncoded = {
|
|
29
29
|
decoded: Disclosure;
|
30
30
|
encoded: string;
|
31
31
|
};
|
32
|
-
export type Verification = z.infer<typeof Verification>;
|
33
|
-
export declare const Verification: z.ZodObject<{
|
34
|
-
trust_framework: z.ZodLiteral<"eidas">;
|
35
|
-
assurance_level: z.ZodString;
|
36
|
-
evidence: z.ZodObject<{
|
37
|
-
method: z.ZodString;
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
39
|
-
method: string;
|
40
|
-
}, {
|
41
|
-
method: string;
|
42
|
-
}>;
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
44
|
-
trust_framework: "eidas";
|
45
|
-
assurance_level: string;
|
46
|
-
evidence: {
|
47
|
-
method: string;
|
48
|
-
};
|
49
|
-
}, {
|
50
|
-
trust_framework: "eidas";
|
51
|
-
assurance_level: string;
|
52
|
-
evidence: {
|
53
|
-
method: string;
|
54
|
-
};
|
55
|
-
}>;
|
56
32
|
export type SdJwt4VC = z.infer<typeof SdJwt4VC>;
|
57
33
|
export declare const SdJwt4VC: z.ZodObject<{
|
58
34
|
header: z.ZodObject<{
|
59
|
-
typ: z.
|
35
|
+
typ: z.ZodLiteral<"vc+sd-jwt">;
|
60
36
|
alg: z.ZodString;
|
61
37
|
kid: z.ZodOptional<z.ZodString>;
|
62
|
-
x5c: z.ZodOptional<z.ZodString>;
|
63
|
-
vctm: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
64
38
|
}, "strip", z.ZodTypeAny, {
|
65
39
|
alg: string;
|
66
|
-
typ: "vc+sd-jwt"
|
40
|
+
typ: "vc+sd-jwt";
|
67
41
|
kid?: string | undefined;
|
68
|
-
x5c?: string | undefined;
|
69
|
-
vctm?: string[] | undefined;
|
70
42
|
}, {
|
71
43
|
alg: string;
|
72
|
-
typ: "vc+sd-jwt"
|
44
|
+
typ: "vc+sd-jwt";
|
73
45
|
kid?: string | undefined;
|
74
|
-
x5c?: string | undefined;
|
75
|
-
vctm?: string[] | undefined;
|
76
46
|
}>;
|
77
47
|
payload: z.ZodIntersection<z.ZodObject<{
|
78
48
|
iss: z.ZodString;
|
@@ -81,7 +51,7 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
81
51
|
exp: z.ZodNumber;
|
82
52
|
_sd_alg: z.ZodLiteral<"sha-256">;
|
83
53
|
status: z.ZodObject<{
|
84
|
-
|
54
|
+
status_attestation: z.ZodObject<{
|
85
55
|
credential_hash_alg: z.ZodLiteral<"sha-256">;
|
86
56
|
}, "strip", z.ZodTypeAny, {
|
87
57
|
credential_hash_alg: "sha-256";
|
@@ -89,11 +59,11 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
89
59
|
credential_hash_alg: "sha-256";
|
90
60
|
}>;
|
91
61
|
}, "strip", z.ZodTypeAny, {
|
92
|
-
|
62
|
+
status_attestation: {
|
93
63
|
credential_hash_alg: "sha-256";
|
94
64
|
};
|
95
65
|
}, {
|
96
|
-
|
66
|
+
status_attestation: {
|
97
67
|
credential_hash_alg: "sha-256";
|
98
68
|
};
|
99
69
|
}>;
|
@@ -220,42 +190,16 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
220
190
|
};
|
221
191
|
}>;
|
222
192
|
vct: z.ZodString;
|
223
|
-
"vct#integrity": z.ZodOptional<z.ZodString>;
|
224
|
-
verification: z.ZodOptional<z.ZodObject<{
|
225
|
-
trust_framework: z.ZodLiteral<"eidas">;
|
226
|
-
assurance_level: z.ZodString;
|
227
|
-
evidence: z.ZodObject<{
|
228
|
-
method: z.ZodString;
|
229
|
-
}, "strip", z.ZodTypeAny, {
|
230
|
-
method: string;
|
231
|
-
}, {
|
232
|
-
method: string;
|
233
|
-
}>;
|
234
|
-
}, "strip", z.ZodTypeAny, {
|
235
|
-
trust_framework: "eidas";
|
236
|
-
assurance_level: string;
|
237
|
-
evidence: {
|
238
|
-
method: string;
|
239
|
-
};
|
240
|
-
}, {
|
241
|
-
trust_framework: "eidas";
|
242
|
-
assurance_level: string;
|
243
|
-
evidence: {
|
244
|
-
method: string;
|
245
|
-
};
|
246
|
-
}>>;
|
247
|
-
expiry_date: z.ZodEffects<z.ZodString, string, string>;
|
248
|
-
issuing_authority: z.ZodString;
|
249
|
-
issuing_country: z.ZodString;
|
250
193
|
}, "strip", z.ZodTypeAny, {
|
251
194
|
iss: string;
|
252
195
|
status: {
|
253
|
-
|
196
|
+
status_attestation: {
|
254
197
|
credential_hash_alg: "sha-256";
|
255
198
|
};
|
256
199
|
};
|
257
|
-
|
200
|
+
sub: string;
|
258
201
|
exp: number;
|
202
|
+
_sd_alg: "sha-256";
|
259
203
|
cnf: {
|
260
204
|
jwk: {
|
261
205
|
kty: "RSA" | "EC";
|
@@ -282,29 +226,18 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
282
226
|
x5u?: string | undefined;
|
283
227
|
};
|
284
228
|
};
|
285
|
-
|
286
|
-
_sd_alg: "sha-256";
|
287
|
-
expiry_date: string;
|
288
|
-
issuing_authority: string;
|
289
|
-
issuing_country: string;
|
229
|
+
vct: string;
|
290
230
|
iat?: number | undefined;
|
291
|
-
"vct#integrity"?: string | undefined;
|
292
|
-
verification?: {
|
293
|
-
trust_framework: "eidas";
|
294
|
-
assurance_level: string;
|
295
|
-
evidence: {
|
296
|
-
method: string;
|
297
|
-
};
|
298
|
-
} | undefined;
|
299
231
|
}, {
|
300
232
|
iss: string;
|
301
233
|
status: {
|
302
|
-
|
234
|
+
status_attestation: {
|
303
235
|
credential_hash_alg: "sha-256";
|
304
236
|
};
|
305
237
|
};
|
306
|
-
|
238
|
+
sub: string;
|
307
239
|
exp: number;
|
240
|
+
_sd_alg: "sha-256";
|
308
241
|
cnf: {
|
309
242
|
jwk: {
|
310
243
|
kty: "RSA" | "EC";
|
@@ -331,20 +264,8 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
331
264
|
x5u?: string | undefined;
|
332
265
|
};
|
333
266
|
};
|
334
|
-
|
335
|
-
_sd_alg: "sha-256";
|
336
|
-
expiry_date: string;
|
337
|
-
issuing_authority: string;
|
338
|
-
issuing_country: string;
|
267
|
+
vct: string;
|
339
268
|
iat?: number | undefined;
|
340
|
-
"vct#integrity"?: string | undefined;
|
341
|
-
verification?: {
|
342
|
-
trust_framework: "eidas";
|
343
|
-
assurance_level: string;
|
344
|
-
evidence: {
|
345
|
-
method: string;
|
346
|
-
};
|
347
|
-
} | undefined;
|
348
269
|
}>, z.ZodObject<{
|
349
270
|
_sd: z.ZodArray<z.ZodString, "many">;
|
350
271
|
}, "strip", z.ZodTypeAny, {
|
@@ -355,20 +276,19 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
355
276
|
}, "strip", z.ZodTypeAny, {
|
356
277
|
header: {
|
357
278
|
alg: string;
|
358
|
-
typ: "vc+sd-jwt"
|
279
|
+
typ: "vc+sd-jwt";
|
359
280
|
kid?: string | undefined;
|
360
|
-
x5c?: string | undefined;
|
361
|
-
vctm?: string[] | undefined;
|
362
281
|
};
|
363
282
|
payload: {
|
364
283
|
iss: string;
|
365
284
|
status: {
|
366
|
-
|
285
|
+
status_attestation: {
|
367
286
|
credential_hash_alg: "sha-256";
|
368
287
|
};
|
369
288
|
};
|
370
|
-
|
289
|
+
sub: string;
|
371
290
|
exp: number;
|
291
|
+
_sd_alg: "sha-256";
|
372
292
|
cnf: {
|
373
293
|
jwk: {
|
374
294
|
kty: "RSA" | "EC";
|
@@ -395,40 +315,27 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
395
315
|
x5u?: string | undefined;
|
396
316
|
};
|
397
317
|
};
|
398
|
-
|
399
|
-
_sd_alg: "sha-256";
|
400
|
-
expiry_date: string;
|
401
|
-
issuing_authority: string;
|
402
|
-
issuing_country: string;
|
318
|
+
vct: string;
|
403
319
|
iat?: number | undefined;
|
404
|
-
"vct#integrity"?: string | undefined;
|
405
|
-
verification?: {
|
406
|
-
trust_framework: "eidas";
|
407
|
-
assurance_level: string;
|
408
|
-
evidence: {
|
409
|
-
method: string;
|
410
|
-
};
|
411
|
-
} | undefined;
|
412
320
|
} & {
|
413
321
|
_sd: string[];
|
414
322
|
};
|
415
323
|
}, {
|
416
324
|
header: {
|
417
325
|
alg: string;
|
418
|
-
typ: "vc+sd-jwt"
|
326
|
+
typ: "vc+sd-jwt";
|
419
327
|
kid?: string | undefined;
|
420
|
-
x5c?: string | undefined;
|
421
|
-
vctm?: string[] | undefined;
|
422
328
|
};
|
423
329
|
payload: {
|
424
330
|
iss: string;
|
425
331
|
status: {
|
426
|
-
|
332
|
+
status_attestation: {
|
427
333
|
credential_hash_alg: "sha-256";
|
428
334
|
};
|
429
335
|
};
|
430
|
-
|
336
|
+
sub: string;
|
431
337
|
exp: number;
|
338
|
+
_sd_alg: "sha-256";
|
432
339
|
cnf: {
|
433
340
|
jwk: {
|
434
341
|
kty: "RSA" | "EC";
|
@@ -455,20 +362,8 @@ export declare const SdJwt4VC: z.ZodObject<{
|
|
455
362
|
x5u?: string | undefined;
|
456
363
|
};
|
457
364
|
};
|
458
|
-
|
459
|
-
_sd_alg: "sha-256";
|
460
|
-
expiry_date: string;
|
461
|
-
issuing_authority: string;
|
462
|
-
issuing_country: string;
|
365
|
+
vct: string;
|
463
366
|
iat?: number | undefined;
|
464
|
-
"vct#integrity"?: string | undefined;
|
465
|
-
verification?: {
|
466
|
-
trust_framework: "eidas";
|
467
|
-
assurance_level: string;
|
468
|
-
evidence: {
|
469
|
-
method: string;
|
470
|
-
};
|
471
|
-
} | undefined;
|
472
367
|
} & {
|
473
368
|
_sd: string[];
|
474
369
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,aAAuC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;EAAyC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAO,MAAM,UAAU,4DAIrB,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBnB,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { TrustAnchorEntityConfiguration } from "./types";
|
2
|
+
import { type ParsedToken } from "./utils";
|
3
|
+
import { type X509CertificateOptions } from "@pagopa/io-react-native-crypto";
|
4
|
+
/**
|
5
|
+
* Validates a provided trust chain against a known trust anchor, including X.509 certificate checks.
|
6
|
+
*
|
7
|
+
* @param trustAnchorEntity The entity configuration of the known trust anchor (for JWT validation).
|
8
|
+
* @param chain The chain of statements to be validated.
|
9
|
+
* @param x509Options Options for X.509 certificate validation.
|
10
|
+
* @returns The list of parsed tokens representing the chain.
|
11
|
+
* @throws {FederationError} If the chain is not valid (JWT or X.509). Specific errors like TrustChainEmptyError, X509ValidationError may be thrown.
|
12
|
+
*/
|
13
|
+
export declare function validateTrustChain(trustAnchorEntity: TrustAnchorEntityConfiguration, chain: string[], x509Options: X509CertificateOptions): Promise<ParsedToken[]>;
|
14
|
+
/**
|
15
|
+
* Given a trust chain, obtain a new trust chain by fetching each element's fresh version
|
16
|
+
*
|
17
|
+
* @param chain The original chain
|
18
|
+
* @param appFetch (optional) fetch api implementation
|
19
|
+
* @returns A list of signed token that represent the trust chain, in the same order of the provided chain
|
20
|
+
* @throws {FederationError} If the chain is not valid
|
21
|
+
*/
|
22
|
+
export declare function renewTrustChain(chain: string[], appFetch?: GlobalFetch["fetch"]): Promise<string[]>;
|
23
|
+
//# sourceMappingURL=chain.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/trust/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AAIjB,OAAO,EAGL,KAAK,WAAW,EAEjB,MAAM,SAAS,CAAC;AAUjB,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAC;AAaxC;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,iBAAiB,EAAE,8BAA8B,EACjD,KAAK,EAAE,MAAM,EAAE,EACf,WAAW,EAAE,sBAAsB,GAClC,OAAO,CAAC,WAAW,EAAE,CAAC,CAkHxB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,GAAE,WAAW,CAAC,OAAO,CAAS,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CA8CnB"}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
import { IoWalletError } from "../utils/errors";
|
2
|
+
import type { CertificateValidationStatus } from "@pagopa/io-react-native-crypto";
|
3
|
+
/**
|
4
|
+
* Base class for all federation-specific errors.
|
5
|
+
*/
|
6
|
+
export declare class FederationError extends IoWalletError {
|
7
|
+
constructor(message: string, details?: Record<string, unknown>);
|
8
|
+
}
|
9
|
+
/**
|
10
|
+
* Error thrown when a trust chain is unexpectedly empty.
|
11
|
+
*/
|
12
|
+
export declare class TrustChainEmptyError extends FederationError {
|
13
|
+
code: string;
|
14
|
+
constructor(message?: string);
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Error thrown when a token is unexpectedly missing from a trust chain during processing.
|
18
|
+
*/
|
19
|
+
export declare class TrustChainTokenMissingError extends FederationError {
|
20
|
+
code: string;
|
21
|
+
constructor(message: string, details?: {
|
22
|
+
index?: number;
|
23
|
+
});
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Error thrown when renewing a trust chain fails.
|
27
|
+
* This class itself might be used or could be considered a more general renewal error.
|
28
|
+
*/
|
29
|
+
export declare class TrustChainRenewalError extends FederationError {
|
30
|
+
code: string;
|
31
|
+
constructor(message: string, details?: {
|
32
|
+
originalChain?: string[];
|
33
|
+
[key: string]: unknown;
|
34
|
+
});
|
35
|
+
}
|
36
|
+
export declare class FederationListParseError extends FederationError {
|
37
|
+
code: string;
|
38
|
+
constructor(message: string, details: {
|
39
|
+
url: string;
|
40
|
+
parseError?: string;
|
41
|
+
});
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* General error thrown during the trust chain building process.
|
45
|
+
*/
|
46
|
+
export declare class BuildTrustChainError extends FederationError {
|
47
|
+
code: string;
|
48
|
+
constructor(message: string, details?: {
|
49
|
+
relyingPartyUrl?: string;
|
50
|
+
trustAnchorKid?: string;
|
51
|
+
[key: string]: unknown;
|
52
|
+
});
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Error thrown when the Trust Anchor's key is missing a 'kid'.
|
56
|
+
*/
|
57
|
+
export declare class TrustAnchorKidMissingError extends FederationError {
|
58
|
+
code: string;
|
59
|
+
constructor(message?: string);
|
60
|
+
}
|
61
|
+
/**
|
62
|
+
* Error thrown if the Relying Party is not found in the Trust Anchor's federation list.
|
63
|
+
*/
|
64
|
+
export declare class RelyingPartyNotAuthorizedError extends FederationError {
|
65
|
+
code: string;
|
66
|
+
constructor(message: string, details: {
|
67
|
+
relyingPartyUrl: string;
|
68
|
+
federationListEndpoint?: string;
|
69
|
+
});
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Error thrown when a 'federation_fetch_endpoint' is missing in an entity's configuration.
|
73
|
+
*/
|
74
|
+
export declare class MissingFederationFetchEndpointError extends FederationError {
|
75
|
+
code: string;
|
76
|
+
constructor(message: string, details: {
|
77
|
+
entityBaseUrl: string;
|
78
|
+
missingInEntityUrl: string;
|
79
|
+
});
|
80
|
+
}
|
81
|
+
/**
|
82
|
+
* Error thrown when the X.509 certificate chain is missing in an entity's configuration.
|
83
|
+
*/
|
84
|
+
export declare class MissingX509CertsError extends FederationError {
|
85
|
+
code: string;
|
86
|
+
constructor(message: string);
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* Error thrown when an X.509 certificate validation fails.
|
90
|
+
* This is used to indicate issues with the certificate chain or signature verification.
|
91
|
+
*/
|
92
|
+
export declare class X509ValidationError extends FederationError {
|
93
|
+
code: string;
|
94
|
+
constructor(message: string, details?: {
|
95
|
+
tokenIndex?: number;
|
96
|
+
kid?: string;
|
97
|
+
x509ValidationStatus?: CertificateValidationStatus;
|
98
|
+
x509ErrorMessage?: string;
|
99
|
+
[key: string]: unknown;
|
100
|
+
});
|
101
|
+
}
|
102
|
+
//# sourceMappingURL=errors.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/trust/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAElF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IACvD,IAAI,SAA+B;gBACvB,OAAO,SAAiC;CAGrD;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,eAAe;IAC9D,IAAI,SAAuC;gBAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;CAG1D;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,eAAe;IACzD,IAAI,SAAwC;gBAE1C,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;CAIjE;AAED,qBAAa,wBAAyB,SAAQ,eAAe;IAC3D,IAAI,SAA0C;gBAClC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;CAG3E;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;IACvD,IAAI,SAAsC;gBAExC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB;CAIJ;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,eAAe;IAC7D,IAAI,SAAsC;gBAC9B,OAAO,SAAgD;CAGpE;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,eAAe;IACjE,IAAI,SAA0C;gBAE5C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;KAAE;CAIxE;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,eAAe;IACtE,IAAI,SAA+C;gBAEjD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAA;KAAE;CAIjE;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IACxD,IAAI,SAAgC;gBACxB,OAAO,EAAE,MAAM;CAG5B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,IAAI,SAAoC;gBAEtC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,oBAAoB,CAAC,EAAE,2BAA2B,CAAC;QACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB;CAIJ"}
|