Skip to main content
All releases of @outcome.xyz/hip4 on npm. Tags and full diffs live on GitHub.
July 6, 2026

Fixed

  • Shared WebSocket subscriptions are now reference-counted. When several consumers subscribe with the same payload (e.g. multiple createPriceFeed instances on the allMids feed), they share one underlying wire subscription. Previously the first consumer to unsubscribe tore down the stream for every remaining subscriber - and the reconnect path never restored it. The wire unsubscribe now fires only when the last subscriber leaves. See Real-time data.
  • The returned unsubscribe function is idempotent. Calling it more than once is safe - a second call is a no-op and does not affect other subscribers (React Strict Mode invokes effect cleanups twice).
Full diff
June 25, 2026

Added

  • wallet.sellHype(amount) - sell HYPE on the HYPE/USDC spot market. Size is floored to HYPE’s 2 decimals (ROUND_DOWN) so a sell never exceeds your balance. See Wallet.
  • wallet.agentSetAbstraction("u" | "p" | "i") - switch the master account’s abstraction mode ("u" unified account, "p" portfolio margin, "i" disabled) via the approved agent key. See Wallet.
  • client.fetchUserNonFundingLedgerUpdates(user) - REST counterpart of the userNonFundingLedgerUpdates channel (deposits, withdrawals, transfers), returned newest-first.
  • participantsCount on checkRewards results - total distinct participants for the epoch, independent of the wallet filter. See Liquidity Rewards.
  • Exported HYPE_USDC_SPOT_INDEX_MAINNET / HYPE_USDC_SPOT_INDEX_TESTNET constants and HLLedgerUpdate, HLLedgerDelta, HLWebData3, HLClearinghouseState, HLFrontendOrder types from the root entry point.
Full diff
June 11, 2026

Added

  • liquidityRewards module - season-scoped liquidity-reward checks, starting with s1 (World Cup 2026). See Liquidity Rewards.
    • checkEligibility({ subject }) - eligible team and match books per scoring day
    • checkRewards({ wallet, date }) - per-wallet reward scores
    • LIQUIDITY_REWARDS_CONFIG, LiquidityRewardsError, and typed results exported from the main entry point
  • quoteToken on outcomes - HLOutcome and HLWsOutcomeSpec carry an optional quoteToken symbol. The field is optional on the wire; SDK fetch helpers (outcomeMeta, settled-outcome lookups, and WebSocket outcomeCreated updates) default it to "USDH" when absent.
Full diff
May 20, 2026
Initial public beta release

Added

  • createHIP4Adapter() - single entry point for HIP-4 prediction market access on Hyperliquid (events, market data, account state, trading, wallet, auth)
  • Typed sub-modules: events, marketData, account, trading, wallet, auth, ramp
  • WebSocket subscriptions for prices, order books, fills, and positions (return an unsubscribe function)
  • Internal L1 agent + EIP-712 signing - no external crypto dependencies
  • Decimal-precision math helpers under lib/precision for safe price/size arithmetic
  • Stream helpers: createPriceFeed, createPerpPriceFeed
  • Type-only entry point: import type { ... } from "@outcome.xyz/hip4/types"

Notes

  • Zero runtime dependencies
  • Node 18+ required