Skip to content

Recover your Wallet using just your face and and trivia about yourself

Notifications You must be signed in to change notification settings

Nilay27/zk-wallet-recovery

Repository files navigation

zk-face-recovery

Recover your Wallet using just your face and and trivia about yourself

Setup

  1. Run npm install to setup circomlib
npm install && mkdir output
  1. Compile circuit
circom circuits/poseidonHash.circom --r1cs --wasm --sym -o output/
  1. Change to ptau-ceremony directory
cd output/ptau-ceremony/
  1. To prove the circuit in one go, run:
bash ceremony.sh {circuit_name}
  1. Alternatively you can perform step by step, the trusted setup is done in two parts

    1. The powers of tau, which is independent of the circuit
    2. The phase 2, which depends on the circuit
  2. Start a new powers of tau ceremony

snarkjs powersoftau new bn128 12 pot12_0000.ptau -v
  1. Contribute to the ceremony
snarkjs powersoftau contribute pot12_0000.ptau pot12_0001.ptau --name="First contribution" -v
  1. Begin circuit dependent phase
snarkjs powersoftau prepare phase2 pot12_0001.ptau pot12_final.ptau -v
  1. Generate proving and verification keys
snarkjs groth16 setup output/circuit.r1cs pot12_final.ptau circuit_0000.zkey
  1. Contribute to phase 2
snarkjs zkey contribute circuit_0000.zkey circuit_0001.zkey --name="1st Contributor Name" -v
  1. Export verification key
snarkjs zkey export verificationkey circuit_0001.zkey verification_key.json

Deployed Contracts Readme


Goerli Testnet

  • Verifier Contract: 0x0b0262f3928C8A895CD3d324a952567F5fb5145a
  • Wallet Contract: 0x1aC472423AE7508b8E0D54A54120782ab4D5D550 - Verified Code

Arbitrum

  • Verifier Contract: 0xA5bDD9eC5E0d3dAd528C496a09FeD0f91a6bBf29 - Verified Code
  • Wallet Contract: 0xafca85162b0aBdd3CC59418b447E2cc7605Bd89f - Verified Code

Scroll

  • Verifier Contract: 0xafca85162b0aBdd3CC59418b447E2cc7605Bd89f - Verified Code
  • Wallet Contract: 0x61B6F8136edd8Ac5782d8aFBD5b5D098D9B50B50 - Verified Code

ZKEVM

  • Verifier Contract: 0xe89ed8d166c043Cc7753Da7eAcC87a07281cb057 - Verified Code
  • Wallet Contract: 0xA5bDD9eC5E0d3dAd528C496a09FeD0f91a6bBf29 - Verified Code

Filecoin

  • Verifier Contract: 0x61B6F8136edd8Ac5782d8aFBD5b5D098D9B50B50 - Verified Code
  • Wallet Contract: 0x6bb5BCD9fd3fc63E97742f051f00d40Af5a10e96 - Verified Code

Base

  • Verifier Contract: 0xafca85162b0aBdd3CC59418b447E2cc7605Bd89f - Verified Code
  • Wallet Contract: 0x2243675c0c854F68B3a89867Aa6347816909fE36 - Verified Code

About

Recover your Wallet using just your face and and trivia about yourself

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published