@kya-os/contracts 1.3.5 → 1.4.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/dist/agentshield-api/endpoints.d.ts +50 -0
- package/dist/agentshield-api/endpoints.js +46 -0
- package/dist/agentshield-api/index.d.ts +13 -0
- package/dist/agentshield-api/index.js +38 -0
- package/dist/agentshield-api/schemas.d.ts +9914 -0
- package/dist/agentshield-api/schemas.js +165 -0
- package/dist/agentshield-api/types.d.ts +168 -0
- package/dist/agentshield-api/types.js +27 -0
- package/dist/cli.d.ts +13 -0
- package/dist/cli.js +13 -1
- package/dist/config/base.d.ts +96 -0
- package/dist/config/base.js +11 -0
- package/dist/config/delegation.d.ts +194 -0
- package/dist/config/delegation.js +10 -0
- package/dist/config/identity.d.ts +117 -0
- package/dist/config/identity.js +11 -0
- package/dist/config/index.d.ts +33 -0
- package/dist/config/index.js +11 -0
- package/dist/config/proofing.d.ts +120 -0
- package/dist/config/proofing.js +10 -0
- package/dist/config/tool-protection.d.ts +139 -0
- package/dist/config/tool-protection.js +10 -0
- package/dist/dashboard-config/index.d.ts +10 -0
- package/dist/dashboard-config/index.js +31 -0
- package/dist/dashboard-config/schemas.d.ts +5847 -0
- package/dist/dashboard-config/schemas.js +251 -0
- package/dist/dashboard-config/types.d.ts +331 -0
- package/dist/dashboard-config/types.js +11 -0
- package/dist/delegation/constraints.d.ts +991 -0
- package/dist/delegation/constraints.js +209 -0
- package/dist/delegation/index.d.ts +7 -0
- package/dist/delegation/index.js +23 -0
- package/dist/delegation/schemas.d.ts +8381 -0
- package/dist/delegation/schemas.js +475 -0
- package/dist/did/index.d.ts +8 -0
- package/dist/did/index.js +24 -0
- package/dist/did/resolve-contract.d.ts +219 -0
- package/dist/did/resolve-contract.js +31 -0
- package/dist/did/schemas.d.ts +112 -0
- package/dist/did/schemas.js +172 -0
- package/dist/did/types.d.ts +163 -0
- package/dist/did/types.js +70 -0
- package/dist/env/constants.d.ts +57 -0
- package/dist/env/constants.js +59 -0
- package/dist/env/index.d.ts +4 -0
- package/dist/env/index.js +20 -0
- package/dist/handshake.d.ts +20 -0
- package/dist/handshake.js +10 -3
- package/dist/index.d.ts +14 -0
- package/dist/index.js +28 -0
- package/dist/proof/index.d.ts +8 -0
- package/dist/proof/index.js +24 -0
- package/dist/proof/proof-record.d.ts +837 -0
- package/dist/proof/proof-record.js +133 -0
- package/dist/proof/signing-spec.d.ts +146 -0
- package/dist/proof/signing-spec.js +122 -0
- package/dist/proof.d.ts +53 -16
- package/dist/proof.js +27 -3
- package/dist/registry.d.ts +16 -0
- package/dist/registry.js +29 -9
- package/dist/runtime/errors.d.ts +347 -0
- package/dist/runtime/errors.js +119 -0
- package/dist/runtime/headers.d.ts +83 -0
- package/dist/runtime/headers.js +81 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +21 -0
- package/dist/test.d.ts +36 -0
- package/dist/test.js +36 -0
- package/dist/tlkrc/index.d.ts +4 -0
- package/dist/tlkrc/index.js +20 -0
- package/dist/tlkrc/rotation.d.ts +245 -0
- package/dist/tlkrc/rotation.js +126 -0
- package/dist/tool-protection/index.d.ts +227 -0
- package/dist/tool-protection/index.js +113 -0
- package/dist/utils/validation.d.ts +16 -0
- package/dist/utils/validation.js +13 -0
- package/dist/vc/index.d.ts +7 -0
- package/dist/vc/index.js +23 -0
- package/dist/vc/schemas.d.ts +2483 -0
- package/dist/vc/schemas.js +224 -0
- package/dist/vc/statuslist.d.ts +493 -0
- package/dist/vc/statuslist.js +132 -0
- package/dist/verifier.d.ts +3 -0
- package/dist/verifier.js +7 -0
- package/dist/well-known/index.d.ts +308 -0
- package/dist/well-known/index.js +134 -0
- package/package.json +6 -1
|
@@ -0,0 +1,2483 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verifiable Credentials (W3C 1.1) Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas and TypeScript types for W3C Verifiable Credentials Data Model 1.1.
|
|
5
|
+
* These schemas provide runtime validation and can emit JSON Schemas for interoperability.
|
|
6
|
+
*
|
|
7
|
+
* Related Spec: MCP-I §3, W3C VC Data Model 1.1
|
|
8
|
+
* Python Reference: Credential-Documentation.md, Credential-Service.md
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Standard W3C Verifiable Credentials context
|
|
13
|
+
*/
|
|
14
|
+
export declare const VC_CONTEXT: readonly ["https://www.w3.org/2018/credentials/v1"];
|
|
15
|
+
/**
|
|
16
|
+
* Additional context for StatusList2021
|
|
17
|
+
*/
|
|
18
|
+
export declare const STATUS_LIST_CONTEXT: "https://w3id.org/vc/status-list/2021/v1";
|
|
19
|
+
/**
|
|
20
|
+
* Context Entry Schema
|
|
21
|
+
*
|
|
22
|
+
* Supports both string URLs and context objects
|
|
23
|
+
*/
|
|
24
|
+
export declare const ContextEntrySchema: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
25
|
+
/**
|
|
26
|
+
* @context Schema
|
|
27
|
+
*
|
|
28
|
+
* The @context property establishes the semantic context of the credential.
|
|
29
|
+
* MUST include the base VC context and MAY include additional contexts.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ContextSchema: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
32
|
+
/**
|
|
33
|
+
* Issuer Schema
|
|
34
|
+
*
|
|
35
|
+
* The issuer can be a DID string or an object with an id field
|
|
36
|
+
*/
|
|
37
|
+
export declare const IssuerSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
44
|
+
/**
|
|
45
|
+
* Credential Subject Schema
|
|
46
|
+
*
|
|
47
|
+
* The subject of the credential. Can be a single object or array of objects.
|
|
48
|
+
* MUST have an id property that is a DID or URI.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CredentialSubjectSchema: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
51
|
+
/**
|
|
52
|
+
* Credential Status Schema (StatusList2021Entry)
|
|
53
|
+
*
|
|
54
|
+
* References a position in a StatusList2021 credential for revocation/suspension checking.
|
|
55
|
+
*/
|
|
56
|
+
export declare const CredentialStatusSchema: z.ZodObject<{
|
|
57
|
+
/** URI of this status entry */
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
/** Type MUST be StatusList2021Entry */
|
|
60
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
61
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
62
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
63
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
64
|
+
statusListIndex: z.ZodString;
|
|
65
|
+
/** URL of the StatusList2021Credential */
|
|
66
|
+
statusListCredential: z.ZodString;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
type: "StatusList2021Entry";
|
|
69
|
+
id: string;
|
|
70
|
+
statusPurpose: "revocation" | "suspension";
|
|
71
|
+
statusListIndex: string;
|
|
72
|
+
statusListCredential: string;
|
|
73
|
+
}, {
|
|
74
|
+
type: "StatusList2021Entry";
|
|
75
|
+
id: string;
|
|
76
|
+
statusPurpose: "revocation" | "suspension";
|
|
77
|
+
statusListIndex: string;
|
|
78
|
+
statusListCredential: string;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Proof Schema
|
|
82
|
+
*
|
|
83
|
+
* Cryptographic proof for the credential.
|
|
84
|
+
* This is a flexible schema as proof formats vary.
|
|
85
|
+
*/
|
|
86
|
+
export declare const ProofSchema: z.ZodObject<{
|
|
87
|
+
type: z.ZodString;
|
|
88
|
+
created: z.ZodOptional<z.ZodString>;
|
|
89
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
90
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
92
|
+
type: z.ZodString;
|
|
93
|
+
created: z.ZodOptional<z.ZodString>;
|
|
94
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
95
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
97
|
+
type: z.ZodString;
|
|
98
|
+
created: z.ZodOptional<z.ZodString>;
|
|
99
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
100
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
102
|
+
/**
|
|
103
|
+
* Verifiable Credential Schema (W3C 1.1)
|
|
104
|
+
*
|
|
105
|
+
* Core schema for W3C Verifiable Credentials.
|
|
106
|
+
* Supports all required and common optional fields.
|
|
107
|
+
*/
|
|
108
|
+
export declare const VerifiableCredentialSchema: z.ZodObject<{
|
|
109
|
+
/** JSON-LD context */
|
|
110
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
111
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
112
|
+
id: z.ZodOptional<z.ZodString>;
|
|
113
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
114
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
115
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
116
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
119
|
+
id: z.ZodString;
|
|
120
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
123
|
+
/** Issuance date in ISO 8601 format */
|
|
124
|
+
issuanceDate: z.ZodString;
|
|
125
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
126
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
127
|
+
/** The subject(s) of the credential */
|
|
128
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
129
|
+
/** Status information for revocation/suspension (optional) */
|
|
130
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
/** URI of this status entry */
|
|
132
|
+
id: z.ZodString;
|
|
133
|
+
/** Type MUST be StatusList2021Entry */
|
|
134
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
135
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
136
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
137
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
138
|
+
statusListIndex: z.ZodString;
|
|
139
|
+
/** URL of the StatusList2021Credential */
|
|
140
|
+
statusListCredential: z.ZodString;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
type: "StatusList2021Entry";
|
|
143
|
+
id: string;
|
|
144
|
+
statusPurpose: "revocation" | "suspension";
|
|
145
|
+
statusListIndex: string;
|
|
146
|
+
statusListCredential: string;
|
|
147
|
+
}, {
|
|
148
|
+
type: "StatusList2021Entry";
|
|
149
|
+
id: string;
|
|
150
|
+
statusPurpose: "revocation" | "suspension";
|
|
151
|
+
statusListIndex: string;
|
|
152
|
+
statusListCredential: string;
|
|
153
|
+
}>>;
|
|
154
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
155
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
type: z.ZodString;
|
|
157
|
+
created: z.ZodOptional<z.ZodString>;
|
|
158
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
159
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
160
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
161
|
+
type: z.ZodString;
|
|
162
|
+
created: z.ZodOptional<z.ZodString>;
|
|
163
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
164
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
166
|
+
type: z.ZodString;
|
|
167
|
+
created: z.ZodOptional<z.ZodString>;
|
|
168
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
169
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
170
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
171
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
172
|
+
/** JSON-LD context */
|
|
173
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
174
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
175
|
+
id: z.ZodOptional<z.ZodString>;
|
|
176
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
177
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
178
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
179
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
180
|
+
id: z.ZodString;
|
|
181
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
186
|
+
/** Issuance date in ISO 8601 format */
|
|
187
|
+
issuanceDate: z.ZodString;
|
|
188
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
189
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
190
|
+
/** The subject(s) of the credential */
|
|
191
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
192
|
+
/** Status information for revocation/suspension (optional) */
|
|
193
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
/** URI of this status entry */
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
/** Type MUST be StatusList2021Entry */
|
|
197
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
198
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
199
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
200
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
201
|
+
statusListIndex: z.ZodString;
|
|
202
|
+
/** URL of the StatusList2021Credential */
|
|
203
|
+
statusListCredential: z.ZodString;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
type: "StatusList2021Entry";
|
|
206
|
+
id: string;
|
|
207
|
+
statusPurpose: "revocation" | "suspension";
|
|
208
|
+
statusListIndex: string;
|
|
209
|
+
statusListCredential: string;
|
|
210
|
+
}, {
|
|
211
|
+
type: "StatusList2021Entry";
|
|
212
|
+
id: string;
|
|
213
|
+
statusPurpose: "revocation" | "suspension";
|
|
214
|
+
statusListIndex: string;
|
|
215
|
+
statusListCredential: string;
|
|
216
|
+
}>>;
|
|
217
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
218
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
type: z.ZodString;
|
|
220
|
+
created: z.ZodOptional<z.ZodString>;
|
|
221
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
222
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
223
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
224
|
+
type: z.ZodString;
|
|
225
|
+
created: z.ZodOptional<z.ZodString>;
|
|
226
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
227
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
229
|
+
type: z.ZodString;
|
|
230
|
+
created: z.ZodOptional<z.ZodString>;
|
|
231
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
232
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
234
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
235
|
+
/** JSON-LD context */
|
|
236
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
237
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
238
|
+
id: z.ZodOptional<z.ZodString>;
|
|
239
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
240
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
241
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
242
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
243
|
+
id: z.ZodString;
|
|
244
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
249
|
+
/** Issuance date in ISO 8601 format */
|
|
250
|
+
issuanceDate: z.ZodString;
|
|
251
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
252
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
253
|
+
/** The subject(s) of the credential */
|
|
254
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
255
|
+
/** Status information for revocation/suspension (optional) */
|
|
256
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
/** URI of this status entry */
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
/** Type MUST be StatusList2021Entry */
|
|
260
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
261
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
262
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
263
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
264
|
+
statusListIndex: z.ZodString;
|
|
265
|
+
/** URL of the StatusList2021Credential */
|
|
266
|
+
statusListCredential: z.ZodString;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
type: "StatusList2021Entry";
|
|
269
|
+
id: string;
|
|
270
|
+
statusPurpose: "revocation" | "suspension";
|
|
271
|
+
statusListIndex: string;
|
|
272
|
+
statusListCredential: string;
|
|
273
|
+
}, {
|
|
274
|
+
type: "StatusList2021Entry";
|
|
275
|
+
id: string;
|
|
276
|
+
statusPurpose: "revocation" | "suspension";
|
|
277
|
+
statusListIndex: string;
|
|
278
|
+
statusListCredential: string;
|
|
279
|
+
}>>;
|
|
280
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
281
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
282
|
+
type: z.ZodString;
|
|
283
|
+
created: z.ZodOptional<z.ZodString>;
|
|
284
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
285
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
286
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
287
|
+
type: z.ZodString;
|
|
288
|
+
created: z.ZodOptional<z.ZodString>;
|
|
289
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
290
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
292
|
+
type: z.ZodString;
|
|
293
|
+
created: z.ZodOptional<z.ZodString>;
|
|
294
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
295
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
296
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
297
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
298
|
+
/**
|
|
299
|
+
* Type exports
|
|
300
|
+
*/
|
|
301
|
+
export type ContextEntry = z.infer<typeof ContextEntrySchema>;
|
|
302
|
+
export type Context = z.infer<typeof ContextSchema>;
|
|
303
|
+
export type Issuer = z.infer<typeof IssuerSchema>;
|
|
304
|
+
export type CredentialSubject = z.infer<typeof CredentialSubjectSchema>;
|
|
305
|
+
export type CredentialStatus = z.infer<typeof CredentialStatusSchema>;
|
|
306
|
+
export type Proof = z.infer<typeof ProofSchema>;
|
|
307
|
+
/**
|
|
308
|
+
* Verifiable Credential Type
|
|
309
|
+
*
|
|
310
|
+
* Use this type for type-safe credential handling.
|
|
311
|
+
*/
|
|
312
|
+
export type VerifiableCredential = z.infer<typeof VerifiableCredentialSchema>;
|
|
313
|
+
/**
|
|
314
|
+
* Verifiable Presentation Schema
|
|
315
|
+
*
|
|
316
|
+
* Schema for presenting one or more credentials.
|
|
317
|
+
*/
|
|
318
|
+
export declare const VerifiablePresentationSchema: z.ZodObject<{
|
|
319
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
320
|
+
id: z.ZodOptional<z.ZodString>;
|
|
321
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
322
|
+
holder: z.ZodOptional<z.ZodString>;
|
|
323
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
324
|
+
/** JSON-LD context */
|
|
325
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
326
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
327
|
+
id: z.ZodOptional<z.ZodString>;
|
|
328
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
329
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
330
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
331
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
334
|
+
id: z.ZodString;
|
|
335
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
336
|
+
id: z.ZodString;
|
|
337
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
338
|
+
/** Issuance date in ISO 8601 format */
|
|
339
|
+
issuanceDate: z.ZodString;
|
|
340
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
341
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
342
|
+
/** The subject(s) of the credential */
|
|
343
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
344
|
+
/** Status information for revocation/suspension (optional) */
|
|
345
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
/** URI of this status entry */
|
|
347
|
+
id: z.ZodString;
|
|
348
|
+
/** Type MUST be StatusList2021Entry */
|
|
349
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
350
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
351
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
352
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
353
|
+
statusListIndex: z.ZodString;
|
|
354
|
+
/** URL of the StatusList2021Credential */
|
|
355
|
+
statusListCredential: z.ZodString;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
type: "StatusList2021Entry";
|
|
358
|
+
id: string;
|
|
359
|
+
statusPurpose: "revocation" | "suspension";
|
|
360
|
+
statusListIndex: string;
|
|
361
|
+
statusListCredential: string;
|
|
362
|
+
}, {
|
|
363
|
+
type: "StatusList2021Entry";
|
|
364
|
+
id: string;
|
|
365
|
+
statusPurpose: "revocation" | "suspension";
|
|
366
|
+
statusListIndex: string;
|
|
367
|
+
statusListCredential: string;
|
|
368
|
+
}>>;
|
|
369
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
370
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
371
|
+
type: z.ZodString;
|
|
372
|
+
created: z.ZodOptional<z.ZodString>;
|
|
373
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
374
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
376
|
+
type: z.ZodString;
|
|
377
|
+
created: z.ZodOptional<z.ZodString>;
|
|
378
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
379
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
380
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
381
|
+
type: z.ZodString;
|
|
382
|
+
created: z.ZodOptional<z.ZodString>;
|
|
383
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
384
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
385
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
386
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
387
|
+
/** JSON-LD context */
|
|
388
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
389
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
390
|
+
id: z.ZodOptional<z.ZodString>;
|
|
391
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
392
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
393
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
394
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
395
|
+
id: z.ZodString;
|
|
396
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
397
|
+
id: z.ZodString;
|
|
398
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
399
|
+
id: z.ZodString;
|
|
400
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
401
|
+
/** Issuance date in ISO 8601 format */
|
|
402
|
+
issuanceDate: z.ZodString;
|
|
403
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
404
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
405
|
+
/** The subject(s) of the credential */
|
|
406
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
407
|
+
/** Status information for revocation/suspension (optional) */
|
|
408
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
409
|
+
/** URI of this status entry */
|
|
410
|
+
id: z.ZodString;
|
|
411
|
+
/** Type MUST be StatusList2021Entry */
|
|
412
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
413
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
414
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
415
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
416
|
+
statusListIndex: z.ZodString;
|
|
417
|
+
/** URL of the StatusList2021Credential */
|
|
418
|
+
statusListCredential: z.ZodString;
|
|
419
|
+
}, "strip", z.ZodTypeAny, {
|
|
420
|
+
type: "StatusList2021Entry";
|
|
421
|
+
id: string;
|
|
422
|
+
statusPurpose: "revocation" | "suspension";
|
|
423
|
+
statusListIndex: string;
|
|
424
|
+
statusListCredential: string;
|
|
425
|
+
}, {
|
|
426
|
+
type: "StatusList2021Entry";
|
|
427
|
+
id: string;
|
|
428
|
+
statusPurpose: "revocation" | "suspension";
|
|
429
|
+
statusListIndex: string;
|
|
430
|
+
statusListCredential: string;
|
|
431
|
+
}>>;
|
|
432
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
433
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
434
|
+
type: z.ZodString;
|
|
435
|
+
created: z.ZodOptional<z.ZodString>;
|
|
436
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
437
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
438
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
439
|
+
type: z.ZodString;
|
|
440
|
+
created: z.ZodOptional<z.ZodString>;
|
|
441
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
442
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
444
|
+
type: z.ZodString;
|
|
445
|
+
created: z.ZodOptional<z.ZodString>;
|
|
446
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
447
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
448
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
449
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
450
|
+
/** JSON-LD context */
|
|
451
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
452
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
453
|
+
id: z.ZodOptional<z.ZodString>;
|
|
454
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
455
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
456
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
457
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
460
|
+
id: z.ZodString;
|
|
461
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
462
|
+
id: z.ZodString;
|
|
463
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
464
|
+
/** Issuance date in ISO 8601 format */
|
|
465
|
+
issuanceDate: z.ZodString;
|
|
466
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
467
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
468
|
+
/** The subject(s) of the credential */
|
|
469
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
470
|
+
/** Status information for revocation/suspension (optional) */
|
|
471
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
472
|
+
/** URI of this status entry */
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
/** Type MUST be StatusList2021Entry */
|
|
475
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
476
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
477
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
478
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
479
|
+
statusListIndex: z.ZodString;
|
|
480
|
+
/** URL of the StatusList2021Credential */
|
|
481
|
+
statusListCredential: z.ZodString;
|
|
482
|
+
}, "strip", z.ZodTypeAny, {
|
|
483
|
+
type: "StatusList2021Entry";
|
|
484
|
+
id: string;
|
|
485
|
+
statusPurpose: "revocation" | "suspension";
|
|
486
|
+
statusListIndex: string;
|
|
487
|
+
statusListCredential: string;
|
|
488
|
+
}, {
|
|
489
|
+
type: "StatusList2021Entry";
|
|
490
|
+
id: string;
|
|
491
|
+
statusPurpose: "revocation" | "suspension";
|
|
492
|
+
statusListIndex: string;
|
|
493
|
+
statusListCredential: string;
|
|
494
|
+
}>>;
|
|
495
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
496
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
497
|
+
type: z.ZodString;
|
|
498
|
+
created: z.ZodOptional<z.ZodString>;
|
|
499
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
500
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
501
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
502
|
+
type: z.ZodString;
|
|
503
|
+
created: z.ZodOptional<z.ZodString>;
|
|
504
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
505
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
507
|
+
type: z.ZodString;
|
|
508
|
+
created: z.ZodOptional<z.ZodString>;
|
|
509
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
510
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
511
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
512
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
|
|
513
|
+
/** JSON-LD context */
|
|
514
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
515
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
516
|
+
id: z.ZodOptional<z.ZodString>;
|
|
517
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
518
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
519
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
520
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
521
|
+
id: z.ZodString;
|
|
522
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
523
|
+
id: z.ZodString;
|
|
524
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
525
|
+
id: z.ZodString;
|
|
526
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
527
|
+
/** Issuance date in ISO 8601 format */
|
|
528
|
+
issuanceDate: z.ZodString;
|
|
529
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
530
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
531
|
+
/** The subject(s) of the credential */
|
|
532
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
533
|
+
/** Status information for revocation/suspension (optional) */
|
|
534
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
535
|
+
/** URI of this status entry */
|
|
536
|
+
id: z.ZodString;
|
|
537
|
+
/** Type MUST be StatusList2021Entry */
|
|
538
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
539
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
540
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
541
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
542
|
+
statusListIndex: z.ZodString;
|
|
543
|
+
/** URL of the StatusList2021Credential */
|
|
544
|
+
statusListCredential: z.ZodString;
|
|
545
|
+
}, "strip", z.ZodTypeAny, {
|
|
546
|
+
type: "StatusList2021Entry";
|
|
547
|
+
id: string;
|
|
548
|
+
statusPurpose: "revocation" | "suspension";
|
|
549
|
+
statusListIndex: string;
|
|
550
|
+
statusListCredential: string;
|
|
551
|
+
}, {
|
|
552
|
+
type: "StatusList2021Entry";
|
|
553
|
+
id: string;
|
|
554
|
+
statusPurpose: "revocation" | "suspension";
|
|
555
|
+
statusListIndex: string;
|
|
556
|
+
statusListCredential: string;
|
|
557
|
+
}>>;
|
|
558
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
559
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
560
|
+
type: z.ZodString;
|
|
561
|
+
created: z.ZodOptional<z.ZodString>;
|
|
562
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
563
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
564
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
565
|
+
type: z.ZodString;
|
|
566
|
+
created: z.ZodOptional<z.ZodString>;
|
|
567
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
568
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
570
|
+
type: z.ZodString;
|
|
571
|
+
created: z.ZodOptional<z.ZodString>;
|
|
572
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
573
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
574
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
575
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
576
|
+
/** JSON-LD context */
|
|
577
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
578
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
579
|
+
id: z.ZodOptional<z.ZodString>;
|
|
580
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
581
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
582
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
583
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
584
|
+
id: z.ZodString;
|
|
585
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
586
|
+
id: z.ZodString;
|
|
587
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
588
|
+
id: z.ZodString;
|
|
589
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
590
|
+
/** Issuance date in ISO 8601 format */
|
|
591
|
+
issuanceDate: z.ZodString;
|
|
592
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
593
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
594
|
+
/** The subject(s) of the credential */
|
|
595
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
596
|
+
/** Status information for revocation/suspension (optional) */
|
|
597
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
598
|
+
/** URI of this status entry */
|
|
599
|
+
id: z.ZodString;
|
|
600
|
+
/** Type MUST be StatusList2021Entry */
|
|
601
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
602
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
603
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
604
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
605
|
+
statusListIndex: z.ZodString;
|
|
606
|
+
/** URL of the StatusList2021Credential */
|
|
607
|
+
statusListCredential: z.ZodString;
|
|
608
|
+
}, "strip", z.ZodTypeAny, {
|
|
609
|
+
type: "StatusList2021Entry";
|
|
610
|
+
id: string;
|
|
611
|
+
statusPurpose: "revocation" | "suspension";
|
|
612
|
+
statusListIndex: string;
|
|
613
|
+
statusListCredential: string;
|
|
614
|
+
}, {
|
|
615
|
+
type: "StatusList2021Entry";
|
|
616
|
+
id: string;
|
|
617
|
+
statusPurpose: "revocation" | "suspension";
|
|
618
|
+
statusListIndex: string;
|
|
619
|
+
statusListCredential: string;
|
|
620
|
+
}>>;
|
|
621
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
622
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
623
|
+
type: z.ZodString;
|
|
624
|
+
created: z.ZodOptional<z.ZodString>;
|
|
625
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
626
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
627
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
628
|
+
type: z.ZodString;
|
|
629
|
+
created: z.ZodOptional<z.ZodString>;
|
|
630
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
631
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
632
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
633
|
+
type: z.ZodString;
|
|
634
|
+
created: z.ZodOptional<z.ZodString>;
|
|
635
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
636
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
637
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
638
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
639
|
+
/** JSON-LD context */
|
|
640
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
641
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
642
|
+
id: z.ZodOptional<z.ZodString>;
|
|
643
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
644
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
645
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
646
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
647
|
+
id: z.ZodString;
|
|
648
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
649
|
+
id: z.ZodString;
|
|
650
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
651
|
+
id: z.ZodString;
|
|
652
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
653
|
+
/** Issuance date in ISO 8601 format */
|
|
654
|
+
issuanceDate: z.ZodString;
|
|
655
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
656
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
657
|
+
/** The subject(s) of the credential */
|
|
658
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
659
|
+
/** Status information for revocation/suspension (optional) */
|
|
660
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
661
|
+
/** URI of this status entry */
|
|
662
|
+
id: z.ZodString;
|
|
663
|
+
/** Type MUST be StatusList2021Entry */
|
|
664
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
665
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
666
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
667
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
668
|
+
statusListIndex: z.ZodString;
|
|
669
|
+
/** URL of the StatusList2021Credential */
|
|
670
|
+
statusListCredential: z.ZodString;
|
|
671
|
+
}, "strip", z.ZodTypeAny, {
|
|
672
|
+
type: "StatusList2021Entry";
|
|
673
|
+
id: string;
|
|
674
|
+
statusPurpose: "revocation" | "suspension";
|
|
675
|
+
statusListIndex: string;
|
|
676
|
+
statusListCredential: string;
|
|
677
|
+
}, {
|
|
678
|
+
type: "StatusList2021Entry";
|
|
679
|
+
id: string;
|
|
680
|
+
statusPurpose: "revocation" | "suspension";
|
|
681
|
+
statusListIndex: string;
|
|
682
|
+
statusListCredential: string;
|
|
683
|
+
}>>;
|
|
684
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
685
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
686
|
+
type: z.ZodString;
|
|
687
|
+
created: z.ZodOptional<z.ZodString>;
|
|
688
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
689
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
690
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
691
|
+
type: z.ZodString;
|
|
692
|
+
created: z.ZodOptional<z.ZodString>;
|
|
693
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
694
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
695
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
696
|
+
type: z.ZodString;
|
|
697
|
+
created: z.ZodOptional<z.ZodString>;
|
|
698
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
699
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
700
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
701
|
+
}, z.ZodTypeAny, "passthrough">>, "many">]>>;
|
|
702
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
703
|
+
type: z.ZodString;
|
|
704
|
+
created: z.ZodOptional<z.ZodString>;
|
|
705
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
706
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
707
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
708
|
+
type: z.ZodString;
|
|
709
|
+
created: z.ZodOptional<z.ZodString>;
|
|
710
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
711
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
712
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
713
|
+
type: z.ZodString;
|
|
714
|
+
created: z.ZodOptional<z.ZodString>;
|
|
715
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
716
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
717
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
718
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
719
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
720
|
+
id: z.ZodOptional<z.ZodString>;
|
|
721
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
722
|
+
holder: z.ZodOptional<z.ZodString>;
|
|
723
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
724
|
+
/** JSON-LD context */
|
|
725
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
726
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
727
|
+
id: z.ZodOptional<z.ZodString>;
|
|
728
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
729
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
730
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
731
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
732
|
+
id: z.ZodString;
|
|
733
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
734
|
+
id: z.ZodString;
|
|
735
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
736
|
+
id: z.ZodString;
|
|
737
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
738
|
+
/** Issuance date in ISO 8601 format */
|
|
739
|
+
issuanceDate: z.ZodString;
|
|
740
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
741
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
742
|
+
/** The subject(s) of the credential */
|
|
743
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
744
|
+
/** Status information for revocation/suspension (optional) */
|
|
745
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
746
|
+
/** URI of this status entry */
|
|
747
|
+
id: z.ZodString;
|
|
748
|
+
/** Type MUST be StatusList2021Entry */
|
|
749
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
750
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
751
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
752
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
753
|
+
statusListIndex: z.ZodString;
|
|
754
|
+
/** URL of the StatusList2021Credential */
|
|
755
|
+
statusListCredential: z.ZodString;
|
|
756
|
+
}, "strip", z.ZodTypeAny, {
|
|
757
|
+
type: "StatusList2021Entry";
|
|
758
|
+
id: string;
|
|
759
|
+
statusPurpose: "revocation" | "suspension";
|
|
760
|
+
statusListIndex: string;
|
|
761
|
+
statusListCredential: string;
|
|
762
|
+
}, {
|
|
763
|
+
type: "StatusList2021Entry";
|
|
764
|
+
id: string;
|
|
765
|
+
statusPurpose: "revocation" | "suspension";
|
|
766
|
+
statusListIndex: string;
|
|
767
|
+
statusListCredential: string;
|
|
768
|
+
}>>;
|
|
769
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
770
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
771
|
+
type: z.ZodString;
|
|
772
|
+
created: z.ZodOptional<z.ZodString>;
|
|
773
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
774
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
775
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
776
|
+
type: z.ZodString;
|
|
777
|
+
created: z.ZodOptional<z.ZodString>;
|
|
778
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
779
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
780
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
781
|
+
type: z.ZodString;
|
|
782
|
+
created: z.ZodOptional<z.ZodString>;
|
|
783
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
784
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
785
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
786
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
787
|
+
/** JSON-LD context */
|
|
788
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
789
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
790
|
+
id: z.ZodOptional<z.ZodString>;
|
|
791
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
792
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
793
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
794
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
795
|
+
id: z.ZodString;
|
|
796
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
797
|
+
id: z.ZodString;
|
|
798
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
799
|
+
id: z.ZodString;
|
|
800
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
801
|
+
/** Issuance date in ISO 8601 format */
|
|
802
|
+
issuanceDate: z.ZodString;
|
|
803
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
804
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
805
|
+
/** The subject(s) of the credential */
|
|
806
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
807
|
+
/** Status information for revocation/suspension (optional) */
|
|
808
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
809
|
+
/** URI of this status entry */
|
|
810
|
+
id: z.ZodString;
|
|
811
|
+
/** Type MUST be StatusList2021Entry */
|
|
812
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
813
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
814
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
815
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
816
|
+
statusListIndex: z.ZodString;
|
|
817
|
+
/** URL of the StatusList2021Credential */
|
|
818
|
+
statusListCredential: z.ZodString;
|
|
819
|
+
}, "strip", z.ZodTypeAny, {
|
|
820
|
+
type: "StatusList2021Entry";
|
|
821
|
+
id: string;
|
|
822
|
+
statusPurpose: "revocation" | "suspension";
|
|
823
|
+
statusListIndex: string;
|
|
824
|
+
statusListCredential: string;
|
|
825
|
+
}, {
|
|
826
|
+
type: "StatusList2021Entry";
|
|
827
|
+
id: string;
|
|
828
|
+
statusPurpose: "revocation" | "suspension";
|
|
829
|
+
statusListIndex: string;
|
|
830
|
+
statusListCredential: string;
|
|
831
|
+
}>>;
|
|
832
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
833
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
834
|
+
type: z.ZodString;
|
|
835
|
+
created: z.ZodOptional<z.ZodString>;
|
|
836
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
837
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
838
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
839
|
+
type: z.ZodString;
|
|
840
|
+
created: z.ZodOptional<z.ZodString>;
|
|
841
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
842
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
843
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
844
|
+
type: z.ZodString;
|
|
845
|
+
created: z.ZodOptional<z.ZodString>;
|
|
846
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
847
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
848
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
849
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
850
|
+
/** JSON-LD context */
|
|
851
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
852
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
853
|
+
id: z.ZodOptional<z.ZodString>;
|
|
854
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
855
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
856
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
857
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
858
|
+
id: z.ZodString;
|
|
859
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
860
|
+
id: z.ZodString;
|
|
861
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
862
|
+
id: z.ZodString;
|
|
863
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
864
|
+
/** Issuance date in ISO 8601 format */
|
|
865
|
+
issuanceDate: z.ZodString;
|
|
866
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
867
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
868
|
+
/** The subject(s) of the credential */
|
|
869
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
870
|
+
/** Status information for revocation/suspension (optional) */
|
|
871
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
872
|
+
/** URI of this status entry */
|
|
873
|
+
id: z.ZodString;
|
|
874
|
+
/** Type MUST be StatusList2021Entry */
|
|
875
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
876
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
877
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
878
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
879
|
+
statusListIndex: z.ZodString;
|
|
880
|
+
/** URL of the StatusList2021Credential */
|
|
881
|
+
statusListCredential: z.ZodString;
|
|
882
|
+
}, "strip", z.ZodTypeAny, {
|
|
883
|
+
type: "StatusList2021Entry";
|
|
884
|
+
id: string;
|
|
885
|
+
statusPurpose: "revocation" | "suspension";
|
|
886
|
+
statusListIndex: string;
|
|
887
|
+
statusListCredential: string;
|
|
888
|
+
}, {
|
|
889
|
+
type: "StatusList2021Entry";
|
|
890
|
+
id: string;
|
|
891
|
+
statusPurpose: "revocation" | "suspension";
|
|
892
|
+
statusListIndex: string;
|
|
893
|
+
statusListCredential: string;
|
|
894
|
+
}>>;
|
|
895
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
896
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
897
|
+
type: z.ZodString;
|
|
898
|
+
created: z.ZodOptional<z.ZodString>;
|
|
899
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
900
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
902
|
+
type: z.ZodString;
|
|
903
|
+
created: z.ZodOptional<z.ZodString>;
|
|
904
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
905
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
906
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
907
|
+
type: z.ZodString;
|
|
908
|
+
created: z.ZodOptional<z.ZodString>;
|
|
909
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
910
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
911
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
912
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
|
|
913
|
+
/** JSON-LD context */
|
|
914
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
915
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
916
|
+
id: z.ZodOptional<z.ZodString>;
|
|
917
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
918
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
919
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
920
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
921
|
+
id: z.ZodString;
|
|
922
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
923
|
+
id: z.ZodString;
|
|
924
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
925
|
+
id: z.ZodString;
|
|
926
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
927
|
+
/** Issuance date in ISO 8601 format */
|
|
928
|
+
issuanceDate: z.ZodString;
|
|
929
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
930
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
931
|
+
/** The subject(s) of the credential */
|
|
932
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
933
|
+
/** Status information for revocation/suspension (optional) */
|
|
934
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
935
|
+
/** URI of this status entry */
|
|
936
|
+
id: z.ZodString;
|
|
937
|
+
/** Type MUST be StatusList2021Entry */
|
|
938
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
939
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
940
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
941
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
942
|
+
statusListIndex: z.ZodString;
|
|
943
|
+
/** URL of the StatusList2021Credential */
|
|
944
|
+
statusListCredential: z.ZodString;
|
|
945
|
+
}, "strip", z.ZodTypeAny, {
|
|
946
|
+
type: "StatusList2021Entry";
|
|
947
|
+
id: string;
|
|
948
|
+
statusPurpose: "revocation" | "suspension";
|
|
949
|
+
statusListIndex: string;
|
|
950
|
+
statusListCredential: string;
|
|
951
|
+
}, {
|
|
952
|
+
type: "StatusList2021Entry";
|
|
953
|
+
id: string;
|
|
954
|
+
statusPurpose: "revocation" | "suspension";
|
|
955
|
+
statusListIndex: string;
|
|
956
|
+
statusListCredential: string;
|
|
957
|
+
}>>;
|
|
958
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
959
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
960
|
+
type: z.ZodString;
|
|
961
|
+
created: z.ZodOptional<z.ZodString>;
|
|
962
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
963
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
964
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
965
|
+
type: z.ZodString;
|
|
966
|
+
created: z.ZodOptional<z.ZodString>;
|
|
967
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
968
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
969
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
970
|
+
type: z.ZodString;
|
|
971
|
+
created: z.ZodOptional<z.ZodString>;
|
|
972
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
973
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
974
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
975
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
976
|
+
/** JSON-LD context */
|
|
977
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
978
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
979
|
+
id: z.ZodOptional<z.ZodString>;
|
|
980
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
981
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
982
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
983
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
984
|
+
id: z.ZodString;
|
|
985
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
986
|
+
id: z.ZodString;
|
|
987
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
988
|
+
id: z.ZodString;
|
|
989
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
990
|
+
/** Issuance date in ISO 8601 format */
|
|
991
|
+
issuanceDate: z.ZodString;
|
|
992
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
993
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
994
|
+
/** The subject(s) of the credential */
|
|
995
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
996
|
+
/** Status information for revocation/suspension (optional) */
|
|
997
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
998
|
+
/** URI of this status entry */
|
|
999
|
+
id: z.ZodString;
|
|
1000
|
+
/** Type MUST be StatusList2021Entry */
|
|
1001
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1002
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1003
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1004
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1005
|
+
statusListIndex: z.ZodString;
|
|
1006
|
+
/** URL of the StatusList2021Credential */
|
|
1007
|
+
statusListCredential: z.ZodString;
|
|
1008
|
+
}, "strip", z.ZodTypeAny, {
|
|
1009
|
+
type: "StatusList2021Entry";
|
|
1010
|
+
id: string;
|
|
1011
|
+
statusPurpose: "revocation" | "suspension";
|
|
1012
|
+
statusListIndex: string;
|
|
1013
|
+
statusListCredential: string;
|
|
1014
|
+
}, {
|
|
1015
|
+
type: "StatusList2021Entry";
|
|
1016
|
+
id: string;
|
|
1017
|
+
statusPurpose: "revocation" | "suspension";
|
|
1018
|
+
statusListIndex: string;
|
|
1019
|
+
statusListCredential: string;
|
|
1020
|
+
}>>;
|
|
1021
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1022
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1023
|
+
type: z.ZodString;
|
|
1024
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1028
|
+
type: z.ZodString;
|
|
1029
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1031
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1033
|
+
type: z.ZodString;
|
|
1034
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1035
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1036
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1037
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1038
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1039
|
+
/** JSON-LD context */
|
|
1040
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1041
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1042
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1044
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1045
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1046
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1047
|
+
id: z.ZodString;
|
|
1048
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1049
|
+
id: z.ZodString;
|
|
1050
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1051
|
+
id: z.ZodString;
|
|
1052
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1053
|
+
/** Issuance date in ISO 8601 format */
|
|
1054
|
+
issuanceDate: z.ZodString;
|
|
1055
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1056
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
/** The subject(s) of the credential */
|
|
1058
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1059
|
+
/** Status information for revocation/suspension (optional) */
|
|
1060
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1061
|
+
/** URI of this status entry */
|
|
1062
|
+
id: z.ZodString;
|
|
1063
|
+
/** Type MUST be StatusList2021Entry */
|
|
1064
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1065
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1066
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1067
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1068
|
+
statusListIndex: z.ZodString;
|
|
1069
|
+
/** URL of the StatusList2021Credential */
|
|
1070
|
+
statusListCredential: z.ZodString;
|
|
1071
|
+
}, "strip", z.ZodTypeAny, {
|
|
1072
|
+
type: "StatusList2021Entry";
|
|
1073
|
+
id: string;
|
|
1074
|
+
statusPurpose: "revocation" | "suspension";
|
|
1075
|
+
statusListIndex: string;
|
|
1076
|
+
statusListCredential: string;
|
|
1077
|
+
}, {
|
|
1078
|
+
type: "StatusList2021Entry";
|
|
1079
|
+
id: string;
|
|
1080
|
+
statusPurpose: "revocation" | "suspension";
|
|
1081
|
+
statusListIndex: string;
|
|
1082
|
+
statusListCredential: string;
|
|
1083
|
+
}>>;
|
|
1084
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1085
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1086
|
+
type: z.ZodString;
|
|
1087
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1089
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1090
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1091
|
+
type: z.ZodString;
|
|
1092
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1095
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1096
|
+
type: z.ZodString;
|
|
1097
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1098
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1099
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1101
|
+
}, z.ZodTypeAny, "passthrough">>, "many">]>>;
|
|
1102
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1103
|
+
type: z.ZodString;
|
|
1104
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1106
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1107
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1108
|
+
type: z.ZodString;
|
|
1109
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1113
|
+
type: z.ZodString;
|
|
1114
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1118
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1119
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1120
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1121
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1122
|
+
holder: z.ZodOptional<z.ZodString>;
|
|
1123
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1124
|
+
/** JSON-LD context */
|
|
1125
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1126
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1127
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1128
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1129
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1130
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1131
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1132
|
+
id: z.ZodString;
|
|
1133
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1134
|
+
id: z.ZodString;
|
|
1135
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1136
|
+
id: z.ZodString;
|
|
1137
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1138
|
+
/** Issuance date in ISO 8601 format */
|
|
1139
|
+
issuanceDate: z.ZodString;
|
|
1140
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1141
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1142
|
+
/** The subject(s) of the credential */
|
|
1143
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1144
|
+
/** Status information for revocation/suspension (optional) */
|
|
1145
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1146
|
+
/** URI of this status entry */
|
|
1147
|
+
id: z.ZodString;
|
|
1148
|
+
/** Type MUST be StatusList2021Entry */
|
|
1149
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1150
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1151
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1152
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1153
|
+
statusListIndex: z.ZodString;
|
|
1154
|
+
/** URL of the StatusList2021Credential */
|
|
1155
|
+
statusListCredential: z.ZodString;
|
|
1156
|
+
}, "strip", z.ZodTypeAny, {
|
|
1157
|
+
type: "StatusList2021Entry";
|
|
1158
|
+
id: string;
|
|
1159
|
+
statusPurpose: "revocation" | "suspension";
|
|
1160
|
+
statusListIndex: string;
|
|
1161
|
+
statusListCredential: string;
|
|
1162
|
+
}, {
|
|
1163
|
+
type: "StatusList2021Entry";
|
|
1164
|
+
id: string;
|
|
1165
|
+
statusPurpose: "revocation" | "suspension";
|
|
1166
|
+
statusListIndex: string;
|
|
1167
|
+
statusListCredential: string;
|
|
1168
|
+
}>>;
|
|
1169
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1170
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1171
|
+
type: z.ZodString;
|
|
1172
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1174
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1175
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1176
|
+
type: z.ZodString;
|
|
1177
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1178
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1179
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1180
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1181
|
+
type: z.ZodString;
|
|
1182
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1183
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1184
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1186
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1187
|
+
/** JSON-LD context */
|
|
1188
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1189
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1190
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1192
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1193
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1194
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1195
|
+
id: z.ZodString;
|
|
1196
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1197
|
+
id: z.ZodString;
|
|
1198
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1199
|
+
id: z.ZodString;
|
|
1200
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1201
|
+
/** Issuance date in ISO 8601 format */
|
|
1202
|
+
issuanceDate: z.ZodString;
|
|
1203
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1204
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1205
|
+
/** The subject(s) of the credential */
|
|
1206
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1207
|
+
/** Status information for revocation/suspension (optional) */
|
|
1208
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1209
|
+
/** URI of this status entry */
|
|
1210
|
+
id: z.ZodString;
|
|
1211
|
+
/** Type MUST be StatusList2021Entry */
|
|
1212
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1213
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1214
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1215
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1216
|
+
statusListIndex: z.ZodString;
|
|
1217
|
+
/** URL of the StatusList2021Credential */
|
|
1218
|
+
statusListCredential: z.ZodString;
|
|
1219
|
+
}, "strip", z.ZodTypeAny, {
|
|
1220
|
+
type: "StatusList2021Entry";
|
|
1221
|
+
id: string;
|
|
1222
|
+
statusPurpose: "revocation" | "suspension";
|
|
1223
|
+
statusListIndex: string;
|
|
1224
|
+
statusListCredential: string;
|
|
1225
|
+
}, {
|
|
1226
|
+
type: "StatusList2021Entry";
|
|
1227
|
+
id: string;
|
|
1228
|
+
statusPurpose: "revocation" | "suspension";
|
|
1229
|
+
statusListIndex: string;
|
|
1230
|
+
statusListCredential: string;
|
|
1231
|
+
}>>;
|
|
1232
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1233
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1234
|
+
type: z.ZodString;
|
|
1235
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1239
|
+
type: z.ZodString;
|
|
1240
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1241
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1243
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1244
|
+
type: z.ZodString;
|
|
1245
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1246
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1249
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1250
|
+
/** JSON-LD context */
|
|
1251
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1252
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1253
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1254
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1255
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1256
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1257
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1258
|
+
id: z.ZodString;
|
|
1259
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1260
|
+
id: z.ZodString;
|
|
1261
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1262
|
+
id: z.ZodString;
|
|
1263
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1264
|
+
/** Issuance date in ISO 8601 format */
|
|
1265
|
+
issuanceDate: z.ZodString;
|
|
1266
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1267
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1268
|
+
/** The subject(s) of the credential */
|
|
1269
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1270
|
+
/** Status information for revocation/suspension (optional) */
|
|
1271
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1272
|
+
/** URI of this status entry */
|
|
1273
|
+
id: z.ZodString;
|
|
1274
|
+
/** Type MUST be StatusList2021Entry */
|
|
1275
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1276
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1277
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1278
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1279
|
+
statusListIndex: z.ZodString;
|
|
1280
|
+
/** URL of the StatusList2021Credential */
|
|
1281
|
+
statusListCredential: z.ZodString;
|
|
1282
|
+
}, "strip", z.ZodTypeAny, {
|
|
1283
|
+
type: "StatusList2021Entry";
|
|
1284
|
+
id: string;
|
|
1285
|
+
statusPurpose: "revocation" | "suspension";
|
|
1286
|
+
statusListIndex: string;
|
|
1287
|
+
statusListCredential: string;
|
|
1288
|
+
}, {
|
|
1289
|
+
type: "StatusList2021Entry";
|
|
1290
|
+
id: string;
|
|
1291
|
+
statusPurpose: "revocation" | "suspension";
|
|
1292
|
+
statusListIndex: string;
|
|
1293
|
+
statusListCredential: string;
|
|
1294
|
+
}>>;
|
|
1295
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1296
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1297
|
+
type: z.ZodString;
|
|
1298
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1299
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1300
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1302
|
+
type: z.ZodString;
|
|
1303
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1304
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1305
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1306
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1307
|
+
type: z.ZodString;
|
|
1308
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1311
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1312
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
|
|
1313
|
+
/** JSON-LD context */
|
|
1314
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1315
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1316
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1318
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1319
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1320
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1321
|
+
id: z.ZodString;
|
|
1322
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1323
|
+
id: z.ZodString;
|
|
1324
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1325
|
+
id: z.ZodString;
|
|
1326
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1327
|
+
/** Issuance date in ISO 8601 format */
|
|
1328
|
+
issuanceDate: z.ZodString;
|
|
1329
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1330
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1331
|
+
/** The subject(s) of the credential */
|
|
1332
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1333
|
+
/** Status information for revocation/suspension (optional) */
|
|
1334
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1335
|
+
/** URI of this status entry */
|
|
1336
|
+
id: z.ZodString;
|
|
1337
|
+
/** Type MUST be StatusList2021Entry */
|
|
1338
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1339
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1340
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1341
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1342
|
+
statusListIndex: z.ZodString;
|
|
1343
|
+
/** URL of the StatusList2021Credential */
|
|
1344
|
+
statusListCredential: z.ZodString;
|
|
1345
|
+
}, "strip", z.ZodTypeAny, {
|
|
1346
|
+
type: "StatusList2021Entry";
|
|
1347
|
+
id: string;
|
|
1348
|
+
statusPurpose: "revocation" | "suspension";
|
|
1349
|
+
statusListIndex: string;
|
|
1350
|
+
statusListCredential: string;
|
|
1351
|
+
}, {
|
|
1352
|
+
type: "StatusList2021Entry";
|
|
1353
|
+
id: string;
|
|
1354
|
+
statusPurpose: "revocation" | "suspension";
|
|
1355
|
+
statusListIndex: string;
|
|
1356
|
+
statusListCredential: string;
|
|
1357
|
+
}>>;
|
|
1358
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1359
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1360
|
+
type: z.ZodString;
|
|
1361
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1362
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1363
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1364
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1365
|
+
type: z.ZodString;
|
|
1366
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1367
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1368
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1370
|
+
type: z.ZodString;
|
|
1371
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1372
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1373
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1374
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1375
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1376
|
+
/** JSON-LD context */
|
|
1377
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1378
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1379
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1380
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1381
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1382
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1383
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1384
|
+
id: z.ZodString;
|
|
1385
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1386
|
+
id: z.ZodString;
|
|
1387
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1388
|
+
id: z.ZodString;
|
|
1389
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1390
|
+
/** Issuance date in ISO 8601 format */
|
|
1391
|
+
issuanceDate: z.ZodString;
|
|
1392
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1393
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1394
|
+
/** The subject(s) of the credential */
|
|
1395
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1396
|
+
/** Status information for revocation/suspension (optional) */
|
|
1397
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1398
|
+
/** URI of this status entry */
|
|
1399
|
+
id: z.ZodString;
|
|
1400
|
+
/** Type MUST be StatusList2021Entry */
|
|
1401
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1402
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1403
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1404
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1405
|
+
statusListIndex: z.ZodString;
|
|
1406
|
+
/** URL of the StatusList2021Credential */
|
|
1407
|
+
statusListCredential: z.ZodString;
|
|
1408
|
+
}, "strip", z.ZodTypeAny, {
|
|
1409
|
+
type: "StatusList2021Entry";
|
|
1410
|
+
id: string;
|
|
1411
|
+
statusPurpose: "revocation" | "suspension";
|
|
1412
|
+
statusListIndex: string;
|
|
1413
|
+
statusListCredential: string;
|
|
1414
|
+
}, {
|
|
1415
|
+
type: "StatusList2021Entry";
|
|
1416
|
+
id: string;
|
|
1417
|
+
statusPurpose: "revocation" | "suspension";
|
|
1418
|
+
statusListIndex: string;
|
|
1419
|
+
statusListCredential: string;
|
|
1420
|
+
}>>;
|
|
1421
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1422
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1423
|
+
type: z.ZodString;
|
|
1424
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1425
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1428
|
+
type: z.ZodString;
|
|
1429
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1430
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1431
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1432
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1433
|
+
type: z.ZodString;
|
|
1434
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1435
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1436
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1437
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1438
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1439
|
+
/** JSON-LD context */
|
|
1440
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1441
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1442
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1443
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1444
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1445
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1446
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1447
|
+
id: z.ZodString;
|
|
1448
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1449
|
+
id: z.ZodString;
|
|
1450
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1451
|
+
id: z.ZodString;
|
|
1452
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1453
|
+
/** Issuance date in ISO 8601 format */
|
|
1454
|
+
issuanceDate: z.ZodString;
|
|
1455
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1456
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1457
|
+
/** The subject(s) of the credential */
|
|
1458
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1459
|
+
/** Status information for revocation/suspension (optional) */
|
|
1460
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1461
|
+
/** URI of this status entry */
|
|
1462
|
+
id: z.ZodString;
|
|
1463
|
+
/** Type MUST be StatusList2021Entry */
|
|
1464
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1465
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1466
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1467
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1468
|
+
statusListIndex: z.ZodString;
|
|
1469
|
+
/** URL of the StatusList2021Credential */
|
|
1470
|
+
statusListCredential: z.ZodString;
|
|
1471
|
+
}, "strip", z.ZodTypeAny, {
|
|
1472
|
+
type: "StatusList2021Entry";
|
|
1473
|
+
id: string;
|
|
1474
|
+
statusPurpose: "revocation" | "suspension";
|
|
1475
|
+
statusListIndex: string;
|
|
1476
|
+
statusListCredential: string;
|
|
1477
|
+
}, {
|
|
1478
|
+
type: "StatusList2021Entry";
|
|
1479
|
+
id: string;
|
|
1480
|
+
statusPurpose: "revocation" | "suspension";
|
|
1481
|
+
statusListIndex: string;
|
|
1482
|
+
statusListCredential: string;
|
|
1483
|
+
}>>;
|
|
1484
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1485
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1486
|
+
type: z.ZodString;
|
|
1487
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1488
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1489
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1490
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1491
|
+
type: z.ZodString;
|
|
1492
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1493
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1494
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1495
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1496
|
+
type: z.ZodString;
|
|
1497
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1498
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1499
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1501
|
+
}, z.ZodTypeAny, "passthrough">>, "many">]>>;
|
|
1502
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1503
|
+
type: z.ZodString;
|
|
1504
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1505
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1508
|
+
type: z.ZodString;
|
|
1509
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1512
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1513
|
+
type: z.ZodString;
|
|
1514
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1515
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1518
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1519
|
+
export type VerifiablePresentation = z.infer<typeof VerifiablePresentationSchema>;
|
|
1520
|
+
/**
|
|
1521
|
+
* Validation Helpers
|
|
1522
|
+
*/
|
|
1523
|
+
/**
|
|
1524
|
+
* Validate a verifiable credential
|
|
1525
|
+
*
|
|
1526
|
+
* @param credential - The credential to validate
|
|
1527
|
+
* @returns Validation result with parsed credential or errors
|
|
1528
|
+
*/
|
|
1529
|
+
export declare function validateVerifiableCredential(credential: unknown): z.SafeParseReturnType<z.objectInputType<{
|
|
1530
|
+
/** JSON-LD context */
|
|
1531
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1532
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1533
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1534
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1535
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1536
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1537
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1538
|
+
id: z.ZodString;
|
|
1539
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1540
|
+
id: z.ZodString;
|
|
1541
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1542
|
+
id: z.ZodString;
|
|
1543
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1544
|
+
/** Issuance date in ISO 8601 format */
|
|
1545
|
+
issuanceDate: z.ZodString;
|
|
1546
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1547
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1548
|
+
/** The subject(s) of the credential */
|
|
1549
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1550
|
+
/** Status information for revocation/suspension (optional) */
|
|
1551
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1552
|
+
/** URI of this status entry */
|
|
1553
|
+
id: z.ZodString;
|
|
1554
|
+
/** Type MUST be StatusList2021Entry */
|
|
1555
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1556
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1557
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1558
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1559
|
+
statusListIndex: z.ZodString;
|
|
1560
|
+
/** URL of the StatusList2021Credential */
|
|
1561
|
+
statusListCredential: z.ZodString;
|
|
1562
|
+
}, "strip", z.ZodTypeAny, {
|
|
1563
|
+
type: "StatusList2021Entry";
|
|
1564
|
+
id: string;
|
|
1565
|
+
statusPurpose: "revocation" | "suspension";
|
|
1566
|
+
statusListIndex: string;
|
|
1567
|
+
statusListCredential: string;
|
|
1568
|
+
}, {
|
|
1569
|
+
type: "StatusList2021Entry";
|
|
1570
|
+
id: string;
|
|
1571
|
+
statusPurpose: "revocation" | "suspension";
|
|
1572
|
+
statusListIndex: string;
|
|
1573
|
+
statusListCredential: string;
|
|
1574
|
+
}>>;
|
|
1575
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1576
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1577
|
+
type: z.ZodString;
|
|
1578
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1579
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1580
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1581
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1582
|
+
type: z.ZodString;
|
|
1583
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1584
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1585
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1587
|
+
type: z.ZodString;
|
|
1588
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1589
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1590
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1591
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1592
|
+
}, z.ZodTypeAny, "passthrough">, z.objectOutputType<{
|
|
1593
|
+
/** JSON-LD context */
|
|
1594
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1595
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1596
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1597
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1598
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1599
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1600
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1601
|
+
id: z.ZodString;
|
|
1602
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1603
|
+
id: z.ZodString;
|
|
1604
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1605
|
+
id: z.ZodString;
|
|
1606
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1607
|
+
/** Issuance date in ISO 8601 format */
|
|
1608
|
+
issuanceDate: z.ZodString;
|
|
1609
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1610
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1611
|
+
/** The subject(s) of the credential */
|
|
1612
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1613
|
+
/** Status information for revocation/suspension (optional) */
|
|
1614
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1615
|
+
/** URI of this status entry */
|
|
1616
|
+
id: z.ZodString;
|
|
1617
|
+
/** Type MUST be StatusList2021Entry */
|
|
1618
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1619
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1620
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1621
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1622
|
+
statusListIndex: z.ZodString;
|
|
1623
|
+
/** URL of the StatusList2021Credential */
|
|
1624
|
+
statusListCredential: z.ZodString;
|
|
1625
|
+
}, "strip", z.ZodTypeAny, {
|
|
1626
|
+
type: "StatusList2021Entry";
|
|
1627
|
+
id: string;
|
|
1628
|
+
statusPurpose: "revocation" | "suspension";
|
|
1629
|
+
statusListIndex: string;
|
|
1630
|
+
statusListCredential: string;
|
|
1631
|
+
}, {
|
|
1632
|
+
type: "StatusList2021Entry";
|
|
1633
|
+
id: string;
|
|
1634
|
+
statusPurpose: "revocation" | "suspension";
|
|
1635
|
+
statusListIndex: string;
|
|
1636
|
+
statusListCredential: string;
|
|
1637
|
+
}>>;
|
|
1638
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1639
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1640
|
+
type: z.ZodString;
|
|
1641
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1644
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1645
|
+
type: z.ZodString;
|
|
1646
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1647
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1649
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1650
|
+
type: z.ZodString;
|
|
1651
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1652
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1653
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1654
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1655
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Validate a verifiable presentation
|
|
1658
|
+
*
|
|
1659
|
+
* @param presentation - The presentation to validate
|
|
1660
|
+
* @returns Validation result with parsed presentation or errors
|
|
1661
|
+
*/
|
|
1662
|
+
export declare function validateVerifiablePresentation(presentation: unknown): z.SafeParseReturnType<z.objectInputType<{
|
|
1663
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1664
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1665
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1666
|
+
holder: z.ZodOptional<z.ZodString>;
|
|
1667
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1668
|
+
/** JSON-LD context */
|
|
1669
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1670
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1671
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1673
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1674
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1675
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1676
|
+
id: z.ZodString;
|
|
1677
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1678
|
+
id: z.ZodString;
|
|
1679
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1680
|
+
id: z.ZodString;
|
|
1681
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1682
|
+
/** Issuance date in ISO 8601 format */
|
|
1683
|
+
issuanceDate: z.ZodString;
|
|
1684
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1685
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1686
|
+
/** The subject(s) of the credential */
|
|
1687
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1688
|
+
/** Status information for revocation/suspension (optional) */
|
|
1689
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1690
|
+
/** URI of this status entry */
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
/** Type MUST be StatusList2021Entry */
|
|
1693
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1694
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1695
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1696
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1697
|
+
statusListIndex: z.ZodString;
|
|
1698
|
+
/** URL of the StatusList2021Credential */
|
|
1699
|
+
statusListCredential: z.ZodString;
|
|
1700
|
+
}, "strip", z.ZodTypeAny, {
|
|
1701
|
+
type: "StatusList2021Entry";
|
|
1702
|
+
id: string;
|
|
1703
|
+
statusPurpose: "revocation" | "suspension";
|
|
1704
|
+
statusListIndex: string;
|
|
1705
|
+
statusListCredential: string;
|
|
1706
|
+
}, {
|
|
1707
|
+
type: "StatusList2021Entry";
|
|
1708
|
+
id: string;
|
|
1709
|
+
statusPurpose: "revocation" | "suspension";
|
|
1710
|
+
statusListIndex: string;
|
|
1711
|
+
statusListCredential: string;
|
|
1712
|
+
}>>;
|
|
1713
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1714
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1715
|
+
type: z.ZodString;
|
|
1716
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1717
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1718
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1719
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1720
|
+
type: z.ZodString;
|
|
1721
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1722
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1723
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1724
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1725
|
+
type: z.ZodString;
|
|
1726
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1727
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1728
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1730
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1731
|
+
/** JSON-LD context */
|
|
1732
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1733
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1734
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1735
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1736
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1737
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1738
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1739
|
+
id: z.ZodString;
|
|
1740
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1741
|
+
id: z.ZodString;
|
|
1742
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1743
|
+
id: z.ZodString;
|
|
1744
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1745
|
+
/** Issuance date in ISO 8601 format */
|
|
1746
|
+
issuanceDate: z.ZodString;
|
|
1747
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1748
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1749
|
+
/** The subject(s) of the credential */
|
|
1750
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1751
|
+
/** Status information for revocation/suspension (optional) */
|
|
1752
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1753
|
+
/** URI of this status entry */
|
|
1754
|
+
id: z.ZodString;
|
|
1755
|
+
/** Type MUST be StatusList2021Entry */
|
|
1756
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1757
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1758
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1759
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1760
|
+
statusListIndex: z.ZodString;
|
|
1761
|
+
/** URL of the StatusList2021Credential */
|
|
1762
|
+
statusListCredential: z.ZodString;
|
|
1763
|
+
}, "strip", z.ZodTypeAny, {
|
|
1764
|
+
type: "StatusList2021Entry";
|
|
1765
|
+
id: string;
|
|
1766
|
+
statusPurpose: "revocation" | "suspension";
|
|
1767
|
+
statusListIndex: string;
|
|
1768
|
+
statusListCredential: string;
|
|
1769
|
+
}, {
|
|
1770
|
+
type: "StatusList2021Entry";
|
|
1771
|
+
id: string;
|
|
1772
|
+
statusPurpose: "revocation" | "suspension";
|
|
1773
|
+
statusListIndex: string;
|
|
1774
|
+
statusListCredential: string;
|
|
1775
|
+
}>>;
|
|
1776
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1777
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1778
|
+
type: z.ZodString;
|
|
1779
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1780
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1781
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1782
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1783
|
+
type: z.ZodString;
|
|
1784
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1785
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1786
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1787
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1788
|
+
type: z.ZodString;
|
|
1789
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1791
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1792
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1793
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1794
|
+
/** JSON-LD context */
|
|
1795
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1796
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1797
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1798
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1799
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1800
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1801
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1802
|
+
id: z.ZodString;
|
|
1803
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1804
|
+
id: z.ZodString;
|
|
1805
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1806
|
+
id: z.ZodString;
|
|
1807
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1808
|
+
/** Issuance date in ISO 8601 format */
|
|
1809
|
+
issuanceDate: z.ZodString;
|
|
1810
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1811
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1812
|
+
/** The subject(s) of the credential */
|
|
1813
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1814
|
+
/** Status information for revocation/suspension (optional) */
|
|
1815
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1816
|
+
/** URI of this status entry */
|
|
1817
|
+
id: z.ZodString;
|
|
1818
|
+
/** Type MUST be StatusList2021Entry */
|
|
1819
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1820
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1821
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1822
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1823
|
+
statusListIndex: z.ZodString;
|
|
1824
|
+
/** URL of the StatusList2021Credential */
|
|
1825
|
+
statusListCredential: z.ZodString;
|
|
1826
|
+
}, "strip", z.ZodTypeAny, {
|
|
1827
|
+
type: "StatusList2021Entry";
|
|
1828
|
+
id: string;
|
|
1829
|
+
statusPurpose: "revocation" | "suspension";
|
|
1830
|
+
statusListIndex: string;
|
|
1831
|
+
statusListCredential: string;
|
|
1832
|
+
}, {
|
|
1833
|
+
type: "StatusList2021Entry";
|
|
1834
|
+
id: string;
|
|
1835
|
+
statusPurpose: "revocation" | "suspension";
|
|
1836
|
+
statusListIndex: string;
|
|
1837
|
+
statusListCredential: string;
|
|
1838
|
+
}>>;
|
|
1839
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1840
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1841
|
+
type: z.ZodString;
|
|
1842
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1843
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1844
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1845
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1846
|
+
type: z.ZodString;
|
|
1847
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1848
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1849
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1850
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1851
|
+
type: z.ZodString;
|
|
1852
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1853
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1856
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
|
|
1857
|
+
/** JSON-LD context */
|
|
1858
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1859
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1860
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1862
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1863
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1864
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1865
|
+
id: z.ZodString;
|
|
1866
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1867
|
+
id: z.ZodString;
|
|
1868
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1869
|
+
id: z.ZodString;
|
|
1870
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1871
|
+
/** Issuance date in ISO 8601 format */
|
|
1872
|
+
issuanceDate: z.ZodString;
|
|
1873
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1874
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1875
|
+
/** The subject(s) of the credential */
|
|
1876
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1877
|
+
/** Status information for revocation/suspension (optional) */
|
|
1878
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1879
|
+
/** URI of this status entry */
|
|
1880
|
+
id: z.ZodString;
|
|
1881
|
+
/** Type MUST be StatusList2021Entry */
|
|
1882
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1883
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1884
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1885
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1886
|
+
statusListIndex: z.ZodString;
|
|
1887
|
+
/** URL of the StatusList2021Credential */
|
|
1888
|
+
statusListCredential: z.ZodString;
|
|
1889
|
+
}, "strip", z.ZodTypeAny, {
|
|
1890
|
+
type: "StatusList2021Entry";
|
|
1891
|
+
id: string;
|
|
1892
|
+
statusPurpose: "revocation" | "suspension";
|
|
1893
|
+
statusListIndex: string;
|
|
1894
|
+
statusListCredential: string;
|
|
1895
|
+
}, {
|
|
1896
|
+
type: "StatusList2021Entry";
|
|
1897
|
+
id: string;
|
|
1898
|
+
statusPurpose: "revocation" | "suspension";
|
|
1899
|
+
statusListIndex: string;
|
|
1900
|
+
statusListCredential: string;
|
|
1901
|
+
}>>;
|
|
1902
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1903
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1904
|
+
type: z.ZodString;
|
|
1905
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1906
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1907
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1908
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1909
|
+
type: z.ZodString;
|
|
1910
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1911
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1912
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1913
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1914
|
+
type: z.ZodString;
|
|
1915
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1916
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1917
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1918
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1919
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1920
|
+
/** JSON-LD context */
|
|
1921
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1922
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1923
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1924
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1925
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1926
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1927
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1928
|
+
id: z.ZodString;
|
|
1929
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1930
|
+
id: z.ZodString;
|
|
1931
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1932
|
+
id: z.ZodString;
|
|
1933
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1934
|
+
/** Issuance date in ISO 8601 format */
|
|
1935
|
+
issuanceDate: z.ZodString;
|
|
1936
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
1937
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
1938
|
+
/** The subject(s) of the credential */
|
|
1939
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
1940
|
+
/** Status information for revocation/suspension (optional) */
|
|
1941
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
1942
|
+
/** URI of this status entry */
|
|
1943
|
+
id: z.ZodString;
|
|
1944
|
+
/** Type MUST be StatusList2021Entry */
|
|
1945
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
1946
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
1947
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
1948
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
1949
|
+
statusListIndex: z.ZodString;
|
|
1950
|
+
/** URL of the StatusList2021Credential */
|
|
1951
|
+
statusListCredential: z.ZodString;
|
|
1952
|
+
}, "strip", z.ZodTypeAny, {
|
|
1953
|
+
type: "StatusList2021Entry";
|
|
1954
|
+
id: string;
|
|
1955
|
+
statusPurpose: "revocation" | "suspension";
|
|
1956
|
+
statusListIndex: string;
|
|
1957
|
+
statusListCredential: string;
|
|
1958
|
+
}, {
|
|
1959
|
+
type: "StatusList2021Entry";
|
|
1960
|
+
id: string;
|
|
1961
|
+
statusPurpose: "revocation" | "suspension";
|
|
1962
|
+
statusListIndex: string;
|
|
1963
|
+
statusListCredential: string;
|
|
1964
|
+
}>>;
|
|
1965
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
1966
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
1967
|
+
type: z.ZodString;
|
|
1968
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1969
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1970
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1971
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1972
|
+
type: z.ZodString;
|
|
1973
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1974
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1975
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1976
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1977
|
+
type: z.ZodString;
|
|
1978
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1979
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
1980
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
1981
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1982
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1983
|
+
/** JSON-LD context */
|
|
1984
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
1985
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
1986
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1987
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
1988
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
1989
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
1990
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1991
|
+
id: z.ZodString;
|
|
1992
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1993
|
+
id: z.ZodString;
|
|
1994
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1995
|
+
id: z.ZodString;
|
|
1996
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
1997
|
+
/** Issuance date in ISO 8601 format */
|
|
1998
|
+
issuanceDate: z.ZodString;
|
|
1999
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2000
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2001
|
+
/** The subject(s) of the credential */
|
|
2002
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2003
|
+
/** Status information for revocation/suspension (optional) */
|
|
2004
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2005
|
+
/** URI of this status entry */
|
|
2006
|
+
id: z.ZodString;
|
|
2007
|
+
/** Type MUST be StatusList2021Entry */
|
|
2008
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2009
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2010
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2011
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2012
|
+
statusListIndex: z.ZodString;
|
|
2013
|
+
/** URL of the StatusList2021Credential */
|
|
2014
|
+
statusListCredential: z.ZodString;
|
|
2015
|
+
}, "strip", z.ZodTypeAny, {
|
|
2016
|
+
type: "StatusList2021Entry";
|
|
2017
|
+
id: string;
|
|
2018
|
+
statusPurpose: "revocation" | "suspension";
|
|
2019
|
+
statusListIndex: string;
|
|
2020
|
+
statusListCredential: string;
|
|
2021
|
+
}, {
|
|
2022
|
+
type: "StatusList2021Entry";
|
|
2023
|
+
id: string;
|
|
2024
|
+
statusPurpose: "revocation" | "suspension";
|
|
2025
|
+
statusListIndex: string;
|
|
2026
|
+
statusListCredential: string;
|
|
2027
|
+
}>>;
|
|
2028
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2029
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2030
|
+
type: z.ZodString;
|
|
2031
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2032
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2033
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2034
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2035
|
+
type: z.ZodString;
|
|
2036
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2037
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2038
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2039
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2040
|
+
type: z.ZodString;
|
|
2041
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2042
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2044
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2045
|
+
}, z.ZodTypeAny, "passthrough">>, "many">]>>;
|
|
2046
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2047
|
+
type: z.ZodString;
|
|
2048
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2049
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2050
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2051
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2052
|
+
type: z.ZodString;
|
|
2053
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2054
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2055
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2056
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2057
|
+
type: z.ZodString;
|
|
2058
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2059
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2060
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2061
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2062
|
+
}, z.ZodTypeAny, "passthrough">, z.objectOutputType<{
|
|
2063
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2064
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2065
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2066
|
+
holder: z.ZodOptional<z.ZodString>;
|
|
2067
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
2068
|
+
/** JSON-LD context */
|
|
2069
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2070
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2071
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2072
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2073
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2074
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2075
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2076
|
+
id: z.ZodString;
|
|
2077
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2078
|
+
id: z.ZodString;
|
|
2079
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2080
|
+
id: z.ZodString;
|
|
2081
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2082
|
+
/** Issuance date in ISO 8601 format */
|
|
2083
|
+
issuanceDate: z.ZodString;
|
|
2084
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2085
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2086
|
+
/** The subject(s) of the credential */
|
|
2087
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2088
|
+
/** Status information for revocation/suspension (optional) */
|
|
2089
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2090
|
+
/** URI of this status entry */
|
|
2091
|
+
id: z.ZodString;
|
|
2092
|
+
/** Type MUST be StatusList2021Entry */
|
|
2093
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2094
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2095
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2096
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2097
|
+
statusListIndex: z.ZodString;
|
|
2098
|
+
/** URL of the StatusList2021Credential */
|
|
2099
|
+
statusListCredential: z.ZodString;
|
|
2100
|
+
}, "strip", z.ZodTypeAny, {
|
|
2101
|
+
type: "StatusList2021Entry";
|
|
2102
|
+
id: string;
|
|
2103
|
+
statusPurpose: "revocation" | "suspension";
|
|
2104
|
+
statusListIndex: string;
|
|
2105
|
+
statusListCredential: string;
|
|
2106
|
+
}, {
|
|
2107
|
+
type: "StatusList2021Entry";
|
|
2108
|
+
id: string;
|
|
2109
|
+
statusPurpose: "revocation" | "suspension";
|
|
2110
|
+
statusListIndex: string;
|
|
2111
|
+
statusListCredential: string;
|
|
2112
|
+
}>>;
|
|
2113
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2114
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2115
|
+
type: z.ZodString;
|
|
2116
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2117
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2118
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2119
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2120
|
+
type: z.ZodString;
|
|
2121
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2122
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2124
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2125
|
+
type: z.ZodString;
|
|
2126
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2127
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2128
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2129
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2130
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2131
|
+
/** JSON-LD context */
|
|
2132
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2133
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2134
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2135
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2136
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2137
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2138
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2139
|
+
id: z.ZodString;
|
|
2140
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2141
|
+
id: z.ZodString;
|
|
2142
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2143
|
+
id: z.ZodString;
|
|
2144
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2145
|
+
/** Issuance date in ISO 8601 format */
|
|
2146
|
+
issuanceDate: z.ZodString;
|
|
2147
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2148
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2149
|
+
/** The subject(s) of the credential */
|
|
2150
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2151
|
+
/** Status information for revocation/suspension (optional) */
|
|
2152
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2153
|
+
/** URI of this status entry */
|
|
2154
|
+
id: z.ZodString;
|
|
2155
|
+
/** Type MUST be StatusList2021Entry */
|
|
2156
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2157
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2158
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2159
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2160
|
+
statusListIndex: z.ZodString;
|
|
2161
|
+
/** URL of the StatusList2021Credential */
|
|
2162
|
+
statusListCredential: z.ZodString;
|
|
2163
|
+
}, "strip", z.ZodTypeAny, {
|
|
2164
|
+
type: "StatusList2021Entry";
|
|
2165
|
+
id: string;
|
|
2166
|
+
statusPurpose: "revocation" | "suspension";
|
|
2167
|
+
statusListIndex: string;
|
|
2168
|
+
statusListCredential: string;
|
|
2169
|
+
}, {
|
|
2170
|
+
type: "StatusList2021Entry";
|
|
2171
|
+
id: string;
|
|
2172
|
+
statusPurpose: "revocation" | "suspension";
|
|
2173
|
+
statusListIndex: string;
|
|
2174
|
+
statusListCredential: string;
|
|
2175
|
+
}>>;
|
|
2176
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2177
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2178
|
+
type: z.ZodString;
|
|
2179
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2180
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2181
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2182
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2183
|
+
type: z.ZodString;
|
|
2184
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2185
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2186
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2187
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2188
|
+
type: z.ZodString;
|
|
2189
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2190
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2191
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2192
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2193
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2194
|
+
/** JSON-LD context */
|
|
2195
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2196
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2197
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2198
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2199
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2200
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2201
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2202
|
+
id: z.ZodString;
|
|
2203
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2204
|
+
id: z.ZodString;
|
|
2205
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2206
|
+
id: z.ZodString;
|
|
2207
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2208
|
+
/** Issuance date in ISO 8601 format */
|
|
2209
|
+
issuanceDate: z.ZodString;
|
|
2210
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2211
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2212
|
+
/** The subject(s) of the credential */
|
|
2213
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2214
|
+
/** Status information for revocation/suspension (optional) */
|
|
2215
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2216
|
+
/** URI of this status entry */
|
|
2217
|
+
id: z.ZodString;
|
|
2218
|
+
/** Type MUST be StatusList2021Entry */
|
|
2219
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2220
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2221
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2222
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2223
|
+
statusListIndex: z.ZodString;
|
|
2224
|
+
/** URL of the StatusList2021Credential */
|
|
2225
|
+
statusListCredential: z.ZodString;
|
|
2226
|
+
}, "strip", z.ZodTypeAny, {
|
|
2227
|
+
type: "StatusList2021Entry";
|
|
2228
|
+
id: string;
|
|
2229
|
+
statusPurpose: "revocation" | "suspension";
|
|
2230
|
+
statusListIndex: string;
|
|
2231
|
+
statusListCredential: string;
|
|
2232
|
+
}, {
|
|
2233
|
+
type: "StatusList2021Entry";
|
|
2234
|
+
id: string;
|
|
2235
|
+
statusPurpose: "revocation" | "suspension";
|
|
2236
|
+
statusListIndex: string;
|
|
2237
|
+
statusListCredential: string;
|
|
2238
|
+
}>>;
|
|
2239
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2240
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2241
|
+
type: z.ZodString;
|
|
2242
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2243
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2244
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2245
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2246
|
+
type: z.ZodString;
|
|
2247
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2248
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2249
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2250
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2251
|
+
type: z.ZodString;
|
|
2252
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2253
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2254
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2255
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2256
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodArray<z.ZodObject<{
|
|
2257
|
+
/** JSON-LD context */
|
|
2258
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2259
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2260
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2261
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2262
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2263
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2264
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2265
|
+
id: z.ZodString;
|
|
2266
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2267
|
+
id: z.ZodString;
|
|
2268
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2269
|
+
id: z.ZodString;
|
|
2270
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2271
|
+
/** Issuance date in ISO 8601 format */
|
|
2272
|
+
issuanceDate: z.ZodString;
|
|
2273
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2274
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2275
|
+
/** The subject(s) of the credential */
|
|
2276
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2277
|
+
/** Status information for revocation/suspension (optional) */
|
|
2278
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2279
|
+
/** URI of this status entry */
|
|
2280
|
+
id: z.ZodString;
|
|
2281
|
+
/** Type MUST be StatusList2021Entry */
|
|
2282
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2283
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2284
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2285
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2286
|
+
statusListIndex: z.ZodString;
|
|
2287
|
+
/** URL of the StatusList2021Credential */
|
|
2288
|
+
statusListCredential: z.ZodString;
|
|
2289
|
+
}, "strip", z.ZodTypeAny, {
|
|
2290
|
+
type: "StatusList2021Entry";
|
|
2291
|
+
id: string;
|
|
2292
|
+
statusPurpose: "revocation" | "suspension";
|
|
2293
|
+
statusListIndex: string;
|
|
2294
|
+
statusListCredential: string;
|
|
2295
|
+
}, {
|
|
2296
|
+
type: "StatusList2021Entry";
|
|
2297
|
+
id: string;
|
|
2298
|
+
statusPurpose: "revocation" | "suspension";
|
|
2299
|
+
statusListIndex: string;
|
|
2300
|
+
statusListCredential: string;
|
|
2301
|
+
}>>;
|
|
2302
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2303
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2304
|
+
type: z.ZodString;
|
|
2305
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2306
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2307
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2308
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2309
|
+
type: z.ZodString;
|
|
2310
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2311
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2312
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2313
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2314
|
+
type: z.ZodString;
|
|
2315
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2316
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2317
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2318
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2319
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2320
|
+
/** JSON-LD context */
|
|
2321
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2322
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2323
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2324
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2325
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2326
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2327
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2328
|
+
id: z.ZodString;
|
|
2329
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2330
|
+
id: z.ZodString;
|
|
2331
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2332
|
+
id: z.ZodString;
|
|
2333
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2334
|
+
/** Issuance date in ISO 8601 format */
|
|
2335
|
+
issuanceDate: z.ZodString;
|
|
2336
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2337
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2338
|
+
/** The subject(s) of the credential */
|
|
2339
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2340
|
+
/** Status information for revocation/suspension (optional) */
|
|
2341
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2342
|
+
/** URI of this status entry */
|
|
2343
|
+
id: z.ZodString;
|
|
2344
|
+
/** Type MUST be StatusList2021Entry */
|
|
2345
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2346
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2347
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2348
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2349
|
+
statusListIndex: z.ZodString;
|
|
2350
|
+
/** URL of the StatusList2021Credential */
|
|
2351
|
+
statusListCredential: z.ZodString;
|
|
2352
|
+
}, "strip", z.ZodTypeAny, {
|
|
2353
|
+
type: "StatusList2021Entry";
|
|
2354
|
+
id: string;
|
|
2355
|
+
statusPurpose: "revocation" | "suspension";
|
|
2356
|
+
statusListIndex: string;
|
|
2357
|
+
statusListCredential: string;
|
|
2358
|
+
}, {
|
|
2359
|
+
type: "StatusList2021Entry";
|
|
2360
|
+
id: string;
|
|
2361
|
+
statusPurpose: "revocation" | "suspension";
|
|
2362
|
+
statusListIndex: string;
|
|
2363
|
+
statusListCredential: string;
|
|
2364
|
+
}>>;
|
|
2365
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2366
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2367
|
+
type: z.ZodString;
|
|
2368
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2369
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2370
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2371
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2372
|
+
type: z.ZodString;
|
|
2373
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2374
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2375
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2376
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2377
|
+
type: z.ZodString;
|
|
2378
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2379
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2380
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2381
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2382
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2383
|
+
/** JSON-LD context */
|
|
2384
|
+
'@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "atleastone">, [string | Record<string, any>, ...(string | Record<string, any>)[]], [string | Record<string, any>, ...(string | Record<string, any>)[]]>;
|
|
2385
|
+
/** Unique identifier for the credential (optional per spec) */
|
|
2386
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2387
|
+
/** Type of the credential, MUST include "VerifiableCredential" */
|
|
2388
|
+
type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
2389
|
+
/** Issuer of the credential (DID or issuer object) */
|
|
2390
|
+
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2391
|
+
id: z.ZodString;
|
|
2392
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2393
|
+
id: z.ZodString;
|
|
2394
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2395
|
+
id: z.ZodString;
|
|
2396
|
+
}, z.ZodTypeAny, "passthrough">>]>;
|
|
2397
|
+
/** Issuance date in ISO 8601 format */
|
|
2398
|
+
issuanceDate: z.ZodString;
|
|
2399
|
+
/** Expiration date in ISO 8601 format (optional) */
|
|
2400
|
+
expirationDate: z.ZodOptional<z.ZodString>;
|
|
2401
|
+
/** The subject(s) of the credential */
|
|
2402
|
+
credentialSubject: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">]>;
|
|
2403
|
+
/** Status information for revocation/suspension (optional) */
|
|
2404
|
+
credentialStatus: z.ZodOptional<z.ZodObject<{
|
|
2405
|
+
/** URI of this status entry */
|
|
2406
|
+
id: z.ZodString;
|
|
2407
|
+
/** Type MUST be StatusList2021Entry */
|
|
2408
|
+
type: z.ZodLiteral<"StatusList2021Entry">;
|
|
2409
|
+
/** Purpose of the status list (revocation or suspension) */
|
|
2410
|
+
statusPurpose: z.ZodEnum<["revocation", "suspension"]>;
|
|
2411
|
+
/** Index of this credential in the status list (as string per spec) */
|
|
2412
|
+
statusListIndex: z.ZodString;
|
|
2413
|
+
/** URL of the StatusList2021Credential */
|
|
2414
|
+
statusListCredential: z.ZodString;
|
|
2415
|
+
}, "strip", z.ZodTypeAny, {
|
|
2416
|
+
type: "StatusList2021Entry";
|
|
2417
|
+
id: string;
|
|
2418
|
+
statusPurpose: "revocation" | "suspension";
|
|
2419
|
+
statusListIndex: string;
|
|
2420
|
+
statusListCredential: string;
|
|
2421
|
+
}, {
|
|
2422
|
+
type: "StatusList2021Entry";
|
|
2423
|
+
id: string;
|
|
2424
|
+
statusPurpose: "revocation" | "suspension";
|
|
2425
|
+
statusListIndex: string;
|
|
2426
|
+
statusListCredential: string;
|
|
2427
|
+
}>>;
|
|
2428
|
+
/** Cryptographic proof (optional, may be added as external proof) */
|
|
2429
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2430
|
+
type: z.ZodString;
|
|
2431
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2432
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2433
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2434
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2435
|
+
type: z.ZodString;
|
|
2436
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2437
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2438
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2439
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2440
|
+
type: z.ZodString;
|
|
2441
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2442
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2443
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2444
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2445
|
+
}, z.ZodTypeAny, "passthrough">>, "many">]>>;
|
|
2446
|
+
proof: z.ZodOptional<z.ZodObject<{
|
|
2447
|
+
type: z.ZodString;
|
|
2448
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2449
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2450
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2451
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2452
|
+
type: z.ZodString;
|
|
2453
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2454
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2455
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2456
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2457
|
+
type: z.ZodString;
|
|
2458
|
+
created: z.ZodOptional<z.ZodString>;
|
|
2459
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
2460
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
2461
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
2462
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2463
|
+
/**
|
|
2464
|
+
* Check if a credential is expired
|
|
2465
|
+
*
|
|
2466
|
+
* @param credential - The credential to check
|
|
2467
|
+
* @returns true if expired, false otherwise
|
|
2468
|
+
*/
|
|
2469
|
+
export declare function isCredentialExpired(credential: VerifiableCredential): boolean;
|
|
2470
|
+
/**
|
|
2471
|
+
* Extract issuer DID from credential
|
|
2472
|
+
*
|
|
2473
|
+
* @param credential - The credential
|
|
2474
|
+
* @returns The issuer DID string
|
|
2475
|
+
*/
|
|
2476
|
+
export declare function getIssuerDid(credential: VerifiableCredential): string;
|
|
2477
|
+
/**
|
|
2478
|
+
* Extract credential subject DID (if present)
|
|
2479
|
+
*
|
|
2480
|
+
* @param credential - The credential
|
|
2481
|
+
* @returns The subject DID or null if not present
|
|
2482
|
+
*/
|
|
2483
|
+
export declare function getSubjectDid(credential: VerifiableCredential): string | null;
|