Tools

SDK

@cowlprotocol/sdk is the TypeScript library the app and CLI are built on. Everything you can do in the terminal, you can script — shield, trade, read a shielded balance with your view key, disclose, and send.

Preview
The SDK surface below is the target API. Shielded-pool calls are testnet-first and light up as the protocol contracts deploy.

Install

npm install @cowlprotocol/sdk

Create a client

import { CowlClient } from "@cowlprotocol/sdk";

const cowl = new CowlClient({
  network: "arbitrum-sepolia",   // testnet-first default
  account: "0x…",                // or pass a signer
});

Shield & trade

// move funds into the shielded pool
await cowl.shield({ asset: "USDG", amount: "5000" });

// trade privately — size and direction stay off the public tape
await cowl.trade({ side: "buy", market: "AAPLx", size: "1200" });

// read your shielded portfolio with your viewing key
const book = await cowl.balance();

Disclose & send

// mint a scoped, read-only view key for an auditor
const key = await cowl.disclose({ scope: "2026-Q1", to: "auditor.eth" });

// send to any address — a stealth address works
await cowl.send({ asset: "USDG", amount: "100", to: "0x…" });

Stealth addresses & view keys

const stealth = cowl.stealth.generate();     // one-time receive address
const meta = cowl.stealth.metaAddress();     // shareable meta-address
const viewKey = cowl.viewKey.public();        // hand to an auditor

Framework friendly

The SDK is ESM, fully typed, and wraps viem, so it drops into any Node or browser app and plays well with wagmi and React.