@parlays-live/taker is the embeddable taker SDK for parlays.live, an on-chain parlay venue built on Hyperliquid HIP-4 outcome markets. It gives any React + wagmi host app the full taker lifecycle with no framework or styling assumptions:
  • Quote a set of legs against live Hyperliquid mids (the client never supplies odds)
  • Sign the maker-signed order with the taker’s wallet (EIP-712)
  • Submit gaslessly through the relayer (the relayer pays gas)
  • Read positions from the escrow, with selectors for profile and market surfaces
  • Cash out a live parlay early at a quoter-signed buy-back price
The SDK is headless: hooks own the state machines, your app renders whatever UI it wants, a right-side drawer, a bottom sheet, a full page.

Quickstart

Config, provider mount, and a first quote in about 30 lines.

Combine button + drawer

The flagship guide: add a parlay slip drawer to an existing trading UI.

How parlays work

Escrow model, gasless flow, settlement.

API reference

Every export, with exact signatures and field tables.

Architecture

 Your app (React + wagmi)
   |  useParlaySlip / useSubmitParlay / useParlayPositions / useCashOut
   v
 @parlays-live/taker  (headless client + hooks; economics re-exported from @parlays-live/sdk)
   |  POST /quote  /submit  /cashout      GET /margin  /health
   v
 parlays.live relayer (Cloudflare Worker)
   |  prices from live Hyperliquid mids, correlation-aware
   |  signs the maker side with the vault's quoter key, pays gas
   v
 ParlayEscrow + MakerVault on HyperEVM (chain 998 testnet / 999 mainnet)
   ^
   |  resolution: optimistic oracle mirrored from HL by a keeper
 Hyperliquid HIP-4 (pricing + resolution source of truth)
The taker signs an EIP-712 order and the relayer submits both signatures in one transaction. The bettor is the taker (accepts the quoted odds); the pooled MakerVault is the maker (quotes and backs every bet).

What your app does NOT have to build

Pricing

The relayer prices every leg from live HL mids and computes payout, collateral, and combined odds. Clients only say which legs.

Correlation

A one-factor Gaussian copula shortens odds on co-moving legs and refuses impossible combos. The full breakdown is returned in every quote.

Margin

Vault capacity, utilization caps, per-market exposure limits, and optional cross-margin secured credit are enforced server-side.

Settlement

A keeper mirrors HL outcomes onto an optimistic oracle and settles automatically. Winners are paid from escrow; no host code involved.
Your app owns exactly two host concerns, both injected via callbacks: analytics (onEvent) and an optional wallet-network guard (ensureChain).

Package layout

Entry pointContents
@parlays-live/takerHeadless core: createTakerClient, slip helpers, position reads, plus re-exported economics (formatUsdc, parseUsdc, loadCards, market types)
@parlays-live/taker/reactReact bindings: ParlayProvider and the five hooks (wagmi v2 + react-query peer deps)
React, wagmi, and react-query are optional peer dependencies: a non-React host (script, server, bot) can use the core entry point alone with a viem PublicClient.