diff --git a/packages/app-connector/src/rpc_client.ts b/packages/app-connector/src/rpc_client.ts index af68994..4bc624c 100644 --- a/packages/app-connector/src/rpc_client.ts +++ b/packages/app-connector/src/rpc_client.ts @@ -13,7 +13,7 @@ import { RPCMessageType, SubscriptionUpdateResult } from "@parcnet/client-rpc"; -import { PodspecProofRequest } from "@parcnet/podspec"; +import { EntriesSchema, PodspecProofRequest } from "@parcnet/podspec"; import { GPCProof, GPCRevealedClaims } from "@pcd/gpc"; import { EventEmitter } from "eventemitter3"; import { z, ZodFunction, ZodTuple, ZodTypeAny } from "zod"; @@ -115,7 +115,9 @@ export class ParcnetRPCConnector implements ParcnetRPC, ParcnetEvents { this.#emitter = new EventEmitter(); this.pod = { - query: async (query: PODQuery): Promise => { + query: async ( + query: PODQuery + ): Promise => { return this.#typedInvoke( "pod.query", [query], @@ -136,7 +138,9 @@ export class ParcnetRPCConnector implements ParcnetRPC, ParcnetEvents { ParcnetRPCSchema.shape.pod.shape.delete ); }, - subscribe: async (query: PODQuery): Promise => { + subscribe: async ( + query: PODQuery + ): Promise => { return this.#typedInvoke( "pod.subscribe", [query], diff --git a/packages/client-rpc/src/rpc_interfaces.ts b/packages/client-rpc/src/rpc_interfaces.ts index e96144c..33dd22c 100644 --- a/packages/client-rpc/src/rpc_interfaces.ts +++ b/packages/client-rpc/src/rpc_interfaces.ts @@ -11,7 +11,7 @@ import { GPCBoundConfig, GPCProof, GPCRevealedClaims } from "@pcd/gpc"; * These interfaces are implemented in rpc_client.ts. */ -export type PODQuery = PODSchema; +export type PODQuery = PODSchema; export interface SubscriptionUpdateResult { subscriptionId: string; @@ -46,10 +46,10 @@ export interface ParcnetIdentityRPC { export interface ParcnetPODRPC { // Returns array of serialized PODs - query: (query: PODQuery) => Promise; + query: (query: PODQuery) => Promise; insert: (serializedPod: string) => Promise; delete: (signature: string) => Promise; - subscribe: (query: PODQuery) => Promise; + subscribe: (query: PODQuery) => Promise; unsubscribe: (subscriptionId: string) => Promise; } diff --git a/packages/podspec/src/schemas/entries.ts b/packages/podspec/src/schemas/entries.ts index 36f41a1..3d47413 100644 --- a/packages/podspec/src/schemas/entries.ts +++ b/packages/podspec/src/schemas/entries.ts @@ -10,7 +10,7 @@ export type EntriesSchema = Record; * Schema for a tuple of entries. */ export type EntriesTupleSchema = { - entries: (keyof E)[]; + entries: (keyof E & string)[]; isMemberOf?: PODValue[][]; isNotMemberOf?: PODValue[][]; }; diff --git a/packages/podspec/src/schemas/pod.ts b/packages/podspec/src/schemas/pod.ts index 8e4bb0b..7d98541 100644 --- a/packages/podspec/src/schemas/pod.ts +++ b/packages/podspec/src/schemas/pod.ts @@ -5,7 +5,7 @@ import { EntriesSchema } from "./entries.js"; * Schema for a tuple of entries. */ export type PODTupleSchema = { - entries: (keyof (E & { $signerPublicKey: never }))[]; + entries: (keyof (E & { $signerPublicKey: never }) & string)[]; isMemberOf?: PODValue[][]; isNotMemberOf?: PODValue[][]; };