embark/packages/plugins/snark
Michael Bradley, Jr da7ceb8c54 build(deps/-dev): update babel and babel-related deps and devDeps to latest versions 2019-11-26 13:22:13 -06:00
..
src refactor(@embark/plugins/snark): add embark-snark package to the monorepo 2019-09-13 09:52:01 -05:00
test test(@embark/plugins/snark): fix some small typos/errors in the tests 2019-09-15 15:17:45 -05:00
.npmrc refactor(@embark/plugins/snark): add embark-snark package to the monorepo 2019-09-13 09:52:01 -05:00
CHANGELOG.md chore(release): 5.0.0-alpha.1 2019-11-05 14:55:06 -06:00
README.md build: tidy up the monorepo in prep for v5.0.0-alpha.0 2019-10-01 13:29:53 -05:00
package.json build(deps/-dev): update babel and babel-related deps and devDeps to latest versions 2019-11-26 13:22:13 -06:00

README.md

embark-snark

Snark plugin for Embark

Compiles circom circuits and generate solidity proofs in an Embark DApp.

Installation

In your embark dapp directory:

npm install embark-snark --save

Then add embark-snark to the plugins section in embark.json:

"plugins": {
  "embark-snark": {
    "circuits": ["app/circuits/**"],
    "inputs": {
      "multiplier": {
        "a": 3,
        "b": 11
      }
    }
  }
}

You can defined where your circuits will be and what are the inputs.

Now you can create your first circuits, for example, app/circuits/multiplier.circom:

template Multiplier() {
  signal private input a;
  signal private input b;
  signal output c; c <== a*b;
}

component main = Multiplier();

Embark will now compile the circuits and generate a solidity contracts to verify the proof as well as deploy it.

Requirements

  • Embark 5.0.0-alpha.0 or later

Visit embark.status.im to get started with Embark.