Skip to content

Commit

Permalink
Fix classificationTuples name
Browse files Browse the repository at this point in the history
  • Loading branch information
robknight committed Sep 19, 2024
1 parent b21b706 commit 1bf7f5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@parcnet-js/app-connector": "workspace:*",
"@parcnet-js/client-rpc": "workspace:*",
"@parcnet-js/podspec": "workspace:*",
"@parcnet-js/ticket-spec": "workspace:*",
"@pcd/pod": "0.1.7",
Expand Down
6 changes: 3 additions & 3 deletions examples/test-app/src/apis/GPC.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ProveResult } from "@parcnet-js/client-rpc";
import type { PodspecProofRequest } from "@parcnet-js/podspec";
import { TicketSpec, ticketProofRequest } from "@parcnet-js/ticket-spec";
import type { POD } from "@pcd/pod";
import JSONBig from "json-bigint";
import type { ReactNode } from "react";
import { useEffect, useState } from "react";
import type { ProveResult } from "../../../../packages/client-rpc/src";
import { TryIt } from "../components/TryIt";
import { useParcnetClient } from "../hooks/useParcnetClient";

Expand Down Expand Up @@ -263,7 +263,7 @@ await z.pod.insert(pod);
<code className="block text-xs font-base rounded-md p-2 whitespace-pre-wrap">
{`
const request = ticketProofRequest({
attributes: [
classificationTuples: [
[
// The public key to match
"${publicKey}",
Expand All @@ -285,7 +285,7 @@ const gpcProof = await z.gpc.prove(request);
onClick={async () => {
try {
const hmm = ticketProofRequest({
attributes: [[publicKey!, EVENT_ID]],
classificationTuples: [[publicKey!, EVENT_ID]],
fieldsToReveal: {
eventId: true
}
Expand Down
4 changes: 2 additions & 2 deletions packages/ticket-spec/src/ticket_proof_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type TicketClassificationTuples =
| PublicKeyAndEventIdAndProductIdTuples;

export interface TicketProofRequest {
attributes: TicketClassificationTuples;
classificationTuples: TicketClassificationTuples;
fieldsToReveal: Partial<FieldsToReveal>;
externalNullifier?: PODValue;
watermark?: PODValue;
Expand All @@ -72,7 +72,7 @@ function isPublicKeyAndEventIdAndProductIdTuples(
* @returns The ticket proof request.
*/
export function ticketProofRequest({
attributes: classificationTuples,
classificationTuples,
fieldsToReveal,
externalNullifier,
watermark
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bf7f5d

Please sign in to comment.