Skip to content

1.13.0: mempool channel for pending Hyperliquid transactions - #21

Merged
0xFantomMenace merged 3 commits into
mainfrom
feat/mempool-channel
Oct 8, 2026
Merged

0xFantomMenace merged 3 commits into
mainfrom
feat/mempool-channel

Conversation

@0xFantomMenace

Copy link
Copy Markdown
Member

Adds the mempool WebSocket channel: signed Hyperliquid transactions as our Hyperliquid node receives them, before they are included in a block, for every Hyperliquid product.

  • ws::MEMPOOL_CHANNEL, STREAM_WS_URL and DEFAULT_WS_URL; ServerMsg::Mempool with typed MempoolItem.
  • MempoolItem::action keeps the exact bytes the server sent (Box<RawValue>), so the signer can be recovered; action_value() parses it for inspection. serde_json's raw_value feature is enabled.
  • Capability gains optional ws_endpoint and plans, set only on mempool.
  • ServerMsg gained a variant; an exhaustive match on it needs a new arm.

…(1.13.0)

- ws::MEMPOOL_CHANNEL, served only at ws::STREAM_WS_URL; the symbol is
  optional on it. ws::DEFAULT_WS_URL names the default endpoint.
- MempoolItem and MempoolSignature, decoded with ServerMsg::mempool_items()
  or MempoolItem::decode().
- Capability::ws_endpoint and Capability::plans.
- Version 1.13.0.
- MempoolItem::action is a Box<RawValue> holding the action as sent, key
  order included; action_value() parses it for inspection.
- Mempool frames arrive as ServerMsg::Mempool, read from the frame text by
  ServerMsg::from_text(), which the client now uses for every message.
- serde_json's raw_value feature is enabled.
- A capability row without ws_endpoint is served at the default endpoint,
  wss://api.0xarchive.io/ws; without plans, on every plan.
- The unfiltered stream carries the pending transactions our node receives,
  and pending transactions are never stored.
- The parsed action may not keep the original key order; the raw action does.
@0xFantomMenace
0xFantomMenace merged commit 47a517a into main Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant