@lifi/perps-sdk-provider-hyperliquid 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -7,14 +7,18 @@
|
|
|
7
7
|
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
<h1 align="center"><code>@lifi/perps-sdk-provider-hyperliquid</code></h1>
|
|
11
11
|
|
|
12
|
-
Hyperliquid provider plugin for [
|
|
12
|
+
Hyperliquid provider plugin for the [LI.FI Perps SDK](https://public-perps-docs.mintlify.app/). Register it on a `PerpsClient` to trade Hyperliquid perpetuals through the SDK's unified interface.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
17
|
pnpm add @lifi/perps-sdk @lifi/perps-sdk-provider-hyperliquid
|
|
16
18
|
```
|
|
17
19
|
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
18
22
|
```ts
|
|
19
23
|
import { createPerpsClient } from '@lifi/perps-sdk'
|
|
20
24
|
import { hyperliquidProvider } from '@lifi/perps-sdk-provider-hyperliquid'
|
|
@@ -26,10 +30,15 @@ const client = createPerpsClient({
|
|
|
26
30
|
})
|
|
27
31
|
```
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
## Agent key storage
|
|
34
|
+
|
|
35
|
+
Setup registers an agent keypair whose private key signs orders locally, so trading needs no per-order wallet popups. The agent key authorizes trading only — it cannot withdraw funds.
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
The keypair is persisted through a `StorageAdapter`. The default adapter encrypts values with AES-GCM before writing to browser `localStorage`, holding the master key as a non-extractable `CryptoKey` handle in IndexedDB, so key material is never stored as plaintext. Pass your own `StorageAdapter` to the `HyperliquidAgentStore` constructor to use a different backend — a custom adapter bypasses this encryption and is responsible for protecting the key at rest.
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
## Documentation
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
- [`@lifi/perps-sdk` README](https://www.npmjs.com/package/@lifi/perps-sdk) — client setup, options, and the WebSocket API
|
|
42
|
+
- [Full documentation](https://public-perps-docs.mintlify.app/) — the exported surface and the agent signing model
|
|
43
|
+
- [API reference](https://public-perps-docs.mintlify.app/api-reference)
|
|
44
|
+
- [Source and issues](https://github.com/lifinance/perps-sdk)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/perps-sdk-provider-hyperliquid",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Hyperliquid provider plugin for @lifi/perps-sdk",
|
|
5
5
|
"homepage": "https://github.com/lifinance/perps-sdk",
|
|
6
6
|
"bugs": {
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"big.js": "^7.0.1",
|
|
50
50
|
"viem": "^2.48.8",
|
|
51
|
-
"@lifi/perps-types": "^2.0.
|
|
51
|
+
"@lifi/perps-types": "^2.0.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@lifi/perps-sdk": "^3.
|
|
54
|
+
"@lifi/perps-sdk": "^3.1.1"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|