@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,615 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
type TestScenario,
|
3
|
-
type ParseCredentialArg,
|
4
|
-
type ParseCredentialReturn,
|
5
|
-
buildMockSDJWTTestScenario,
|
6
|
-
buildMockMDOCTestScenario,
|
7
|
-
} from "./07-verify-and-parse-credentials-utils";
|
8
|
-
import { IoWalletError } from "../../../utils/errors";
|
9
|
-
|
10
|
-
export const inputs: TestScenario<
|
11
|
-
ParseCredentialArg,
|
12
|
-
ParseCredentialReturn,
|
13
|
-
Error
|
14
|
-
>[] = [
|
15
|
-
// sd-jwt
|
16
|
-
{
|
17
|
-
name: "Mandatory claims = Disclosures, all mandatory",
|
18
|
-
input: {
|
19
|
-
format: "vc+sd-jwt",
|
20
|
-
parameters: buildMockSDJWTTestScenario(
|
21
|
-
{
|
22
|
-
family_name: {
|
23
|
-
display: [
|
24
|
-
{
|
25
|
-
name: "Cognome",
|
26
|
-
locale: "it-IT",
|
27
|
-
},
|
28
|
-
],
|
29
|
-
mandatory: true,
|
30
|
-
},
|
31
|
-
given_name: {
|
32
|
-
display: [
|
33
|
-
{
|
34
|
-
name: "Nome",
|
35
|
-
locale: "it-IT",
|
36
|
-
},
|
37
|
-
],
|
38
|
-
mandatory: true,
|
39
|
-
},
|
40
|
-
},
|
41
|
-
[
|
42
|
-
["unused", "family_name", "Rossi"],
|
43
|
-
["unused", "given_name", "Mario"],
|
44
|
-
]
|
45
|
-
),
|
46
|
-
},
|
47
|
-
expected: {
|
48
|
-
given_name: {
|
49
|
-
name: {
|
50
|
-
"it-IT": "Nome",
|
51
|
-
},
|
52
|
-
value: "Mario",
|
53
|
-
mandatory: true,
|
54
|
-
},
|
55
|
-
family_name: {
|
56
|
-
name: {
|
57
|
-
"it-IT": "Cognome",
|
58
|
-
},
|
59
|
-
value: "Rossi",
|
60
|
-
mandatory: true,
|
61
|
-
},
|
62
|
-
},
|
63
|
-
},
|
64
|
-
{
|
65
|
-
name: "Mandatory claims = Disclosures, not all mandatory",
|
66
|
-
input: {
|
67
|
-
format: "vc+sd-jwt",
|
68
|
-
parameters: buildMockSDJWTTestScenario(
|
69
|
-
{
|
70
|
-
family_name: {
|
71
|
-
display: [
|
72
|
-
{
|
73
|
-
name: "Cognome",
|
74
|
-
locale: "it-IT",
|
75
|
-
},
|
76
|
-
],
|
77
|
-
mandatory: true,
|
78
|
-
},
|
79
|
-
given_name: {
|
80
|
-
display: [
|
81
|
-
{
|
82
|
-
name: "Nome",
|
83
|
-
locale: "it-IT",
|
84
|
-
},
|
85
|
-
],
|
86
|
-
mandatory: false,
|
87
|
-
},
|
88
|
-
},
|
89
|
-
[
|
90
|
-
["unused", "family_name", "Rossi"],
|
91
|
-
["unused", "given_name", "Mario"],
|
92
|
-
]
|
93
|
-
),
|
94
|
-
},
|
95
|
-
expected: {
|
96
|
-
given_name: {
|
97
|
-
name: {
|
98
|
-
"it-IT": "Nome",
|
99
|
-
},
|
100
|
-
value: "Mario",
|
101
|
-
mandatory: false,
|
102
|
-
},
|
103
|
-
family_name: {
|
104
|
-
name: {
|
105
|
-
"it-IT": "Cognome",
|
106
|
-
},
|
107
|
-
value: "Rossi",
|
108
|
-
mandatory: true,
|
109
|
-
},
|
110
|
-
},
|
111
|
-
},
|
112
|
-
{
|
113
|
-
name: "Mandatory claims < Disclosures, all mandatory",
|
114
|
-
input: {
|
115
|
-
format: "vc+sd-jwt",
|
116
|
-
parameters: buildMockSDJWTTestScenario(
|
117
|
-
{
|
118
|
-
family_name: {
|
119
|
-
display: [
|
120
|
-
{
|
121
|
-
name: "Cognome",
|
122
|
-
locale: "it-IT",
|
123
|
-
},
|
124
|
-
],
|
125
|
-
mandatory: true,
|
126
|
-
},
|
127
|
-
},
|
128
|
-
[
|
129
|
-
["unused", "family_name", "Rossi"],
|
130
|
-
["unused", "given_name", "Mario"],
|
131
|
-
]
|
132
|
-
),
|
133
|
-
},
|
134
|
-
expected: {
|
135
|
-
given_name: {
|
136
|
-
name: "given_name",
|
137
|
-
value: "Mario",
|
138
|
-
},
|
139
|
-
family_name: {
|
140
|
-
name: {
|
141
|
-
"it-IT": "Cognome",
|
142
|
-
},
|
143
|
-
value: "Rossi",
|
144
|
-
mandatory: true,
|
145
|
-
},
|
146
|
-
},
|
147
|
-
},
|
148
|
-
{
|
149
|
-
name: "Mandatory claims < Disclosures, not all mandatory",
|
150
|
-
input: {
|
151
|
-
format: "vc+sd-jwt",
|
152
|
-
parameters: buildMockSDJWTTestScenario(
|
153
|
-
{
|
154
|
-
family_name: {
|
155
|
-
display: [
|
156
|
-
{
|
157
|
-
name: "Cognome",
|
158
|
-
locale: "it-IT",
|
159
|
-
},
|
160
|
-
],
|
161
|
-
mandatory: true,
|
162
|
-
},
|
163
|
-
given_name: {
|
164
|
-
display: [
|
165
|
-
{
|
166
|
-
name: "Nome",
|
167
|
-
locale: "it-IT",
|
168
|
-
},
|
169
|
-
],
|
170
|
-
mandatory: false,
|
171
|
-
},
|
172
|
-
},
|
173
|
-
[
|
174
|
-
["unused", "family_name", "Rossi"],
|
175
|
-
["unused", "given_name", "Mario"],
|
176
|
-
["unused", "birth_date", new Date(2000, 2, 1)],
|
177
|
-
]
|
178
|
-
),
|
179
|
-
},
|
180
|
-
expected: {
|
181
|
-
given_name: {
|
182
|
-
name: {
|
183
|
-
"it-IT": "Nome",
|
184
|
-
},
|
185
|
-
value: "Mario",
|
186
|
-
mandatory: false,
|
187
|
-
},
|
188
|
-
family_name: {
|
189
|
-
name: {
|
190
|
-
"it-IT": "Cognome",
|
191
|
-
},
|
192
|
-
value: "Rossi",
|
193
|
-
mandatory: true,
|
194
|
-
},
|
195
|
-
birth_date: {
|
196
|
-
name: "birth_date",
|
197
|
-
value: new Date(2000, 2, 1),
|
198
|
-
},
|
199
|
-
},
|
200
|
-
},
|
201
|
-
{
|
202
|
-
name: "Mandatory claims > Disclosures, all mandatory",
|
203
|
-
input: {
|
204
|
-
format: "vc+sd-jwt",
|
205
|
-
parameters: buildMockSDJWTTestScenario(
|
206
|
-
{
|
207
|
-
family_name: {
|
208
|
-
display: [
|
209
|
-
{
|
210
|
-
name: "Cognome",
|
211
|
-
locale: "it-IT",
|
212
|
-
},
|
213
|
-
],
|
214
|
-
mandatory: true,
|
215
|
-
},
|
216
|
-
given_name: {
|
217
|
-
display: [
|
218
|
-
{
|
219
|
-
name: "Nome",
|
220
|
-
locale: "it-IT",
|
221
|
-
},
|
222
|
-
],
|
223
|
-
mandatory: true,
|
224
|
-
},
|
225
|
-
},
|
226
|
-
[["unused", "family_name", "Rossi"]]
|
227
|
-
),
|
228
|
-
},
|
229
|
-
throws: new IoWalletError(),
|
230
|
-
},
|
231
|
-
{
|
232
|
-
name: "Mandatory claims > Disclosures, not all mandatory",
|
233
|
-
input: {
|
234
|
-
format: "vc+sd-jwt",
|
235
|
-
parameters: buildMockSDJWTTestScenario(
|
236
|
-
{
|
237
|
-
family_name: {
|
238
|
-
display: [
|
239
|
-
{
|
240
|
-
name: "Cognome",
|
241
|
-
locale: "it-IT",
|
242
|
-
},
|
243
|
-
],
|
244
|
-
mandatory: true,
|
245
|
-
},
|
246
|
-
given_name: {
|
247
|
-
display: [
|
248
|
-
{
|
249
|
-
name: "Nome",
|
250
|
-
locale: "it-IT",
|
251
|
-
},
|
252
|
-
],
|
253
|
-
mandatory: true,
|
254
|
-
},
|
255
|
-
birth_date: {
|
256
|
-
display: [
|
257
|
-
{
|
258
|
-
name: "Data di nascita",
|
259
|
-
locale: "it-IT",
|
260
|
-
},
|
261
|
-
],
|
262
|
-
mandatory: false,
|
263
|
-
},
|
264
|
-
},
|
265
|
-
[["unused", "family_name", "Rossi"]]
|
266
|
-
),
|
267
|
-
},
|
268
|
-
throws: new IoWalletError(),
|
269
|
-
},
|
270
|
-
{
|
271
|
-
name: "Non mandatory claim not found",
|
272
|
-
input: {
|
273
|
-
format: "vc+sd-jwt",
|
274
|
-
parameters: buildMockSDJWTTestScenario(
|
275
|
-
{
|
276
|
-
family_name: {
|
277
|
-
display: [
|
278
|
-
{
|
279
|
-
name: "Cognome",
|
280
|
-
locale: "it-IT",
|
281
|
-
},
|
282
|
-
],
|
283
|
-
mandatory: true,
|
284
|
-
},
|
285
|
-
given_name: {
|
286
|
-
display: [
|
287
|
-
{
|
288
|
-
name: "Nome",
|
289
|
-
locale: "it-IT",
|
290
|
-
},
|
291
|
-
],
|
292
|
-
mandatory: false,
|
293
|
-
},
|
294
|
-
},
|
295
|
-
[
|
296
|
-
["unused", "family_name", "Rossi"],
|
297
|
-
["unused", "birth_date", new Date(2000, 2, 1)],
|
298
|
-
]
|
299
|
-
),
|
300
|
-
},
|
301
|
-
expected: {
|
302
|
-
family_name: {
|
303
|
-
name: {
|
304
|
-
"it-IT": "Cognome",
|
305
|
-
},
|
306
|
-
value: "Rossi",
|
307
|
-
mandatory: true,
|
308
|
-
},
|
309
|
-
birth_date: {
|
310
|
-
name: "birth_date",
|
311
|
-
value: new Date(2000, 2, 1),
|
312
|
-
},
|
313
|
-
},
|
314
|
-
},
|
315
|
-
//MDOC
|
316
|
-
{
|
317
|
-
name: "Mandatory claims = Disclosures, all mandatory",
|
318
|
-
input: {
|
319
|
-
format: "mso_mdoc",
|
320
|
-
parameters: buildMockMDOCTestScenario(
|
321
|
-
{
|
322
|
-
family_name: {
|
323
|
-
display: [
|
324
|
-
{
|
325
|
-
name: "Cognome",
|
326
|
-
locale: "it-IT",
|
327
|
-
},
|
328
|
-
],
|
329
|
-
mandatory: true,
|
330
|
-
},
|
331
|
-
given_name: {
|
332
|
-
display: [
|
333
|
-
{
|
334
|
-
name: "Nome",
|
335
|
-
locale: "it-IT",
|
336
|
-
},
|
337
|
-
],
|
338
|
-
mandatory: true,
|
339
|
-
},
|
340
|
-
},
|
341
|
-
[
|
342
|
-
["family_name", "Rossi"],
|
343
|
-
["given_name", "Mario"],
|
344
|
-
]
|
345
|
-
),
|
346
|
-
},
|
347
|
-
expected: {
|
348
|
-
given_name: {
|
349
|
-
name: {
|
350
|
-
"it-IT": "Nome",
|
351
|
-
},
|
352
|
-
value: "Mario",
|
353
|
-
mandatory: true,
|
354
|
-
},
|
355
|
-
family_name: {
|
356
|
-
name: {
|
357
|
-
"it-IT": "Cognome",
|
358
|
-
},
|
359
|
-
value: "Rossi",
|
360
|
-
mandatory: true,
|
361
|
-
},
|
362
|
-
},
|
363
|
-
},
|
364
|
-
{
|
365
|
-
name: "Mandatory claims = Disclosures, not all mandatory",
|
366
|
-
input: {
|
367
|
-
format: "mso_mdoc",
|
368
|
-
parameters: buildMockMDOCTestScenario(
|
369
|
-
{
|
370
|
-
family_name: {
|
371
|
-
display: [
|
372
|
-
{
|
373
|
-
name: "Cognome",
|
374
|
-
locale: "it-IT",
|
375
|
-
},
|
376
|
-
],
|
377
|
-
mandatory: true,
|
378
|
-
},
|
379
|
-
given_name: {
|
380
|
-
display: [
|
381
|
-
{
|
382
|
-
name: "Nome",
|
383
|
-
locale: "it-IT",
|
384
|
-
},
|
385
|
-
],
|
386
|
-
mandatory: false,
|
387
|
-
},
|
388
|
-
},
|
389
|
-
[
|
390
|
-
["family_name", "Rossi"],
|
391
|
-
["given_name", "Mario"],
|
392
|
-
]
|
393
|
-
),
|
394
|
-
},
|
395
|
-
expected: {
|
396
|
-
given_name: {
|
397
|
-
name: {
|
398
|
-
"it-IT": "Nome",
|
399
|
-
},
|
400
|
-
value: "Mario",
|
401
|
-
mandatory: false,
|
402
|
-
},
|
403
|
-
family_name: {
|
404
|
-
name: {
|
405
|
-
"it-IT": "Cognome",
|
406
|
-
},
|
407
|
-
value: "Rossi",
|
408
|
-
mandatory: true,
|
409
|
-
},
|
410
|
-
},
|
411
|
-
},
|
412
|
-
{
|
413
|
-
name: "Mandatory claims < Disclosures, all mandatory",
|
414
|
-
input: {
|
415
|
-
format: "mso_mdoc",
|
416
|
-
parameters: buildMockMDOCTestScenario(
|
417
|
-
{
|
418
|
-
family_name: {
|
419
|
-
display: [
|
420
|
-
{
|
421
|
-
name: "Cognome",
|
422
|
-
locale: "it-IT",
|
423
|
-
},
|
424
|
-
],
|
425
|
-
mandatory: true,
|
426
|
-
},
|
427
|
-
},
|
428
|
-
[
|
429
|
-
["family_name", "Rossi"],
|
430
|
-
["given_name", "Mario"],
|
431
|
-
]
|
432
|
-
),
|
433
|
-
},
|
434
|
-
expected: {
|
435
|
-
given_name: {
|
436
|
-
name: "given_name",
|
437
|
-
value: "Mario",
|
438
|
-
},
|
439
|
-
family_name: {
|
440
|
-
name: {
|
441
|
-
"it-IT": "Cognome",
|
442
|
-
},
|
443
|
-
value: "Rossi",
|
444
|
-
mandatory: true,
|
445
|
-
},
|
446
|
-
},
|
447
|
-
},
|
448
|
-
{
|
449
|
-
name: "Mandatory claims < Disclosures, not all mandatory",
|
450
|
-
input: {
|
451
|
-
format: "mso_mdoc",
|
452
|
-
parameters: buildMockMDOCTestScenario(
|
453
|
-
{
|
454
|
-
family_name: {
|
455
|
-
display: [
|
456
|
-
{
|
457
|
-
name: "Cognome",
|
458
|
-
locale: "it-IT",
|
459
|
-
},
|
460
|
-
],
|
461
|
-
mandatory: true,
|
462
|
-
},
|
463
|
-
given_name: {
|
464
|
-
display: [
|
465
|
-
{
|
466
|
-
name: "Nome",
|
467
|
-
locale: "it-IT",
|
468
|
-
},
|
469
|
-
],
|
470
|
-
mandatory: false,
|
471
|
-
},
|
472
|
-
},
|
473
|
-
[
|
474
|
-
["family_name", "Rossi"],
|
475
|
-
["given_name", "Mario"],
|
476
|
-
["birth_date", new Date(2000, 2, 1)],
|
477
|
-
]
|
478
|
-
),
|
479
|
-
},
|
480
|
-
expected: {
|
481
|
-
given_name: {
|
482
|
-
name: {
|
483
|
-
"it-IT": "Nome",
|
484
|
-
},
|
485
|
-
value: "Mario",
|
486
|
-
mandatory: false,
|
487
|
-
},
|
488
|
-
family_name: {
|
489
|
-
name: {
|
490
|
-
"it-IT": "Cognome",
|
491
|
-
},
|
492
|
-
value: "Rossi",
|
493
|
-
mandatory: true,
|
494
|
-
},
|
495
|
-
birth_date: {
|
496
|
-
name: "birth_date",
|
497
|
-
value: new Date(2000, 2, 1),
|
498
|
-
},
|
499
|
-
},
|
500
|
-
},
|
501
|
-
{
|
502
|
-
name: "Mandatory claims > Disclosures, all mandatory",
|
503
|
-
input: {
|
504
|
-
format: "mso_mdoc",
|
505
|
-
parameters: buildMockMDOCTestScenario(
|
506
|
-
{
|
507
|
-
family_name: {
|
508
|
-
display: [
|
509
|
-
{
|
510
|
-
name: "Cognome",
|
511
|
-
locale: "it-IT",
|
512
|
-
},
|
513
|
-
],
|
514
|
-
mandatory: true,
|
515
|
-
},
|
516
|
-
given_name: {
|
517
|
-
display: [
|
518
|
-
{
|
519
|
-
name: "Nome",
|
520
|
-
locale: "it-IT",
|
521
|
-
},
|
522
|
-
],
|
523
|
-
mandatory: true,
|
524
|
-
},
|
525
|
-
},
|
526
|
-
[["family_name", "Rossi"]]
|
527
|
-
),
|
528
|
-
},
|
529
|
-
throws: new IoWalletError(),
|
530
|
-
},
|
531
|
-
{
|
532
|
-
name: "Mandatory claims > Disclosures, not all mandatory",
|
533
|
-
input: {
|
534
|
-
format: "mso_mdoc",
|
535
|
-
parameters: buildMockMDOCTestScenario(
|
536
|
-
{
|
537
|
-
family_name: {
|
538
|
-
display: [
|
539
|
-
{
|
540
|
-
name: "Cognome",
|
541
|
-
locale: "it-IT",
|
542
|
-
},
|
543
|
-
],
|
544
|
-
mandatory: true,
|
545
|
-
},
|
546
|
-
given_name: {
|
547
|
-
display: [
|
548
|
-
{
|
549
|
-
name: "Nome",
|
550
|
-
locale: "it-IT",
|
551
|
-
},
|
552
|
-
],
|
553
|
-
mandatory: true,
|
554
|
-
},
|
555
|
-
birth_date: {
|
556
|
-
display: [
|
557
|
-
{
|
558
|
-
name: "Data di nascita",
|
559
|
-
locale: "it-IT",
|
560
|
-
},
|
561
|
-
],
|
562
|
-
mandatory: false,
|
563
|
-
},
|
564
|
-
},
|
565
|
-
[["family_name", "Rossi"]]
|
566
|
-
),
|
567
|
-
},
|
568
|
-
throws: new IoWalletError(),
|
569
|
-
},
|
570
|
-
{
|
571
|
-
name: "Not mandatory claim not found",
|
572
|
-
input: {
|
573
|
-
format: "mso_mdoc",
|
574
|
-
parameters: buildMockMDOCTestScenario(
|
575
|
-
{
|
576
|
-
family_name: {
|
577
|
-
display: [
|
578
|
-
{
|
579
|
-
name: "Cognome",
|
580
|
-
locale: "it-IT",
|
581
|
-
},
|
582
|
-
],
|
583
|
-
mandatory: true,
|
584
|
-
},
|
585
|
-
given_name: {
|
586
|
-
display: [
|
587
|
-
{
|
588
|
-
name: "Nome",
|
589
|
-
locale: "it-IT",
|
590
|
-
},
|
591
|
-
],
|
592
|
-
mandatory: false,
|
593
|
-
},
|
594
|
-
},
|
595
|
-
[
|
596
|
-
["family_name", "Rossi"],
|
597
|
-
["birth_date", new Date(2000, 2, 1)],
|
598
|
-
]
|
599
|
-
),
|
600
|
-
},
|
601
|
-
expected: {
|
602
|
-
family_name: {
|
603
|
-
name: {
|
604
|
-
"it-IT": "Cognome",
|
605
|
-
},
|
606
|
-
value: "Rossi",
|
607
|
-
mandatory: true,
|
608
|
-
},
|
609
|
-
birth_date: {
|
610
|
-
name: "birth_date",
|
611
|
-
value: new Date(2000, 2, 1),
|
612
|
-
},
|
613
|
-
},
|
614
|
-
},
|
615
|
-
];
|