Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Jubjub signature verification PCD #154

Merged
merged 14 commits into from
Apr 25, 2023
Merged
1 change: 1 addition & 0 deletions apps/passport-client/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const opts: BuildOptions = {
NodeModulesPolyfillPlugin(),
NodeGlobalsPolyfillPlugin({
process: true,
buffer: true,
dmpierre marked this conversation as resolved.
Show resolved Hide resolved
}),
],
loader: {
Expand Down
3 changes: 2 additions & 1 deletion apps/passport-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@types/pako": "^2.0.0",
"dotenv": "^16.0.3",
"json-bigint": "^1.0.0",
"jubjub-signature-pcd": "^0.0.2",
dmpierre marked this conversation as resolved.
Show resolved Hide resolved
"pako": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down Expand Up @@ -53,4 +54,4 @@
"ts-node": "^10.9.1",
"typescript": "^4.5.3"
}
}
}
6 changes: 4 additions & 2 deletions apps/passport-client/src/localstorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SemaphoreGroupPCDPackage } from "@pcd/semaphore-group-pcd";
import { SemaphoreIdentityPCDPackage } from "@pcd/semaphore-identity-pcd";
import { SemaphoreSignaturePCDPackage } from "@pcd/semaphore-signature-pcd";
import { Identity } from "@semaphore-protocol/identity";
import { JubJubSignaturePCDPackage } from "jubjub-signature-pcd";
import { config } from "./config";

export async function savePCDs(pcds: PCDCollection) {
Expand All @@ -20,19 +21,20 @@ export async function loadPCDs() {

await SemaphoreGroupPCDPackage.init({
wasmFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.wasm",
zkeyFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.zkey",
zkeyFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.zkey"
});

dmpierre marked this conversation as resolved.
Show resolved Hide resolved
await SemaphoreSignaturePCDPackage.init({
wasmFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.wasm",
zkeyFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.zkey",
zkeyFilePath: SERVER_STATIC_URL + "/semaphore-artifacts/16.zkey"
});

return await PCDCollection.deserialize(
[
SemaphoreGroupPCDPackage,
SemaphoreIdentityPCDPackage,
SemaphoreSignaturePCDPackage,
JubJubSignaturePCDPackage
dmpierre marked this conversation as resolved.
Show resolved Hide resolved
],
serialized
);
Expand Down
1 change: 1 addition & 0 deletions apps/passport-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@types/pg": "^8.6.6",
"cors": "^2.8.5",
"express": "^5.0.0-beta.1",
"jubjub-signature-pcd": "^0.0.2",
dmpierre marked this conversation as resolved.
Show resolved Hide resolved
"libhoney": "^4.0.1",
"lodash": "^4.17.21",
"morgan": "^1.10.0",
Expand Down
2 changes: 2 additions & 0 deletions apps/passport-server/src/services/proving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { PCDPackage } from "@pcd/pcd-types";
import { SemaphoreGroupPCDPackage } from "@pcd/semaphore-group-pcd";
import { SemaphoreSignaturePCDPackage } from "@pcd/semaphore-signature-pcd";
import { JubJubSignaturePCDPackage } from "jubjub-signature-pcd";
import path from "path";

/**
Expand All @@ -32,6 +33,7 @@ const pendingPCDResponse: Map<string, StatusResponse> = new Map<
const packages: PCDPackage[] = [
SemaphoreGroupPCDPackage,
SemaphoreSignaturePCDPackage,
JubJubSignaturePCDPackage
];

export async function initPackages() {
Expand Down
Loading