warp-contracts-plugin-snarkjs
v0.2.1
Published
SnarkJS plugin for Warp Contracts
Downloads
27
Readme
Snarkjs Plugin for Warp Contracts
Snarkjs extension for warp contracts, allowing one to verify proofs within a Warp smart-contract.
Note that:
v0.1.x
uses SnarkJSv0.6.x
v0.2.x
uses SnarkJSv0.7.x
You might want to make sure that the client that is generating the proofs has the same minor version.
Installation
yarn add warp-contracts-plugin-snarkjs
Usage
import { WarpFactory } from "warp-contracts";
import { SnarkjsExtension } from "warp-contracts-plugin-snarkjs";
const warp = WarpFactory.forMainnet().use(new SnarkjsExtension());
Then, use groth16
or plonk
within the smart-contract as:
SmartWeave.extensions.groth16;
SmartWeave.extensions.plonk;