@pagopa/io-react-native-wallet 1.7.0 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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/{entity/trust → trust}/chain.js +49 -55
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/errors.js +110 -0
- package/lib/commonjs/trust/errors.js.map +1 -0
- package/lib/commonjs/trust/index.js +282 -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 +41 -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/chain.js +108 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/errors.js +94 -0
- package/lib/module/trust/errors.js.map +1 -0
- package/lib/module/trust/index.js +263 -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 +33 -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 +30 -82
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +29 -134
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/{entity/trust → trust}/chain.d.ts +5 -10
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/errors.d.ts +80 -0
- package/lib/typescript/trust/errors.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/index.d.ts +211 -186
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/types.d.ts +1533 -1120
- package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +12 -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 +78 -120
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +8 -9
- 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/chain.ts +151 -0
- package/src/trust/errors.ts +105 -0
- package/src/{entity/trust → trust}/index.ts +198 -23
- package/src/{entity/trust → trust}/types.ts +24 -37
- package/src/trust/utils.ts +35 -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.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.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,41 +1,26 @@
|
|
1
|
-
import { InputDescriptor, type
|
1
|
+
import { InputDescriptor, type LegacyRemotePresentation } from "./types";
|
2
2
|
import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
export type EvaluatedDisclosures = {
|
4
|
+
requiredDisclosures: DisclosureWithEncoded[];
|
5
|
+
optionalDisclosures: DisclosureWithEncoded[];
|
6
|
+
unrequestedDisclosures: DisclosureWithEncoded[];
|
7
7
|
};
|
8
|
-
type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
|
9
|
-
type
|
10
|
-
export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [string, string, string][], credentialsMdoc: [string, string, string][]) => Promise<{
|
8
|
+
export type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
|
9
|
+
export type EvaluateInputDescriptors = (descriptors: InputDescriptor[], credentialsSdJwt: [string, string][]) => Promise<{
|
11
10
|
evaluatedDisclosure: EvaluatedDisclosures;
|
12
11
|
inputDescriptor: InputDescriptor;
|
13
12
|
credential: string;
|
14
13
|
keyTag: string;
|
15
14
|
}[]>;
|
16
|
-
export declare const disclosureWithEncodedToEvaluatedDisclosure: (disclosure: DisclosureWithEncoded) => EvaluatedDisclosure;
|
17
|
-
type DecodedCredentialMdoc = {
|
18
|
-
keyTag: string;
|
19
|
-
credential: string;
|
20
|
-
issuerSigned: CBOR.IssuerSigned;
|
21
|
-
};
|
22
|
-
type DecodedCredentialSdJwt = {
|
23
|
-
keyTag: string;
|
24
|
-
credential: string;
|
25
|
-
sdJwt: SdJwt4VC;
|
26
|
-
disclosures: DisclosureWithEncoded[];
|
27
|
-
};
|
28
15
|
/**
|
29
|
-
*
|
30
|
-
* the constraints defined in the input descriptor. It categorizes disclosures as either required
|
31
|
-
* or optional based on the field definitions.
|
32
|
-
*
|
33
|
-
* @param inputDescriptor - Contains constraints and field definitions specifying required/optional claims.
|
34
|
-
* @param issuerSigned - Contains the issuerSigned with namespaces and their associated claims.
|
35
|
-
* @returns An object with two arrays: one for required disclosures and one for optional disclosures.
|
36
|
-
* @throws MissingDataError - If a required field is missing or if a claim fails JSON Schema validation.
|
16
|
+
* @deprecated Use `prepareRemotePresentations` from DCQL
|
37
17
|
*/
|
38
|
-
export
|
18
|
+
export type PrepareLegacyRemotePresentations = (credentialAndDescriptors: {
|
19
|
+
requestedClaims: string[];
|
20
|
+
inputDescriptor: InputDescriptor;
|
21
|
+
credential: string;
|
22
|
+
keyTag: string;
|
23
|
+
}[], nonce: string, client_id: string) => Promise<LegacyRemotePresentation[]>;
|
39
24
|
/**
|
40
25
|
* Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
|
41
26
|
*
|
@@ -44,15 +29,23 @@ export declare const evaluateInputDescriptorForMdoc: EvaluateInputDescriptorMdoc
|
|
44
29
|
* - Validates whether required fields are present (unless marked optional)
|
45
30
|
* and match any specified JSONPath.
|
46
31
|
* - If a field includes a JSON Schema filter, validates the claim value against that schema.
|
32
|
+
* - Enforces `limit_disclosure` rules by returning only disclosures, required and optional, matching the specified fields
|
33
|
+
* if set to "required". Otherwise also return the array unrequestedDisclosures with disclosures which can be passed for a particular use case.
|
47
34
|
* - Throws an error if a required field is invalid or missing.
|
48
35
|
*
|
49
36
|
* @param inputDescriptor - Describes constraints (fields, filters, etc.) that must be satisfied.
|
50
37
|
* @param payloadCredential - The credential payload to check against.
|
51
38
|
* @param disclosures - An array of DisclosureWithEncoded objects representing selective disclosures.
|
52
|
-
* @returns
|
39
|
+
* @returns A filtered list of disclosures satisfying the descriptor constraints, or throws an error if not.
|
53
40
|
* @throws Will throw an error if any required constraint fails or if JSONPath lookups are invalid.
|
54
41
|
*/
|
55
42
|
export declare const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC;
|
43
|
+
type DecodedCredentialSdJwt = {
|
44
|
+
keyTag: string;
|
45
|
+
credential: string;
|
46
|
+
sdJwt: SdJwt4VC;
|
47
|
+
disclosures: DisclosureWithEncoded[];
|
48
|
+
};
|
56
49
|
/**
|
57
50
|
* Finds the first credential that satisfies the input descriptor constraints.
|
58
51
|
* @param inputDescriptor The input descriptor to evaluate.
|
@@ -64,17 +57,6 @@ export declare const findCredentialSdJwt: (inputDescriptor: InputDescriptor, dec
|
|
64
57
|
matchedKeyTag: string;
|
65
58
|
matchedCredential: string;
|
66
59
|
};
|
67
|
-
/**
|
68
|
-
* Finds the first credential that satisfies the input descriptor constraints.
|
69
|
-
* @param inputDescriptor The input descriptor to evaluate.
|
70
|
-
* @param decodedMdocCredentials An array of decoded MDOC credentials.
|
71
|
-
* @returns An object containing the matched evaluation, keyTag, and credential.
|
72
|
-
*/
|
73
|
-
export declare const findCredentialMDoc: (inputDescriptor: InputDescriptor, decodedMDocCredentials: DecodedCredentialMdoc[]) => {
|
74
|
-
matchedEvaluation: EvaluatedDisclosures;
|
75
|
-
matchedKeyTag: string;
|
76
|
-
matchedCredential: string;
|
77
|
-
};
|
78
60
|
/**
|
79
61
|
* Evaluates multiple input descriptors against provided SD-JWT and MDOC credentials.
|
80
62
|
*
|
@@ -85,11 +67,27 @@ export declare const findCredentialMDoc: (inputDescriptor: InputDescriptor, deco
|
|
85
67
|
*
|
86
68
|
* @param inputDescriptors - An array of input descriptors.
|
87
69
|
* @param credentialsSdJwt - An array of tuples containing keyTag and SD-JWT credential.
|
88
|
-
* @param credentialsMdoc - An array of tuples containing keyTag and MDOC credential.
|
89
70
|
* @returns An array of objects, each containing the evaluated disclosures,
|
90
71
|
* the input descriptor, the credential, and the keyTag.
|
91
72
|
* @throws {CredentialNotFoundError} When the credential format is unsupported.
|
92
73
|
*/
|
93
74
|
export declare const evaluateInputDescriptors: EvaluateInputDescriptors;
|
75
|
+
/**
|
76
|
+
* Prepares remote presentations for a set of credentials based on input descriptors.
|
77
|
+
*
|
78
|
+
* For each credential and its corresponding input descriptor, this function:
|
79
|
+
* - Validates the credential format.
|
80
|
+
* - Generates a verifiable presentation token (vpToken) using the provided nonce and client identifier.
|
81
|
+
*
|
82
|
+
* @deprecated Use `prepareRemotePresentations` from DCQL
|
83
|
+
*
|
84
|
+
* @param credentialAndDescriptors - An array containing objects with requested claims,
|
85
|
+
* input descriptor, credential, and keyTag.
|
86
|
+
* @param nonce - A unique nonce for the verifiable presentation token.
|
87
|
+
* @param client_id - The client identifier.
|
88
|
+
* @returns A promise that resolves to an array of RemotePresentation objects.
|
89
|
+
* @throws {CredentialNotFoundError} When the credential format is unsupported.
|
90
|
+
*/
|
91
|
+
export declare const prepareLegacyRemotePresentations: PrepareLegacyRemotePresentations;
|
94
92
|
export {};
|
95
93
|
//# sourceMappingURL=07-evaluate-input-descriptor.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAU1E,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAC5C,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,QAAQ,CAAC,SAAS,CAAC,EACtC,WAAW,EAAE,qBAAqB,EAAE,KACjC,oBAAoB,CAAC;AAE1B,MAAM,MAAM,wBAAwB,GAAG,CACrC,WAAW,EAAE,eAAe,EAAE,EAC9B,gBAAgB,EAAE,CAAC,MAAM,EAAe,MAAM,CAAkB,EAAE,KAC/D,OAAO,CACV;IACE,mBAAmB,EAAE,oBAAoB,CAAC;IAC1C,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,EAAE,CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAC7C,wBAAwB,EAAE;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,eAAe,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,EAAE,EACH,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;AA+EzC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kCAAkC,EAAE,+BAsG9C,CAAC;AAEJ,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,QAAQ,CAAC;IAChB,WAAW,EAAE,qBAAqB,EAAE,CAAC;CACtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,oBACb,eAAe,2BACP,sBAAsB,EAAE,KAChD;IACD,iBAAiB,EAAE,oBAAoB,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;CAgC3B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBA0CtC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gCAAgC,EAAE,gCA6B5C,CAAC"}
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import type
|
2
|
-
import type {
|
1
|
+
import { type FetchJwks } from "./04-retrieve-rp-jwks";
|
2
|
+
import type { VerifyRequestObject } from "./05-verify-request-object";
|
3
3
|
import { type Out } from "../../utils/misc";
|
4
|
-
import { DirectAuthorizationBodyPayload, ErrorResponse, type
|
4
|
+
import { type RemotePresentation, DirectAuthorizationBodyPayload, ErrorResponse, type LegacyRemotePresentation } from "./types";
|
5
5
|
import * as z from "zod";
|
6
6
|
import type { JWK } from "../../utils/jwk";
|
7
|
+
import type { RelyingPartyEntityConfiguration } from "../../trust";
|
7
8
|
export type AuthorizationResponse = z.infer<typeof AuthorizationResponse>;
|
8
9
|
export declare const AuthorizationResponse: z.ZodObject<{
|
9
10
|
status: z.ZodOptional<z.ZodString>;
|
@@ -22,45 +23,35 @@ export declare const AuthorizationResponse: z.ZodObject<{
|
|
22
23
|
* Selects a public key (with `use = enc`) from the set of JWK keys
|
23
24
|
* offered by the Relying Party (RP) for encryption.
|
24
25
|
*
|
25
|
-
* Preference is given to EC keys (P-256 or P-384), followed by RSA keys,
|
26
|
-
* based on compatibility and common usage for encryption.
|
27
|
-
*
|
28
26
|
* @param rpJwkKeys - The array of JWKs retrieved from the RP entity configuration.
|
29
27
|
* @returns The first suitable public key found in the list.
|
30
28
|
* @throws {NoSuitableKeysFoundInEntityConfiguration} If no suitable encryption key is found.
|
31
29
|
*/
|
32
30
|
export declare const choosePublicKeyToEncrypt: (rpJwkKeys: Out<FetchJwks>["keys"]) => JWK;
|
33
|
-
/**
|
34
|
-
* Builds a URL-encoded form body for a direct POST response without encryption.
|
35
|
-
*
|
36
|
-
* @param requestObject - Contains state, nonce, and other relevant info.
|
37
|
-
* @param payload - Object that contains either the VP token to encrypt and the stringified mapping of the credential disclosures or the error code
|
38
|
-
* @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
|
39
|
-
*/
|
40
|
-
export declare const buildDirectPostBody: (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], payload: DirectAuthorizationBodyPayload) => Promise<string>;
|
41
31
|
/**
|
42
32
|
* Builds a URL-encoded form body for a direct POST response using JWT encryption.
|
43
33
|
*
|
44
34
|
* @param jwkKeys - Array of JWKs from the Relying Party for encryption.
|
45
35
|
* @param requestObject - Contains state, nonce, and other relevant info.
|
46
|
-
* @param payload - Object that contains
|
47
|
-
* @
|
48
|
-
* @returns A URL-encoded string for an `application/x-www-form-urlencoded` POST body,
|
49
|
-
* where `response` contains the encrypted JWE.
|
36
|
+
* @param payload - Object that contains the VP token to encrypt and the mapping of the credential disclosures
|
37
|
+
* @returns A URL-encoded string for an `application/x-www-form-urlencoded` POST body, where `response` contains the encrypted JWE.
|
50
38
|
*/
|
51
|
-
export declare const buildDirectPostJwtBody: (
|
39
|
+
export declare const buildDirectPostJwtBody: (requestObject: Out<VerifyRequestObject>["requestObject"], rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"], payload: DirectAuthorizationBodyPayload) => Promise<string>;
|
52
40
|
/**
|
53
|
-
*
|
54
|
-
*
|
41
|
+
* Builds a URL-encoded form body for a direct POST response without encryption.
|
42
|
+
*
|
43
|
+
* @param requestObject - Contains state, nonce, and other relevant info.
|
44
|
+
* @param payload - Object that contains either the VP token to encrypt and the stringified mapping of the credential disclosures or the error code
|
45
|
+
* @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
|
55
46
|
*/
|
56
|
-
export
|
57
|
-
appFetch?: GlobalFetch["fetch"];
|
58
|
-
}) => Promise<AuthorizationResponse>;
|
47
|
+
export declare const buildDirectPostBody: (requestObject: Out<VerifyRequestObject>["requestObject"], payload: DirectAuthorizationBodyPayload) => Promise<string>;
|
59
48
|
/**
|
60
49
|
* Type definition for the function that sends the authorization response
|
61
50
|
* to the Relying Party, completing the presentation flow.
|
51
|
+
* Use with `presentation_definition`.
|
52
|
+
* @deprecated Use `sendAuthorizationResponse`
|
62
53
|
*/
|
63
|
-
export type
|
54
|
+
export type SendLegacyAuthorizationResponse = (requestObject: Out<VerifyRequestObject>["requestObject"], presentationDefinitionId: string, remotePresentations: LegacyRemotePresentation[], rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"], context?: {
|
64
55
|
appFetch?: GlobalFetch["fetch"];
|
65
56
|
}) => Promise<AuthorizationResponse>;
|
66
57
|
/**
|
@@ -74,12 +65,24 @@ export type SendAuthorizationResponseDcql = (requestObject: Out<VerifyRequestObj
|
|
74
65
|
* @param context - Contains optional custom fetch implementation.
|
75
66
|
* @returns Parsed and validated authorization response from the Relying Party.
|
76
67
|
*/
|
68
|
+
export declare const sendLegacyAuthorizationResponse: SendLegacyAuthorizationResponse;
|
69
|
+
/**
|
70
|
+
* Type definition for the function that sends the authorization response
|
71
|
+
* to the Relying Party, completing the presentation flow.
|
72
|
+
* Use with DCQL queries.
|
73
|
+
*/
|
74
|
+
export type SendAuthorizationResponse = (requestObject: Out<VerifyRequestObject>["requestObject"], remotePresentations: RemotePresentation[], rpConf: RelyingPartyEntityConfiguration["payload"]["metadata"], context?: {
|
75
|
+
appFetch?: GlobalFetch["fetch"];
|
76
|
+
}) => Promise<AuthorizationResponse>;
|
77
77
|
export declare const sendAuthorizationResponse: SendAuthorizationResponse;
|
78
78
|
/**
|
79
79
|
* Type definition for the function that sends the authorization response
|
80
80
|
* to the Relying Party, completing the presentation flow.
|
81
81
|
*/
|
82
|
-
export type SendAuthorizationErrorResponse = (requestObject: Out<
|
82
|
+
export type SendAuthorizationErrorResponse = (requestObject: Out<VerifyRequestObject>["requestObject"], error: {
|
83
|
+
error: ErrorResponse;
|
84
|
+
errorDescription: string;
|
85
|
+
}, context?: {
|
83
86
|
appFetch?: GlobalFetch["fetch"];
|
84
87
|
}) => Promise<AuthorizationResponse>;
|
85
88
|
/**
|
@@ -87,25 +90,9 @@ export type SendAuthorizationErrorResponse = (requestObject: Out<VerifyRequestOb
|
|
87
90
|
* This function completes the presentation flow in an OpenID 4 Verifiable Presentations scenario.
|
88
91
|
*
|
89
92
|
* @param requestObject - The request details, including presentation requirements.
|
90
|
-
* @param error - The response error value
|
91
|
-
* @param jwkKeys - Array of JWKs from the Relying Party for optional encryption.
|
93
|
+
* @param error - The response error value, with description
|
92
94
|
* @param context - Contains optional custom fetch implementation.
|
93
95
|
* @returns Parsed and validated authorization response from the Relying Party.
|
94
96
|
*/
|
95
97
|
export declare const sendAuthorizationErrorResponse: SendAuthorizationErrorResponse;
|
96
|
-
export declare const sendAuthorizationResponseDcql: SendAuthorizationResponseDcql;
|
97
|
-
/**
|
98
|
-
* Prepares remote presentations for a set of credentials.
|
99
|
-
*
|
100
|
-
* For each credential, this function:
|
101
|
-
* - Validates the credential format (currently supports 'mso_mdoc' and 'vc+sd-jwt').
|
102
|
-
* - Generates a verifiable presentation token (vpToken) using the appropriate method.
|
103
|
-
* - For ISO 18013-7, generates a special nonce with minimum entropy of 16.
|
104
|
-
*
|
105
|
-
* @param credentials - An array of credential items containing format, credential data, requested claims, and key information.
|
106
|
-
* @param authRequestObject - The authentication request object containing nonce, clientId, and responseUri.
|
107
|
-
* @returns A promise that resolves to an object containing an array of presentations and the generated nonce.
|
108
|
-
* @throws {CredentialNotFoundError} When the credential format is unsupported.
|
109
|
-
*/
|
110
|
-
export declare const prepareRemotePresentations: PrepareRemotePresentations;
|
111
98
|
//# sourceMappingURL=08-send-authorization-response.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"08-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/08-send-authorization-response.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"08-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/08-send-authorization-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EACL,KAAK,kBAAkB,EACvB,8BAA8B,EAC9B,aAAa,EACb,KAAK,wBAAwB,EAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAQnE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAUhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,cACxB,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,KAChC,GAWF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,kBAClB,IAAI,mBAAmB,CAAC,CAAC,eAAe,CAAC,UAChD,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,WACrD,8BAA8B,KACtC,QAAQ,MAAM,CAkChB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,kBACf,IAAI,mBAAmB,CAAC,CAAC,eAAe,CAAC,WAC/C,8BAA8B,KACtC,QAAQ,MAAM,CAgBhB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC5C,aAAa,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC,EACxD,wBAAwB,EAAE,MAAM,EAChC,mBAAmB,EAAE,wBAAwB,EAAE,EAC/C,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,EAC9D,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B,EAAE,+BAkD3C,CAAC;AAEJ;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC,EACxD,mBAAmB,EAAE,kBAAkB,EAAE,EACzC,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,EAC9D,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC,eAAO,MAAM,yBAAyB,EAAE,yBA6BvC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAC3C,aAAa,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,eAAe,CAAC,EACxD,KAAK,EAAE;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,EACzD,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,8BAqB1C,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { IoWalletError } from "../../utils/errors";
|
2
|
+
export { DcqlError } from "dcql";
|
2
3
|
/**
|
3
4
|
* An error subclass thrown when auth request decode fail
|
4
5
|
*
|
@@ -23,16 +24,24 @@ export declare class NoSuitableKeysFoundInEntityConfiguration extends IoWalletEr
|
|
23
24
|
constructor(scenario: string);
|
24
25
|
}
|
25
26
|
/**
|
26
|
-
* When
|
27
|
+
* When a QR code is not valid.
|
27
28
|
*
|
28
29
|
*/
|
29
|
-
export declare class
|
30
|
+
export declare class InvalidQRCodeError extends IoWalletError {
|
30
31
|
code: string;
|
31
|
-
/**
|
32
|
-
|
33
|
-
*/
|
32
|
+
/** Detailed reason for the QR code validation failure. */
|
33
|
+
reason: string;
|
34
34
|
constructor(reason: string);
|
35
35
|
}
|
36
|
+
/**
|
37
|
+
* When the Request Object sent by the Relying Party is not valid
|
38
|
+
*/
|
39
|
+
export declare class InvalidRequestObjectError extends IoWalletError {
|
40
|
+
code: string;
|
41
|
+
/** Detailed reason for the Request Object validation failure. */
|
42
|
+
reason: string;
|
43
|
+
constructor(message: string, reason?: string);
|
44
|
+
}
|
36
45
|
/**
|
37
46
|
* When some required data is missing to continue because certain attributes are not contained inside the wallet.
|
38
47
|
*
|
@@ -44,15 +53,21 @@ export declare class MissingDataError extends IoWalletError {
|
|
44
53
|
*/
|
45
54
|
constructor(missingAttributes: string);
|
46
55
|
}
|
56
|
+
export type NotFoundDetail = {
|
57
|
+
id: string;
|
58
|
+
reason?: string;
|
59
|
+
vctValues?: string[];
|
60
|
+
};
|
47
61
|
/**
|
48
|
-
*
|
49
|
-
*
|
62
|
+
* Error thrown when one or more credentials cannot be found in the wallet
|
63
|
+
* and the presentation request cannot be satisfied.
|
50
64
|
*/
|
51
|
-
export declare class
|
65
|
+
export declare class CredentialsNotFoundError extends IoWalletError {
|
52
66
|
code: string;
|
67
|
+
details: NotFoundDetail[];
|
53
68
|
/**
|
54
|
-
* @param
|
69
|
+
* @param details The details of the credentials that could not be found.
|
55
70
|
*/
|
56
|
-
constructor(
|
71
|
+
constructor(details: NotFoundDetail[]);
|
57
72
|
}
|
58
73
|
//# sourceMappingURL=errors.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,IAAI,SAAwD;IAE5D,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;gBAGb,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAsB,EAC7B,MAAM,GAAE,MAAsB;CAMjC;AAED;;;GAGG;AACH,qBAAa,wCAAyC,SAAQ,aAAa;IACzE,IAAI,SAAoC;IAExC;;OAEG;gBACS,QAAQ,EAAE,MAAM;CAI7B;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,IAAI,SAAyB;IAE7B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM;CAI3B;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,aAAa;IAC1D,IAAI,SAAgC;IAEpC,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAgB;CAIpD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,IAAI,SAAsB;IAE1B;;OAEG;gBACS,iBAAiB,EAAE,MAAM;CAItC;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,aAAa;IACzD,IAAI,SAA+B;IACnC,OAAO,EAAE,cAAc,EAAE,CAAC;IAE1B;;OAEG;gBACS,OAAO,EAAE,cAAc,EAAE;CAItC"}
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import { startFlowFromQR, type StartFlow } from "./01-start-flow";
|
2
2
|
import { evaluateRelyingPartyTrust, type EvaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
|
3
3
|
import { getRequestObject, type GetRequestObject } from "./03-get-request-object";
|
4
|
-
import {
|
5
|
-
import {
|
4
|
+
import { getJwksFromConfig, type FetchJwks } from "./04-retrieve-rp-jwks";
|
5
|
+
import { verifyRequestObject, type VerifyRequestObject } from "./05-verify-request-object";
|
6
6
|
import { fetchPresentDefinition, type FetchPresentationDefinition } from "./06-fetch-presentation-definition";
|
7
|
-
import { evaluateInputDescriptors, type EvaluateInputDescriptors } from "./07-evaluate-input-descriptor";
|
8
|
-
import { evaluateDcqlQuery, type EvaluateDcqlQuery } from "./07-evaluate-dcql-query";
|
9
|
-
import {
|
7
|
+
import { evaluateInputDescriptors, prepareLegacyRemotePresentations, type EvaluateInputDescriptors, type PrepareLegacyRemotePresentations } from "./07-evaluate-input-descriptor";
|
8
|
+
import { evaluateDcqlQuery, prepareRemotePresentations, type EvaluateDcqlQuery, type PrepareRemotePresentations } from "./07-evaluate-dcql-query";
|
9
|
+
import { sendAuthorizationResponse, type SendAuthorizationResponse, sendLegacyAuthorizationResponse, type SendLegacyAuthorizationResponse, sendAuthorizationErrorResponse, type SendAuthorizationErrorResponse } from "./08-send-authorization-response";
|
10
10
|
import * as Errors from "./errors";
|
11
|
-
|
12
|
-
export {
|
13
|
-
export type { StartFlow, EvaluateRelyingPartyTrust, GetRequestObject, FetchJwks, VerifyRequestObjectSignature, FetchPresentationDefinition, EvaluateInputDescriptors, PrepareRemotePresentations, SendAuthorizationResponse, SendAuthorizationResponseDcql, SendAuthorizationErrorResponse, EvaluateDcqlQuery, };
|
11
|
+
export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, getJwksFromConfig, verifyRequestObject, fetchPresentDefinition, evaluateInputDescriptors, evaluateDcqlQuery, prepareLegacyRemotePresentations, prepareRemotePresentations, sendAuthorizationResponse, sendLegacyAuthorizationResponse, sendAuthorizationErrorResponse, Errors, };
|
12
|
+
export type { StartFlow, EvaluateRelyingPartyTrust, GetRequestObject, FetchJwks, VerifyRequestObject, FetchPresentationDefinition, EvaluateInputDescriptors, EvaluateDcqlQuery, PrepareLegacyRemotePresentations, PrepareRemotePresentations, SendAuthorizationResponse, SendLegacyAuthorizationResponse, SendAuthorizationErrorResponse, };
|
14
13
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACtC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,+BAA+B,EAC/B,KAAK,+BAA+B,EACpC,8BAA8B,EAC9B,KAAK,8BAA8B,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,gCAAgC,EAChC,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,EAC/B,8BAA8B,EAC9B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,yBAAyB,EACzB,gBAAgB,EAChB,SAAS,EACT,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,iBAAiB,EACjB,gCAAgC,EAChC,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,EAC/B,8BAA8B,GAC/B,CAAC"}
|