https://github.com/superdev093/zk_plonk_dapp
Zero Knowlege Proof Example
https://github.com/superdev093/zk_plonk_dapp
nextjs react zk-snarks zkp zkproof
Last synced: 9 months ago
JSON representation
Zero Knowlege Proof Example
- Host: GitHub
- URL: https://github.com/superdev093/zk_plonk_dapp
- Owner: superdev093
- Created: 2023-03-31T14:38:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T17:22:27.000Z (almost 3 years ago)
- Last Synced: 2025-05-19T03:35:26.355Z (11 months ago)
- Topics: nextjs, react, zk-snarks, zkp, zkproof
- Language: Solidity
- Homepage: https://zk-plonk-dapp.vercel.app
- Size: 595 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Summary
## Circuit
1. Write circom circuit
2. Compile the circuit:
```
circom circuit.circom --r1cs --wasm --sym
```
3. Download a powers of tau trusted setup file
4. Run Plonk setup to get the proving key:
```
snarkjs plonk setup circuit.r1cs ptau_file.ptau proving_key.zkey
```
## Contract
1. Export verifier smart contract
```
snarkjs zkey export solidityverifier proving_key.zkey verifier.sol
```
2. Integrate verifier into your Solidity project
## Frontend
1. Take user inputs
2. Calculate witness & generate proof in one step
```
await snarkjs.plonk.fullProve({ inputs }, wasmPath, provingKeyPath);
```
3. Submit transaction with proof to Verifier contract