npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fhevm-lings

v0.1.1

Published

Interactive learning tool for FHEVM - Learn Fully Homomorphic Encryption through hands-on exercises

Readme

⚡ fhevm-lings

Aprenda FHEVM (Fully Homomorphic Encryption Virtual Machine) através de pequenos exercícios interativos!

Inspirado no rustlings, o fhevm-lings é uma forma divertida e prática de aprender criptografia homomórfica com a blockchain usando FHEVM da Zama.

🎯 O que você vai aprender

  • ✅ Importar e usar a biblioteca FHE
  • ✅ Encriptar dados on-chain (euint32, ebool, etc.)
  • ✅ Realizar operações homomórficas (adição, comparação)
  • ✅ Implementar lógica condicional em dados encriptados
  • ✅ Construir contratos inteligentes com privacidade

📦 Instalação

Pré-requisitos

  • Node.js v18 ou superior
  • npm ou yarn

Passos

  1. Clone o repositório:

    git clone https://github.com/SEU_USER/fhevm-lings.git
    cd fhevm-lings
  2. Instale as dependências:

    npm install

🚀 Como Usar

Modo Observador (Watch Mode)

O modo padrão que observa seus arquivos e testa automaticamente:

npm run watch```

Isso iniciará o modo interativo que:
1. Mostra o exercício atual
2. Aguarda você editar o arquivo
3. Automaticamente compila e testa quando você salva
4. Avança para o próximo exercício quando você acertar!

### Outros Comandos

Você pode usar estes comandos **a qualquer momento**, inclusive enquanto o modo watch está rodando:

```bash
# Ver lista de todos os exercícios e progresso (em nova janela do terminal)
npm run watch list

# Mostrar dica do exercício atual (em nova janela do terminal)
npm run watch hint

# Verificar um exercício específico
npm run watch verify 03_encrypt_euint32

Dica: Abra uma segunda janela do terminal para executar comandos como list e hint sem interromper o modo watch!

📸 Preview da Experiência

Terminal Limpo e Organizado:

──────────────────────────────────────────────────

⚡fhevm-lings Exercício Atual
  Progresso: 4/7
  ████████████████░░░░░░░░░░░░░░ 57%

  📝 04_add_two_euints
  Aguardando mudanças no arquivo...

──────────────────────────────────────────────────

Feedback ao Salvar:

⚡fhevm-lings 🔄 Compilando e testando...

⚡fhevm-lings ❌ Teste falhou!
  ├─ O exercício ainda não está correto.
  └─ Corrija o código e salve o arquivo novamente.

  💡 Dica:
     Você pode usar 'return FHE.add(a, b)' ou simplesmente 'return a + b'

Lista de Progresso:

⚡fhevm-lings 📋 Lista de Exercícios

  ✓ ✅ 01: 01_introduction
  ✓ ✅ 02: 02_import_tfhe
  ✓ ✅ 03: 03_encrypt_euint32
  ○ 📝 04: 04_add_two_euints ← atual
  ...

  Progresso Geral:
  █████████████████░░░░░░░░░░░░░░ 57%
  4 de 7 exercícios completos

📚 Estrutura dos Exercícios

Os exercícios estão organizados em ordem de dificuldade crescente:

  1. 01_introduction - Introdução ao fhevm-lings
  2. 02_import_tfhe - Importar a biblioteca FHE
  3. 03_encrypt_euint32 - Encriptar um número uint32
  4. 04_add_two_euints - Adicionar dois números encriptados
  5. 05_comparison - Comparar números encriptados
  6. 06_select_statement - Lógica condicional (if/else)
  7. 99_congratulations - Parabéns! 🎉

💡 Dicas

  • 🔍 Leia os comentários nos arquivos .sol - eles contêm dicas importantes
  • 📖 Use npm run watch hint se ficar preso
  • ✅ Os testes verificam se sua implementação está correta
  • 🚀 Não tenha medo de experimentar!

🎨 Interface Melhorada (Rustlings-Style!)

Inspirado no rustlings, o fhevm-lings oferece uma experiência de aprendizado moderna e intuitiva:

  • Interface colorida e limpa - Terminal sempre organizado, sem poluição visual
  • 📊 Barra de progresso visual - Veja seu avanço em tempo real com percentual
  • 💬 Mensagens de erro estruturadas - Erros formatados em árvore com dicas direcionadas
  • Feedback instantâneo - Compilação e testes automáticos ao salvar
  • 🎯 Comandos úteis - list, hint, verify disponíveis a qualquer momento
  • 🧹 Terminal auto-limpante - Cada exercício começa com tela limpa
  • 🎨 Feedback visual aprimorado - Cores e emojis para melhor compreensão

🛠️ Tecnologias

  • FHEVM - Fully Homomorphic Encryption Virtual Machine by Zama
  • Hardhat - Ethereum development environment
  • Solidity - Smart contract language
  • TypeScript - Type-safe JavaScript
  • Chalk - Terminal styling

📖 Recursos Adicionais

🤝 Contribuindo

Contribuições são bem-vindas! Sinta-se à vontade para:

  • Reportar bugs
  • Sugerir novos exercícios
  • Melhorar a documentação
  • Compartilhar feedback

📝 Licença

Unlicense - Domínio público

🌟 Créditos

Inspirado em rustlings - A great way to learn Rust!


Feito com ❤️ para a comunidade FHEVM