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