@pagopa/io-react-native-wallet 1.7.0 → 2.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -1
- package/lib/commonjs/client/generated/wallet-provider.js +49 -20
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
- package/lib/commonjs/credential/index.js +5 -1
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +27 -0
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +17 -12
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +36 -29
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +27 -207
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +23 -20
- package/lib/commonjs/credential/issuance/const.js +1 -1
- package/lib/commonjs/credential/issuance/const.js.map +1 -1
- package/lib/commonjs/credential/issuance/index.js +3 -3
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +14 -15
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +6 -4
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +34 -7
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +4 -126
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +80 -25
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +97 -117
- package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +86 -191
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +112 -176
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/README.md +74 -79
- package/lib/commonjs/credential/presentation/errors.js +42 -21
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +13 -13
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +53 -29
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/credential/status/01-start-flow.js +2 -0
- package/lib/commonjs/credential/status/01-start-flow.js.map +1 -0
- package/lib/commonjs/credential/status/02-status-attestation.js +73 -0
- package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +55 -0
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/commonjs/credential/status/README.md +67 -0
- package/lib/commonjs/credential/status/index.js +27 -0
- package/lib/commonjs/credential/status/index.js.map +1 -0
- package/lib/commonjs/credential/status/types.js +48 -0
- package/lib/commonjs/credential/status/types.js.map +1 -0
- package/lib/commonjs/credential/trustmark/README.md +62 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +86 -0
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/commonjs/credential/trustmark/index.js +13 -0
- package/lib/commonjs/credential/trustmark/index.js.map +1 -0
- package/lib/commonjs/index.js +5 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/sd-jwt/types.js +18 -2
- package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +22 -34
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +11 -23
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/index.js +1 -7
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +5 -21
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/{entity/trust → trust}/chain.js +49 -55
- package/lib/commonjs/trust/chain.js.map +1 -0
- package/lib/commonjs/trust/errors.js +110 -0
- package/lib/commonjs/trust/errors.js.map +1 -0
- package/lib/commonjs/trust/index.js +282 -0
- package/lib/commonjs/trust/index.js.map +1 -0
- package/lib/commonjs/{entity/trust → trust}/types.js +27 -47
- package/lib/commonjs/trust/types.js.map +1 -0
- package/lib/commonjs/trust/utils.js +41 -0
- package/lib/commonjs/trust/utils.js.map +1 -0
- package/lib/commonjs/utils/crypto.js +5 -112
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +2 -0
- package/lib/commonjs/utils/decoder.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +22 -2
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +72 -4
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/logging.js +68 -0
- package/lib/commonjs/utils/logging.js.map +1 -0
- package/lib/commonjs/utils/misc.js +2 -0
- package/lib/commonjs/utils/misc.js.map +1 -1
- package/lib/commonjs/utils/par.js +17 -10
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/commonjs/utils/string.js +1 -12
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/wallet-instance/index.js +14 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/README.md +8 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js +15 -8
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +16 -20
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +40 -15
- package/lib/module/client/generated/wallet-provider.js.map +1 -1
- package/lib/module/credential/index.js +3 -1
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +20 -0
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +25 -16
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +30 -18
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +17 -11
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +36 -28
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +27 -205
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +23 -20
- package/lib/module/credential/issuance/const.js +1 -1
- package/lib/module/credential/issuance/const.js.map +1 -1
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +14 -15
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +5 -3
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +34 -7
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +2 -124
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -1
- package/lib/module/credential/presentation/05-verify-request-object.js +78 -23
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +6 -30
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js +97 -118
- package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -1
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +83 -186
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -1
- package/lib/module/credential/presentation/08-send-authorization-response.js +107 -170
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/README.md +74 -79
- package/lib/module/credential/presentation/errors.js +30 -17
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +6 -6
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +49 -27
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/credential/status/01-start-flow.js +2 -0
- package/lib/module/credential/status/01-start-flow.js.map +1 -0
- package/lib/module/credential/status/02-status-attestation.js +66 -0
- package/lib/module/credential/status/02-status-attestation.js.map +1 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +49 -0
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +1 -0
- package/lib/module/credential/status/README.md +67 -0
- package/lib/module/credential/status/index.js +5 -0
- package/lib/module/credential/status/index.js.map +1 -0
- package/lib/module/credential/status/types.js +40 -0
- package/lib/module/credential/status/types.js.map +1 -0
- package/lib/module/credential/trustmark/README.md +62 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js +77 -0
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +1 -0
- package/lib/module/credential/trustmark/index.js +3 -0
- package/lib/module/credential/trustmark/index.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/sd-jwt/types.js +16 -1
- package/lib/module/pid/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +22 -34
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +11 -23
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/index.js +1 -7
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +4 -19
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/trust/chain.js +108 -0
- package/lib/module/trust/chain.js.map +1 -0
- package/lib/module/trust/errors.js +94 -0
- package/lib/module/trust/errors.js.map +1 -0
- package/lib/module/trust/index.js +263 -0
- package/lib/module/trust/index.js.map +1 -0
- package/lib/module/{entity/trust → trust}/types.js +25 -46
- package/lib/module/trust/types.js.map +1 -0
- package/lib/module/trust/utils.js +33 -0
- package/lib/module/trust/utils.js.map +1 -0
- package/lib/module/utils/crypto.js +4 -107
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/module/utils/decoder.js +3 -0
- package/lib/module/utils/decoder.js.map +1 -1
- package/lib/module/utils/error-codes.js +20 -1
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +61 -4
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/logging.js +62 -0
- package/lib/module/utils/logging.js.map +1 -0
- package/lib/module/utils/misc.js +2 -0
- package/lib/module/utils/misc.js.map +1 -1
- package/lib/module/utils/par.js +17 -9
- package/lib/module/utils/par.js.map +1 -1
- package/lib/module/utils/string.js +0 -10
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/wallet-instance/index.js +13 -0
- package/lib/module/wallet-instance/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/README.md +8 -3
- package/lib/module/wallet-instance-attestation/index.js +2 -2
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +16 -9
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +14 -18
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +206 -51
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
- package/lib/typescript/credential/index.d.ts +3 -1
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +19 -0
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +9 -9
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +4 -4
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -15
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/const.d.ts +1 -1
- package/lib/typescript/credential/issuance/const.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +8 -3
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts +28 -9
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +2 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +4 -30
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +17 -4
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +4 -9
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +13 -12
- package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +40 -42
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +30 -43
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/errors.d.ts +25 -10
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +7 -8
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +137 -307
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +10 -0
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +1 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts +19 -0
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +24 -0
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +1 -0
- package/lib/typescript/credential/status/index.d.ts +7 -0
- package/lib/typescript/credential/status/index.d.ts.map +1 -0
- package/lib/typescript/credential/status/types.d.ts +305 -0
- package/lib/typescript/credential/status/types.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +52 -0
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +1 -0
- package/lib/typescript/credential/trustmark/index.d.ts +4 -0
- package/lib/typescript/credential/trustmark/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +103 -25
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +30 -82
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +29 -134
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/{entity/trust → trust}/chain.d.ts +5 -10
- package/lib/typescript/trust/chain.d.ts.map +1 -0
- package/lib/typescript/trust/errors.d.ts +80 -0
- package/lib/typescript/trust/errors.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/index.d.ts +211 -186
- package/lib/typescript/trust/index.d.ts.map +1 -0
- package/lib/typescript/{entity/trust → trust}/types.d.ts +1533 -1120
- package/lib/typescript/{entity/trust → trust}/types.d.ts.map +1 -1
- package/lib/typescript/trust/utils.d.ts +12 -0
- package/lib/typescript/trust/utils.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts +0 -32
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +20 -0
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +55 -10
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/logging.d.ts +35 -0
- package/lib/typescript/utils/logging.d.ts.map +1 -0
- package/lib/typescript/utils/misc.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +8 -1
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/utils/string.d.ts +0 -7
- package/lib/typescript/utils/string.d.ts.map +1 -1
- package/lib/typescript/wallet-instance/index.d.ts +8 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -2
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +4 -2
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +78 -120
- package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
- package/package.json +8 -9
- package/src/client/generated/wallet-provider.ts +52 -17
- package/src/credential/index.ts +4 -1
- package/src/credential/issuance/01-start-flow.ts +1 -1
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +32 -0
- package/src/credential/issuance/03-start-user-authorization.ts +48 -22
- package/src/credential/issuance/04-complete-user-authorization.ts +74 -18
- package/src/credential/issuance/05-authorize-access.ts +29 -11
- package/src/credential/issuance/06-obtain-credential.ts +61 -36
- package/src/credential/issuance/07-verify-and-parse-credential.ts +37 -264
- package/src/credential/issuance/README.md +23 -20
- package/src/credential/issuance/const.ts +1 -1
- package/src/credential/issuance/index.ts +6 -3
- package/src/credential/presentation/01-start-flow.ts +19 -22
- package/src/credential/presentation/02-evaluate-rp-trust.ts +5 -4
- package/src/credential/presentation/03-get-request-object.ts +36 -8
- package/src/credential/presentation/04-retrieve-rp-jwks.ts +6 -148
- package/src/credential/presentation/05-verify-request-object.ts +115 -30
- package/src/credential/presentation/06-fetch-presentation-definition.ts +5 -35
- package/src/credential/presentation/07-evaluate-dcql-query.ts +132 -161
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +136 -254
- package/src/credential/presentation/08-send-authorization-response.ts +178 -260
- package/src/credential/presentation/README.md +74 -79
- package/src/credential/presentation/errors.ts +38 -15
- package/src/credential/presentation/index.ts +18 -19
- package/src/credential/presentation/types.ts +67 -64
- package/src/credential/status/01-start-flow.ts +9 -0
- package/src/credential/status/02-status-attestation.ts +105 -0
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +70 -0
- package/src/credential/status/README.md +67 -0
- package/src/credential/status/index.ts +22 -0
- package/src/credential/status/types.ts +43 -0
- package/src/credential/trustmark/README.md +62 -0
- package/src/credential/trustmark/get-credential-trustmark.ts +139 -0
- package/src/credential/trustmark/index.ts +8 -0
- package/src/index.ts +4 -0
- package/src/pid/sd-jwt/types.ts +18 -1
- package/src/sd-jwt/__test__/index.test.ts +36 -55
- package/src/sd-jwt/__test__/types.test.ts +16 -29
- package/src/sd-jwt/index.ts +1 -5
- package/src/sd-jwt/types.ts +2 -19
- package/src/trust/chain.ts +151 -0
- package/src/trust/errors.ts +105 -0
- package/src/{entity/trust → trust}/index.ts +198 -23
- package/src/{entity/trust → trust}/types.ts +24 -37
- package/src/trust/utils.ts +35 -0
- package/src/utils/crypto.ts +4 -106
- package/src/utils/decoder.ts +6 -1
- package/src/utils/error-codes.ts +23 -0
- package/src/utils/errors.ts +119 -15
- package/src/utils/logging.ts +68 -0
- package/src/utils/misc.ts +5 -0
- package/src/utils/par.ts +19 -6
- package/src/utils/string.ts +0 -10
- package/src/wallet-instance/index.ts +30 -1
- package/src/wallet-instance-attestation/README.md +8 -3
- package/src/wallet-instance-attestation/index.ts +2 -2
- package/src/wallet-instance-attestation/issuing.ts +33 -12
- package/src/wallet-instance-attestation/types.ts +18 -22
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js +0 -48
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/index.js +0 -25
- package/lib/commonjs/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/commonjs/entity/openid-connect/issuer/types.js +0 -64
- package/lib/commonjs/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/commonjs/entity/trust/chain.js.map +0 -1
- package/lib/commonjs/entity/trust/index.js +0 -148
- package/lib/commonjs/entity/trust/index.js.map +0 -1
- package/lib/commonjs/entity/trust/types.js.map +0 -1
- package/lib/commonjs/mdoc/converters.js +0 -26
- package/lib/commonjs/mdoc/converters.js.map +0 -1
- package/lib/commonjs/mdoc/index.js +0 -68
- package/lib/commonjs/mdoc/index.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -469
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -90
- package/lib/commonjs/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/module/credential/issuance/02-get-issuer-config.js +0 -42
- package/lib/module/credential/issuance/02-get-issuer-config.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/index.js +0 -20
- package/lib/module/entity/openid-connect/issuer/index.js.map +0 -1
- package/lib/module/entity/openid-connect/issuer/types.js +0 -48
- package/lib/module/entity/openid-connect/issuer/types.js.map +0 -1
- package/lib/module/entity/trust/chain.js +0 -113
- package/lib/module/entity/trust/chain.js.map +0 -1
- package/lib/module/entity/trust/index.js +0 -131
- package/lib/module/entity/trust/index.js.map +0 -1
- package/lib/module/entity/trust/types.js.map +0 -1
- package/lib/module/mdoc/converters.js +0 -20
- package/lib/module/mdoc/converters.js.map +0 -1
- package/lib/module/mdoc/index.js +0 -60
- package/lib/module/mdoc/index.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js +0 -462
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-inputs.js.map +0 -1
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js +0 -83
- package/lib/module/utils/credential/issuance/07-verify-and-parse-credentials-utils.js.map +0 -1
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +0 -32
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts +0 -12
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +0 -1
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts +0 -777
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +0 -1
- package/lib/typescript/entity/trust/chain.d.ts.map +0 -1
- package/lib/typescript/entity/trust/index.d.ts.map +0 -1
- package/lib/typescript/mdoc/converters.d.ts +0 -8
- package/lib/typescript/mdoc/converters.d.ts.map +0 -1
- package/lib/typescript/mdoc/index.d.ts +0 -10
- package/lib/typescript/mdoc/index.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts +0 -3
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-inputs.d.ts.map +0 -1
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts +0 -42
- package/lib/typescript/utils/credential/issuance/07-verify-and-parse-credentials-utils.d.ts.map +0 -1
- package/src/credential/issuance/02-get-issuer-config.ts +0 -67
- package/src/entity/openid-connect/issuer/index.ts +0 -27
- package/src/entity/openid-connect/issuer/types.ts +0 -76
- package/src/entity/trust/chain.ts +0 -154
- package/src/mdoc/converters.ts +0 -26
- package/src/mdoc/index.ts +0 -95
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-inputs.ts +0 -615
- package/src/utils/credential/issuance/07-verify-and-parse-credentials-utils.ts +0 -171
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.createWalletInstance = createWalletInstance;
|
7
|
+
exports.getCurrentWalletInstanceStatus = getCurrentWalletInstanceStatus;
|
7
8
|
exports.getWalletInstanceStatus = getWalletInstanceStatus;
|
8
9
|
exports.revokeWalletInstance = revokeWalletInstance;
|
9
10
|
var _client = require("../client");
|
10
11
|
var _errors = require("../utils/errors");
|
12
|
+
var _logging = require("../utils/logging");
|
11
13
|
async function createWalletInstance(context) {
|
12
14
|
const {
|
13
15
|
integrityContext
|
@@ -16,8 +18,10 @@ async function createWalletInstance(context) {
|
|
16
18
|
|
17
19
|
//1. Obtain nonce
|
18
20
|
const challenge = await api.get("/nonce").then(response => response.nonce);
|
21
|
+
_logging.Logger.log(_logging.LogLevel.DEBUG, `Challenge obtained from ${context.walletProviderBaseUrl}: ${challenge}`);
|
19
22
|
const keyAttestation = await integrityContext.getAttestation(challenge);
|
20
23
|
const hardwareKeyTag = integrityContext.getHardwareKeyTag();
|
24
|
+
_logging.Logger.log(_logging.LogLevel.DEBUG, `Key attestation: ${keyAttestation}\nAssociated hardware key tag: ${hardwareKeyTag}`);
|
21
25
|
|
22
26
|
//2. Create Wallet Instance
|
23
27
|
await api.post("/wallet-instances", {
|
@@ -30,6 +34,7 @@ async function createWalletInstance(context) {
|
|
30
34
|
return hardwareKeyTag;
|
31
35
|
}
|
32
36
|
const handleCreateWalletInstanceError = e => {
|
37
|
+
_logging.Logger.log(_logging.LogLevel.ERROR, `An error occurred while calling /wallet-instances endpoint: ${e}`);
|
33
38
|
if (!(e instanceof _errors.WalletProviderResponseError)) {
|
34
39
|
throw e;
|
35
40
|
}
|
@@ -71,4 +76,13 @@ async function getWalletInstanceStatus(context) {
|
|
71
76
|
}
|
72
77
|
});
|
73
78
|
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Get the status of the current Wallet Instance.
|
82
|
+
* @returns Details on the status of the current Wallet Instance
|
83
|
+
*/
|
84
|
+
async function getCurrentWalletInstanceStatus(context) {
|
85
|
+
const api = (0, _client.getWalletProviderClient)(context);
|
86
|
+
return api.get("/wallet-instances/current/status");
|
87
|
+
}
|
74
88
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_client","require","_errors","createWalletInstance","context","integrityContext","api","getWalletProviderClient","challenge","get","then","response","nonce","keyAttestation","getAttestation","hardwareKeyTag","getHardwareKeyTag","post","body","key_attestation","hardware_key_tag","catch","handleCreateWalletInstanceError","e","WalletProviderResponseError","ResponseErrorBuilder","handle","code","WalletProviderResponseErrorCodes","WalletInstanceIntegrityFailed","message","WalletInstanceCreationFailed","buildFrom","revokeWalletInstance","put","path","id","status","getWalletInstanceStatus"],"sourceRoot":"../../../src","sources":["wallet-instance/index.ts"],"mappings":"
|
1
|
+
{"version":3,"names":["_client","require","_errors","_logging","createWalletInstance","context","integrityContext","api","getWalletProviderClient","challenge","get","then","response","nonce","Logger","log","LogLevel","DEBUG","walletProviderBaseUrl","keyAttestation","getAttestation","hardwareKeyTag","getHardwareKeyTag","post","body","key_attestation","hardware_key_tag","catch","handleCreateWalletInstanceError","e","ERROR","WalletProviderResponseError","ResponseErrorBuilder","handle","code","WalletProviderResponseErrorCodes","WalletInstanceIntegrityFailed","message","WalletInstanceCreationFailed","buildFrom","revokeWalletInstance","put","path","id","status","getWalletInstanceStatus","getCurrentWalletInstanceStatus"],"sourceRoot":"../../../src","sources":["wallet-instance/index.ts"],"mappings":";;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AAEO,eAAeG,oBAAoBA,CAACC,OAI1C,EAAE;EACD,MAAM;IAAEC;EAAiB,CAAC,GAAGD,OAAO;EACpC,MAAME,GAAG,GAAG,IAAAC,+BAAuB,EAACH,OAAO,CAAC;;EAE5C;EACA,MAAMI,SAAS,GAAG,MAAMF,GAAG,CAACG,GAAG,CAAC,QAAQ,CAAC,CAACC,IAAI,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,KAAK,CAAC;E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,CAAC,+BAA+B,EAAE;IAC7CC,IAAI,EAAE;MAAEC,EAAE,EAAEtC,OAAO,CAACsC;IAAG,CAAC;IACxBnB,IAAI,EAAE;MAAEoB,MAAM,EAAE;IAAU;EAC5B,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACO,eAAeC,uBAAuBA,CAACxC,OAI7C,EAA+B;EAC9B,MAAME,GAAG,GAAG,IAAAC,+BAAuB,EAACH,OAAO,CAAC;EAE5C,OAAOE,GAAG,CAACG,GAAG,CAAC,+BAA+B,EAAE;IAC9CgC,IAAI,EAAE;MAAEC,EAAE,EAAEtC,OAAO,CAACsC;IAAG;EACzB,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACO,eAAeG,8BAA8BA,CAACzC,OAGpD,EAA+B;EAC9B,MAAME,GAAG,GAAG,IAAAC,+BAAuB,EAACH,OAAO,CAAC;EAE5C,OAAOE,GAAG,CAACG,GAAG,CAAC,kCAAkC,CAAC;AACpD"}
|
@@ -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
|
|
@@ -8,6 +8,7 @@ exports.getAttestationRequest = getAttestationRequest;
|
|
8
8
|
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
9
9
|
var _jwk = require("../utils/jwk");
|
10
10
|
var _client = require("../client");
|
11
|
+
var _logging = require("../utils/logging");
|
11
12
|
var _errors = require("../utils/errors");
|
12
13
|
var _types = require("./types");
|
13
14
|
/**
|
@@ -38,8 +39,8 @@ async function getAttestationRequest(challenge, wiaCryptoContext, integrityConte
|
|
38
39
|
} = await integrityContext.getHardwareSignatureWithAuthData(JSON.stringify(clientData));
|
39
40
|
return new _ioReactNativeJwt.SignJWT(wiaCryptoContext).setPayload({
|
40
41
|
iss: keyThumbprint,
|
41
|
-
|
42
|
-
challenge,
|
42
|
+
aud: walletProviderBaseUrl,
|
43
|
+
nonce: challenge,
|
43
44
|
hardware_signature: signature,
|
44
45
|
integrity_assertion: authenticatorData,
|
45
46
|
hardware_key_tag: hardwareKeyTag,
|
@@ -48,12 +49,13 @@ async function getAttestationRequest(challenge, wiaCryptoContext, integrityConte
|
|
48
49
|
}
|
49
50
|
}).setProtectedHeader({
|
50
51
|
kid: publicKey.kid,
|
51
|
-
typ: "war+jwt"
|
52
|
+
typ: "wp-war+jwt"
|
52
53
|
}).setIssuedAt().setExpirationTime("1h").sign();
|
53
54
|
}
|
54
55
|
|
55
56
|
/**
|
56
57
|
* Request a Wallet Instance Attestation (WIA) to the Wallet provider
|
58
|
+
* @version 1.0.0
|
57
59
|
*
|
58
60
|
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
59
61
|
* @param params.appFetch (optional) Http client
|
@@ -75,21 +77,26 @@ const getAttestation = async _ref => {
|
|
75
77
|
|
76
78
|
// 1. Get nonce from backend
|
77
79
|
const challenge = await api.get("/nonce").then(response => response.nonce);
|
80
|
+
_logging.Logger.log(_logging.LogLevel.DEBUG, `Challenge obtained from ${walletProviderBaseUrl}: ${challenge} `);
|
78
81
|
|
79
82
|
// 2. Get a signed attestation request
|
80
83
|
const signedAttestationRequest = await getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl);
|
84
|
+
_logging.Logger.log(_logging.LogLevel.DEBUG, `Signed attestation request: ${signedAttestationRequest}`);
|
81
85
|
|
82
|
-
// 3. Request WIA
|
83
|
-
const
|
86
|
+
// 3. Request WIA in multiple formats
|
87
|
+
const response = await api.post("/wallet-attestations", {
|
84
88
|
body: {
|
85
|
-
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
86
89
|
assertion: signedAttestationRequest
|
87
90
|
}
|
88
|
-
}).then(
|
89
|
-
|
91
|
+
}).then(_types.WalletAttestationResponse.parse).catch(handleAttestationCreationError);
|
92
|
+
for (const attestation of response.wallet_attestations) {
|
93
|
+
_logging.Logger.log(_logging.LogLevel.DEBUG, `Obtained wallet attestation in ${attestation.format} format: ${attestation.wallet_attestation}`);
|
94
|
+
}
|
95
|
+
return response.wallet_attestations;
|
90
96
|
};
|
91
97
|
exports.getAttestation = getAttestation;
|
92
98
|
const handleAttestationCreationError = e => {
|
99
|
+
_logging.Logger.log(_logging.LogLevel.ERROR, `An error occurred while calling /wallet-attestation endpoint: ${e}`);
|
93
100
|
if (!(e instanceof _errors.WalletProviderResponseError)) {
|
94
101
|
throw e;
|
95
102
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_client","_errors","_types","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","SignJWT","setPayload","iss","
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_client","_logging","_errors","_types","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","SignJWT","setPayload","iss","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","cnf","fixBase64EncodingOnKey","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","api","getWalletProviderClient","get","then","response","Logger","log","LogLevel","DEBUG","signedAttestationRequest","post","body","assertion","WalletAttestationResponse","catch","handleAttestationCreationError","attestation","wallet_attestations","format","wallet_attestation","exports","e","ERROR","WalletProviderResponseError","ResponseErrorBuilder","handle","code","WalletProviderResponseErrorCodes","WalletInstanceRevoked","message","WalletInstanceNotFound","WalletInstanceIntegrityFailed","WalletInstanceAttestationIssuingFailed","buildFrom"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":";;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAKA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeM,qBAAqBA,CACzCC,SAAiB,EACjBC,g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AAC;EAED,IAAI,EAAEA,CAAC,YAAYE,mCAA2B,CAAC,EAAE;IAC/C,MAAMF,CAAC;EACT;EAEA,MAAM,IAAIG,4BAAoB,CAACD,mCAA2B,CAAC,CACxDE,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,wCAAgC,CAACC,qBAAqB;IAC5DC,OAAO,EAAE;EACX,CAAC,CAAC,CACDJ,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,wCAAgC,CAACG,sBAAsB;IAC7DD,OAAO,EACL;EACJ,CAAC,CAAC,CACDJ,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,wCAAgC,CAACI,6BAA6B;IACpEF,OAAO,EACL;EACJ,CAAC,CAAC,CACDJ,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,wCAAgC,CAACK,sCAAsC;IAC7EH,OAAO,EAAE;EACX,CAAC,CAAC,CACDI,SAAS,CAACZ,CAAC,CAAC;AACjB,CAAC"}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.WalletInstanceAttestationRequestJwt = exports.WalletInstanceAttestationJwt = exports.
|
6
|
+
exports.WalletInstanceAttestationRequestJwt = exports.WalletInstanceAttestationJwt = exports.WalletAttestationResponse = void 0;
|
7
7
|
var _jwk = require("../utils/jwk");
|
8
8
|
var z = _interopRequireWildcard(require("zod"));
|
9
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -32,39 +32,35 @@ const Jwt = z.object({
|
|
32
32
|
});
|
33
33
|
const WalletInstanceAttestationRequestJwt = z.object({
|
34
34
|
header: z.intersection(Jwt.shape.header, z.object({
|
35
|
-
typ: z.literal("war+jwt")
|
35
|
+
typ: z.literal("wp-war+jwt")
|
36
36
|
})),
|
37
37
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
38
38
|
aud: z.string(),
|
39
|
-
|
40
|
-
|
39
|
+
nonce: z.string(),
|
40
|
+
hardware_signature: z.string(),
|
41
|
+
integrity_assertion: z.string(),
|
42
|
+
hardware_key_tag: z.string()
|
41
43
|
}))
|
42
44
|
});
|
43
45
|
exports.WalletInstanceAttestationRequestJwt = WalletInstanceAttestationRequestJwt;
|
44
46
|
const WalletInstanceAttestationJwt = z.object({
|
45
47
|
header: z.intersection(Jwt.shape.header, z.object({
|
46
|
-
typ: z.literal("
|
48
|
+
typ: z.literal("oauth-client-attestation+jwt"),
|
49
|
+
trust_chain: z.array(z.string())
|
47
50
|
})),
|
48
51
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
49
52
|
sub: z.string(),
|
50
53
|
aal: z.string(),
|
51
|
-
|
52
|
-
|
53
|
-
vp_formats_supported: z.object({
|
54
|
-
"vc+sd-jwt": z.object({
|
55
|
-
"sd-jwt_alg_values": z.array(z.string())
|
56
|
-
}).optional(),
|
57
|
-
"vp+sd-jwt": z.object({
|
58
|
-
"sd-jwt_alg_values": z.array(z.string())
|
59
|
-
}).optional()
|
60
|
-
}),
|
61
|
-
request_object_signing_alg_values_supported: z.array(z.string()),
|
62
|
-
presentation_definition_uri_supported: z.boolean()
|
54
|
+
wallet_link: z.string().optional(),
|
55
|
+
wallet_name: z.string().optional()
|
63
56
|
}))
|
64
57
|
});
|
65
58
|
exports.WalletInstanceAttestationJwt = WalletInstanceAttestationJwt;
|
66
|
-
const
|
67
|
-
|
59
|
+
const WalletAttestationResponse = z.object({
|
60
|
+
wallet_attestations: z.array(z.object({
|
61
|
+
wallet_attestation: z.string(),
|
62
|
+
format: z.enum(["jwt", "dc+sd-jwt", "mso_mdoc"])
|
63
|
+
}))
|
68
64
|
});
|
69
|
-
exports.
|
65
|
+
exports.WalletAttestationResponse = WalletAttestationResponse;
|
70
66
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","require","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","
|
1
|
+
{"version":3,"names":["_jwk","require","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","nonce","hardware_signature","integrity_assertion","hardware_key_tag","exports","WalletInstanceAttestationJwt","sub","aal","wallet_link","wallet_name","WalletAttestationResponse","wallet_attestations","wallet_attestation","format","enum"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAyB,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,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ailView = z.object({
|
|
5
5
|
export const WalletAttestationView = z.object({
|
6
6
|
wallet_attestation: z.string()
|
7
7
|
});
|
8
|
+
export const WalletAttestationsView = z.object({
|
9
|
+
wallet_attestations: z.array(z.object({
|
10
|
+
format: z.union([z.literal("jwt"), z.literal("dc+sd-jwt")]),
|
11
|
+
wallet_attestation: z.string()
|
12
|
+
}))
|
13
|
+
});
|
8
14
|
export const CreateWalletInstanceBody = z.object({
|
9
15
|
challenge: z.string(),
|
10
16
|
key_attestation: z.string(),
|
@@ -14,12 +20,8 @@ export const CreateWalletAttestationBody = z.object({
|
|
14
20
|
grant_type: z.literal("urn:ietf:params:oauth:grant-type:jwt-bearer"),
|
15
21
|
assertion: z.string()
|
16
22
|
});
|
17
|
-
export const
|
18
|
-
|
19
|
-
title: z.string().optional(),
|
20
|
-
status: z.number().optional(),
|
21
|
-
detail: z.string().optional(),
|
22
|
-
instance: z.string().optional()
|
23
|
+
export const CreateWalletAttestationV2Body = z.object({
|
24
|
+
assertion: z.string()
|
23
25
|
});
|
24
26
|
export const SetWalletInstanceStatusBody = z.object({
|
25
27
|
status: z.literal("REVOKED")
|
@@ -30,6 +32,13 @@ export const WalletInstanceData = z.object({
|
|
30
32
|
is_revoked: z.boolean(),
|
31
33
|
revocation_reason: z.union([RevocationReason, z.undefined()]).optional()
|
32
34
|
});
|
35
|
+
export const ProblemDetail = z.object({
|
36
|
+
type: z.string().optional(),
|
37
|
+
title: z.string().optional(),
|
38
|
+
status: z.number().optional(),
|
39
|
+
detail: z.string().optional(),
|
40
|
+
instance: z.string().optional()
|
41
|
+
});
|
33
42
|
export const get_GetNonce = {
|
34
43
|
method: z.literal("GET"),
|
35
44
|
path: z.literal("/nonce"),
|
@@ -44,6 +53,28 @@ export const post_CreateWalletInstance = {
|
|
44
53
|
}),
|
45
54
|
response: z.unknown()
|
46
55
|
};
|
56
|
+
export const post_CreateWalletAttestation = {
|
57
|
+
method: z.literal("POST"),
|
58
|
+
path: z.literal("/token"),
|
59
|
+
parameters: z.object({
|
60
|
+
body: CreateWalletAttestationBody
|
61
|
+
}),
|
62
|
+
response: WalletAttestationView
|
63
|
+
};
|
64
|
+
export const post_CreateWalletAttestationV2 = {
|
65
|
+
method: z.literal("POST"),
|
66
|
+
path: z.literal("/wallet-attestations"),
|
67
|
+
parameters: z.object({
|
68
|
+
body: CreateWalletAttestationV2Body
|
69
|
+
}),
|
70
|
+
response: WalletAttestationsView
|
71
|
+
};
|
72
|
+
export const get_GetCurrentWalletInstanceStatus = {
|
73
|
+
method: z.literal("GET"),
|
74
|
+
path: z.literal("/wallet-instances/current/status"),
|
75
|
+
parameters: z.never(),
|
76
|
+
response: WalletInstanceData
|
77
|
+
};
|
47
78
|
export const get_GetWalletInstanceStatus = {
|
48
79
|
method: z.literal("GET"),
|
49
80
|
path: z.literal("/wallet-instances/{id}/status"),
|
@@ -65,24 +96,18 @@ export const put_SetWalletInstanceStatus = {
|
|
65
96
|
}),
|
66
97
|
response: z.unknown()
|
67
98
|
};
|
68
|
-
export const post_CreateWalletAttestation = {
|
69
|
-
method: z.literal("POST"),
|
70
|
-
path: z.literal("/token"),
|
71
|
-
parameters: z.object({
|
72
|
-
body: CreateWalletAttestationBody
|
73
|
-
}),
|
74
|
-
response: WalletAttestationView
|
75
|
-
};
|
76
99
|
|
77
100
|
// <EndpointByMethod>
|
78
101
|
export const EndpointByMethod = {
|
79
102
|
get: {
|
80
103
|
"/nonce": get_GetNonce,
|
104
|
+
"/wallet-instances/current/status": get_GetCurrentWalletInstanceStatus,
|
81
105
|
"/wallet-instances/{id}/status": get_GetWalletInstanceStatus
|
82
106
|
},
|
83
107
|
post: {
|
84
108
|
"/wallet-instances": post_CreateWalletInstance,
|
85
|
-
"/token": post_CreateWalletAttestation
|
109
|
+
"/token": post_CreateWalletAttestation,
|
110
|
+
"/wallet-attestations": post_CreateWalletAttestationV2
|
86
111
|
},
|
87
112
|
put: {
|
88
113
|
"/wallet-instances/{id}/status": put_SetWalletInstanceStatus
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["z","NonceDetailView","object","nonce","string","WalletAttestationView","wallet_attestation","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","
|
1
|
+
{"version":3,"names":["z","NonceDetailView","object","nonce","string","WalletAttestationView","wallet_attestation","WalletAttestationsView","wallet_attestations","array","format","union","literal","CreateWalletInstanceBody","challenge","key_attestation","hardware_key_tag","CreateWalletAttestationBody","grant_type","assertion","CreateWalletAttestationV2Body","SetWalletInstanceStatusBody","status","RevocationReason","WalletInstanceData","id","is_revoked","boolean","revocation_reason","undefined","optional","ProblemDetail","type","title","number","detail","instance","get_GetNonce","method","path","parameters","never","response","post_CreateWalletInstance","body","unknown","post_CreateWalletAttestation","post_CreateWalletAttestationV2","get_GetCurrentWalletInstanceStatus","get_GetWalletInstanceStatus","put_SetWalletInstanceStatus","EndpointByMethod","get","post","put","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":"AAAA,OAAOA,CAAC,MAAM,KAAK;AAGnB,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtCC,KAAK,EAAEH,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;AAGF,OAAO,MAAMC,qBAAqB,GAAGL,CAAC,CAACE,MAAM,CAAC;EAC5CI,kBAAkB,EAAEN,CAAC,CAACI,MAAM,CAAC;AAC/B,CAAC,CAAC;AAGF,OAAO,MAAMG,sBAAsB,GAAGP,CAAC,CAACE,MAAM,CAAC;EAC7CM,mBAAmB,EAAER,CAAC,CAACS,KAAK,CAC1BT,CAAC,CAACE,MAAM,CAAC;IACPQ,MAAM,EAAEV,CAAC,CAACW,KAAK,CAAC,CAACX,CAAC,CAACY,OAAO,CAAC,KAAK,CAAC,EAAEZ,CAAC,CAACY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3DN,kB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,CAACF,OAAO,GAAGjB,IAAI,EAAAqB,SAAA,CAAAC,MAAA,QAAAhC,SAAA,GAAA+B,SAAA,GAAW,CAAC;EAC5D;EACA;AACF;;AAEA,OAAO,SAASE,eAAeA,CAACJ,OAAgB,EAAEF,OAAgB,EAAE;EAClE,OAAO,IAAID,SAAS,CAACG,OAAO,CAAC,CAACC,UAAU,CAACH,OAAO,IAAI,EAAE,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA"}
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import * as Issuance from "./issuance";
|
2
2
|
import * as Presentation from "./presentation";
|
3
|
-
|
3
|
+
import * as Status from "./status";
|
4
|
+
import * as Trustmark from "./trustmark";
|
5
|
+
export { Issuance, Presentation, Status, Trustmark };
|
4
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Issuance","Presentation"],"sourceRoot":"../../../src","sources":["credential/index.ts"],"mappings":"AAAA,OAAO,KAAKA,QAAQ,MAAM,YAAY;AACtC,OAAO,KAAKC,YAAY,MAAM,gBAAgB;AAC9C,
|
1
|
+
{"version":3,"names":["Issuance","Presentation","Status","Trustmark"],"sourceRoot":"../../../src","sources":["credential/index.ts"],"mappings":"AAAA,OAAO,KAAKA,QAAQ,MAAM,YAAY;AACtC,OAAO,KAAKC,YAAY,MAAM,gBAAgB;AAC9C,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,SAAS,MAAM,aAAa;AAExC,SAASH,QAAQ,EAAEC,YAAY,EAAEC,MAAM,EAAEC,SAAS"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { getCredentialIssuerEntityConfiguration } from "../../trust";
|
2
|
+
/**
|
3
|
+
* WARNING: This function must be called after {@link startFlow}. The next function to be called is {@link startUserAuthorization}.
|
4
|
+
* The Issuer trust evaluation phase.
|
5
|
+
* Fetch the Issuer's configuration and verify trust.
|
6
|
+
*
|
7
|
+
* @param issuerUrl The base url of the Issuer returned by {@link startFlow}
|
8
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
9
|
+
* @returns The Issuer's configuration
|
10
|
+
*/
|
11
|
+
export const evaluateIssuerTrust = async function (issuerUrl) {
|
12
|
+
let context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
13
|
+
const issuerConf = await getCredentialIssuerEntityConfiguration(issuerUrl, {
|
14
|
+
appFetch: context.appFetch
|
15
|
+
}).then(_ => _.payload.metadata);
|
16
|
+
return {
|
17
|
+
issuerConf
|
18
|
+
};
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=02-evaluate-issuer-trust.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["getCredentialIssuerEntityConfiguration","evaluateIssuerTrust","issuerUrl","context","arguments","length","undefined","issuerConf","appFetch","then","_","payload","metadata"],"sourceRoot":"../../../../src","sources":["credential/issuance/02-evaluate-issuer-trust.ts"],"mappings":"AAAA,SAASA,sCAAsC,QAAQ,aAAa;AAcpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAwC,GAAG,eAAAA,CACtDC,SAAS,EAEN;EAAA,IADHC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEZ,MAAMG,UAAU,GAAG,MAAMP,sCAAsC,CAACE,SAAS,EAAE;IACzEM,QAAQ,EAAEL,OAAO,CAACK;EACpB,CAAC,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,OAAO,CAACC,QAAQ,CAAC;EAClC,OAAO;IAAEL;EAAW,CAAC;AACvB,CAAC"}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import { generateRandomAlphaNumericString } from "../../utils/misc";
|
2
2
|
import { makeParRequest } from "../../utils/par";
|
3
|
+
import { ASSERTION_TYPE } from "./const";
|
4
|
+
import { LogLevel, Logger } from "../../utils/logging";
|
3
5
|
/**
|
4
6
|
* Ensures that the credential type requested is supported by the issuer and contained in the
|
5
7
|
* issuer configuration.
|
6
|
-
* @param issuerConf The issuer configuration returned by {@link
|
8
|
+
* @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
|
7
9
|
* @param credentialType The type of the credential to be requested returned by {@link startFlow}
|
8
10
|
* @param context.wiaCryptoContext The Wallet Instance's crypto context
|
9
11
|
* @param context.walletInstanceAttestation The Wallet Instance's attestation
|
@@ -12,16 +14,16 @@ import { makeParRequest } from "../../utils/par";
|
|
12
14
|
* @returns The credential definition to be used in the request which includes the format and the type and its type
|
13
15
|
*/
|
14
16
|
const selectCredentialDefinition = (issuerConf, credentialType) => {
|
15
|
-
const credential_configurations_supported = issuerConf.credential_configurations_supported;
|
16
|
-
const
|
17
|
-
if (!credential) {
|
18
|
-
throw new Error(`No credential support the type '${credentialType}'`);
|
19
|
-
}
|
20
|
-
const result = {
|
17
|
+
const credential_configurations_supported = issuerConf.openid_credential_issuer.credential_configurations_supported;
|
18
|
+
const [result] = Object.keys(credential_configurations_supported).filter(e => e.includes(credentialType)).map(e => ({
|
21
19
|
credential_configuration_id: credentialType,
|
22
|
-
format:
|
20
|
+
format: credential_configurations_supported[e].format,
|
23
21
|
type: "openid_credential"
|
24
|
-
};
|
22
|
+
}));
|
23
|
+
if (!result) {
|
24
|
+
Logger.log(LogLevel.ERROR, `Requested credential type ${credentialType} is not supported by the issuer according to its configuration ${JSON.stringify(credential_configurations_supported)}`);
|
25
|
+
throw new Error(`No credential support the type '${credentialType}'`);
|
26
|
+
}
|
25
27
|
return result;
|
26
28
|
};
|
27
29
|
|
@@ -29,15 +31,21 @@ const selectCredentialDefinition = (issuerConf, credentialType) => {
|
|
29
31
|
* Ensures that the response mode requested is supported by the issuer and contained in the issuer configuration.
|
30
32
|
* @param issuerConf The issuer configuration
|
31
33
|
* @param credentialType The type of the credential to be requested
|
32
|
-
* @returns The response mode to be used in the request, "query" for
|
34
|
+
* @returns The response mode to be used in the request, "query" for PersonIdentificationData and "form_post.jwt" for all other types.
|
33
35
|
*/
|
34
|
-
const selectResponseMode = credentialType => {
|
35
|
-
const
|
36
|
+
const selectResponseMode = (issuerConf, credentialType) => {
|
37
|
+
const responseModeSupported = issuerConf.oauth_authorization_server.response_modes_supported;
|
38
|
+
const responseMode = credentialType === "PersonIdentificationData" ? "query" : "form_post.jwt";
|
39
|
+
Logger.log(LogLevel.DEBUG, `Selected response mode ${responseMode} for credential type ${credentialType}`);
|
40
|
+
if (!responseModeSupported.includes(responseMode)) {
|
41
|
+
Logger.log(LogLevel.ERROR, `Requested response mode ${responseMode} is not supported by the issuer according to its configuration ${JSON.stringify(responseModeSupported)}`);
|
42
|
+
throw new Error(`No response mode support the type '${credentialType}'`);
|
43
|
+
}
|
36
44
|
return responseMode;
|
37
45
|
};
|
38
46
|
|
39
47
|
/**
|
40
|
-
* WARNING: This function must be called after {@link
|
48
|
+
* WARNING: This function must be called after {@link evaluateIssuerTrust} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
|
41
49
|
* Creates and sends a PAR request to the /as/par endpoint of the authorization server.
|
42
50
|
* This starts the authentication flow to obtain an access token.
|
43
51
|
* This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
|
@@ -63,17 +71,18 @@ export const startUserAuthorization = async (issuerConf, credentialType, ctx) =>
|
|
63
71
|
} = ctx;
|
64
72
|
const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
|
65
73
|
if (!clientId) {
|
74
|
+
Logger.log(LogLevel.ERROR, `Public key associated with kid ${clientId} not found in the device`);
|
66
75
|
throw new Error("No public key found");
|
67
76
|
}
|
68
77
|
const codeVerifier = generateRandomAlphaNumericString(64);
|
69
|
-
const parEndpoint = issuerConf.pushed_authorization_request_endpoint;
|
78
|
+
const parEndpoint = issuerConf.oauth_authorization_server.pushed_authorization_request_endpoint;
|
70
79
|
const credentialDefinition = selectCredentialDefinition(issuerConf, credentialType);
|
71
|
-
const responseMode = selectResponseMode(credentialType);
|
80
|
+
const responseMode = selectResponseMode(issuerConf, credentialType);
|
72
81
|
const getPar = makeParRequest({
|
73
82
|
wiaCryptoContext,
|
74
83
|
appFetch
|
75
84
|
});
|
76
|
-
const issuerRequestUri = await getPar(clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, [credentialDefinition]);
|
85
|
+
const issuerRequestUri = await getPar(clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, [credentialDefinition], ASSERTION_TYPE);
|
77
86
|
return {
|
78
87
|
issuerRequestUri,
|
79
88
|
clientId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["generateRandomAlphaNumericString","makeParRequest","selectCredentialDefinition","issuerConf","credentialType","credential_configurations_supported","
|
1
|
+
{"version":3,"names":["generateRandomAlphaNumericString","makeParRequest","ASSERTION_TYPE","LogLevel","Logger","selectCredentialDefinition","issuerConf","credentialType","credential_configurations_supported","openid_credential_issuer","result","Object","keys","filter","e","includes","map","credential_configuration_id","format","type","log","ERROR","JSON","stringify","Error","selectResponseMode","responseModeSupported","oauth_authorization_server","response_modes_supported","responseMode","DEBUG","startUserAuthorization","ctx","wiaCryptoContext","walletInstanceAttestation","redirectUri","appFetch","fetch","clientId","getPublicKey","then","_","kid","codeVerifier","parEndpoint","pushed_authorization_request_endpoint","credentialDefinition","getPar","issuerRequestUri"],"sourceRoot":"../../../../src","sources":["credential/issuance/03-start-user-authorization.ts"],"mappings":"AAEA,SAASA,gCAAgC,QAAkB,kBAAkB;AAG7E,SAA8BC,cAAc,QAAQ,iBAAiB;AACrE,SAASC,cAAc,QAAQ,SAAS;AACxC,SAASC,QAAQ,EAAEC,MAAM,QAAQ,qBAAqB;AAkBtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,0BAA0B,GAAGA,CACjCC,UAAkD,EA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