@parlays-live/taker ships as TypeScript source inside the parlays.live pnpm workspace (packages/taker), with the economic core in packages/sdk. Two ways to consume it:
pnpm workspace
Vendored package
If your app lives in (or joins) the parlays.live monorepo, add it as a workspace dependency:
Copy packages/taker and packages/sdk into your repo and register both in your pnpm-workspace.yaml:
pnpm-workspace.yaml
packages: - "packages/*"
Then depend on @parlays-live/taker with workspace:* as above. The package’s main points at ./src/index.ts, so your bundler (Vite, Next, etc.) compiles it alongside your app; no build step needed.
Peer dependencies for the React entry point: react >= 18, wagmi >= 2, viem >= 2, @tanstack/react-query >= 5. All of them are optional if you only use the headless core.
createTakerClient binds the SDK to one deployment: a relayer, an escrow, a collateral token, and a chain. Nothing reads globals, so one bundle can serve any network.
parlays.live testnet
Dev env (HL testnet pricing)
The shared public stack: contracts on HyperEVM testnet (chain 998), priced from HL mainnet HIP-4 markets (that is where HIP-4 lives).
All money amounts in the SDK are raw bigint USDC with 6 decimals. Use the re-exported parseUsdc("25") and formatUsdc(raw) helpers; never do float math on stakes or payouts.
Wrap your tree once, inside your existing wagmi and react-query providers:
src/main.tsx
import {WagmiProvider} from "wagmi";import {QueryClient, QueryClientProvider} from "@tanstack/react-query";import {ParlayProvider} from "@parlays-live/taker/react";import {wagmiConfig} from "./wagmi";import {taker} from "./lib/taker";import App from "./App";const queryClient = new QueryClient();<WagmiProvider config={wagmiConfig}> <QueryClientProvider client={queryClient}> <ParlayProvider client={taker}> <App /> </ParlayProvider> </QueryClientProvider></WagmiProvider>;
That is the whole integration. status walks through approving -> quoting -> signing -> submitting -> done, and the taker never pays gas (the one exception: a first-time USDC approve transaction if the escrow has no allowance yet).