fix: switching to @cryptkeeperzk/snarkjs and @cryptkeeperzk/ffjavascript

This commit is contained in:
isk
2023-08-15 19:20:32 +02:00
parent 7d26d4e66c
commit ebd032f62b
46 changed files with 3200 additions and 4490 deletions

View File

@@ -5,7 +5,7 @@
<source media="(prefers-color-scheme: light)" srcset="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
<img width="40" alt="Semaphore icon." src="https://github.com/semaphore-protocol/website/blob/main/static/img/semaphore-icon.svg">
</picture>
Semaphore
@CryptKeeper/semaphore
</h1>
</p>
@@ -58,6 +58,8 @@
</h4>
</div>
>NOTE: This package is a forked version of Semaphore protocol to make it work inside CryptKeeper extension using forked `@cryptkeeperzk/snarkjs` and `@cryptkeeperzk/ffjavascript`
| Semaphore is a protocol, designed to be a simple and generic privacy layer for Ethereum DApps. Using zero knowledge, Ethereum users can prove their membership of a group and send signals such as votes or endorsements without revealing their original identity. |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -92,7 +94,7 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
<tr>
<td>
<a href="/packages/identity">
@semaphore-protocol/identity
@cryptkeeperzk/semaphore-identity
</a>
<a href="https://js.semaphore.appliedzkp.org/identity">
(docs)
@@ -100,21 +102,21 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
</td>
<td>
<!-- NPM version -->
<a href="https://npmjs.org/package/@semaphore-protocol/identity">
<img src="https://img.shields.io/npm/v/@semaphore-protocol/identity.svg?style=flat-square" alt="NPM version" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-identity">
<img src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-identity.svg?style=flat-square" alt="NPM version" />
</a>
</td>
<td>
<!-- Downloads -->
<a href="https://npmjs.org/package/@semaphore-protocol/identity">
<img src="https://img.shields.io/npm/dm/@semaphore-protocol/identity.svg?style=flat-square" alt="Downloads" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-identity">
<img src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-identity.svg?style=flat-square" alt="Downloads" />
</a>
</td>
</tr>
<tr>
<td>
<a href="/packages/group">
@semaphore-protocol/group
@cryptkeeperzk/semaphore-group
</a>
<a href="https://js.semaphore.appliedzkp.org/group">
(docs)
@@ -122,21 +124,21 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
</td>
<td>
<!-- NPM version -->
<a href="https://npmjs.org/package/@semaphore-protocol/group">
<img src="https://img.shields.io/npm/v/@semaphore-protocol/group.svg?style=flat-square" alt="NPM version" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-group">
<img src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-group.svg?style=flat-square" alt="NPM version" />
</a>
</td>
<td>
<!-- Downloads -->
<a href="https://npmjs.org/package/@semaphore-protocol/group">
<img src="https://img.shields.io/npm/dm/@semaphore-protocol/group.svg?style=flat-square" alt="Downloads" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-group">
<img src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-group.svg?style=flat-square" alt="Downloads" />
</a>
</td>
</tr>
<tr>
<td>
<a href="/packages/proof">
@semaphore-protocol/proof
@cryptkeeperzk/semaphore-proof
</a>
<a href="https://js.semaphore.appliedzkp.org/proof">
(docs)
@@ -144,14 +146,14 @@ The core of the Semaphore protocol is in the [circuit logic](/packages/circuits/
</td>
<td>
<!-- NPM version -->
<a href="https://npmjs.org/package/@semaphore-protocol/proof">
<img src="https://img.shields.io/npm/v/@semaphore-protocol/proof.svg?style=flat-square" alt="NPM version" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-proof">
<img src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-proof.svg?style=flat-square" alt="NPM version" />
</a>
</td>
<td>
<!-- Downloads -->
<a href="https://npmjs.org/package/@semaphore-protocol/proof">
<img src="https://img.shields.io/npm/dm/@semaphore-protocol/proof.svg?style=flat-square" alt="Downloads" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-proof">
<img src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-proof.svg?style=flat-square" alt="Downloads" />
</a>
</td>
</tr>

View File

@@ -72,7 +72,7 @@
<a
style="margin-right: 15px; text-decoration: none"
target="_blank"
href="https://github.com/semaphore-protocol/semaphore"
href="https://github.com/CryptKeeperZK/semaphore"
>
<i
class="fa fa-github"

View File

@@ -1,9 +1,9 @@
{
"name": "semaphore-protocol",
"name": "@cryptkeeperzk/semaphore-protocol",
"description": "A zero-knowledge protocol for anonymous signalling on Ethereum.",
"license": "MIT",
"repository": "git@github.com:semaphore-protocol/semaphore.git",
"homepage": "https://github.com/semaphore-protocol/semaphore",
"homepage": "https://github.com/CryptKeeperZK/semaphore",
"bugs": "https://github.com/semaphore-protocol/semaphore/issues",
"private": true,
"scripts": {

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-contracts-hardhat",
"name": "@cryptkeeperzk/semaphore-cli-template-contracts-hardhat",
"private":"true",
"version": "3.10.1",
"description": "Semaphore Hardhat template.",
"license": "Unlicense",
@@ -14,9 +15,6 @@
"tsconfig.json",
"README.md"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"dev": "hardhat node & yarn compile && yarn deploy --network localhost",
"compile": "hardhat compile",
@@ -29,6 +27,9 @@
"prepublish": "tar -czf files.tgz .gitignore"
},
"devDependencies": {
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@cryptkeeperzk/semaphore-proof": "3.10.1",
"@ethersproject/abi": "^5.4.7",
"@ethersproject/providers": "^5.4.7",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.0",
@@ -36,10 +37,7 @@
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.0.0",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.2.0",

View File

@@ -1,6 +1,6 @@
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { formatBytes32String } from "ethers/lib/utils"
import { run } from "hardhat"

View File

@@ -15,13 +15,13 @@
"lint": "solhint 'contracts/**/*.sol'"
},
"devDependencies": {
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@cryptkeeperzk/semaphore-proof": "3.10.1",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",

View File

@@ -1,6 +1,6 @@
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { formatBytes32String } from "ethers/lib/utils"
import { run } from "hardhat"

View File

@@ -9,11 +9,11 @@
"start": "next start"
},
"dependencies": {
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@cryptkeeperzk/semaphore-proof": "3.10.1",
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.10.1",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import getNextConfig from "next/config"
import { useRouter } from "next/router"
import { useCallback, useContext, useEffect, useState } from "react"

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { useRouter } from "next/router"
import { useCallback, useContext, useEffect, useState } from "react"
import Stepper from "../components/Stepper"

View File

@@ -1,6 +1,6 @@
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { BigNumber, utils } from "ethers"
import getNextConfig from "next/config"
import { useRouter } from "next/router"

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-ethers",
"name": "@cryptkeeperzk/semaphore-cli-template-monorepo-ethers",
"private":"true",
"version": "3.10.1",
"description": "Semaphore Hardhat + Next.js + SemaphoreEthers template.",
"license": "Unlicense",

View File

@@ -15,13 +15,13 @@
"lint": "solhint 'contracts/**/*.sol'"
},
"devDependencies": {
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@cryptkeeperzk/semaphore-proof": "3.10.1",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/hardhat": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.1",

View File

@@ -1,6 +1,6 @@
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { formatBytes32String } from "ethers/lib/utils"
import { run } from "hardhat"

View File

@@ -9,11 +9,11 @@
"start": "next start"
},
"dependencies": {
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@cryptkeeperzk/semaphore-proof": "3.10.1",
"@next/font": "13.0.3",
"@semaphore-protocol/data": "3.10.1",
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1",
"@semaphore-protocol/proof": "3.10.1",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"dotenv": "^16.0.3",

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import getNextConfig from "next/config"
import { useRouter } from "next/router"
import { useCallback, useContext, useEffect, useState } from "react"

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { useRouter } from "next/router"
import { useCallback, useContext, useEffect, useState } from "react"
import Stepper from "../components/Stepper"

View File

@@ -1,6 +1,6 @@
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { BigNumber, utils } from "ethers"
import getNextConfig from "next/config"
import { useRouter } from "next/router"

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/cli-template-monorepo-subgraph",
"name": "@cryptkeeperzk/semaphore-cli-template-monorepo-subgraph",
"private":"true",
"version": "3.10.1",
"description": "Semaphore Hardhat + Next.js + SemaphoreSubgraph template.",
"license": "Unlicense",

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/cli",
"name": "@cryptkeeperzk/semaphore-cli",
"private":"true",
"type": "module",
"version": "3.10.1",
"description": "A command line tool to set up your Semaphore project and get group data.",
@@ -14,7 +15,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/cli",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -28,9 +29,6 @@
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/clear": "^0.1.2",
"@types/figlet": "^1.5.5",

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/contracts",
"private":"true",
"version": "3.10.1",
"description": "Semaphore contracts to manage groups and broadcast anonymous signals.",
"license": "MIT",
@@ -21,14 +22,11 @@
"circom",
"proof-of-membership"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/contracts",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@openzeppelin/contracts": "4.7.3",
"@zk-kit/incremental-merkle-tree.sol": "1.3.3"

View File

@@ -15,12 +15,12 @@
"lint": "solhint 'contracts/**/*.sol'"
},
"devDependencies": {
"@cryptkeeperzk/semaphore-group": "workspace:packages/group",
"@cryptkeeperzk/semaphore-identity": "workspace:packages/identity",
"@cryptkeeperzk/semaphore-proof": "workspace:packages/proof",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@semaphore-protocol/group": "workspace:packages/group",
"@semaphore-protocol/identity": "workspace:packages/identity",
"@semaphore-protocol/proof": "workspace:packages/proof",
"@typechain/ethers-v5": "^10.0.0",
"@typechain/hardhat": "^6.0.0",
"@types/chai": "^4.3.0",
@@ -38,7 +38,6 @@
"js-logger": "^1.6.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"rimraf": "^3.0.2",
"snarkjs": "^0.4.13",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.21",
@@ -62,6 +61,7 @@
}
},
"dependencies": {
"@cryptkeeperzk/snarkjs": "^0.7.1",
"@openzeppelin/contracts": "4.7.3",
"@zk-kit/incremental-merkle-tree.sol": "1.3.3"
}

View File

@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable jest/valid-expect */
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { FullProof, generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { FullProof, generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { constants, Signer } from "ethers"
import { ethers, run } from "hardhat"

View File

@@ -1,7 +1,7 @@
/* eslint-disable jest/valid-expect */
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { FullProof, generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { FullProof, generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { Signer } from "ethers"
import { ethers, run } from "hardhat"

View File

@@ -1,7 +1,7 @@
/* eslint-disable jest/valid-expect */
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { FullProof, generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { FullProof, generateProof } from "@cryptkeeperzk/semaphore-proof"
import { expect } from "chai"
import { Signer, utils } from "ethers"
import { ethers, run } from "hardhat"

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
// eslint-disable-next-line import/prefer-default-export
export function createIdentityCommitments(n: number): bigint[] {

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/data",
"name": "@cryptkeeperzk/semaphore-data",
"private":"true",
"version": "3.10.1",
"description": "A library to query Semaphore contracts.",
"license": "MIT",
@@ -15,7 +16,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/data",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -26,9 +27,6 @@
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/data"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@rollup/plugin-json": "^6.0.0",
"rollup-plugin-cleanup": "^3.2.1",

View File

@@ -12,11 +12,11 @@
<a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/semaphore.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@semaphore-protocol/group">
<img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/group?style=flat-square" />
<a href="https://www.npmjs.com/package/@cryptkeeperzk/semaphore-group">
<img alt="NPM version" src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-group?style=flat-square" />
</a>
<a href="https://npmjs.org/package/@semaphore-protocol/group">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/group.svg?style=flat-square" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-group">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-group.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/group">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
@@ -56,16 +56,16 @@
### npm or yarn
Install the `@semaphore-protocol/group` package with npm:
Install the `@cryptkeeperzk/semaphore-group` package with npm:
```bash
npm i @semaphore-protocol/group
npm i@cryptkeeperzk/semaphore-group
```
or yarn:
```bash
yarn add @semaphore-protocol/group
yarn add@cryptkeeperzk/semaphore-group
```
## 📜 Usage
@@ -73,8 +73,8 @@ yarn add @semaphore-protocol/group
\# **new Group**(groupId: _Member_, treeDepth = 20): _Group_
```typescript
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
// Group with max 1048576 members (20^²).
const group1 = new Group(1)
@@ -96,7 +96,7 @@ const group3 = new Group(1, 16, [identity1.commitment, identity2.commitment, ide
\# **addMember**(identityCommitment: _Member_)
```typescript
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
const identity = new Identity()
const commitment = identity.generateCommitment()

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/group",
"name": "@cryptkeeperzk/semaphore-group",
"private":"true",
"version": "3.10.1",
"description": "A library to create and manage Semaphore groups.",
"license": "MIT",
@@ -15,7 +16,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/group",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -26,9 +27,6 @@
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/group"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/hardhat",
"name": "@cryptkeeperzk/semaphore-hardhat",
"private":"true",
"version": "3.10.1",
"description": "A Semaphore Hardhat plugin to deploy verifiers and Semaphore contract.",
"license": "MIT",
@@ -15,7 +16,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/hardhat",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -25,9 +26,6 @@
"build": "rimraf dist && rollup -c rollup.config.ts --configPlugin typescript",
"prepublishOnly": "yarn build"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"hardhat": "^2.0.0",
"rollup-plugin-cleanup": "^3.2.1",

View File

@@ -97,8 +97,8 @@ fetch("/api/register" /* Replace this with your endpoint */, {
const { identity } = await HeyAuthn.fromRegister(options)
// Get existing group and signal anonymously (pseudocode).
import { Group } from "@semaphore-protocol/group"
import { generateProof } from "@semaphore-protocol/proof"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { utils } from "ethers"
const group = new Group("42")

View File

@@ -1,5 +1,6 @@
{
"name": "@semaphore-protocol/heyauthn",
"name": "@cryptkeeperzk/semaphore-heyauthn",
"private":"true",
"version": "3.10.1",
"description": "A library to allow developers to create and manage Semaphore identities using WebAuthn",
"license": "MIT",
@@ -15,7 +16,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/heyauthn",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -26,16 +27,13 @@
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/heyauthn"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
},
"dependencies": {
"@semaphore-protocol/identity": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1",
"@simplewebauthn/browser": "7.2.0",
"@simplewebauthn/server": "7.2.0"
}

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import {
GenerateAuthenticationOptionsOpts as AuthenticationOptions,
GenerateRegistrationOptionsOpts as RegistrationOptions

View File

@@ -5,7 +5,7 @@ import {
GenerateAuthenticationOptionsOpts as AuthenticationOptions
} from "@simplewebauthn/server"
import { startAuthentication, startRegistration } from "@simplewebauthn/browser"
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
export default class HeyAuthn {
private _identity: Identity

View File

@@ -1,4 +1,4 @@
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { GenerateAuthenticationOptionsOpts, GenerateRegistrationOptionsOpts } from "@simplewebauthn/server"
import HeyAuthn from "./heyAuthn"

View File

@@ -12,11 +12,11 @@
<a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/semaphore.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@semaphore-protocol/identity">
<img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/identity?style=flat-square" />
<a href="https://www.npmjs.com/package/@cryptkeeperzk/semaphore-identity">
<img alt="NPM version" src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-identity?style=flat-square" />
</a>
<a href="https://npmjs.org/package/@semaphore-protocol/identity">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/identity.svg?style=flat-square" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-identity">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-identity.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/identity">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
@@ -56,16 +56,16 @@
### npm or yarn
Install the `@semaphore-protocol/identity` package with npm:
Install the `@cryptkeeperzk/semaphore-identity` package with npm:
```bash
npm i @semaphore-protocol/identity
npm i @cryptkeeperzk/semaphore-identity
```
or yarn:
```bash
yarn add @semaphore-protocol/identity
yarn add @cryptkeeperzk/semaphore-identity
```
## 📜 Usage
@@ -73,7 +73,7 @@ yarn add @semaphore-protocol/identity
\# **new Identity**(identityOrMessage?: _string_): _Identity_
```typescript
import { Identity } from "@semaphore-protocol/identity"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
// The identity can be generated randomly.
const identity1 = new Identity()

View File

@@ -1,5 +1,5 @@
{
"name": "@semaphore-protocol/identity",
"name": "@cryptkeeperzk/semaphore-identity",
"version": "3.10.1",
"description": "A library to create Semaphore identities.",
"license": "MIT",
@@ -15,7 +15,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/identity",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -26,9 +26,6 @@
"prepublishOnly": "yarn build",
"docs": "typedoc src/index.ts --out ../../docs/identity"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",

View File

@@ -12,11 +12,11 @@
<a href="https://github.com/semaphore-protocol/semaphore/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/semaphore-protocol/semaphore.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/@semaphore-protocol/proof">
<img alt="NPM version" src="https://img.shields.io/npm/v/@semaphore-protocol/proof?style=flat-square" />
<a href="https://www.npmjs.com/package/@cryptkeeperzk/semaphore-proof">
<img alt="NPM version" src="https://img.shields.io/npm/v/@cryptkeeperzk/semaphore-proof?style=flat-square" />
</a>
<a href="https://npmjs.org/package/@semaphore-protocol/proof">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@semaphore-protocol/proof.svg?style=flat-square" />
<a href="https://npmjs.org/package/@cryptkeeperzk/semaphore-proof">
<img alt="Downloads" src="https://img.shields.io/npm/dm/@cryptkeeperzk/semaphore-proof.svg?style=flat-square" />
</a>
<a href="https://js.semaphore.appliedzkp.org/proof">
<img alt="Documentation typedoc" src="https://img.shields.io/badge/docs-typedoc-744C7C?style=flat-square">
@@ -56,16 +56,16 @@
### npm or yarn
Install the `@semaphore-protocol/proof` package and its peer dependencies with npm:
Install the `@cryptkeeperzk/semaphore-proof` package and its peer dependencies with npm:
```bash
npm i @semaphore-protocol/identity @semaphore-protocol/group @semaphore-protocol/proof
npm i @cryptkeeperzk/semaphore-identity@cryptkeeperzk/semaphore-group @cryptkeeperzk/semaphore-proof
```
or yarn:
```bash
yarn add @semaphore-protocol/identity @semaphore-protocol/group @semaphore-protocol/proof
yarn add @cryptkeeperzk/semaphore-identity@cryptkeeperzk/semaphore-group @cryptkeeperzk/semaphore-proof
```
## 📜 Usage
@@ -79,9 +79,9 @@ snarkArtifacts?: _SnarkArtifacts_
): Promise\<_SemaphoreFullProof_>
```typescript
import { Identity } from "@semaphore-protocol/identity"
import { Group } from "@semaphore-protocol/group"
import { generateProof } from "@semaphore-protocol/proof"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { generateProof } from "@cryptkeeperzk/semaphore-proof"
import { utils } from "ethers"
const identity = new Identity()
@@ -103,7 +103,7 @@ const fullProof = await generateProof(identity, group, externalNullifier, signal
\# **verifyProof**(fullProof: _FullProof_, treeDepth: _number_): Promise\<_boolean_>
```typescript
import { verifyProof } from "@semaphore-protocol/proof"
import { verifyProof } from "@cryptkeeperzk/semaphore-proof"
await verifyProof(fullProof, 20)
```
@@ -114,8 +114,8 @@ externalNullifier: \__BytesLike | Hexable | number | bigint_
): bigint
```typescript
import { Identity } from "@semaphore-protocol/identity"
import { calculateNullifierHash } from "@semaphore-protocol/proof"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { calculateNullifierHash } from "@cryptkeeperzk/semaphore-proof"
const identity = new Identity()
const externalNullifier = utils.formatBytes32String("Topic")

View File

@@ -1,5 +1,5 @@
{
"name": "@semaphore-protocol/proof",
"name": "@cryptkeeperzk/semaphore-proof",
"version": "3.10.1",
"description": "A library to generate and verify Semaphore proofs.",
"license": "MIT",
@@ -15,7 +15,7 @@
"LICENSE",
"README.md"
],
"repository": "https://github.com/semaphore-protocol/semaphore",
"repository": "https://github.com/CryptKeeperZK/semaphore",
"homepage": "https://github.com/semaphore-protocol/semaphore/tree/main/packages/proof",
"bugs": {
"url": "https://github.com/semaphore-protocol/semaphore.git/issues"
@@ -33,22 +33,22 @@
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-json": "^5.0.1",
"@rollup/plugin-node-resolve": "^15.0.2",
"ffjavascript": "^0.2.54",
"poseidon-lite": "^0.2.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-typescript2": "^0.31.2",
"typedoc": "^0.22.11"
},
"peerDependencies": {
"@semaphore-protocol/group": "3.10.1",
"@semaphore-protocol/identity": "3.10.1"
"@cryptkeeperzk/semaphore-group": "3.10.1",
"@cryptkeeperzk/semaphore-identity": "3.10.1"
},
"dependencies": {
"@cryptkeeperzk/ffjavascript": "^0.2.59",
"@cryptkeeperzk/snarkjs": "^0.7.1",
"@ethersproject/bignumber": "^5.5.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/keccak256": "^5.7.0",
"@ethersproject/strings": "^5.5.0",
"@zk-kit/incremental-merkle-tree": "0.4.3",
"snarkjs": "0.4.13"
"@zk-kit/incremental-merkle-tree": "0.4.3"
}
}

View File

@@ -1,9 +1,9 @@
import { BigNumber } from "@ethersproject/bignumber"
import { BytesLike, Hexable } from "@ethersproject/bytes"
import { Group } from "@semaphore-protocol/group"
import type { Identity } from "@semaphore-protocol/identity"
import { Group } from "@cryptkeeperzk/semaphore-group"
import type { Identity } from "@cryptkeeperzk/semaphore-identity"
import { MerkleProof } from "@zk-kit/incremental-merkle-tree"
import { groth16 } from "snarkjs"
import { groth16 } from "@cryptkeeperzk/snarkjs"
import hash from "./hash"
import packProof from "./packProof"
import { FullProof, SnarkArtifacts } from "./types"

View File

@@ -1,7 +1,7 @@
import { formatBytes32String } from "@ethersproject/strings"
import { Group } from "@semaphore-protocol/group"
import { Identity } from "@semaphore-protocol/identity"
import { getCurveFromName } from "ffjavascript"
import { Group } from "@cryptkeeperzk/semaphore-group"
import { Identity } from "@cryptkeeperzk/semaphore-identity"
import { getCurveFromName } from "@cryptkeeperzk/ffjavascript"
import calculateNullifierHash from "./calculateNullifierHash"
import generateProof from "./generateProof"
import hash from "./hash"

View File

@@ -1,4 +1,4 @@
import { groth16 } from "snarkjs"
import { groth16 } from "@cryptkeeperzk/snarkjs"
import hash from "./hash"
import { FullProof } from "./types"
import unpackProof from "./unpackProof"

View File

@@ -12,9 +12,20 @@
"declaration": true,
"allowSyntheticDefaultImports": true,
"declarationDir": "types",
"typeRoots": ["node_modules/@types", "types"],
"typeRoots": [
"node_modules/@types",
"types"
],
"paths": {
"@semaphore-protocol/*": ["packages/*/src"]
"@cryptkeeperzk/semaphore-*": [
"packages/*/src"
],
"@cryptkeeperzk/@cryptkeeperzk/ffjavascript": [
"./src/types/ffjavascript"
],
"@cryptkeeperzk/snarkjs": [
"./src/types/snarkjs"
],
}
},
"ts-node": {
@@ -23,4 +34,4 @@
"module": "commonjs"
}
}
}
}

View File

@@ -1,6 +1,6 @@
/** Declaration file generated by dts-gen */
declare module "ffjavascript" {
declare module "@cryptkeeperzk/ffjavascript" {
export class BigBuffer {
constructor(...args: any[])

View File

@@ -1,6 +1,6 @@
/** Declaration file generated by dts-gen */
declare module "snarkjs" {
declare module "@cryptkeeperzk/snarkjs" {
export = snarkjs
declare const snarkjs: {

7366
yarn.lock

File diff suppressed because it is too large Load Diff