For integrators
Coven is a package, not a widget. You build the interface; the SDK handles routing, fees, discovery and bridging.
Set up an instance
Section titled “Set up an instance”One instance per app, created once and reused:
import { createCoven } from '@covennetwork/sdk'
export const coven = createCoven({ integrator: { address: '0xYourFeeWallet', feeBps: 25 }, // 0.25%})Every swap through this instance pays your fee to your address, straight from the router. There is nothing to claim later and no account to open. See fees for how it interacts with Coven’s own fee.
The parts you will use
Section titled “The parts you will use”quotefor pricing, including your fee.swapfor execution, which handles approval, simulation and sending.tokensfor a token list with lookalike warnings.pools.watchfor new pairs.bridgefor moving USDC in and out of Arc.
The SDK reference lists every option.
Wallets
Section titled “Wallets”The SDK takes a viem WalletClient, so every wagmi connector works: browser extensions, WalletConnect, Coinbase Wallet, Safe and embedded wallets.
const { data: walletClient } = useWalletClient()
await coven.swap({ wallet: walletClient, tokenIn, tokenOut, amountIn })Things worth getting right
Section titled “Things worth getting right”- Leave gas behind. Gas on Arc is USDC. A “max” button that spends the whole balance leaves the user unable to send anything afterwards.
- Show the lookalike flag. Arc has tokens impersonating USDC, including one on CoinGecko’s own list.
- Let people paste an address. The token list will not have every new launch.
- Surface errors by code.
CovenErrorcarries acode, which maps cleanly to messages in your interface. See errors. - Quote as they type, with a delay. Roughly 300ms of debounce keeps quoting responsive without hammering the RPC.
Node and backends
Section titled “Node and backends”The SDK has no browser dependencies, so bots, backends and scripts can use the same package. Pass a viem account-based wallet client instead of a browser one.
Reference implementation
Section titled “Reference implementation”The Coven app itself is built on this package and is open source. It covers connecting, quoting, swapping, the new pairs feed and bridging in a few hundred lines.