---
name: fhenix-client-sdk-encryption
description: Production-grade v0.1.2 elite guide to Fhenix Client SDK encryption of user inputs.
category: Foundation
difficulty: Advanced
version: "0.1.2"
---

# Fhenix Client SDK Encryption

## Overview
This skill covers how to encrypt user inputs off-chain using the Client SDK before submitting them to smart contracts.

## Encrypting Inputs
To submit secret parameters, wrap them with `Encryptable` and run `.encryptInputs()`:

```typescript
import { Encryptable } from "@cofhe/sdk";

// Encrypt inputs
const [encryptedAmount] = await client
  .encryptInputs([Encryptable.uint32(100n)])
  .onStep((step) => console.log(`Step: ${step}`))
  .execute();

// Send to contract
const tx = await counterContract.reset_counter(encryptedAmount);
await tx.wait();
```

## AI Agent Prompt
> "Act as a security auditor. Write a TypeScript snippet that encrypts a user's address and a uint64 value using the @cofhe/sdk, showing how progress steps are logged."
