# General Grant Proposal * **Project:** Anon Aadhaar SDK support ## Project Overview :page_facing_up: ### Overview Anon Aadharr allows Aadhaar identity owners to prove the ownership of a valid card, without divulging any data about it. Leveraging zero-knowledge under the hood, holders will be able to submit their proofs for verification in a variety of contexts, ranging from centralized servers to decentralized execution layers. The application made is available [here](https://github.com/dmpierre/anon-adhaar). The goal of the Anon Aadhaar SDK support is to package the previous project to make the developer experience better, clean and easy to use in their projects (front-end side and back-end side). The SDK will be compatible with the PCD SDK package. Also, it will enable using the Aadhaar circuit with another country citizen identity easier by slighty changing the configuration arguments. ### Project Details The technology stack can be decomposed in: - Front-end: `Typescript`, `Next.js`, `TailwindCSS` or any other related CSS/design library. - Zero-knowledge libraries: `snarkjs` (circuits in-browser management and unittests), `circomlib` (generating verifier contracts…) The main goal of the project is to provide a set of development tools that will let any developer integrate the anon Aadhaar circuit with PCD SDK. It will include: * A typescript package to integrate the Anon Aadhaar with the PCD SDK, in order to leveradge the PCD and passport UX. * A react components library (Data inputs, buttons, output display), available on npm. It will improve developer experience with an easy integration of the proving/verifying flow by having pre-built front-end component. * A typescript package for developers to access the Solidity verifier and the circuits, available on npm. * A Next.js example app deployed on Vercel, where these packages are used and documented to help developers. They will be able to fork it and use it as a scaffold to build their own use cases on top of the Aadhaar SDK. List of related projects: * [Anon Aadhaar circuit](https://github.com/dmpierre/anon-adhaar/tree/main/circom-rsa-verify) * Proofcarryingdata (PCD): * [Zuzalu Passport](https://github.com/proofcarryingdata/zupass), help users manage their identity throw PCD providers. * [Zukit](https://github.com/proofcarryingdata/zukit), a React component library to embed the Zuzalu passport in your app. * [Zukit Example](https://github.com/proofcarryingdata/zukit-example), a Next.js app to show how to integrate the Zukit. *The React component library and the example app will be inspired by the last 2 repositories above.* ## Team :busts_in_silhouette: ### Team members * Yanis Meziane, yanis@sinaxyz.io, @meyanisxyz * Andy Guzman, andres.gt94@hotmail.com, @andyguzman506 * Vu Vo, vu.voth@gmail.com, @vuvoth ### Team's experience Yanis, a former Product Manager and software developer for 2 years, have 3 years of experience building products. He previously worked on projects using cryptography, an anonymous message box front-end app that integrates a rust homomorphic encryption algorithm, and a Zk-powered merch redeem app using Sismo zk circuits. ## Development Roadmap :nut_and_bolt: ### Overview * **Total Estimated Duration:** 3 months * **Full-time equivalent (FTE):** 1 * **Total Costs:** $27,500 ### Milestone 1: Build a typescript package that integrates with the PCD SDK * **Estimated Duration:** 4 weeks * **FTE:** 1 * **Costs:** $10,000 * **Estimated delivery date**: Jul 17th 2023 Support of the PCD SDK for the anon Aadhaar circuit locally. It implies packaging the Circom circuit into a wasm file to embed it in the SDK. Once up and running locally and tested, we will approach the 0xParc team for integration with @pcd/packages. | Number | Deliverable | Specification | | ------------- | ------------- | ------------- | | 0a. | Documentation | The code will be openly deployed and will provide documentation. | | 0b. | Testing Guide | The code will have proper unit-test coverage (e.g. 70%) to ensure functionality and robustness. The tests will be following what have been done by Semaphore, see the impletation [here](https://github.com/proofcarryingdata/zupass/blob/main/packages/semaphore-group-pcd/test/SemaphoreGroupPCD.spec.ts).| | 1. | PCD SDK integration | We will write a piece of code that will integrate the anon Aadhaar circuit PCD proving-verifier, this include the following functions: prove(), verify(), serialize(), deserialize() and a card UI component.| ### Milestone 2: Build a package for developers to access the Solidity verifier and the circuits. * **Estimated Duration:** 1 week * **FTE:** 1 * **Costs:** $2,500 * **Estimated delivery date**: Jul 31th 2023 This package will be available via npm. | Number | Deliverable | Specification | | ------------- | ------------- | ------------- | | 0a. | Documentation | The code will be openly deployed and will provide documentation. | | 1. | Typescript package | Provide the solidity verifier and the circuits, inspired by the [Semaphore repo organization](https://github.com/semaphore-protocol/semaphore/tree/main/packages) | ### Milestone 3: Build a react component library * **Estimated Duration:** 2 weeks * **FTE:** 1 * **Costs:** $5,000 * **Estimated delivery date**: Aug 14th 2023 This package will be available via npm. | Number | Deliverable | Specification | | ------------- | ------------- | ------------- | | 0b. | Documentation | The code will be openly deployed and will provide documentation.| | 0c. | Testing Guide | The code will have proper unit-test coverage (e.g. 50%) to ensure functionality and robustness. Components tested with `jest`.| | 1. | Design components | From Figma mockups to CSS development, and user interaction animations.| | 2. | React components | We will write a package that will render pre-built react components such as buttons, form inputs (insert pdf file), and output display (proof).| ### Milestone 4: Add utils function to the front-end library * **Estimated Duration:** 2 weeks * **FTE:** 1 * **Costs:** $5,000 * **Estimated delivery date**: Aug 28th 2023 This package will be available via npm. | Number | Deliverable | Specification | | ------------- | ------------- | ------------- | | 0a. | Documentation | The code will be openly deployed and will provide documentation. Also, we will publish a tutorial that explains how a user can integrate the components in their Dapps and integrate the proving/verifying flow.| | 0b. | Testing Guide | The code will have proper unit-test coverage (e.g. 50%) to ensure functionality and robustness. Components tested with `jest`.| | 1. | Build a set of utils function | We will add to the previous package utils function to manage the upload and the extract of the hash from Aadhaar PDF files. e.g. UnionToRSAKey(), ExtractSignPDF(), SplitToField()| ### Milestone 5: Build an example Anon Aadhaar SDK Dapp * **Estimated Duration:** 2 weeks * **FTE:** 1 * **Costs:** $5,000 * **Estimated delivery date**: Sep 11th 2023 This application will be deployed in production via Vercel, the app will also serve as a forkable scaffold for developers. | Number | Deliverable | Specification | | ------------- | ------------- | ------------- | | 0a. | Documentation & tutorial | We will provide inline documentation of the code and a tutorial that explains how a user can integrate the proving/verifying flow in a `Next.js` app. | | 0b. | Blog post | Detail the project and the SDK features for external communication | | 1. | `Next.js` front end app deployed on Vercel | We will develop a front end application that will integrate the PCD SDK, to prove the ownership of a Aadhaar card and verify this proof. | | 2. | Webapp design | CSS development, user interaction animations and integration of the react component library as an example for developers. |