Coder Social home page Coder Social logo

cawfree / zk-starter Goto Github PK

View Code? Open in Web Editor NEW
101.0 2.0 4.0 625 KB

zero knowledge for those with zero knowledge

Home Page: https://twitter.com/cawfree

License: MIT License

JavaScript 0.36% TypeScript 5.17% Shell 0.62% Makefile 0.08% Nix 0.03% Solidity 93.72% CSS 0.02%
computation cryptography decentralized ethereum evm privacy verifiable zk snark stark

zk-starter's Introduction

zk-starter

The easiest way to integrate succinct verifiable on-chain computation using hidden information in custom applications that execute on a credibly-neutral immutable public ledger.

Essentially, it's zero knowledge for those with zero knowledge.

๐Ÿš€ Getting Started

  1. Clone the repository using git clone https://github.com/cawfree/zk-starter.
  2. Make sure you've installed Rust and Foundry:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh # install rust
curl -L https://foundry.paradigm.xyz | bash # install foundry
  1. Run yarn, which will install circom and automate a new Powers of Tau ceremony, then finally compile your arithmetic circuits. When you make changes to your circuits, you can also use yarn to recompile them alongside their dependent smart contracts.

๐Ÿ’ก All the build artifacts are cached, so you'll only be required to do this once-per-installation.

โš ๏ธ By default, zk-starter is configured not to track the results of ceremonies. You can delete the ignore flag of the build/ directory within the .gitignore to avoid data loss.

  1. Finally, run yarn dev to execute the entire stack on http://localhost:3000. This will redeploy the auto-generated verifier logic made available to your smart contracts on the anvil local chain and inject the relevant configuration properties into your frontend.

โ™ป๏ธ Adding New Circuits

zk-starter's build life cycle ensures that for each new arithmetic circuit you build, a corresponding Solidity smart contract which inherits a compatible verifier will also be initialized for you to extend.

Likewise, for each circuit you create, a matching utility library is provided to the applicaton frontend at compile time. This yields namespaced high-level functions for generating and verifying proofs, and abstracting away the complexity of smart contract invocation for on-chain verification.

๐Ÿ™ Attribution

This monorepo was inspired by BattleZips ๐Ÿดโ€โ˜ ๏ธ (Git). Thank you for helping increase accessibility to the state-of-the-art in modern cryptography.

โœŒ๏ธ License

MIT

zk-starter's People

Contributors

cawfree avatar

Stargazers

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

Watchers

 avatar  avatar

zk-starter's Issues

PTAU ceremony necessary?

Just curious, to actually use this in production, we'd need to go through a whole ceremony to get some true random entries right? Or can you use an existing ceremony / have that built in?

(awesome repo btw)

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.