@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,16 +1,17 @@
|
|
1
|
-
import {
|
1
|
+
import { CredentialIssuerEntityConfiguration, EntityConfiguration, EntityStatement, RelyingPartyEntityConfiguration, TrustAnchorEntityConfiguration, WalletProviderEntityConfiguration } from "./types";
|
2
2
|
import { validateTrustChain } from "./chain";
|
3
|
+
import type { JWK } from "../utils/jwk";
|
3
4
|
export type { WalletProviderEntityConfiguration, TrustAnchorEntityConfiguration, CredentialIssuerEntityConfiguration, RelyingPartyEntityConfiguration, EntityConfiguration, EntityStatement, };
|
4
5
|
/**
|
5
6
|
* Verify a given trust chain is actually valid.
|
6
7
|
* It can handle fast chain renewal, which means we try to fetch a fresh version of each statement.
|
7
8
|
*
|
8
9
|
* @param trustAnchorEntity The entity configuration of the known trust anchor
|
9
|
-
* @param chain The chain of statements to be
|
10
|
-
* @param
|
11
|
-
* @param
|
10
|
+
* @param chain The chain of statements to be validated
|
11
|
+
* @param renewOnFail Whether to renew the provided chain if the validation fails at first. Default: true
|
12
|
+
* @param appFetch Fetch api implementation. Default: the built-in implementation
|
12
13
|
* @returns The result of the chain validation
|
13
|
-
* @throws {
|
14
|
+
* @throws {FederationError} If the chain is not valid
|
14
15
|
*/
|
15
16
|
export declare function verifyTrustChain(trustAnchorEntity: TrustAnchorEntityConfiguration, chain: string[], { appFetch, renewOnFail, }?: {
|
16
17
|
appFetch?: GlobalFetch["fetch"];
|
@@ -20,7 +21,7 @@ export declare function verifyTrustChain(trustAnchorEntity: TrustAnchorEntityCon
|
|
20
21
|
* Fetch the signed entity configuration token for an entity
|
21
22
|
*
|
22
23
|
* @param entityBaseUrl The url of the entity to fetch
|
23
|
-
* @param
|
24
|
+
* @param appFetch (optional) fetch api implementation
|
24
25
|
* @returns The signed Entity Configuration token
|
25
26
|
*/
|
26
27
|
export declare function getSignedEntityConfiguration(entityBaseUrl: string, { appFetch, }?: {
|
@@ -38,6 +39,7 @@ export declare function getSignedEntityConfiguration(entityBaseUrl: string, { ap
|
|
38
39
|
*
|
39
40
|
* @param entityBaseUrl The base url of the entity.
|
40
41
|
* @param schema The expected schema of the entity configuration, according to the kind of entity we are fetching from.
|
42
|
+
* @param options An optional object with additional options.
|
41
43
|
* @param options.appFetch An optional instance of the http client to be used.
|
42
44
|
* @returns The parsed entity configuration object
|
43
45
|
* @throws {IoWalletError} If the http request fails
|
@@ -59,13 +61,11 @@ declare function fetchAndParseEntityConfiguration(entityBaseUrl: string, schema:
|
|
59
61
|
appFetch?: GlobalFetch["fetch"];
|
60
62
|
}): Promise<EntityConfiguration>;
|
61
63
|
export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
62
|
-
header: {
|
63
|
-
alg: string;
|
64
|
-
kid: string;
|
65
|
-
typ: "entity-statement+jwt";
|
66
|
-
};
|
67
64
|
payload: {
|
68
65
|
iss: string;
|
66
|
+
sub: string;
|
67
|
+
iat: number;
|
68
|
+
exp: number;
|
69
69
|
jwks: {
|
70
70
|
keys: {
|
71
71
|
kty: "RSA" | "EC";
|
@@ -92,9 +92,6 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
|
|
92
92
|
x5u?: string | undefined;
|
93
93
|
}[];
|
94
94
|
};
|
95
|
-
iat: number;
|
96
|
-
exp: number;
|
97
|
-
sub: string;
|
98
95
|
metadata: {
|
99
96
|
federation_entity: {
|
100
97
|
federation_fetch_endpoint?: string | undefined;
|
@@ -102,6 +99,9 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
|
|
102
99
|
federation_resolve_endpoint?: string | undefined;
|
103
100
|
federation_trust_mark_status_endpoint?: string | undefined;
|
104
101
|
federation_trust_mark_list_endpoint?: string | undefined;
|
102
|
+
federation_trust_mark_endpoint?: string | undefined;
|
103
|
+
federation_historical_keys_endpoint?: string | undefined;
|
104
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
105
105
|
organization_name?: string | undefined;
|
106
106
|
homepage_uri?: string | undefined;
|
107
107
|
policy_uri?: string | undefined;
|
@@ -117,6 +117,11 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
|
|
117
117
|
} & {
|
118
118
|
[k: string]: unknown;
|
119
119
|
};
|
120
|
+
header: {
|
121
|
+
alg: string;
|
122
|
+
kid: string;
|
123
|
+
typ: "entity-statement+jwt";
|
124
|
+
};
|
120
125
|
} & {
|
121
126
|
payload: {
|
122
127
|
metadata: {
|
@@ -159,13 +164,11 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
|
|
159
164
|
};
|
160
165
|
}>;
|
161
166
|
export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
162
|
-
header: {
|
163
|
-
alg: string;
|
164
|
-
kid: string;
|
165
|
-
typ: "entity-statement+jwt";
|
166
|
-
};
|
167
167
|
payload: {
|
168
168
|
iss: string;
|
169
|
+
sub: string;
|
170
|
+
iat: number;
|
171
|
+
exp: number;
|
169
172
|
jwks: {
|
170
173
|
keys: {
|
171
174
|
kty: "RSA" | "EC";
|
@@ -192,9 +195,6 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
192
195
|
x5u?: string | undefined;
|
193
196
|
}[];
|
194
197
|
};
|
195
|
-
iat: number;
|
196
|
-
exp: number;
|
197
|
-
sub: string;
|
198
198
|
metadata: {
|
199
199
|
federation_entity: {
|
200
200
|
federation_fetch_endpoint?: string | undefined;
|
@@ -202,6 +202,9 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
202
202
|
federation_resolve_endpoint?: string | undefined;
|
203
203
|
federation_trust_mark_status_endpoint?: string | undefined;
|
204
204
|
federation_trust_mark_list_endpoint?: string | undefined;
|
205
|
+
federation_trust_mark_endpoint?: string | undefined;
|
206
|
+
federation_historical_keys_endpoint?: string | undefined;
|
207
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
205
208
|
organization_name?: string | undefined;
|
206
209
|
homepage_uri?: string | undefined;
|
207
210
|
policy_uri?: string | undefined;
|
@@ -217,6 +220,11 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
217
220
|
} & {
|
218
221
|
[k: string]: unknown;
|
219
222
|
};
|
223
|
+
header: {
|
224
|
+
alg: string;
|
225
|
+
kid: string;
|
226
|
+
typ: "entity-statement+jwt";
|
227
|
+
};
|
220
228
|
} & {
|
221
229
|
payload: {
|
222
230
|
jwks: {
|
@@ -247,45 +255,6 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
247
255
|
};
|
248
256
|
metadata: {
|
249
257
|
openid_credential_issuer: {
|
250
|
-
display: {
|
251
|
-
name: string;
|
252
|
-
locale: string;
|
253
|
-
logo?: {
|
254
|
-
url: string;
|
255
|
-
alt_text: string;
|
256
|
-
} | undefined;
|
257
|
-
}[];
|
258
|
-
credential_configurations_supported: Record<string, {
|
259
|
-
display: {
|
260
|
-
name: string;
|
261
|
-
locale: string;
|
262
|
-
logo?: {
|
263
|
-
url: string;
|
264
|
-
alt_text: string;
|
265
|
-
} | undefined;
|
266
|
-
background_color?: string | undefined;
|
267
|
-
text_color?: string | undefined;
|
268
|
-
}[];
|
269
|
-
scope: string;
|
270
|
-
cryptographic_binding_methods_supported: string[];
|
271
|
-
format: "vc+sd-jwt" | "mso_mdoc";
|
272
|
-
credential_signing_alg_values_supported: string[];
|
273
|
-
claims?: Record<string, {
|
274
|
-
display: {
|
275
|
-
name: string;
|
276
|
-
locale: string;
|
277
|
-
}[];
|
278
|
-
value_type: string;
|
279
|
-
}> | undefined;
|
280
|
-
authentic_source?: string | undefined;
|
281
|
-
issuance_errors_supported?: Record<string, {
|
282
|
-
display: {
|
283
|
-
title: string;
|
284
|
-
locale: string;
|
285
|
-
description: string;
|
286
|
-
}[];
|
287
|
-
}> | undefined;
|
288
|
-
}>;
|
289
258
|
jwks: {
|
290
259
|
keys: {
|
291
260
|
kty: "RSA" | "EC";
|
@@ -312,13 +281,42 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
312
281
|
x5u?: string | undefined;
|
313
282
|
}[];
|
314
283
|
};
|
284
|
+
display: {
|
285
|
+
name: string;
|
286
|
+
locale: string;
|
287
|
+
}[];
|
315
288
|
credential_issuer: string;
|
316
289
|
credential_endpoint: string;
|
317
290
|
revocation_endpoint: string;
|
318
291
|
status_attestation_endpoint: string;
|
292
|
+
credential_configurations_supported: Record<string, {
|
293
|
+
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
294
|
+
scope: string;
|
295
|
+
display: {
|
296
|
+
name: string;
|
297
|
+
locale: string;
|
298
|
+
}[];
|
299
|
+
claims: Record<string, {
|
300
|
+
value_type: string;
|
301
|
+
display: {
|
302
|
+
name: string;
|
303
|
+
locale: string;
|
304
|
+
}[];
|
305
|
+
}>;
|
306
|
+
cryptographic_binding_methods_supported: string[];
|
307
|
+
credential_signing_alg_values_supported: string[];
|
308
|
+
authentic_source?: string | undefined;
|
309
|
+
issuance_errors_supported?: Record<string, {
|
310
|
+
display: {
|
311
|
+
locale: string;
|
312
|
+
title: string;
|
313
|
+
description: string;
|
314
|
+
}[];
|
315
|
+
}> | undefined;
|
316
|
+
}>;
|
319
317
|
};
|
320
318
|
oauth_authorization_server: {
|
321
|
-
|
319
|
+
request_object_signing_alg_values_supported: string[];
|
322
320
|
jwks: {
|
323
321
|
keys: {
|
324
322
|
kty: "RSA" | "EC";
|
@@ -346,8 +344,8 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
346
344
|
}[];
|
347
345
|
};
|
348
346
|
authorization_endpoint: string;
|
347
|
+
pushed_authorization_request_endpoint: string;
|
349
348
|
token_endpoint: string;
|
350
|
-
request_object_signing_alg_values_supported: string[];
|
351
349
|
client_registration_types_supported: string[];
|
352
350
|
code_challenge_methods_supported: string[];
|
353
351
|
acr_values_supported: string[];
|
@@ -357,15 +355,8 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
357
355
|
response_modes_supported: string[];
|
358
356
|
token_endpoint_auth_methods_supported: string[];
|
359
357
|
token_endpoint_auth_signing_alg_values_supported: string[];
|
360
|
-
dpop_signing_alg_values_supported?: string[] | undefined;
|
361
|
-
introspection_endpoint?: string | undefined;
|
362
|
-
authorization_details_types_supported?: string[] | undefined;
|
363
|
-
request_parameter_supported?: boolean | undefined;
|
364
|
-
request_uri_parameter_supported?: boolean | undefined;
|
365
|
-
response_types_supported?: string[] | undefined;
|
366
|
-
subject_types_supported?: string[] | undefined;
|
367
358
|
};
|
368
|
-
|
359
|
+
openid_credential_verifier?: {
|
369
360
|
jwks: {
|
370
361
|
keys: {
|
371
362
|
kty: "RSA" | "EC";
|
@@ -433,19 +424,20 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
|
|
433
424
|
count?: number | undefined;
|
434
425
|
}[] | undefined;
|
435
426
|
} | undefined;
|
436
|
-
|
427
|
+
request_uris?: string[] | undefined;
|
428
|
+
authorization_signed_response_alg?: string | undefined;
|
429
|
+
authorization_encrypted_response_alg?: string | undefined;
|
430
|
+
authorization_encrypted_response_enc?: string | undefined;
|
437
431
|
} | undefined;
|
438
432
|
};
|
439
433
|
};
|
440
434
|
}>;
|
441
435
|
export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
442
|
-
header: {
|
443
|
-
alg: string;
|
444
|
-
kid: string;
|
445
|
-
typ: "entity-statement+jwt";
|
446
|
-
};
|
447
436
|
payload: {
|
448
437
|
iss: string;
|
438
|
+
sub: string;
|
439
|
+
iat: number;
|
440
|
+
exp: number;
|
449
441
|
jwks: {
|
450
442
|
keys: {
|
451
443
|
kty: "RSA" | "EC";
|
@@ -472,9 +464,6 @@ export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Paramete
|
|
472
464
|
x5u?: string | undefined;
|
473
465
|
}[];
|
474
466
|
};
|
475
|
-
iat: number;
|
476
|
-
exp: number;
|
477
|
-
sub: string;
|
478
467
|
metadata: {
|
479
468
|
federation_entity: {
|
480
469
|
federation_fetch_endpoint?: string | undefined;
|
@@ -482,6 +471,9 @@ export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Paramete
|
|
482
471
|
federation_resolve_endpoint?: string | undefined;
|
483
472
|
federation_trust_mark_status_endpoint?: string | undefined;
|
484
473
|
federation_trust_mark_list_endpoint?: string | undefined;
|
474
|
+
federation_trust_mark_endpoint?: string | undefined;
|
475
|
+
federation_historical_keys_endpoint?: string | undefined;
|
476
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
485
477
|
organization_name?: string | undefined;
|
486
478
|
homepage_uri?: string | undefined;
|
487
479
|
policy_uri?: string | undefined;
|
@@ -497,15 +489,18 @@ export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Paramete
|
|
497
489
|
} & {
|
498
490
|
[k: string]: unknown;
|
499
491
|
};
|
500
|
-
}>;
|
501
|
-
export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
502
492
|
header: {
|
503
493
|
alg: string;
|
504
494
|
kid: string;
|
505
495
|
typ: "entity-statement+jwt";
|
506
496
|
};
|
497
|
+
}>;
|
498
|
+
export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
507
499
|
payload: {
|
508
500
|
iss: string;
|
501
|
+
sub: string;
|
502
|
+
iat: number;
|
503
|
+
exp: number;
|
509
504
|
jwks: {
|
510
505
|
keys: {
|
511
506
|
kty: "RSA" | "EC";
|
@@ -532,9 +527,6 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
|
|
532
527
|
x5u?: string | undefined;
|
533
528
|
}[];
|
534
529
|
};
|
535
|
-
iat: number;
|
536
|
-
exp: number;
|
537
|
-
sub: string;
|
538
530
|
metadata: {
|
539
531
|
federation_entity: {
|
540
532
|
federation_fetch_endpoint?: string | undefined;
|
@@ -542,6 +534,9 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
|
|
542
534
|
federation_resolve_endpoint?: string | undefined;
|
543
535
|
federation_trust_mark_status_endpoint?: string | undefined;
|
544
536
|
federation_trust_mark_list_endpoint?: string | undefined;
|
537
|
+
federation_trust_mark_endpoint?: string | undefined;
|
538
|
+
federation_historical_keys_endpoint?: string | undefined;
|
539
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
545
540
|
organization_name?: string | undefined;
|
546
541
|
homepage_uri?: string | undefined;
|
547
542
|
policy_uri?: string | undefined;
|
@@ -557,10 +552,15 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
|
|
557
552
|
} & {
|
558
553
|
[k: string]: unknown;
|
559
554
|
};
|
555
|
+
header: {
|
556
|
+
alg: string;
|
557
|
+
kid: string;
|
558
|
+
typ: "entity-statement+jwt";
|
559
|
+
};
|
560
560
|
} & {
|
561
561
|
payload: {
|
562
562
|
metadata: {
|
563
|
-
|
563
|
+
openid_credential_verifier: {
|
564
564
|
jwks: {
|
565
565
|
keys: {
|
566
566
|
kty: "RSA" | "EC";
|
@@ -628,19 +628,20 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
|
|
628
628
|
count?: number | undefined;
|
629
629
|
}[] | undefined;
|
630
630
|
} | undefined;
|
631
|
-
|
631
|
+
request_uris?: string[] | undefined;
|
632
|
+
authorization_signed_response_alg?: string | undefined;
|
633
|
+
authorization_encrypted_response_alg?: string | undefined;
|
634
|
+
authorization_encrypted_response_enc?: string | undefined;
|
632
635
|
};
|
633
636
|
};
|
634
637
|
};
|
635
638
|
}>;
|
636
639
|
export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
|
637
|
-
header: {
|
638
|
-
alg: string;
|
639
|
-
kid: string;
|
640
|
-
typ: "entity-statement+jwt";
|
641
|
-
};
|
642
640
|
payload: {
|
643
641
|
iss: string;
|
642
|
+
sub: string;
|
643
|
+
iat: number;
|
644
|
+
exp: number;
|
644
645
|
jwks: {
|
645
646
|
keys: {
|
646
647
|
kty: "RSA" | "EC";
|
@@ -667,9 +668,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
667
668
|
x5u?: string | undefined;
|
668
669
|
}[];
|
669
670
|
};
|
670
|
-
iat: number;
|
671
|
-
exp: number;
|
672
|
-
sub: string;
|
673
671
|
metadata: {
|
674
672
|
federation_entity: {
|
675
673
|
federation_fetch_endpoint?: string | undefined;
|
@@ -677,6 +675,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
677
675
|
federation_resolve_endpoint?: string | undefined;
|
678
676
|
federation_trust_mark_status_endpoint?: string | undefined;
|
679
677
|
federation_trust_mark_list_endpoint?: string | undefined;
|
678
|
+
federation_trust_mark_endpoint?: string | undefined;
|
679
|
+
federation_historical_keys_endpoint?: string | undefined;
|
680
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
680
681
|
organization_name?: string | undefined;
|
681
682
|
homepage_uri?: string | undefined;
|
682
683
|
policy_uri?: string | undefined;
|
@@ -692,14 +693,17 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
692
693
|
} & {
|
693
694
|
[k: string]: unknown;
|
694
695
|
};
|
695
|
-
} | ({
|
696
696
|
header: {
|
697
697
|
alg: string;
|
698
698
|
kid: string;
|
699
699
|
typ: "entity-statement+jwt";
|
700
700
|
};
|
701
|
+
} | ({
|
701
702
|
payload: {
|
702
703
|
iss: string;
|
704
|
+
sub: string;
|
705
|
+
iat: number;
|
706
|
+
exp: number;
|
703
707
|
jwks: {
|
704
708
|
keys: {
|
705
709
|
kty: "RSA" | "EC";
|
@@ -726,9 +730,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
726
730
|
x5u?: string | undefined;
|
727
731
|
}[];
|
728
732
|
};
|
729
|
-
iat: number;
|
730
|
-
exp: number;
|
731
|
-
sub: string;
|
732
733
|
metadata: {
|
733
734
|
federation_entity: {
|
734
735
|
federation_fetch_endpoint?: string | undefined;
|
@@ -736,6 +737,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
736
737
|
federation_resolve_endpoint?: string | undefined;
|
737
738
|
federation_trust_mark_status_endpoint?: string | undefined;
|
738
739
|
federation_trust_mark_list_endpoint?: string | undefined;
|
740
|
+
federation_trust_mark_endpoint?: string | undefined;
|
741
|
+
federation_historical_keys_endpoint?: string | undefined;
|
742
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
739
743
|
organization_name?: string | undefined;
|
740
744
|
homepage_uri?: string | undefined;
|
741
745
|
policy_uri?: string | undefined;
|
@@ -751,6 +755,11 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
751
755
|
} & {
|
752
756
|
[k: string]: unknown;
|
753
757
|
};
|
758
|
+
header: {
|
759
|
+
alg: string;
|
760
|
+
kid: string;
|
761
|
+
typ: "entity-statement+jwt";
|
762
|
+
};
|
754
763
|
} & {
|
755
764
|
payload: {
|
756
765
|
jwks: {
|
@@ -781,45 +790,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
781
790
|
};
|
782
791
|
metadata: {
|
783
792
|
openid_credential_issuer: {
|
784
|
-
display: {
|
785
|
-
name: string;
|
786
|
-
locale: string;
|
787
|
-
logo?: {
|
788
|
-
url: string;
|
789
|
-
alt_text: string;
|
790
|
-
} | undefined;
|
791
|
-
}[];
|
792
|
-
credential_configurations_supported: Record<string, {
|
793
|
-
display: {
|
794
|
-
name: string;
|
795
|
-
locale: string;
|
796
|
-
logo?: {
|
797
|
-
url: string;
|
798
|
-
alt_text: string;
|
799
|
-
} | undefined;
|
800
|
-
background_color?: string | undefined;
|
801
|
-
text_color?: string | undefined;
|
802
|
-
}[];
|
803
|
-
scope: string;
|
804
|
-
cryptographic_binding_methods_supported: string[];
|
805
|
-
format: "vc+sd-jwt" | "mso_mdoc";
|
806
|
-
credential_signing_alg_values_supported: string[];
|
807
|
-
claims?: Record<string, {
|
808
|
-
display: {
|
809
|
-
name: string;
|
810
|
-
locale: string;
|
811
|
-
}[];
|
812
|
-
value_type: string;
|
813
|
-
}> | undefined;
|
814
|
-
authentic_source?: string | undefined;
|
815
|
-
issuance_errors_supported?: Record<string, {
|
816
|
-
display: {
|
817
|
-
title: string;
|
818
|
-
locale: string;
|
819
|
-
description: string;
|
820
|
-
}[];
|
821
|
-
}> | undefined;
|
822
|
-
}>;
|
823
793
|
jwks: {
|
824
794
|
keys: {
|
825
795
|
kty: "RSA" | "EC";
|
@@ -846,13 +816,42 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
846
816
|
x5u?: string | undefined;
|
847
817
|
}[];
|
848
818
|
};
|
819
|
+
display: {
|
820
|
+
name: string;
|
821
|
+
locale: string;
|
822
|
+
}[];
|
849
823
|
credential_issuer: string;
|
850
824
|
credential_endpoint: string;
|
851
825
|
revocation_endpoint: string;
|
852
826
|
status_attestation_endpoint: string;
|
827
|
+
credential_configurations_supported: Record<string, {
|
828
|
+
format: "vc+sd-jwt" | "vc+mdoc-cbor";
|
829
|
+
scope: string;
|
830
|
+
display: {
|
831
|
+
name: string;
|
832
|
+
locale: string;
|
833
|
+
}[];
|
834
|
+
claims: Record<string, {
|
835
|
+
value_type: string;
|
836
|
+
display: {
|
837
|
+
name: string;
|
838
|
+
locale: string;
|
839
|
+
}[];
|
840
|
+
}>;
|
841
|
+
cryptographic_binding_methods_supported: string[];
|
842
|
+
credential_signing_alg_values_supported: string[];
|
843
|
+
authentic_source?: string | undefined;
|
844
|
+
issuance_errors_supported?: Record<string, {
|
845
|
+
display: {
|
846
|
+
locale: string;
|
847
|
+
title: string;
|
848
|
+
description: string;
|
849
|
+
}[];
|
850
|
+
}> | undefined;
|
851
|
+
}>;
|
853
852
|
};
|
854
853
|
oauth_authorization_server: {
|
855
|
-
|
854
|
+
request_object_signing_alg_values_supported: string[];
|
856
855
|
jwks: {
|
857
856
|
keys: {
|
858
857
|
kty: "RSA" | "EC";
|
@@ -880,8 +879,8 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
880
879
|
}[];
|
881
880
|
};
|
882
881
|
authorization_endpoint: string;
|
882
|
+
pushed_authorization_request_endpoint: string;
|
883
883
|
token_endpoint: string;
|
884
|
-
request_object_signing_alg_values_supported: string[];
|
885
884
|
client_registration_types_supported: string[];
|
886
885
|
code_challenge_methods_supported: string[];
|
887
886
|
acr_values_supported: string[];
|
@@ -891,15 +890,8 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
891
890
|
response_modes_supported: string[];
|
892
891
|
token_endpoint_auth_methods_supported: string[];
|
893
892
|
token_endpoint_auth_signing_alg_values_supported: string[];
|
894
|
-
dpop_signing_alg_values_supported?: string[] | undefined;
|
895
|
-
introspection_endpoint?: string | undefined;
|
896
|
-
authorization_details_types_supported?: string[] | undefined;
|
897
|
-
request_parameter_supported?: boolean | undefined;
|
898
|
-
request_uri_parameter_supported?: boolean | undefined;
|
899
|
-
response_types_supported?: string[] | undefined;
|
900
|
-
subject_types_supported?: string[] | undefined;
|
901
893
|
};
|
902
|
-
|
894
|
+
openid_credential_verifier?: {
|
903
895
|
jwks: {
|
904
896
|
keys: {
|
905
897
|
kty: "RSA" | "EC";
|
@@ -967,18 +959,19 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
967
959
|
count?: number | undefined;
|
968
960
|
}[] | undefined;
|
969
961
|
} | undefined;
|
970
|
-
|
962
|
+
request_uris?: string[] | undefined;
|
963
|
+
authorization_signed_response_alg?: string | undefined;
|
964
|
+
authorization_encrypted_response_alg?: string | undefined;
|
965
|
+
authorization_encrypted_response_enc?: string | undefined;
|
971
966
|
} | undefined;
|
972
967
|
};
|
973
968
|
};
|
974
969
|
}) | ({
|
975
|
-
header: {
|
976
|
-
alg: string;
|
977
|
-
kid: string;
|
978
|
-
typ: "entity-statement+jwt";
|
979
|
-
};
|
980
970
|
payload: {
|
981
971
|
iss: string;
|
972
|
+
sub: string;
|
973
|
+
iat: number;
|
974
|
+
exp: number;
|
982
975
|
jwks: {
|
983
976
|
keys: {
|
984
977
|
kty: "RSA" | "EC";
|
@@ -1005,9 +998,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1005
998
|
x5u?: string | undefined;
|
1006
999
|
}[];
|
1007
1000
|
};
|
1008
|
-
iat: number;
|
1009
|
-
exp: number;
|
1010
|
-
sub: string;
|
1011
1001
|
metadata: {
|
1012
1002
|
federation_entity: {
|
1013
1003
|
federation_fetch_endpoint?: string | undefined;
|
@@ -1015,6 +1005,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1015
1005
|
federation_resolve_endpoint?: string | undefined;
|
1016
1006
|
federation_trust_mark_status_endpoint?: string | undefined;
|
1017
1007
|
federation_trust_mark_list_endpoint?: string | undefined;
|
1008
|
+
federation_trust_mark_endpoint?: string | undefined;
|
1009
|
+
federation_historical_keys_endpoint?: string | undefined;
|
1010
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
1018
1011
|
organization_name?: string | undefined;
|
1019
1012
|
homepage_uri?: string | undefined;
|
1020
1013
|
policy_uri?: string | undefined;
|
@@ -1030,10 +1023,15 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1030
1023
|
} & {
|
1031
1024
|
[k: string]: unknown;
|
1032
1025
|
};
|
1026
|
+
header: {
|
1027
|
+
alg: string;
|
1028
|
+
kid: string;
|
1029
|
+
typ: "entity-statement+jwt";
|
1030
|
+
};
|
1033
1031
|
} & {
|
1034
1032
|
payload: {
|
1035
1033
|
metadata: {
|
1036
|
-
|
1034
|
+
openid_credential_verifier: {
|
1037
1035
|
jwks: {
|
1038
1036
|
keys: {
|
1039
1037
|
kty: "RSA" | "EC";
|
@@ -1101,18 +1099,19 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1101
1099
|
count?: number | undefined;
|
1102
1100
|
}[] | undefined;
|
1103
1101
|
} | undefined;
|
1104
|
-
|
1102
|
+
request_uris?: string[] | undefined;
|
1103
|
+
authorization_signed_response_alg?: string | undefined;
|
1104
|
+
authorization_encrypted_response_alg?: string | undefined;
|
1105
|
+
authorization_encrypted_response_enc?: string | undefined;
|
1105
1106
|
};
|
1106
1107
|
};
|
1107
1108
|
};
|
1108
1109
|
}) | ({
|
1109
|
-
header: {
|
1110
|
-
alg: string;
|
1111
|
-
kid: string;
|
1112
|
-
typ: "entity-statement+jwt";
|
1113
|
-
};
|
1114
1110
|
payload: {
|
1115
1111
|
iss: string;
|
1112
|
+
sub: string;
|
1113
|
+
iat: number;
|
1114
|
+
exp: number;
|
1116
1115
|
jwks: {
|
1117
1116
|
keys: {
|
1118
1117
|
kty: "RSA" | "EC";
|
@@ -1139,9 +1138,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1139
1138
|
x5u?: string | undefined;
|
1140
1139
|
}[];
|
1141
1140
|
};
|
1142
|
-
iat: number;
|
1143
|
-
exp: number;
|
1144
|
-
sub: string;
|
1145
1141
|
metadata: {
|
1146
1142
|
federation_entity: {
|
1147
1143
|
federation_fetch_endpoint?: string | undefined;
|
@@ -1149,6 +1145,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1149
1145
|
federation_resolve_endpoint?: string | undefined;
|
1150
1146
|
federation_trust_mark_status_endpoint?: string | undefined;
|
1151
1147
|
federation_trust_mark_list_endpoint?: string | undefined;
|
1148
|
+
federation_trust_mark_endpoint?: string | undefined;
|
1149
|
+
federation_historical_keys_endpoint?: string | undefined;
|
1150
|
+
endpoint_auth_signing_alg_values_supported?: string | undefined;
|
1152
1151
|
organization_name?: string | undefined;
|
1153
1152
|
homepage_uri?: string | undefined;
|
1154
1153
|
policy_uri?: string | undefined;
|
@@ -1164,6 +1163,11 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1164
1163
|
} & {
|
1165
1164
|
[k: string]: unknown;
|
1166
1165
|
};
|
1166
|
+
header: {
|
1167
|
+
alg: string;
|
1168
|
+
kid: string;
|
1169
|
+
typ: "entity-statement+jwt";
|
1170
|
+
};
|
1167
1171
|
} & {
|
1168
1172
|
payload: {
|
1169
1173
|
metadata: {
|
@@ -1208,23 +1212,20 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
|
|
1208
1212
|
/**
|
1209
1213
|
* Fetch and parse the entity statement document for a given federation entity.
|
1210
1214
|
*
|
1211
|
-
* @param accreditationBodyBaseUrl The base url of the
|
1215
|
+
* @param accreditationBodyBaseUrl The base url of the accreditation body which holds and signs the required entity statement
|
1212
1216
|
* @param subordinatedEntityBaseUrl The url that identifies the subordinate entity
|
1213
|
-
* @param
|
1217
|
+
* @param appFetch An optional instance of the http client to be used.
|
1214
1218
|
* @returns The parsed entity configuration object
|
1215
1219
|
* @throws {IoWalletError} If the http request fails
|
1216
|
-
* @throws Parse error if the document is not in the expected shape.
|
1217
1220
|
*/
|
1218
1221
|
export declare function getEntityStatement(accreditationBodyBaseUrl: string, subordinatedEntityBaseUrl: string, { appFetch, }?: {
|
1219
1222
|
appFetch?: GlobalFetch["fetch"];
|
1220
1223
|
}): Promise<{
|
1221
|
-
header: {
|
1222
|
-
alg: string;
|
1223
|
-
kid: string;
|
1224
|
-
typ: "entity-statement+jwt";
|
1225
|
-
};
|
1226
1224
|
payload: {
|
1227
1225
|
iss: string;
|
1226
|
+
sub: string;
|
1227
|
+
iat: number;
|
1228
|
+
exp: number;
|
1228
1229
|
jwks: {
|
1229
1230
|
keys: {
|
1230
1231
|
kty: "RSA" | "EC";
|
@@ -1251,25 +1252,49 @@ export declare function getEntityStatement(accreditationBodyBaseUrl: string, sub
|
|
1251
1252
|
x5u?: string | undefined;
|
1252
1253
|
}[];
|
1253
1254
|
};
|
1254
|
-
|
1255
|
-
exp: number;
|
1256
|
-
sub: string;
|
1257
|
-
trust_marks: {
|
1255
|
+
trust_marks?: {
|
1258
1256
|
id: string;
|
1259
1257
|
trust_mark: string;
|
1260
|
-
}[];
|
1258
|
+
}[] | undefined;
|
1259
|
+
};
|
1260
|
+
header: {
|
1261
|
+
alg: string;
|
1262
|
+
kid: string;
|
1263
|
+
typ: "entity-statement+jwt";
|
1261
1264
|
};
|
1262
1265
|
}>;
|
1263
1266
|
/**
|
1264
1267
|
* Fetch the entity statement document for a given federation entity.
|
1265
1268
|
*
|
1266
|
-
* @param
|
1267
|
-
* @param subordinatedEntityBaseUrl The url that identifies the subordinate entity
|
1268
|
-
* @param
|
1269
|
-
* @returns The signed entity statement token
|
1270
|
-
* @throws {IoWalletError} If the http request fails
|
1269
|
+
* @param federationFetchEndpoint The exact endpoint provided by the parent EC's metadata.
|
1270
|
+
* @param subordinatedEntityBaseUrl The url that identifies the subordinate entity.
|
1271
|
+
* @param appFetch An optional instance of the http client to be used.
|
1272
|
+
* @returns The signed entity statement token.
|
1273
|
+
* @throws {IoWalletError} If the http request fails.
|
1271
1274
|
*/
|
1272
|
-
export declare function getSignedEntityStatement(
|
1275
|
+
export declare function getSignedEntityStatement(federationFetchEndpoint: string, subordinatedEntityBaseUrl: string, { appFetch, }?: {
|
1273
1276
|
appFetch?: GlobalFetch["fetch"];
|
1274
1277
|
}): Promise<string>;
|
1278
|
+
/**
|
1279
|
+
* Fetch the federation list document from a given endpoint.
|
1280
|
+
*
|
1281
|
+
* @param federationListEndpoint The URL of the federation list endpoint.
|
1282
|
+
* @param appFetch An optional instance of the http client to be used.
|
1283
|
+
* @returns The federation list as an array of strings.
|
1284
|
+
* @throws {IoWalletError} If the HTTP request fails.
|
1285
|
+
* @throws {FederationError} If the result is not in the expected format.
|
1286
|
+
*/
|
1287
|
+
export declare function getFederationList(federationListEndpoint: string, { appFetch, }?: {
|
1288
|
+
appFetch?: GlobalFetch["fetch"];
|
1289
|
+
}): Promise<string[]>;
|
1290
|
+
/**
|
1291
|
+
* Build a not-verified trust chain for a given Relying Party (RP) entity.
|
1292
|
+
*
|
1293
|
+
* @param relyingPartyEntityBaseUrl The base URL of the RP entity
|
1294
|
+
* @param trustAnchorKey The public key of the Trust Anchor (TA) entity
|
1295
|
+
* @param appFetch An optional instance of the http client to be used.
|
1296
|
+
* @returns A list of signed tokens that represent the trust chain, in the order of the chain (from the RP to the Trust Anchor)
|
1297
|
+
* @throws {FederationError} When an element of the chain fails to parse or other build steps fail.
|
1298
|
+
*/
|
1299
|
+
export declare function buildTrustChain(relyingPartyEntityBaseUrl: string, trustAnchorKey: JWK, appFetch?: GlobalFetch["fetch"]): Promise<string[]>;
|
1275
1300
|
//# sourceMappingURL=index.d.ts.map
|