opentool 0.12.0 → 0.14.0
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/adapters/hyperliquid/browser.d.ts +102 -0
- package/dist/adapters/hyperliquid/browser.js +1930 -0
- package/dist/adapters/hyperliquid/browser.js.map +1 -0
- package/dist/adapters/hyperliquid/index.d.ts +4 -359
- package/dist/adapters/hyperliquid/index.js +7 -7
- package/dist/adapters/hyperliquid/index.js.map +1 -1
- package/dist/adapters/polymarket/index.d.ts +1 -1
- package/dist/exchange-XC9MHmxJ.d.ts +360 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/{types-BaTmu0gS.d.ts → types-DKohXZes.d.ts} +1 -1
- package/dist/wallet/browser.d.ts +1 -1
- package/dist/wallet/browser.js +3 -2
- package/dist/wallet/browser.js.map +1 -1
- package/dist/wallet/index.d.ts +2 -2
- package/package.json +5 -1
- package/templates/base/package.json +1 -1
|
@@ -1,365 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as WalletFullContext } from '../../types-DKohXZes.js';
|
|
2
2
|
import { StoreOptions, StoreResponse } from '../../store/index.js';
|
|
3
|
+
import { H as HyperliquidEnvironment, N as NonceSource, a as HyperliquidOrderIntent, b as HyperliquidGrouping, a3 as toApiDecimal, a4 as createL1ActionHash, a5 as splitSignature } from '../../exchange-XC9MHmxJ.js';
|
|
4
|
+
export { D as DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, c as HyperliquidAbstraction, d as HyperliquidAccountMode, e as HyperliquidApiError, f as HyperliquidBuilderApprovalError, g as HyperliquidBuilderFee, h as HyperliquidExchangeClient, i as HyperliquidExchangeResponse, j as HyperliquidGuardError, k as HyperliquidInfoClient, l as HyperliquidMarketIdentityInput, m as HyperliquidTermsError, n as HyperliquidTimeInForce, o as HyperliquidTriggerOptions, p as HyperliquidTriggerType, M as MarketIdentity, q as batchModifyHyperliquidOrders, r as buildHyperliquidMarketIdentity, s as cancelAllHyperliquidOrders, t as cancelHyperliquidOrders, u as cancelHyperliquidOrdersByCloid, v as cancelHyperliquidTwapOrder, w as computeHyperliquidMarketIocLimitPrice, x as createHyperliquidSubAccount, y as createMonotonicNonceFactory, z as fetchHyperliquidAssetCtxs, A as fetchHyperliquidFrontendOpenOrders, B as fetchHyperliquidHistoricalOrders, C as fetchHyperliquidMeta, F as fetchHyperliquidMetaAndAssetCtxs, G as fetchHyperliquidOpenOrders, I as fetchHyperliquidOrderStatus, J as fetchHyperliquidPreTransferCheck, K as fetchHyperliquidSpotAssetCtxs, L as fetchHyperliquidSpotClearinghouseState, O as fetchHyperliquidSpotMeta, P as fetchHyperliquidSpotMetaAndAssetCtxs, Q as fetchHyperliquidUserFills, R as fetchHyperliquidUserFillsByTime, S as fetchHyperliquidUserRateLimit, T as modifyHyperliquidOrder, U as placeHyperliquidTwapOrder, V as reserveHyperliquidRequestWeight, W as resolveHyperliquidAbstractionFromMode, X as scheduleHyperliquidCancel, Y as sendHyperliquidSpot, Z as setHyperliquidAccountAbstractionMode, _ as setHyperliquidDexAbstraction, $ as setHyperliquidPortfolioMargin, a0 as transferHyperliquidSubAccount, a1 as updateHyperliquidIsolatedMargin, a2 as updateHyperliquidLeverage } from '../../exchange-XC9MHmxJ.js';
|
|
3
5
|
import 'viem';
|
|
4
6
|
import 'viem/accounts';
|
|
5
7
|
|
|
6
|
-
type HyperliquidEnvironment = "mainnet" | "testnet";
|
|
7
|
-
type MarketIdentity = {
|
|
8
|
-
market_type: "perp" | "spot" | "dex";
|
|
9
|
-
venue: "hyperliquid";
|
|
10
|
-
environment: HyperliquidEnvironment;
|
|
11
|
-
base: string;
|
|
12
|
-
quote?: string | null;
|
|
13
|
-
dex?: string | null;
|
|
14
|
-
chain_id?: number | null;
|
|
15
|
-
pool_address?: string | null;
|
|
16
|
-
token0_address?: string | null;
|
|
17
|
-
token1_address?: string | null;
|
|
18
|
-
fee_tier?: number | null;
|
|
19
|
-
raw_symbol?: string | null;
|
|
20
|
-
canonical_symbol: string;
|
|
21
|
-
};
|
|
22
|
-
type HyperliquidMarketIdentityInput = {
|
|
23
|
-
environment: HyperliquidEnvironment;
|
|
24
|
-
symbol: string;
|
|
25
|
-
rawSymbol?: string | null;
|
|
26
|
-
isSpot?: boolean;
|
|
27
|
-
base?: string | null;
|
|
28
|
-
quote?: string | null;
|
|
29
|
-
};
|
|
30
|
-
declare function buildHyperliquidMarketIdentity(input: HyperliquidMarketIdentityInput): MarketIdentity | null;
|
|
31
|
-
type HyperliquidTimeInForce = "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket";
|
|
32
|
-
type HyperliquidGrouping = "na" | "normalTpsl" | "positionTpsl";
|
|
33
|
-
type HyperliquidTriggerType = "tp" | "sl";
|
|
34
|
-
type HyperliquidAbstraction = "unifiedAccount" | "portfolioMargin" | "disabled";
|
|
35
|
-
type HyperliquidAccountMode = "standard" | "unified" | "portfolio";
|
|
36
|
-
declare function resolveHyperliquidAbstractionFromMode(mode: HyperliquidAccountMode): HyperliquidAbstraction;
|
|
37
|
-
declare const DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS = 30;
|
|
38
|
-
declare function computeHyperliquidMarketIocLimitPrice(params: {
|
|
39
|
-
markPrice: number;
|
|
40
|
-
side: "buy" | "sell";
|
|
41
|
-
slippageBps?: number;
|
|
42
|
-
decimals?: number;
|
|
43
|
-
}): string;
|
|
44
|
-
interface HyperliquidTriggerOptions {
|
|
45
|
-
triggerPx: string | number | bigint;
|
|
46
|
-
isMarket?: boolean;
|
|
47
|
-
tpsl: HyperliquidTriggerType;
|
|
48
|
-
}
|
|
49
|
-
interface HyperliquidBuilderFee {
|
|
50
|
-
address: `0x${string}`;
|
|
51
|
-
/**
|
|
52
|
-
* Fee in tenths of basis points (10 = 1bp = 0.01%). Max defaults to 0.1% (100).
|
|
53
|
-
*/
|
|
54
|
-
fee: number;
|
|
55
|
-
}
|
|
56
|
-
interface HyperliquidOrderIntent {
|
|
57
|
-
symbol: string;
|
|
58
|
-
side: "buy" | "sell";
|
|
59
|
-
price: string | number | bigint;
|
|
60
|
-
size: string | number | bigint;
|
|
61
|
-
tif?: HyperliquidTimeInForce;
|
|
62
|
-
reduceOnly?: boolean;
|
|
63
|
-
clientId?: `0x${string}`;
|
|
64
|
-
trigger?: HyperliquidTriggerOptions;
|
|
65
|
-
}
|
|
66
|
-
type ExchangeOrderAction = {
|
|
67
|
-
type: "order";
|
|
68
|
-
orders: Array<{
|
|
69
|
-
a: number;
|
|
70
|
-
b: boolean;
|
|
71
|
-
p: string;
|
|
72
|
-
s: string;
|
|
73
|
-
r: boolean;
|
|
74
|
-
t: {
|
|
75
|
-
limit: {
|
|
76
|
-
tif: HyperliquidTimeInForce;
|
|
77
|
-
};
|
|
78
|
-
} | {
|
|
79
|
-
trigger: {
|
|
80
|
-
isMarket: boolean;
|
|
81
|
-
triggerPx: string;
|
|
82
|
-
tpsl: HyperliquidTriggerType;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
c?: `0x${string}`;
|
|
86
|
-
}>;
|
|
87
|
-
grouping: HyperliquidGrouping;
|
|
88
|
-
builder?: {
|
|
89
|
-
b: `0x${string}`;
|
|
90
|
-
f: number;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
type ExchangeSignature = {
|
|
94
|
-
r: `0x${string}`;
|
|
95
|
-
s: `0x${string}`;
|
|
96
|
-
v: 27 | 28;
|
|
97
|
-
};
|
|
98
|
-
type HyperliquidExchangeResponse<T = unknown> = {
|
|
99
|
-
status: string;
|
|
100
|
-
response?: {
|
|
101
|
-
type: string;
|
|
102
|
-
data?: T;
|
|
103
|
-
};
|
|
104
|
-
error?: string;
|
|
105
|
-
};
|
|
106
|
-
type NonceSource = () => number;
|
|
107
|
-
declare class HyperliquidApiError extends Error {
|
|
108
|
-
readonly response: unknown;
|
|
109
|
-
constructor(message: string, response: unknown);
|
|
110
|
-
}
|
|
111
|
-
declare class HyperliquidGuardError extends Error {
|
|
112
|
-
constructor(message: string);
|
|
113
|
-
}
|
|
114
|
-
declare class HyperliquidTermsError extends HyperliquidGuardError {
|
|
115
|
-
constructor(message?: string);
|
|
116
|
-
}
|
|
117
|
-
declare class HyperliquidBuilderApprovalError extends HyperliquidGuardError {
|
|
118
|
-
constructor(message?: string);
|
|
119
|
-
}
|
|
120
|
-
declare function createMonotonicNonceFactory(start?: number): NonceSource;
|
|
121
|
-
declare function toApiDecimal(value: string | number | bigint): string;
|
|
122
|
-
declare function splitSignature(signature: `0x${string}`): ExchangeSignature;
|
|
123
|
-
declare function createL1ActionHash(args: {
|
|
124
|
-
action: ExchangeOrderAction | Record<string, unknown>;
|
|
125
|
-
nonce: number;
|
|
126
|
-
vaultAddress?: `0x${string}` | undefined;
|
|
127
|
-
expiresAfter?: number | undefined;
|
|
128
|
-
}): `0x${string}`;
|
|
129
|
-
|
|
130
|
-
declare class HyperliquidInfoClient {
|
|
131
|
-
private readonly environment;
|
|
132
|
-
constructor(environment?: HyperliquidEnvironment);
|
|
133
|
-
meta(): Promise<any>;
|
|
134
|
-
metaAndAssetCtxs(): Promise<any>;
|
|
135
|
-
spotMeta(): Promise<any>;
|
|
136
|
-
spotMetaAndAssetCtxs(): Promise<any>;
|
|
137
|
-
assetCtxs(): Promise<any>;
|
|
138
|
-
spotAssetCtxs(): Promise<any>;
|
|
139
|
-
openOrders(user: `0x${string}`): Promise<any>;
|
|
140
|
-
frontendOpenOrders(user: `0x${string}`): Promise<any>;
|
|
141
|
-
orderStatus(user: `0x${string}`, oid: number | string): Promise<any>;
|
|
142
|
-
historicalOrders(user: `0x${string}`): Promise<any>;
|
|
143
|
-
userFills(user: `0x${string}`): Promise<any>;
|
|
144
|
-
userFillsByTime(user: `0x${string}`, startTime: number, endTime: number): Promise<any>;
|
|
145
|
-
userRateLimit(user: `0x${string}`): Promise<any>;
|
|
146
|
-
preTransferCheck(user: `0x${string}`, source: `0x${string}`): Promise<any>;
|
|
147
|
-
spotClearinghouseState(user: `0x${string}`): Promise<any>;
|
|
148
|
-
}
|
|
149
|
-
declare function fetchHyperliquidMeta(environment?: HyperliquidEnvironment): Promise<any>;
|
|
150
|
-
declare function fetchHyperliquidMetaAndAssetCtxs(environment?: HyperliquidEnvironment): Promise<any>;
|
|
151
|
-
declare function fetchHyperliquidSpotMeta(environment?: HyperliquidEnvironment): Promise<any>;
|
|
152
|
-
declare function fetchHyperliquidSpotMetaAndAssetCtxs(environment?: HyperliquidEnvironment): Promise<any>;
|
|
153
|
-
declare function fetchHyperliquidAssetCtxs(environment?: HyperliquidEnvironment): Promise<any>;
|
|
154
|
-
declare function fetchHyperliquidSpotAssetCtxs(environment?: HyperliquidEnvironment): Promise<any>;
|
|
155
|
-
declare function fetchHyperliquidOpenOrders(params: {
|
|
156
|
-
environment?: HyperliquidEnvironment;
|
|
157
|
-
user: `0x${string}`;
|
|
158
|
-
}): Promise<any>;
|
|
159
|
-
declare function fetchHyperliquidFrontendOpenOrders(params: {
|
|
160
|
-
environment?: HyperliquidEnvironment;
|
|
161
|
-
user: `0x${string}`;
|
|
162
|
-
}): Promise<any>;
|
|
163
|
-
declare function fetchHyperliquidOrderStatus(params: {
|
|
164
|
-
environment?: HyperliquidEnvironment;
|
|
165
|
-
user: `0x${string}`;
|
|
166
|
-
oid: number | string;
|
|
167
|
-
}): Promise<any>;
|
|
168
|
-
declare function fetchHyperliquidHistoricalOrders(params: {
|
|
169
|
-
environment?: HyperliquidEnvironment;
|
|
170
|
-
user: `0x${string}`;
|
|
171
|
-
}): Promise<any>;
|
|
172
|
-
declare function fetchHyperliquidUserFills(params: {
|
|
173
|
-
environment?: HyperliquidEnvironment;
|
|
174
|
-
user: `0x${string}`;
|
|
175
|
-
}): Promise<any>;
|
|
176
|
-
declare function fetchHyperliquidUserFillsByTime(params: {
|
|
177
|
-
environment?: HyperliquidEnvironment;
|
|
178
|
-
user: `0x${string}`;
|
|
179
|
-
startTime: number;
|
|
180
|
-
endTime: number;
|
|
181
|
-
}): Promise<any>;
|
|
182
|
-
declare function fetchHyperliquidUserRateLimit(params: {
|
|
183
|
-
environment?: HyperliquidEnvironment;
|
|
184
|
-
user: `0x${string}`;
|
|
185
|
-
}): Promise<any>;
|
|
186
|
-
declare function fetchHyperliquidPreTransferCheck(params: {
|
|
187
|
-
environment?: HyperliquidEnvironment;
|
|
188
|
-
user: `0x${string}`;
|
|
189
|
-
source: `0x${string}`;
|
|
190
|
-
}): Promise<any>;
|
|
191
|
-
declare function fetchHyperliquidSpotClearinghouseState(params: {
|
|
192
|
-
environment?: HyperliquidEnvironment;
|
|
193
|
-
user: `0x${string}`;
|
|
194
|
-
}): Promise<any>;
|
|
195
|
-
|
|
196
|
-
type CommonActionOptions = {
|
|
197
|
-
environment?: HyperliquidEnvironment;
|
|
198
|
-
vaultAddress?: `0x${string}` | undefined;
|
|
199
|
-
expiresAfter?: number | undefined;
|
|
200
|
-
nonce?: number | undefined;
|
|
201
|
-
nonceSource?: NonceSource | undefined;
|
|
202
|
-
/**
|
|
203
|
-
* Optional per-wallet nonce provider (preferred if available).
|
|
204
|
-
*/
|
|
205
|
-
walletNonceProvider?: NonceSource | undefined;
|
|
206
|
-
};
|
|
207
|
-
type CancelInput = {
|
|
208
|
-
symbol: string;
|
|
209
|
-
oid: number | string;
|
|
210
|
-
};
|
|
211
|
-
type CancelByCloidInput = {
|
|
212
|
-
symbol: string;
|
|
213
|
-
cloid: `0x${string}`;
|
|
214
|
-
};
|
|
215
|
-
type ModifyOrderInput = {
|
|
216
|
-
oid: number | `0x${string}`;
|
|
217
|
-
order: HyperliquidOrderIntent;
|
|
218
|
-
};
|
|
219
|
-
type TwapOrderInput = {
|
|
220
|
-
symbol: string;
|
|
221
|
-
side: "buy" | "sell";
|
|
222
|
-
size: string | number | bigint;
|
|
223
|
-
reduceOnly?: boolean;
|
|
224
|
-
minutes: number;
|
|
225
|
-
randomize?: boolean;
|
|
226
|
-
};
|
|
227
|
-
type TwapCancelInput = {
|
|
228
|
-
symbol: string;
|
|
229
|
-
twapId: number;
|
|
230
|
-
};
|
|
231
|
-
type UpdateLeverageInput = {
|
|
232
|
-
symbol: string;
|
|
233
|
-
leverageMode: "cross" | "isolated";
|
|
234
|
-
leverage: number;
|
|
235
|
-
};
|
|
236
|
-
type UpdateIsolatedMarginInput = {
|
|
237
|
-
symbol: string;
|
|
238
|
-
isBuy: boolean;
|
|
239
|
-
ntli: number;
|
|
240
|
-
};
|
|
241
|
-
declare class HyperliquidExchangeClient {
|
|
242
|
-
private readonly nonceSource;
|
|
243
|
-
private readonly environment;
|
|
244
|
-
private readonly vaultAddress;
|
|
245
|
-
private readonly expiresAfter;
|
|
246
|
-
private readonly wallet;
|
|
247
|
-
constructor(args: {
|
|
248
|
-
wallet: WalletFullContext;
|
|
249
|
-
environment?: HyperliquidEnvironment;
|
|
250
|
-
vaultAddress?: `0x${string}`;
|
|
251
|
-
expiresAfter?: number;
|
|
252
|
-
nonceSource?: NonceSource;
|
|
253
|
-
walletNonceProvider?: NonceSource;
|
|
254
|
-
});
|
|
255
|
-
cancel(cancels: CancelInput[]): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
256
|
-
cancelByCloid(cancels: CancelByCloidInput[]): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
257
|
-
cancelAll(): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
258
|
-
scheduleCancel(time: number | null): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
259
|
-
modify(modification: ModifyOrderInput): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
260
|
-
batchModify(modifications: ModifyOrderInput[]): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
261
|
-
twapOrder(twap: TwapOrderInput): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
262
|
-
twapCancel(cancel: TwapCancelInput): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
263
|
-
updateLeverage(input: UpdateLeverageInput): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
264
|
-
updateIsolatedMargin(input: UpdateIsolatedMarginInput): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
265
|
-
reserveRequestWeight(weight: number): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
266
|
-
spotSend(params: {
|
|
267
|
-
destination: `0x${string}`;
|
|
268
|
-
token: string;
|
|
269
|
-
amount: string | number | bigint;
|
|
270
|
-
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
271
|
-
setDexAbstraction(params: {
|
|
272
|
-
enabled: boolean;
|
|
273
|
-
user?: `0x${string}`;
|
|
274
|
-
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
275
|
-
setAccountAbstractionMode(params: {
|
|
276
|
-
mode: HyperliquidAccountMode;
|
|
277
|
-
user?: `0x${string}`;
|
|
278
|
-
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
279
|
-
setPortfolioMargin(params: {
|
|
280
|
-
enabled: boolean;
|
|
281
|
-
user?: `0x${string}`;
|
|
282
|
-
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
283
|
-
}
|
|
284
|
-
declare function setHyperliquidPortfolioMargin(options: {
|
|
285
|
-
wallet: WalletFullContext;
|
|
286
|
-
enabled: boolean;
|
|
287
|
-
user?: `0x${string}`;
|
|
288
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
289
|
-
declare function setHyperliquidDexAbstraction(options: {
|
|
290
|
-
wallet: WalletFullContext;
|
|
291
|
-
enabled: boolean;
|
|
292
|
-
user?: `0x${string}`;
|
|
293
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
294
|
-
declare function setHyperliquidAccountAbstractionMode(options: {
|
|
295
|
-
wallet: WalletFullContext;
|
|
296
|
-
mode: HyperliquidAccountMode;
|
|
297
|
-
user?: `0x${string}`;
|
|
298
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
299
|
-
declare function cancelHyperliquidOrders(options: {
|
|
300
|
-
wallet: WalletFullContext;
|
|
301
|
-
cancels: CancelInput[];
|
|
302
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
303
|
-
declare function cancelHyperliquidOrdersByCloid(options: {
|
|
304
|
-
wallet: WalletFullContext;
|
|
305
|
-
cancels: CancelByCloidInput[];
|
|
306
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
307
|
-
declare function cancelAllHyperliquidOrders(options: {
|
|
308
|
-
wallet: WalletFullContext;
|
|
309
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
310
|
-
declare function scheduleHyperliquidCancel(options: {
|
|
311
|
-
wallet: WalletFullContext;
|
|
312
|
-
time?: number | null;
|
|
313
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
314
|
-
declare function modifyHyperliquidOrder(options: {
|
|
315
|
-
wallet: WalletFullContext;
|
|
316
|
-
modification: ModifyOrderInput;
|
|
317
|
-
grouping?: HyperliquidGrouping;
|
|
318
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
319
|
-
declare function batchModifyHyperliquidOrders(options: {
|
|
320
|
-
wallet: WalletFullContext;
|
|
321
|
-
modifications: ModifyOrderInput[];
|
|
322
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
323
|
-
declare function placeHyperliquidTwapOrder(options: {
|
|
324
|
-
wallet: WalletFullContext;
|
|
325
|
-
twap: TwapOrderInput;
|
|
326
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
327
|
-
declare function cancelHyperliquidTwapOrder(options: {
|
|
328
|
-
wallet: WalletFullContext;
|
|
329
|
-
cancel: TwapCancelInput;
|
|
330
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
331
|
-
declare function updateHyperliquidLeverage(options: {
|
|
332
|
-
wallet: WalletFullContext;
|
|
333
|
-
input: UpdateLeverageInput;
|
|
334
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
335
|
-
declare function updateHyperliquidIsolatedMargin(options: {
|
|
336
|
-
wallet: WalletFullContext;
|
|
337
|
-
input: UpdateIsolatedMarginInput;
|
|
338
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
339
|
-
declare function reserveHyperliquidRequestWeight(options: {
|
|
340
|
-
wallet: WalletFullContext;
|
|
341
|
-
weight: number;
|
|
342
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
343
|
-
declare function createHyperliquidSubAccount(options: {
|
|
344
|
-
wallet: WalletFullContext;
|
|
345
|
-
name: string;
|
|
346
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
347
|
-
declare function transferHyperliquidSubAccount(options: {
|
|
348
|
-
wallet: WalletFullContext;
|
|
349
|
-
subAccountUser: `0x${string}`;
|
|
350
|
-
isDeposit: boolean;
|
|
351
|
-
usd: string | number | bigint;
|
|
352
|
-
} & CommonActionOptions): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
353
|
-
declare function sendHyperliquidSpot(options: {
|
|
354
|
-
wallet: WalletFullContext;
|
|
355
|
-
destination: `0x${string}`;
|
|
356
|
-
token: string;
|
|
357
|
-
amount: string | number | bigint;
|
|
358
|
-
environment?: HyperliquidEnvironment;
|
|
359
|
-
nonce?: number;
|
|
360
|
-
nonceSource?: NonceSource | undefined;
|
|
361
|
-
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
362
|
-
|
|
363
8
|
type HyperliquidChain = "arbitrum" | "arbitrum-sepolia";
|
|
364
9
|
type HyperliquidStoreNetwork = "hyperliquid" | "hyperliquid-testnet";
|
|
365
10
|
declare function resolveHyperliquidChain(environment: HyperliquidEnvironment): HyperliquidChain;
|
|
@@ -769,4 +414,4 @@ declare const __hyperliquidInternals: {
|
|
|
769
414
|
splitSignature: typeof splitSignature;
|
|
770
415
|
};
|
|
771
416
|
|
|
772
|
-
export { DEFAULT_HYPERLIQUID_CADENCE_CRON,
|
|
417
|
+
export { DEFAULT_HYPERLIQUID_CADENCE_CRON, type HyperliquidApproveBuilderFeeOptions, type HyperliquidApproveBuilderFeeResponse, type HyperliquidBar, type HyperliquidBarResolution, type HyperliquidBuilderApprovalRecordInput, type HyperliquidCadence, type HyperliquidChain, type HyperliquidClearinghouseState, type HyperliquidDcaNormalizedEntry, type HyperliquidDcaSymbolEntry, type HyperliquidDcaSymbolInput, type HyperliquidDepositResult, HyperliquidEnvironment, type HyperliquidExecutionMode, HyperliquidGrouping, type HyperliquidIndicatorBar, type HyperliquidMarketType, HyperliquidOrderIntent, type HyperliquidOrderOptions, type HyperliquidOrderResponse, type HyperliquidOrderStatus, type HyperliquidPerpMarketInfo, type HyperliquidProfileAsset, type HyperliquidProfileAssetInput, type HyperliquidProfileChain, type HyperliquidResolution, type HyperliquidScheduleUnit, type HyperliquidSpotMarketInfo, type HyperliquidStoreNetwork, type HyperliquidTargetSizeConfig, type HyperliquidTargetSizeExecution, type HyperliquidTermsRecordInput, type HyperliquidTickSize, type HyperliquidTradePlan, type HyperliquidTradeSignal, type HyperliquidWithdrawResult, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, clampHyperliquidAbs, clampHyperliquidFloat, clampHyperliquidInt, depositToHyperliquidBridge, extractHyperliquidDex, extractHyperliquidOrderIds, fetchHyperliquidAllMids, fetchHyperliquidBars, fetchHyperliquidClearinghouseState, fetchHyperliquidPerpMarketInfo, fetchHyperliquidSizeDecimals, fetchHyperliquidSpotAccountValue, fetchHyperliquidSpotMarketInfo, fetchHyperliquidSpotTickSize, fetchHyperliquidSpotUsdPriceMap, fetchHyperliquidTickSize, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, getHyperliquidMaxBuilderFee, isHyperliquidSpotSymbol, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeSpotTokenName, parseHyperliquidJson, parseSpotPairSymbol, placeHyperliquidOrder, planHyperliquidTrade, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, resolveHyperliquidBudgetUsd, resolveHyperliquidCadenceCron, resolveHyperliquidCadenceFromResolution, resolveHyperliquidChain, resolveHyperliquidChainConfig, resolveHyperliquidDcaSymbolEntries, resolveHyperliquidErrorDetail, resolveHyperliquidHourlyInterval, resolveHyperliquidIntervalCron, resolveHyperliquidLeverageMode, resolveHyperliquidMaxPerRunUsd, resolveHyperliquidOrderRef, resolveHyperliquidOrderSymbol, resolveHyperliquidPair, resolveHyperliquidPerpSymbol, resolveHyperliquidProfileChain, resolveHyperliquidRpcEnvVar, resolveHyperliquidScheduleEvery, resolveHyperliquidScheduleUnit, resolveHyperliquidSpotSymbol, resolveHyperliquidStoreNetwork, resolveHyperliquidSymbol, resolveHyperliquidTargetSize, resolveSpotMidCandidates, resolveSpotTokenCandidates, roundHyperliquidPriceToTick, withdrawFromHyperliquid };
|
|
@@ -1384,7 +1384,7 @@ async function placeHyperliquidTwapOrder(options) {
|
|
|
1384
1384
|
symbol: twap.symbol,
|
|
1385
1385
|
baseUrl: API_BASES[env],
|
|
1386
1386
|
environment: env,
|
|
1387
|
-
fetcher: fetch
|
|
1387
|
+
fetcher: (...args) => fetch(...args)
|
|
1388
1388
|
});
|
|
1389
1389
|
const action = {
|
|
1390
1390
|
type: "twapOrder",
|
|
@@ -1406,7 +1406,7 @@ async function cancelHyperliquidTwapOrder(options) {
|
|
|
1406
1406
|
symbol: options.cancel.symbol,
|
|
1407
1407
|
baseUrl: API_BASES[env],
|
|
1408
1408
|
environment: env,
|
|
1409
|
-
fetcher: fetch
|
|
1409
|
+
fetcher: (...args) => fetch(...args)
|
|
1410
1410
|
});
|
|
1411
1411
|
const action = {
|
|
1412
1412
|
type: "twapCancel",
|
|
@@ -1423,7 +1423,7 @@ async function updateHyperliquidLeverage(options) {
|
|
|
1423
1423
|
symbol: options.input.symbol,
|
|
1424
1424
|
baseUrl: API_BASES[env],
|
|
1425
1425
|
environment: env,
|
|
1426
|
-
fetcher: fetch
|
|
1426
|
+
fetcher: (...args) => fetch(...args)
|
|
1427
1427
|
});
|
|
1428
1428
|
const action = {
|
|
1429
1429
|
type: "updateLeverage",
|
|
@@ -1441,7 +1441,7 @@ async function updateHyperliquidIsolatedMargin(options) {
|
|
|
1441
1441
|
symbol: options.input.symbol,
|
|
1442
1442
|
baseUrl: API_BASES[env],
|
|
1443
1443
|
environment: env,
|
|
1444
|
-
fetcher: fetch
|
|
1444
|
+
fetcher: (...args) => fetch(...args)
|
|
1445
1445
|
});
|
|
1446
1446
|
const action = {
|
|
1447
1447
|
type: "updateIsolatedMargin",
|
|
@@ -1556,7 +1556,7 @@ async function withAssetIndexes(options, entries, mapper) {
|
|
|
1556
1556
|
symbol: entry.symbol,
|
|
1557
1557
|
baseUrl: API_BASES[env],
|
|
1558
1558
|
environment: env,
|
|
1559
|
-
fetcher: fetch
|
|
1559
|
+
fetcher: (...args) => fetch(...args)
|
|
1560
1560
|
});
|
|
1561
1561
|
return mapper(assetIndex, entry);
|
|
1562
1562
|
})
|
|
@@ -1571,7 +1571,7 @@ async function buildOrder(intent, options) {
|
|
|
1571
1571
|
symbol: intent.symbol,
|
|
1572
1572
|
baseUrl: API_BASES[env],
|
|
1573
1573
|
environment: env,
|
|
1574
|
-
fetcher: fetch
|
|
1574
|
+
fetcher: (...args) => fetch(...args)
|
|
1575
1575
|
});
|
|
1576
1576
|
const limitOrTrigger = intent.trigger ? mapTrigger(intent.trigger) : {
|
|
1577
1577
|
limit: {
|
|
@@ -2946,7 +2946,7 @@ async function placeHyperliquidOrder(options) {
|
|
|
2946
2946
|
symbol: intent.symbol,
|
|
2947
2947
|
baseUrl: resolvedBaseUrl,
|
|
2948
2948
|
environment: inferredEnvironment,
|
|
2949
|
-
fetcher: fetch
|
|
2949
|
+
fetcher: (...args) => fetch(...args)
|
|
2950
2950
|
});
|
|
2951
2951
|
const limitOrTrigger = intent.trigger ? {
|
|
2952
2952
|
trigger: {
|