dcql 0.2.18 → 0.2.19
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/LICENSE +201 -0
- package/README.md +131 -0
- package/dist/index.d.mts +2885 -0
- package/dist/index.d.ts +2885 -0
- package/dist/index.js +1014 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +951 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -23
- package/dist/src/dcql-error/e-base.d.ts +0 -15
- package/dist/src/dcql-error/e-base.d.ts.map +0 -1
- package/dist/src/dcql-error/e-base.js +0 -78
- package/dist/src/dcql-error/e-base.js.map +0 -1
- package/dist/src/dcql-error/e-dcql.d.ts +0 -50
- package/dist/src/dcql-error/e-dcql.d.ts.map +0 -1
- package/dist/src/dcql-error/e-dcql.js +0 -53
- package/dist/src/dcql-error/e-dcql.js.map +0 -1
- package/dist/src/dcql-error/index.d.ts +0 -3
- package/dist/src/dcql-error/index.d.ts.map +0 -1
- package/dist/src/dcql-error/index.js +0 -23
- package/dist/src/dcql-error/index.js.map +0 -1
- package/dist/src/dcql-parser/claims-path.test.d.ts +0 -2
- package/dist/src/dcql-parser/claims-path.test.d.ts.map +0 -1
- package/dist/src/dcql-parser/claims-path.test.js +0 -103
- package/dist/src/dcql-parser/claims-path.test.js.map +0 -1
- package/dist/src/dcql-parser/dcql-claims-query-result.d.ts +0 -25
- package/dist/src/dcql-parser/dcql-claims-query-result.d.ts.map +0 -1
- package/dist/src/dcql-parser/dcql-claims-query-result.js +0 -179
- package/dist/src/dcql-parser/dcql-claims-query-result.js.map +0 -1
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts +0 -8
- package/dist/src/dcql-parser/dcql-credential-query-result.d.ts.map +0 -1
- package/dist/src/dcql-parser/dcql-credential-query-result.js +0 -65
- package/dist/src/dcql-parser/dcql-credential-query-result.js.map +0 -1
- package/dist/src/dcql-presentation/index.d.ts +0 -4
- package/dist/src/dcql-presentation/index.d.ts.map +0 -1
- package/dist/src/dcql-presentation/index.js +0 -13
- package/dist/src/dcql-presentation/index.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts +0 -59
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js +0 -55
- package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts +0 -660
- package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js +0 -132
- package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation.d.ts +0 -14
- package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +0 -1
- package/dist/src/dcql-presentation/m-dcql-presentation.js +0 -42
- package/dist/src/dcql-presentation/m-dcql-presentation.js.map +0 -1
- package/dist/src/dcql-query/dcql-query-complex.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query-complex.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query-complex.test.js +0 -3204
- package/dist/src/dcql-query/dcql-query-complex.test.js.map +0 -1
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.js +0 -188
- package/dist/src/dcql-query/dcql-query-with-json-transform.test.js.map +0 -1
- package/dist/src/dcql-query/dcql-query.test.d.ts +0 -2
- package/dist/src/dcql-query/dcql-query.test.d.ts.map +0 -1
- package/dist/src/dcql-query/dcql-query.test.js +0 -378
- package/dist/src/dcql-query/dcql-query.test.js.map +0 -1
- package/dist/src/dcql-query/index.d.ts +0 -5
- package/dist/src/dcql-query/index.d.ts.map +0 -1
- package/dist/src/dcql-query/index.js +0 -12
- package/dist/src/dcql-query/index.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts +0 -35
- package/dist/src/dcql-query/m-dcql-claims-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-claims-query.js +0 -57
- package/dist/src/dcql-query/m-dcql-claims-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts +0 -186
- package/dist/src/dcql-query/m-dcql-credential-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-query.js +0 -85
- package/dist/src/dcql-query/m-dcql-credential-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts +0 -18
- package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-credential-set-query.js +0 -41
- package/dist/src/dcql-query/m-dcql-credential-set-query.js.map +0 -1
- package/dist/src/dcql-query/m-dcql-query.d.ts +0 -843
- package/dist/src/dcql-query/m-dcql-query.d.ts.map +0 -1
- package/dist/src/dcql-query/m-dcql-query.js +0 -89
- package/dist/src/dcql-query/m-dcql-query.js.map +0 -1
- package/dist/src/dcql-query-result/index.d.ts +0 -3
- package/dist/src/dcql-query-result/index.d.ts.map +0 -1
- package/dist/src/dcql-query-result/index.js +0 -8
- package/dist/src/dcql-query-result/index.js.map +0 -1
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +0 -883
- package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +0 -1
- package/dist/src/dcql-query-result/m-dcql-query-result.js +0 -69
- package/dist/src/dcql-query-result/m-dcql-query-result.js.map +0 -1
- package/dist/src/dcql-query-result/run-dcql-query.d.ts +0 -8
- package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +0 -1
- package/dist/src/dcql-query-result/run-dcql-query.js +0 -56
- package/dist/src/dcql-query-result/run-dcql-query.js.map +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -27
- package/dist/src/index.js.map +0 -1
- package/dist/src/u-dcql-credential.d.ts +0 -104
- package/dist/src/u-dcql-credential.d.ts.map +0 -1
- package/dist/src/u-dcql-credential.js +0 -84
- package/dist/src/u-dcql-credential.js.map +0 -1
- package/dist/src/u-dcql.d.ts +0 -17
- package/dist/src/u-dcql.d.ts.map +0 -1
- package/dist/src/u-dcql.js +0 -98
- package/dist/src/u-dcql.js.map +0 -1
- package/dist/src/u-model.d.ts +0 -27
- package/dist/src/u-model.d.ts.map +0 -1
- package/dist/src/u-model.js +0 -65
- package/dist/src/u-model.js.map +0 -1
package/dist/index.d.mts
ADDED
@@ -0,0 +1,2885 @@
|
|
1
|
+
import * as v from 'valibot';
|
2
|
+
|
3
|
+
declare function getCauseFromUnknown(cause: unknown): Error | undefined;
|
4
|
+
declare function getDcqlErrorFromUnknown(cause: unknown): DcqlError;
|
5
|
+
type DCQL_ERROR_CODE = 'PARSE_ERROR' | 'INTERNAL_SERVER_ERROR' | 'NOT_IMPLEMENTED' | 'BAD_REQUEST';
|
6
|
+
declare class DcqlError extends Error {
|
7
|
+
readonly cause?: Error;
|
8
|
+
readonly code: DCQL_ERROR_CODE;
|
9
|
+
constructor(opts: {
|
10
|
+
message?: string;
|
11
|
+
code: DCQL_ERROR_CODE;
|
12
|
+
cause?: unknown;
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
declare class DcqlCredentialSetError extends DcqlError {
|
17
|
+
constructor(opts: {
|
18
|
+
message: string;
|
19
|
+
cause?: unknown;
|
20
|
+
});
|
21
|
+
}
|
22
|
+
declare class DcqlUndefinedClaimSetIdError extends DcqlError {
|
23
|
+
constructor(opts: {
|
24
|
+
message: string;
|
25
|
+
cause?: unknown;
|
26
|
+
});
|
27
|
+
}
|
28
|
+
declare class DcqlNonUniqueCredentialQueryIdsError extends DcqlError {
|
29
|
+
constructor(opts: {
|
30
|
+
message: string;
|
31
|
+
cause?: unknown;
|
32
|
+
});
|
33
|
+
}
|
34
|
+
declare class DcqlParseError extends DcqlError {
|
35
|
+
constructor(opts: {
|
36
|
+
message: string;
|
37
|
+
cause?: unknown;
|
38
|
+
});
|
39
|
+
}
|
40
|
+
declare class DcqlInvalidClaimsQueryIdError extends DcqlError {
|
41
|
+
constructor(opts: {
|
42
|
+
message: string;
|
43
|
+
cause?: unknown;
|
44
|
+
});
|
45
|
+
}
|
46
|
+
declare class DcqlMissingClaimSetParseError extends DcqlError {
|
47
|
+
constructor(opts: {
|
48
|
+
message: string;
|
49
|
+
cause?: unknown;
|
50
|
+
});
|
51
|
+
}
|
52
|
+
declare class DcqlInvalidPresentationRecordError extends DcqlError {
|
53
|
+
constructor(opts: {
|
54
|
+
message: string;
|
55
|
+
cause?: unknown;
|
56
|
+
});
|
57
|
+
}
|
58
|
+
declare class DcqlPresentationResultError extends DcqlError {
|
59
|
+
constructor(opts: {
|
60
|
+
message: string;
|
61
|
+
cause?: unknown;
|
62
|
+
});
|
63
|
+
}
|
64
|
+
|
65
|
+
type UnknownBaseSchema = v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>;
|
66
|
+
type EnsureOutputAssignableToInput<T extends UnknownBaseSchema> = v.InferOutput<T> extends v.InferInput<T> ? T : never;
|
67
|
+
declare class Model<T extends UnknownBaseSchema> {
|
68
|
+
private input;
|
69
|
+
constructor(input: {
|
70
|
+
vModel: EnsureOutputAssignableToInput<T>;
|
71
|
+
});
|
72
|
+
get v(): EnsureOutputAssignableToInput<T>;
|
73
|
+
parse(input: T): DcqlParseError | v.InferOutput<T>;
|
74
|
+
safeParse(input: unknown): {
|
75
|
+
success: true;
|
76
|
+
output: v.InferOutput<T>;
|
77
|
+
} | {
|
78
|
+
success: false;
|
79
|
+
flattened: v.FlatErrors<T>;
|
80
|
+
error: v.ValiError<T>;
|
81
|
+
};
|
82
|
+
is(input: unknown): input is v.InferOutput<T>;
|
83
|
+
}
|
84
|
+
type InferModelTypes<T extends Model<any>> = T extends Model<infer U> ? {
|
85
|
+
Input: v.InferInput<U>;
|
86
|
+
Output: v.InferOutput<U>;
|
87
|
+
} : never;
|
88
|
+
|
89
|
+
type Json = string | number | boolean | null | {
|
90
|
+
[key: string]: Json;
|
91
|
+
} | Json[];
|
92
|
+
|
93
|
+
declare namespace DcqlMdocPresentation {
|
94
|
+
const vModel: v.ObjectSchema<{
|
95
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
96
|
+
readonly doctype: v.StringSchema<undefined>;
|
97
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
98
|
+
}, undefined>;
|
99
|
+
const model: Model<v.ObjectSchema<{
|
100
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
101
|
+
readonly doctype: v.StringSchema<undefined>;
|
102
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
103
|
+
}, undefined>>;
|
104
|
+
type Model = InferModelTypes<typeof model>;
|
105
|
+
}
|
106
|
+
type DcqlMdocPresentation = DcqlMdocPresentation.Model['Output'];
|
107
|
+
declare namespace DcqlSdJwtVcPresentation {
|
108
|
+
const vModel: v.ObjectSchema<{
|
109
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
110
|
+
readonly vct: v.StringSchema<undefined>;
|
111
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
112
|
+
}, undefined>;
|
113
|
+
const model: Model<v.ObjectSchema<{
|
114
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
115
|
+
readonly vct: v.StringSchema<undefined>;
|
116
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
117
|
+
}, undefined>>;
|
118
|
+
type Model = InferModelTypes<typeof model>;
|
119
|
+
}
|
120
|
+
type DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation.Model['Output'];
|
121
|
+
declare namespace DcqlW3cVcPresentation {
|
122
|
+
const vModel: v.ObjectSchema<{
|
123
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
124
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
125
|
+
}, undefined>;
|
126
|
+
const model: Model<v.ObjectSchema<{
|
127
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
128
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
129
|
+
}, undefined>>;
|
130
|
+
type Model = InferModelTypes<typeof model>;
|
131
|
+
}
|
132
|
+
type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
|
133
|
+
declare namespace DcqlCredentialPresentation {
|
134
|
+
const model: Model<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
135
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
136
|
+
readonly doctype: v.StringSchema<undefined>;
|
137
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
138
|
+
}, undefined>, v.ObjectSchema<{
|
139
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
140
|
+
readonly vct: v.StringSchema<undefined>;
|
141
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
142
|
+
}, undefined>, v.ObjectSchema<{
|
143
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
144
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
145
|
+
}, undefined>], undefined>>;
|
146
|
+
type Model = InferModelTypes<typeof model>;
|
147
|
+
}
|
148
|
+
type DcqlCredentialPresentation = DcqlCredentialPresentation.Model['Output'];
|
149
|
+
|
150
|
+
declare namespace DcqlQueryResult {
|
151
|
+
const vCredentialQueryResult: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
|
152
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
153
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
154
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
|
155
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
156
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
157
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
158
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
159
|
+
readonly doctype: v.StringSchema<undefined>;
|
160
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
161
|
+
}, undefined>, v.ObjectSchema<{
|
162
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
163
|
+
readonly vct: v.StringSchema<undefined>;
|
164
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
165
|
+
}, undefined>, v.ObjectSchema<{
|
166
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
167
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
168
|
+
}, undefined>], undefined>;
|
169
|
+
}, undefined>, v.ObjectSchema<{
|
170
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
171
|
+
readonly typed: v.BooleanSchema<undefined>;
|
172
|
+
readonly output: v.UnknownSchema;
|
173
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
174
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
175
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
176
|
+
}, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
|
177
|
+
output: {
|
178
|
+
credential_format: "mso_mdoc";
|
179
|
+
doctype: string;
|
180
|
+
namespaces: {
|
181
|
+
[x: string]: {
|
182
|
+
[x: string]: unknown;
|
183
|
+
};
|
184
|
+
};
|
185
|
+
} | {
|
186
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
187
|
+
vct: string;
|
188
|
+
claims: {
|
189
|
+
[x: string]: Json;
|
190
|
+
};
|
191
|
+
} | {
|
192
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
193
|
+
claims: {
|
194
|
+
[x: string]: Json;
|
195
|
+
};
|
196
|
+
};
|
197
|
+
success: true;
|
198
|
+
typed: true;
|
199
|
+
claim_set_index: number | undefined;
|
200
|
+
input_credential_index: number;
|
201
|
+
issues?: undefined;
|
202
|
+
} | {
|
203
|
+
output: unknown;
|
204
|
+
issues: [unknown, ...unknown[]];
|
205
|
+
success: false;
|
206
|
+
typed: boolean;
|
207
|
+
claim_set_index: number | undefined;
|
208
|
+
input_credential_index: number;
|
209
|
+
} | undefined)[], ...({
|
210
|
+
output: {
|
211
|
+
credential_format: "mso_mdoc";
|
212
|
+
doctype: string;
|
213
|
+
namespaces: {
|
214
|
+
[x: string]: {
|
215
|
+
[x: string]: unknown;
|
216
|
+
};
|
217
|
+
};
|
218
|
+
} | {
|
219
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
220
|
+
vct: string;
|
221
|
+
claims: {
|
222
|
+
[x: string]: Json;
|
223
|
+
};
|
224
|
+
} | {
|
225
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
226
|
+
claims: {
|
227
|
+
[x: string]: Json;
|
228
|
+
};
|
229
|
+
};
|
230
|
+
success: true;
|
231
|
+
typed: true;
|
232
|
+
claim_set_index: number | undefined;
|
233
|
+
input_credential_index: number;
|
234
|
+
issues?: undefined;
|
235
|
+
} | {
|
236
|
+
output: unknown;
|
237
|
+
issues: [unknown, ...unknown[]];
|
238
|
+
success: false;
|
239
|
+
typed: boolean;
|
240
|
+
claim_set_index: number | undefined;
|
241
|
+
input_credential_index: number;
|
242
|
+
} | undefined)[][]], undefined>]>;
|
243
|
+
type CredentialQueryResult = v.InferOutput<typeof vCredentialQueryResult>;
|
244
|
+
const vModel: v.ObjectSchema<{
|
245
|
+
readonly credentials: v.SchemaWithPipe<[v.ArraySchema<v.VariantSchema<"format", [v.ObjectSchema<{
|
246
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
247
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
248
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
249
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
250
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
251
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
252
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
253
|
+
namespace: string;
|
254
|
+
claim_name: string;
|
255
|
+
values?: (string | number | boolean)[] | undefined;
|
256
|
+
id?: string | undefined;
|
257
|
+
}, ...{
|
258
|
+
namespace: string;
|
259
|
+
claim_name: string;
|
260
|
+
values?: (string | number | boolean)[] | undefined;
|
261
|
+
id?: string | undefined;
|
262
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
263
|
+
namespace: string;
|
264
|
+
claim_name: string;
|
265
|
+
values?: (string | number | boolean)[] | undefined;
|
266
|
+
id?: string | undefined;
|
267
|
+
}, ...{
|
268
|
+
namespace: string;
|
269
|
+
claim_name: string;
|
270
|
+
values?: (string | number | boolean)[] | undefined;
|
271
|
+
id?: string | undefined;
|
272
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
273
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
274
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
275
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
276
|
+
doctype_value?: string | undefined;
|
277
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
278
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
279
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
280
|
+
}, undefined>, v.ObjectSchema<{
|
281
|
+
readonly format: v.SchemaWithPipe<[v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>, v.DescriptionAction<"vc+sd-jwt" | "dc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
282
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
283
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
284
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
285
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
286
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
287
|
+
path: (string | number | null)[];
|
288
|
+
values?: (string | number | boolean)[] | undefined;
|
289
|
+
id?: string | undefined;
|
290
|
+
}, ...{
|
291
|
+
path: (string | number | null)[];
|
292
|
+
values?: (string | number | boolean)[] | undefined;
|
293
|
+
id?: string | undefined;
|
294
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
295
|
+
path: (string | number | null)[];
|
296
|
+
values?: (string | number | boolean)[] | undefined;
|
297
|
+
id?: string | undefined;
|
298
|
+
}, ...{
|
299
|
+
path: (string | number | null)[];
|
300
|
+
values?: (string | number | boolean)[] | undefined;
|
301
|
+
id?: string | undefined;
|
302
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
303
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
304
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
305
|
+
}, undefined>, v.DescriptionAction<{
|
306
|
+
vct_values?: string[] | undefined;
|
307
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
|
308
|
+
vct_values?: string[] | undefined;
|
309
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
310
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
311
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
312
|
+
}, undefined>, v.ObjectSchema<{
|
313
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
314
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
315
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
316
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
317
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
318
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
319
|
+
path: (string | number | null)[];
|
320
|
+
values?: (string | number | boolean)[] | undefined;
|
321
|
+
id?: string | undefined;
|
322
|
+
}, ...{
|
323
|
+
path: (string | number | null)[];
|
324
|
+
values?: (string | number | boolean)[] | undefined;
|
325
|
+
id?: string | undefined;
|
326
|
+
}[]], undefined>]>, undefined>;
|
327
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
328
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
329
|
+
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
|
330
|
+
id: string;
|
331
|
+
format: "mso_mdoc";
|
332
|
+
claims?: [{
|
333
|
+
namespace: string;
|
334
|
+
claim_name: string;
|
335
|
+
values?: (string | number | boolean)[] | undefined;
|
336
|
+
id?: string | undefined;
|
337
|
+
}, ...{
|
338
|
+
namespace: string;
|
339
|
+
claim_name: string;
|
340
|
+
values?: (string | number | boolean)[] | undefined;
|
341
|
+
id?: string | undefined;
|
342
|
+
}[]] | undefined;
|
343
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
344
|
+
meta?: {
|
345
|
+
doctype_value?: string | undefined;
|
346
|
+
} | undefined;
|
347
|
+
} | {
|
348
|
+
id: string;
|
349
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
350
|
+
claims?: [{
|
351
|
+
path: (string | number | null)[];
|
352
|
+
values?: (string | number | boolean)[] | undefined;
|
353
|
+
id?: string | undefined;
|
354
|
+
}, ...{
|
355
|
+
path: (string | number | null)[];
|
356
|
+
values?: (string | number | boolean)[] | undefined;
|
357
|
+
id?: string | undefined;
|
358
|
+
}[]] | undefined;
|
359
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
360
|
+
meta?: {
|
361
|
+
vct_values?: string[] | undefined;
|
362
|
+
} | undefined;
|
363
|
+
} | {
|
364
|
+
id: string;
|
365
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
366
|
+
claims?: [{
|
367
|
+
path: (string | number | null)[];
|
368
|
+
values?: (string | number | boolean)[] | undefined;
|
369
|
+
id?: string | undefined;
|
370
|
+
}, ...{
|
371
|
+
path: (string | number | null)[];
|
372
|
+
values?: (string | number | boolean)[] | undefined;
|
373
|
+
id?: string | undefined;
|
374
|
+
}[]] | undefined;
|
375
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
376
|
+
}, ...({
|
377
|
+
id: string;
|
378
|
+
format: "mso_mdoc";
|
379
|
+
claims?: [{
|
380
|
+
namespace: string;
|
381
|
+
claim_name: string;
|
382
|
+
values?: (string | number | boolean)[] | undefined;
|
383
|
+
id?: string | undefined;
|
384
|
+
}, ...{
|
385
|
+
namespace: string;
|
386
|
+
claim_name: string;
|
387
|
+
values?: (string | number | boolean)[] | undefined;
|
388
|
+
id?: string | undefined;
|
389
|
+
}[]] | undefined;
|
390
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
391
|
+
meta?: {
|
392
|
+
doctype_value?: string | undefined;
|
393
|
+
} | undefined;
|
394
|
+
} | {
|
395
|
+
id: string;
|
396
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
397
|
+
claims?: [{
|
398
|
+
path: (string | number | null)[];
|
399
|
+
values?: (string | number | boolean)[] | undefined;
|
400
|
+
id?: string | undefined;
|
401
|
+
}, ...{
|
402
|
+
path: (string | number | null)[];
|
403
|
+
values?: (string | number | boolean)[] | undefined;
|
404
|
+
id?: string | undefined;
|
405
|
+
}[]] | undefined;
|
406
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
407
|
+
meta?: {
|
408
|
+
vct_values?: string[] | undefined;
|
409
|
+
} | undefined;
|
410
|
+
} | {
|
411
|
+
id: string;
|
412
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
413
|
+
claims?: [{
|
414
|
+
path: (string | number | null)[];
|
415
|
+
values?: (string | number | boolean)[] | undefined;
|
416
|
+
id?: string | undefined;
|
417
|
+
}, ...{
|
418
|
+
path: (string | number | null)[];
|
419
|
+
values?: (string | number | boolean)[] | undefined;
|
420
|
+
id?: string | undefined;
|
421
|
+
}[]] | undefined;
|
422
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
423
|
+
})[]], undefined>, v.DescriptionAction<[{
|
424
|
+
id: string;
|
425
|
+
format: "mso_mdoc";
|
426
|
+
claims?: [{
|
427
|
+
namespace: string;
|
428
|
+
claim_name: string;
|
429
|
+
values?: (string | number | boolean)[] | undefined;
|
430
|
+
id?: string | undefined;
|
431
|
+
}, ...{
|
432
|
+
namespace: string;
|
433
|
+
claim_name: string;
|
434
|
+
values?: (string | number | boolean)[] | undefined;
|
435
|
+
id?: string | undefined;
|
436
|
+
}[]] | undefined;
|
437
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
438
|
+
meta?: {
|
439
|
+
doctype_value?: string | undefined;
|
440
|
+
} | undefined;
|
441
|
+
} | {
|
442
|
+
id: string;
|
443
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
444
|
+
claims?: [{
|
445
|
+
path: (string | number | null)[];
|
446
|
+
values?: (string | number | boolean)[] | undefined;
|
447
|
+
id?: string | undefined;
|
448
|
+
}, ...{
|
449
|
+
path: (string | number | null)[];
|
450
|
+
values?: (string | number | boolean)[] | undefined;
|
451
|
+
id?: string | undefined;
|
452
|
+
}[]] | undefined;
|
453
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
454
|
+
meta?: {
|
455
|
+
vct_values?: string[] | undefined;
|
456
|
+
} | undefined;
|
457
|
+
} | {
|
458
|
+
id: string;
|
459
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
460
|
+
claims?: [{
|
461
|
+
path: (string | number | null)[];
|
462
|
+
values?: (string | number | boolean)[] | undefined;
|
463
|
+
id?: string | undefined;
|
464
|
+
}, ...{
|
465
|
+
path: (string | number | null)[];
|
466
|
+
values?: (string | number | boolean)[] | undefined;
|
467
|
+
id?: string | undefined;
|
468
|
+
}[]] | undefined;
|
469
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
470
|
+
}, ...({
|
471
|
+
id: string;
|
472
|
+
format: "mso_mdoc";
|
473
|
+
claims?: [{
|
474
|
+
namespace: string;
|
475
|
+
claim_name: string;
|
476
|
+
values?: (string | number | boolean)[] | undefined;
|
477
|
+
id?: string | undefined;
|
478
|
+
}, ...{
|
479
|
+
namespace: string;
|
480
|
+
claim_name: string;
|
481
|
+
values?: (string | number | boolean)[] | undefined;
|
482
|
+
id?: string | undefined;
|
483
|
+
}[]] | undefined;
|
484
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
485
|
+
meta?: {
|
486
|
+
doctype_value?: string | undefined;
|
487
|
+
} | undefined;
|
488
|
+
} | {
|
489
|
+
id: string;
|
490
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
491
|
+
claims?: [{
|
492
|
+
path: (string | number | null)[];
|
493
|
+
values?: (string | number | boolean)[] | undefined;
|
494
|
+
id?: string | undefined;
|
495
|
+
}, ...{
|
496
|
+
path: (string | number | null)[];
|
497
|
+
values?: (string | number | boolean)[] | undefined;
|
498
|
+
id?: string | undefined;
|
499
|
+
}[]] | undefined;
|
500
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
501
|
+
meta?: {
|
502
|
+
vct_values?: string[] | undefined;
|
503
|
+
} | undefined;
|
504
|
+
} | {
|
505
|
+
id: string;
|
506
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
507
|
+
claims?: [{
|
508
|
+
path: (string | number | null)[];
|
509
|
+
values?: (string | number | boolean)[] | undefined;
|
510
|
+
id?: string | undefined;
|
511
|
+
}, ...{
|
512
|
+
path: (string | number | null)[];
|
513
|
+
values?: (string | number | boolean)[] | undefined;
|
514
|
+
id?: string | undefined;
|
515
|
+
}[]] | undefined;
|
516
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
517
|
+
})[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
|
518
|
+
readonly credential_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.ObjectSchema<{
|
519
|
+
readonly all: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
|
520
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
521
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
522
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
|
523
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
524
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
525
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
526
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
527
|
+
readonly doctype: v.StringSchema<undefined>;
|
528
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
529
|
+
}, undefined>, v.ObjectSchema<{
|
530
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
531
|
+
readonly vct: v.StringSchema<undefined>;
|
532
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
533
|
+
}, undefined>, v.ObjectSchema<{
|
534
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
535
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
536
|
+
}, undefined>], undefined>;
|
537
|
+
}, undefined>, v.ObjectSchema<{
|
538
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
539
|
+
readonly typed: v.BooleanSchema<undefined>;
|
540
|
+
readonly output: v.UnknownSchema;
|
541
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
542
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
543
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
544
|
+
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
|
545
|
+
output: {
|
546
|
+
credential_format: "mso_mdoc";
|
547
|
+
doctype: string;
|
548
|
+
namespaces: {
|
549
|
+
[x: string]: {
|
550
|
+
[x: string]: unknown;
|
551
|
+
};
|
552
|
+
};
|
553
|
+
} | {
|
554
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
555
|
+
vct: string;
|
556
|
+
claims: {
|
557
|
+
[x: string]: Json;
|
558
|
+
};
|
559
|
+
} | {
|
560
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
561
|
+
claims: {
|
562
|
+
[x: string]: Json;
|
563
|
+
};
|
564
|
+
};
|
565
|
+
success: true;
|
566
|
+
typed: true;
|
567
|
+
claim_set_index: number | undefined;
|
568
|
+
input_credential_index: number;
|
569
|
+
issues?: undefined;
|
570
|
+
} | {
|
571
|
+
output: unknown;
|
572
|
+
issues: [unknown, ...unknown[]];
|
573
|
+
success: false;
|
574
|
+
typed: boolean;
|
575
|
+
claim_set_index: number | undefined;
|
576
|
+
input_credential_index: number;
|
577
|
+
} | undefined, ...({
|
578
|
+
output: {
|
579
|
+
credential_format: "mso_mdoc";
|
580
|
+
doctype: string;
|
581
|
+
namespaces: {
|
582
|
+
[x: string]: {
|
583
|
+
[x: string]: unknown;
|
584
|
+
};
|
585
|
+
};
|
586
|
+
} | {
|
587
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
588
|
+
vct: string;
|
589
|
+
claims: {
|
590
|
+
[x: string]: Json;
|
591
|
+
};
|
592
|
+
} | {
|
593
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
594
|
+
claims: {
|
595
|
+
[x: string]: Json;
|
596
|
+
};
|
597
|
+
};
|
598
|
+
success: true;
|
599
|
+
typed: true;
|
600
|
+
claim_set_index: number | undefined;
|
601
|
+
input_credential_index: number;
|
602
|
+
issues?: undefined;
|
603
|
+
} | {
|
604
|
+
output: unknown;
|
605
|
+
issues: [unknown, ...unknown[]];
|
606
|
+
success: false;
|
607
|
+
typed: boolean;
|
608
|
+
claim_set_index: number | undefined;
|
609
|
+
input_credential_index: number;
|
610
|
+
} | undefined)[]], undefined>]>, undefined>, v.CustomSchema<[[{
|
611
|
+
output: {
|
612
|
+
credential_format: "mso_mdoc";
|
613
|
+
doctype: string;
|
614
|
+
namespaces: {
|
615
|
+
[x: string]: {
|
616
|
+
[x: string]: unknown;
|
617
|
+
};
|
618
|
+
};
|
619
|
+
} | {
|
620
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
621
|
+
vct: string;
|
622
|
+
claims: {
|
623
|
+
[x: string]: Json;
|
624
|
+
};
|
625
|
+
} | {
|
626
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
627
|
+
claims: {
|
628
|
+
[x: string]: Json;
|
629
|
+
};
|
630
|
+
};
|
631
|
+
success: true;
|
632
|
+
typed: true;
|
633
|
+
claim_set_index: number | undefined;
|
634
|
+
input_credential_index: number;
|
635
|
+
issues?: undefined;
|
636
|
+
} | {
|
637
|
+
output: unknown;
|
638
|
+
issues: [unknown, ...unknown[]];
|
639
|
+
success: false;
|
640
|
+
typed: boolean;
|
641
|
+
claim_set_index: number | undefined;
|
642
|
+
input_credential_index: number;
|
643
|
+
} | undefined, ...({
|
644
|
+
output: {
|
645
|
+
credential_format: "mso_mdoc";
|
646
|
+
doctype: string;
|
647
|
+
namespaces: {
|
648
|
+
[x: string]: {
|
649
|
+
[x: string]: unknown;
|
650
|
+
};
|
651
|
+
};
|
652
|
+
} | {
|
653
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
654
|
+
vct: string;
|
655
|
+
claims: {
|
656
|
+
[x: string]: Json;
|
657
|
+
};
|
658
|
+
} | {
|
659
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
660
|
+
claims: {
|
661
|
+
[x: string]: Json;
|
662
|
+
};
|
663
|
+
};
|
664
|
+
success: true;
|
665
|
+
typed: true;
|
666
|
+
claim_set_index: number | undefined;
|
667
|
+
input_credential_index: number;
|
668
|
+
issues?: undefined;
|
669
|
+
} | {
|
670
|
+
output: unknown;
|
671
|
+
issues: [unknown, ...unknown[]];
|
672
|
+
success: false;
|
673
|
+
typed: boolean;
|
674
|
+
claim_set_index: number | undefined;
|
675
|
+
input_credential_index: number;
|
676
|
+
} | undefined)[]], ...[{
|
677
|
+
output: {
|
678
|
+
credential_format: "mso_mdoc";
|
679
|
+
doctype: string;
|
680
|
+
namespaces: {
|
681
|
+
[x: string]: {
|
682
|
+
[x: string]: unknown;
|
683
|
+
};
|
684
|
+
};
|
685
|
+
} | {
|
686
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
687
|
+
vct: string;
|
688
|
+
claims: {
|
689
|
+
[x: string]: Json;
|
690
|
+
};
|
691
|
+
} | {
|
692
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
693
|
+
claims: {
|
694
|
+
[x: string]: Json;
|
695
|
+
};
|
696
|
+
};
|
697
|
+
success: true;
|
698
|
+
typed: true;
|
699
|
+
claim_set_index: number | undefined;
|
700
|
+
input_credential_index: number;
|
701
|
+
issues?: undefined;
|
702
|
+
} | {
|
703
|
+
output: unknown;
|
704
|
+
issues: [unknown, ...unknown[]];
|
705
|
+
success: false;
|
706
|
+
typed: boolean;
|
707
|
+
claim_set_index: number | undefined;
|
708
|
+
input_credential_index: number;
|
709
|
+
} | undefined, ...({
|
710
|
+
output: {
|
711
|
+
credential_format: "mso_mdoc";
|
712
|
+
doctype: string;
|
713
|
+
namespaces: {
|
714
|
+
[x: string]: {
|
715
|
+
[x: string]: unknown;
|
716
|
+
};
|
717
|
+
};
|
718
|
+
} | {
|
719
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
720
|
+
vct: string;
|
721
|
+
claims: {
|
722
|
+
[x: string]: Json;
|
723
|
+
};
|
724
|
+
} | {
|
725
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
726
|
+
claims: {
|
727
|
+
[x: string]: Json;
|
728
|
+
};
|
729
|
+
};
|
730
|
+
success: true;
|
731
|
+
typed: true;
|
732
|
+
claim_set_index: number | undefined;
|
733
|
+
input_credential_index: number;
|
734
|
+
issues?: undefined;
|
735
|
+
} | {
|
736
|
+
output: unknown;
|
737
|
+
issues: [unknown, ...unknown[]];
|
738
|
+
success: false;
|
739
|
+
typed: boolean;
|
740
|
+
claim_set_index: number | undefined;
|
741
|
+
input_credential_index: number;
|
742
|
+
} | undefined)[]][]], undefined>]>;
|
743
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
744
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
745
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
|
746
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
747
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
748
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
749
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
750
|
+
readonly doctype: v.StringSchema<undefined>;
|
751
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
752
|
+
}, undefined>, v.ObjectSchema<{
|
753
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
754
|
+
readonly vct: v.StringSchema<undefined>;
|
755
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
756
|
+
}, undefined>, v.ObjectSchema<{
|
757
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
758
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
759
|
+
}, undefined>], undefined>;
|
760
|
+
}, undefined>, v.ObjectSchema<{
|
761
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
762
|
+
readonly all: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
|
763
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
764
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
765
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
|
766
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
767
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
768
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
769
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
770
|
+
readonly doctype: v.StringSchema<undefined>;
|
771
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
772
|
+
}, undefined>, v.ObjectSchema<{
|
773
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
774
|
+
readonly vct: v.StringSchema<undefined>;
|
775
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
776
|
+
}, undefined>, v.ObjectSchema<{
|
777
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
778
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
779
|
+
}, undefined>], undefined>;
|
780
|
+
}, undefined>, v.ObjectSchema<{
|
781
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
782
|
+
readonly typed: v.BooleanSchema<undefined>;
|
783
|
+
readonly output: v.UnknownSchema;
|
784
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
785
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
786
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
787
|
+
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
|
788
|
+
output: {
|
789
|
+
credential_format: "mso_mdoc";
|
790
|
+
doctype: string;
|
791
|
+
namespaces: {
|
792
|
+
[x: string]: {
|
793
|
+
[x: string]: unknown;
|
794
|
+
};
|
795
|
+
};
|
796
|
+
} | {
|
797
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
798
|
+
vct: string;
|
799
|
+
claims: {
|
800
|
+
[x: string]: Json;
|
801
|
+
};
|
802
|
+
} | {
|
803
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
804
|
+
claims: {
|
805
|
+
[x: string]: Json;
|
806
|
+
};
|
807
|
+
};
|
808
|
+
success: true;
|
809
|
+
typed: true;
|
810
|
+
claim_set_index: number | undefined;
|
811
|
+
input_credential_index: number;
|
812
|
+
issues?: undefined;
|
813
|
+
} | {
|
814
|
+
output: unknown;
|
815
|
+
issues: [unknown, ...unknown[]];
|
816
|
+
success: false;
|
817
|
+
typed: boolean;
|
818
|
+
claim_set_index: number | undefined;
|
819
|
+
input_credential_index: number;
|
820
|
+
} | undefined, ...({
|
821
|
+
output: {
|
822
|
+
credential_format: "mso_mdoc";
|
823
|
+
doctype: string;
|
824
|
+
namespaces: {
|
825
|
+
[x: string]: {
|
826
|
+
[x: string]: unknown;
|
827
|
+
};
|
828
|
+
};
|
829
|
+
} | {
|
830
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
831
|
+
vct: string;
|
832
|
+
claims: {
|
833
|
+
[x: string]: Json;
|
834
|
+
};
|
835
|
+
} | {
|
836
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
837
|
+
claims: {
|
838
|
+
[x: string]: Json;
|
839
|
+
};
|
840
|
+
};
|
841
|
+
success: true;
|
842
|
+
typed: true;
|
843
|
+
claim_set_index: number | undefined;
|
844
|
+
input_credential_index: number;
|
845
|
+
issues?: undefined;
|
846
|
+
} | {
|
847
|
+
output: unknown;
|
848
|
+
issues: [unknown, ...unknown[]];
|
849
|
+
success: false;
|
850
|
+
typed: boolean;
|
851
|
+
claim_set_index: number | undefined;
|
852
|
+
input_credential_index: number;
|
853
|
+
} | undefined)[]], undefined>]>, undefined>, v.CustomSchema<[[{
|
854
|
+
output: {
|
855
|
+
credential_format: "mso_mdoc";
|
856
|
+
doctype: string;
|
857
|
+
namespaces: {
|
858
|
+
[x: string]: {
|
859
|
+
[x: string]: unknown;
|
860
|
+
};
|
861
|
+
};
|
862
|
+
} | {
|
863
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
864
|
+
vct: string;
|
865
|
+
claims: {
|
866
|
+
[x: string]: Json;
|
867
|
+
};
|
868
|
+
} | {
|
869
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
870
|
+
claims: {
|
871
|
+
[x: string]: Json;
|
872
|
+
};
|
873
|
+
};
|
874
|
+
success: true;
|
875
|
+
typed: true;
|
876
|
+
claim_set_index: number | undefined;
|
877
|
+
input_credential_index: number;
|
878
|
+
issues?: undefined;
|
879
|
+
} | {
|
880
|
+
output: unknown;
|
881
|
+
issues: [unknown, ...unknown[]];
|
882
|
+
success: false;
|
883
|
+
typed: boolean;
|
884
|
+
claim_set_index: number | undefined;
|
885
|
+
input_credential_index: number;
|
886
|
+
} | undefined, ...({
|
887
|
+
output: {
|
888
|
+
credential_format: "mso_mdoc";
|
889
|
+
doctype: string;
|
890
|
+
namespaces: {
|
891
|
+
[x: string]: {
|
892
|
+
[x: string]: unknown;
|
893
|
+
};
|
894
|
+
};
|
895
|
+
} | {
|
896
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
897
|
+
vct: string;
|
898
|
+
claims: {
|
899
|
+
[x: string]: Json;
|
900
|
+
};
|
901
|
+
} | {
|
902
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
903
|
+
claims: {
|
904
|
+
[x: string]: Json;
|
905
|
+
};
|
906
|
+
};
|
907
|
+
success: true;
|
908
|
+
typed: true;
|
909
|
+
claim_set_index: number | undefined;
|
910
|
+
input_credential_index: number;
|
911
|
+
issues?: undefined;
|
912
|
+
} | {
|
913
|
+
output: unknown;
|
914
|
+
issues: [unknown, ...unknown[]];
|
915
|
+
success: false;
|
916
|
+
typed: boolean;
|
917
|
+
claim_set_index: number | undefined;
|
918
|
+
input_credential_index: number;
|
919
|
+
} | undefined)[]], ...[{
|
920
|
+
output: {
|
921
|
+
credential_format: "mso_mdoc";
|
922
|
+
doctype: string;
|
923
|
+
namespaces: {
|
924
|
+
[x: string]: {
|
925
|
+
[x: string]: unknown;
|
926
|
+
};
|
927
|
+
};
|
928
|
+
} | {
|
929
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
930
|
+
vct: string;
|
931
|
+
claims: {
|
932
|
+
[x: string]: Json;
|
933
|
+
};
|
934
|
+
} | {
|
935
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
936
|
+
claims: {
|
937
|
+
[x: string]: Json;
|
938
|
+
};
|
939
|
+
};
|
940
|
+
success: true;
|
941
|
+
typed: true;
|
942
|
+
claim_set_index: number | undefined;
|
943
|
+
input_credential_index: number;
|
944
|
+
issues?: undefined;
|
945
|
+
} | {
|
946
|
+
output: unknown;
|
947
|
+
issues: [unknown, ...unknown[]];
|
948
|
+
success: false;
|
949
|
+
typed: boolean;
|
950
|
+
claim_set_index: number | undefined;
|
951
|
+
input_credential_index: number;
|
952
|
+
} | undefined, ...({
|
953
|
+
output: {
|
954
|
+
credential_format: "mso_mdoc";
|
955
|
+
doctype: string;
|
956
|
+
namespaces: {
|
957
|
+
[x: string]: {
|
958
|
+
[x: string]: unknown;
|
959
|
+
};
|
960
|
+
};
|
961
|
+
} | {
|
962
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
963
|
+
vct: string;
|
964
|
+
claims: {
|
965
|
+
[x: string]: Json;
|
966
|
+
};
|
967
|
+
} | {
|
968
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
969
|
+
claims: {
|
970
|
+
[x: string]: Json;
|
971
|
+
};
|
972
|
+
};
|
973
|
+
success: true;
|
974
|
+
typed: true;
|
975
|
+
claim_set_index: number | undefined;
|
976
|
+
input_credential_index: number;
|
977
|
+
issues?: undefined;
|
978
|
+
} | {
|
979
|
+
output: unknown;
|
980
|
+
issues: [unknown, ...unknown[]];
|
981
|
+
success: false;
|
982
|
+
typed: boolean;
|
983
|
+
claim_set_index: number | undefined;
|
984
|
+
input_credential_index: number;
|
985
|
+
} | undefined)[]][]], undefined>]>;
|
986
|
+
}, undefined>], undefined>, undefined>;
|
987
|
+
readonly credential_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
988
|
+
readonly matching_options: v.UnionSchema<[v.UndefinedSchema<undefined>, v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>], undefined>;
|
989
|
+
readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
|
990
|
+
readonly required: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, "OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.">]>;
|
991
|
+
readonly purpose: v.SchemaWithPipe<[v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>], undefined>, undefined>, v.DescriptionAction<string | number | {
|
992
|
+
[x: string]: unknown;
|
993
|
+
} | undefined, "OPTIONAL. A string, number or object specifying the purpose of the query.">]>;
|
994
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
995
|
+
options: [string[], ...string[][]];
|
996
|
+
required: boolean;
|
997
|
+
matching_options: [string[], ...string[][]] | undefined;
|
998
|
+
purpose?: string | number | {
|
999
|
+
[x: string]: unknown;
|
1000
|
+
} | undefined;
|
1001
|
+
}, ...{
|
1002
|
+
options: [string[], ...string[][]];
|
1003
|
+
required: boolean;
|
1004
|
+
matching_options: [string[], ...string[][]] | undefined;
|
1005
|
+
purpose?: string | number | {
|
1006
|
+
[x: string]: unknown;
|
1007
|
+
} | undefined;
|
1008
|
+
}[]], undefined>, v.DescriptionAction<[{
|
1009
|
+
options: [string[], ...string[][]];
|
1010
|
+
required: boolean;
|
1011
|
+
matching_options: [string[], ...string[][]] | undefined;
|
1012
|
+
purpose?: string | number | {
|
1013
|
+
[x: string]: unknown;
|
1014
|
+
} | undefined;
|
1015
|
+
}, ...{
|
1016
|
+
options: [string[], ...string[][]];
|
1017
|
+
required: boolean;
|
1018
|
+
matching_options: [string[], ...string[][]] | undefined;
|
1019
|
+
purpose?: string | number | {
|
1020
|
+
[x: string]: unknown;
|
1021
|
+
} | undefined;
|
1022
|
+
}[]], "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.">]>, undefined>;
|
1023
|
+
readonly canBeSatisfied: v.BooleanSchema<undefined>;
|
1024
|
+
}, undefined>;
|
1025
|
+
type Input = v.InferInput<typeof vModel>;
|
1026
|
+
type Output = v.InferOutput<typeof vModel>;
|
1027
|
+
type CredentialMatch = Input['credential_matches'][number];
|
1028
|
+
type CredentialMatchRecord = Input['credential_matches'];
|
1029
|
+
}
|
1030
|
+
type DcqlQueryResult = DcqlQueryResult.Output;
|
1031
|
+
|
1032
|
+
declare namespace DcqlMdocCredential {
|
1033
|
+
const vNamespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1034
|
+
const vModel: v.ObjectSchema<{
|
1035
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1036
|
+
readonly doctype: v.StringSchema<undefined>;
|
1037
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1038
|
+
}, undefined>;
|
1039
|
+
const model: Model<v.ObjectSchema<{
|
1040
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1041
|
+
readonly doctype: v.StringSchema<undefined>;
|
1042
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1043
|
+
}, undefined>>;
|
1044
|
+
type Model = InferModelTypes<typeof model>;
|
1045
|
+
type NameSpaces = v.InferOutput<typeof vNamespaces>;
|
1046
|
+
}
|
1047
|
+
type DcqlMdocCredential = DcqlMdocCredential.Model['Output'];
|
1048
|
+
declare namespace DcqlSdJwtVcCredential {
|
1049
|
+
const vClaims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1050
|
+
const vModel: v.ObjectSchema<{
|
1051
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1052
|
+
readonly vct: v.StringSchema<undefined>;
|
1053
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1054
|
+
}, undefined>;
|
1055
|
+
const model: Model<v.ObjectSchema<{
|
1056
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1057
|
+
readonly vct: v.StringSchema<undefined>;
|
1058
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1059
|
+
}, undefined>>;
|
1060
|
+
type Model = InferModelTypes<typeof model>;
|
1061
|
+
type Claims = Model['Output']['claims'];
|
1062
|
+
}
|
1063
|
+
type DcqlSdJwtVcCredential = DcqlSdJwtVcCredential.Model['Output'];
|
1064
|
+
declare namespace DcqlW3cVcCredential {
|
1065
|
+
const vClaims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1066
|
+
const vModel: v.ObjectSchema<{
|
1067
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1068
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1069
|
+
}, undefined>;
|
1070
|
+
const model: Model<v.ObjectSchema<{
|
1071
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1072
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1073
|
+
}, undefined>>;
|
1074
|
+
type Model = InferModelTypes<typeof model>;
|
1075
|
+
type Claims = Model['Output']['claims'];
|
1076
|
+
}
|
1077
|
+
type DcqlW3cVcCredential = DcqlW3cVcCredential.Model['Output'];
|
1078
|
+
declare namespace DcqlCredential {
|
1079
|
+
const vModel: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
1080
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1081
|
+
readonly doctype: v.StringSchema<undefined>;
|
1082
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1083
|
+
}, undefined>, v.ObjectSchema<{
|
1084
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1085
|
+
readonly vct: v.StringSchema<undefined>;
|
1086
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1087
|
+
}, undefined>, v.ObjectSchema<{
|
1088
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1089
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1090
|
+
}, undefined>], undefined>;
|
1091
|
+
const vParseSuccess: v.ObjectSchema<{
|
1092
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
1093
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
1094
|
+
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
|
1095
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
1096
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
1097
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
1098
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1099
|
+
readonly doctype: v.StringSchema<undefined>;
|
1100
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1101
|
+
}, undefined>, v.ObjectSchema<{
|
1102
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1103
|
+
readonly vct: v.StringSchema<undefined>;
|
1104
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1105
|
+
}, undefined>, v.ObjectSchema<{
|
1106
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1107
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1108
|
+
}, undefined>], undefined>;
|
1109
|
+
}, undefined>;
|
1110
|
+
const vParseFailure: v.ObjectSchema<{
|
1111
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
1112
|
+
readonly typed: v.BooleanSchema<undefined>;
|
1113
|
+
readonly output: v.UnknownSchema;
|
1114
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
1115
|
+
readonly input_credential_index: v.NumberSchema<undefined>;
|
1116
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
1117
|
+
}, undefined>;
|
1118
|
+
const model: Model<v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
1119
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1120
|
+
readonly doctype: v.StringSchema<undefined>;
|
1121
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1122
|
+
}, undefined>, v.ObjectSchema<{
|
1123
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1124
|
+
readonly vct: v.StringSchema<undefined>;
|
1125
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1126
|
+
}, undefined>, v.ObjectSchema<{
|
1127
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1128
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1129
|
+
}, undefined>], undefined>>;
|
1130
|
+
type Model = InferModelTypes<typeof model>;
|
1131
|
+
}
|
1132
|
+
type DcqlCredential = DcqlCredential.Model['Output'];
|
1133
|
+
|
1134
|
+
/**
|
1135
|
+
* The Digital Credentials Query Language (DCQL, pronounced [ˈdakl̩]) is a
|
1136
|
+
* JSON-encoded query language that allows the Verifier to request Verifiable
|
1137
|
+
* Presentations that match the query. The Verifier MAY encode constraints on the
|
1138
|
+
* combinations of credentials and claims that are requested. The Wallet evaluates
|
1139
|
+
* the query against the Verifiable Credentials it holds and returns Verifiable
|
1140
|
+
* Presentations matching the query.
|
1141
|
+
*/
|
1142
|
+
declare namespace DcqlQuery {
|
1143
|
+
const vModel: v.ObjectSchema<{
|
1144
|
+
readonly credentials: v.SchemaWithPipe<[v.ArraySchema<v.VariantSchema<"format", [v.ObjectSchema<{
|
1145
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
1146
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
1147
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
1148
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
1149
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
1150
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
1151
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
1152
|
+
namespace: string;
|
1153
|
+
claim_name: string;
|
1154
|
+
values?: (string | number | boolean)[] | undefined;
|
1155
|
+
id?: string | undefined;
|
1156
|
+
}, ...{
|
1157
|
+
namespace: string;
|
1158
|
+
claim_name: string;
|
1159
|
+
values?: (string | number | boolean)[] | undefined;
|
1160
|
+
id?: string | undefined;
|
1161
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
1162
|
+
namespace: string;
|
1163
|
+
claim_name: string;
|
1164
|
+
values?: (string | number | boolean)[] | undefined;
|
1165
|
+
id?: string | undefined;
|
1166
|
+
}, ...{
|
1167
|
+
namespace: string;
|
1168
|
+
claim_name: string;
|
1169
|
+
values?: (string | number | boolean)[] | undefined;
|
1170
|
+
id?: string | undefined;
|
1171
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
1172
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
1173
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
1174
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
1175
|
+
doctype_value?: string | undefined;
|
1176
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
1177
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
1178
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
1179
|
+
}, undefined>, v.ObjectSchema<{
|
1180
|
+
readonly format: v.SchemaWithPipe<[v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>, v.DescriptionAction<"vc+sd-jwt" | "dc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
1181
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
1182
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
1183
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
1184
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
1185
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
1186
|
+
path: (string | number | null)[];
|
1187
|
+
values?: (string | number | boolean)[] | undefined;
|
1188
|
+
id?: string | undefined;
|
1189
|
+
}, ...{
|
1190
|
+
path: (string | number | null)[];
|
1191
|
+
values?: (string | number | boolean)[] | undefined;
|
1192
|
+
id?: string | undefined;
|
1193
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
1194
|
+
path: (string | number | null)[];
|
1195
|
+
values?: (string | number | boolean)[] | undefined;
|
1196
|
+
id?: string | undefined;
|
1197
|
+
}, ...{
|
1198
|
+
path: (string | number | null)[];
|
1199
|
+
values?: (string | number | boolean)[] | undefined;
|
1200
|
+
id?: string | undefined;
|
1201
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
1202
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
1203
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
1204
|
+
}, undefined>, v.DescriptionAction<{
|
1205
|
+
vct_values?: string[] | undefined;
|
1206
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
|
1207
|
+
vct_values?: string[] | undefined;
|
1208
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
1209
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
1210
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
1211
|
+
}, undefined>, v.ObjectSchema<{
|
1212
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
1213
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
1214
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
1215
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
1216
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
1217
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
1218
|
+
path: (string | number | null)[];
|
1219
|
+
values?: (string | number | boolean)[] | undefined;
|
1220
|
+
id?: string | undefined;
|
1221
|
+
}, ...{
|
1222
|
+
path: (string | number | null)[];
|
1223
|
+
values?: (string | number | boolean)[] | undefined;
|
1224
|
+
id?: string | undefined;
|
1225
|
+
}[]], undefined>]>, undefined>;
|
1226
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
1227
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
1228
|
+
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
|
1229
|
+
id: string;
|
1230
|
+
format: "mso_mdoc";
|
1231
|
+
claims?: [{
|
1232
|
+
namespace: string;
|
1233
|
+
claim_name: string;
|
1234
|
+
values?: (string | number | boolean)[] | undefined;
|
1235
|
+
id?: string | undefined;
|
1236
|
+
}, ...{
|
1237
|
+
namespace: string;
|
1238
|
+
claim_name: string;
|
1239
|
+
values?: (string | number | boolean)[] | undefined;
|
1240
|
+
id?: string | undefined;
|
1241
|
+
}[]] | undefined;
|
1242
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1243
|
+
meta?: {
|
1244
|
+
doctype_value?: string | undefined;
|
1245
|
+
} | undefined;
|
1246
|
+
} | {
|
1247
|
+
id: string;
|
1248
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1249
|
+
claims?: [{
|
1250
|
+
path: (string | number | null)[];
|
1251
|
+
values?: (string | number | boolean)[] | undefined;
|
1252
|
+
id?: string | undefined;
|
1253
|
+
}, ...{
|
1254
|
+
path: (string | number | null)[];
|
1255
|
+
values?: (string | number | boolean)[] | undefined;
|
1256
|
+
id?: string | undefined;
|
1257
|
+
}[]] | undefined;
|
1258
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1259
|
+
meta?: {
|
1260
|
+
vct_values?: string[] | undefined;
|
1261
|
+
} | undefined;
|
1262
|
+
} | {
|
1263
|
+
id: string;
|
1264
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1265
|
+
claims?: [{
|
1266
|
+
path: (string | number | null)[];
|
1267
|
+
values?: (string | number | boolean)[] | undefined;
|
1268
|
+
id?: string | undefined;
|
1269
|
+
}, ...{
|
1270
|
+
path: (string | number | null)[];
|
1271
|
+
values?: (string | number | boolean)[] | undefined;
|
1272
|
+
id?: string | undefined;
|
1273
|
+
}[]] | undefined;
|
1274
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1275
|
+
}, ...({
|
1276
|
+
id: string;
|
1277
|
+
format: "mso_mdoc";
|
1278
|
+
claims?: [{
|
1279
|
+
namespace: string;
|
1280
|
+
claim_name: string;
|
1281
|
+
values?: (string | number | boolean)[] | undefined;
|
1282
|
+
id?: string | undefined;
|
1283
|
+
}, ...{
|
1284
|
+
namespace: string;
|
1285
|
+
claim_name: string;
|
1286
|
+
values?: (string | number | boolean)[] | undefined;
|
1287
|
+
id?: string | undefined;
|
1288
|
+
}[]] | undefined;
|
1289
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1290
|
+
meta?: {
|
1291
|
+
doctype_value?: string | undefined;
|
1292
|
+
} | undefined;
|
1293
|
+
} | {
|
1294
|
+
id: string;
|
1295
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1296
|
+
claims?: [{
|
1297
|
+
path: (string | number | null)[];
|
1298
|
+
values?: (string | number | boolean)[] | undefined;
|
1299
|
+
id?: string | undefined;
|
1300
|
+
}, ...{
|
1301
|
+
path: (string | number | null)[];
|
1302
|
+
values?: (string | number | boolean)[] | undefined;
|
1303
|
+
id?: string | undefined;
|
1304
|
+
}[]] | undefined;
|
1305
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1306
|
+
meta?: {
|
1307
|
+
vct_values?: string[] | undefined;
|
1308
|
+
} | undefined;
|
1309
|
+
} | {
|
1310
|
+
id: string;
|
1311
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1312
|
+
claims?: [{
|
1313
|
+
path: (string | number | null)[];
|
1314
|
+
values?: (string | number | boolean)[] | undefined;
|
1315
|
+
id?: string | undefined;
|
1316
|
+
}, ...{
|
1317
|
+
path: (string | number | null)[];
|
1318
|
+
values?: (string | number | boolean)[] | undefined;
|
1319
|
+
id?: string | undefined;
|
1320
|
+
}[]] | undefined;
|
1321
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1322
|
+
})[]], undefined>, v.DescriptionAction<[{
|
1323
|
+
id: string;
|
1324
|
+
format: "mso_mdoc";
|
1325
|
+
claims?: [{
|
1326
|
+
namespace: string;
|
1327
|
+
claim_name: string;
|
1328
|
+
values?: (string | number | boolean)[] | undefined;
|
1329
|
+
id?: string | undefined;
|
1330
|
+
}, ...{
|
1331
|
+
namespace: string;
|
1332
|
+
claim_name: string;
|
1333
|
+
values?: (string | number | boolean)[] | undefined;
|
1334
|
+
id?: string | undefined;
|
1335
|
+
}[]] | undefined;
|
1336
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1337
|
+
meta?: {
|
1338
|
+
doctype_value?: string | undefined;
|
1339
|
+
} | undefined;
|
1340
|
+
} | {
|
1341
|
+
id: string;
|
1342
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1343
|
+
claims?: [{
|
1344
|
+
path: (string | number | null)[];
|
1345
|
+
values?: (string | number | boolean)[] | undefined;
|
1346
|
+
id?: string | undefined;
|
1347
|
+
}, ...{
|
1348
|
+
path: (string | number | null)[];
|
1349
|
+
values?: (string | number | boolean)[] | undefined;
|
1350
|
+
id?: string | undefined;
|
1351
|
+
}[]] | undefined;
|
1352
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1353
|
+
meta?: {
|
1354
|
+
vct_values?: string[] | undefined;
|
1355
|
+
} | undefined;
|
1356
|
+
} | {
|
1357
|
+
id: string;
|
1358
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1359
|
+
claims?: [{
|
1360
|
+
path: (string | number | null)[];
|
1361
|
+
values?: (string | number | boolean)[] | undefined;
|
1362
|
+
id?: string | undefined;
|
1363
|
+
}, ...{
|
1364
|
+
path: (string | number | null)[];
|
1365
|
+
values?: (string | number | boolean)[] | undefined;
|
1366
|
+
id?: string | undefined;
|
1367
|
+
}[]] | undefined;
|
1368
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1369
|
+
}, ...({
|
1370
|
+
id: string;
|
1371
|
+
format: "mso_mdoc";
|
1372
|
+
claims?: [{
|
1373
|
+
namespace: string;
|
1374
|
+
claim_name: string;
|
1375
|
+
values?: (string | number | boolean)[] | undefined;
|
1376
|
+
id?: string | undefined;
|
1377
|
+
}, ...{
|
1378
|
+
namespace: string;
|
1379
|
+
claim_name: string;
|
1380
|
+
values?: (string | number | boolean)[] | undefined;
|
1381
|
+
id?: string | undefined;
|
1382
|
+
}[]] | undefined;
|
1383
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1384
|
+
meta?: {
|
1385
|
+
doctype_value?: string | undefined;
|
1386
|
+
} | undefined;
|
1387
|
+
} | {
|
1388
|
+
id: string;
|
1389
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1390
|
+
claims?: [{
|
1391
|
+
path: (string | number | null)[];
|
1392
|
+
values?: (string | number | boolean)[] | undefined;
|
1393
|
+
id?: string | undefined;
|
1394
|
+
}, ...{
|
1395
|
+
path: (string | number | null)[];
|
1396
|
+
values?: (string | number | boolean)[] | undefined;
|
1397
|
+
id?: string | undefined;
|
1398
|
+
}[]] | undefined;
|
1399
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1400
|
+
meta?: {
|
1401
|
+
vct_values?: string[] | undefined;
|
1402
|
+
} | undefined;
|
1403
|
+
} | {
|
1404
|
+
id: string;
|
1405
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1406
|
+
claims?: [{
|
1407
|
+
path: (string | number | null)[];
|
1408
|
+
values?: (string | number | boolean)[] | undefined;
|
1409
|
+
id?: string | undefined;
|
1410
|
+
}, ...{
|
1411
|
+
path: (string | number | null)[];
|
1412
|
+
values?: (string | number | boolean)[] | undefined;
|
1413
|
+
id?: string | undefined;
|
1414
|
+
}[]] | undefined;
|
1415
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1416
|
+
})[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
|
1417
|
+
readonly credential_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
1418
|
+
readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
|
1419
|
+
readonly required: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, "OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.">]>;
|
1420
|
+
readonly purpose: v.SchemaWithPipe<[v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>], undefined>, undefined>, v.DescriptionAction<string | number | {
|
1421
|
+
[x: string]: unknown;
|
1422
|
+
} | undefined, "OPTIONAL. A string, number or object specifying the purpose of the query.">]>;
|
1423
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
1424
|
+
options: [string[], ...string[][]];
|
1425
|
+
required: boolean;
|
1426
|
+
purpose?: string | number | {
|
1427
|
+
[x: string]: unknown;
|
1428
|
+
} | undefined;
|
1429
|
+
}, ...{
|
1430
|
+
options: [string[], ...string[][]];
|
1431
|
+
required: boolean;
|
1432
|
+
purpose?: string | number | {
|
1433
|
+
[x: string]: unknown;
|
1434
|
+
} | undefined;
|
1435
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
1436
|
+
options: [string[], ...string[][]];
|
1437
|
+
required: boolean;
|
1438
|
+
purpose?: string | number | {
|
1439
|
+
[x: string]: unknown;
|
1440
|
+
} | undefined;
|
1441
|
+
}, ...{
|
1442
|
+
options: [string[], ...string[][]];
|
1443
|
+
required: boolean;
|
1444
|
+
purpose?: string | number | {
|
1445
|
+
[x: string]: unknown;
|
1446
|
+
} | undefined;
|
1447
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.">]>;
|
1448
|
+
}, undefined>;
|
1449
|
+
type Input = v.InferInput<typeof vModel>;
|
1450
|
+
type Output = v.InferOutput<typeof vModel>;
|
1451
|
+
const validate: (dcqlQuery: Output) => void;
|
1452
|
+
const query: (dcqlQuery: Output, credentials: DcqlCredential[]) => {
|
1453
|
+
credentials: [{
|
1454
|
+
id: string;
|
1455
|
+
format: "mso_mdoc";
|
1456
|
+
claims?: [{
|
1457
|
+
namespace: string;
|
1458
|
+
claim_name: string;
|
1459
|
+
values?: (string | number | boolean)[] | undefined;
|
1460
|
+
id?: string | undefined;
|
1461
|
+
}, ...{
|
1462
|
+
namespace: string;
|
1463
|
+
claim_name: string;
|
1464
|
+
values?: (string | number | boolean)[] | undefined;
|
1465
|
+
id?: string | undefined;
|
1466
|
+
}[]] | undefined;
|
1467
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1468
|
+
meta?: {
|
1469
|
+
doctype_value?: string | undefined;
|
1470
|
+
} | undefined;
|
1471
|
+
} | {
|
1472
|
+
id: string;
|
1473
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1474
|
+
claims?: [{
|
1475
|
+
path: (string | number | null)[];
|
1476
|
+
values?: (string | number | boolean)[] | undefined;
|
1477
|
+
id?: string | undefined;
|
1478
|
+
}, ...{
|
1479
|
+
path: (string | number | null)[];
|
1480
|
+
values?: (string | number | boolean)[] | undefined;
|
1481
|
+
id?: string | undefined;
|
1482
|
+
}[]] | undefined;
|
1483
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1484
|
+
meta?: {
|
1485
|
+
vct_values?: string[] | undefined;
|
1486
|
+
} | undefined;
|
1487
|
+
} | {
|
1488
|
+
id: string;
|
1489
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1490
|
+
claims?: [{
|
1491
|
+
path: (string | number | null)[];
|
1492
|
+
values?: (string | number | boolean)[] | undefined;
|
1493
|
+
id?: string | undefined;
|
1494
|
+
}, ...{
|
1495
|
+
path: (string | number | null)[];
|
1496
|
+
values?: (string | number | boolean)[] | undefined;
|
1497
|
+
id?: string | undefined;
|
1498
|
+
}[]] | undefined;
|
1499
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1500
|
+
}, ...({
|
1501
|
+
id: string;
|
1502
|
+
format: "mso_mdoc";
|
1503
|
+
claims?: [{
|
1504
|
+
namespace: string;
|
1505
|
+
claim_name: string;
|
1506
|
+
values?: (string | number | boolean)[] | undefined;
|
1507
|
+
id?: string | undefined;
|
1508
|
+
}, ...{
|
1509
|
+
namespace: string;
|
1510
|
+
claim_name: string;
|
1511
|
+
values?: (string | number | boolean)[] | undefined;
|
1512
|
+
id?: string | undefined;
|
1513
|
+
}[]] | undefined;
|
1514
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1515
|
+
meta?: {
|
1516
|
+
doctype_value?: string | undefined;
|
1517
|
+
} | undefined;
|
1518
|
+
} | {
|
1519
|
+
id: string;
|
1520
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1521
|
+
claims?: [{
|
1522
|
+
path: (string | number | null)[];
|
1523
|
+
values?: (string | number | boolean)[] | undefined;
|
1524
|
+
id?: string | undefined;
|
1525
|
+
}, ...{
|
1526
|
+
path: (string | number | null)[];
|
1527
|
+
values?: (string | number | boolean)[] | undefined;
|
1528
|
+
id?: string | undefined;
|
1529
|
+
}[]] | undefined;
|
1530
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1531
|
+
meta?: {
|
1532
|
+
vct_values?: string[] | undefined;
|
1533
|
+
} | undefined;
|
1534
|
+
} | {
|
1535
|
+
id: string;
|
1536
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1537
|
+
claims?: [{
|
1538
|
+
path: (string | number | null)[];
|
1539
|
+
values?: (string | number | boolean)[] | undefined;
|
1540
|
+
id?: string | undefined;
|
1541
|
+
}, ...{
|
1542
|
+
path: (string | number | null)[];
|
1543
|
+
values?: (string | number | boolean)[] | undefined;
|
1544
|
+
id?: string | undefined;
|
1545
|
+
}[]] | undefined;
|
1546
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1547
|
+
})[]];
|
1548
|
+
credential_matches: {
|
1549
|
+
[x: string]: {
|
1550
|
+
output: {
|
1551
|
+
credential_format: "mso_mdoc";
|
1552
|
+
doctype: string;
|
1553
|
+
namespaces: {
|
1554
|
+
[x: string]: {
|
1555
|
+
[x: string]: unknown;
|
1556
|
+
};
|
1557
|
+
};
|
1558
|
+
} | {
|
1559
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1560
|
+
vct: string;
|
1561
|
+
claims: {
|
1562
|
+
[x: string]: Json;
|
1563
|
+
};
|
1564
|
+
} | {
|
1565
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1566
|
+
claims: {
|
1567
|
+
[x: string]: Json;
|
1568
|
+
};
|
1569
|
+
};
|
1570
|
+
success: true;
|
1571
|
+
typed: true;
|
1572
|
+
claim_set_index: number | undefined;
|
1573
|
+
input_credential_index: number;
|
1574
|
+
all: [[{
|
1575
|
+
output: {
|
1576
|
+
credential_format: "mso_mdoc";
|
1577
|
+
doctype: string;
|
1578
|
+
namespaces: {
|
1579
|
+
[x: string]: {
|
1580
|
+
[x: string]: unknown;
|
1581
|
+
};
|
1582
|
+
};
|
1583
|
+
} | {
|
1584
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1585
|
+
vct: string;
|
1586
|
+
claims: {
|
1587
|
+
[x: string]: Json;
|
1588
|
+
};
|
1589
|
+
} | {
|
1590
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1591
|
+
claims: {
|
1592
|
+
[x: string]: Json;
|
1593
|
+
};
|
1594
|
+
};
|
1595
|
+
success: true;
|
1596
|
+
typed: true;
|
1597
|
+
claim_set_index: number | undefined;
|
1598
|
+
input_credential_index: number;
|
1599
|
+
issues?: undefined;
|
1600
|
+
} | {
|
1601
|
+
output: unknown;
|
1602
|
+
issues: [unknown, ...unknown[]];
|
1603
|
+
success: false;
|
1604
|
+
typed: boolean;
|
1605
|
+
claim_set_index: number | undefined;
|
1606
|
+
input_credential_index: number;
|
1607
|
+
} | undefined, ...({
|
1608
|
+
output: {
|
1609
|
+
credential_format: "mso_mdoc";
|
1610
|
+
doctype: string;
|
1611
|
+
namespaces: {
|
1612
|
+
[x: string]: {
|
1613
|
+
[x: string]: unknown;
|
1614
|
+
};
|
1615
|
+
};
|
1616
|
+
} | {
|
1617
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1618
|
+
vct: string;
|
1619
|
+
claims: {
|
1620
|
+
[x: string]: Json;
|
1621
|
+
};
|
1622
|
+
} | {
|
1623
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1624
|
+
claims: {
|
1625
|
+
[x: string]: Json;
|
1626
|
+
};
|
1627
|
+
};
|
1628
|
+
success: true;
|
1629
|
+
typed: true;
|
1630
|
+
claim_set_index: number | undefined;
|
1631
|
+
input_credential_index: number;
|
1632
|
+
issues?: undefined;
|
1633
|
+
} | {
|
1634
|
+
output: unknown;
|
1635
|
+
issues: [unknown, ...unknown[]];
|
1636
|
+
success: false;
|
1637
|
+
typed: boolean;
|
1638
|
+
claim_set_index: number | undefined;
|
1639
|
+
input_credential_index: number;
|
1640
|
+
} | undefined)[]], ...[{
|
1641
|
+
output: {
|
1642
|
+
credential_format: "mso_mdoc";
|
1643
|
+
doctype: string;
|
1644
|
+
namespaces: {
|
1645
|
+
[x: string]: {
|
1646
|
+
[x: string]: unknown;
|
1647
|
+
};
|
1648
|
+
};
|
1649
|
+
} | {
|
1650
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1651
|
+
vct: string;
|
1652
|
+
claims: {
|
1653
|
+
[x: string]: Json;
|
1654
|
+
};
|
1655
|
+
} | {
|
1656
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1657
|
+
claims: {
|
1658
|
+
[x: string]: Json;
|
1659
|
+
};
|
1660
|
+
};
|
1661
|
+
success: true;
|
1662
|
+
typed: true;
|
1663
|
+
claim_set_index: number | undefined;
|
1664
|
+
input_credential_index: number;
|
1665
|
+
issues?: undefined;
|
1666
|
+
} | {
|
1667
|
+
output: unknown;
|
1668
|
+
issues: [unknown, ...unknown[]];
|
1669
|
+
success: false;
|
1670
|
+
typed: boolean;
|
1671
|
+
claim_set_index: number | undefined;
|
1672
|
+
input_credential_index: number;
|
1673
|
+
} | undefined, ...({
|
1674
|
+
output: {
|
1675
|
+
credential_format: "mso_mdoc";
|
1676
|
+
doctype: string;
|
1677
|
+
namespaces: {
|
1678
|
+
[x: string]: {
|
1679
|
+
[x: string]: unknown;
|
1680
|
+
};
|
1681
|
+
};
|
1682
|
+
} | {
|
1683
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1684
|
+
vct: string;
|
1685
|
+
claims: {
|
1686
|
+
[x: string]: Json;
|
1687
|
+
};
|
1688
|
+
} | {
|
1689
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1690
|
+
claims: {
|
1691
|
+
[x: string]: Json;
|
1692
|
+
};
|
1693
|
+
};
|
1694
|
+
success: true;
|
1695
|
+
typed: true;
|
1696
|
+
claim_set_index: number | undefined;
|
1697
|
+
input_credential_index: number;
|
1698
|
+
issues?: undefined;
|
1699
|
+
} | {
|
1700
|
+
output: unknown;
|
1701
|
+
issues: [unknown, ...unknown[]];
|
1702
|
+
success: false;
|
1703
|
+
typed: boolean;
|
1704
|
+
claim_set_index: number | undefined;
|
1705
|
+
input_credential_index: number;
|
1706
|
+
} | undefined)[]][]];
|
1707
|
+
issues?: undefined;
|
1708
|
+
} | {
|
1709
|
+
success: false;
|
1710
|
+
all: [[{
|
1711
|
+
output: {
|
1712
|
+
credential_format: "mso_mdoc";
|
1713
|
+
doctype: string;
|
1714
|
+
namespaces: {
|
1715
|
+
[x: string]: {
|
1716
|
+
[x: string]: unknown;
|
1717
|
+
};
|
1718
|
+
};
|
1719
|
+
} | {
|
1720
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1721
|
+
vct: string;
|
1722
|
+
claims: {
|
1723
|
+
[x: string]: Json;
|
1724
|
+
};
|
1725
|
+
} | {
|
1726
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1727
|
+
claims: {
|
1728
|
+
[x: string]: Json;
|
1729
|
+
};
|
1730
|
+
};
|
1731
|
+
success: true;
|
1732
|
+
typed: true;
|
1733
|
+
claim_set_index: number | undefined;
|
1734
|
+
input_credential_index: number;
|
1735
|
+
issues?: undefined;
|
1736
|
+
} | {
|
1737
|
+
output: unknown;
|
1738
|
+
issues: [unknown, ...unknown[]];
|
1739
|
+
success: false;
|
1740
|
+
typed: boolean;
|
1741
|
+
claim_set_index: number | undefined;
|
1742
|
+
input_credential_index: number;
|
1743
|
+
} | undefined, ...({
|
1744
|
+
output: {
|
1745
|
+
credential_format: "mso_mdoc";
|
1746
|
+
doctype: string;
|
1747
|
+
namespaces: {
|
1748
|
+
[x: string]: {
|
1749
|
+
[x: string]: unknown;
|
1750
|
+
};
|
1751
|
+
};
|
1752
|
+
} | {
|
1753
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1754
|
+
vct: string;
|
1755
|
+
claims: {
|
1756
|
+
[x: string]: Json;
|
1757
|
+
};
|
1758
|
+
} | {
|
1759
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1760
|
+
claims: {
|
1761
|
+
[x: string]: Json;
|
1762
|
+
};
|
1763
|
+
};
|
1764
|
+
success: true;
|
1765
|
+
typed: true;
|
1766
|
+
claim_set_index: number | undefined;
|
1767
|
+
input_credential_index: number;
|
1768
|
+
issues?: undefined;
|
1769
|
+
} | {
|
1770
|
+
output: unknown;
|
1771
|
+
issues: [unknown, ...unknown[]];
|
1772
|
+
success: false;
|
1773
|
+
typed: boolean;
|
1774
|
+
claim_set_index: number | undefined;
|
1775
|
+
input_credential_index: number;
|
1776
|
+
} | undefined)[]], ...[{
|
1777
|
+
output: {
|
1778
|
+
credential_format: "mso_mdoc";
|
1779
|
+
doctype: string;
|
1780
|
+
namespaces: {
|
1781
|
+
[x: string]: {
|
1782
|
+
[x: string]: unknown;
|
1783
|
+
};
|
1784
|
+
};
|
1785
|
+
} | {
|
1786
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1787
|
+
vct: string;
|
1788
|
+
claims: {
|
1789
|
+
[x: string]: Json;
|
1790
|
+
};
|
1791
|
+
} | {
|
1792
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1793
|
+
claims: {
|
1794
|
+
[x: string]: Json;
|
1795
|
+
};
|
1796
|
+
};
|
1797
|
+
success: true;
|
1798
|
+
typed: true;
|
1799
|
+
claim_set_index: number | undefined;
|
1800
|
+
input_credential_index: number;
|
1801
|
+
issues?: undefined;
|
1802
|
+
} | {
|
1803
|
+
output: unknown;
|
1804
|
+
issues: [unknown, ...unknown[]];
|
1805
|
+
success: false;
|
1806
|
+
typed: boolean;
|
1807
|
+
claim_set_index: number | undefined;
|
1808
|
+
input_credential_index: number;
|
1809
|
+
} | undefined, ...({
|
1810
|
+
output: {
|
1811
|
+
credential_format: "mso_mdoc";
|
1812
|
+
doctype: string;
|
1813
|
+
namespaces: {
|
1814
|
+
[x: string]: {
|
1815
|
+
[x: string]: unknown;
|
1816
|
+
};
|
1817
|
+
};
|
1818
|
+
} | {
|
1819
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
1820
|
+
vct: string;
|
1821
|
+
claims: {
|
1822
|
+
[x: string]: Json;
|
1823
|
+
};
|
1824
|
+
} | {
|
1825
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1826
|
+
claims: {
|
1827
|
+
[x: string]: Json;
|
1828
|
+
};
|
1829
|
+
};
|
1830
|
+
success: true;
|
1831
|
+
typed: true;
|
1832
|
+
claim_set_index: number | undefined;
|
1833
|
+
input_credential_index: number;
|
1834
|
+
issues?: undefined;
|
1835
|
+
} | {
|
1836
|
+
output: unknown;
|
1837
|
+
issues: [unknown, ...unknown[]];
|
1838
|
+
success: false;
|
1839
|
+
typed: boolean;
|
1840
|
+
claim_set_index: number | undefined;
|
1841
|
+
input_credential_index: number;
|
1842
|
+
} | undefined)[]][]];
|
1843
|
+
};
|
1844
|
+
};
|
1845
|
+
canBeSatisfied: boolean;
|
1846
|
+
credential_sets?: [{
|
1847
|
+
options: [string[], ...string[][]];
|
1848
|
+
required: boolean;
|
1849
|
+
matching_options: [string[], ...string[][]] | undefined;
|
1850
|
+
purpose?: string | number | {
|
1851
|
+
[x: string]: unknown;
|
1852
|
+
} | undefined;
|
1853
|
+
}, ...{
|
1854
|
+
options: [string[], ...string[][]];
|
1855
|
+
required: boolean;
|
1856
|
+
matching_options: [string[], ...string[][]] | undefined;
|
1857
|
+
purpose?: string | number | {
|
1858
|
+
[x: string]: unknown;
|
1859
|
+
} | undefined;
|
1860
|
+
}[]] | undefined;
|
1861
|
+
};
|
1862
|
+
const parse: (input: Input) => {
|
1863
|
+
credentials: [{
|
1864
|
+
id: string;
|
1865
|
+
format: "mso_mdoc";
|
1866
|
+
claims?: [{
|
1867
|
+
namespace: string;
|
1868
|
+
claim_name: string;
|
1869
|
+
values?: (string | number | boolean)[] | undefined;
|
1870
|
+
id?: string | undefined;
|
1871
|
+
}, ...{
|
1872
|
+
namespace: string;
|
1873
|
+
claim_name: string;
|
1874
|
+
values?: (string | number | boolean)[] | undefined;
|
1875
|
+
id?: string | undefined;
|
1876
|
+
}[]] | undefined;
|
1877
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1878
|
+
meta?: {
|
1879
|
+
doctype_value?: string | undefined;
|
1880
|
+
} | undefined;
|
1881
|
+
} | {
|
1882
|
+
id: string;
|
1883
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1884
|
+
claims?: [{
|
1885
|
+
path: (string | number | null)[];
|
1886
|
+
values?: (string | number | boolean)[] | undefined;
|
1887
|
+
id?: string | undefined;
|
1888
|
+
}, ...{
|
1889
|
+
path: (string | number | null)[];
|
1890
|
+
values?: (string | number | boolean)[] | undefined;
|
1891
|
+
id?: string | undefined;
|
1892
|
+
}[]] | undefined;
|
1893
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1894
|
+
meta?: {
|
1895
|
+
vct_values?: string[] | undefined;
|
1896
|
+
} | undefined;
|
1897
|
+
} | {
|
1898
|
+
id: string;
|
1899
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1900
|
+
claims?: [{
|
1901
|
+
path: (string | number | null)[];
|
1902
|
+
values?: (string | number | boolean)[] | undefined;
|
1903
|
+
id?: string | undefined;
|
1904
|
+
}, ...{
|
1905
|
+
path: (string | number | null)[];
|
1906
|
+
values?: (string | number | boolean)[] | undefined;
|
1907
|
+
id?: string | undefined;
|
1908
|
+
}[]] | undefined;
|
1909
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1910
|
+
}, ...({
|
1911
|
+
id: string;
|
1912
|
+
format: "mso_mdoc";
|
1913
|
+
claims?: [{
|
1914
|
+
namespace: string;
|
1915
|
+
claim_name: string;
|
1916
|
+
values?: (string | number | boolean)[] | undefined;
|
1917
|
+
id?: string | undefined;
|
1918
|
+
}, ...{
|
1919
|
+
namespace: string;
|
1920
|
+
claim_name: string;
|
1921
|
+
values?: (string | number | boolean)[] | undefined;
|
1922
|
+
id?: string | undefined;
|
1923
|
+
}[]] | undefined;
|
1924
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1925
|
+
meta?: {
|
1926
|
+
doctype_value?: string | undefined;
|
1927
|
+
} | undefined;
|
1928
|
+
} | {
|
1929
|
+
id: string;
|
1930
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
1931
|
+
claims?: [{
|
1932
|
+
path: (string | number | null)[];
|
1933
|
+
values?: (string | number | boolean)[] | undefined;
|
1934
|
+
id?: string | undefined;
|
1935
|
+
}, ...{
|
1936
|
+
path: (string | number | null)[];
|
1937
|
+
values?: (string | number | boolean)[] | undefined;
|
1938
|
+
id?: string | undefined;
|
1939
|
+
}[]] | undefined;
|
1940
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1941
|
+
meta?: {
|
1942
|
+
vct_values?: string[] | undefined;
|
1943
|
+
} | undefined;
|
1944
|
+
} | {
|
1945
|
+
id: string;
|
1946
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
1947
|
+
claims?: [{
|
1948
|
+
path: (string | number | null)[];
|
1949
|
+
values?: (string | number | boolean)[] | undefined;
|
1950
|
+
id?: string | undefined;
|
1951
|
+
}, ...{
|
1952
|
+
path: (string | number | null)[];
|
1953
|
+
values?: (string | number | boolean)[] | undefined;
|
1954
|
+
id?: string | undefined;
|
1955
|
+
}[]] | undefined;
|
1956
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
1957
|
+
})[]];
|
1958
|
+
credential_sets?: [{
|
1959
|
+
options: [string[], ...string[][]];
|
1960
|
+
required: boolean;
|
1961
|
+
purpose?: string | number | {
|
1962
|
+
[x: string]: unknown;
|
1963
|
+
} | undefined;
|
1964
|
+
}, ...{
|
1965
|
+
options: [string[], ...string[][]];
|
1966
|
+
required: boolean;
|
1967
|
+
purpose?: string | number | {
|
1968
|
+
[x: string]: unknown;
|
1969
|
+
} | undefined;
|
1970
|
+
}[]] | undefined;
|
1971
|
+
};
|
1972
|
+
}
|
1973
|
+
type DcqlQuery = DcqlQuery.Output;
|
1974
|
+
|
1975
|
+
declare namespace DcqlPresentationResult {
|
1976
|
+
const vModel: v.ObjectSchema<{
|
1977
|
+
readonly invalid_matches: v.UnionSchema<[v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.ObjectSchema<{
|
1978
|
+
readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
1979
|
+
readonly output: v.UnknownSchema;
|
1980
|
+
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
|
1981
|
+
readonly success: v.LiteralSchema<false, undefined>;
|
1982
|
+
readonly typed: v.BooleanSchema<undefined>;
|
1983
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
1984
|
+
}, undefined>, undefined>, v.UndefinedSchema<undefined>], undefined>;
|
1985
|
+
readonly valid_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.ObjectSchema<{
|
1986
|
+
readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
1987
|
+
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
|
1988
|
+
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
|
1989
|
+
readonly doctype: v.StringSchema<undefined>;
|
1990
|
+
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
1991
|
+
}, undefined>, v.ObjectSchema<{
|
1992
|
+
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
|
1993
|
+
readonly vct: v.StringSchema<undefined>;
|
1994
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1995
|
+
}, undefined>, v.ObjectSchema<{
|
1996
|
+
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
|
1997
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
|
1998
|
+
}, undefined>], undefined>;
|
1999
|
+
readonly success: v.LiteralSchema<true, undefined>;
|
2000
|
+
readonly typed: v.LiteralSchema<true, undefined>;
|
2001
|
+
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
|
2002
|
+
}, undefined>, undefined>;
|
2003
|
+
readonly credentials: v.SchemaWithPipe<[v.ArraySchema<v.VariantSchema<"format", [v.ObjectSchema<{
|
2004
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2005
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2006
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2007
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
2008
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
2009
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2010
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2011
|
+
namespace: string;
|
2012
|
+
claim_name: string;
|
2013
|
+
values?: (string | number | boolean)[] | undefined;
|
2014
|
+
id?: string | undefined;
|
2015
|
+
}, ...{
|
2016
|
+
namespace: string;
|
2017
|
+
claim_name: string;
|
2018
|
+
values?: (string | number | boolean)[] | undefined;
|
2019
|
+
id?: string | undefined;
|
2020
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2021
|
+
namespace: string;
|
2022
|
+
claim_name: string;
|
2023
|
+
values?: (string | number | boolean)[] | undefined;
|
2024
|
+
id?: string | undefined;
|
2025
|
+
}, ...{
|
2026
|
+
namespace: string;
|
2027
|
+
claim_name: string;
|
2028
|
+
values?: (string | number | boolean)[] | undefined;
|
2029
|
+
id?: string | undefined;
|
2030
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2031
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
2032
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
2033
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
2034
|
+
doctype_value?: string | undefined;
|
2035
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2036
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2037
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2038
|
+
}, undefined>, v.ObjectSchema<{
|
2039
|
+
readonly format: v.SchemaWithPipe<[v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>, v.DescriptionAction<"vc+sd-jwt" | "dc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2040
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2041
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2042
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2043
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2044
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2045
|
+
path: (string | number | null)[];
|
2046
|
+
values?: (string | number | boolean)[] | undefined;
|
2047
|
+
id?: string | undefined;
|
2048
|
+
}, ...{
|
2049
|
+
path: (string | number | null)[];
|
2050
|
+
values?: (string | number | boolean)[] | undefined;
|
2051
|
+
id?: string | undefined;
|
2052
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2053
|
+
path: (string | number | null)[];
|
2054
|
+
values?: (string | number | boolean)[] | undefined;
|
2055
|
+
id?: string | undefined;
|
2056
|
+
}, ...{
|
2057
|
+
path: (string | number | null)[];
|
2058
|
+
values?: (string | number | boolean)[] | undefined;
|
2059
|
+
id?: string | undefined;
|
2060
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2061
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
2062
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
2063
|
+
}, undefined>, v.DescriptionAction<{
|
2064
|
+
vct_values?: string[] | undefined;
|
2065
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
|
2066
|
+
vct_values?: string[] | undefined;
|
2067
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2068
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2069
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2070
|
+
}, undefined>, v.ObjectSchema<{
|
2071
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
2072
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2073
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2074
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2075
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2076
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2077
|
+
path: (string | number | null)[];
|
2078
|
+
values?: (string | number | boolean)[] | undefined;
|
2079
|
+
id?: string | undefined;
|
2080
|
+
}, ...{
|
2081
|
+
path: (string | number | null)[];
|
2082
|
+
values?: (string | number | boolean)[] | undefined;
|
2083
|
+
id?: string | undefined;
|
2084
|
+
}[]], undefined>]>, undefined>;
|
2085
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2086
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2087
|
+
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
|
2088
|
+
id: string;
|
2089
|
+
format: "mso_mdoc";
|
2090
|
+
claims?: [{
|
2091
|
+
namespace: string;
|
2092
|
+
claim_name: string;
|
2093
|
+
values?: (string | number | boolean)[] | undefined;
|
2094
|
+
id?: string | undefined;
|
2095
|
+
}, ...{
|
2096
|
+
namespace: string;
|
2097
|
+
claim_name: string;
|
2098
|
+
values?: (string | number | boolean)[] | undefined;
|
2099
|
+
id?: string | undefined;
|
2100
|
+
}[]] | undefined;
|
2101
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2102
|
+
meta?: {
|
2103
|
+
doctype_value?: string | undefined;
|
2104
|
+
} | undefined;
|
2105
|
+
} | {
|
2106
|
+
id: string;
|
2107
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2108
|
+
claims?: [{
|
2109
|
+
path: (string | number | null)[];
|
2110
|
+
values?: (string | number | boolean)[] | undefined;
|
2111
|
+
id?: string | undefined;
|
2112
|
+
}, ...{
|
2113
|
+
path: (string | number | null)[];
|
2114
|
+
values?: (string | number | boolean)[] | undefined;
|
2115
|
+
id?: string | undefined;
|
2116
|
+
}[]] | undefined;
|
2117
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2118
|
+
meta?: {
|
2119
|
+
vct_values?: string[] | undefined;
|
2120
|
+
} | undefined;
|
2121
|
+
} | {
|
2122
|
+
id: string;
|
2123
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2124
|
+
claims?: [{
|
2125
|
+
path: (string | number | null)[];
|
2126
|
+
values?: (string | number | boolean)[] | undefined;
|
2127
|
+
id?: string | undefined;
|
2128
|
+
}, ...{
|
2129
|
+
path: (string | number | null)[];
|
2130
|
+
values?: (string | number | boolean)[] | undefined;
|
2131
|
+
id?: string | undefined;
|
2132
|
+
}[]] | undefined;
|
2133
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2134
|
+
}, ...({
|
2135
|
+
id: string;
|
2136
|
+
format: "mso_mdoc";
|
2137
|
+
claims?: [{
|
2138
|
+
namespace: string;
|
2139
|
+
claim_name: string;
|
2140
|
+
values?: (string | number | boolean)[] | undefined;
|
2141
|
+
id?: string | undefined;
|
2142
|
+
}, ...{
|
2143
|
+
namespace: string;
|
2144
|
+
claim_name: string;
|
2145
|
+
values?: (string | number | boolean)[] | undefined;
|
2146
|
+
id?: string | undefined;
|
2147
|
+
}[]] | undefined;
|
2148
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2149
|
+
meta?: {
|
2150
|
+
doctype_value?: string | undefined;
|
2151
|
+
} | undefined;
|
2152
|
+
} | {
|
2153
|
+
id: string;
|
2154
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2155
|
+
claims?: [{
|
2156
|
+
path: (string | number | null)[];
|
2157
|
+
values?: (string | number | boolean)[] | undefined;
|
2158
|
+
id?: string | undefined;
|
2159
|
+
}, ...{
|
2160
|
+
path: (string | number | null)[];
|
2161
|
+
values?: (string | number | boolean)[] | undefined;
|
2162
|
+
id?: string | undefined;
|
2163
|
+
}[]] | undefined;
|
2164
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2165
|
+
meta?: {
|
2166
|
+
vct_values?: string[] | undefined;
|
2167
|
+
} | undefined;
|
2168
|
+
} | {
|
2169
|
+
id: string;
|
2170
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2171
|
+
claims?: [{
|
2172
|
+
path: (string | number | null)[];
|
2173
|
+
values?: (string | number | boolean)[] | undefined;
|
2174
|
+
id?: string | undefined;
|
2175
|
+
}, ...{
|
2176
|
+
path: (string | number | null)[];
|
2177
|
+
values?: (string | number | boolean)[] | undefined;
|
2178
|
+
id?: string | undefined;
|
2179
|
+
}[]] | undefined;
|
2180
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2181
|
+
})[]], undefined>, v.DescriptionAction<[{
|
2182
|
+
id: string;
|
2183
|
+
format: "mso_mdoc";
|
2184
|
+
claims?: [{
|
2185
|
+
namespace: string;
|
2186
|
+
claim_name: string;
|
2187
|
+
values?: (string | number | boolean)[] | undefined;
|
2188
|
+
id?: string | undefined;
|
2189
|
+
}, ...{
|
2190
|
+
namespace: string;
|
2191
|
+
claim_name: string;
|
2192
|
+
values?: (string | number | boolean)[] | undefined;
|
2193
|
+
id?: string | undefined;
|
2194
|
+
}[]] | undefined;
|
2195
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2196
|
+
meta?: {
|
2197
|
+
doctype_value?: string | undefined;
|
2198
|
+
} | undefined;
|
2199
|
+
} | {
|
2200
|
+
id: string;
|
2201
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2202
|
+
claims?: [{
|
2203
|
+
path: (string | number | null)[];
|
2204
|
+
values?: (string | number | boolean)[] | undefined;
|
2205
|
+
id?: string | undefined;
|
2206
|
+
}, ...{
|
2207
|
+
path: (string | number | null)[];
|
2208
|
+
values?: (string | number | boolean)[] | undefined;
|
2209
|
+
id?: string | undefined;
|
2210
|
+
}[]] | undefined;
|
2211
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2212
|
+
meta?: {
|
2213
|
+
vct_values?: string[] | undefined;
|
2214
|
+
} | undefined;
|
2215
|
+
} | {
|
2216
|
+
id: string;
|
2217
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2218
|
+
claims?: [{
|
2219
|
+
path: (string | number | null)[];
|
2220
|
+
values?: (string | number | boolean)[] | undefined;
|
2221
|
+
id?: string | undefined;
|
2222
|
+
}, ...{
|
2223
|
+
path: (string | number | null)[];
|
2224
|
+
values?: (string | number | boolean)[] | undefined;
|
2225
|
+
id?: string | undefined;
|
2226
|
+
}[]] | undefined;
|
2227
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2228
|
+
}, ...({
|
2229
|
+
id: string;
|
2230
|
+
format: "mso_mdoc";
|
2231
|
+
claims?: [{
|
2232
|
+
namespace: string;
|
2233
|
+
claim_name: string;
|
2234
|
+
values?: (string | number | boolean)[] | undefined;
|
2235
|
+
id?: string | undefined;
|
2236
|
+
}, ...{
|
2237
|
+
namespace: string;
|
2238
|
+
claim_name: string;
|
2239
|
+
values?: (string | number | boolean)[] | undefined;
|
2240
|
+
id?: string | undefined;
|
2241
|
+
}[]] | undefined;
|
2242
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2243
|
+
meta?: {
|
2244
|
+
doctype_value?: string | undefined;
|
2245
|
+
} | undefined;
|
2246
|
+
} | {
|
2247
|
+
id: string;
|
2248
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2249
|
+
claims?: [{
|
2250
|
+
path: (string | number | null)[];
|
2251
|
+
values?: (string | number | boolean)[] | undefined;
|
2252
|
+
id?: string | undefined;
|
2253
|
+
}, ...{
|
2254
|
+
path: (string | number | null)[];
|
2255
|
+
values?: (string | number | boolean)[] | undefined;
|
2256
|
+
id?: string | undefined;
|
2257
|
+
}[]] | undefined;
|
2258
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2259
|
+
meta?: {
|
2260
|
+
vct_values?: string[] | undefined;
|
2261
|
+
} | undefined;
|
2262
|
+
} | {
|
2263
|
+
id: string;
|
2264
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2265
|
+
claims?: [{
|
2266
|
+
path: (string | number | null)[];
|
2267
|
+
values?: (string | number | boolean)[] | undefined;
|
2268
|
+
id?: string | undefined;
|
2269
|
+
}, ...{
|
2270
|
+
path: (string | number | null)[];
|
2271
|
+
values?: (string | number | boolean)[] | undefined;
|
2272
|
+
id?: string | undefined;
|
2273
|
+
}[]] | undefined;
|
2274
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2275
|
+
})[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
|
2276
|
+
readonly credential_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2277
|
+
readonly matching_options: v.UnionSchema<[v.UndefinedSchema<undefined>, v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>], undefined>;
|
2278
|
+
readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
|
2279
|
+
readonly required: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, "OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.">]>;
|
2280
|
+
readonly purpose: v.SchemaWithPipe<[v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>], undefined>, undefined>, v.DescriptionAction<string | number | {
|
2281
|
+
[x: string]: unknown;
|
2282
|
+
} | undefined, "OPTIONAL. A string, number or object specifying the purpose of the query.">]>;
|
2283
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2284
|
+
options: [string[], ...string[][]];
|
2285
|
+
required: boolean;
|
2286
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2287
|
+
purpose?: string | number | {
|
2288
|
+
[x: string]: unknown;
|
2289
|
+
} | undefined;
|
2290
|
+
}, ...{
|
2291
|
+
options: [string[], ...string[][]];
|
2292
|
+
required: boolean;
|
2293
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2294
|
+
purpose?: string | number | {
|
2295
|
+
[x: string]: unknown;
|
2296
|
+
} | undefined;
|
2297
|
+
}[]], undefined>, v.DescriptionAction<[{
|
2298
|
+
options: [string[], ...string[][]];
|
2299
|
+
required: boolean;
|
2300
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2301
|
+
purpose?: string | number | {
|
2302
|
+
[x: string]: unknown;
|
2303
|
+
} | undefined;
|
2304
|
+
}, ...{
|
2305
|
+
options: [string[], ...string[][]];
|
2306
|
+
required: boolean;
|
2307
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2308
|
+
purpose?: string | number | {
|
2309
|
+
[x: string]: unknown;
|
2310
|
+
} | undefined;
|
2311
|
+
}[]], "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.">]>, undefined>;
|
2312
|
+
readonly canBeSatisfied: v.BooleanSchema<undefined>;
|
2313
|
+
}, undefined>;
|
2314
|
+
type Input = v.InferInput<typeof vModel>;
|
2315
|
+
type Output = v.InferOutput<typeof vModel>;
|
2316
|
+
const parse: (input: Input | DcqlQueryResult) => {
|
2317
|
+
credentials: [{
|
2318
|
+
id: string;
|
2319
|
+
format: "mso_mdoc";
|
2320
|
+
claims?: [{
|
2321
|
+
namespace: string;
|
2322
|
+
claim_name: string;
|
2323
|
+
values?: (string | number | boolean)[] | undefined;
|
2324
|
+
id?: string | undefined;
|
2325
|
+
}, ...{
|
2326
|
+
namespace: string;
|
2327
|
+
claim_name: string;
|
2328
|
+
values?: (string | number | boolean)[] | undefined;
|
2329
|
+
id?: string | undefined;
|
2330
|
+
}[]] | undefined;
|
2331
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2332
|
+
meta?: {
|
2333
|
+
doctype_value?: string | undefined;
|
2334
|
+
} | undefined;
|
2335
|
+
} | {
|
2336
|
+
id: string;
|
2337
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2338
|
+
claims?: [{
|
2339
|
+
path: (string | number | null)[];
|
2340
|
+
values?: (string | number | boolean)[] | undefined;
|
2341
|
+
id?: string | undefined;
|
2342
|
+
}, ...{
|
2343
|
+
path: (string | number | null)[];
|
2344
|
+
values?: (string | number | boolean)[] | undefined;
|
2345
|
+
id?: string | undefined;
|
2346
|
+
}[]] | undefined;
|
2347
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2348
|
+
meta?: {
|
2349
|
+
vct_values?: string[] | undefined;
|
2350
|
+
} | undefined;
|
2351
|
+
} | {
|
2352
|
+
id: string;
|
2353
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2354
|
+
claims?: [{
|
2355
|
+
path: (string | number | null)[];
|
2356
|
+
values?: (string | number | boolean)[] | undefined;
|
2357
|
+
id?: string | undefined;
|
2358
|
+
}, ...{
|
2359
|
+
path: (string | number | null)[];
|
2360
|
+
values?: (string | number | boolean)[] | undefined;
|
2361
|
+
id?: string | undefined;
|
2362
|
+
}[]] | undefined;
|
2363
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2364
|
+
}, ...({
|
2365
|
+
id: string;
|
2366
|
+
format: "mso_mdoc";
|
2367
|
+
claims?: [{
|
2368
|
+
namespace: string;
|
2369
|
+
claim_name: string;
|
2370
|
+
values?: (string | number | boolean)[] | undefined;
|
2371
|
+
id?: string | undefined;
|
2372
|
+
}, ...{
|
2373
|
+
namespace: string;
|
2374
|
+
claim_name: string;
|
2375
|
+
values?: (string | number | boolean)[] | undefined;
|
2376
|
+
id?: string | undefined;
|
2377
|
+
}[]] | undefined;
|
2378
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2379
|
+
meta?: {
|
2380
|
+
doctype_value?: string | undefined;
|
2381
|
+
} | undefined;
|
2382
|
+
} | {
|
2383
|
+
id: string;
|
2384
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2385
|
+
claims?: [{
|
2386
|
+
path: (string | number | null)[];
|
2387
|
+
values?: (string | number | boolean)[] | undefined;
|
2388
|
+
id?: string | undefined;
|
2389
|
+
}, ...{
|
2390
|
+
path: (string | number | null)[];
|
2391
|
+
values?: (string | number | boolean)[] | undefined;
|
2392
|
+
id?: string | undefined;
|
2393
|
+
}[]] | undefined;
|
2394
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2395
|
+
meta?: {
|
2396
|
+
vct_values?: string[] | undefined;
|
2397
|
+
} | undefined;
|
2398
|
+
} | {
|
2399
|
+
id: string;
|
2400
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2401
|
+
claims?: [{
|
2402
|
+
path: (string | number | null)[];
|
2403
|
+
values?: (string | number | boolean)[] | undefined;
|
2404
|
+
id?: string | undefined;
|
2405
|
+
}, ...{
|
2406
|
+
path: (string | number | null)[];
|
2407
|
+
values?: (string | number | boolean)[] | undefined;
|
2408
|
+
id?: string | undefined;
|
2409
|
+
}[]] | undefined;
|
2410
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2411
|
+
})[]];
|
2412
|
+
canBeSatisfied: boolean;
|
2413
|
+
invalid_matches: {
|
2414
|
+
[x: string]: {
|
2415
|
+
output: unknown;
|
2416
|
+
issues: [unknown, ...unknown[]];
|
2417
|
+
success: false;
|
2418
|
+
typed: boolean;
|
2419
|
+
claim_set_index: number | undefined;
|
2420
|
+
presentation_id: string;
|
2421
|
+
};
|
2422
|
+
} | undefined;
|
2423
|
+
valid_matches: {
|
2424
|
+
[x: string]: {
|
2425
|
+
output: {
|
2426
|
+
credential_format: "mso_mdoc";
|
2427
|
+
doctype: string;
|
2428
|
+
namespaces: {
|
2429
|
+
[x: string]: {
|
2430
|
+
[x: string]: unknown;
|
2431
|
+
};
|
2432
|
+
};
|
2433
|
+
} | {
|
2434
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
2435
|
+
vct: string;
|
2436
|
+
claims: {
|
2437
|
+
[x: string]: Json;
|
2438
|
+
};
|
2439
|
+
} | {
|
2440
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2441
|
+
claims: {
|
2442
|
+
[x: string]: Json;
|
2443
|
+
};
|
2444
|
+
};
|
2445
|
+
success: true;
|
2446
|
+
typed: true;
|
2447
|
+
claim_set_index: number | undefined;
|
2448
|
+
presentation_id: string;
|
2449
|
+
};
|
2450
|
+
};
|
2451
|
+
credential_sets?: [{
|
2452
|
+
options: [string[], ...string[][]];
|
2453
|
+
required: boolean;
|
2454
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2455
|
+
purpose?: string | number | {
|
2456
|
+
[x: string]: unknown;
|
2457
|
+
} | undefined;
|
2458
|
+
}, ...{
|
2459
|
+
options: [string[], ...string[][]];
|
2460
|
+
required: boolean;
|
2461
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2462
|
+
purpose?: string | number | {
|
2463
|
+
[x: string]: unknown;
|
2464
|
+
} | undefined;
|
2465
|
+
}[]] | undefined;
|
2466
|
+
};
|
2467
|
+
/**
|
2468
|
+
* Query if the presentation record can be satisfied by the provided presentations
|
2469
|
+
* considering the dcql query
|
2470
|
+
*
|
2471
|
+
* @param dcqlQuery
|
2472
|
+
* @param dcqlPresentation
|
2473
|
+
*/
|
2474
|
+
const fromDcqlPresentation: (dcqlPresentation: Record<string, DcqlCredentialPresentation>, ctx: {
|
2475
|
+
dcqlQuery: DcqlQuery;
|
2476
|
+
}) => Output;
|
2477
|
+
const validate: (dcqlQueryResult: DcqlPresentationResult) => {
|
2478
|
+
credentials: [{
|
2479
|
+
id: string;
|
2480
|
+
format: "mso_mdoc";
|
2481
|
+
claims?: [{
|
2482
|
+
namespace: string;
|
2483
|
+
claim_name: string;
|
2484
|
+
values?: (string | number | boolean)[] | undefined;
|
2485
|
+
id?: string | undefined;
|
2486
|
+
}, ...{
|
2487
|
+
namespace: string;
|
2488
|
+
claim_name: string;
|
2489
|
+
values?: (string | number | boolean)[] | undefined;
|
2490
|
+
id?: string | undefined;
|
2491
|
+
}[]] | undefined;
|
2492
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2493
|
+
meta?: {
|
2494
|
+
doctype_value?: string | undefined;
|
2495
|
+
} | undefined;
|
2496
|
+
} | {
|
2497
|
+
id: string;
|
2498
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2499
|
+
claims?: [{
|
2500
|
+
path: (string | number | null)[];
|
2501
|
+
values?: (string | number | boolean)[] | undefined;
|
2502
|
+
id?: string | undefined;
|
2503
|
+
}, ...{
|
2504
|
+
path: (string | number | null)[];
|
2505
|
+
values?: (string | number | boolean)[] | undefined;
|
2506
|
+
id?: string | undefined;
|
2507
|
+
}[]] | undefined;
|
2508
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2509
|
+
meta?: {
|
2510
|
+
vct_values?: string[] | undefined;
|
2511
|
+
} | undefined;
|
2512
|
+
} | {
|
2513
|
+
id: string;
|
2514
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2515
|
+
claims?: [{
|
2516
|
+
path: (string | number | null)[];
|
2517
|
+
values?: (string | number | boolean)[] | undefined;
|
2518
|
+
id?: string | undefined;
|
2519
|
+
}, ...{
|
2520
|
+
path: (string | number | null)[];
|
2521
|
+
values?: (string | number | boolean)[] | undefined;
|
2522
|
+
id?: string | undefined;
|
2523
|
+
}[]] | undefined;
|
2524
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2525
|
+
}, ...({
|
2526
|
+
id: string;
|
2527
|
+
format: "mso_mdoc";
|
2528
|
+
claims?: [{
|
2529
|
+
namespace: string;
|
2530
|
+
claim_name: string;
|
2531
|
+
values?: (string | number | boolean)[] | undefined;
|
2532
|
+
id?: string | undefined;
|
2533
|
+
}, ...{
|
2534
|
+
namespace: string;
|
2535
|
+
claim_name: string;
|
2536
|
+
values?: (string | number | boolean)[] | undefined;
|
2537
|
+
id?: string | undefined;
|
2538
|
+
}[]] | undefined;
|
2539
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2540
|
+
meta?: {
|
2541
|
+
doctype_value?: string | undefined;
|
2542
|
+
} | undefined;
|
2543
|
+
} | {
|
2544
|
+
id: string;
|
2545
|
+
format: "vc+sd-jwt" | "dc+sd-jwt";
|
2546
|
+
claims?: [{
|
2547
|
+
path: (string | number | null)[];
|
2548
|
+
values?: (string | number | boolean)[] | undefined;
|
2549
|
+
id?: string | undefined;
|
2550
|
+
}, ...{
|
2551
|
+
path: (string | number | null)[];
|
2552
|
+
values?: (string | number | boolean)[] | undefined;
|
2553
|
+
id?: string | undefined;
|
2554
|
+
}[]] | undefined;
|
2555
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2556
|
+
meta?: {
|
2557
|
+
vct_values?: string[] | undefined;
|
2558
|
+
} | undefined;
|
2559
|
+
} | {
|
2560
|
+
id: string;
|
2561
|
+
format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2562
|
+
claims?: [{
|
2563
|
+
path: (string | number | null)[];
|
2564
|
+
values?: (string | number | boolean)[] | undefined;
|
2565
|
+
id?: string | undefined;
|
2566
|
+
}, ...{
|
2567
|
+
path: (string | number | null)[];
|
2568
|
+
values?: (string | number | boolean)[] | undefined;
|
2569
|
+
id?: string | undefined;
|
2570
|
+
}[]] | undefined;
|
2571
|
+
claim_sets?: [string[], ...string[][]] | undefined;
|
2572
|
+
})[]];
|
2573
|
+
canBeSatisfied: boolean;
|
2574
|
+
invalid_matches: {
|
2575
|
+
[x: string]: {
|
2576
|
+
output: unknown;
|
2577
|
+
issues: [unknown, ...unknown[]];
|
2578
|
+
success: false;
|
2579
|
+
typed: boolean;
|
2580
|
+
claim_set_index: number | undefined;
|
2581
|
+
presentation_id: string;
|
2582
|
+
};
|
2583
|
+
} | undefined;
|
2584
|
+
valid_matches: {
|
2585
|
+
[x: string]: {
|
2586
|
+
output: {
|
2587
|
+
credential_format: "mso_mdoc";
|
2588
|
+
doctype: string;
|
2589
|
+
namespaces: {
|
2590
|
+
[x: string]: {
|
2591
|
+
[x: string]: unknown;
|
2592
|
+
};
|
2593
|
+
};
|
2594
|
+
} | {
|
2595
|
+
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
|
2596
|
+
vct: string;
|
2597
|
+
claims: {
|
2598
|
+
[x: string]: Json;
|
2599
|
+
};
|
2600
|
+
} | {
|
2601
|
+
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
|
2602
|
+
claims: {
|
2603
|
+
[x: string]: Json;
|
2604
|
+
};
|
2605
|
+
};
|
2606
|
+
success: true;
|
2607
|
+
typed: true;
|
2608
|
+
claim_set_index: number | undefined;
|
2609
|
+
presentation_id: string;
|
2610
|
+
};
|
2611
|
+
};
|
2612
|
+
credential_sets?: [{
|
2613
|
+
options: [string[], ...string[][]];
|
2614
|
+
required: boolean;
|
2615
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2616
|
+
purpose?: string | number | {
|
2617
|
+
[x: string]: unknown;
|
2618
|
+
} | undefined;
|
2619
|
+
}, ...{
|
2620
|
+
options: [string[], ...string[][]];
|
2621
|
+
required: boolean;
|
2622
|
+
matching_options: [string[], ...string[][]] | undefined;
|
2623
|
+
purpose?: string | number | {
|
2624
|
+
[x: string]: unknown;
|
2625
|
+
} | undefined;
|
2626
|
+
}[]] | undefined;
|
2627
|
+
};
|
2628
|
+
}
|
2629
|
+
type DcqlPresentationResult = DcqlPresentationResult.Output;
|
2630
|
+
|
2631
|
+
declare namespace DcqlPresentation {
|
2632
|
+
const vModel: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>], undefined>, undefined>;
|
2633
|
+
type Input = v.InferInput<typeof vModel>;
|
2634
|
+
type Output = v.InferOutput<typeof vModel>;
|
2635
|
+
const parse: (input: Input | string) => {
|
2636
|
+
[x: string]: string | {
|
2637
|
+
[x: string]: Json;
|
2638
|
+
};
|
2639
|
+
};
|
2640
|
+
const encode: (input: Output) => string;
|
2641
|
+
}
|
2642
|
+
type DcqlPresentation = DcqlPresentation.Output;
|
2643
|
+
|
2644
|
+
declare const runDcqlQuery: (dcqlQuery: DcqlQuery.Output, ctx: {
|
2645
|
+
credentials: DcqlCredential[];
|
2646
|
+
presentation: boolean;
|
2647
|
+
}) => DcqlQueryResult;
|
2648
|
+
|
2649
|
+
/**
|
2650
|
+
* Specifies claims withing a requested Credential.
|
2651
|
+
*/
|
2652
|
+
declare namespace DcqlClaimsQuery {
|
2653
|
+
const vValue: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>;
|
2654
|
+
const vPath: v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>;
|
2655
|
+
const vW3cSdJwtVc: v.ObjectSchema<{
|
2656
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2657
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2658
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2659
|
+
}, undefined>;
|
2660
|
+
type W3cAndSdJwtVc = v.InferOutput<typeof vW3cSdJwtVc>;
|
2661
|
+
const vMdoc: v.ObjectSchema<{
|
2662
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2663
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
2664
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
2665
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2666
|
+
}, undefined>;
|
2667
|
+
type Mdoc = v.InferOutput<typeof vMdoc>;
|
2668
|
+
const vModel: v.UnionSchema<[v.ObjectSchema<{
|
2669
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2670
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
2671
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
2672
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2673
|
+
}, undefined>, v.ObjectSchema<{
|
2674
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2675
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2676
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2677
|
+
}, undefined>], undefined>;
|
2678
|
+
type Input = v.InferInput<typeof vModel>;
|
2679
|
+
type Out = v.InferOutput<typeof vModel>;
|
2680
|
+
}
|
2681
|
+
type DcqlClaimsQuery = DcqlClaimsQuery.Out;
|
2682
|
+
|
2683
|
+
/**
|
2684
|
+
* A Credential Query is an object representing a request for a presentation of one Credential.
|
2685
|
+
*/
|
2686
|
+
declare namespace DcqlCredentialQuery {
|
2687
|
+
const vMdoc: v.ObjectSchema<{
|
2688
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2689
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2690
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2691
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
2692
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
2693
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2694
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2695
|
+
namespace: string;
|
2696
|
+
claim_name: string;
|
2697
|
+
values?: (string | number | boolean)[] | undefined;
|
2698
|
+
id?: string | undefined;
|
2699
|
+
}, ...{
|
2700
|
+
namespace: string;
|
2701
|
+
claim_name: string;
|
2702
|
+
values?: (string | number | boolean)[] | undefined;
|
2703
|
+
id?: string | undefined;
|
2704
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2705
|
+
namespace: string;
|
2706
|
+
claim_name: string;
|
2707
|
+
values?: (string | number | boolean)[] | undefined;
|
2708
|
+
id?: string | undefined;
|
2709
|
+
}, ...{
|
2710
|
+
namespace: string;
|
2711
|
+
claim_name: string;
|
2712
|
+
values?: (string | number | boolean)[] | undefined;
|
2713
|
+
id?: string | undefined;
|
2714
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2715
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
2716
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
2717
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
2718
|
+
doctype_value?: string | undefined;
|
2719
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2720
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2721
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2722
|
+
}, undefined>;
|
2723
|
+
type Mdoc = v.InferOutput<typeof vMdoc>;
|
2724
|
+
const vSdJwtVc: v.ObjectSchema<{
|
2725
|
+
readonly format: v.SchemaWithPipe<[v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>, v.DescriptionAction<"vc+sd-jwt" | "dc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2726
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2727
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2728
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2729
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2730
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2731
|
+
path: (string | number | null)[];
|
2732
|
+
values?: (string | number | boolean)[] | undefined;
|
2733
|
+
id?: string | undefined;
|
2734
|
+
}, ...{
|
2735
|
+
path: (string | number | null)[];
|
2736
|
+
values?: (string | number | boolean)[] | undefined;
|
2737
|
+
id?: string | undefined;
|
2738
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2739
|
+
path: (string | number | null)[];
|
2740
|
+
values?: (string | number | boolean)[] | undefined;
|
2741
|
+
id?: string | undefined;
|
2742
|
+
}, ...{
|
2743
|
+
path: (string | number | null)[];
|
2744
|
+
values?: (string | number | boolean)[] | undefined;
|
2745
|
+
id?: string | undefined;
|
2746
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2747
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
2748
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
2749
|
+
}, undefined>, v.DescriptionAction<{
|
2750
|
+
vct_values?: string[] | undefined;
|
2751
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
|
2752
|
+
vct_values?: string[] | undefined;
|
2753
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2754
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2755
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2756
|
+
}, undefined>;
|
2757
|
+
type SdJwtVc = v.InferOutput<typeof vSdJwtVc>;
|
2758
|
+
const vW3cVc: v.ObjectSchema<{
|
2759
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
2760
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2761
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2762
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2763
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2764
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2765
|
+
path: (string | number | null)[];
|
2766
|
+
values?: (string | number | boolean)[] | undefined;
|
2767
|
+
id?: string | undefined;
|
2768
|
+
}, ...{
|
2769
|
+
path: (string | number | null)[];
|
2770
|
+
values?: (string | number | boolean)[] | undefined;
|
2771
|
+
id?: string | undefined;
|
2772
|
+
}[]], undefined>]>, undefined>;
|
2773
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2774
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2775
|
+
}, undefined>;
|
2776
|
+
type W3cVc = v.InferOutput<typeof vW3cVc>;
|
2777
|
+
const vModel: v.VariantSchema<"format", [v.ObjectSchema<{
|
2778
|
+
readonly format: v.SchemaWithPipe<[v.LiteralSchema<"mso_mdoc", undefined>, v.DescriptionAction<"mso_mdoc", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2779
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2780
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2781
|
+
readonly namespace: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the namespace of the data element within the mdoc, e.g., org.iso.18013.5.1.">]>;
|
2782
|
+
readonly claim_name: v.SchemaWithPipe<[v.StringSchema<undefined>, v.DescriptionAction<string, "A string that specifies the data element identifier of the data element within the provided namespace in the mdoc, e.g., first_name.">]>;
|
2783
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2784
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2785
|
+
namespace: string;
|
2786
|
+
claim_name: string;
|
2787
|
+
values?: (string | number | boolean)[] | undefined;
|
2788
|
+
id?: string | undefined;
|
2789
|
+
}, ...{
|
2790
|
+
namespace: string;
|
2791
|
+
claim_name: string;
|
2792
|
+
values?: (string | number | boolean)[] | undefined;
|
2793
|
+
id?: string | undefined;
|
2794
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2795
|
+
namespace: string;
|
2796
|
+
claim_name: string;
|
2797
|
+
values?: (string | number | boolean)[] | undefined;
|
2798
|
+
id?: string | undefined;
|
2799
|
+
}, ...{
|
2800
|
+
namespace: string;
|
2801
|
+
claim_name: string;
|
2802
|
+
values?: (string | number | boolean)[] | undefined;
|
2803
|
+
id?: string | undefined;
|
2804
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2805
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
|
2806
|
+
readonly doctype_value: v.SchemaWithPipe<[v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "OPTIONAL. String that specifies an allowed value for the doctype of the requested Verifiable Credential.">]>;
|
2807
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
2808
|
+
doctype_value?: string | undefined;
|
2809
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2810
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2811
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2812
|
+
}, undefined>, v.ObjectSchema<{
|
2813
|
+
readonly format: v.SchemaWithPipe<[v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>, v.DescriptionAction<"vc+sd-jwt" | "dc+sd-jwt", "REQUIRED. A string that specifies the format of the requested Verifiable Credential.">]>;
|
2814
|
+
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2815
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2816
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2817
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2818
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2819
|
+
path: (string | number | null)[];
|
2820
|
+
values?: (string | number | boolean)[] | undefined;
|
2821
|
+
id?: string | undefined;
|
2822
|
+
}, ...{
|
2823
|
+
path: (string | number | null)[];
|
2824
|
+
values?: (string | number | boolean)[] | undefined;
|
2825
|
+
id?: string | undefined;
|
2826
|
+
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
|
2827
|
+
path: (string | number | null)[];
|
2828
|
+
values?: (string | number | boolean)[] | undefined;
|
2829
|
+
id?: string | undefined;
|
2830
|
+
}, ...{
|
2831
|
+
path: (string | number | null)[];
|
2832
|
+
values?: (string | number | boolean)[] | undefined;
|
2833
|
+
id?: string | undefined;
|
2834
|
+
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
|
2835
|
+
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
|
2836
|
+
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
2837
|
+
}, undefined>, v.DescriptionAction<{
|
2838
|
+
vct_values?: string[] | undefined;
|
2839
|
+
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
|
2840
|
+
vct_values?: string[] | undefined;
|
2841
|
+
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
|
2842
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2843
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2844
|
+
}, undefined>, v.ObjectSchema<{
|
2845
|
+
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
|
2846
|
+
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
|
2847
|
+
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "A string identifying the particular claim. The value MUST be a non-empty string consisting of alphanumeric, underscore (_) or hyphen (-) characters. Within the particular claims array, the same id MUST NOT be present more than once.">]>;
|
2848
|
+
readonly path: v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, undefined>, v.DescriptionAction<(string | number | null)[], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
|
2849
|
+
readonly values: v.SchemaWithPipe<[v.OptionalSchema<v.ArraySchema<v.UnionSchema<[v.StringSchema<undefined>, v.SchemaWithPipe<[v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>, v.DescriptionAction<(string | number | boolean)[] | undefined, "An array of strings, integers or boolean values that specifies the expected values of the claim. If the values property is present, the Wallet SHOULD return the claim only if the type and value of the claim both match for at least one of the elements in the array.">]>;
|
2850
|
+
}, undefined>, undefined>, v.CustomSchema<[{
|
2851
|
+
path: (string | number | null)[];
|
2852
|
+
values?: (string | number | boolean)[] | undefined;
|
2853
|
+
id?: string | undefined;
|
2854
|
+
}, ...{
|
2855
|
+
path: (string | number | null)[];
|
2856
|
+
values?: (string | number | boolean)[] | undefined;
|
2857
|
+
id?: string | undefined;
|
2858
|
+
}[]], undefined>]>, undefined>;
|
2859
|
+
readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "REQUIRED. A string identifying the Credential in the response and, if provided, the constraints in 'credential_sets'.">]>;
|
2860
|
+
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>, undefined>, v.DescriptionAction<[string[], ...string[][]] | undefined, "OPTIONAL. A non-empty array containing arrays of identifiers for elements in 'claims' that specifies which combinations of 'claims' for the Credential are requested.">]>;
|
2861
|
+
}, undefined>], undefined>;
|
2862
|
+
type Input = v.InferInput<typeof vModel>;
|
2863
|
+
type Output = v.InferOutput<typeof vModel>;
|
2864
|
+
const validate: (credentialQuery: Output) => void;
|
2865
|
+
}
|
2866
|
+
type DcqlCredentialQuery = DcqlCredentialQuery.Output;
|
2867
|
+
|
2868
|
+
/**
|
2869
|
+
* A Credential Set Query is an object representing
|
2870
|
+
* a request for one or more credentials to satisfy a particular use case with the Verifier.
|
2871
|
+
*/
|
2872
|
+
declare namespace CredentialSetQuery {
|
2873
|
+
const vModel: v.ObjectSchema<{
|
2874
|
+
readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
|
2875
|
+
readonly required: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, true>, v.DescriptionAction<boolean, "OPTIONAL. Boolean which indicates whether this set of Credentials is required to satisfy the particular use case at the Verifier. If omitted, the default value is 'true'.">]>;
|
2876
|
+
readonly purpose: v.SchemaWithPipe<[v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>], undefined>, undefined>, v.DescriptionAction<string | number | {
|
2877
|
+
[x: string]: unknown;
|
2878
|
+
} | undefined, "OPTIONAL. A string, number or object specifying the purpose of the query.">]>;
|
2879
|
+
}, undefined>;
|
2880
|
+
type Input = v.InferInput<typeof vModel>;
|
2881
|
+
type Output = v.InferOutput<typeof vModel>;
|
2882
|
+
}
|
2883
|
+
type CredentialSetQuery = CredentialSetQuery.Output;
|
2884
|
+
|
2885
|
+
export { CredentialSetQuery, DcqlClaimsQuery, DcqlCredential, DcqlCredentialPresentation, DcqlCredentialQuery, DcqlCredentialSetError, DcqlError, DcqlInvalidClaimsQueryIdError, DcqlInvalidPresentationRecordError, DcqlMdocCredential, DcqlMdocPresentation, DcqlMissingClaimSetParseError, DcqlNonUniqueCredentialQueryIdsError, DcqlParseError, DcqlPresentation, DcqlPresentationResult, DcqlPresentationResultError, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlSdJwtVcPresentation, DcqlUndefinedClaimSetIdError, DcqlW3cVcCredential, DcqlW3cVcPresentation, getCauseFromUnknown, getDcqlErrorFromUnknown, runDcqlQuery };
|