mirror of
https://github.com/erhant/circomkit.git
synced 2026-05-05 03:00:37 -04:00
setup done
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
"version": "0.0.1",
|
||||
"description": "An opinionated development environment for developing circuits using Circom and TypeScript!",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"clean": "rm -fR dist",
|
||||
"build": "npm run clean && tsc -p .tsconfig.json",
|
||||
@@ -10,17 +11,17 @@
|
||||
},
|
||||
"author": "erhant",
|
||||
"devDependencies": {
|
||||
"circomlib": "^2.0.5",
|
||||
"circomlibjs": "^0.1.7",
|
||||
"snarkjs": "^0.5.0",
|
||||
"@types/chai": "^4.3.4",
|
||||
"@types/mocha": "^10.0.1",
|
||||
"@types/node": "^18.11.18",
|
||||
"chai": "^4.3.7",
|
||||
"circom_tester": "^0.0.19",
|
||||
"ethers": "^6.0.3",
|
||||
"circomlib": "^2.0.5",
|
||||
"circomlibjs": "^0.1.7",
|
||||
"ethers": "^6.0.4",
|
||||
"gts": "^3.1.1",
|
||||
"mocha": "^10.2.0",
|
||||
"snarkjs": "^0.5.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
## Commence a universal phase-1 powers-of-tau ceremony
|
||||
|
||||
# abort on error
|
||||
set -e
|
||||
|
||||
# get to the root directory of this project
|
||||
cd "${0%/*}"/..
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage:"
|
||||
echo "$0 <num-contributions>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# set variables
|
||||
NUM_CONTRIBS=$1 # number of contributions
|
||||
PTAU_DIR="./build/ptau" # output directory of ptaus
|
||||
CUR=0000 # ptau id, initially 0000
|
||||
|
||||
# create ptau output directory if not exists
|
||||
mkdir -p $PTAU_DIR
|
||||
|
||||
# start phase-1 ceremony
|
||||
echo "Starting Powers of Tau ceremony."
|
||||
snarkjs powersoftau new bn128 12 ${PTAU_DIR}/pot12_${CUR}.ptau -v
|
||||
|
||||
# make contributions
|
||||
for NEXT in $(seq -f "%04g" 1 ${NUM_CONTRIBS})
|
||||
do
|
||||
echo "Making Phase-1 Contribution: ${NEXT}"
|
||||
snarkjs powersoftau contribute ${PTAU_DIR}/pot12_${CUR}.ptau ${PTAU_DIR}/pot12_${NEXT}.ptau -v
|
||||
rm ${PTAU_DIR}/pot12_${CUR}.ptau
|
||||
CUR=$NEXT
|
||||
done
|
||||
echo "Phase 1 Complete."
|
||||
@@ -19,7 +19,7 @@ NUM_CONTRIBS=$2 # number of contributions
|
||||
CIRCUIT_DIR=./build/$CIRCUIT # circuit directory
|
||||
P1_PTAU=./ptau/powersOfTau28_hez_final_12.ptau # input directory of ptaus
|
||||
P2_PTAU=$CIRCUIT_DIR/pot12_final.ptau # phase-2 ptau
|
||||
CUR=000 # zkey id, initially 0000
|
||||
CUR=000 # zkey id, initially 0
|
||||
|
||||
# create zkey output directory if not exists
|
||||
mkdir -p $ZKEY_DIR
|
||||
|
||||
@@ -1339,10 +1339,10 @@ ethers@^5.5.1:
|
||||
"@ethersproject/web" "5.7.1"
|
||||
"@ethersproject/wordlists" "5.7.0"
|
||||
|
||||
ethers@^6.0.3:
|
||||
version "6.0.3"
|
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.0.3.tgz#00a525cc70306624dfc88d6438addcb001eb7a42"
|
||||
integrity sha512-ECUt+AlY80eLA/XvOgy4/K5Pq5BsMzlKKcSuUXOgp4k6d3tcDphEiz+Fs3zut/zYQVgqLgm3f8YtCJEEtzl8kA==
|
||||
ethers@^6.0.4:
|
||||
version "6.0.4"
|
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.0.4.tgz#4ff48a94e51248cdcdca762deda2b98d595a2889"
|
||||
integrity sha512-El/9IN2A0ptmxdMQA/Rzn/F80/8OpwHSQ+CkU83y6XIT0fNUz2M2X12VCWzlkmLV0dTGk45gdWR6gxNfyXdylg==
|
||||
dependencies:
|
||||
"@adraffy/ens-normalize" "1.8.9"
|
||||
"@noble/hashes" "1.1.2"
|
||||
|
||||
Reference in New Issue
Block a user