SDK & CLI
zk-x509-sdk is the read side of zk-X509 — check verification and discover registries from Node, the browser, scripts, or the terminal. ethers v6 is a peer dependency.
bash
npm install zk-x509-sdk ethersLibrary
typescript
import { ethers } from "ethers";
import { ZkX509Client } from "zk-x509-sdk";
const provider = new ethers.JsonRpcProvider("https://ethereum-sepolia.publicnode.com");
const zk = new ZkX509Client(provider, { network: "sepolia" });
// your registry (deploy via the factory); 0x3cF6… is zkScatter's example
const REGISTRY = "0x3cF6A96f1970053ffDf957074F988aD53D13ada3";
// gating
await zk.isVerified(REGISTRY, user); // boolean
await zk.getVerificationStatus(REGISTRY, user); // { verified, verifiedUntil, verifiedUntilTimestamp }
// discovery (batched via Multicall3)
await zk.listRegistries(); // address[]
await zk.getRegistryInfo(REGISTRY); // name, creator, policy params
await zk.getRegistryPolicy(REGISTRY); // paused, constraints, CA rootAPI
isVerified(registry, wallet)booleanverifiedUntil(registry, wallet)Date | nullgetVerificationStatus(registry, wallet){ verified, verifiedUntil, verifiedUntilTimestamp } — batchedlistRegistries(factory?)string[]getRegistryInfo(registry, factory?)name, creator, policy paramsgetRegistryPolicy(registry)paused, constraints, CA root — batchedBatched reads use Multicall3 (one eth_call) with an automatic fallback to individual calls.
CLI
check exits 0 when verified and 2 when not — handy in scripts/CI.
bash
# one-off, no install
npx zk-x509-sdk check 0xabc...def
# check against a named registry / network
zk-x509 check 0xabc...def --service relayers --network sepolia
# discover + inspect
zk-x509 registries
zk-x509 info 0x3cF6A96f1970053ffDf957074F988aD53D13ada3