Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/tutorial/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
NEBRA_SIGNER_PK=""
ZKVERIFY_SIGNER_PK=""
65 changes: 65 additions & 0 deletions apps/tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,68 @@ Create `.env` file using `.env.example` as a template. Update `NEBRA_SIGNER_PK`
```bash
pnpm run useNebraUpa
```
# useZkVerify

## Overview
A demonstration project for integrating zkVerify with Galxe Identity Protocol. This integration aims to significantly reduce verification costs while maintaining security.

### Prerequisites
- Node.js (Latest LTS version)
- pnpm
- Account with testnet ETH

## Workflow Overview
The verification process consists of three main steps:

1. **Credential Issuance**
- Issuer creates and issues credentials to the user
- Credentials contain verifiable claims about the user

2. **Proof Generation**
- User generates zero-knowledge proofs
- Proofs demonstrate specific statements about their credentials
- Preserves privacy while proving credential validity

3. **Verification via zkVerify**
- Proofs are submitted to zkVerify for verification
- Can be done through direct verification or registered key method
- Ensures efficient and cost-effective verification

### Verification Methods
1. **Registered Key Verification**
- Transaction Hash: [0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6](https://zkverify-explorer.zeeve.net/extrinsics/0x11c2ddf64b5ddfcb1b1404d655ac41f23190f579f4bf2d79d612375df7a1fbf6)

2. **Direct Verification**
- Transaction Hash: [0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2](https://zkverify-explorer.zeeve.net/extrinsics/0x7d7a24d8c0c47fcc03f24ec54fa4575f6806bc7f9ef202eff7172496a14c27a2)


### Configuration
Add to `.env`:
```
ZKVERIFY_SIGNER_PK=your_private_key_here
```
### run

```bash
pnpm run useZkVerify
```

## Note

### Cost Reduction
- >90% reduction in proof verification costs compared to native Ethereum verification
- Significant savings at Galxe's scale (31M+ active users)

### Scalability
- Supports Galxe's 350k+ credentials
- Enables more frequent credential checks
- Enhanced privacy features
- Improved accessibility for smaller projects

### Technical Advantages
- Supports multiple verification schemes (Groth16, Fflonk, Risc0)
- Modular blockchain focused on proof verification
- Efficient on-chain verification process

## Additional Resources
- [zkVerify Documentation](https://zkverify.io/)
3 changes: 3 additions & 0 deletions apps/tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"test": "echo TODO",
"tutorial1": "ts-node -T src/tutorial1.ts",
"useNebraUpa": "ts-node -T src/useNebraUpa.ts",
"useZkVerify": "ts-node -T src/useZkVerify.ts",
"prettier:write": "prettier --write ./src",
"lint": "eslint --ignore-path ./.eslintignore --ext .js,.ts ."
},
Expand All @@ -27,7 +28,9 @@
"node-fetch": "^3.3.2",
"tslog": "^4.9.2",
"typescript": "^5.4.5",
"zkverifyjs": "^0.3.1",
"yargs": "^17.7.2"

},
"devDependencies": {
"rimraf": "^5.0.6",
Expand Down
Loading
Loading