# noir-ziden

> This is the proof-of-concept project of Ziden protocol with circuits written in Noir

Latest version **0.0.1** (published 2023-09-11) · 0 weekly downloads

## Install

```sh
npm install noir-ziden
pnpm add noir-ziden
yarn add noir-ziden
bun add noir-ziden
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-09-11 |
| First published | 2023-09-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 12 |
| Unpacked size | 37.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | 0xnhattranduy |

## Links

- npm: https://www.npmjs.com/package/noir-ziden
- npm.io page: https://npm.io/package/noir-ziden

## Dependencies (12)

- [blake2](https://npm.io/package/blake2.md) ^5.0.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [save-dev](https://npm.io/package/save-dev.md) ^0.0.1-security
- [ts-mocha](https://npm.io/package/ts-mocha.md) ^10.0.0
- [keccak256](https://npm.io/package/keccak256.md) ^1.0.6
- [typechain](https://npm.io/package/typechain.md) ^8.1.0
- [circomlibjs](https://npm.io/package/circomlibjs.md) ^0.1.7
- [bigint-buffer](https://npm.io/package/bigint-buffer.md) ^1.1.5
- [@types/eccrypto](https://npm.io/package/@types/eccrypto.md) ^1.1.3
- [solidity-coverage](https://npm.io/package/solidity-coverage.md) ^0.8.1
- [@typechain/ethers-v5](https://npm.io/package/@typechain/ethers-v5.md) ^10.1.0
- [hardhat-gas-reporter](https://npm.io/package/hardhat-gas-reporter.md) ^1.0.8

## Recent versions

- 0.0.1 (latest) — 2023-09-11

## README

# Noir-Ziden

This is the proof-of-concept project of Ziden protocol with circuits written in Noir

In this first version, we have completed the Noir circuits, test scripts as well as the TS scripts that serve the protocol's logic as specified in the [Protocol-specs](https://github.com/ziden-dev/Noir-Ziden/tree/main/specs)

## Components

### 1. Merkle Tree & Indexed Merkle Tree

They are core data structure of the protocol, enabling succinct membership and non-membership verification, currently supporting:

- Membership check
- Non-membership check
- Single insertion

[See circuit](https://github.com/ziden-dev/Noir-Ziden/blob/main/src/circuits/noirlib/src/indexed_merkle_tree.nr)

Upcoming features:

- Variable arity
- Batch insertion

### 2. Digital Signature

Digital signatures are used in the protocol as a principal authorization mechanism, in this version, we support 2 algorithms:

- EdDSA
- ECDSA

### 3. Protocol circuits

- [Claim](https://github.com/ziden-dev/Noir-Ziden/blob/main/src/circuits/noirlib/src/claim.nr)

- [Identity State](https://github.com/ziden-dev/Noir-Ziden/blob/main/src/circuits/noirlib/src/state_transition.nr)

- [Claim Presentation](https://github.com/ziden-dev/Noir-Ziden/blob/main/src/circuits/noirlib/src/claim_presentation.nr)


## Run our code

### Prerequisite

- Node version >= 16
- Nargo installed: [See installation guide](https://noir-lang.org/getting_started/nargo_installation)

### Installation

- Install dependencies:
```
npm i
```

- Compile Noir circuits:
```
./compile.sh
```

### Test

- Test claim features
```
npm run test-claim
```

- Test indexed merkle tree features
```
npm run test-indexed-merkle-tree
```

- Test state features
```
npm run test-state
```

- Test claim presentation process
```
npm run test-claim-query
```

## Future work

- Solidity smart contracts for proof verification and identity state management

- User interface for holders

- Server for issuers

- Server and smart contracts for verfiers

---
_Source: https://npm.io/package/noir-ziden · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
