| Statements | Branches | Functions | Lines |
|---|---|---|---|
Check @cowprotocol/cow-sdk to learn how to trade on the CoW Protocol (get quote, verify amounts, sign and send order)
This is a TypeScript monorepo containing the complete CoW Protocol SDK ecosystem. The repository is organized into multiple packages that provide different levels of abstraction and functionality for interacting with CoW Protocol.
The project uses modern tooling for efficient development and publishing:
- ποΈ Build System: Turbo for fast, incremental builds and task orchestration
- π¦ Package Manager: pnpm v10.8+ with workspaces for efficient dependency management
- π§ TypeScript: Shared TypeScript configuration across all packages
- π§ͺ Testing: Jest for unit testing with coverage reporting
- π Linting: ESLint v9+ with TypeScript support and unused imports detection
- π¨ Formatting: Prettier for consistent code formatting
- π¦ Publishing: Release Please for automated versioning and publishing
- β‘ Development: Node.js 22+ required
@cowprotocol/cow-sdk- Complete package that re-exports all other packages for easy consumption
@cowprotocol/sdk-trading- High-level trading SDK with built-in quote fetching, order signing, and posting@cowprotocol/sdk-order-book- Order book API client for retrieving orders, trades, and posting orders@cowprotocol/sdk-order-signing- Cryptographic utilities for signing orders and cancellations
@cowprotocol/sdk-bridging- Cross-chain token transfers and bridging functionality@cowprotocol/sdk-composable- Programmatic orders (TWAP, conditional orders, etc.)@cowprotocol/sdk-cow-shed- Account abstraction with smart contract capabilities
@cowprotocol/sdk-viem-adapter- Viem blockchain library adapter@cowprotocol/sdk-ethers-v6-adapter- Ethers.js v6 adapter@cowprotocol/sdk-ethers-v5-adapter- Ethers.js v5 adapter
@cowprotocol/sdk-app-data- AppData schema definitions and metadata handling@cowprotocol/sdk-config- Configuration constants and chain settings@cowprotocol/sdk-common- Common utilities, types, and shared functionality@cowprotocol/sdk-contracts-ts- TypeScript contract bindings and ABI definitions@cowprotocol/sdk-subgraph- GraphQL client for CoW Protocol subgraph data@cowprotocol/sdk-weiroll- Weiroll integration utilities
@cow-sdk/typescript-config- Shared TypeScript configuration
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Run linting
pnpm lint
# Format code
pnpm format
# Type checking
pnpm typecheck
# Clean build artifacts
pnpm cleanWe welcome contributions to the CoW Protocol SDK! Here's how to get started:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/cow-sdk.git cd cow-sdk - Follow the Development Workflow above to set up your environment
- Make your changes following our Contributor Guidelines
- Create a pull request short after creating it, you will be asked to sign the CLA (Contributor License Agreement). A comment with instructions will be added to the PR.
- Check existing issues for similar problems
- Join our Discord for community support
- Read the CoW Protocol documentation