From f016ebe50e103183cedb20af02d6fa1b6b757b49 Mon Sep 17 00:00:00 2001 From: harbourlark Date: Fri, 27 Nov 2026 17:10:55 +0000 Subject: [PATCH 1/2] docs: add Open in StackBlitz starters to the README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3e2afb7..4af8321 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ Take a look at our dedicated [HyperLiquid API quickstart guides for major framew - [Installation](#installation) - [Frameworks & Quickstart Guides](#frameworks--quickstart-guides) + - [Try it in the browser](#try-it-in-the-browser) - [Documentation](#documentation) - [Issues & Discussion](#issues--discussion) - [Related Projects](#related-projects) @@ -108,6 +109,15 @@ Our complete Hyperliquid SDK supports all the major JavaScript runtimes. For max Refer to [runtime compatibility](https://sieblyio.github.io/docs/hyperliquid/compatibility.html) for a complete list of runtimes that we've actively tested, including setup guides. +### Try it in the browser + +- Node.js / JavaScript: [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/sieblyio/docs/tree/main/starters/hyperliquid/node?title=Hyperliquid%20Node.js%20%2F%20JavaScript%20starter) +- Node.js / TypeScript: [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/sieblyio/docs/tree/main/starters/hyperliquid/typescript?title=Hyperliquid%20Node.js%20%2F%20TypeScript%20starter) +- Vite (plain JavaScript): [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)]() +- React: [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/fork/github/sieblyio/docs/tree/main/starters/hyperliquid/react?title=Hyperliquid%20React%20starter) + +No account is needed. Keep API keys out of public sandboxes. + ## Documentation The [Hyperliquid SDK documentation](https://sieblyio.github.io/docs/hyperliquid/) page covers complete guidance on installation, client setup, public APIs (e.g. market data), private APIs (e.g. trading, order management), and WebSockets (subscriptions, WebSocket API, authentication, etc). From fef9507b445e26654c0c9d870122aaf304269cdc Mon Sep 17 00:00:00 2001 From: harbourlark Date: Sat, 28 Nov 2026 05:46:35 +0000 Subject: [PATCH 2/2] fix(actions): keep trigger fields in wire order for raw order actions submitRawL1Action reordered each order's a, b, p, s, r, t, c fields but kept the caller's key order inside t.trigger. The action hash is taken over msgpack, which keeps insertion order, so a raw trigger order written as { triggerPx, isMarket, tpsl } was signed over different bytes than the exchange hashes, and the recovered signer did not match. Order the trigger as isMarket, triggerPx, tpsl, as orderWire already does for submitOrder. --- src/lib/action-factory.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/action-factory.ts b/src/lib/action-factory.ts index 4008562..f3101ab 100644 --- a/src/lib/action-factory.ts +++ b/src/lib/action-factory.ts @@ -215,10 +215,13 @@ function normalizeExistingOrderWire(value: unknown): JsonObject { } normalized.t = { - trigger: { - ...trigger, - triggerPx: decimalToWire(triggerPx), - }, + trigger: orderObjectFields( + { + ...trigger, + triggerPx: decimalToWire(triggerPx), + }, + ['isMarket', 'triggerPx', 'tpsl'], + ), }; }