fhenix-encrypted-inputs

Installation
SKILL.md

Fhenix Encrypted Inputs

Overview

Confidential contracts receive user data as encrypted input structs (InEuint32, InEbool, InEaddress, …) produced client-side by @cofhe/sdk encryptInputs. These structs carry extra metadata used by the ZK-Verifier to authenticate and validate the ciphertext. Before use, convert them to a regular encrypted (compute) type with FHE.asE…().

function transfer(address to, InEuint32 memory inAmount) public returns (euint32) {
    euint32 amount = FHE.asEuint32(inAmount);  // InEuint32 → euint32
    // ...now store / compute on `amount`
}

InE* vs euint*

  • InEuintXX = user input (authenticated, validated by the ZK-Verifier).
  • euintXX = compute type (a handle you operate on / store).
  • ⚠️ Never store InE* in contract state — the extra metadata raises gas and can cause unexpected behavior. Always convert with FHE.asE…() first.
Installs
1
First Seen
Jun 22, 2026
fhenix-encrypted-inputs — nickthelegend/fhenix-skills