@pear-protocol/hyperliquid-sdk 0.0.46 → 0.0.47
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/dist/clients/positions.d.ts +3 -0
- package/dist/hooks/useMarketData.d.ts +3 -1
- package/dist/hooks/useWebData.d.ts +0 -1
- package/dist/hyperliquid-websocket.d.ts +0 -2
- package/dist/index.d.ts +14 -9
- package/dist/index.js +237 -2555
- package/dist/provider.d.ts +0 -3
- package/dist/types.d.ts +14 -1
- package/dist/websocket.d.ts +0 -2
- package/package.json +3 -5
package/dist/provider.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { ReadyState } from 'react-use-websocket';
|
|
3
2
|
import type { UserProfile } from './types';
|
|
4
3
|
import { AuthStatus } from './types';
|
|
5
4
|
import type { AgentWalletState } from './types';
|
|
@@ -8,10 +7,8 @@ export interface PearHyperliquidContextType {
|
|
|
8
7
|
wsUrl: string;
|
|
9
8
|
address: string | null;
|
|
10
9
|
setAddress: (address: string | null) => void;
|
|
11
|
-
connectionStatus: ReadyState;
|
|
12
10
|
isConnected: boolean;
|
|
13
11
|
lastError: string | null;
|
|
14
|
-
nativeConnectionStatus: ReadyState;
|
|
15
12
|
nativeIsConnected: boolean;
|
|
16
13
|
nativeLastError: string | null;
|
|
17
14
|
authStatus: AuthStatus;
|
package/dist/types.d.ts
CHANGED
|
@@ -48,10 +48,16 @@ export interface SyncFillsResponseDto {
|
|
|
48
48
|
* WebSocket connection states
|
|
49
49
|
*/
|
|
50
50
|
export type WebSocketConnectionState = 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
51
|
+
export declare enum ReadyState {
|
|
52
|
+
CONNECTING = 0,
|
|
53
|
+
OPEN = 1,
|
|
54
|
+
CLOSING = 2,
|
|
55
|
+
CLOSED = 3
|
|
56
|
+
}
|
|
51
57
|
/**
|
|
52
58
|
* WebSocket channels
|
|
53
59
|
*/
|
|
54
|
-
export type WebSocketChannel = 'trade-histories' | 'open-positions' | 'open-orders' | 'account-summary' | 'twap-details' | 'notifications' | 'market-data' | 'webData2' | 'allMids' | 'activeAssetData';
|
|
60
|
+
export type WebSocketChannel = 'trade-histories' | 'open-positions' | 'open-orders' | 'account-summary' | 'twap-details' | 'notifications' | 'market-data' | 'market-data-all' | 'webData2' | 'allMids' | 'activeAssetData';
|
|
55
61
|
/**
|
|
56
62
|
* WebSocket subscription message
|
|
57
63
|
*/
|
|
@@ -617,6 +623,7 @@ export interface ActiveAssetGroupItem {
|
|
|
617
623
|
shortAssets: PairAssetDto[];
|
|
618
624
|
openInterest: string;
|
|
619
625
|
volume: string;
|
|
626
|
+
netFunding?: string;
|
|
620
627
|
ratio?: string;
|
|
621
628
|
prevRatio?: string;
|
|
622
629
|
change24h?: string;
|
|
@@ -631,6 +638,12 @@ export interface ActiveAssetsResponse {
|
|
|
631
638
|
highlighted: ActiveAssetGroupItem[];
|
|
632
639
|
watchlist: ActiveAssetGroupItem[];
|
|
633
640
|
}
|
|
641
|
+
export interface ActiveAssetsAllResponse {
|
|
642
|
+
active: ActiveAssetGroupItem[];
|
|
643
|
+
all: ActiveAssetGroupItem[];
|
|
644
|
+
highlighted: ActiveAssetGroupItem[];
|
|
645
|
+
watchlist: ActiveAssetGroupItem[];
|
|
646
|
+
}
|
|
634
647
|
/**
|
|
635
648
|
* Candle interval options
|
|
636
649
|
*/
|
package/dist/websocket.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ReadyState } from 'react-use-websocket';
|
|
2
1
|
export interface UseHyperliquidWebSocketProps {
|
|
3
2
|
wsUrl: string;
|
|
4
3
|
address: string | null;
|
|
5
4
|
}
|
|
6
5
|
export declare const useHyperliquidWebSocket: ({ wsUrl, address }: UseHyperliquidWebSocketProps) => {
|
|
7
|
-
connectionStatus: ReadyState;
|
|
8
6
|
isConnected: boolean;
|
|
9
7
|
lastError: string | null;
|
|
10
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/hyperliquid-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "React SDK for Pear Protocol Hyperliquid API integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"clean": "rimraf dist"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"axios": "^1.6.0"
|
|
28
|
-
"react-use-websocket": "^4.8.1"
|
|
27
|
+
"axios": "^1.6.0"
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
|
31
30
|
"react": "^18.0.0",
|
|
@@ -39,8 +38,7 @@
|
|
|
39
38
|
"@types/react": "^18.0.0",
|
|
40
39
|
"concurrently": "^9.2.1",
|
|
41
40
|
"esbuild": "^0.25.9",
|
|
42
|
-
|
|
43
|
-
"react-dom": "^18.3.1",
|
|
41
|
+
|
|
44
42
|
"rimraf": "^5.0.0",
|
|
45
43
|
"rollup": "^3.0.0",
|
|
46
44
|
"rollup-plugin-dts": "^6.0.0",
|