Skip to content

marronjo/fhe-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FHE AI Assistant 🔐

AI Training Materials for Fully Homomorphic Encryption (FHE) Smart Contract Development using Fhenix

Train AI assistants (Claude, ChatGPT, Gemini, etc.) on FHE development patterns using the Fhenix protocol to get expert-level guidance.

🚀 Quick Start (30 seconds)

Essential File

Load this comprehensive reference into any AI:
📚 core.md (30KB) - Complete FHE library reference & patterns

AI Platforms

Claude Code:

claude "Read the fhe-assistant/core.md file and help me build FHE smart contracts using these patterns"

Other AIs (ChatGPT, Gemini, etc.): Copy-paste the core.md file and say: "This is FHE reference material. Help me build encrypted smart contracts."

🎯 Proven AI Prompts

Code Generation:

  • "Build me a [voting/auction/gaming] contract using FHE patterns"
  • "Create an encrypted token with private balances"

Code Review:

  • "Review this FHE contract against the security checklist"
  • "Fix this contract that has FHE access control errors"

Learning:

  • "Explain FHE access control and show me working examples"
  • "Why can't I use ebool in if statements? Show me the right way"

🔑 Key Success Formula

Essential Mental Model: "Without FHE.allow() = passing a locked box without the key!"

Built for Fhenix Protocol: All patterns use @fhenixprotocol/contracts and target Fhenix networks.

  1. Load Core Patterns → AI understands FHE fundamentals
  2. Add Working Examples → AI sees proper Fhenix implementation
  3. Ask Specific Questions → AI applies patterns to your needs

Result: AI writes Fhenix-compatible FHE code following security best practices!

📁 What's Inside

📚 core.md    → Comprehensive FHE library reference (EVERYTHING YOU NEED)
📖 README.md  → This quick start guide

The core.md file includes:

  • 🔢 All encrypted data types (ebool, euint8-256, eaddress)
  • ➕ Complete operation reference (arithmetic, comparison, logical)
  • 🔐 Access control patterns (FHE.allow*, critical for security)
  • 🔄 Conditional operations (FHE.select - the only way to use ebool)
  • 🔓 Decryption workflows (multi-transaction patterns)
  • 🚨 Common mistakes and debugging guide
  • ✅ Working code templates and examples

🤝 Community Resources

  • Discord: Fhenix Community - Real-time FHE help
  • Documentation: docs.fhenix.zone - Official reference
  • GitHub Issues: Report AI training improvements or pattern issues

🚀 Ready to start? Load the core files into your AI assistant and start building encrypted smart contracts!

For detailed examples, advanced configurations, and comprehensive guides, see the individual files above.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors