diff --git a/README.md b/README.md index fafeff7f..4cfc21c3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ -
-
-
- Blazing fast TypeScript SDK for Hyperliquid. Try the documentation.
-
Blazing fast TypeScript SDK for Hyperliquid. Try the docs.
@@ -17,10 +12,10 @@
## Features
- **Typed.** Source code is 100% TypeScript with comprehensive type safety.
-- **Tested.** Extensive test coverage with both offline and online test suites.
- **Minimal dependencies.** A few small, trusted dependencies keep the bundle lean.
- **Cross-environment support.** Compatible with Bun, Node.js, React Native, and all major JavaScript runtimes.
-- **Easy integration.** Works seamlessly with [viem](https://github.com/wevm/viem) accounts (local private keys or JSON-RPC browser wallets).
+- **Easy integration.** Works seamlessly with [viem](https://github.com/wevm/viem) accounts, local private keys or JSON-RPC browser wallets.
+- **Tested.** Offline and online test suites run in CI.
## Installation
@@ -48,7 +43,7 @@ pnpm add @bloxwap/hyperliquid
yarn add @bloxwap/hyperliquid
```
-> React Native needs polyfills for the `fastAssetCtxs` subscription and for versions below 0.86 — see the
+> React Native needs polyfills for the `fastAssetCtxs` subscription and for versions below 0.86. See the
> [documentation](https://bloxwap.github.io/hyperliquid/docs/).
## Release status
@@ -60,14 +55,14 @@ yarn add @bloxwap/hyperliquid
### Read
```ts
-// 1. Import module
+// Import module
import { HttpTransport, InfoClient } from "@bloxwap/hyperliquid";
-// 2. Set up client with transport
+// Set up client with transport
const transport = new HttpTransport();
const info = new InfoClient({ transport });
-// 3. Query data
+// Query data
// Retrieve mids for all coins
const mids = await info.allMids();
@@ -82,17 +77,17 @@ const book = await info.l2Book({ coin: "BTC" });
### Trade
```ts
-// 1. Import modules
+// Import modules
import { ExchangeClient, HttpTransport } from "@bloxwap/hyperliquid";
import { privateKeyToAccount } from "viem/accounts";
-// 2. Set up client with wallet and transport
+// Set up client with wallet and transport
const wallet = privateKeyToAccount("0x...");
const transport = new HttpTransport();
const exchange = new ExchangeClient({ transport, wallet });
-// 3. Execute an action
+// Execute an action
// Place an order
const result = await exchange.order({
@@ -123,14 +118,14 @@ in the [low-latency recipe](https://bloxwap.github.io/hyperliquid/docs/signing/#
### Subscribe
```ts
-// 1. Import module
+// Import module
import { SubscriptionClient, WebSocketTransport } from "@bloxwap/hyperliquid";
-// 2. Set up client with transport
+// Set up client with transport
const transport = new WebSocketTransport();
const subs = new SubscriptionClient({ transport });
-// 3. Subscribe to events
+// Subscribe to events
// Subscribe to mids for all coins
await subs.allMids((data) => {