Skip to content

A template for creating new SBTs inheriting from the Masa SBT smart contracts, using ZKP.

License

Notifications You must be signed in to change notification settings

keyko-io/Keyko-zkSBT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keyko SBT ZKP

A template for creating new SBTs inheriting from the Masa SBT smart contracts, using ZKP.

We use eth-crypto package to encrypt and decrypt the data.

The specific use case is about creating a SBT with driving license data.

For ease up testing users can mint the SBT as many times as they need

Install dependencies and deployment

Preparations

  • Set DEPLOYER_PRIVATE_KEY to the deployers private key in .env.{network}.secret
  • Set INFURA_API_KEY to the Infura API key in .env
  • Set COINMARKETCAP_API_KEY to the CoinMarketCap API key in .env, if needed
  • Set ETHERSCAN_API_KEY to the Etherscan API key in .env, if needed
  • Set the environment variables in every .env.{network} file. These variables are used to deploy the smart contracts to the network.

Install dependencies

Run:

yarn install

Build smart contracts

Run:

yarn build

Deploy

Run:

yarn deploy --network {network}

Contract Deployments

Deployment addresses

You can see the deployment address of the smart contracts in the deployments/goerli and deployments/mainnet folders. For every deployed smart contract you will find a <smart_contract>.json JSON file with the address in the "address" field.

Zero-Knowledge Proof

Zero-knowledge proof is a method by which one party (the prover) can prove to another party (the verifier) that the prover knows a value x that fulfills some constraints without revealing any information apart from the fact that he/she knows the value x.

Circom and dependencies setup

Install Rust

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Build Circom from source

git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circom

Install snarkjs

npm install -g snarkjs

Compile the circuit

follow commands in this file

About

A template for creating new SBTs inheriting from the Masa SBT smart contracts, using ZKP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.9%
  • Assembly 1.6%
  • TypeScript 0.2%
  • Solidity 0.2%
  • JavaScript 0.1%
  • Circom 0.0%