# Introducing Niftyzk **Published by:** [strawberry](https://paragraph.com/@strawberry-52/) **Published on:** 2025-01-09 **URL:** https://paragraph.com/@strawberry-52/introducing-niftyzk ## Content Niftyzk is a circom development tool and framework that targets CosmWasm ecosystem supporting groth-16 proofs with bn128 curve.Project scaffoldingInitialize a new project niftyzk init and select from the available templates, the generated code can be configured based on the verification schemes selected. There is support for Poseidon, Pedersen, MiMC and MiMCSponge hashing functions and additional circuit inputs. Niftyzk generates code instead of cloning a repository, so you get the benefit of configuration.Javascript libraryA library will be generated for you with all functions required to interact with the circuits and merkle tree. The javascript is isomorphic and typed using JSDoc so you can run it in the browser and server without modification and use it with Typescript.Hot reloadDevelop your circom circuits using hot reload. niftyzk devIterative development allows you to debug and update your circuits without recompiling them each time which is time consuming. The circuits are rebuilt and the outputs are asserted. Niftyzk expects the circuit inputs and output asserts defined in an input.js file, which allows you to keep your business logic to generate inputs neat and fully tested during development.Powers of TauThe powers of tau ceremony is essential for zero knowledge proof circuits for security. niftyzk ptaufilesThe phase 1 ceremony is reusable hence we can use the Polygon Hermez ceremony files. The files are available to download from the CLI with a simple commandCompilationniftyzk compile uses circom compiler for compilation and so depends on Rust and requires circom to be installed. It wraps and abstracts away complex commands and makes compiling straight forwardVerification KeysThe compiled circuits require the exporting of verification keys, these keys are used for testing in deployment. niftyzk vkeyPhase-2 ceremonyThe built in ceremony server allows you to host a phase-2 ceremony.Invoking the command niftyzk ceremony will start up a server that hosts a contribution page.The contribution is anonymous and the contributors are queued using websockets. The project at this stage can be deployed on a VPS using Git and the ceremony can be hosted there.The ceremony server only supports smaller PTAU files due to the netwoking, each client needs to download it to make a contribution.Only a single contributor to the phase-2 ceremony needs to be honest for the process to work.FinalizationAfter the ceremony we can finalize the circuit, this means we can’t update our circuits anymore and it will be ready for deployment. niftyzk finalize expects a --beacon argument which is our random beacon used for finalization. The process wraps snarkjs and simplifies the commands used there. If you want to learn more about it, you can read the snarkjs documentation. After finalization, you will need to export a new vkeyGenerate CosmWasm contractAnd finally we can generate a CosmWasm verifier contract for the circuit. niftyzk gencontact You can generate it before finalization for testing your smart contracts, it requires passing unit tests and the verification key to generate the contract.The gencontract command expects an argument for the Rust library used, which can be Arkworks or Bellman. The Bellman requires an adapter which will be generated in javascript for you.Check the readme for verifying cosmwasm contracts.Full test coverageAll generated code contains full test coverage, including the CosmWasm contracts. Niftyzk supports test based development and runtime assertions.SupportYou can support this project by using it. Open a issue if you encounter any errors. This is a public good and available for quadratic funding in the Atom Economic Zone, you can contribute Atom on dorahacks https://dorahacks.io/buidl/14323 ## Publication Information - [strawberry](https://paragraph.com/@strawberry-52/): Publication homepage - [All Posts](https://paragraph.com/@strawberry-52/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@strawberry-52): Subscribe to updates