@@ -30,54 +30,58 @@ export const zCredentialConfigurationSupportedCommonCredentialMetadata = z.objec
3030 display : z . array ( zCredentialConfigurationSupportedDisplayEntry ) . optional ( ) ,
3131} )
3232
33- export const zCredentialConfigurationSupportedCommon = z . object ( {
34- format : z . string ( ) ,
35- scope : z . string ( ) . optional ( ) ,
36- cryptographic_binding_methods_supported : z . array ( z . string ( ) ) . optional ( ) ,
37- credential_signing_alg_values_supported : z . array ( z . string ( ) ) . or ( z . array ( z . number ( ) ) ) . optional ( ) ,
38- proof_types_supported : z
39- . record (
40- z . union ( [ z . literal ( 'jwt' ) , z . literal ( 'attestation' ) , z . string ( ) ] ) ,
41- z . object ( {
42- proof_signing_alg_values_supported : z . array ( z . string ( ) ) ,
43- key_attestations_required : z
44- . object ( {
45- key_storage : zIso18045OrStringArray . optional ( ) ,
46- user_authentication : zIso18045OrStringArray . optional ( ) ,
47- } )
48- . passthrough ( )
49- . optional ( ) ,
50- } )
51- )
52- . optional ( ) ,
53- credential_metadata : zCredentialConfigurationSupportedCommonCredentialMetadata . optional ( ) ,
33+ export const zCredentialConfigurationSupportedCommon = z
34+ . object ( {
35+ format : z . string ( ) ,
36+ scope : z . string ( ) . optional ( ) ,
37+ cryptographic_binding_methods_supported : z . array ( z . string ( ) ) . optional ( ) ,
38+ credential_signing_alg_values_supported : z . array ( z . string ( ) ) . or ( z . array ( z . number ( ) ) ) . optional ( ) ,
39+ proof_types_supported : z
40+ . record (
41+ z . union ( [ z . literal ( 'jwt' ) , z . literal ( 'attestation' ) , z . string ( ) ] ) ,
42+ z . object ( {
43+ proof_signing_alg_values_supported : z . array ( z . string ( ) ) ,
44+ key_attestations_required : z
45+ . object ( {
46+ key_storage : zIso18045OrStringArray . optional ( ) ,
47+ user_authentication : zIso18045OrStringArray . optional ( ) ,
48+ } )
49+ . passthrough ( )
50+ . optional ( ) ,
51+ } )
52+ )
53+ . optional ( ) ,
54+ credential_metadata : zCredentialConfigurationSupportedCommonCredentialMetadata . optional ( ) ,
5455
55- // For typing purposes. Can be removed once we drop support for draft <= 15.
56- claims : z . optional ( z . never ( ) ) ,
57- } )
56+ // For typing purposes. Can be removed once we drop support for draft <= 15.
57+ claims : z . optional ( z . never ( ) ) ,
58+ } )
59+ . passthrough ( )
5860
59- export const zCredentialConfigurationSupportedCommonDraft15 = z . object ( {
60- format : z . string ( ) ,
61- scope : z . string ( ) . optional ( ) ,
62- cryptographic_binding_methods_supported : z . array ( z . string ( ) ) . optional ( ) ,
63- credential_signing_alg_values_supported : z . array ( z . string ( ) ) . or ( z . array ( z . number ( ) ) ) . optional ( ) ,
64- proof_types_supported : z
65- . record (
66- z . union ( [ z . literal ( 'jwt' ) , z . literal ( 'attestation' ) , z . string ( ) ] ) ,
67- z . object ( {
68- proof_signing_alg_values_supported : z . array ( z . string ( ) ) ,
69- key_attestations_required : z
70- . object ( {
71- key_storage : zIso18045OrStringArray . optional ( ) ,
72- user_authentication : zIso18045OrStringArray . optional ( ) ,
73- } )
74- . passthrough ( )
75- . optional ( ) ,
76- } )
77- )
78- . optional ( ) ,
79- display : z . array ( zCredentialConfigurationSupportedDisplayEntry ) . optional ( ) ,
61+ export const zCredentialConfigurationSupportedCommonDraft15 = z
62+ . object ( {
63+ format : z . string ( ) ,
64+ scope : z . string ( ) . optional ( ) ,
65+ cryptographic_binding_methods_supported : z . array ( z . string ( ) ) . optional ( ) ,
66+ credential_signing_alg_values_supported : z . array ( z . string ( ) ) . or ( z . array ( z . number ( ) ) ) . optional ( ) ,
67+ proof_types_supported : z
68+ . record (
69+ z . union ( [ z . literal ( 'jwt' ) , z . literal ( 'attestation' ) , z . string ( ) ] ) ,
70+ z . object ( {
71+ proof_signing_alg_values_supported : z . array ( z . string ( ) ) ,
72+ key_attestations_required : z
73+ . object ( {
74+ key_storage : zIso18045OrStringArray . optional ( ) ,
75+ user_authentication : zIso18045OrStringArray . optional ( ) ,
76+ } )
77+ . passthrough ( )
78+ . optional ( ) ,
79+ } )
80+ )
81+ . optional ( ) ,
82+ display : z . array ( zCredentialConfigurationSupportedDisplayEntry ) . optional ( ) ,
8083
81- // For typing purposes.
82- credential_metadata : z . optional ( z . never ( ) ) ,
83- } )
84+ // For typing purposes.
85+ credential_metadata : z . optional ( z . never ( ) ) ,
86+ } )
87+ . passthrough ( )
0 commit comments