@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
@@ -1,46 +1,34 @@
|
|
1
1
|
import type { CryptoContext } from "@pagopa/io-react-native-jwt";
|
2
2
|
import * as z from "zod";
|
3
|
-
export type EvaluatedDisclosure = {
|
4
|
-
namespace?: string;
|
5
|
-
name: string;
|
6
|
-
value: unknown;
|
7
|
-
};
|
8
|
-
export type CredentialFormat = {
|
9
|
-
format: "vc+sd-jwt";
|
10
|
-
} | {
|
11
|
-
format: "mso_mdoc";
|
12
|
-
doctype: string;
|
13
|
-
};
|
14
3
|
/**
|
15
4
|
* A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
|
16
5
|
*/
|
17
6
|
export type Presentation = [
|
18
7
|
string,
|
19
|
-
|
8
|
+
string[],
|
20
9
|
CryptoContext
|
21
10
|
];
|
22
11
|
/**
|
23
12
|
* A object that associate the information needed to multiple remote presentation
|
13
|
+
* Used with `presentation_definition`
|
14
|
+
* @deprecated Use `RemotePresentation`
|
15
|
+
*/
|
16
|
+
export type LegacyRemotePresentation = {
|
17
|
+
requestedClaims: string[];
|
18
|
+
inputDescriptor: InputDescriptor;
|
19
|
+
format: string;
|
20
|
+
vpToken: string;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* A object that associate the information needed to multiple remote presentation
|
24
|
+
* Used with DCQL queries
|
24
25
|
*/
|
25
26
|
export type RemotePresentation = {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
vpToken: string;
|
31
|
-
}[];
|
32
|
-
generatedNonce?: string;
|
27
|
+
requestedClaims: string[];
|
28
|
+
credentialId: string;
|
29
|
+
format: string;
|
30
|
+
vpToken: string;
|
33
31
|
};
|
34
|
-
export type PrepareRemotePresentations = (credentials: ({
|
35
|
-
requestedClaims: EvaluatedDisclosure[];
|
36
|
-
credentialInputId: string;
|
37
|
-
credential: string;
|
38
|
-
keyTag: string;
|
39
|
-
} & CredentialFormat)[], authRequestObject: {
|
40
|
-
nonce: string;
|
41
|
-
clientId: string;
|
42
|
-
responseUri: string;
|
43
|
-
}) => Promise<RemotePresentation>;
|
44
32
|
export type InputDescriptor = z.infer<typeof InputDescriptor>;
|
45
33
|
export declare const InputDescriptor: z.ZodObject<{
|
46
34
|
id: z.ZodString;
|
@@ -355,203 +343,16 @@ export declare const PresentationDefinition: z.ZodObject<{
|
|
355
343
|
}>;
|
356
344
|
export type RequestObject = z.infer<typeof RequestObject>;
|
357
345
|
export declare const RequestObject: z.ZodObject<{
|
358
|
-
iss: z.
|
359
|
-
iat: z.
|
360
|
-
exp: z.
|
346
|
+
iss: z.ZodString;
|
347
|
+
iat: z.ZodNumber;
|
348
|
+
exp: z.ZodNumber;
|
361
349
|
state: z.ZodOptional<z.ZodString>;
|
362
350
|
nonce: z.ZodString;
|
363
351
|
response_uri: z.ZodString;
|
352
|
+
response_uri_method: z.ZodOptional<z.ZodString>;
|
364
353
|
response_type: z.ZodLiteral<"vp_token">;
|
365
|
-
response_mode: z.
|
354
|
+
response_mode: z.ZodLiteral<"direct_post.jwt">;
|
366
355
|
client_id: z.ZodString;
|
367
|
-
client_id_scheme: z.ZodOptional<z.ZodString>;
|
368
|
-
client_metadata: z.ZodOptional<z.ZodObject<{
|
369
|
-
authorization_encrypted_response_alg: z.ZodOptional<z.ZodString>;
|
370
|
-
authorization_encrypted_response_enc: z.ZodOptional<z.ZodString>;
|
371
|
-
jwks_uri: z.ZodOptional<z.ZodString>;
|
372
|
-
jwks: z.ZodOptional<z.ZodObject<{
|
373
|
-
keys: z.ZodArray<z.ZodObject<{
|
374
|
-
alg: z.ZodOptional<z.ZodString>;
|
375
|
-
crv: z.ZodOptional<z.ZodString>;
|
376
|
-
d: z.ZodOptional<z.ZodString>;
|
377
|
-
dp: z.ZodOptional<z.ZodString>;
|
378
|
-
dq: z.ZodOptional<z.ZodString>;
|
379
|
-
e: z.ZodOptional<z.ZodString>;
|
380
|
-
ext: z.ZodOptional<z.ZodBoolean>;
|
381
|
-
k: z.ZodOptional<z.ZodString>;
|
382
|
-
key_ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
383
|
-
kid: z.ZodOptional<z.ZodString>;
|
384
|
-
kty: z.ZodUnion<[z.ZodLiteral<"RSA">, z.ZodLiteral<"EC">]>;
|
385
|
-
n: z.ZodOptional<z.ZodString>;
|
386
|
-
p: z.ZodOptional<z.ZodString>;
|
387
|
-
q: z.ZodOptional<z.ZodString>;
|
388
|
-
qi: z.ZodOptional<z.ZodString>;
|
389
|
-
use: z.ZodOptional<z.ZodString>;
|
390
|
-
x: z.ZodOptional<z.ZodString>;
|
391
|
-
y: z.ZodOptional<z.ZodString>;
|
392
|
-
x5c: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
393
|
-
x5t: z.ZodOptional<z.ZodString>;
|
394
|
-
"x5t#S256": z.ZodOptional<z.ZodString>;
|
395
|
-
x5u: z.ZodOptional<z.ZodString>;
|
396
|
-
}, "strip", z.ZodTypeAny, {
|
397
|
-
kty: "RSA" | "EC";
|
398
|
-
alg?: string | undefined;
|
399
|
-
crv?: string | undefined;
|
400
|
-
d?: string | undefined;
|
401
|
-
dp?: string | undefined;
|
402
|
-
dq?: string | undefined;
|
403
|
-
e?: string | undefined;
|
404
|
-
ext?: boolean | undefined;
|
405
|
-
k?: string | undefined;
|
406
|
-
key_ops?: string[] | undefined;
|
407
|
-
kid?: string | undefined;
|
408
|
-
n?: string | undefined;
|
409
|
-
p?: string | undefined;
|
410
|
-
q?: string | undefined;
|
411
|
-
qi?: string | undefined;
|
412
|
-
use?: string | undefined;
|
413
|
-
x?: string | undefined;
|
414
|
-
y?: string | undefined;
|
415
|
-
x5c?: string[] | undefined;
|
416
|
-
x5t?: string | undefined;
|
417
|
-
"x5t#S256"?: string | undefined;
|
418
|
-
x5u?: string | undefined;
|
419
|
-
}, {
|
420
|
-
kty: "RSA" | "EC";
|
421
|
-
alg?: string | undefined;
|
422
|
-
crv?: string | undefined;
|
423
|
-
d?: string | undefined;
|
424
|
-
dp?: string | undefined;
|
425
|
-
dq?: string | undefined;
|
426
|
-
e?: string | undefined;
|
427
|
-
ext?: boolean | undefined;
|
428
|
-
k?: string | undefined;
|
429
|
-
key_ops?: string[] | undefined;
|
430
|
-
kid?: string | undefined;
|
431
|
-
n?: string | undefined;
|
432
|
-
p?: string | undefined;
|
433
|
-
q?: string | undefined;
|
434
|
-
qi?: string | undefined;
|
435
|
-
use?: string | undefined;
|
436
|
-
x?: string | undefined;
|
437
|
-
y?: string | undefined;
|
438
|
-
x5c?: string[] | undefined;
|
439
|
-
x5t?: string | undefined;
|
440
|
-
"x5t#S256"?: string | undefined;
|
441
|
-
x5u?: string | undefined;
|
442
|
-
}>, "many">;
|
443
|
-
}, "strip", z.ZodTypeAny, {
|
444
|
-
keys: {
|
445
|
-
kty: "RSA" | "EC";
|
446
|
-
alg?: string | undefined;
|
447
|
-
crv?: string | undefined;
|
448
|
-
d?: string | undefined;
|
449
|
-
dp?: string | undefined;
|
450
|
-
dq?: string | undefined;
|
451
|
-
e?: string | undefined;
|
452
|
-
ext?: boolean | undefined;
|
453
|
-
k?: string | undefined;
|
454
|
-
key_ops?: string[] | undefined;
|
455
|
-
kid?: string | undefined;
|
456
|
-
n?: string | undefined;
|
457
|
-
p?: string | undefined;
|
458
|
-
q?: string | undefined;
|
459
|
-
qi?: string | undefined;
|
460
|
-
use?: string | undefined;
|
461
|
-
x?: string | undefined;
|
462
|
-
y?: string | undefined;
|
463
|
-
x5c?: string[] | undefined;
|
464
|
-
x5t?: string | undefined;
|
465
|
-
"x5t#S256"?: string | undefined;
|
466
|
-
x5u?: string | undefined;
|
467
|
-
}[];
|
468
|
-
}, {
|
469
|
-
keys: {
|
470
|
-
kty: "RSA" | "EC";
|
471
|
-
alg?: string | undefined;
|
472
|
-
crv?: string | undefined;
|
473
|
-
d?: string | undefined;
|
474
|
-
dp?: string | undefined;
|
475
|
-
dq?: string | undefined;
|
476
|
-
e?: string | undefined;
|
477
|
-
ext?: boolean | undefined;
|
478
|
-
k?: string | undefined;
|
479
|
-
key_ops?: string[] | undefined;
|
480
|
-
kid?: string | undefined;
|
481
|
-
n?: string | undefined;
|
482
|
-
p?: string | undefined;
|
483
|
-
q?: string | undefined;
|
484
|
-
qi?: string | undefined;
|
485
|
-
use?: string | undefined;
|
486
|
-
x?: string | undefined;
|
487
|
-
y?: string | undefined;
|
488
|
-
x5c?: string[] | undefined;
|
489
|
-
x5t?: string | undefined;
|
490
|
-
"x5t#S256"?: string | undefined;
|
491
|
-
x5u?: string | undefined;
|
492
|
-
}[];
|
493
|
-
}>>;
|
494
|
-
}, "strip", z.ZodTypeAny, {
|
495
|
-
authorization_encrypted_response_alg?: string | undefined;
|
496
|
-
authorization_encrypted_response_enc?: string | undefined;
|
497
|
-
jwks_uri?: string | undefined;
|
498
|
-
jwks?: {
|
499
|
-
keys: {
|
500
|
-
kty: "RSA" | "EC";
|
501
|
-
alg?: string | undefined;
|
502
|
-
crv?: string | undefined;
|
503
|
-
d?: string | undefined;
|
504
|
-
dp?: string | undefined;
|
505
|
-
dq?: string | undefined;
|
506
|
-
e?: string | undefined;
|
507
|
-
ext?: boolean | undefined;
|
508
|
-
k?: string | undefined;
|
509
|
-
key_ops?: string[] | undefined;
|
510
|
-
kid?: string | undefined;
|
511
|
-
n?: string | undefined;
|
512
|
-
p?: string | undefined;
|
513
|
-
q?: string | undefined;
|
514
|
-
qi?: string | undefined;
|
515
|
-
use?: string | undefined;
|
516
|
-
x?: string | undefined;
|
517
|
-
y?: string | undefined;
|
518
|
-
x5c?: string[] | undefined;
|
519
|
-
x5t?: string | undefined;
|
520
|
-
"x5t#S256"?: string | undefined;
|
521
|
-
x5u?: string | undefined;
|
522
|
-
}[];
|
523
|
-
} | undefined;
|
524
|
-
}, {
|
525
|
-
authorization_encrypted_response_alg?: string | undefined;
|
526
|
-
authorization_encrypted_response_enc?: string | undefined;
|
527
|
-
jwks_uri?: string | undefined;
|
528
|
-
jwks?: {
|
529
|
-
keys: {
|
530
|
-
kty: "RSA" | "EC";
|
531
|
-
alg?: string | undefined;
|
532
|
-
crv?: string | undefined;
|
533
|
-
d?: string | undefined;
|
534
|
-
dp?: string | undefined;
|
535
|
-
dq?: string | undefined;
|
536
|
-
e?: string | undefined;
|
537
|
-
ext?: boolean | undefined;
|
538
|
-
k?: string | undefined;
|
539
|
-
key_ops?: string[] | undefined;
|
540
|
-
kid?: string | undefined;
|
541
|
-
n?: string | undefined;
|
542
|
-
p?: string | undefined;
|
543
|
-
q?: string | undefined;
|
544
|
-
qi?: string | undefined;
|
545
|
-
use?: string | undefined;
|
546
|
-
x?: string | undefined;
|
547
|
-
y?: string | undefined;
|
548
|
-
x5c?: string[] | undefined;
|
549
|
-
x5t?: string | undefined;
|
550
|
-
"x5t#S256"?: string | undefined;
|
551
|
-
x5u?: string | undefined;
|
552
|
-
}[];
|
553
|
-
} | undefined;
|
554
|
-
}>>;
|
555
356
|
dcql_query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
556
357
|
scope: z.ZodOptional<z.ZodString>;
|
557
358
|
presentation_definition: z.ZodOptional<z.ZodObject<{
|
@@ -772,47 +573,16 @@ export declare const RequestObject: z.ZodObject<{
|
|
772
573
|
}[] | undefined;
|
773
574
|
}>>;
|
774
575
|
}, "strip", z.ZodTypeAny, {
|
576
|
+
iss: string;
|
775
577
|
nonce: string;
|
776
|
-
|
777
|
-
|
578
|
+
iat: number;
|
579
|
+
exp: number;
|
778
580
|
client_id: string;
|
779
581
|
response_uri: string;
|
780
|
-
|
781
|
-
|
782
|
-
exp?: number | undefined;
|
582
|
+
response_type: "vp_token";
|
583
|
+
response_mode: "direct_post.jwt";
|
783
584
|
state?: string | undefined;
|
784
|
-
|
785
|
-
client_metadata?: {
|
786
|
-
authorization_encrypted_response_alg?: string | undefined;
|
787
|
-
authorization_encrypted_response_enc?: string | undefined;
|
788
|
-
jwks_uri?: string | undefined;
|
789
|
-
jwks?: {
|
790
|
-
keys: {
|
791
|
-
kty: "RSA" | "EC";
|
792
|
-
alg?: string | undefined;
|
793
|
-
crv?: string | undefined;
|
794
|
-
d?: string | undefined;
|
795
|
-
dp?: string | undefined;
|
796
|
-
dq?: string | undefined;
|
797
|
-
e?: string | undefined;
|
798
|
-
ext?: boolean | undefined;
|
799
|
-
k?: string | undefined;
|
800
|
-
key_ops?: string[] | undefined;
|
801
|
-
kid?: string | undefined;
|
802
|
-
n?: string | undefined;
|
803
|
-
p?: string | undefined;
|
804
|
-
q?: string | undefined;
|
805
|
-
qi?: string | undefined;
|
806
|
-
use?: string | undefined;
|
807
|
-
x?: string | undefined;
|
808
|
-
y?: string | undefined;
|
809
|
-
x5c?: string[] | undefined;
|
810
|
-
x5t?: string | undefined;
|
811
|
-
"x5t#S256"?: string | undefined;
|
812
|
-
x5u?: string | undefined;
|
813
|
-
}[];
|
814
|
-
} | undefined;
|
815
|
-
} | undefined;
|
585
|
+
response_uri_method?: string | undefined;
|
816
586
|
dcql_query?: Record<string, any> | undefined;
|
817
587
|
scope?: string | undefined;
|
818
588
|
presentation_definition?: {
|
@@ -853,47 +623,16 @@ export declare const RequestObject: z.ZodObject<{
|
|
853
623
|
}[] | undefined;
|
854
624
|
} | undefined;
|
855
625
|
}, {
|
626
|
+
iss: string;
|
856
627
|
nonce: string;
|
857
|
-
|
858
|
-
|
628
|
+
iat: number;
|
629
|
+
exp: number;
|
859
630
|
client_id: string;
|
860
631
|
response_uri: string;
|
861
|
-
|
862
|
-
|
863
|
-
exp?: number | undefined;
|
632
|
+
response_type: "vp_token";
|
633
|
+
response_mode: "direct_post.jwt";
|
864
634
|
state?: string | undefined;
|
865
|
-
|
866
|
-
client_metadata?: {
|
867
|
-
authorization_encrypted_response_alg?: string | undefined;
|
868
|
-
authorization_encrypted_response_enc?: string | undefined;
|
869
|
-
jwks_uri?: string | undefined;
|
870
|
-
jwks?: {
|
871
|
-
keys: {
|
872
|
-
kty: "RSA" | "EC";
|
873
|
-
alg?: string | undefined;
|
874
|
-
crv?: string | undefined;
|
875
|
-
d?: string | undefined;
|
876
|
-
dp?: string | undefined;
|
877
|
-
dq?: string | undefined;
|
878
|
-
e?: string | undefined;
|
879
|
-
ext?: boolean | undefined;
|
880
|
-
k?: string | undefined;
|
881
|
-
key_ops?: string[] | undefined;
|
882
|
-
kid?: string | undefined;
|
883
|
-
n?: string | undefined;
|
884
|
-
p?: string | undefined;
|
885
|
-
q?: string | undefined;
|
886
|
-
qi?: string | undefined;
|
887
|
-
use?: string | undefined;
|
888
|
-
x?: string | undefined;
|
889
|
-
y?: string | undefined;
|
890
|
-
x5c?: string[] | undefined;
|
891
|
-
x5t?: string | undefined;
|
892
|
-
"x5t#S256"?: string | undefined;
|
893
|
-
x5u?: string | undefined;
|
894
|
-
}[];
|
895
|
-
} | undefined;
|
896
|
-
} | undefined;
|
635
|
+
response_uri_method?: string | undefined;
|
897
636
|
dcql_query?: Record<string, any> | undefined;
|
898
637
|
scope?: string | undefined;
|
899
638
|
presentation_definition?: {
|
@@ -934,30 +673,121 @@ export declare const RequestObject: z.ZodObject<{
|
|
934
673
|
}[] | undefined;
|
935
674
|
} | undefined;
|
936
675
|
}>;
|
676
|
+
export type WalletMetadata = z.infer<typeof WalletMetadata>;
|
677
|
+
export declare const WalletMetadata: z.ZodObject<{
|
678
|
+
presentation_definition_uri_supported: z.ZodOptional<z.ZodBoolean>;
|
679
|
+
client_id_schemes_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
680
|
+
request_object_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
681
|
+
vp_formats_supported: z.ZodRecord<z.ZodString, z.ZodObject<{
|
682
|
+
"sd-jwt_alg_values": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
683
|
+
}, "strip", z.ZodTypeAny, {
|
684
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
685
|
+
}, {
|
686
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
687
|
+
}>>;
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
689
|
+
vp_formats_supported: Record<string, {
|
690
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
691
|
+
}>;
|
692
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
693
|
+
client_id_schemes_supported?: string[] | undefined;
|
694
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
695
|
+
}, {
|
696
|
+
vp_formats_supported: Record<string, {
|
697
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
698
|
+
}>;
|
699
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
700
|
+
client_id_schemes_supported?: string[] | undefined;
|
701
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
702
|
+
}>;
|
703
|
+
/**
|
704
|
+
* Wallet capabilities that must be submitted to get the Request Object
|
705
|
+
* via POST request when the `request_uri_method` is `post`.
|
706
|
+
*/
|
707
|
+
export type RequestObjectWalletCapabilities = z.infer<typeof RequestObjectWalletCapabilities>;
|
708
|
+
export declare const RequestObjectWalletCapabilities: z.ZodObject<{
|
709
|
+
wallet_metadata: z.ZodObject<{
|
710
|
+
presentation_definition_uri_supported: z.ZodOptional<z.ZodBoolean>;
|
711
|
+
client_id_schemes_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
712
|
+
request_object_signing_alg_values_supported: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
713
|
+
vp_formats_supported: z.ZodRecord<z.ZodString, z.ZodObject<{
|
714
|
+
"sd-jwt_alg_values": z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
715
|
+
}, "strip", z.ZodTypeAny, {
|
716
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
717
|
+
}, {
|
718
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
719
|
+
}>>;
|
720
|
+
}, "strip", z.ZodTypeAny, {
|
721
|
+
vp_formats_supported: Record<string, {
|
722
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
723
|
+
}>;
|
724
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
725
|
+
client_id_schemes_supported?: string[] | undefined;
|
726
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
727
|
+
}, {
|
728
|
+
vp_formats_supported: Record<string, {
|
729
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
730
|
+
}>;
|
731
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
732
|
+
client_id_schemes_supported?: string[] | undefined;
|
733
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
734
|
+
}>;
|
735
|
+
wallet_nonce: z.ZodOptional<z.ZodString>;
|
736
|
+
}, "strip", z.ZodTypeAny, {
|
737
|
+
wallet_metadata: {
|
738
|
+
vp_formats_supported: Record<string, {
|
739
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
740
|
+
}>;
|
741
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
742
|
+
client_id_schemes_supported?: string[] | undefined;
|
743
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
744
|
+
};
|
745
|
+
wallet_nonce?: string | undefined;
|
746
|
+
}, {
|
747
|
+
wallet_metadata: {
|
748
|
+
vp_formats_supported: Record<string, {
|
749
|
+
"sd-jwt_alg_values"?: string[] | undefined;
|
750
|
+
}>;
|
751
|
+
presentation_definition_uri_supported?: boolean | undefined;
|
752
|
+
client_id_schemes_supported?: string[] | undefined;
|
753
|
+
request_object_signing_alg_values_supported?: string[] | undefined;
|
754
|
+
};
|
755
|
+
wallet_nonce?: string | undefined;
|
756
|
+
}>;
|
937
757
|
/**
|
938
758
|
* This type models the possible error responses the OpenID4VP protocol allows for a presentation of a credential.
|
939
|
-
*
|
759
|
+
* When the Wallet encounters one of these errors, it will notify the Relying Party through the `response_uri` endpoint.
|
760
|
+
* See https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/pid-eaa-presentation.html#authorization-response-errors for more information.
|
940
761
|
*/
|
941
762
|
export type ErrorResponse = z.infer<typeof ErrorResponse>;
|
942
|
-
export declare const ErrorResponse: z.ZodEnum<["
|
763
|
+
export declare const ErrorResponse: z.ZodEnum<["invalid_request_object", "invalid_request_uri", "vp_formats_not_supported", "invalid_request", "access_denied", "invalid_client"]>;
|
943
764
|
/**
|
944
|
-
*
|
765
|
+
* Authorization Response payload sent to the Relying Party.
|
945
766
|
*/
|
946
767
|
export type DirectAuthorizationBodyPayload = z.infer<typeof DirectAuthorizationBodyPayload>;
|
947
768
|
export declare const DirectAuthorizationBodyPayload: z.ZodUnion<[z.ZodObject<{
|
948
|
-
vp_token: z.
|
949
|
-
|
769
|
+
vp_token: z.ZodRecord<z.ZodString, z.ZodString>;
|
770
|
+
}, "strip", z.ZodTypeAny, {
|
771
|
+
vp_token: Record<string, string>;
|
772
|
+
}, {
|
773
|
+
vp_token: Record<string, string>;
|
774
|
+
}>, z.ZodObject<{
|
775
|
+
error: z.ZodEnum<["invalid_request_object", "invalid_request_uri", "vp_formats_not_supported", "invalid_request", "access_denied", "invalid_client"]>;
|
776
|
+
error_description: z.ZodString;
|
950
777
|
}, "strip", z.ZodTypeAny, {
|
951
|
-
|
952
|
-
|
778
|
+
error: "invalid_request_object" | "invalid_request_uri" | "vp_formats_not_supported" | "invalid_request" | "access_denied" | "invalid_client";
|
779
|
+
error_description: string;
|
953
780
|
}, {
|
954
|
-
|
955
|
-
|
781
|
+
error: "invalid_request_object" | "invalid_request_uri" | "vp_formats_not_supported" | "invalid_request" | "access_denied" | "invalid_client";
|
782
|
+
error_description: string;
|
956
783
|
}>, z.ZodObject<{
|
957
|
-
|
784
|
+
vp_token: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
785
|
+
presentation_submission: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
958
786
|
}, "strip", z.ZodTypeAny, {
|
959
|
-
|
787
|
+
presentation_submission: Record<string, unknown>;
|
788
|
+
vp_token?: string | string[] | undefined;
|
960
789
|
}, {
|
961
|
-
|
790
|
+
presentation_submission: Record<string, unknown>;
|
791
|
+
vp_token?: string | string[] | undefined;
|
962
792
|
}>]>;
|
963
793
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACO,MAAM;IACzB,MAAM,EAAE;IACsC,aAAa;CACzE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAmBF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO1B,CAAC;AAqBH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC5E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcxB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;EAWzB,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAC;AACF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa,gJAOxB,CAAC;AAUH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;IAMzC,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* WARNING: This is the first function to be called in the status attestation flow. The next function to be called is {@link statusAttestation}.
|
3
|
+
* The beginning of the status attestation flow.
|
4
|
+
*
|
5
|
+
* @returns The url of the credential issuer to be used in the next function.
|
6
|
+
*/
|
7
|
+
export type StartFlow = () => {
|
8
|
+
issuerUrl: string;
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=01-start-flow.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/01-start-flow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { type Out } from "../../utils/misc";
|
2
|
+
import type { EvaluateIssuerTrust, ObtainCredential } from "../issuance";
|
3
|
+
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
4
|
+
import { StatusAttestationResponse } from "./types";
|
5
|
+
export type StatusAttestation = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credential: Out<ObtainCredential>["credential"], credentialCryptoContext: CryptoContext, appFetch?: GlobalFetch["fetch"]) => Promise<{
|
6
|
+
statusAttestation: StatusAttestationResponse["status_attestation"];
|
7
|
+
}>;
|
8
|
+
/**
|
9
|
+
* WARNING: This function must be called after {@link startFlow}.
|
10
|
+
* Verify the status of the credential attestation.
|
11
|
+
* @param issuerConf - The issuer's configuration
|
12
|
+
* @param credential - The credential to be verified
|
13
|
+
* @param credentialCryptoContext - The credential's crypto context
|
14
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
15
|
+
* @throws {IssuerResponseError} with a specific code for more context
|
16
|
+
* @returns The credential status attestation
|
17
|
+
*/
|
18
|
+
export declare const statusAttestation: StatusAttestation;
|
19
|
+
//# sourceMappingURL=02-status-attestation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"02-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/02-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,GAAG,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,aAAa,EAAW,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AASpD,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,uBAAuB,EAAE,aAAa,EACtC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC;IACX,iBAAiB,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA6C/B,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { Out } from "../../utils/misc";
|
2
|
+
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
3
|
+
import type { EvaluateIssuerTrust, StatusAttestation } from "../status";
|
4
|
+
import { ParsedStatusAttestation } from "./types";
|
5
|
+
export type VerifyAndParseStatusAttestation = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], statusAttestation: Out<StatusAttestation>, context: {
|
6
|
+
credentialCryptoContext: CryptoContext;
|
7
|
+
}) => Promise<{
|
8
|
+
parsedStatusAttestation: ParsedStatusAttestation;
|
9
|
+
}>;
|
10
|
+
/**
|
11
|
+
* Given a status attestation, verifies that:
|
12
|
+
* - It's in the supported format;
|
13
|
+
* - The attestation is correctly signed;
|
14
|
+
* - It's bound to the given key.
|
15
|
+
* @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
|
16
|
+
* @param statusAttestation The encoded status attestation returned by {@link statusAttestation}
|
17
|
+
* @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
|
18
|
+
* @returns A parsed status attestation
|
19
|
+
* @throws {IoWalletError} If the credential signature is not verified with the Issuer key set
|
20
|
+
* @throws {IoWalletError} If the credential is not bound to the provided user key
|
21
|
+
* @throws {IoWalletError} If the credential data fail to parse
|
22
|
+
*/
|
23
|
+
export declare const verifyAndParseStatusAttestation: VerifyAndParseStatusAttestation;
|
24
|
+
//# sourceMappingURL=03-verify-and-parse-status-attestation.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"03-verify-and-parse-status-attestation.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/03-verify-and-parse-status-attestation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIlD,MAAM,MAAM,+BAA+B,GAAG,CAC5C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,CAAC,EACzC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;CACxC,KACE,OAAO,CAAC;IAAE,uBAAuB,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,EAAE,+BAwC3C,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { type StartFlow } from "./01-start-flow";
|
2
|
+
import { statusAttestation, type StatusAttestation } from "./02-status-attestation";
|
3
|
+
import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "../issuance";
|
4
|
+
import { verifyAndParseStatusAttestation, type VerifyAndParseStatusAttestation } from "./03-verify-and-parse-status-attestation";
|
5
|
+
export { evaluateIssuerTrust, statusAttestation, verifyAndParseStatusAttestation, };
|
6
|
+
export type { StartFlow, EvaluateIssuerTrust, StatusAttestation, VerifyAndParseStatusAttestation, };
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,+BAA+B,EAC/B,KAAK,+BAA+B,EACrC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,+BAA+B,GAChC,CAAC"}
|