npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jobjab-fhevm-sdk

v0.2.0

Published

Universal, framework-agnostic SDK for building confidential dApps with FHEVM

Readme

jobjab-fhevm-sdk

Universal, framework-agnostic SDK for building confidential dApps with FHEVM

npm License FHEVM

✨ Fully compatible with Zama FHEVM v0.9 specification

Installation

npm install jobjab-fhevm-sdk

Quick Start

Core (Framework-Agnostic)

import { createFhevmClient } from 'jobjab-fhevm-sdk';

const client = createFhevmClient({ network: 'sepolia' });
await client.init();

const result = await client.encrypt(
  contractAddress,
  userAddress,
  { type: 'euint32', value: 42 }
);

React

import { FhevmProvider, useEncrypt } from 'jobjab-fhevm-sdk/adapters/react';
import { EncryptedInput } from 'jobjab-fhevm-sdk/components/react';

<FhevmProvider config={{ network: 'sepolia' }}>
  <YourApp />
</FhevmProvider>

function YourApp() {
  const { encrypt } = useEncrypt({ contractAddress, userAddress });
  return <EncryptedInput type="euint32" onEncrypted={(r) => console.log(r)} />;
}

Features

  • 🎯 Framework-Agnostic - React, Vue, Node.js, Vanilla JS
  • 🪝 Wagmi-like API - Provider + hooks pattern
  • 📦 Components - EncryptedInput, DecryptButton, CipherPreview
  • Performance - Batch operations (3-5x faster), caching
  • 🔐 Complete - Encrypt, decrypt (user + public), EIP-712
  • 🚨 Error Handling - Helpful error codes and suggestions
  • 🧪 Tested - 142+ tests passing

API

Core

createFhevmClient(config)           // Create client
client.init()                        // Initialize
client.encrypt(addr, user, value)    // Encrypt value
client.encryptBatch(addr, user, values) // Batch (3-5x faster)
client.decrypt(requests, signature)  // Decrypt with EIP-712
client.publicDecrypt(handle, addr)   // Public decrypt

React

<FhevmProvider config={...}>         // Provider
useFhevmClient()                     // Access client
useEncrypt({ contractAddress, userAddress })
useDecrypt({ requests, signature })
useDecryptionSignature({ contractAddresses, signer })

Components

<EncryptedInput type="euint32" onEncrypted={handler} />
<DecryptButton handle="0x..." signer={signer} showValue />
<CipherPreview handle="0x..." showDecrypt />

Supported Types

Primary Types (FHEVM v0.9)

  • ebool - Boolean values
  • euint8, euint16, euint32, euint64, euint128, euint256 - Unsigned integers
  • eaddress - Ethereum addresses

Legacy Types (Deprecated in v0.7+)

  • ebytes64, ebytes128, ebytes256 - Not recommended for new projects

Note: The SDK uses externalE* types with inputProof (ZKPoK) pattern, matching FHEVM v0.9's encrypted input specification. See Zama Docs for details.

FHEVM v0.9 Compatibility

This SDK is designed for FHEVM v0.9 and includes:

Decryption via Relayer/KMS - No deprecated FHE.requestDecryption or FHE.setDecryptionOracle
Simplified EIP-712 - No contractsChainId field (matches v0.9 spec)
Gateway Architecture - Full support for gateway chain decryption flow
ACL Permissions - Works with FHE.allow, FHE.allowThis, FHE.makePubliclyDecryptable
Modern Types - Primary focus on euint*, ebool, eaddress (v0.9 spec)

Verified with: @zama-fhe/[email protected]

Documentation

Example Usage

// Encrypt
const encrypted = await client.encrypt(addr, user, { type: 'euint32', value: 100 });
await contract.myFunction(encrypted.handles[0], encrypted.inputProof);

// Decrypt
const keypair = client.generateKeypair();
const eip712 = client.createEIP712(keypair.publicKey, [addr]);
const sig = await signer.signTypedData(eip712.domain, eip712.types, eip712.message);
const decrypted = await client.decrypt([{ handle, contractAddress }], { ...keypair, signature: sig, ... });

Links

License

BSD-3-Clause-Clear


Built for Zama Bounty Program - October 2025