UNPKG

mina-attestations

Version:
1,455 lines 67.5 kB
import { z } from 'zod'; import type { SerializedNestedType, SerializedType } from './serialize-provable.ts'; import type { Json } from './types.ts'; export { SerializedTypeSchema, SerializedValueSchema, StoredCredentialSchema, PresentationRequestSchema, NodeSchema, InputSchema, ContextSchema, PresentationSchema, credentialSpecWithVk, }; export type { InputJSON, ConstantInputJSON, ImportedWitnessSpecJSON, CredentialSpecJSON, VerificationKeyJSON, CredentialSpecWithVkJSON, NodeJSON, SpecJSON, PresentationRequestJSON, StoredCredentialJSON, ContextJSON, ZkAppIdentityJSON, PresentationJSON, }; declare const maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; declare const featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; declare const SerializedTypeSchema: z.ZodType<SerializedType>; declare const SerializedValueSchema: z.ZodIntersection<z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>, z.ZodObject<{ value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strip", z.ZodTypeAny, { value: Json; }, { value: Json; }>>; type SerializedValue = z.infer<typeof SerializedValueSchema>; type NodeJSON = { type: 'owner'; } | { type: 'credential'; credentialKey: string; } | { type: 'issuer'; credentialKey: string; } | { type: 'issuerPublicKey'; credentialKey: string; } | { type: 'verificationKeyHash'; credentialKey: string; } | { type: 'publicInput'; credentialKey: string; } | { type: 'constant'; data: SerializedValue; } | { type: 'root'; } | { type: 'property'; key: string; inner: NodeJSON; } | { type: 'record'; data: Record<string, NodeJSON>; } | { type: 'equals'; left: NodeJSON; right: NodeJSON; } | { type: 'equalsOneOf'; input: NodeJSON; options: NodeJSON[] | NodeJSON; } | { type: 'lessThan'; left: NodeJSON; right: NodeJSON; } | { type: 'lessThanEq'; left: NodeJSON; right: NodeJSON; } | { type: 'add'; left: NodeJSON; right: NodeJSON; } | { type: 'sub'; left: NodeJSON; right: NodeJSON; } | { type: 'mul'; left: NodeJSON; right: NodeJSON; } | { type: 'div'; left: NodeJSON; right: NodeJSON; } | { type: 'and'; inputs: NodeJSON[]; } | { type: 'or'; left: NodeJSON; right: NodeJSON; } | { type: 'not'; inner: NodeJSON; } | { type: 'hash'; inputs: NodeJSON[]; prefix?: string | null; } | { type: 'ifThenElse'; condition: NodeJSON; thenNode: NodeJSON; elseNode: NodeJSON; }; declare const NodeSchema: z.ZodType<NodeJSON>; declare const importedWitnessSpec: z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>; type ImportedWitnessSpecJSON = z.infer<typeof importedWitnessSpec>; declare const credentialSpec: z.ZodObject<{ type: z.ZodLiteral<"credential">; credentialType: z.ZodUnion<[z.ZodLiteral<"native">, z.ZodLiteral<"unsigned">, z.ZodLiteral<"imported">]>; witness: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>, z.ZodNull]>; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }>; type CredentialSpecJSON = z.infer<typeof credentialSpec>; declare const verificationKeySimple: z.ZodObject<{ data: z.ZodString; hash: z.ZodString; }, "strip", z.ZodTypeAny, { data: string; hash: string; }, { data: string; hash: string; }>; type VerificationKeyJSON = z.infer<typeof verificationKeySimple>; declare const credentialSpecWithVk: z.ZodObject<{ spec: z.ZodObject<{ type: z.ZodLiteral<"credential">; credentialType: z.ZodUnion<[z.ZodLiteral<"native">, z.ZodLiteral<"unsigned">, z.ZodLiteral<"imported">]>; witness: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>, z.ZodNull]>; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }>; verificationKey: z.ZodObject<{ data: z.ZodString; hash: z.ZodString; }, "strip", z.ZodTypeAny, { data: string; hash: string; }, { data: string; hash: string; }>; }, "strip", z.ZodTypeAny, { spec: { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }; verificationKey: { data: string; hash: string; }; }, { spec: { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }; verificationKey: { data: string; hash: string; }; }>; type CredentialSpecWithVkJSON = z.infer<typeof credentialSpecWithVk>; declare const ConstantInputSchema: z.ZodObject<{ type: z.ZodLiteral<"constant">; data: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strict", z.ZodTypeAny, { value: Json; type: "constant"; data: SerializedType; }, { value: Json; type: "constant"; data: SerializedType; }>; type ConstantInputJSON = z.infer<typeof ConstantInputSchema>; declare const InputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"credential">; credentialType: z.ZodUnion<[z.ZodLiteral<"native">, z.ZodLiteral<"unsigned">, z.ZodLiteral<"imported">]>; witness: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>, z.ZodNull]>; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }>, z.ZodObject<{ type: z.ZodLiteral<"constant">; data: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strict", z.ZodTypeAny, { value: Json; type: "constant"; data: SerializedType; }, { value: Json; type: "constant"; data: SerializedType; }>, z.ZodObject<{ type: z.ZodLiteral<"claim">; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "claim"; data: SerializedNestedType; }, { type: "claim"; data: SerializedNestedType; }>]>; type InputJSON = z.infer<typeof InputSchema>; declare const spec: z.ZodObject<{ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"credential">; credentialType: z.ZodUnion<[z.ZodLiteral<"native">, z.ZodLiteral<"unsigned">, z.ZodLiteral<"imported">]>; witness: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>, z.ZodNull]>; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }>, z.ZodObject<{ type: z.ZodLiteral<"constant">; data: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strict", z.ZodTypeAny, { value: Json; type: "constant"; data: SerializedType; }, { value: Json; type: "constant"; data: SerializedType; }>, z.ZodObject<{ type: z.ZodLiteral<"claim">; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "claim"; data: SerializedNestedType; }, { type: "claim"; data: SerializedNestedType; }>]>>; assert: z.ZodType<NodeJSON, z.ZodTypeDef, NodeJSON>; outputClaim: z.ZodType<NodeJSON, z.ZodTypeDef, NodeJSON>; }, "strict", z.ZodTypeAny, { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }, { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }>; type SpecJSON = z.infer<typeof spec>; declare const zkAppIdentity: z.ZodObject<{ publicKey: z.ZodObject<{ _type: z.ZodLiteral<"PublicKey">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "PublicKey"; }, { value: string; _type: "PublicKey"; }>; tokenId: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; network: z.ZodUnion<[z.ZodLiteral<"mainnet">, z.ZodLiteral<"devnet">, z.ZodObject<{ custom: z.ZodString; }, "strip", z.ZodTypeAny, { custom: string; }, { custom: string; }>]>; }, "strict", z.ZodTypeAny, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }>; type ZkAppIdentityJSON = z.infer<typeof zkAppIdentity>; declare const ContextSchema: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"https">; action: z.ZodString; serverNonce: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; }, "strict", z.ZodTypeAny, { type: "https"; action: string; serverNonce: { value: string; _type: "Field"; }; }, { type: "https"; action: string; serverNonce: { value: string; _type: "Field"; }; }>, z.ZodObject<{ type: z.ZodLiteral<"zk-app">; action: z.ZodString; serverNonce: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; verifierIdentity: z.ZodObject<{ publicKey: z.ZodObject<{ _type: z.ZodLiteral<"PublicKey">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "PublicKey"; }, { value: string; _type: "PublicKey"; }>; tokenId: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; network: z.ZodUnion<[z.ZodLiteral<"mainnet">, z.ZodLiteral<"devnet">, z.ZodObject<{ custom: z.ZodString; }, "strip", z.ZodTypeAny, { custom: string; }, { custom: string; }>]>; }, "strict", z.ZodTypeAny, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }>; }, "strict", z.ZodTypeAny, { type: "zk-app"; action: string; serverNonce: { value: string; _type: "Field"; }; verifierIdentity: { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }; }, { type: "zk-app"; action: string; serverNonce: { value: string; _type: "Field"; }; verifierIdentity: { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }; }>, z.ZodNull]>; type ContextJSON = z.infer<typeof ContextSchema>; declare const PresentationRequestSchema: z.ZodObject<{ type: z.ZodUnion<[z.ZodLiteral<"no-context">, z.ZodLiteral<"zk-app">, z.ZodLiteral<"https">]>; spec: z.ZodObject<{ inputs: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"credential">; credentialType: z.ZodUnion<[z.ZodLiteral<"native">, z.ZodLiteral<"unsigned">, z.ZodLiteral<"imported">]>; witness: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"imported">; publicInputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; publicOutputType: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; maxProofsVerified: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>]>; featureFlags: z.ZodObject<{ rangeCheck0: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rangeCheck1: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldAdd: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; foreignFieldMul: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; xor: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; rot: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; lookup: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; runtimeTables: z.ZodUnion<[z.ZodBoolean, z.ZodNull]>; }, "strip", z.ZodTypeAny, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }, { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }>; }, "strip", z.ZodTypeAny, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }, { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; }>, z.ZodNull]>; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; }>, z.ZodObject<{ type: z.ZodLiteral<"constant">; data: z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>; value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strict", z.ZodTypeAny, { value: Json; type: "constant"; data: SerializedType; }, { value: Json; type: "constant"; data: SerializedType; }>, z.ZodObject<{ type: z.ZodLiteral<"claim">; data: z.ZodType<SerializedNestedType, z.ZodTypeDef, SerializedNestedType>; }, "strict", z.ZodTypeAny, { type: "claim"; data: SerializedNestedType; }, { type: "claim"; data: SerializedNestedType; }>]>>; assert: z.ZodType<NodeJSON, z.ZodTypeDef, NodeJSON>; outputClaim: z.ZodType<NodeJSON, z.ZodTypeDef, NodeJSON>; }, "strict", z.ZodTypeAny, { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }, { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }>; claims: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodType<SerializedType, z.ZodTypeDef, SerializedType>, z.ZodObject<{ value: z.ZodType<Json, z.ZodTypeDef, Json>; }, "strip", z.ZodTypeAny, { value: Json; }, { value: Json; }>>>; inputContext: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"https">; action: z.ZodString; serverNonce: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; }, "strict", z.ZodTypeAny, { type: "https"; action: string; serverNonce: { value: string; _type: "Field"; }; }, { type: "https"; action: string; serverNonce: { value: string; _type: "Field"; }; }>, z.ZodObject<{ type: z.ZodLiteral<"zk-app">; action: z.ZodString; serverNonce: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; verifierIdentity: z.ZodObject<{ publicKey: z.ZodObject<{ _type: z.ZodLiteral<"PublicKey">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "PublicKey"; }, { value: string; _type: "PublicKey"; }>; tokenId: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; network: z.ZodUnion<[z.ZodLiteral<"mainnet">, z.ZodLiteral<"devnet">, z.ZodObject<{ custom: z.ZodString; }, "strip", z.ZodTypeAny, { custom: string; }, { custom: string; }>]>; }, "strict", z.ZodTypeAny, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }, { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }>; }, "strict", z.ZodTypeAny, { type: "zk-app"; action: string; serverNonce: { value: string; _type: "Field"; }; verifierIdentity: { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }; }, { type: "zk-app"; action: string; serverNonce: { value: string; _type: "Field"; }; verifierIdentity: { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }; }>, z.ZodNull]>; }, "strict", z.ZodTypeAny, { type: "https" | "zk-app" | "no-context"; spec: { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }; claims: Record<string, SerializedType & { value: Json; }>; inputContext: { type: "https"; action: string; serverNonce: { value: string; _type: "Field"; }; } | { type: "zk-app"; action: string; serverNonce: { value: string; _type: "Field"; }; verifierIdentity: { publicKey: { value: string; _type: "PublicKey"; }; tokenId: { value: string; _type: "Field"; }; network: "mainnet" | "devnet" | { custom: string; }; }; } | null; }, { type: "https" | "zk-app" | "no-context"; spec: { inputs: Record<string, { type: "credential"; data: SerializedNestedType; credentialType: "imported" | "native" | "unsigned"; witness: { type: "imported"; publicInputType: SerializedType; publicOutputType: SerializedType; maxProofsVerified: 0 | 2 | 1; featureFlags: { rangeCheck0: boolean | null; rangeCheck1: boolean | null; foreignFieldAdd: boolean | null; foreignFieldMul: boolean | null; xor: boolean | null; rot: boolean | null; lookup: boolean | null; runtimeTables: boolean | null; }; } | null; } | { value: Json; type: "constant"; data: SerializedType; } | { type: "claim"; data: SerializedNestedType; }>; assert: NodeJSON; outputClaim: NodeJSON; }; claims: Record<str