dcql
Version:
Digital Credentials Query Language (DCQL)
854 lines (848 loc) • 215 kB
TypeScript
import * as v from 'valibot';
declare function getCauseFromUnknown(cause: unknown): Error | undefined;
declare function getDcqlErrorFromUnknown(cause: unknown): DcqlError;
type DCQL_ERROR_CODE = 'PARSE_ERROR' | 'INTERNAL_SERVER_ERROR' | 'NOT_IMPLEMENTED' | 'BAD_REQUEST';
declare class DcqlError extends Error {
readonly cause?: Error;
readonly code: DCQL_ERROR_CODE;
constructor(opts: {
message?: string;
code: DCQL_ERROR_CODE;
cause?: unknown;
});
}
declare class DcqlCredentialSetError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlUndefinedClaimSetIdError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlNonUniqueCredentialQueryIdsError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlParseError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlInvalidClaimsQueryIdError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlMissingClaimSetParseError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlInvalidPresentationRecordError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
declare class DcqlPresentationResultError extends DcqlError {
constructor(opts: {
message: string;
cause?: unknown;
});
}
type UnknownBaseSchema = v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>;
type EnsureOutputAssignableToInput<T extends UnknownBaseSchema> = v.InferOutput<T> extends v.InferInput<T> ? T : never;
declare class Model<T extends UnknownBaseSchema> {
private input;
constructor(input: {
vModel: EnsureOutputAssignableToInput<T>;
});
get v(): EnsureOutputAssignableToInput<T>;
parse(input: T): DcqlParseError | v.InferOutput<T>;
safeParse(input: unknown): {
success: true;
output: v.InferOutput<T>;
} | {
success: false;
flattened: v.FlatErrors<T>;
error: v.ValiError<T>;
};
is(input: unknown): input is v.InferOutput<T>;
}
type InferModelTypes<T extends Model<any>> = T extends Model<infer U> ? {
Input: v.InferInput<U>;
Output: v.InferOutput<U>;
} : never;
type Json = string | number | boolean | null | {
[key: string]: Json;
} | Json[];
declare namespace DcqlMdocPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>;
const model: Model<v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlMdocPresentation = DcqlMdocPresentation.Model['Output'];
declare namespace DcqlSdJwtVcPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>;
const model: Model<v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation.Model['Output'];
declare namespace DcqlW3cVcPresentation {
const vModel: v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>;
const model: Model<v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
declare namespace DcqlCredentialPresentation {
const model: Model<v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>], undefined>>;
type Model = InferModelTypes<typeof model>;
}
type DcqlCredentialPresentation = DcqlCredentialPresentation.Model['Output'];
declare namespace DcqlQueryResult {
const vCredentialQueryResult: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly typed: v.LiteralSchema<true, undefined>;
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>], undefined>;
}, undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly typed: v.BooleanSchema<undefined>;
readonly output: v.UnknownSchema;
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
}, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined)[], ...({
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined)[][]], undefined>]>;
type CredentialQueryResult = v.InferOutput<typeof vCredentialQueryResult>;
const vModel: v.ObjectSchema<{
readonly credentials: v.SchemaWithPipe<[v.ArraySchema<v.VariantSchema<"format", [v.ObjectSchema<{
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.">]>;
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
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.">]>;
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.">]>;
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<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.">]>;
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.">]>;
}, undefined>, v.ObjectSchema<{
readonly intent_to_retain: v.SchemaWithPipe<[v.OptionalSchema<v.BooleanSchema<undefined>, undefined>, v.DescriptionAction<boolean | undefined, "A boolean that is equivalent to `IntentToRetain` variable defined in Section 8.3.2.1.2.1 of [@ISO.18013-5].">]>;
readonly path: v.SchemaWithPipe<[v.TupleSchema<[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.">]>, 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.">]>], undefined>, v.DescriptionAction<[string, string], "An array defining a claims path pointer into an mdoc. It must contain two elements of type string. The first element refers to a namespace and the second element refers to a data element identifier.">]>;
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<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.">]>;
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.">]>;
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]], undefined>]>, undefined>, v.DescriptionAction<[{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.ObjectSchema<{
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.">]>;
}, undefined>, undefined>, v.DescriptionAction<{
doctype_value?: string | undefined;
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
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'.">]>;
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>, undefined>, v.CustomSchema<[string, ...string[]], undefined>]>, undefined>, v.CustomSchema<[[string, ...string[]], ...[string, ...string[]][]], undefined>]>, undefined>, v.DescriptionAction<[[string, ...string[]], ...[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.">]>;
}, undefined>, v.ObjectSchema<{
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.">]>;
readonly claims: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<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.">]>;
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.CustomSchema<[string | number | null, ...(string | number | null)[]], undefined>, v.DescriptionAction<[string | number | null, ...(string | number | null)[]], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
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.">]>;
}, undefined>, undefined>, v.CustomSchema<[{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]], undefined>]>, undefined>, v.DescriptionAction<[{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined, "OPTIONAL. A non-empty array of objects as that specifies claims in the requested Credential.">]>;
readonly meta: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ObjectSchema<{
readonly vct_values: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
}, undefined>, v.DescriptionAction<{
vct_values?: string[] | undefined;
}, "OPTIONAL. An array of strings that specifies allowed values for the type of the requested Verifiable Credential.">]>, undefined>, v.DescriptionAction<{
vct_values?: string[] | undefined;
} | undefined, "OPTIONAL. An object defining additional properties requested by the Verifier that apply to the metadata and validity data of the Credential.">]>;
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'.">]>;
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>, undefined>, v.CustomSchema<[string, ...string[]], undefined>]>, undefined>, v.CustomSchema<[[string, ...string[]], ...[string, ...string[]][]], undefined>]>, undefined>, v.DescriptionAction<[[string, ...string[]], ...[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.">]>;
}, undefined>, v.ObjectSchema<{
readonly format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
readonly claims: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
readonly id: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<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.">]>;
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.CustomSchema<[string | number | null, ...(string | number | null)[]], undefined>, v.DescriptionAction<[string | number | null, ...(string | number | null)[]], "A non-empty array representing a claims path pointer that specifies the path to a claim within the Verifiable Credential.">]>;
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.">]>;
}, undefined>, undefined>, v.CustomSchema<[{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]], undefined>]>, undefined>;
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'.">]>;
readonly claim_sets: v.SchemaWithPipe<[v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>, undefined>, v.CustomSchema<[string, ...string[]], undefined>]>, undefined>, v.CustomSchema<[[string, ...string[]], ...[string, ...string[]][]], undefined>]>, undefined>, v.DescriptionAction<[[string, ...string[]], ...[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.">]>;
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
id: string;
format: "mso_mdoc";
claims?: [{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
doctype_value?: string | undefined;
} | undefined;
} | {
id: string;
format: "vc+sd-jwt" | "dc+sd-jwt";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
vct_values?: string[] | undefined;
} | undefined;
} | {
id: string;
format: "jwt_vc_json-ld" | "jwt_vc_json";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
}, ...({
id: string;
format: "mso_mdoc";
claims?: [{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
doctype_value?: string | undefined;
} | undefined;
} | {
id: string;
format: "vc+sd-jwt" | "dc+sd-jwt";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
vct_values?: string[] | undefined;
} | undefined;
} | {
id: string;
format: "jwt_vc_json-ld" | "jwt_vc_json";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
})[]], undefined>, v.DescriptionAction<[{
id: string;
format: "mso_mdoc";
claims?: [{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
doctype_value?: string | undefined;
} | undefined;
} | {
id: string;
format: "vc+sd-jwt" | "dc+sd-jwt";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
vct_values?: string[] | undefined;
} | undefined;
} | {
id: string;
format: "jwt_vc_json-ld" | "jwt_vc_json";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
}, ...({
id: string;
format: "mso_mdoc";
claims?: [{
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
}, ...({
namespace: string;
claim_name: string;
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
} | {
path: [string, string];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
intent_to_retain?: boolean | undefined;
})[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
doctype_value?: string | undefined;
} | undefined;
} | {
id: string;
format: "vc+sd-jwt" | "dc+sd-jwt";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
meta?: {
vct_values?: string[] | undefined;
} | undefined;
} | {
id: string;
format: "jwt_vc_json-ld" | "jwt_vc_json";
claims?: [{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}, ...{
path: [string | number | null, ...(string | number | null)[]];
values?: (string | number | boolean)[] | undefined;
id?: string | undefined;
}[]] | undefined;
claim_sets?: [[string, ...string[]], ...[string, ...string[]][]] | undefined;
})[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
readonly credential_matches: v.RecordSchema<v.SchemaWithPipe<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.NonEmptyAction<string, undefined>]>]>, v.UnionSchema<[v.ObjectSchema<{
readonly all: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly typed: v.LiteralSchema<true, undefined>;
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>], undefined>;
}, undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly typed: v.BooleanSchema<undefined>;
readonly output: v.UnknownSchema;
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined, ...({
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined)[]], undefined>]>, undefined>, v.CustomSchema<[[{
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined, ...({
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined)[]], ...[{
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined, ...({
output: {
credential_format: "mso_mdoc";
doctype: string;
namespaces: {
[x: string]: {
[x: string]: unknown;
};
};
} | {
credential_format: "vc+sd-jwt" | "dc+sd-jwt";
vct: string;
claims: {
[x: string]: Json;
};
} | {
credential_format: "jwt_vc_json-ld" | "jwt_vc_json";
claims: {
[x: string]: Json;
};
};
success: true;
typed: true;
claim_set_index: number | undefined;
input_credential_index: number;
issues?: undefined;
} | {
output: unknown;
issues: [unknown, ...unknown[]];
success: false;
typed: boolean;
claim_set_index: number | undefined;
input_credential_index: number;
} | undefined)[]][]], undefined>]>;
readonly success: v.LiteralSchema<true, undefined>;
readonly typed: v.LiteralSchema<true, undefined>;
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>], undefined>;
}, undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly all: v.SchemaWithPipe<[v.ArraySchema<v.SchemaWithPipe<[v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<true, undefined>;
readonly typed: v.LiteralSchema<true, undefined>;
readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, undefined>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
readonly output: v.VariantSchema<"credential_format", [v.ObjectSchema<{
readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
readonly doctype: v.StringSchema<undefined>;
readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["vc+sd-jwt", "dc+sd-jwt"], undefined>;
readonly vct: v.StringSchema<undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>, v.ObjectSchema<{
readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<Json, Json, v.BaseIssue<unknown>>, undefined>;
}, undefined>], undefined>;
}, undefined>, v.ObjectSchema<{
readonly success: v.LiteralSchema<false, undefined>;
readonly typed: v.BooleanSchema<undefined>;
readonly output: v.UnknownSchema;
readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
readonly input_credential_index: v.NumberSchema<undefined>;
readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
}, undefined>], undefined>, undefined>, v.CustomSchema<[{
output: {
credential_format