Quickstart · ~5 minutes

Install, connect, ship your first confidential call.

Five steps: connect a wallet, fund it with testnet ETH, install the SDK, deploy your first manager clone, pick your encryptor flavour.

1. Connect wallet

Click Connect (top right). Your wallet is now your API key.

The TopNav connect-wallet pill mounts a Privy auth modal, choose Sepolia. The docs site provider tree (PrivyProvider WagmiProvider QueryClientProvider) makes every hook on every page wallet-aware automatically. Your own app ships an equivalent tree; the SDK only ever consumes publicClient + walletClient.

2. Get testnet ETH

Fund the wallet for the runner.

Sepolia ETH is free. The interactive Runner in Step 4 broadcasts real txs, they need gas. Two faucets that work today; either is fine for the ~0.005 ETH needed for a vesting deploy. Google Cloud's Web3 faucet (cloud.google.com/…/sepolia) drips 0.05 ETH per day. Alchemy's Sepolia faucet (alchemy.com/faucets/ethereum-sepolia) drips 0.5 ETH per request with an Alchemy account. Pick one, paste the address from the wallet pill, wait ~30 s.

3. Install

Add the SDK alongside viem. @tokenops/sdk leaves viem as a peer dep. Add wagmi only if you also want the React hooks under @tokenops/sdk/<product>/react.

pnpm add @tokenops/sdk viem

4. First call

Deploy your manager clone. The confidential vesting factory hands you a per-user clone in one call — no factory deployment, no boilerplate. Click Run below to do it live.

lib/vesting.ts
ts
import { createPublicClient, createWalletClient, custom, http } from "viem";
import { sepolia } from "viem/chains";
import { createConfidentialVestingFactoryClient } from "@tokenops/sdk/fhe-vesting";

const publicClient = createPublicClient({ chain: sepolia, transport: http() });
const walletClient = createWalletClient({ chain: sepolia, transport: custom(window.ethereum) });

const factory = createConfidentialVestingFactoryClient({ publicClient, walletClient });

// Deploy your own manager clone. One call.
const { hash, manager } = await factory.createManager({
  token: "0xYourErc7984Token",
  userSalt: "0x" + "01".padStart(64, "0"),
});
Interactive · live Sepolia tx
Loading editor…
Edit any input above, then press to run.
Console0 lines
No output yet. Run the snippet to see logs stream in.
No factory deployment helper, by design
The SDK targets DEPLOYED factories only. Pre-baked addresses for Sepolia + mainnet live in DEPLOYED_ADDRESSES, see Resources.

5. Pick your flow

Every encrypted write needs an encryptor. The SDK ships three flavours: RelayerWeb (browser), createSepoliaEncryptor (Node), createMockEncryptor (local Anvil). Pick by host, then head to a product hub or story.

lib/encryptor.ts
ts
import { createSepoliaEncryptorWeb } from "@tokenops/sdk/fhe";

const encryptor = await createSepoliaEncryptorWeb({
  publicClient,
  walletClient,
});
// pass into manager / airdrop / disperse clients
Pick your encryptor in 30 seconds
Browser → createSepoliaEncryptorWeb. Node → createSepoliaEncryptor with a try / finally encryptor.terminate(). Local Anvil → createMockEncryptor. See Concepts › The encryptor source pattern for the full matrix.

Where to go next

Three paths, depending on your shape.

Tip: every Story has live ⌘↵ editors — your wallet signs real txs against Sepolia.