Giter Club home page Giter Club logo

zkphoto's Introduction

zkPhoto

This project demonstrates a small stepping stone toward #2 of Brian Gu’s Six ZK Moonshots. The idea is to have an on-chain data marketplace where users can trade private data, for example, “a high-res image that downsamples to a known low-res image”, using ZK. Within the scope of this proposal, the MVP is to implement a dApp that (0) use ZK to prove that the low-res image is downsized from an actual high-res image, (1) mint an NFT that contains the downsized image, *as well as the hash of the original image, (2) implement an in-browser camera for authentic on-chain photo-taking, and more. This repo will cover Phase 0 and Phase 1.

The contract has already been deployed on Harmony testnet and the first NFT has been minted.

ERC721 contract on testnet

For more details on the development and demo videos, click here.

Run npm i to install.

To compile the circuits, generate proofs, and test the contracts using the sample image/input.png locally, run

npm run test:fullProof

To deploy on Harmony testnet, run the above command first, then change the private key in hardhat.config.js to your own private key. The contracts have also been deployed to the addresses to deployed.txt and can be accessed directly.

npx hardhat deploy --network testnet

You can try minting the sample image by running:

npx hardhat run scripts/mint-sample.js --network testnet

zkphoto's People

Contributors

socathie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xhliu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.