@pear-protocol/hyperliquid-sdk 0.0.46 → 0.0.47-alpha

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.
@@ -27,6 +27,7 @@ export interface CreatePositionRequestInput {
27
27
  twapDuration?: number;
28
28
  twapIntervalSeconds?: number;
29
29
  randomizeExecution?: boolean;
30
+ referralCode?: string;
30
31
  ladderConfig?: LadderConfigInput;
31
32
  takeProfit?: TpSlThresholdInput | null;
32
33
  stopLoss?: TpSlThresholdInput | null;
@@ -73,6 +74,7 @@ export interface ClosePositionRequestInput {
73
74
  twapDuration?: number;
74
75
  twapIntervalSeconds?: number;
75
76
  randomizeExecution?: boolean;
77
+ referralCode?: string;
76
78
  }
77
79
  export interface ClosePositionResponseDto {
78
80
  orderId: string;
@@ -97,6 +99,7 @@ export interface AdjustPositionRequestInput {
97
99
  adjustmentSize: number;
98
100
  executionType: AdjustExecutionType;
99
101
  limitRatio?: number;
102
+ referralCode?: string;
100
103
  }
101
104
  export interface AdjustPositionResponseDto {
102
105
  orderId: string;
@@ -7,6 +7,5 @@ export declare const useWebData: () => {
7
7
  perpsAtOpenInterestCap: string[] | undefined;
8
8
  marketDataBySymbol: Record<string, AssetMarketData>;
9
9
  isConnected: boolean;
10
- connectionStatus: import("react-use-websocket").ReadyState;
11
10
  error: string | null;
12
11
  };
@@ -1,10 +1,8 @@
1
- import { ReadyState } from 'react-use-websocket';
2
1
  export interface UseHyperliquidNativeWebSocketProps {
3
2
  address: string | null;
4
3
  tokens?: string[];
5
4
  }
6
5
  export interface UseHyperliquidNativeWebSocketReturn {
7
- connectionStatus: ReadyState;
8
6
  isConnected: boolean;
9
7
  lastError: string | null;
10
8
  }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import React, { ReactNode } from 'react';
2
- import * as react_use_websocket from 'react-use-websocket';
3
- import { ReadyState } from 'react-use-websocket';
4
2
 
5
3
  interface ApiErrorResponse {
6
4
  statusCode: number;
@@ -589,10 +587,8 @@ interface PearHyperliquidContextType {
589
587
  wsUrl: string;
590
588
  address: string | null;
591
589
  setAddress: (address: string | null) => void;
592
- connectionStatus: ReadyState;
593
590
  isConnected: boolean;
594
591
  lastError: string | null;
595
- nativeConnectionStatus: ReadyState;
596
592
  nativeIsConnected: boolean;
597
593
  nativeLastError: string | null;
598
594
  authStatus: AuthStatus;
@@ -719,7 +715,6 @@ declare const useWebData: () => {
719
715
  perpsAtOpenInterestCap: string[] | undefined;
720
716
  marketDataBySymbol: Record<string, AssetMarketData>;
721
717
  isConnected: boolean;
722
- connectionStatus: react_use_websocket.ReadyState;
723
718
  error: string | null;
724
719
  };
725
720
 
@@ -886,6 +881,7 @@ interface CreatePositionRequestInput {
886
881
  twapDuration?: number;
887
882
  twapIntervalSeconds?: number;
888
883
  randomizeExecution?: boolean;
884
+ referralCode?: string;
889
885
  ladderConfig?: LadderConfigInput;
890
886
  takeProfit?: TpSlThresholdInput | null;
891
887
  stopLoss?: TpSlThresholdInput | null;
@@ -932,6 +928,7 @@ interface ClosePositionRequestInput {
932
928
  twapDuration?: number;
933
929
  twapIntervalSeconds?: number;
934
930
  randomizeExecution?: boolean;
931
+ referralCode?: string;
935
932
  }
936
933
  interface ClosePositionResponseDto {
937
934
  orderId: string;
@@ -956,6 +953,7 @@ interface AdjustPositionRequestInput {
956
953
  adjustmentSize: number;
957
954
  executionType: AdjustExecutionType;
958
955
  limitRatio?: number;
956
+ referralCode?: string;
959
957
  }
960
958
  interface AdjustPositionResponseDto {
961
959
  orderId: string;
@@ -1078,7 +1076,6 @@ interface UseHyperliquidWebSocketProps {
1078
1076
  address: string | null;
1079
1077
  }
1080
1078
  declare const useHyperliquidWebSocket: ({ wsUrl, address }: UseHyperliquidWebSocketProps) => {
1081
- connectionStatus: ReadyState;
1082
1079
  isConnected: boolean;
1083
1080
  lastError: string | null;
1084
1081
  };
@@ -1088,7 +1085,6 @@ interface UseHyperliquidNativeWebSocketProps {
1088
1085
  tokens?: string[];
1089
1086
  }
1090
1087
  interface UseHyperliquidNativeWebSocketReturn {
1091
- connectionStatus: ReadyState;
1092
1088
  isConnected: boolean;
1093
1089
  lastError: string | null;
1094
1090
  }