import * as v from 'valibot'; import { ParcnetRPCSchema } from './schema.js'; import '@pcd/gpc'; import 'snarkjs'; declare enum InitializationMessageType { PARCNET_CLIENT_CONNECT = "zupass-client-connect" } declare enum RPCMessageType { PARCNET_CLIENT_INVOKE = "zupass-client-invoke", PARCNET_CLIENT_INVOKE_RESULT = "zupass-client-invoke-result", PARCNET_CLIENT_INVOKE_ERROR = "zupass-client-invoke-error", PARCNET_CLIENT_READY = "zupass-client-ready", PARCNET_CLIENT_CANCEL = "zupass-client-cancel", PARCNET_CLIENT_SHOW = "zupass-client-show", PARCNET_CLIENT_HIDE = "zupass-client-hide", PARCNET_CLIENT_SUBSCRIPTION_UPDATE = "zupass-client-subscription-update" } type ParcnetRPCMethodName = `gpc.${keyof typeof ParcnetRPCSchema.gpc}` | `pod.${keyof typeof ParcnetRPCSchema.pod}` | `identity.${keyof typeof ParcnetRPCSchema.identity}`; declare const RPCMessageSchema: v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema; readonly serial: v.NumberSchema; readonly fn: v.SchemaWithPipe<[v.StringSchema, v.CheckAction, v.TransformAction]>; readonly args: v.ArraySchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; readonly result: v.UnknownSchema; readonly serial: v.NumberSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; readonly error: v.StringSchema; readonly serial: v.NumberSchema; readonly errorType: v.OptionalSchema], undefined>, never>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema; readonly update: v.ArraySchema, v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema<"string", undefined>; readonly value: v.StringSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"int", undefined>; readonly value: v.BigintSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"cryptographic", undefined>; readonly value: v.BigintSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"eddsa_pubkey", undefined>; readonly value: v.StringSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"boolean", undefined>; readonly value: v.BooleanSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"date", undefined>; readonly value: v.DateSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"bytes", undefined>; readonly value: v.InstanceSchema; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"null", undefined>; readonly value: v.NullSchema; }, undefined>], undefined>, undefined>; readonly signature: v.StringSchema; readonly signerPublicKey: v.StringSchema; }, undefined>, undefined>; readonly subscriptionId: v.StringSchema; readonly subscriptionSerial: v.NumberSchema; }, undefined>], undefined>; declare const InitializationMessageSchema: v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema; readonly zapp: v.ObjectSchema<{ readonly name: v.StringSchema; readonly permissions: Omit; readonly SIGN_POD: v.ObjectSchema<{}, undefined>; readonly REQUEST_PROOF: v.ObjectSchema<{ readonly collections: v.ArraySchema, undefined>; }, undefined>; readonly READ_POD: v.ObjectSchema<{ readonly collections: v.ArraySchema, undefined>; }, undefined>; readonly INSERT_POD: v.ObjectSchema<{ readonly collections: v.ArraySchema, undefined>; }, undefined>; readonly DELETE_POD: v.ObjectSchema<{ readonly collections: v.ArraySchema, undefined>; }, undefined>; readonly SUGGEST_PODS: v.ObjectSchema<{ readonly collections: v.ArraySchema, undefined>; }, undefined>; }, undefined>, "_types" | "_run" | "entries"> & { readonly entries: { readonly READ_PUBLIC_IDENTIFIERS: v.OptionalSchema, never>; readonly SIGN_POD: v.OptionalSchema, never>; readonly REQUEST_PROOF: v.OptionalSchema, undefined>; }, undefined>, never>; readonly READ_POD: v.OptionalSchema, undefined>; }, undefined>, never>; readonly INSERT_POD: v.OptionalSchema, undefined>; }, undefined>, never>; readonly DELETE_POD: v.OptionalSchema, undefined>; }, undefined>, never>; readonly SUGGEST_PODS: v.OptionalSchema, undefined>; }, undefined>, never>; }; _run(dataset: v.Dataset, config: v.Config): v.Dataset<{ READ_PUBLIC_IDENTIFIERS?: {} | undefined; SIGN_POD?: {} | undefined; REQUEST_PROOF?: { collections: string[]; } | undefined; READ_POD?: { collections: string[]; } | undefined; INSERT_POD?: { collections: string[]; } | undefined; DELETE_POD?: { collections: string[]; } | undefined; SUGGEST_PODS?: { collections: string[]; } | undefined; }, v.ObjectIssue | v.ArrayIssue | v.StringIssue>; readonly _types?: { readonly input: { READ_PUBLIC_IDENTIFIERS?: {} | undefined; SIGN_POD?: {} | undefined; REQUEST_PROOF?: { collections: string[]; } | undefined; READ_POD?: { collections: string[]; } | undefined; INSERT_POD?: { collections: string[]; } | undefined; DELETE_POD?: { collections: string[]; } | undefined; SUGGEST_PODS?: { collections: string[]; } | undefined; }; readonly output: { READ_PUBLIC_IDENTIFIERS?: {} | undefined; SIGN_POD?: {} | undefined; REQUEST_PROOF?: { collections: string[]; } | undefined; READ_POD?: { collections: string[]; } | undefined; INSERT_POD?: { collections: string[]; } | undefined; DELETE_POD?: { collections: string[]; } | undefined; SUGGEST_PODS?: { collections: string[]; } | undefined; }; readonly issue: v.ObjectIssue | v.ArrayIssue | v.StringIssue; } | undefined; }; }, undefined>; }, undefined>], undefined>; type InitializationMessage = v.InferOutput; type RPCMessage = v.InferOutput; export { type InitializationMessage, InitializationMessageSchema, InitializationMessageType, type ParcnetRPCMethodName, type RPCMessage, RPCMessageSchema, RPCMessageType };