@outcome.xyz/hip4 on npm. Tags and full diffs live on GitHub.
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 theuserNonFundingLedgerUpdateschannel (deposits, withdrawals, transfers), returned newest-first.participantsCountoncheckRewardsresults - total distinct participants for the epoch, independent of thewalletfilter. See Liquidity Rewards.- Exported
HYPE_USDC_SPOT_INDEX_MAINNET/HYPE_USDC_SPOT_INDEX_TESTNETconstants andHLLedgerUpdate,HLLedgerDelta,HLWebData3,HLClearinghouseState,HLFrontendOrdertypes from the root entry point.
Added
liquidityRewardsmodule - season-scoped liquidity-reward checks, starting withs1(World Cup 2026). See Liquidity Rewards.checkEligibility({ subject })- eligible team and match books per scoring daycheckRewards({ wallet, date })- per-wallet reward scoresLIQUIDITY_REWARDS_CONFIG,LiquidityRewardsError, and typed results exported from the main entry point
quoteTokenon outcomes -HLOutcomeandHLWsOutcomeSpeccarry an optionalquoteTokensymbol. The field is optional on the wire; SDK fetch helpers (outcomeMeta, settled-outcome lookups, and WebSocketoutcomeCreatedupdates) default it to"USDH"when absent.
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/precisionfor 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