https://github.com/limechain/blocksplit-demo
Demonstration of how to use ZK-Proof in dApps
https://github.com/limechain/blocksplit-demo
Last synced: over 1 year ago
JSON representation
Demonstration of how to use ZK-Proof in dApps
- Host: GitHub
- URL: https://github.com/limechain/blocksplit-demo
- Owner: LimeChain
- Created: 2019-04-24T07:20:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T08:29:34.000Z (about 7 years ago)
- Last Synced: 2025-01-23T08:18:07.961Z (over 1 year ago)
- Language: TypeScript
- Size: 1.35 MB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BlockSplit - Demo
This project was generated with Etherlime and shows how to use ZK-Proof with dApps
# How to run it
1. Make sure to run `npm install` in the root directory as well as in `web/zk-web`.
2. Go into `web/zk-web` and run `ng-serve`.
# How to use it with CLI
1. You can use `etherlime zk compile` to compile the circuit located in `zero-knowledge-proof/circuits`. New file is creted in `compiled-circuits`.
2. You can use `etherlime zk setup` to compile the trusted setup based on the compiled circuit from step 1. New files with pk and vk are created in `trusted-setup`.
3. You can use `etherlime proof` to generate a witness and a proof. The command use the `input.json` file located in `input` folder. The generated proof is located in `generated-proof` folder.
4. You can use `etherlime zk generate` to generate a smart contract, ready to be used for On-Chain verification. The contract is stored in `contracts` folder.
5. You can use `etherlime zk call` to generate a call based on your proof, ready to be send to the contract method `verifyProof`. The call is printed on the console as well as saved in folder `generated-call`.
# How to use it with web interface
1. Input four values for the different cards.
2. Generate a proof
3. Validate your proof Of-Chain or On-Chain
Please note: The web interface is using the trusted setup that you are generating with the above CLI command described in step 2 as well as the already compiled circuit!