UNPKG

mina-attestations

Version:
1,504 lines 60.5 kB
import { z } from 'zod'; import type { SerializedNestedType, SerializedType } from './serialize-provable.ts'; export { SerializedTypeSchema, SerializedValueSchema, StoredCredentialSchema, PresentationRequestSchema, NodeSchema, InputSchema, ContextSchema, PresentationSchema, }; export type { InputJSON, ConstantInputJSON, ImportedWitnessSpecJSON, CredentialSpecJSON, NodeJSON, SpecJSON, PresentationRequestJSON, StoredCredentialJSON, ContextJSON, ZkAppIdentityJSON, PresentationJSON, }; type Literal = string | number | boolean | null; type Json = Literal | { [key: string]: Json; } | Json[]; 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 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: z.infer<typeof SerializedValueSchema>; } | { 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 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<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 PresentationRequestJSON = z.infer<typeof PresentationRequestSchema>; declare const StoredCredentialSchema: z.ZodObject<{ version: z.ZodLiteral<"v0">; witness: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"native">; issuer: z.ZodObject<{ _type: z.ZodLiteral<"PublicKey">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "PublicKey"; }, { value: string; _type: "PublicKey"; }>; issuerSignature: z.ZodObject<{ _type: z.ZodLiteral<"Signature">; value: z.ZodObject<{ r: z.ZodString; s: z.ZodString; }, "strip", z.ZodTypeAny, { r: string; s: string; }, { r: string; s: string; }>; }, "strict", z.ZodTypeAny, { value: { r: string; s: string; }; _type: "Signature"; }, { value: { r: string; s: string; }; _type: "Signature"; }>; }, "strict", z.ZodTypeAny, { type: "native"; issuer: { value: string; _type: "PublicKey"; }; issuerSignature: { value: { r: string; s: string; }; _type: "Signature"; }; }, { type: "native"; issuer: { value: string; _type: "PublicKey"; }; issuerSignature: { value: { r: string; s: string; }; _type: "Signature"; }; }>, z.ZodObject<{ type: z.ZodLiteral<"imported">; vk: z.ZodUnion<[z.ZodObject<{ data: z.ZodString; hash: z.ZodObject<{ _type: z.ZodLiteral<"Field">; value: z.ZodString; }, "strict", z.ZodTypeAny, { value: string; _type: "Field"; }, { value: string; _type: "Field"; }>; }, "strict", z.ZodTypeAny, { data: string; hash: { value: string; _type: "Field"; }; }, { data: string; hash: { value: string; _type: "Field"; }; }>, z.ZodObject<{ _type: z.ZodLiteral<"VerificationKey">; value: z.ZodObject<{ data: z.ZodString; hash: z.ZodString; }, "strip", z.ZodTypeAny, { data: string; hash: string; }, { data: string; hash: string; }>; }, "strip", z.ZodTypeAny, { value: { data: string; hash: string; }; _type: "VerificationKey"; }, { value: { data: string; hash: string; }; _type: "VerificationKey"; }>]>; proof: z.ZodObject<{ _type: z.ZodLiteral<"Proof">; proof: z.ZodType<{ name: string; publicInput: SerializedType; publicOutput: SerializedType; maxProofsVerified: z.infer<typeof maxProofsVerified>; featureFlags: z.infer<typeof featureFlags>; }, z.ZodTypeDef, { name: string; publicInput: SerializedType; publicOutput: SerializedType; maxProofsVerified: z.infer<typeof maxProofsVerified>; featureFlags: z.infer<typeof featureFlags>; }>; value: z.ZodObject<{ publicInput: z.ZodType<Json, z.ZodTypeDef, Json>; publicOutput: z.ZodType<Json, z.ZodTypeDef, Json>; maxProofsVerified: z.ZodNumber; proof: z.ZodString; }, "strict", z.ZodTypeAny, { maxProofsVerified: number; proof: string; publicInput: Json; publicOutput: Json; }, { maxProofsVerified: number; proof: string; publicInput: Json; publicOutput: Json; }>; }, "strict", z.ZodTypeAny, { value: { maxProofsVerified: number; proof: string; publicInput: Json; publicOutput: Json; }; _type: "Proof"; proof: { name: string; publicInput: SerializedType; publicOutput: SerializedType; maxProofsVerified: z.infer<typeof maxProofsVerified>; featureFlags: z.infer<typeof featureFlags>; }; }, { value: { maxProofsVerified: number; proof: string; publicInput: Json; publicOutput: Json; }; _type: "Proof"; proof: { name: string; publicInput: SerializedType; publicOutput: SerializedType; maxProofsVerified: z.infer<typeof maxProofsVerified>; featureFlags: z.infer<typeof featureFlags>; }; }>; }, "strict", z.ZodTypeAny, { type: "imported"; proof: { value: { maxProofsVerified: number; proof: string; publicInput: Json; publicOutput: Json; }; _type: "Proof"; proof: { name: string; publicInput: SerializedType; publicOutput: SerializedType; maxProofsVerified: z.infer<typeof maxProofsVerified>; featureFlags: z.infer<typeof featureFlags>; }; }; vk: { data: string; hash: { v