Skip to content

Turnkey ExtensionsOne wallet. Every chain. One API.

Cross-chain signing, balances, swaps, perps and prediction markets over a Turnkey wallet — as a typed SDK and as a CLI.

Two entry points

ts
import {
  createSwarm,
  markets,
} from "@swarm-ai-labs/turnkey-extensions/runtime";

// Public market data — no wallet involved.
await markets.perps({ search: "ETH" });
await markets.funding({ minApr: 0.2 });

// Everything else, bound to one wallet and one budget.
const swarm = createSwarm({ identity, policy: { capUsd: 500 } });

await swarm.portfolio.holdings(); // the whole wallet, valued
await swarm.portfolio.positions(); // Hyperliquid + Binance + Polymarket + ADI
await swarm.perps.open({
  coin: "ETH",
  side: "buy",
  notionalUsd: 250,
  mode: "live",
});

Or the same thing without writing any code:

bash
swarm login --email you@example.com
swarm holdings
swarm positions
SWARM_BUDGET_USD=500 swarm market hyperliquid buy --coin ETH --notional 250 --confirm

What is covered

AreaChains and venues
Signing and sendingEVM (any chain id), Bitcoin, Solana, TRON, TON, Sui, NEAR
Balances and pricesIndexer-first reads with RPC fallback, CoinGecko merge, portfolio valuation
Swaps1Click (NEAR Intents), Uniswap v3, gas.zip, LI.FI, CoW limit orders
PerpsHyperliquid, Binance USD-M futures
Prediction marketsPolymarket, ADI PredictStreet
AIEnvy signals, 0G Compute inference with TEE attestation

Where to start

Writing code → SDK reference. Typing commands → CLI reference. Looking for one specific function → capabilities reference.

Released under the MIT License.