sdk/js-sdk/examples/node-viem/README.md
A single example demonstrating the full @fhevm/sdk lifecycle using viem:
encryption, reading public values, and private decryption.
npm install in the repo root)Optionally provide a wallet private key:
cp .env.local.example .env.local
Without .env.local, a random wallet is used. The full flow still runs but decryption will fail (encrypted values are not on-chain).
npx tsx ./test-run.ts
@fhevm/sdk/viem). The API is identical to the ethers adapter — only the import path and provider type differ.PublicClient<Transport, Chain> instead of ethers' ContractRunner.walletClient.signTypedData() instead of ethers' wallet.signTypedData().FHE.allow() was not called for the user + encrypted value pair, decryption will fail.