embark/packages/plugins/snark
dependabot-preview[bot] b116e95a4e build(deps-dev): bump eslint-plugin-import from 2.18.2 to 2.20.1
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.18.2 to 2.20.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.18.2...v2.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 17:32:34 -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(prerelease): 5.2.4-nightly.0 2020-02-26 00:14:00 +00:00
README.md chore: update site urls 2020-01-28 12:07:17 -05:00
index.js fix: ensure that packages properly specify their dependencies 2020-02-25 14:52:10 -06:00
package.json build(deps-dev): bump eslint-plugin-import from 2.18.2 to 2.20.1 2020-02-26 17:32:34 -06:00
tsconfig.json build: implement collective typecheck 2019-12-13 13:59:47 -05: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 framework.embarklabs.io to get started with Embark.