fhenix-encrypted-types
Installation
SKILL.md
Fhenix Encrypted Types
Overview
FHE.sol provides a compile-time + run-time checked type system for encrypted data. Each encrypted variable is a wrapper over a 128-bit ciphertext handle — a pointer/ID to the real ciphertext stored off-chain in the DA layer, not the data itself. Import: import '@fhenixprotocol/cofhe-contracts/FHE.sol';
Compute types
| Type | Bits | Notes |
|---|---|---|
ebool |
8 | Not a real bool — implemented as euint8 for FHE compatibility |
euint8 / euint16 / euint32 / euint64 / euint128 |
8–128 | Encrypted unsigned ints |
eaddress |
160 | Encrypted Ethereum address |
Each has an input counterpart used to receive client-encrypted data: InEbool, InEuint8…128, InEaddress. Input structs carry extra auth metadata — convert them to a compute type with FHE.asE…() and don't store InE* in state (higher gas / unexpected behavior).