A React Native library that allows mobile applications to generate and verify zero knowledge proofs from the Aadhaar QR code.
- Scan Aadhaar secure QR codes and verify the UIDAI signature
- Generate Groth16 proofs for the selected identity fields
- Provide a context provider for easy integration in React Native apps
- Includes a modal component to guide the user through the proof generation flow
# Yarn
yarn add @anon-aadhaar/react-native
# or npm
npm install @anon-aadhaar/react-nativeThe repository is a monorepo managed with Yarn workspaces. Run yarn in the root directory to install all dependencies including the example application.
- Setup the prover – download the proving artifacts once when your app starts:
import { setupProver } from '@anon-aadhaar/react-native';
useEffect(() => {
setupProver();
}, []);- Wrap your application with
AnonAadhaarProviderso that child components can access the proof state:
import { AnonAadhaarProvider } from '@anon-aadhaar/react-native';
export default function App() {
return (
<AnonAadhaarProvider>
{/* your navigation / screens */}
</AnonAadhaarProvider>
);
}- Trigger the proof creation using the
AnonAadhaarProvecomponent. It opens a modal that guides the user to scan the QR code and generates the proof.
import { AnonAadhaarProve } from '@anon-aadhaar/react-native';
<AnonAadhaarProve buttonMessage="Create Proof" nullifierSeed={1234} />;Check the example/ folder for a complete Expo application demonstrating these steps.
See the contributing guide to learn how to contribute to the repository and the development workflow.