@pagopa/io-react-native-wallet 1.7.1 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -1
- package/lib/commonjs/client/generated/wallet-provider.js +49 -20
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/credential/index.js +5 -1
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +27 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +17 -12
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +36 -29
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +27 -207
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +23 -20
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/const.js.map +1 -1
- package/lib/commonjs/credential/issuance/index.js +3 -3
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +14 -15
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +6 -4
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +34 -7
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +4 -126
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +80 -25
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +97 -117
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +86 -191
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +112 -176
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/README.md +74 -79
- package/lib/commonjs/credential/presentation/errors.js +42 -21
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +13 -13
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +53 -29
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/credential/status/01-start-flow.js +2 -0
- package/lib/commonjs/credential/status/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/status/02-status-attestation.js +73 -0
- package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +55 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +67 -0
- package/lib/commonjs/credential/status/index.js +27 -0
- package/lib/commonjs/credential/status/index.js.map +1 -0
- package/lib/commonjs/credential/status/types.js +48 -0
- package/lib/commonjs/credential/status/types.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +62 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +86 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +13 -0
- package/lib/commonjs/credential/trustmark/index.js.map +1 -0
- package/lib/commonjs/index.js +5 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/sd-jwt/types.js +18 -2
- package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +22 -34
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +11 -23
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +1 -7
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +5 -21
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/{entity/trust → trust}/chain.js +49 -55
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/errors.js +110 -0
- package/lib/commonjs/trust/errors.js.map +1 -0
- package/lib/commonjs/trust/index.js +282 -0
- package/lib/commonjs/trust/index.js.map +1 -0
- package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
- package/lib/commonjs/trust/types.js.map +1 -0
- package/lib/commonjs/trust/utils.js +41 -0
- package/lib/commonjs/trust/utils.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +5 -112
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -0
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +22 -2
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +72 -4
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/logging.js +68 -0
- package/lib/commonjs/utils/logging.js.map +1 -0
- package/lib/commonjs/utils/misc.js +2 -0
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +17 -10
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/string.js +1 -12
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/wallet-instance/index.js +14 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +40 -15
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/credential/index.js +3 -1
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +17 -11
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +23 -20
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/const.js.map +1 -1
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +14 -15
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +34 -7
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/README.md +74 -79
- package/lib/module/credential/presentation/errors.js +30 -17
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +6 -6
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +49 -27
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/credential/status/01-start-flow.js +2 -0
- package/lib/module/credential/status/01-start-flow.js.map +1 -0
- package/lib/module/credential/status/02-status-attestation.js +66 -0
- package/lib/module/credential/status/02-status-attestation.js.map +1 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/module/credential/status/README.md +67 -0
- package/lib/module/credential/status/index.js +5 -0
- package/lib/module/credential/status/index.js.map +1 -0
- package/lib/module/credential/status/types.js +40 -0
- package/lib/module/credential/status/types.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +62 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +3 -0
- package/lib/module/credential/trustmark/index.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/sd-jwt/types.js +16 -1
- package/lib/module/pid/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +22 -34
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +11 -23
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +1 -7
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +4 -19
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/trust/chain.js +108 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/errors.js +94 -0
- package/lib/module/trust/errors.js.map +1 -0
- package/lib/module/trust/index.js +263 -0
- package/lib/module/trust/index.js.map +1 -0
- package/lib/module/{entity/trust → trust}/types.js +25 -46
- package/lib/module/trust/types.js.map +1 -0
- package/lib/module/trust/utils.js +33 -0
- package/lib/module/trust/utils.js.map +1 -0
- package/lib/module/utils/crypto.js +4 -107
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -0
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/error-codes.js +20 -1
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +61 -4
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/logging.js +62 -0
- package/lib/module/utils/logging.js.map +1 -0
- package/lib/module/utils/misc.js +2 -0
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +17 -9
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/string.js +0 -10
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/wallet-instance/index.js +13 -0
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/README.md +8 -3
- package/lib/module/wallet-instance-attestation/index.js +2 -2
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +16 -9
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +14 -18
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/credential/index.d.ts +3 -1
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +8 -3
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/errors.d.ts +25 -10
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +7 -8
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +137 -307
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +7 -0
- package/lib/typescript/credential/status/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/types.d.ts +305 -0
- package/lib/typescript/credential/status/types.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +4 -0
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +30 -82
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +29 -134
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/{entity/trust → trust}/chain.d.ts +5 -10
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/errors.d.ts +80 -0
- package/lib/typescript/trust/errors.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/index.d.ts +211 -186
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/types.d.ts +1533 -1120
- package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +12 -0
- package/lib/typescript/trust/utils.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts +0 -32
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +20 -0
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +55 -10
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +35 -0
- package/lib/typescript/utils/logging.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +8 -1
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts +0 -7
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/index.d.ts +8 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +78 -120
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +8 -9
- package/src/client/generated/wallet-provider.ts +52 -17
- package/src/credential/index.ts +4 -1
- package/src/credential/issuance/01-start-flow.ts +1 -1
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
- package/src/credential/issuance/03-start-user-authorization.ts +48 -22
- package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
- package/src/credential/issuance/05-authorize-access.ts +29 -11
- package/src/credential/issuance/06-obtain-credential.ts +61 -36
- package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
- package/src/credential/issuance/README.md +23 -20
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/index.ts +6 -3
- package/src/credential/presentation/01-start-flow.ts +19 -22
- package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
- package/src/credential/presentation/03-get-request-object.ts +36 -8
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
- package/src/credential/presentation/05-verify-request-object.ts +115 -30
- package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
- package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
- package/src/credential/presentation/08-send-authorization-response.ts +178 -260
- package/src/credential/presentation/README.md +74 -79
- package/src/credential/presentation/errors.ts +38 -15
- package/src/credential/presentation/index.ts +18 -19
- package/src/credential/presentation/types.ts +67 -64
- package/src/credential/status/01-start-flow.ts +9 -0
- package/src/credential/status/02-status-attestation.ts +105 -0
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
- package/src/credential/status/README.md +67 -0
- package/src/credential/status/index.ts +22 -0
- package/src/credential/status/types.ts +43 -0
- package/src/credential/trustmark/README.md +62 -0
- package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
- package/src/credential/trustmark/index.ts +8 -0
- package/src/index.ts +4 -0
- package/src/pid/sd-jwt/types.ts +18 -1
- package/src/sd-jwt/__test__/index.test.ts +36 -55
- package/src/sd-jwt/__test__/types.test.ts +16 -29
- package/src/sd-jwt/index.ts +1 -5
- package/src/sd-jwt/types.ts +2 -19
- package/src/trust/chain.ts +151 -0
- package/src/trust/errors.ts +105 -0
- package/src/{entity/trust → trust}/index.ts +198 -23
- package/src/{entity/trust → trust}/types.ts +24 -37
- package/src/trust/utils.ts +35 -0
- package/src/utils/crypto.ts +4 -106
- package/src/utils/decoder.ts +6 -1
- package/src/utils/error-codes.ts +23 -0
- package/src/utils/errors.ts +119 -15
- package/src/utils/logging.ts +68 -0
- package/src/utils/misc.ts +5 -0
- package/src/utils/par.ts +19 -6
- package/src/utils/string.ts +0 -10
- package/src/wallet-instance/index.ts +30 -1
- package/src/wallet-instance-attestation/README.md +8 -3
- package/src/wallet-instance-attestation/index.ts +2 -2
- package/src/wallet-instance-attestation/issuing.ts +33 -12
- package/src/wallet-instance-attestation/types.ts +18 -22
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
- package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
- package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/commonjs/entity/trust/chain.js.map +0 -1
- package/lib/commonjs/entity/trust/index.js +0 -148
- package/lib/commonjs/entity/trust/index.js.map +0 -1
- package/lib/commonjs/entity/trust/types.js.map +0 -1
- package/lib/commonjs/mdoc/converters.js +0 -26
- package/lib/commonjs/mdoc/converters.js.map +0 -1
- package/lib/commonjs/mdoc/index.js +0 -68
- package/lib/commonjs/mdoc/index.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
- package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/index.js +0 -20
- package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/types.js +0 -48
- package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/module/entity/trust/chain.js +0 -113
- package/lib/module/entity/trust/chain.js.map +0 -1
- package/lib/module/entity/trust/index.js +0 -131
- package/lib/module/entity/trust/index.js.map +0 -1
- package/lib/module/entity/trust/types.js.map +0 -1
- package/lib/module/mdoc/converters.js +0 -20
- package/lib/module/mdoc/converters.js.map +0 -1
- package/lib/module/mdoc/index.js +0 -60
- package/lib/module/mdoc/index.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
- package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
- package/lib/typescript/entity/trust/index.d.ts.map +0 -1
- package/lib/typescript/mdoc/converters.d.ts +0 -8
- package/lib/typescript/mdoc/converters.d.ts.map +0 -1
- package/lib/typescript/mdoc/index.d.ts +0 -10
- package/lib/typescript/mdoc/index.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
- package/src/credential/issuance/02-get-issuer-config.ts +0 -67
- package/src/entity/openid-connect/issuer/index.ts +0 -27
- package/src/entity/openid-connect/issuer/types.ts +0 -76
- package/src/entity/trust/chain.ts +0 -154
- package/src/mdoc/converters.ts +0 -26
- package/src/mdoc/index.ts +0 -95
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -1,7 +1,11 @@
|
|
1
1
|
# Wallet Instance Attestation
|
2
2
|
|
3
|
-
This flow consists of a single step and is used to obtain a Wallet Instance Attestation. The
|
4
|
-
|
3
|
+
This flow consists of a single step and is used to obtain a Wallet Instance Attestation. The attestation is issued in multiple formats:
|
4
|
+
- `jwt`
|
5
|
+
- `dc+sd-jwt`
|
6
|
+
- `mso_mdoc`
|
7
|
+
|
8
|
+
The wallet provider must implement its endpoints based on the OpenAPI specification provided in the [wallet-instance.yaml](../../openapi/wallet-provider.yaml) file. In order to require a status attestation the consumer application must provide:
|
5
9
|
|
6
10
|
- `wiaCryptoContext` object that is used to sign the attestation request. The key must be generated before creating the crypto context;
|
7
11
|
- `integrityContext` object that is used to verify the integrity of the device where the app is running. The key tag must be the same used when creating the Wallet Instance;
|
@@ -29,10 +33,11 @@ const issuedAttestation = await WalletInstanceAttestation.getAttestation({
|
|
29
33
|
walletProviderBaseUrl: WALLET_PROVIDER_BASE_URL,
|
30
34
|
appFetch,
|
31
35
|
});
|
36
|
+
// [{ "format": "jwt", "wallet_attestation": "ey..." }, { "format": "dc+sd-jwt", "wallet_attestation": "ey..." }]
|
32
37
|
return issuedAttestation;
|
33
38
|
```
|
34
39
|
|
35
|
-
The returned `issuedAttestation` is supposed to be stored and used for any future operation that requires a Wallet Instance Attestation. The wallet attestation has a limited validity and must be regenerated when it expires.
|
40
|
+
The returned `issuedAttestation` is supposed to be stored and used for any future operation that requires a Wallet Instance Attestation in one of the available formats. The wallet attestation has a limited validity and must be regenerated when it expires.
|
36
41
|
|
37
42
|
## Mapped results
|
38
43
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { WalletInstanceAttestationJwt } from "./types";
|
2
2
|
import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
|
3
3
|
import { verify as verifyJwt } from "@pagopa/io-react-native-jwt";
|
4
|
-
|
5
|
-
|
4
|
+
export { getAttestation } from "./issuing";
|
5
|
+
|
6
6
|
/**
|
7
7
|
* Decode a given JWT to get the parsed Wallet Instance Attestation object they define.
|
8
8
|
* It ensures provided data is in a valid shape.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["WalletInstanceAttestationJwt","decode","decodeJwt","verify","verifyJwt","getAttestation","token","decodedJwt","parse","header","protectedHeader","payload","decoded","pubKey","cnf","jwk"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/index.ts"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,SAAS;AACtD,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AACjE,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AAEjE,SAASC,cAAc,QAAQ,WAAW;
|
1
|
+
{"version":3,"names":["WalletInstanceAttestationJwt","decode","decodeJwt","verify","verifyJwt","getAttestation","token","decodedJwt","parse","header","protectedHeader","payload","decoded","pubKey","cnf","jwk"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/index.ts"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,SAAS;AACtD,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AACjE,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AAEjE,SAASC,cAAc,QAAQ,WAAW;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASJ,MAAMA,CAACK,KAAa,EAAgC;EAClE;EACA,MAAMC,UAAU,GAAGL,SAAS,CAACI,KAAK,CAAC;EACnC;EACA,OAAON,4BAA4B,CAACQ,KAAK,CAAC;IACxCC,MAAM,EAAEF,UAAU,CAACG,eAAe;IAClCC,OAAO,EAAEJ,UAAU,CAACI;EACtB,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeR,MAAMA,CAC1BG,KAAa,EAC0B;EACvC,MAAMM,OAAO,GAAGX,MAAM,CAACK,KAAK,CAAC;EAC7B,MAAMO,MAAM,GAAGD,OAAO,CAACD,OAAO,CAACG,GAAG,CAACC,GAAG;EAEtC,MAAMX,SAAS,CAACE,KAAK,EAAEO,MAAM,CAAC;EAE9B,OAAOD,OAAO;AAChB"}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { SignJWT, thumbprint } from "@pagopa/io-react-native-jwt";
|
2
2
|
import { fixBase64EncodingOnKey, JWK } from "../utils/jwk";
|
3
3
|
import { getWalletProviderClient } from "../client";
|
4
|
+
import { LogLevel, Logger } from "../utils/logging";
|
4
5
|
import { ResponseErrorBuilder, WalletProviderResponseError, WalletProviderResponseErrorCodes } from "../utils/errors";
|
5
|
-
import {
|
6
|
+
import { WalletAttestationResponse } from "./types";
|
6
7
|
|
7
8
|
/**
|
8
9
|
* Getter for an attestation request. The attestation request is a JWT that will be sent to the Wallet Provider to request a Wallet Instance Attestation.
|
@@ -32,8 +33,8 @@ export async function getAttestationRequest(challenge, wiaCryptoContext, integri
|
|
32
33
|
} = await integrityContext.getHardwareSignatureWithAuthData(JSON.stringify(clientData));
|
33
34
|
return new SignJWT(wiaCryptoContext).setPayload({
|
34
35
|
iss: keyThumbprint,
|
35
|
-
|
36
|
-
challenge,
|
36
|
+
aud: walletProviderBaseUrl,
|
37
|
+
nonce: challenge,
|
37
38
|
hardware_signature: signature,
|
38
39
|
integrity_assertion: authenticatorData,
|
39
40
|
hardware_key_tag: hardwareKeyTag,
|
@@ -42,12 +43,13 @@ export async function getAttestationRequest(challenge, wiaCryptoContext, integri
|
|
42
43
|
}
|
43
44
|
}).setProtectedHeader({
|
44
45
|
kid: publicKey.kid,
|
45
|
-
typ: "war+jwt"
|
46
|
+
typ: "wp-war+jwt"
|
46
47
|
}).setIssuedAt().setExpirationTime("1h").sign();
|
47
48
|
}
|
48
49
|
|
49
50
|
/**
|
50
51
|
* Request a Wallet Instance Attestation (WIA) to the Wallet provider
|
52
|
+
* @version 1.0.0
|
51
53
|
*
|
52
54
|
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
53
55
|
* @param params.appFetch (optional) Http client
|
@@ -69,20 +71,25 @@ export const getAttestation = async _ref => {
|
|
69
71
|
|
70
72
|
// 1. Get nonce from backend
|
71
73
|
const challenge = await api.get("/nonce").then(response => response.nonce);
|
74
|
+
Logger.log(LogLevel.DEBUG, `Challenge obtained from ${walletProviderBaseUrl}: ${challenge} `);
|
72
75
|
|
73
76
|
// 2. Get a signed attestation request
|
74
77
|
const signedAttestationRequest = await getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl);
|
78
|
+
Logger.log(LogLevel.DEBUG, `Signed attestation request: ${signedAttestationRequest}`);
|
75
79
|
|
76
|
-
// 3. Request WIA
|
77
|
-
const
|
80
|
+
// 3. Request WIA in multiple formats
|
81
|
+
const response = await api.post("/wallet-attestations", {
|
78
82
|
body: {
|
79
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
80
83
|
assertion: signedAttestationRequest
|
81
84
|
}
|
82
|
-
}).then(
|
83
|
-
|
85
|
+
}).then(WalletAttestationResponse.parse).catch(handleAttestationCreationError);
|
86
|
+
for (const attestation of response.wallet_attestations) {
|
87
|
+
Logger.log(LogLevel.DEBUG, `Obtained wallet attestation in ${attestation.format} format: ${attestation.wallet_attestation}`);
|
88
|
+
}
|
89
|
+
return response.wallet_attestations;
|
84
90
|
};
|
85
91
|
const handleAttestationCreationError = e => {
|
92
|
+
Logger.log(LogLevel.ERROR, `An error occurred while calling /wallet-attestation endpoint: ${e}`);
|
86
93
|
if (!(e instanceof WalletProviderResponseError)) {
|
87
94
|
throw e;
|
88
95
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["SignJWT","thumbprint","fixBase64EncodingOnKey","JWK","getWalletProviderClient","ResponseErrorBuilder","WalletProviderResponseError","WalletProviderResponseErrorCodes","
|
1
|
+
{"version":3,"names":["SignJWT","thumbprint","fixBase64EncodingOnKey","JWK","getWalletProviderClient","LogLevel","Logger","ResponseErrorBuilder","WalletProviderResponseError","WalletProviderResponseErrorCodes","WalletAttestationResponse","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","parse","keyThumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","setPayload","iss","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","cnf","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","api","get","then","response","log","DEBUG","signedAttestationRequest","post","body","assertion","catch","handleAttestationCreationError","attestation","wallet_attestations","format","wallet_attestation","e","ERROR","handle","code","WalletInstanceRevoked","message","WalletInstanceNotFound","WalletInstanceIntegrityFailed","WalletInstanceAttestationIssuingFailed","buildFrom"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":"AAAA,SAEEA,OAAO,EACPC,UAAU,QACL,6BAA6B;AACpC,SAASC,sBAAsB,EAAEC,GAAG,QAAQ,cAAc;AAC1D,SAASC,uBAAuB,QAAQ,WAAW;AAEnD,SAASC,QAAQ,EAAEC,MAAM,QAAQ,kBAAkB;AACnD,SACEC,oBAAoB,EACpBC,2BAA2B,EAC3BC,gCAAgC,QAC3B,iBAAiB;AACxB,SAASC,yBAAyB,QAAQ,SAAS;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,qBAAqBA,CACzCC,SAAiB,EACjBC,gBAA+B,EAC/BC,gBAAkC,EAClCC,qBAA6B,EACZ;EACjB,MAAMC,GAAG,GAAG,MAAMH,gBAAgB,CAACI,YAAY,CAAC,CAAC;EACjD,MAAMC,SAAS,GAAGf,GAAG,CAACgB,KAAK,CAACH,GAAG,CAAC;EAChC,MAAMI,aAAa,GAAG,MAAMnB,UAAU,CAACiB,SAAS,CAAC;EACjD,MAAMG,SAAS,GAAG;IAAE,GAAGH,SAAS;IAAEI,GAAG,EAAEF;EAAc,CAAC;EAEtD,MAAMG,UAAU,GAAG;IACjBX,SAAS;IACTY,cAAc,EAAEJ;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C,CAAC+D,6BAA6B;IACpEF,OAAO,EACL;EACJ,CAAC,CAAC,CACDH,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAE3D,gCAAgC,CAACgE,sCAAsC;IAC7EH,OAAO,EAAE;EACX,CAAC,CAAC,CACDI,SAAS,CAACT,CAAC,CAAC;AACjB,CAAC"}
|
@@ -24,36 +24,32 @@ const Jwt = z.object({
|
|
24
24
|
});
|
25
25
|
export const WalletInstanceAttestationRequestJwt = z.object({
|
26
26
|
header: z.intersection(Jwt.shape.header, z.object({
|
27
|
-
typ: z.literal("war+jwt")
|
27
|
+
typ: z.literal("wp-war+jwt")
|
28
28
|
})),
|
29
29
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
30
30
|
aud: z.string(),
|
31
|
-
|
32
|
-
|
31
|
+
nonce: z.string(),
|
32
|
+
hardware_signature: z.string(),
|
33
|
+
integrity_assertion: z.string(),
|
34
|
+
hardware_key_tag: z.string()
|
33
35
|
}))
|
34
36
|
});
|
35
37
|
export const WalletInstanceAttestationJwt = z.object({
|
36
38
|
header: z.intersection(Jwt.shape.header, z.object({
|
37
|
-
typ: z.literal("
|
39
|
+
typ: z.literal("oauth-client-attestation+jwt"),
|
40
|
+
trust_chain: z.array(z.string())
|
38
41
|
})),
|
39
42
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
40
43
|
sub: z.string(),
|
41
44
|
aal: z.string(),
|
42
|
-
|
43
|
-
|
44
|
-
vp_formats_supported: z.object({
|
45
|
-
"vc+sd-jwt": z.object({
|
46
|
-
"sd-jwt_alg_values": z.array(z.string())
|
47
|
-
}).optional(),
|
48
|
-
"vp+sd-jwt": z.object({
|
49
|
-
"sd-jwt_alg_values": z.array(z.string())
|
50
|
-
}).optional()
|
51
|
-
}),
|
52
|
-
request_object_signing_alg_values_supported: z.array(z.string()),
|
53
|
-
presentation_definition_uri_supported: z.boolean()
|
45
|
+
wallet_link: z.string().optional(),
|
46
|
+
wallet_name: z.string().optional()
|
54
47
|
}))
|
55
48
|
});
|
56
|
-
export const
|
57
|
-
|
49
|
+
export const WalletAttestationResponse = z.object({
|
50
|
+
wallet_attestations: z.array(z.object({
|
51
|
+
wallet_attestation: z.string(),
|
52
|
+
format: z.enum(["jwt", "dc+sd-jwt", "mso_mdoc"])
|
53
|
+
}))
|
58
54
|
});
|
59
55
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JWK","z","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","WalletInstanceAttestationRequestJwt","shape","literal","aud","
|
1
|
+
{"version":3,"names":["JWK","z","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","WalletInstanceAttestationRequestJwt","shape","literal","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","WalletInstanceAttestationJwt","sub","aal","wallet_link","wallet_name","WalletAttestationResponse","wallet_attestations","wallet_attestation","format","enum"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,MAAMC,QAAQ,GAAGD,CAAC,CAACE,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,aAAa,CAAC;AAGrD,MAAMC,GAAG,GAAGL,CAAC,CAACM,MAAM,CAAC;EACnBC,MAAM,EAAEP,CAAC,CAACM,MAAM,CAAC;IACfE,GAAG,EAAER,CAAC,CAACS,MAAM,CAAC,CAAC;IACfC,GAAG,EAAEV,CAAC,CAACS,MAAM,CAAC,CAAC;IACfE,GAAG,EAAEX,CAAC,CAACS,MAAM,CAAC,CAAC;IACfG,GAAG,EAAEZ,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CA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CAAC;EACnDC,MAAM,EAAEP,CAAC,CAACsB,YAAY,CACpBjB,GAAG,CAACmB,KAAK,CAACjB,MAAM,EAChBP,CAAC,CAACM,MAAM,CAAC;IACPK,GAAG,EAAEX,CAAC,CAACyB,OAAO,CAAC,8BAA8B,CAAC;IAC9CV,WAAW,EAAEf,CAAC,CAACa,KAAK,CAACb,CAAC,CAACS,MAAM,CAAC,CAAC;EACjC,CAAC,CACH,CAAC;EACDO,OAAO,EAAEhB,CAAC,CAACsB,YAAY,CACrBjB,GAAG,CAACmB,KAAK,CAACR,OAAO,EACjBhB,CAAC,CAACM,MAAM,CAAC;IACP0B,GAAG,EAAEhC,CAAC,CAACS,MAAM,CAAC,CAAC;IACfwB,GAAG,EAAEjC,CAAC,CAACS,MAAM,CAAC,CAAC;IACfyB,WAAW,EAAElC,CAAC,CAACS,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC;IAClCqB,WAAW,EAAEnC,CAAC,CAACS,MAAM,CAAC,CAAC,CAACK,QAAQ,CAAC;EACnC,CAAC,CACH;AACF,CAAC,CAAC;AAKF,OAAO,MAAMsB,yBAAyB,GAAGpC,CAAC,CAACM,MAAM,CAAC;EAChD+B,mBAAmB,EAAErC,CAAC,CAACa,KAAK,CAC1Bb,CAAC,CAACM,MAAM,CAAC;IACPgC,kBAAkB,EAAEtC,CAAC,CAACS,MAAM,CAAC,CAAC;IAC9B8B,MAAM,EAAEvC,CAAC,CAACwC,IAAI,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC;EACjD,CAAC,CACH;AACF,CAAC,CAAC"}
|
@@ -15,6 +15,29 @@ export declare const WalletAttestationView: z.ZodObject<{
|
|
15
15
|
}, {
|
16
16
|
wallet_attestation: string;
|
17
17
|
}>;
|
18
|
+
export type WalletAttestationsView = z.infer<typeof WalletAttestationsView>;
|
19
|
+
export declare const WalletAttestationsView: z.ZodObject<{
|
20
|
+
wallet_attestations: z.ZodArray<z.ZodObject<{
|
21
|
+
format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
|
22
|
+
wallet_attestation: z.ZodString;
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
24
|
+
format: "jwt" | "dc+sd-jwt";
|
25
|
+
wallet_attestation: string;
|
26
|
+
}, {
|
27
|
+
format: "jwt" | "dc+sd-jwt";
|
28
|
+
wallet_attestation: string;
|
29
|
+
}>, "many">;
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
31
|
+
wallet_attestations: {
|
32
|
+
format: "jwt" | "dc+sd-jwt";
|
33
|
+
wallet_attestation: string;
|
34
|
+
}[];
|
35
|
+
}, {
|
36
|
+
wallet_attestations: {
|
37
|
+
format: "jwt" | "dc+sd-jwt";
|
38
|
+
wallet_attestation: string;
|
39
|
+
}[];
|
40
|
+
}>;
|
18
41
|
export type CreateWalletInstanceBody = z.infer<typeof CreateWalletInstanceBody>;
|
19
42
|
export declare const CreateWalletInstanceBody: z.ZodObject<{
|
20
43
|
challenge: z.ZodString;
|
@@ -40,25 +63,13 @@ export declare const CreateWalletAttestationBody: z.ZodObject<{
|
|
40
63
|
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
41
64
|
assertion: string;
|
42
65
|
}>;
|
43
|
-
export type
|
44
|
-
export declare const
|
45
|
-
|
46
|
-
title: z.ZodOptional<z.ZodString>;
|
47
|
-
status: z.ZodOptional<z.ZodNumber>;
|
48
|
-
detail: z.ZodOptional<z.ZodString>;
|
49
|
-
instance: z.ZodOptional<z.ZodString>;
|
66
|
+
export type CreateWalletAttestationV2Body = z.infer<typeof CreateWalletAttestationV2Body>;
|
67
|
+
export declare const CreateWalletAttestationV2Body: z.ZodObject<{
|
68
|
+
assertion: z.ZodString;
|
50
69
|
}, "strip", z.ZodTypeAny, {
|
51
|
-
|
52
|
-
title?: string | undefined;
|
53
|
-
status?: number | undefined;
|
54
|
-
detail?: string | undefined;
|
55
|
-
instance?: string | undefined;
|
70
|
+
assertion: string;
|
56
71
|
}, {
|
57
|
-
|
58
|
-
title?: string | undefined;
|
59
|
-
status?: number | undefined;
|
60
|
-
detail?: string | undefined;
|
61
|
-
instance?: string | undefined;
|
72
|
+
assertion: string;
|
62
73
|
}>;
|
63
74
|
export type SetWalletInstanceStatusBody = z.infer<typeof SetWalletInstanceStatusBody>;
|
64
75
|
export declare const SetWalletInstanceStatusBody: z.ZodObject<{
|
@@ -84,6 +95,26 @@ export declare const WalletInstanceData: z.ZodObject<{
|
|
84
95
|
is_revoked: boolean;
|
85
96
|
revocation_reason?: "CERTIFICATE_REVOKED_BY_ISSUER" | "NEW_WALLET_INSTANCE_CREATED" | "REVOKED_BY_USER" | undefined;
|
86
97
|
}>;
|
98
|
+
export type ProblemDetail = z.infer<typeof ProblemDetail>;
|
99
|
+
export declare const ProblemDetail: z.ZodObject<{
|
100
|
+
type: z.ZodOptional<z.ZodString>;
|
101
|
+
title: z.ZodOptional<z.ZodString>;
|
102
|
+
status: z.ZodOptional<z.ZodNumber>;
|
103
|
+
detail: z.ZodOptional<z.ZodString>;
|
104
|
+
instance: z.ZodOptional<z.ZodString>;
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
106
|
+
type?: string | undefined;
|
107
|
+
title?: string | undefined;
|
108
|
+
status?: number | undefined;
|
109
|
+
detail?: string | undefined;
|
110
|
+
instance?: string | undefined;
|
111
|
+
}, {
|
112
|
+
type?: string | undefined;
|
113
|
+
title?: string | undefined;
|
114
|
+
status?: number | undefined;
|
115
|
+
detail?: string | undefined;
|
116
|
+
instance?: string | undefined;
|
117
|
+
}>;
|
87
118
|
export type get_GetNonce = typeof get_GetNonce;
|
88
119
|
export declare const get_GetNonce: {
|
89
120
|
method: z.ZodLiteral<"GET">;
|
@@ -130,6 +161,103 @@ export declare const post_CreateWalletInstance: {
|
|
130
161
|
}>;
|
131
162
|
response: z.ZodUnknown;
|
132
163
|
};
|
164
|
+
export type post_CreateWalletAttestation = typeof post_CreateWalletAttestation;
|
165
|
+
export declare const post_CreateWalletAttestation: {
|
166
|
+
method: z.ZodLiteral<"POST">;
|
167
|
+
path: z.ZodLiteral<"/token">;
|
168
|
+
parameters: z.ZodObject<{
|
169
|
+
body: z.ZodObject<{
|
170
|
+
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:jwt-bearer">;
|
171
|
+
assertion: z.ZodString;
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
173
|
+
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
174
|
+
assertion: string;
|
175
|
+
}, {
|
176
|
+
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
177
|
+
assertion: string;
|
178
|
+
}>;
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
180
|
+
body: {
|
181
|
+
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
182
|
+
assertion: string;
|
183
|
+
};
|
184
|
+
}, {
|
185
|
+
body: {
|
186
|
+
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
187
|
+
assertion: string;
|
188
|
+
};
|
189
|
+
}>;
|
190
|
+
response: z.ZodObject<{
|
191
|
+
wallet_attestation: z.ZodString;
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
193
|
+
wallet_attestation: string;
|
194
|
+
}, {
|
195
|
+
wallet_attestation: string;
|
196
|
+
}>;
|
197
|
+
};
|
198
|
+
export type post_CreateWalletAttestationV2 = typeof post_CreateWalletAttestationV2;
|
199
|
+
export declare const post_CreateWalletAttestationV2: {
|
200
|
+
method: z.ZodLiteral<"POST">;
|
201
|
+
path: z.ZodLiteral<"/wallet-attestations">;
|
202
|
+
parameters: z.ZodObject<{
|
203
|
+
body: z.ZodObject<{
|
204
|
+
assertion: z.ZodString;
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
206
|
+
assertion: string;
|
207
|
+
}, {
|
208
|
+
assertion: string;
|
209
|
+
}>;
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
211
|
+
body: {
|
212
|
+
assertion: string;
|
213
|
+
};
|
214
|
+
}, {
|
215
|
+
body: {
|
216
|
+
assertion: string;
|
217
|
+
};
|
218
|
+
}>;
|
219
|
+
response: z.ZodObject<{
|
220
|
+
wallet_attestations: z.ZodArray<z.ZodObject<{
|
221
|
+
format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
|
222
|
+
wallet_attestation: z.ZodString;
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
224
|
+
format: "jwt" | "dc+sd-jwt";
|
225
|
+
wallet_attestation: string;
|
226
|
+
}, {
|
227
|
+
format: "jwt" | "dc+sd-jwt";
|
228
|
+
wallet_attestation: string;
|
229
|
+
}>, "many">;
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
231
|
+
wallet_attestations: {
|
232
|
+
format: "jwt" | "dc+sd-jwt";
|
233
|
+
wallet_attestation: string;
|
234
|
+
}[];
|
235
|
+
}, {
|
236
|
+
wallet_attestations: {
|
237
|
+
format: "jwt" | "dc+sd-jwt";
|
238
|
+
wallet_attestation: string;
|
239
|
+
}[];
|
240
|
+
}>;
|
241
|
+
};
|
242
|
+
export type get_GetCurrentWalletInstanceStatus = typeof get_GetCurrentWalletInstanceStatus;
|
243
|
+
export declare const get_GetCurrentWalletInstanceStatus: {
|
244
|
+
method: z.ZodLiteral<"GET">;
|
245
|
+
path: z.ZodLiteral<"/wallet-instances/current/status">;
|
246
|
+
parameters: z.ZodNever;
|
247
|
+
response: z.ZodObject<{
|
248
|
+
id: z.ZodString;
|
249
|
+
is_revoked: z.ZodBoolean;
|
250
|
+
revocation_reason: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"CERTIFICATE_REVOKED_BY_ISSUER">, z.ZodLiteral<"NEW_WALLET_INSTANCE_CREATED">, z.ZodLiteral<"REVOKED_BY_USER">]>, z.ZodUndefined]>>;
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
252
|
+
id: string;
|
253
|
+
is_revoked: boolean;
|
254
|
+
revocation_reason?: "CERTIFICATE_REVOKED_BY_ISSUER" | "NEW_WALLET_INSTANCE_CREATED" | "REVOKED_BY_USER" | undefined;
|
255
|
+
}, {
|
256
|
+
id: string;
|
257
|
+
is_revoked: boolean;
|
258
|
+
revocation_reason?: "CERTIFICATE_REVOKED_BY_ISSUER" | "NEW_WALLET_INSTANCE_CREATED" | "REVOKED_BY_USER" | undefined;
|
259
|
+
}>;
|
260
|
+
};
|
133
261
|
export type get_GetWalletInstanceStatus = typeof get_GetWalletInstanceStatus;
|
134
262
|
export declare const get_GetWalletInstanceStatus: {
|
135
263
|
method: z.ZodLiteral<"GET">;
|
@@ -201,40 +329,6 @@ export declare const put_SetWalletInstanceStatus: {
|
|
201
329
|
}>;
|
202
330
|
response: z.ZodUnknown;
|
203
331
|
};
|
204
|
-
export type post_CreateWalletAttestation = typeof post_CreateWalletAttestation;
|
205
|
-
export declare const post_CreateWalletAttestation: {
|
206
|
-
method: z.ZodLiteral<"POST">;
|
207
|
-
path: z.ZodLiteral<"/token">;
|
208
|
-
parameters: z.ZodObject<{
|
209
|
-
body: z.ZodObject<{
|
210
|
-
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:jwt-bearer">;
|
211
|
-
assertion: z.ZodString;
|
212
|
-
}, "strip", z.ZodTypeAny, {
|
213
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
214
|
-
assertion: string;
|
215
|
-
}, {
|
216
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
217
|
-
assertion: string;
|
218
|
-
}>;
|
219
|
-
}, "strip", z.ZodTypeAny, {
|
220
|
-
body: {
|
221
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
222
|
-
assertion: string;
|
223
|
-
};
|
224
|
-
}, {
|
225
|
-
body: {
|
226
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer";
|
227
|
-
assertion: string;
|
228
|
-
};
|
229
|
-
}>;
|
230
|
-
response: z.ZodObject<{
|
231
|
-
wallet_attestation: z.ZodString;
|
232
|
-
}, "strip", z.ZodTypeAny, {
|
233
|
-
wallet_attestation: string;
|
234
|
-
}, {
|
235
|
-
wallet_attestation: string;
|
236
|
-
}>;
|
237
|
-
};
|
238
332
|
export declare const EndpointByMethod: {
|
239
333
|
get: {
|
240
334
|
"/nonce": {
|
@@ -249,6 +343,24 @@ export declare const EndpointByMethod: {
|
|
249
343
|
nonce: string;
|
250
344
|
}>;
|
251
345
|
};
|
346
|
+
"/wallet-instances/current/status": {
|
347
|
+
method: z.ZodLiteral<"GET">;
|
348
|
+
path: z.ZodLiteral<"/wallet-instances/current/status">;
|
349
|
+
parameters: z.ZodNever;
|
350
|
+
response: z.ZodObject<{
|
351
|
+
id: z.ZodString;
|
352
|
+
is_revoked: z.ZodBoolean;
|
353
|
+
revocation_reason: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"CERTIFICATE_REVOKED_BY_ISSUER">, z.ZodLiteral<"NEW_WALLET_INSTANCE_CREATED">, z.ZodLiteral<"REVOKED_BY_USER">]>, z.ZodUndefined]>>;
|
354
|
+
}, "strip", z.ZodTypeAny, {
|
355
|
+
id: string;
|
356
|
+
is_revoked: boolean;
|
357
|
+
revocation_reason?: "CERTIFICATE_REVOKED_BY_ISSUER" | "NEW_WALLET_INSTANCE_CREATED" | "REVOKED_BY_USER" | undefined;
|
358
|
+
}, {
|
359
|
+
id: string;
|
360
|
+
is_revoked: boolean;
|
361
|
+
revocation_reason?: "CERTIFICATE_REVOKED_BY_ISSUER" | "NEW_WALLET_INSTANCE_CREATED" | "REVOKED_BY_USER" | undefined;
|
362
|
+
}>;
|
363
|
+
};
|
252
364
|
"/wallet-instances/{id}/status": {
|
253
365
|
method: z.ZodLiteral<"GET">;
|
254
366
|
path: z.ZodLiteral<"/wallet-instances/{id}/status">;
|
@@ -350,6 +462,49 @@ export declare const EndpointByMethod: {
|
|
350
462
|
wallet_attestation: string;
|
351
463
|
}>;
|
352
464
|
};
|
465
|
+
"/wallet-attestations": {
|
466
|
+
method: z.ZodLiteral<"POST">;
|
467
|
+
path: z.ZodLiteral<"/wallet-attestations">;
|
468
|
+
parameters: z.ZodObject<{
|
469
|
+
body: z.ZodObject<{
|
470
|
+
assertion: z.ZodString;
|
471
|
+
}, "strip", z.ZodTypeAny, {
|
472
|
+
assertion: string;
|
473
|
+
}, {
|
474
|
+
assertion: string;
|
475
|
+
}>;
|
476
|
+
}, "strip", z.ZodTypeAny, {
|
477
|
+
body: {
|
478
|
+
assertion: string;
|
479
|
+
};
|
480
|
+
}, {
|
481
|
+
body: {
|
482
|
+
assertion: string;
|
483
|
+
};
|
484
|
+
}>;
|
485
|
+
response: z.ZodObject<{
|
486
|
+
wallet_attestations: z.ZodArray<z.ZodObject<{
|
487
|
+
format: z.ZodUnion<[z.ZodLiteral<"jwt">, z.ZodLiteral<"dc+sd-jwt">]>;
|
488
|
+
wallet_attestation: z.ZodString;
|
489
|
+
}, "strip", z.ZodTypeAny, {
|
490
|
+
format: "jwt" | "dc+sd-jwt";
|
491
|
+
wallet_attestation: string;
|
492
|
+
}, {
|
493
|
+
format: "jwt" | "dc+sd-jwt";
|
494
|
+
wallet_attestation: string;
|
495
|
+
}>, "many">;
|
496
|
+
}, "strip", z.ZodTypeAny, {
|
497
|
+
wallet_attestations: {
|
498
|
+
format: "jwt" | "dc+sd-jwt";
|
499
|
+
wallet_attestation: string;
|
500
|
+
}[];
|
501
|
+
}, {
|
502
|
+
wallet_attestations: {
|
503
|
+
format: "jwt" | "dc+sd-jwt";
|
504
|
+
wallet_attestation: string;
|
505
|
+
}[];
|
506
|
+
}>;
|
507
|
+
};
|
353
508
|
};
|
354
509
|
put: {
|
355
510
|
"/wallet-instances/{id}/status": {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallet-provider.d.ts","sourceRoot":"","sources":["../../../../src/client/generated/wallet-provider.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC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+
import * as Trustmark from "./trustmark";
|
5
|
+
export { Issuance, Presentation, Status, Trustmark };
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link
|
2
|
+
* WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link evaluateIssuerTrust}.
|
3
3
|
* The beginning of the issuing flow.
|
4
4
|
* To be implemented accordind to the user touchpoint
|
5
5
|
*
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { CredentialIssuerEntityConfiguration } from "../../trust/types";
|
2
|
+
import type { StartFlow } from "./01-start-flow";
|
3
|
+
import type { Out } from "../../utils/misc";
|
4
|
+
export type EvaluateIssuerTrust = (issuerUrl: Out<StartFlow>["issuerUrl"], context?: {
|
5
|
+
appFetch?: GlobalFetch["fetch"];
|
6
|
+
}) => Promise<{
|
7
|
+
issuerConf: CredentialIssuerEntityConfiguration["payload"]["metadata"];
|
8
|
+
}>;
|
9
|
+
/**
|
10
|
+
* WARNING: This function must be called after {@link startFlow}. The next function to be called is {@link startUserAuthorization}.
|
11
|
+
* The Issuer trust evaluation phase.
|
12
|
+
* Fetch the Issuer's configuration and verify trust.
|
13
|
+
*
|
14
|
+
* @param issuerUrl The base url of the Issuer returned by {@link startFlow}
|
15
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
16
|
+
* @returns The Issuer's configuration
|
17
|
+
*/
|
18
|
+
export declare const evaluateIssuerTrust: EvaluateIssuerTrust;
|
19
|
+
//# sourceMappingURL=02-evaluate-issuer-trust.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"02-evaluate-issuer-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/02-evaluate-issuer-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,CAChC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EACtC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,UAAU,EAAE,mCAAmC,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CACxE,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAQjC,CAAC"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { CryptoContext } from "@pagopa/io-react-native-jwt";
|
2
2
|
import { type Out } from "../../utils/misc";
|
3
|
+
import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
|
3
4
|
import type { StartFlow } from "./01-start-flow";
|
4
5
|
import { AuthorizationDetail } from "../../utils/par";
|
5
|
-
|
6
|
-
export type StartUserAuthorization = (issuerConf: Out<GetIssuerConfig>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
|
6
|
+
export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
|
7
7
|
wiaCryptoContext: CryptoContext;
|
8
8
|
walletInstanceAttestation: string;
|
9
9
|
redirectUri: string;
|
@@ -15,7 +15,7 @@ export type StartUserAuthorization = (issuerConf: Out<GetIssuerConfig>["issuerCo
|
|
15
15
|
credentialDefinition: AuthorizationDetail;
|
16
16
|
}>;
|
17
17
|
/**
|
18
|
-
* WARNING: This function must be called after {@link
|
18
|
+
* WARNING: This function must be called after {@link evaluateIssuerTrust} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
|
19
19
|
* Creates and sends a PAR request to the /as/par endpoint of the authorization server.
|
20
20
|
* This starts the authentication flow to obtain an access token.
|
21
21
|
* This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAItE,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,cAAc,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C,CAAC,CAAC;AAsEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBA0CpC,CAAC"}
|