fhenix-client-sdk-decryption-view

Installation
SKILL.md

Fhenix Client SDK — Decrypt to View

Overview

decryptForView(ctHash, utype) reveals a confidential value locally so you can show it in the UI. It always uses a permit (no .withoutPermit() mode) and does not return an on-chain-verifiable signature — for that, use decryptForTx (see fhenix-client-sdk-decryption-tx).

Flow

  1. Read the encrypted handle (ctHash) from your contract (view return, event arg, or stored value).
  2. Ensure an active permit authorizes decryption of that value.
  3. Call decryptForView(ctHash, utype).execute() → returns a UI-friendly scalar.
import { FheTypes } from '@cofhe/sdk';

await client.connect(publicClient, walletClient);
await client.permits.getOrCreateSelfPermit();
Installs
1
First Seen
Jun 22, 2026
fhenix-client-sdk-decryption-view — nickthelegend/fhenix-skills