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

@zentity/fhevm-contracts

v0.2.0

Published

fhEVM smart contracts for Zentity privacy-preserving identity attestations

Readme

@zentity/fhevm-contracts

fhEVM smart contracts for privacy-preserving identity attestations.

Overview

This package provides Solidity contracts using Zama's fhEVM:

  • IdentityRegistry — encrypted identity attributes (birth year offset, country, compliance (KYC) level, blacklist)
  • ComplianceRules — encrypted compliance checks with cached results
  • CompliantERC20 — demo token enforcing compliance on transfers

Installation

npm install @zentity/fhevm-contracts

Quickstart (local)

bun install
bun run compile
bun run test:mocked

# terminal 1
bunx hardhat node

# terminal 2
bun run deploy:local
bun run print:deployments localhost --env

Quickstart (Sepolia)

  1. Set env values in .env.local:
FHEVM_RPC_URL=...
FHEVM_PROVIDER_ID=zama # zama = Zama relayer SDK
PRIVATE_KEY=0x...

Tip: keep shared defaults in .env and secrets in .env.local. See docs/deployment.md for the full env-file behavior.

  1. Deploy and print addresses:
bun run deploy:sepolia
bun run print:deployments sepolia --env
  1. Run integration smoke tests:
bun run test:sepolia

Usage

Minimal setup (addresses + ABI):

import {
  getContractAddresses,
  getAbi,
} from "@zentity/fhevm-contracts";

const addresses = getContractAddresses("hardhat");
const identityRegistry = new ethers.Contract(
  addresses.IdentityRegistry,
  getAbi("IdentityRegistry"),
  signer
);

Direct ABI imports:

import { IdentityRegistryABI } from "@zentity/fhevm-contracts";
// or
import { IdentityRegistryABI } from "@zentity/fhevm-contracts/abi";

Address helpers:

import {
  getContractAddresses,
  resolveContractAddresses,
  getNetworkName,
  hasDeployment,
  CHAIN_ID_BY_NETWORK,
} from "@zentity/fhevm-contracts";

const network = getNetworkName(31337, "hardhat");
if (!hasDeployment(network)) throw new Error("Missing deployments");

const addresses = getContractAddresses(network, {
  overrides: { ComplianceRules: "0x..." },
});

// Sepolia or other networks without bundled deployments:
const sepoliaAddresses = resolveContractAddresses("sepolia", {
  overrides: {
    IdentityRegistry: "0x...",
    ComplianceRules: "0x...",
    CompliantERC20: "0x...",
  },
});

Addresses & deployments

Deployments are stored in deployments/<network>. Use the helper script to print them as JSON or env-style output:

bun run print:deployments
bun run print:deployments sepolia --env

Networks

| Network | Chain ID | RPC | |---------|----------|-----| | Sepolia | 11155111 | https://ethereum-sepolia-rpc.publicnode.com | | Localhost | 31337 | http://127.0.0.1:8545 |

Note: only networks with a deployment manifest in deployments/<network> are available via getContractAddresses() out of the box.

Ownership & admin safety

Admin-managed contracts use two-step ownership transfer: transferOwnership(newOwner)acceptOwnership().

See docs/guide.md for details and best practices.

Documentation

  • docs/guide.md (deployment, testing, faucets, ownership)
  • docs/architecture.md (contract flow overview)
  • CONTRIBUTING.md (pre-commit checklist, changesets, deployments)

Development

This repo uses Bun by default. If you prefer npm, replace bun run <script> with npm run <script>.

Common scripts:

  • bun run compile
  • bun run test:mocked
  • bun run test
  • bun run deploy:local
  • bun run deploy:sepolia

License

MIT