mirror of https://github.com/embarklabs/embark.git
b116e95a4e
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> |
||
---|---|---|
.. | ||
src | ||
test | ||
.npmrc | ||
CHANGELOG.md | ||
README.md | ||
index.js | ||
package.json | ||
tsconfig.json |
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.