Skip to content

Commit

Permalink
add circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
susumutomita committed Feb 4, 2024
1 parent 211e088 commit d583642
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ build:
clean:
npm run clean

.PHONY: deploy_circuit
deploy_circuit:
npm run deploy:circuit

.PHONY: test
test:
npm run test
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- React Native
- TypeScript
- Expo
- Noir
- Sindri API for Zero-Knowledge Proof generation

## Getting Started
Expand All @@ -33,7 +34,13 @@ Follow these steps to run the project locally:
make install
```

3. **Start the Application**
3. **Deploy Circuit**

```bash
make deploy_circuit
```

4. **Start the Application**

```bash
make run_frontend
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dev": "cd packages/frontend && npm run dev",
"build": "cd packages/backend && npm run build",
"clean": "npx rimraf node_modules out && cd packages/frontend && npx rimraf node_modules out dist coverage && cd ../backend && npx rimraf node_modules out dist coverage",
"deploy:circuit": "cd packages/circuit && make deploy",
"test": "cd packages/frontend && npm run test && cd ../backend && npm run test",
"test:coverage": "cd packages/frontend && npm run test:coverage && cd ../backend && npm run test:coverage",
"test:watch": "cd packages/frontend && npm run test:watch && cd ../backend && npm run test:watch",
Expand Down
11 changes: 11 additions & 0 deletions packages/circuit/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: login
deploy:
npx sindri login

.PHONY: deploy
deploy:
npx sindri deploy

.PHONY: lint
lint:
npx sindri lint
4 changes: 2 additions & 2 deletions packages/circuit/src/main.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main(input: u8) {
assert(input >= 20);
fn main(input: u8) -> pub bool {
input >= 20
}

#[test]
Expand Down

0 comments on commit d583642

Please sign in to comment.