@pagopa/io-react-native-wallet 1.7.1 → 2.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -1
- package/lib/commonjs/client/generated/wallet-provider.js +49 -20
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/credential/index.js +5 -1
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +27 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +17 -12
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +36 -29
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +27 -207
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +23 -20
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/const.js.map +1 -1
- package/lib/commonjs/credential/issuance/index.js +3 -3
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +14 -15
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +6 -4
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +34 -7
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +4 -126
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +80 -25
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +97 -117
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +86 -191
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +112 -176
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/README.md +74 -79
- package/lib/commonjs/credential/presentation/errors.js +42 -21
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +13 -13
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +53 -29
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/credential/status/01-start-flow.js +2 -0
- package/lib/commonjs/credential/status/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/status/02-status-attestation.js +73 -0
- package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +55 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +67 -0
- package/lib/commonjs/credential/status/index.js +27 -0
- package/lib/commonjs/credential/status/index.js.map +1 -0
- package/lib/commonjs/credential/status/types.js +48 -0
- package/lib/commonjs/credential/status/types.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +62 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +86 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +13 -0
- package/lib/commonjs/credential/trustmark/index.js.map +1 -0
- package/lib/commonjs/index.js +5 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/sd-jwt/types.js +18 -2
- package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +22 -34
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +11 -23
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +1 -7
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +5 -21
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/trust/README.md +147 -0
- package/lib/commonjs/trust/chain.js +153 -0
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/errors.js +133 -0
- package/lib/commonjs/trust/errors.js.map +1 -0
- package/lib/commonjs/trust/index.js +288 -0
- package/lib/commonjs/trust/index.js.map +1 -0
- package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
- package/lib/commonjs/trust/types.js.map +1 -0
- package/lib/commonjs/trust/utils.js +70 -0
- package/lib/commonjs/trust/utils.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +5 -112
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -0
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +22 -2
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +72 -4
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/logging.js +68 -0
- package/lib/commonjs/utils/logging.js.map +1 -0
- package/lib/commonjs/utils/misc.js +2 -0
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +17 -10
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/string.js +1 -12
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/wallet-instance/index.js +14 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +40 -15
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/credential/index.js +3 -1
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +17 -11
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +23 -20
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/const.js.map +1 -1
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +14 -15
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +34 -7
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/README.md +74 -79
- package/lib/module/credential/presentation/errors.js +30 -17
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +6 -6
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +49 -27
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/credential/status/01-start-flow.js +2 -0
- package/lib/module/credential/status/01-start-flow.js.map +1 -0
- package/lib/module/credential/status/02-status-attestation.js +66 -0
- package/lib/module/credential/status/02-status-attestation.js.map +1 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/module/credential/status/README.md +67 -0
- package/lib/module/credential/status/index.js +5 -0
- package/lib/module/credential/status/index.js.map +1 -0
- package/lib/module/credential/status/types.js +40 -0
- package/lib/module/credential/status/types.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +62 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +3 -0
- package/lib/module/credential/trustmark/index.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/sd-jwt/types.js +16 -1
- package/lib/module/pid/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +22 -34
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +11 -23
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +1 -7
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +4 -19
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/trust/README.md +147 -0
- package/lib/module/trust/chain.js +145 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/errors.js +115 -0
- package/lib/module/trust/errors.js.map +1 -0
- package/lib/module/trust/index.js +269 -0
- package/lib/module/trust/index.js.map +1 -0
- package/lib/module/{entity/trust → trust}/types.js +25 -46
- package/lib/module/trust/types.js.map +1 -0
- package/lib/module/trust/utils.js +60 -0
- package/lib/module/trust/utils.js.map +1 -0
- package/lib/module/utils/crypto.js +4 -107
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -0
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/error-codes.js +20 -1
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +61 -4
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/logging.js +62 -0
- package/lib/module/utils/logging.js.map +1 -0
- package/lib/module/utils/misc.js +2 -0
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +17 -9
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/string.js +0 -10
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/wallet-instance/index.js +13 -0
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/README.md +8 -3
- package/lib/module/wallet-instance-attestation/index.js +2 -2
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +16 -9
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +14 -18
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/credential/index.d.ts +3 -1
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +8 -3
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/errors.d.ts +25 -10
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +7 -8
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +137 -307
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +7 -0
- package/lib/typescript/credential/status/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/types.d.ts +305 -0
- package/lib/typescript/credential/status/types.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +4 -0
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +20 -72
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +24 -129
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/trust/chain.d.ts +23 -0
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/errors.d.ts +102 -0
- package/lib/typescript/trust/errors.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/index.d.ts +308 -281
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/types.d.ts +1714 -1301
- package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +22 -0
- package/lib/typescript/trust/utils.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts +0 -32
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +20 -0
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +55 -10
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +35 -0
- package/lib/typescript/utils/logging.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +8 -1
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts +0 -7
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/index.d.ts +8 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +60 -102
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +9 -10
- package/src/client/generated/wallet-provider.ts +52 -17
- package/src/credential/index.ts +4 -1
- package/src/credential/issuance/01-start-flow.ts +1 -1
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
- package/src/credential/issuance/03-start-user-authorization.ts +48 -22
- package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
- package/src/credential/issuance/05-authorize-access.ts +29 -11
- package/src/credential/issuance/06-obtain-credential.ts +61 -36
- package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
- package/src/credential/issuance/README.md +23 -20
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/index.ts +6 -3
- package/src/credential/presentation/01-start-flow.ts +19 -22
- package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
- package/src/credential/presentation/03-get-request-object.ts +36 -8
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
- package/src/credential/presentation/05-verify-request-object.ts +115 -30
- package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
- package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
- package/src/credential/presentation/08-send-authorization-response.ts +178 -260
- package/src/credential/presentation/README.md +74 -79
- package/src/credential/presentation/errors.ts +38 -15
- package/src/credential/presentation/index.ts +18 -19
- package/src/credential/presentation/types.ts +67 -64
- package/src/credential/status/01-start-flow.ts +9 -0
- package/src/credential/status/02-status-attestation.ts +105 -0
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
- package/src/credential/status/README.md +67 -0
- package/src/credential/status/index.ts +22 -0
- package/src/credential/status/types.ts +43 -0
- package/src/credential/trustmark/README.md +62 -0
- package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
- package/src/credential/trustmark/index.ts +8 -0
- package/src/index.ts +4 -0
- package/src/pid/sd-jwt/types.ts +18 -1
- package/src/sd-jwt/__test__/index.test.ts +36 -55
- package/src/sd-jwt/__test__/types.test.ts +16 -29
- package/src/sd-jwt/index.ts +1 -5
- package/src/sd-jwt/types.ts +2 -19
- package/src/trust/README.md +147 -0
- package/src/trust/chain.ts +227 -0
- package/src/trust/errors.ts +136 -0
- package/src/{entity/trust → trust}/index.ts +207 -25
- package/src/{entity/trust → trust}/types.ts +24 -37
- package/src/trust/utils.ts +70 -0
- package/src/utils/crypto.ts +4 -106
- package/src/utils/decoder.ts +6 -1
- package/src/utils/error-codes.ts +23 -0
- package/src/utils/errors.ts +119 -15
- package/src/utils/logging.ts +68 -0
- package/src/utils/misc.ts +5 -0
- package/src/utils/par.ts +19 -6
- package/src/utils/string.ts +0 -10
- package/src/wallet-instance/index.ts +30 -1
- package/src/wallet-instance-attestation/README.md +8 -3
- package/src/wallet-instance-attestation/index.ts +2 -2
- package/src/wallet-instance-attestation/issuing.ts +33 -12
- package/src/wallet-instance-attestation/types.ts +18 -22
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
- package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
- package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/commonjs/entity/trust/chain.js +0 -122
- package/lib/commonjs/entity/trust/chain.js.map +0 -1
- package/lib/commonjs/entity/trust/index.js +0 -148
- package/lib/commonjs/entity/trust/index.js.map +0 -1
- package/lib/commonjs/entity/trust/types.js.map +0 -1
- package/lib/commonjs/mdoc/converters.js +0 -26
- package/lib/commonjs/mdoc/converters.js.map +0 -1
- package/lib/commonjs/mdoc/index.js +0 -68
- package/lib/commonjs/mdoc/index.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
- package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/index.js +0 -20
- package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/types.js +0 -48
- package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/module/entity/trust/chain.js +0 -113
- package/lib/module/entity/trust/chain.js.map +0 -1
- package/lib/module/entity/trust/index.js +0 -131
- package/lib/module/entity/trust/index.js.map +0 -1
- package/lib/module/entity/trust/types.js.map +0 -1
- package/lib/module/mdoc/converters.js +0 -20
- package/lib/module/mdoc/converters.js.map +0 -1
- package/lib/module/mdoc/index.js +0 -60
- package/lib/module/mdoc/index.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
- package/lib/typescript/entity/trust/chain.d.ts +0 -26
- package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
- package/lib/typescript/entity/trust/index.d.ts.map +0 -1
- package/lib/typescript/mdoc/converters.d.ts +0 -8
- package/lib/typescript/mdoc/converters.d.ts.map +0 -1
- package/lib/typescript/mdoc/index.d.ts +0 -10
- package/lib/typescript/mdoc/index.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
- package/src/credential/issuance/02-get-issuer-config.ts +0 -67
- package/src/entity/openid-connect/issuer/index.ts +0 -27
- package/src/entity/openid-connect/issuer/types.ts +0 -76
- package/src/entity/trust/chain.ts +0 -154
- package/src/mdoc/converters.ts +0 -26
- package/src/mdoc/index.ts +0 -95
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -0,0 +1,305 @@
|
|
1
|
+
import * as z from "zod";
|
2
|
+
/**
|
3
|
+
* Shape from parsing a status attestation response in case of 201.
|
4
|
+
*/
|
5
|
+
export declare const StatusAttestationResponse: z.ZodObject<{
|
6
|
+
status_attestation: z.ZodString;
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
8
|
+
status_attestation: string;
|
9
|
+
}, {
|
10
|
+
status_attestation: string;
|
11
|
+
}>;
|
12
|
+
/**
|
13
|
+
* Type from parsing a status attestation response in case of 201.
|
14
|
+
* Inferred from {@link StatusAttestationResponse}.
|
15
|
+
*/
|
16
|
+
export type StatusAttestationResponse = z.infer<typeof StatusAttestationResponse>;
|
17
|
+
/**
|
18
|
+
* Type for a parsed status attestation.
|
19
|
+
*/
|
20
|
+
export type ParsedStatusAttestation = z.infer<typeof ParsedStatusAttestation>;
|
21
|
+
/**
|
22
|
+
* Shape for parsing a status attestation in a JWT.
|
23
|
+
*/
|
24
|
+
export declare const ParsedStatusAttestation: z.ZodObject<{
|
25
|
+
header: z.ZodObject<{
|
26
|
+
typ: z.ZodLiteral<"status-attestation+jwt">;
|
27
|
+
alg: z.ZodString;
|
28
|
+
kid: z.ZodOptional<z.ZodString>;
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
30
|
+
alg: string;
|
31
|
+
typ: "status-attestation+jwt";
|
32
|
+
kid?: string | undefined;
|
33
|
+
}, {
|
34
|
+
alg: string;
|
35
|
+
typ: "status-attestation+jwt";
|
36
|
+
kid?: string | undefined;
|
37
|
+
}>;
|
38
|
+
payload: z.ZodObject<{
|
39
|
+
credential_hash_alg: z.ZodString;
|
40
|
+
credential_hash: z.ZodString;
|
41
|
+
cnf: z.ZodObject<{
|
42
|
+
jwk: z.ZodObject<{
|
43
|
+
alg: z.ZodOptional<z.ZodString>;
|
44
|
+
crv: z.ZodOptional<z.ZodString>;
|
45
|
+
d: z.ZodOptional<z.ZodString>;
|
46
|
+
dp: z.ZodOptional<z.ZodString>;
|
47
|
+
dq: z.ZodOptional<z.ZodString>;
|
48
|
+
e: z.ZodOptional<z.ZodString>;
|
49
|
+
ext: z.ZodOptional<z.ZodBoolean>;
|
50
|
+
k: z.ZodOptional<z.ZodString>;
|
51
|
+
key_ops: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
52
|
+
kid: z.ZodOptional<z.ZodString>;
|
53
|
+
kty: z.ZodUnion<[z.ZodLiteral<"RSA">, z.ZodLiteral<"EC">]>;
|
54
|
+
n: z.ZodOptional<z.ZodString>;
|
55
|
+
p: z.ZodOptional<z.ZodString>;
|
56
|
+
q: z.ZodOptional<z.ZodString>;
|
57
|
+
qi: z.ZodOptional<z.ZodString>;
|
58
|
+
use: z.ZodOptional<z.ZodString>;
|
59
|
+
x: z.ZodOptional<z.ZodString>;
|
60
|
+
y: z.ZodOptional<z.ZodString>;
|
61
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
62
|
+
x5t: z.ZodOptional<z.ZodString>;
|
63
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
64
|
+
x5u: z.ZodOptional<z.ZodString>;
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
66
|
+
kty: "RSA" | "EC";
|
67
|
+
alg?: string | undefined;
|
68
|
+
crv?: string | undefined;
|
69
|
+
d?: string | undefined;
|
70
|
+
dp?: string | undefined;
|
71
|
+
dq?: string | undefined;
|
72
|
+
e?: string | undefined;
|
73
|
+
ext?: boolean | undefined;
|
74
|
+
k?: string | undefined;
|
75
|
+
key_ops?: string[] | undefined;
|
76
|
+
kid?: string | undefined;
|
77
|
+
n?: string | undefined;
|
78
|
+
p?: string | undefined;
|
79
|
+
q?: string | undefined;
|
80
|
+
qi?: string | undefined;
|
81
|
+
use?: string | undefined;
|
82
|
+
x?: string | undefined;
|
83
|
+
y?: string | undefined;
|
84
|
+
x5c?: string[] | undefined;
|
85
|
+
x5t?: string | undefined;
|
86
|
+
"x5t#S256"?: string | undefined;
|
87
|
+
x5u?: string | undefined;
|
88
|
+
}, {
|
89
|
+
kty: "RSA" | "EC";
|
90
|
+
alg?: string | undefined;
|
91
|
+
crv?: string | undefined;
|
92
|
+
d?: string | undefined;
|
93
|
+
dp?: string | undefined;
|
94
|
+
dq?: string | undefined;
|
95
|
+
e?: string | undefined;
|
96
|
+
ext?: boolean | undefined;
|
97
|
+
k?: string | undefined;
|
98
|
+
key_ops?: string[] | undefined;
|
99
|
+
kid?: string | undefined;
|
100
|
+
n?: string | undefined;
|
101
|
+
p?: string | undefined;
|
102
|
+
q?: string | undefined;
|
103
|
+
qi?: string | undefined;
|
104
|
+
use?: string | undefined;
|
105
|
+
x?: string | undefined;
|
106
|
+
y?: string | undefined;
|
107
|
+
x5c?: string[] | undefined;
|
108
|
+
x5t?: string | undefined;
|
109
|
+
"x5t#S256"?: string | undefined;
|
110
|
+
x5u?: string | undefined;
|
111
|
+
}>;
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
113
|
+
jwk: {
|
114
|
+
kty: "RSA" | "EC";
|
115
|
+
alg?: string | undefined;
|
116
|
+
crv?: string | undefined;
|
117
|
+
d?: string | undefined;
|
118
|
+
dp?: string | undefined;
|
119
|
+
dq?: string | undefined;
|
120
|
+
e?: string | undefined;
|
121
|
+
ext?: boolean | undefined;
|
122
|
+
k?: string | undefined;
|
123
|
+
key_ops?: string[] | undefined;
|
124
|
+
kid?: string | undefined;
|
125
|
+
n?: string | undefined;
|
126
|
+
p?: string | undefined;
|
127
|
+
q?: string | undefined;
|
128
|
+
qi?: string | undefined;
|
129
|
+
use?: string | undefined;
|
130
|
+
x?: string | undefined;
|
131
|
+
y?: string | undefined;
|
132
|
+
x5c?: string[] | undefined;
|
133
|
+
x5t?: string | undefined;
|
134
|
+
"x5t#S256"?: string | undefined;
|
135
|
+
x5u?: string | undefined;
|
136
|
+
};
|
137
|
+
}, {
|
138
|
+
jwk: {
|
139
|
+
kty: "RSA" | "EC";
|
140
|
+
alg?: string | undefined;
|
141
|
+
crv?: string | undefined;
|
142
|
+
d?: string | undefined;
|
143
|
+
dp?: string | undefined;
|
144
|
+
dq?: string | undefined;
|
145
|
+
e?: string | undefined;
|
146
|
+
ext?: boolean | undefined;
|
147
|
+
k?: string | undefined;
|
148
|
+
key_ops?: string[] | undefined;
|
149
|
+
kid?: string | undefined;
|
150
|
+
n?: string | undefined;
|
151
|
+
p?: string | undefined;
|
152
|
+
q?: string | undefined;
|
153
|
+
qi?: string | undefined;
|
154
|
+
use?: string | undefined;
|
155
|
+
x?: string | undefined;
|
156
|
+
y?: string | undefined;
|
157
|
+
x5c?: string[] | undefined;
|
158
|
+
x5t?: string | undefined;
|
159
|
+
"x5t#S256"?: string | undefined;
|
160
|
+
x5u?: string | undefined;
|
161
|
+
};
|
162
|
+
}>;
|
163
|
+
exp: z.ZodNumber;
|
164
|
+
iat: z.ZodNumber;
|
165
|
+
}, "strip", z.ZodTypeAny, {
|
166
|
+
iat: number;
|
167
|
+
exp: number;
|
168
|
+
credential_hash_alg: string;
|
169
|
+
cnf: {
|
170
|
+
jwk: {
|
171
|
+
kty: "RSA" | "EC";
|
172
|
+
alg?: string | undefined;
|
173
|
+
crv?: string | undefined;
|
174
|
+
d?: string | undefined;
|
175
|
+
dp?: string | undefined;
|
176
|
+
dq?: string | undefined;
|
177
|
+
e?: string | undefined;
|
178
|
+
ext?: boolean | undefined;
|
179
|
+
k?: string | undefined;
|
180
|
+
key_ops?: string[] | undefined;
|
181
|
+
kid?: string | undefined;
|
182
|
+
n?: string | undefined;
|
183
|
+
p?: string | undefined;
|
184
|
+
q?: string | undefined;
|
185
|
+
qi?: string | undefined;
|
186
|
+
use?: string | undefined;
|
187
|
+
x?: string | undefined;
|
188
|
+
y?: string | undefined;
|
189
|
+
x5c?: string[] | undefined;
|
190
|
+
x5t?: string | undefined;
|
191
|
+
"x5t#S256"?: string | undefined;
|
192
|
+
x5u?: string | undefined;
|
193
|
+
};
|
194
|
+
};
|
195
|
+
credential_hash: string;
|
196
|
+
}, {
|
197
|
+
iat: number;
|
198
|
+
exp: number;
|
199
|
+
credential_hash_alg: string;
|
200
|
+
cnf: {
|
201
|
+
jwk: {
|
202
|
+
kty: "RSA" | "EC";
|
203
|
+
alg?: string | undefined;
|
204
|
+
crv?: string | undefined;
|
205
|
+
d?: string | undefined;
|
206
|
+
dp?: string | undefined;
|
207
|
+
dq?: string | undefined;
|
208
|
+
e?: string | undefined;
|
209
|
+
ext?: boolean | undefined;
|
210
|
+
k?: string | undefined;
|
211
|
+
key_ops?: string[] | undefined;
|
212
|
+
kid?: string | undefined;
|
213
|
+
n?: string | undefined;
|
214
|
+
p?: string | undefined;
|
215
|
+
q?: string | undefined;
|
216
|
+
qi?: string | undefined;
|
217
|
+
use?: string | undefined;
|
218
|
+
x?: string | undefined;
|
219
|
+
y?: string | undefined;
|
220
|
+
x5c?: string[] | undefined;
|
221
|
+
x5t?: string | undefined;
|
222
|
+
"x5t#S256"?: string | undefined;
|
223
|
+
x5u?: string | undefined;
|
224
|
+
};
|
225
|
+
};
|
226
|
+
credential_hash: string;
|
227
|
+
}>;
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
229
|
+
header: {
|
230
|
+
alg: string;
|
231
|
+
typ: "status-attestation+jwt";
|
232
|
+
kid?: string | undefined;
|
233
|
+
};
|
234
|
+
payload: {
|
235
|
+
iat: number;
|
236
|
+
exp: number;
|
237
|
+
credential_hash_alg: string;
|
238
|
+
cnf: {
|
239
|
+
jwk: {
|
240
|
+
kty: "RSA" | "EC";
|
241
|
+
alg?: string | undefined;
|
242
|
+
crv?: string | undefined;
|
243
|
+
d?: string | undefined;
|
244
|
+
dp?: string | undefined;
|
245
|
+
dq?: string | undefined;
|
246
|
+
e?: string | undefined;
|
247
|
+
ext?: boolean | undefined;
|
248
|
+
k?: string | undefined;
|
249
|
+
key_ops?: string[] | undefined;
|
250
|
+
kid?: string | undefined;
|
251
|
+
n?: string | undefined;
|
252
|
+
p?: string | undefined;
|
253
|
+
q?: string | undefined;
|
254
|
+
qi?: string | undefined;
|
255
|
+
use?: string | undefined;
|
256
|
+
x?: string | undefined;
|
257
|
+
y?: string | undefined;
|
258
|
+
x5c?: string[] | undefined;
|
259
|
+
x5t?: string | undefined;
|
260
|
+
"x5t#S256"?: string | undefined;
|
261
|
+
x5u?: string | undefined;
|
262
|
+
};
|
263
|
+
};
|
264
|
+
credential_hash: string;
|
265
|
+
};
|
266
|
+
}, {
|
267
|
+
header: {
|
268
|
+
alg: string;
|
269
|
+
typ: "status-attestation+jwt";
|
270
|
+
kid?: string | undefined;
|
271
|
+
};
|
272
|
+
payload: {
|
273
|
+
iat: number;
|
274
|
+
exp: number;
|
275
|
+
credential_hash_alg: string;
|
276
|
+
cnf: {
|
277
|
+
jwk: {
|
278
|
+
kty: "RSA" | "EC";
|
279
|
+
alg?: string | undefined;
|
280
|
+
crv?: string | undefined;
|
281
|
+
d?: string | undefined;
|
282
|
+
dp?: string | undefined;
|
283
|
+
dq?: string | undefined;
|
284
|
+
e?: string | undefined;
|
285
|
+
ext?: boolean | undefined;
|
286
|
+
k?: string | undefined;
|
287
|
+
key_ops?: string[] | undefined;
|
288
|
+
kid?: string | undefined;
|
289
|
+
n?: string | undefined;
|
290
|
+
p?: string | undefined;
|
291
|
+
q?: string | undefined;
|
292
|
+
qi?: string | undefined;
|
293
|
+
use?: string | undefined;
|
294
|
+
x?: string | undefined;
|
295
|
+
y?: string | undefined;
|
296
|
+
x5c?: string[] | undefined;
|
297
|
+
x5t?: string | undefined;
|
298
|
+
"x5t#S256"?: string | undefined;
|
299
|
+
x5u?: string | undefined;
|
300
|
+
};
|
301
|
+
};
|
302
|
+
credential_hash: string;
|
303
|
+
};
|
304
|
+
}>;
|
305
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/status/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAelC,CAAC"}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
2
|
+
export type GetCredentialTrustmarkJwt = (params: {
|
3
|
+
/**
|
4
|
+
* The Wallet Instance's attestation
|
5
|
+
*/
|
6
|
+
walletInstanceAttestation: string;
|
7
|
+
/**
|
8
|
+
* The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
|
9
|
+
*/
|
10
|
+
wiaCryptoContext: CryptoContext;
|
11
|
+
/**
|
12
|
+
* The type of credential for which the trustmark is generated
|
13
|
+
*/
|
14
|
+
credentialType: string;
|
15
|
+
/**
|
16
|
+
* (Optional) Document number contained in the credential, if applicable
|
17
|
+
*/
|
18
|
+
docNumber?: string;
|
19
|
+
/**
|
20
|
+
* (Optional) Expiration time for the trustmark, default is 2 minutes.
|
21
|
+
* If a number is provided, it is interpreted as a timestamp in seconds.
|
22
|
+
* If a string is provided, it is interpreted as a time span and added to the current timestamp.
|
23
|
+
*/
|
24
|
+
expirationTime?: number | string;
|
25
|
+
}) => Promise<{
|
26
|
+
/**
|
27
|
+
* The signed JWT
|
28
|
+
*/
|
29
|
+
jwt: string;
|
30
|
+
/**
|
31
|
+
* The expiration time of the JWT in seconds
|
32
|
+
*/
|
33
|
+
expirationTime: number;
|
34
|
+
}>;
|
35
|
+
/**
|
36
|
+
* Generates a trustmark signed JWT, which is used to verify the authenticity of a credential.
|
37
|
+
* The public key used to sign the trustmark must the same used for the Wallet Instance Attestation.
|
38
|
+
*
|
39
|
+
* @param walletInstanceAttestation the Wallet Instance's attestation
|
40
|
+
* @param wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
|
41
|
+
* @param credentialType The type of credential for which the trustmark is generated
|
42
|
+
* @param docNumber (Optional) Document number contained in the credential, if applicable
|
43
|
+
* @param expirationTime (Optional) Expiration time for the trustmark, default is 2 minutes.
|
44
|
+
* If a number is provided, it is interpreted as a timestamp in seconds.
|
45
|
+
* If a string is provided, it is interpreted as a time span and added to the current timestamp.
|
46
|
+
* @throws {IoWalletError} If the WIA is expired
|
47
|
+
* @throws {IoWalletError} If the public key associated to the WIA is not the same for the CryptoContext
|
48
|
+
* @throws {JWSSignatureVerificationFailed} If the WIA signature is not valid
|
49
|
+
* @returns A promise containing the signed JWT and its expiration time in seconds
|
50
|
+
*/
|
51
|
+
export declare const getCredentialTrustmark: GetCredentialTrustmarkJwt;
|
52
|
+
//# sourceMappingURL=get-credential-trustmark.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-credential-trustmark.d.ts","sourceRoot":"","sources":["../../../../src/credential/trustmark/get-credential-trustmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAMrC,MAAM,MAAM,yBAAyB,GAAG,CAAC,MAAM,EAAE;IAC/C;;OAEG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC;;OAEG;IACH,gBAAgB,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,KAAK,OAAO,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,EAAE,yBA6EpC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/trustmark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
@@ -6,10 +6,12 @@ import * as PID from "./pid";
|
|
6
6
|
import * as SdJwt from "./sd-jwt";
|
7
7
|
import * as Errors from "./utils/errors";
|
8
8
|
import * as WalletInstanceAttestation from "./wallet-instance-attestation";
|
9
|
+
import * as Trust from "./trust";
|
9
10
|
import * as WalletInstance from "./wallet-instance";
|
11
|
+
import * as Logging from "./utils/logging";
|
10
12
|
import { AuthorizationDetail, AuthorizationDetails } from "./utils/par";
|
11
13
|
import { createCryptoContextFor } from "./utils/crypto";
|
12
14
|
import type { IntegrityContext } from "./utils/integrity";
|
13
|
-
export { SdJwt, PID, Credential, WalletInstanceAttestation, WalletInstance, Errors, createCryptoContextFor, AuthorizationDetail, AuthorizationDetails, fixBase64EncodingOnKey, };
|
15
|
+
export { SdJwt, PID, Credential, WalletInstanceAttestation, WalletInstance, Errors, Trust, createCryptoContextFor, AuthorizationDetail, AuthorizationDetails, fixBase64EncodingOnKey, Logging, };
|
14
16
|
export type { IntegrityContext, AuthorizationContext };
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,yBAAyB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,KAAK,EACL,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,cAAc,EACd,MAAM,EACN,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,yBAAyB,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,KAAK,EACL,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,cAAc,EACd,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,OAAO,GACR,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,CAAC"}
|
@@ -11,27 +11,89 @@ export declare const PID: z.ZodObject<{
|
|
11
11
|
issuedAt: z.ZodDate;
|
12
12
|
expiration: z.ZodDate;
|
13
13
|
verification: z.ZodOptional<z.ZodObject<{
|
14
|
-
|
15
|
-
|
16
|
-
evidence: z.ZodObject<{
|
17
|
-
|
14
|
+
trustFramework: z.ZodLiteral<"eidas">;
|
15
|
+
assuranceLevel: z.ZodString;
|
16
|
+
evidence: z.ZodArray<z.ZodObject<{
|
17
|
+
type: z.ZodString;
|
18
|
+
record: z.ZodObject<{
|
19
|
+
type: z.ZodString;
|
20
|
+
source: z.ZodObject<{
|
21
|
+
organization_name: z.ZodString;
|
22
|
+
organization_id: z.ZodString;
|
23
|
+
country_code: z.ZodString;
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
25
|
+
organization_name: string;
|
26
|
+
organization_id: string;
|
27
|
+
country_code: string;
|
28
|
+
}, {
|
29
|
+
organization_name: string;
|
30
|
+
organization_id: string;
|
31
|
+
country_code: string;
|
32
|
+
}>;
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
34
|
+
type: string;
|
35
|
+
source: {
|
36
|
+
organization_name: string;
|
37
|
+
organization_id: string;
|
38
|
+
country_code: string;
|
39
|
+
};
|
40
|
+
}, {
|
41
|
+
type: string;
|
42
|
+
source: {
|
43
|
+
organization_name: string;
|
44
|
+
organization_id: string;
|
45
|
+
country_code: string;
|
46
|
+
};
|
47
|
+
}>;
|
18
48
|
}, "strip", z.ZodTypeAny, {
|
19
|
-
|
49
|
+
type: string;
|
50
|
+
record: {
|
51
|
+
type: string;
|
52
|
+
source: {
|
53
|
+
organization_name: string;
|
54
|
+
organization_id: string;
|
55
|
+
country_code: string;
|
56
|
+
};
|
57
|
+
};
|
20
58
|
}, {
|
21
|
-
|
22
|
-
|
59
|
+
type: string;
|
60
|
+
record: {
|
61
|
+
type: string;
|
62
|
+
source: {
|
63
|
+
organization_name: string;
|
64
|
+
organization_id: string;
|
65
|
+
country_code: string;
|
66
|
+
};
|
67
|
+
};
|
68
|
+
}>, "many">;
|
23
69
|
}, "strip", z.ZodTypeAny, {
|
24
|
-
|
25
|
-
|
70
|
+
trustFramework: "eidas";
|
71
|
+
assuranceLevel: string;
|
26
72
|
evidence: {
|
27
|
-
|
28
|
-
|
73
|
+
type: string;
|
74
|
+
record: {
|
75
|
+
type: string;
|
76
|
+
source: {
|
77
|
+
organization_name: string;
|
78
|
+
organization_id: string;
|
79
|
+
country_code: string;
|
80
|
+
};
|
81
|
+
};
|
82
|
+
}[];
|
29
83
|
}, {
|
30
|
-
|
31
|
-
|
84
|
+
trustFramework: "eidas";
|
85
|
+
assuranceLevel: string;
|
32
86
|
evidence: {
|
33
|
-
|
34
|
-
|
87
|
+
type: string;
|
88
|
+
record: {
|
89
|
+
type: string;
|
90
|
+
source: {
|
91
|
+
organization_name: string;
|
92
|
+
organization_id: string;
|
93
|
+
country_code: string;
|
94
|
+
};
|
95
|
+
};
|
96
|
+
}[];
|
35
97
|
}>>;
|
36
98
|
claims: z.ZodObject<{
|
37
99
|
uniqueId: z.ZodString;
|
@@ -82,15 +144,23 @@ export declare const PID: z.ZodObject<{
|
|
82
144
|
locality: string;
|
83
145
|
} | undefined;
|
84
146
|
};
|
147
|
+
issuer: string;
|
85
148
|
expiration: Date;
|
86
149
|
issuedAt: Date;
|
87
|
-
issuer: string;
|
88
150
|
verification?: {
|
89
|
-
|
90
|
-
|
151
|
+
trustFramework: "eidas";
|
152
|
+
assuranceLevel: string;
|
91
153
|
evidence: {
|
92
|
-
|
93
|
-
|
154
|
+
type: string;
|
155
|
+
record: {
|
156
|
+
type: string;
|
157
|
+
source: {
|
158
|
+
organization_name: string;
|
159
|
+
organization_id: string;
|
160
|
+
country_code: string;
|
161
|
+
};
|
162
|
+
};
|
163
|
+
}[];
|
94
164
|
} | undefined;
|
95
165
|
}, {
|
96
166
|
claims: {
|
@@ -104,15 +174,23 @@ export declare const PID: z.ZodObject<{
|
|
104
174
|
locality: string;
|
105
175
|
} | undefined;
|
106
176
|
};
|
177
|
+
issuer: string;
|
107
178
|
expiration: Date;
|
108
179
|
issuedAt: Date;
|
109
|
-
issuer: string;
|
110
180
|
verification?: {
|
111
|
-
|
112
|
-
|
181
|
+
trustFramework: "eidas";
|
182
|
+
assuranceLevel: string;
|
113
183
|
evidence: {
|
114
|
-
|
115
|
-
|
184
|
+
type: string;
|
185
|
+
record: {
|
186
|
+
type: string;
|
187
|
+
source: {
|
188
|
+
organization_name: string;
|
189
|
+
organization_id: string;
|
190
|
+
country_code: string;
|
191
|
+
};
|
192
|
+
};
|
193
|
+
}[];
|
116
194
|
} | undefined;
|
117
195
|
}>;
|
118
196
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pid/sd-jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pid/sd-jwt/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB;;;;;GAKG;AACH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;AACtC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBd,CAAC"}
|