Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umbra Helix | Aztec NFT Ownership verifier for Discord #19

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
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 .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
28 changes: 28 additions & 0 deletions umbra-helix/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
node_modules
.cert
.env
.env.local
Binary file added umbra-helix/.yarn/install-state.gz
Binary file not shown.
74 changes: 74 additions & 0 deletions umbra-helix/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# UmbraHelix

UmbraHelix is an Aztec NFT Ownership verifier for Discord. It also has other useful features like creating collection, minting nft, public and private transfer and to fetch nft owner.

Developers can use UmbraHelix by installing the sdk from npm.

## Challenge Selection
- [x] Social Cipher
- [ ] ZKEmail Guardian

## Team information
- **Satyam Bansal** - Full stack developer and open source contributor, Kernel community fellow
- GitHub: https://github.com/satyambnsal
- Twitter: @satyambnsal
- Email: satyamsgsits1994@gmail.com

- **Yash Mittal** - UI developer
- GitHub: https://github.com/yassmittal

## Video Demo
https://www.loom.com/share/22de26bc290a4326bac074992e3338c9?sid=064cd65f-12c3-4270-a2ff-3e3eaf99496a

## Technical Approach

### Main Components:
1. **NFT Smart Contract**
- Custom NFT contract written in Noir enabling both public and private transfers
- Support for collection creation, minting, and ownership verification
- Located in `contracts/nft_contracts`

2. **Client SDK**
- TypeScript SDK for easy integration
- Support for wallet creation, collection management, and NFT operations
- Privacy-preserving ownership verification functions

3. **Discord Integration**
- Bot interface for role management based on private NFT ownership verification
- Private membership verification without exposing full ownership details

### Key Aztec Features Used:
- Private state for NFT ownership records
- Public/private transfer functions
- AuthWit for delegated operations
- PXE integration for client-side proof generation

## Expected Outcomes
- Easy-to-use SDK for developers
- Working Discord bot demonstrating private ownership verification
- Documentation and examples for building privacy-preserving social applications

## Lessons Learned (For Submission)
- Implementing privacy-preserving ownership verification requires careful consideration of information leakage
- Pattern for handling both public and private NFT transfers while maintaining privacy
- Best practices for PXE integration and client-side proof generation
- Reusable patterns for Discord bot integration with private state verification

## Project Links
- GitHub Repository: https://github.com/umbra-privacy/umbra-helix
- Documentation & Examples: [To be added]



### Installation & Usage
```bash
# Clone the repository
git clone https://github.com/umbra-privacy/umbra-helix

cd umbra-helix

# Install dependencies
bun install

# Start development server
bun run dev
Binary file added umbra-helix/bun.lockb
Binary file not shown.
12 changes: 12 additions & 0 deletions umbra-helix/contracts/nft_contracts/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "nft_contract"
type = "contract"
authors = ["Satyam Bansal <satyamsgsits1994@gmail.com>"]
compiler_version = ">=0.33.0"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.60.0", directory = "noir-projects/aztec-nr/aztec" }
value_note = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.60.0", directory = "noir-projects/aztec-nr/value-note" }
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.60.0", directory = "noir-projects/aztec-nr/compressed-string" }
authwit = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.60.0", directory = "noir-projects/aztec-nr/authwit" }
easy_private_state = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "aztec-packages-v0.60.0", directory = "noir-projects/aztec-nr/easy-private-state" }
10 changes: 10 additions & 0 deletions umbra-helix/contracts/nft_contracts/codegenCache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"nft_contract-Counter.json": {
"contractName": "Counter",
"hash": "774eb477ea6f8b020b11b48c759143a7745f73073628c94f9ded1dfd2f6a24cf"
},
"nft_contract-NFT.json": {
"contractName": "NFT",
"hash": "267d2623b816deec6174ceb2f5330d9f4ba7353074e8fa03be478616f5730d5c"
}
}
Loading