@fireproof/core-types-base 0.23.11 → 0.23.14-dev-preview03
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/device-id-keybag-item.zod.d.ts +417 -0
- package/device-id-keybag-item.zod.js +16 -0
- package/device-id-keybag-item.zod.js.map +1 -0
- package/device-id.d.ts +15 -0
- package/device-id.js +2 -0
- package/device-id.js.map +1 -0
- package/fp-ca-cert-payload.zod.d.ts +339 -0
- package/fp-ca-cert-payload.zod.js +53 -0
- package/fp-ca-cert-payload.zod.js.map +1 -0
- package/fp-device-id-payload.zod.d.ts +191 -0
- package/fp-device-id-payload.zod.js +90 -0
- package/fp-device-id-payload.zod.js.map +1 -0
- package/index.d.ts +8 -0
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/jwk-private.zod.d.ts +64 -0
- package/jwk-private.zod.js +46 -0
- package/jwk-private.zod.js.map +1 -0
- package/jwk-public.zod.d.ts +54 -0
- package/jwk-public.zod.js +38 -0
- package/jwk-public.zod.js.map +1 -0
- package/jwt-payload.zod.d.ts +21 -0
- package/jwt-payload.zod.js +12 -0
- package/jwt-payload.zod.js.map +1 -0
- package/key-bag-if.d.ts +22 -3
- package/keybag-storage.zod.d.ts +819 -0
- package/keybag-storage.zod.js +47 -0
- package/keybag-storage.zod.js.map +1 -0
- package/package.json +7 -5
- package/types.d.ts +41 -42
- package/types.js.map +1 -1
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CertJWTPayloadSchema: z.ZodReadonly<z.ZodObject<{
|
|
3
|
+
certificateJWT: z.ZodString;
|
|
4
|
+
certificatePayload: z.ZodReadonly<z.ZodObject<{
|
|
5
|
+
iss: z.ZodString;
|
|
6
|
+
sub: z.ZodString;
|
|
7
|
+
aud: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
8
|
+
iat: z.ZodNumber;
|
|
9
|
+
nbf: z.ZodNumber;
|
|
10
|
+
exp: z.ZodNumber;
|
|
11
|
+
jti: z.ZodString;
|
|
12
|
+
certificate: z.ZodObject<{
|
|
13
|
+
version: z.ZodLiteral<"3">;
|
|
14
|
+
serialNumber: z.ZodString;
|
|
15
|
+
subject: z.ZodObject<{
|
|
16
|
+
commonName: z.ZodString;
|
|
17
|
+
countryName: z.ZodOptional<z.ZodString>;
|
|
18
|
+
stateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
19
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
20
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
21
|
+
organizationalUnitName: z.ZodOptional<z.ZodString>;
|
|
22
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
23
|
+
serialNumber: z.ZodOptional<z.ZodString>;
|
|
24
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
25
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
26
|
+
businessCategory: z.ZodOptional<z.ZodString>;
|
|
27
|
+
jurisdictionCountryName: z.ZodOptional<z.ZodString>;
|
|
28
|
+
jurisdictionStateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
29
|
+
jurisdictionLocalityName: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
issuer: z.ZodObject<{
|
|
32
|
+
commonName: z.ZodString;
|
|
33
|
+
countryName: z.ZodOptional<z.ZodString>;
|
|
34
|
+
stateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
35
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
36
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
37
|
+
organizationalUnitName: z.ZodOptional<z.ZodString>;
|
|
38
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
39
|
+
serialNumber: z.ZodOptional<z.ZodString>;
|
|
40
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
41
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
42
|
+
businessCategory: z.ZodOptional<z.ZodString>;
|
|
43
|
+
jurisdictionCountryName: z.ZodOptional<z.ZodString>;
|
|
44
|
+
jurisdictionStateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
45
|
+
jurisdictionLocalityName: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
validity: z.ZodObject<{
|
|
48
|
+
notBefore: z.ZodString;
|
|
49
|
+
notAfter: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
subjectPublicKeyInfo: z.ZodIntersection<z.ZodObject<{
|
|
52
|
+
kty: z.ZodEnum<{
|
|
53
|
+
EC: "EC";
|
|
54
|
+
OKP: "OKP";
|
|
55
|
+
RSA: "RSA";
|
|
56
|
+
}>;
|
|
57
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
enc: "enc";
|
|
59
|
+
sig: "sig";
|
|
60
|
+
}>>;
|
|
61
|
+
key_ops: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
62
|
+
decrypt: "decrypt";
|
|
63
|
+
deriveBits: "deriveBits";
|
|
64
|
+
deriveKey: "deriveKey";
|
|
65
|
+
encrypt: "encrypt";
|
|
66
|
+
sign: "sign";
|
|
67
|
+
unwrapKey: "unwrapKey";
|
|
68
|
+
verify: "verify";
|
|
69
|
+
wrapKey: "wrapKey";
|
|
70
|
+
}>>>;
|
|
71
|
+
alg: z.ZodOptional<z.ZodString>;
|
|
72
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
73
|
+
x5u: z.ZodOptional<z.ZodString>;
|
|
74
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
76
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
78
|
+
kty: z.ZodLiteral<"RSA">;
|
|
79
|
+
n: z.ZodString;
|
|
80
|
+
e: z.ZodString;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
kty: z.ZodLiteral<"EC">;
|
|
83
|
+
crv: z.ZodEnum<{
|
|
84
|
+
"P-256": "P-256";
|
|
85
|
+
"P-384": "P-384";
|
|
86
|
+
"P-521": "P-521";
|
|
87
|
+
}>;
|
|
88
|
+
x: z.ZodString;
|
|
89
|
+
y: z.ZodString;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
kty: z.ZodLiteral<"oct">;
|
|
92
|
+
k: z.ZodString;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
kty: z.ZodLiteral<"OKP">;
|
|
95
|
+
crv: z.ZodEnum<{
|
|
96
|
+
Ed25519: "Ed25519";
|
|
97
|
+
Ed448: "Ed448";
|
|
98
|
+
X25519: "X25519";
|
|
99
|
+
X448: "X448";
|
|
100
|
+
}>;
|
|
101
|
+
x: z.ZodString;
|
|
102
|
+
}, z.core.$strip>], "kty">>;
|
|
103
|
+
signatureAlgorithm: z.ZodLiteral<"ES256">;
|
|
104
|
+
keyUsage: z.ZodArray<z.ZodEnum<{
|
|
105
|
+
cRLSign: "cRLSign";
|
|
106
|
+
dataEncipherment: "dataEncipherment";
|
|
107
|
+
decipherOnly: "decipherOnly";
|
|
108
|
+
digitalSignature: "digitalSignature";
|
|
109
|
+
encipherOnly: "encipherOnly";
|
|
110
|
+
keyAgreement: "keyAgreement";
|
|
111
|
+
keyCertSign: "keyCertSign";
|
|
112
|
+
keyEncipherment: "keyEncipherment";
|
|
113
|
+
nonRepudiation: "nonRepudiation";
|
|
114
|
+
}>>;
|
|
115
|
+
extendedKeyUsage: z.ZodArray<z.ZodEnum<{
|
|
116
|
+
OCSPSigning: "OCSPSigning";
|
|
117
|
+
clientAuth: "clientAuth";
|
|
118
|
+
codeSigning: "codeSigning";
|
|
119
|
+
emailProtection: "emailProtection";
|
|
120
|
+
ipsecIKE: "ipsecIKE";
|
|
121
|
+
msCTLSign: "msCTLSign";
|
|
122
|
+
msCodeCom: "msCodeCom";
|
|
123
|
+
msCodeInd: "msCodeInd";
|
|
124
|
+
msEFS: "msEFS";
|
|
125
|
+
serverAuth: "serverAuth";
|
|
126
|
+
timeStamping: "timeStamping";
|
|
127
|
+
}>>;
|
|
128
|
+
extensions: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
subjectAltName: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
keyUsage: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
131
|
+
cRLSign: "cRLSign";
|
|
132
|
+
dataEncipherment: "dataEncipherment";
|
|
133
|
+
decipherOnly: "decipherOnly";
|
|
134
|
+
digitalSignature: "digitalSignature";
|
|
135
|
+
encipherOnly: "encipherOnly";
|
|
136
|
+
keyAgreement: "keyAgreement";
|
|
137
|
+
keyCertSign: "keyCertSign";
|
|
138
|
+
keyEncipherment: "keyEncipherment";
|
|
139
|
+
nonRepudiation: "nonRepudiation";
|
|
140
|
+
}>>>;
|
|
141
|
+
extendedKeyUsage: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
142
|
+
OCSPSigning: "OCSPSigning";
|
|
143
|
+
clientAuth: "clientAuth";
|
|
144
|
+
codeSigning: "codeSigning";
|
|
145
|
+
emailProtection: "emailProtection";
|
|
146
|
+
ipsecIKE: "ipsecIKE";
|
|
147
|
+
msCTLSign: "msCTLSign";
|
|
148
|
+
msCodeCom: "msCodeCom";
|
|
149
|
+
msCodeInd: "msCodeInd";
|
|
150
|
+
msEFS: "msEFS";
|
|
151
|
+
serverAuth: "serverAuth";
|
|
152
|
+
timeStamping: "timeStamping";
|
|
153
|
+
}>>>;
|
|
154
|
+
basicConstraints: z.ZodOptional<z.ZodObject<{
|
|
155
|
+
cA: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
pathLenConstraint: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
authorityKeyIdentifier: z.ZodOptional<z.ZodString>;
|
|
159
|
+
subjectKeyIdentifier: z.ZodOptional<z.ZodString>;
|
|
160
|
+
certificatePolicies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
161
|
+
policyIdentifier: z.ZodString;
|
|
162
|
+
policyQualifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
|
+
}, z.core.$strip>>>;
|
|
164
|
+
crlDistributionPoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
authorityInfoAccess: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
ocsp: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
+
caIssuers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
nameConstraints: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
permitted: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
excluded: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
export type CertJWTPayload = z.infer<typeof CertJWTPayloadSchema>;
|
|
178
|
+
export declare const DeviceIdKeyBagItemSchema: z.ZodReadonly<z.ZodObject<{
|
|
179
|
+
deviceId: z.ZodIntersection<z.ZodObject<{
|
|
180
|
+
kty: z.ZodEnum<{
|
|
181
|
+
EC: "EC";
|
|
182
|
+
OKP: "OKP";
|
|
183
|
+
RSA: "RSA";
|
|
184
|
+
oct: "oct";
|
|
185
|
+
}>;
|
|
186
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
187
|
+
enc: "enc";
|
|
188
|
+
sig: "sig";
|
|
189
|
+
}>>;
|
|
190
|
+
key_ops: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
191
|
+
decrypt: "decrypt";
|
|
192
|
+
deriveBits: "deriveBits";
|
|
193
|
+
deriveKey: "deriveKey";
|
|
194
|
+
encrypt: "encrypt";
|
|
195
|
+
sign: "sign";
|
|
196
|
+
unwrapKey: "unwrapKey";
|
|
197
|
+
verify: "verify";
|
|
198
|
+
wrapKey: "wrapKey";
|
|
199
|
+
}>>>;
|
|
200
|
+
alg: z.ZodOptional<z.ZodString>;
|
|
201
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
202
|
+
x5u: z.ZodOptional<z.ZodString>;
|
|
203
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
205
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
206
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
207
|
+
kty: z.ZodLiteral<"RSA">;
|
|
208
|
+
n: z.ZodString;
|
|
209
|
+
e: z.ZodString;
|
|
210
|
+
d: z.ZodString;
|
|
211
|
+
p: z.ZodString;
|
|
212
|
+
q: z.ZodString;
|
|
213
|
+
dp: z.ZodString;
|
|
214
|
+
dq: z.ZodString;
|
|
215
|
+
qi: z.ZodString;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
kty: z.ZodLiteral<"EC">;
|
|
218
|
+
crv: z.ZodEnum<{
|
|
219
|
+
"P-256": "P-256";
|
|
220
|
+
"P-384": "P-384";
|
|
221
|
+
"P-521": "P-521";
|
|
222
|
+
secp256k1: "secp256k1";
|
|
223
|
+
}>;
|
|
224
|
+
x: z.ZodString;
|
|
225
|
+
y: z.ZodString;
|
|
226
|
+
d: z.ZodString;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
kty: z.ZodLiteral<"oct">;
|
|
229
|
+
k: z.ZodString;
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
+
kty: z.ZodLiteral<"OKP">;
|
|
232
|
+
crv: z.ZodEnum<{
|
|
233
|
+
Ed25519: "Ed25519";
|
|
234
|
+
Ed448: "Ed448";
|
|
235
|
+
X25519: "X25519";
|
|
236
|
+
X448: "X448";
|
|
237
|
+
}>;
|
|
238
|
+
x: z.ZodString;
|
|
239
|
+
d: z.ZodString;
|
|
240
|
+
}, z.core.$strip>], "kty">>;
|
|
241
|
+
cert: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
242
|
+
certificateJWT: z.ZodString;
|
|
243
|
+
certificatePayload: z.ZodReadonly<z.ZodObject<{
|
|
244
|
+
iss: z.ZodString;
|
|
245
|
+
sub: z.ZodString;
|
|
246
|
+
aud: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
247
|
+
iat: z.ZodNumber;
|
|
248
|
+
nbf: z.ZodNumber;
|
|
249
|
+
exp: z.ZodNumber;
|
|
250
|
+
jti: z.ZodString;
|
|
251
|
+
certificate: z.ZodObject<{
|
|
252
|
+
version: z.ZodLiteral<"3">;
|
|
253
|
+
serialNumber: z.ZodString;
|
|
254
|
+
subject: z.ZodObject<{
|
|
255
|
+
commonName: z.ZodString;
|
|
256
|
+
countryName: z.ZodOptional<z.ZodString>;
|
|
257
|
+
stateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
258
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
259
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
260
|
+
organizationalUnitName: z.ZodOptional<z.ZodString>;
|
|
261
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
262
|
+
serialNumber: z.ZodOptional<z.ZodString>;
|
|
263
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
264
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
265
|
+
businessCategory: z.ZodOptional<z.ZodString>;
|
|
266
|
+
jurisdictionCountryName: z.ZodOptional<z.ZodString>;
|
|
267
|
+
jurisdictionStateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
268
|
+
jurisdictionLocalityName: z.ZodOptional<z.ZodString>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
issuer: z.ZodObject<{
|
|
271
|
+
commonName: z.ZodString;
|
|
272
|
+
countryName: z.ZodOptional<z.ZodString>;
|
|
273
|
+
stateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
274
|
+
locality: z.ZodOptional<z.ZodString>;
|
|
275
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
276
|
+
organizationalUnitName: z.ZodOptional<z.ZodString>;
|
|
277
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
278
|
+
serialNumber: z.ZodOptional<z.ZodString>;
|
|
279
|
+
streetAddress: z.ZodOptional<z.ZodString>;
|
|
280
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
281
|
+
businessCategory: z.ZodOptional<z.ZodString>;
|
|
282
|
+
jurisdictionCountryName: z.ZodOptional<z.ZodString>;
|
|
283
|
+
jurisdictionStateOrProvinceName: z.ZodOptional<z.ZodString>;
|
|
284
|
+
jurisdictionLocalityName: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
validity: z.ZodObject<{
|
|
287
|
+
notBefore: z.ZodString;
|
|
288
|
+
notAfter: z.ZodString;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
subjectPublicKeyInfo: z.ZodIntersection<z.ZodObject<{
|
|
291
|
+
kty: z.ZodEnum<{
|
|
292
|
+
EC: "EC";
|
|
293
|
+
OKP: "OKP";
|
|
294
|
+
RSA: "RSA";
|
|
295
|
+
}>;
|
|
296
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
enc: "enc";
|
|
298
|
+
sig: "sig";
|
|
299
|
+
}>>;
|
|
300
|
+
key_ops: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
301
|
+
decrypt: "decrypt";
|
|
302
|
+
deriveBits: "deriveBits";
|
|
303
|
+
deriveKey: "deriveKey";
|
|
304
|
+
encrypt: "encrypt";
|
|
305
|
+
sign: "sign";
|
|
306
|
+
unwrapKey: "unwrapKey";
|
|
307
|
+
verify: "verify";
|
|
308
|
+
wrapKey: "wrapKey";
|
|
309
|
+
}>>>;
|
|
310
|
+
alg: z.ZodOptional<z.ZodString>;
|
|
311
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
312
|
+
x5u: z.ZodOptional<z.ZodString>;
|
|
313
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
314
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
315
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
317
|
+
kty: z.ZodLiteral<"RSA">;
|
|
318
|
+
n: z.ZodString;
|
|
319
|
+
e: z.ZodString;
|
|
320
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
321
|
+
kty: z.ZodLiteral<"EC">;
|
|
322
|
+
crv: z.ZodEnum<{
|
|
323
|
+
"P-256": "P-256";
|
|
324
|
+
"P-384": "P-384";
|
|
325
|
+
"P-521": "P-521";
|
|
326
|
+
}>;
|
|
327
|
+
x: z.ZodString;
|
|
328
|
+
y: z.ZodString;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
kty: z.ZodLiteral<"oct">;
|
|
331
|
+
k: z.ZodString;
|
|
332
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
+
kty: z.ZodLiteral<"OKP">;
|
|
334
|
+
crv: z.ZodEnum<{
|
|
335
|
+
Ed25519: "Ed25519";
|
|
336
|
+
Ed448: "Ed448";
|
|
337
|
+
X25519: "X25519";
|
|
338
|
+
X448: "X448";
|
|
339
|
+
}>;
|
|
340
|
+
x: z.ZodString;
|
|
341
|
+
}, z.core.$strip>], "kty">>;
|
|
342
|
+
signatureAlgorithm: z.ZodLiteral<"ES256">;
|
|
343
|
+
keyUsage: z.ZodArray<z.ZodEnum<{
|
|
344
|
+
cRLSign: "cRLSign";
|
|
345
|
+
dataEncipherment: "dataEncipherment";
|
|
346
|
+
decipherOnly: "decipherOnly";
|
|
347
|
+
digitalSignature: "digitalSignature";
|
|
348
|
+
encipherOnly: "encipherOnly";
|
|
349
|
+
keyAgreement: "keyAgreement";
|
|
350
|
+
keyCertSign: "keyCertSign";
|
|
351
|
+
keyEncipherment: "keyEncipherment";
|
|
352
|
+
nonRepudiation: "nonRepudiation";
|
|
353
|
+
}>>;
|
|
354
|
+
extendedKeyUsage: z.ZodArray<z.ZodEnum<{
|
|
355
|
+
OCSPSigning: "OCSPSigning";
|
|
356
|
+
clientAuth: "clientAuth";
|
|
357
|
+
codeSigning: "codeSigning";
|
|
358
|
+
emailProtection: "emailProtection";
|
|
359
|
+
ipsecIKE: "ipsecIKE";
|
|
360
|
+
msCTLSign: "msCTLSign";
|
|
361
|
+
msCodeCom: "msCodeCom";
|
|
362
|
+
msCodeInd: "msCodeInd";
|
|
363
|
+
msEFS: "msEFS";
|
|
364
|
+
serverAuth: "serverAuth";
|
|
365
|
+
timeStamping: "timeStamping";
|
|
366
|
+
}>>;
|
|
367
|
+
extensions: z.ZodOptional<z.ZodObject<{
|
|
368
|
+
subjectAltName: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
keyUsage: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
370
|
+
cRLSign: "cRLSign";
|
|
371
|
+
dataEncipherment: "dataEncipherment";
|
|
372
|
+
decipherOnly: "decipherOnly";
|
|
373
|
+
digitalSignature: "digitalSignature";
|
|
374
|
+
encipherOnly: "encipherOnly";
|
|
375
|
+
keyAgreement: "keyAgreement";
|
|
376
|
+
keyCertSign: "keyCertSign";
|
|
377
|
+
keyEncipherment: "keyEncipherment";
|
|
378
|
+
nonRepudiation: "nonRepudiation";
|
|
379
|
+
}>>>;
|
|
380
|
+
extendedKeyUsage: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
381
|
+
OCSPSigning: "OCSPSigning";
|
|
382
|
+
clientAuth: "clientAuth";
|
|
383
|
+
codeSigning: "codeSigning";
|
|
384
|
+
emailProtection: "emailProtection";
|
|
385
|
+
ipsecIKE: "ipsecIKE";
|
|
386
|
+
msCTLSign: "msCTLSign";
|
|
387
|
+
msCodeCom: "msCodeCom";
|
|
388
|
+
msCodeInd: "msCodeInd";
|
|
389
|
+
msEFS: "msEFS";
|
|
390
|
+
serverAuth: "serverAuth";
|
|
391
|
+
timeStamping: "timeStamping";
|
|
392
|
+
}>>>;
|
|
393
|
+
basicConstraints: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
cA: z.ZodOptional<z.ZodBoolean>;
|
|
395
|
+
pathLenConstraint: z.ZodOptional<z.ZodNumber>;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
authorityKeyIdentifier: z.ZodOptional<z.ZodString>;
|
|
398
|
+
subjectKeyIdentifier: z.ZodOptional<z.ZodString>;
|
|
399
|
+
certificatePolicies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
400
|
+
policyIdentifier: z.ZodString;
|
|
401
|
+
policyQualifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
402
|
+
}, z.core.$strip>>>;
|
|
403
|
+
crlDistributionPoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
404
|
+
authorityInfoAccess: z.ZodOptional<z.ZodObject<{
|
|
405
|
+
ocsp: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
406
|
+
caIssuers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
407
|
+
}, z.core.$strip>>;
|
|
408
|
+
nameConstraints: z.ZodOptional<z.ZodObject<{
|
|
409
|
+
permitted: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
410
|
+
excluded: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
}, z.core.$strip>>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
}, z.core.$strip>>>;
|
|
416
|
+
}, z.core.$strip>>;
|
|
417
|
+
export type DeviceIdKeyBagItem = z.infer<typeof DeviceIdKeyBagItemSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { JWKPrivateSchema } from "./jwk-private.zod.js";
|
|
3
|
+
import { CertificatePayloadSchema } from "./fp-ca-cert-payload.zod.js";
|
|
4
|
+
export const CertJWTPayloadSchema = z
|
|
5
|
+
.object({
|
|
6
|
+
certificateJWT: z.string(),
|
|
7
|
+
certificatePayload: CertificatePayloadSchema,
|
|
8
|
+
})
|
|
9
|
+
.readonly();
|
|
10
|
+
export const DeviceIdKeyBagItemSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
deviceId: JWKPrivateSchema,
|
|
13
|
+
cert: CertJWTPayloadSchema.optional(),
|
|
14
|
+
})
|
|
15
|
+
.readonly();
|
|
16
|
+
//# sourceMappingURL=device-id-keybag-item.zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-id-keybag-item.zod.js","sourceRoot":"","sources":["../jsr/device-id-keybag-item.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,kBAAkB,EAAE,wBAAwB;CAC7C,CAAC;KACD,QAAQ,EAAE,CAAC;AAId,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,QAAQ,EAAE,CAAC"}
|
package/device-id.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CertificatePayload } from "./fp-ca-cert-payload.zod.js";
|
|
2
|
+
import { JWKPublic } from "./jwk-public.zod.js";
|
|
3
|
+
export interface IssueCertificateResult {
|
|
4
|
+
readonly certificateJWT: string;
|
|
5
|
+
readonly certificatePayload: CertificatePayload;
|
|
6
|
+
readonly format: "JWS";
|
|
7
|
+
readonly serialNumber: string;
|
|
8
|
+
readonly issuer: string;
|
|
9
|
+
readonly subject: string;
|
|
10
|
+
readonly validityPeriod: {
|
|
11
|
+
readonly notBefore: Date;
|
|
12
|
+
readonly notAfter: Date;
|
|
13
|
+
};
|
|
14
|
+
readonly publicKey: JWKPublic;
|
|
15
|
+
}
|
package/device-id.js
ADDED
package/device-id.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-id.js","sourceRoot":"","sources":["../jsr/device-id.ts"],"names":[],"mappings":""}
|