@continuumdao/ctm-mpc-defi 0.2.8 → 0.2.10

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.
Files changed (36) hide show
  1. package/dist/agent/catalog.cjs +1133 -2
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +1268 -9
  4. package/dist/agent/catalog.js +1091 -3
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/hyperliquid/SKILL.md +205 -0
  7. package/dist/agent/skills/morpho/SKILL.md +48 -0
  8. package/dist/core/index.cjs +9 -0
  9. package/dist/core/index.cjs.map +1 -1
  10. package/dist/core/index.d.ts +3 -1
  11. package/dist/core/index.js +8 -1
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/index.cjs +9 -0
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +8 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  19. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  20. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  21. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  22. package/dist/protocols/evm/hyperliquid/index.cjs +1550 -0
  23. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -0
  24. package/dist/protocols/evm/hyperliquid/index.d.ts +668 -0
  25. package/dist/protocols/evm/hyperliquid/index.js +1464 -0
  26. package/dist/protocols/evm/hyperliquid/index.js.map +1 -0
  27. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  28. package/dist/protocols/evm/maple/index.js.map +1 -1
  29. package/dist/protocols/evm/morpho/index.cjs +1971 -0
  30. package/dist/protocols/evm/morpho/index.cjs.map +1 -0
  31. package/dist/protocols/evm/morpho/index.d.ts +522 -0
  32. package/dist/protocols/evm/morpho/index.js +1918 -0
  33. package/dist/protocols/evm/morpho/index.js.map +1 -0
  34. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  35. package/dist/protocols/evm/sky/index.js.map +1 -1
  36. package/package.json +11 -1
@@ -0,0 +1,668 @@
1
+ import { b as KeyGenSubsetForPermit, M as MultisignBuildResult, e as ProtocolModule } from '../../../types-BfjWdw1j.js';
2
+ import { Hex, Address } from 'viem';
3
+ import { E as EvmChainDetail } from '../../../types-DUeNJLr9.js';
4
+
5
+ /** HyperEVM chains for Hyperliquid CoreWriter integration. */
6
+ declare const HYPERLIQUID_SUPPORTED_CHAIN_IDS: readonly [999, 998];
7
+ type HyperliquidSupportedChainId = (typeof HYPERLIQUID_SUPPORTED_CHAIN_IDS)[number];
8
+ declare function isHyperliquidChainSupported(chainId: number): chainId is HyperliquidSupportedChainId;
9
+ declare function hyperliquidApiBaseUrl(chainId: number): string;
10
+ /** Stats feed used by app.hyperliquid.xyz/vaults (official vaultSummaries returns []). */
11
+ declare function hyperliquidVaultStatsUrl(chainId: number): string | null;
12
+ declare const HYPERLIQUID_HLP_VAULT_ADDRESS = "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303";
13
+ /** HIP-3 coins use `{dex}:{symbol}` (e.g. `xyz:AAPL`). Returns dex segment when present. */
14
+ declare function hyperliquidInferDexFromCoin(coin: string): string | undefined;
15
+
16
+ /** CoreWriter system contract on HyperEVM — sends actions to HyperCore. */
17
+ declare const HYPERLIQUID_CORE_WRITER_ADDRESS: "0x3333333333333333333333333333333333333333";
18
+ /** Spot asset IDs are offset from perp indices. */
19
+ declare const HYPERLIQUID_SPOT_ASSET_OFFSET = 10000;
20
+ declare const HYPERLIQUID_CORE_WRITER_GAS_FALLBACK = 120000n;
21
+ /** Time-in-force encodings for CoreWriter limit orders. */
22
+ declare const HYPERLIQUID_TIF: {
23
+ readonly alo: 1;
24
+ readonly gtc: 2;
25
+ readonly ioc: 3;
26
+ };
27
+ type HyperliquidTifKey = keyof typeof HYPERLIQUID_TIF;
28
+ /** Approximate bar duration in ms for candle window sizing. */
29
+ declare const HYPERLIQUID_INTERVAL_MS: Record<string, number>;
30
+ declare const HYPERLIQUID_DEFAULT_OHLCV_INTERVAL: "15m";
31
+ declare const HYPERLIQUID_DEFAULT_CANDLE_LIMIT = 48;
32
+ declare const HYPERLIQUID_MAX_CANDLE_LIMIT = 200;
33
+ /** Max bars for dedicated OHLCV range requests (e.g. 7d @ 15m ≈ 672). */
34
+ declare const HYPERLIQUID_MAX_OHLCV_BARS = 2000;
35
+ declare const HYPERLIQUID_DEFAULT_LOOKBACK_DAYS = 1;
36
+ declare const HYPERLIQUID_MAX_LOOKBACK_DAYS = 90;
37
+
38
+ type HyperliquidPerpMarket = {
39
+ name: string;
40
+ asset: number;
41
+ szDecimals: number;
42
+ maxLeverage: number;
43
+ onlyIsolated?: boolean;
44
+ /** HIP-3 builder dex; omitted for native Hyperliquid perps. */
45
+ dex?: string;
46
+ };
47
+ type HyperliquidPerpDex = {
48
+ name: string;
49
+ fullName: string;
50
+ };
51
+ type HyperliquidSpotMarket = {
52
+ name: string;
53
+ asset: number;
54
+ tokenIndex: number;
55
+ szDecimals: number;
56
+ };
57
+ type HyperliquidOhlcvInterval = '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '8h' | '12h' | '1d' | '3d' | '1w' | '1M';
58
+ type HyperliquidOhlcvCandle = {
59
+ timestampMs: number;
60
+ open: string;
61
+ high: string;
62
+ low: string;
63
+ close: string;
64
+ volume: string;
65
+ };
66
+ type HyperliquidLivePrice = {
67
+ markPx: string | null;
68
+ midPx: string | null;
69
+ oraclePx: string | null;
70
+ prevDayPx: string | null;
71
+ /** Best available live tradable price (midPx, else markPx, else allMids). */
72
+ midUsd: string;
73
+ source: 'midPx' | 'markPx' | 'allMids';
74
+ };
75
+ type HyperliquidMarketSnapshot = {
76
+ coin: string;
77
+ dex: string | null;
78
+ livePrice: HyperliquidLivePrice;
79
+ /** @deprecated Prefer livePrice.midUsd */
80
+ midUsd: string;
81
+ fetchedAtMs: number;
82
+ interval: HyperliquidOhlcvInterval;
83
+ latestCandle: HyperliquidOhlcvCandle | null;
84
+ candles: HyperliquidOhlcvCandle[];
85
+ candleCount: number;
86
+ };
87
+ type HyperliquidOhlcvRange = {
88
+ coin: string;
89
+ dex: string | null;
90
+ interval: HyperliquidOhlcvInterval;
91
+ startTimeMs: number;
92
+ endTimeMs: number;
93
+ expectedBars: number;
94
+ candleCount: number;
95
+ latestCandle: HyperliquidOhlcvCandle | null;
96
+ candles: HyperliquidOhlcvCandle[];
97
+ fetchedAtMs: number;
98
+ };
99
+ declare function hyperliquidFetchPerpMeta(args: {
100
+ chainId: number;
101
+ dex?: string;
102
+ }): Promise<{
103
+ markets: HyperliquidPerpMarket[];
104
+ }>;
105
+ declare function hyperliquidFetchSpotMeta(args: {
106
+ chainId: number;
107
+ }): Promise<{
108
+ markets: HyperliquidSpotMarket[];
109
+ }>;
110
+ declare function hyperliquidFetchAllMids(args: {
111
+ chainId: number;
112
+ dex?: string;
113
+ }): Promise<{
114
+ mids: Record<string, string>;
115
+ }>;
116
+ /** Resolve OHLCV window from lookback or explicit timestamps. */
117
+ declare function hyperliquidResolveOhlcvWindow(args: {
118
+ interval: HyperliquidOhlcvInterval;
119
+ lookbackDays?: number;
120
+ lookbackHours?: number;
121
+ startTimeMs?: number;
122
+ endTimeMs?: number;
123
+ }): {
124
+ startTimeMs: number;
125
+ endTimeMs: number;
126
+ expectedBars: number;
127
+ };
128
+ /** Short recent window for market snapshot (default 48 bars). */
129
+ declare function hyperliquidFetchCandles(args: {
130
+ chainId: number;
131
+ coin: string;
132
+ interval: HyperliquidOhlcvInterval;
133
+ startTimeMs?: number;
134
+ endTimeMs?: number;
135
+ limit?: number;
136
+ }): Promise<{
137
+ candles: HyperliquidOhlcvCandle[];
138
+ }>;
139
+ /** OHLCV for an explicit time range — requests only that window from Hyperliquid (no over-fetch + filter). */
140
+ declare function hyperliquidFetchOhlcvRange(args: {
141
+ chainId: number;
142
+ coin: string;
143
+ interval?: HyperliquidOhlcvInterval;
144
+ dex?: string;
145
+ lookbackDays?: number;
146
+ lookbackHours?: number;
147
+ startTimeMs?: number;
148
+ endTimeMs?: number;
149
+ }): Promise<HyperliquidOhlcvRange>;
150
+ /** Live mark/mid/oracle from metaAndAssetCtxs — authoritative for HIP-3 and native perps. */
151
+ declare function hyperliquidFetchPerpAssetContext(args: {
152
+ chainId: number;
153
+ coin: string;
154
+ dex?: string;
155
+ }): Promise<{
156
+ markPx: string | null;
157
+ midPx: string | null;
158
+ oraclePx: string | null;
159
+ prevDayPx: string | null;
160
+ funding: string | null;
161
+ openInterest: string | null;
162
+ }>;
163
+ declare function hyperliquidFetchMarketSnapshot(args: {
164
+ chainId: number;
165
+ coin: string;
166
+ interval?: HyperliquidOhlcvInterval;
167
+ dex?: string;
168
+ candleLimit?: number;
169
+ }): Promise<HyperliquidMarketSnapshot>;
170
+ type ClearinghouseState = {
171
+ assetPositions?: Array<{
172
+ position?: {
173
+ coin?: string;
174
+ szi?: string;
175
+ entryPx?: string;
176
+ positionValue?: string;
177
+ unrealizedPnl?: string;
178
+ liquidationPx?: string | null;
179
+ leverage?: {
180
+ type?: string;
181
+ value?: number;
182
+ };
183
+ maxLeverage?: number;
184
+ marginUsed?: string;
185
+ returnOnEquity?: string;
186
+ };
187
+ }>;
188
+ marginSummary?: {
189
+ accountValue?: string;
190
+ totalMarginUsed?: string;
191
+ };
192
+ /** USD that can leave perp margin (e.g. transfer to spot). */
193
+ withdrawable?: string;
194
+ };
195
+ type SpotClearinghouseState = {
196
+ balances?: Array<{
197
+ coin?: string;
198
+ token?: number;
199
+ total?: string;
200
+ hold?: string;
201
+ entryNtl?: string;
202
+ }>;
203
+ };
204
+ declare function hyperliquidFetchClearinghouseState(args: {
205
+ chainId: number;
206
+ user: string;
207
+ dex?: string;
208
+ }): Promise<{
209
+ state: ClearinghouseState;
210
+ }>;
211
+ declare function hyperliquidFetchSpotClearinghouseState(args: {
212
+ chainId: number;
213
+ user: string;
214
+ }): Promise<{
215
+ state: SpotClearinghouseState;
216
+ }>;
217
+ type HyperliquidActiveAssetContext = {
218
+ markPx: string | null;
219
+ leverageLabel: string | null;
220
+ availableToBuy: string | null;
221
+ availableToSell: string | null;
222
+ };
223
+ declare function hyperliquidFetchActiveAssetData(args: {
224
+ chainId: number;
225
+ user: string;
226
+ coin: string;
227
+ }): Promise<{
228
+ activeAsset: HyperliquidActiveAssetContext;
229
+ }>;
230
+ type HyperliquidOpenOrder = {
231
+ coin: string;
232
+ side: string;
233
+ limitPx: string;
234
+ sz: string;
235
+ oid: number;
236
+ timestamp: number;
237
+ reduceOnly?: boolean;
238
+ };
239
+ declare function hyperliquidFetchOpenOrders(args: {
240
+ chainId: number;
241
+ user: string;
242
+ dex?: string;
243
+ }): Promise<{
244
+ orders: HyperliquidOpenOrder[];
245
+ }>;
246
+ type HyperliquidVaultEquity = {
247
+ vaultAddress: string;
248
+ equity: string;
249
+ };
250
+ declare function hyperliquidFetchUserVaultEquities(args: {
251
+ chainId: number;
252
+ user: string;
253
+ }): Promise<{
254
+ rows: HyperliquidVaultEquity[];
255
+ }>;
256
+ type HyperliquidVaultSummary = {
257
+ vaultAddress: string;
258
+ name: string;
259
+ /** Annualized return as decimal (0.12 = 12%). */
260
+ apr: number | null;
261
+ tvlUsd: string | null;
262
+ };
263
+ declare function hyperliquidFetchVaultSummaries(args: {
264
+ chainId: number;
265
+ executorAddress?: string;
266
+ }): Promise<{
267
+ vaults: HyperliquidVaultSummary[];
268
+ }>;
269
+ declare function hyperliquidFetchDexList(args: {
270
+ chainId: number;
271
+ }): Promise<{
272
+ dexes: HyperliquidPerpDex[];
273
+ }>;
274
+ type HyperliquidPerpConciseAnnotation = {
275
+ category?: string;
276
+ displayName?: string;
277
+ keywords?: string[];
278
+ };
279
+ /** Bulk metadata for HIP-3 / annotated perps (display names, keywords like "apple" for AAPL). */
280
+ declare function hyperliquidFetchPerpConciseAnnotations(args: {
281
+ chainId: number;
282
+ }): Promise<Map<string, HyperliquidPerpConciseAnnotation>>;
283
+ declare function hyperliquidFetchDelegations(args: {
284
+ chainId: number;
285
+ user: string;
286
+ }): Promise<{
287
+ delegations: Array<{
288
+ validator: string;
289
+ amount: string;
290
+ }>;
291
+ }>;
292
+ declare function hyperliquidFetchStakingSummary(args: {
293
+ chainId: number;
294
+ user: string;
295
+ }): Promise<{
296
+ delegated: string;
297
+ undelegated: string;
298
+ }>;
299
+
300
+ declare function hyperliquidResolvePerpAsset(args: {
301
+ chainId: number;
302
+ coin: string;
303
+ dex?: string;
304
+ }): Promise<{
305
+ asset: number;
306
+ szDecimals: number;
307
+ maxLeverage: number;
308
+ }>;
309
+ declare function hyperliquidResolveSpotAsset(args: {
310
+ chainId: number;
311
+ coin: string;
312
+ }): Promise<{
313
+ asset: number;
314
+ szDecimals: number;
315
+ }>;
316
+ declare function hyperliquidResolveAsset(args: {
317
+ chainId: number;
318
+ coin: string;
319
+ marketKind: 'perp' | 'spot';
320
+ dex?: string;
321
+ }): Promise<{
322
+ asset: number;
323
+ szDecimals: number;
324
+ maxLeverage?: number;
325
+ }>;
326
+ declare function hyperliquidIsSpotAssetId(asset: number): boolean;
327
+
328
+ type HyperliquidPerpAnnotation = {
329
+ category?: string;
330
+ displayName?: string;
331
+ keywords?: string[];
332
+ };
333
+ type HyperliquidMarketSearchHit = {
334
+ coin: string;
335
+ symbol: string;
336
+ dex?: string;
337
+ asset: number;
338
+ szDecimals: number;
339
+ maxLeverage: number;
340
+ onlyIsolated?: boolean;
341
+ displayName?: string;
342
+ category?: string;
343
+ keywords?: string[];
344
+ matchScore: number;
345
+ matchReason: string;
346
+ };
347
+ declare function hyperliquidMarketSymbol(coin: string): string;
348
+ declare function hyperliquidCollectAllPerpMarkets(args: {
349
+ chainId: number;
350
+ dex?: string;
351
+ }): Promise<{
352
+ markets: HyperliquidPerpMarket[];
353
+ dexes: Awaited<ReturnType<typeof hyperliquidFetchDexList>>['dexes'];
354
+ }>;
355
+ declare function hyperliquidSearchMarkets(args: {
356
+ chainId: number;
357
+ query: string;
358
+ dex?: string;
359
+ limit?: number;
360
+ }): Promise<{
361
+ matches: HyperliquidMarketSearchHit[];
362
+ }>;
363
+ /** Resolve a user ticker/name to a single canonical Hyperliquid coin across all dexes. */
364
+ declare function hyperliquidResolvePerpMarket(args: {
365
+ chainId: number;
366
+ coin: string;
367
+ dex?: string;
368
+ }): Promise<HyperliquidPerpMarket & {
369
+ symbol: string;
370
+ }>;
371
+
372
+ type HyperliquidUsdClassBalances = {
373
+ spotUsdcAvailable: string;
374
+ perpWithdrawable: string;
375
+ };
376
+ declare function hyperliquidFetchUsdClassBalances(args: {
377
+ chainId: number;
378
+ executorAddress: string;
379
+ }): Promise<{
380
+ balances: HyperliquidUsdClassBalances;
381
+ }>;
382
+ type HyperliquidPerpAccountSummary = {
383
+ accountValueUsd: string | null;
384
+ totalMarginUsedUsd: string | null;
385
+ withdrawableUsd: string | null;
386
+ };
387
+ type HyperliquidOpenMarketContext = {
388
+ account: HyperliquidPerpAccountSummary;
389
+ activeAsset: HyperliquidActiveAssetContext;
390
+ };
391
+ type HyperliquidPositionDisplayRow = {
392
+ key: string;
393
+ coin: string;
394
+ isLong: boolean;
395
+ size: string | null;
396
+ entryPx: string | null;
397
+ positionValueUsd: string | null;
398
+ unrealizedPnlUsd: string | null;
399
+ liquidationPx: string | null;
400
+ leverageLabel: string | null;
401
+ maxLeverage: number | null;
402
+ marginUsedUsd: string | null;
403
+ returnOnEquity: string | null;
404
+ };
405
+ declare function hyperliquidFetchOpenMarketContext(args: {
406
+ chainId: number;
407
+ executorAddress: string;
408
+ coin: string;
409
+ dex?: string;
410
+ }): Promise<{
411
+ context: HyperliquidOpenMarketContext;
412
+ }>;
413
+ declare function hyperliquidFetchPositionDisplayRows(args: {
414
+ chainId: number;
415
+ executorAddress: string;
416
+ dex?: string;
417
+ }): Promise<{
418
+ rows: HyperliquidPositionDisplayRow[];
419
+ }>;
420
+ declare function hyperliquidFetchOrdersForExecutor(args: {
421
+ chainId: number;
422
+ executorAddress: string;
423
+ dex?: string;
424
+ }): Promise<{
425
+ orders: HyperliquidOpenOrder[];
426
+ }>;
427
+ /** MCP: perp markets + HIP-3 dex list. When dex is omitted, returns native + all HIP-3 dex markets. */
428
+ declare function hyperliquidFetchMarketsSummary(args: {
429
+ chainId: number;
430
+ dex?: string;
431
+ }): Promise<{
432
+ markets: HyperliquidPerpMarket[];
433
+ dexes: HyperliquidPerpDex[];
434
+ }>;
435
+ /** MCP: search markets across all dexes by ticker or name (case-insensitive). */
436
+ declare function hyperliquidSearchMarketsSummary(args: {
437
+ chainId: number;
438
+ query: string;
439
+ dex?: string;
440
+ limit?: number;
441
+ }): Promise<{
442
+ matches: HyperliquidMarketSearchHit[];
443
+ }>;
444
+ /** MCP: open positions for executor. */
445
+ declare function hyperliquidFetchPositionsForExecutor(args: {
446
+ chainId: number;
447
+ executorAddress: string;
448
+ dex?: string;
449
+ }): Promise<{
450
+ positions: HyperliquidPositionDisplayRow[];
451
+ }>;
452
+ /** MCP: open orders for executor. */
453
+ declare function hyperliquidFetchOpenOrdersSummary(args: {
454
+ chainId: number;
455
+ executorAddress: string;
456
+ dex?: string;
457
+ }): Promise<{
458
+ orders: HyperliquidOpenOrder[];
459
+ }>;
460
+ /** MCP: trading context for a market (account + activeAssetData). */
461
+ declare function hyperliquidFetchOpenContextSummary(args: {
462
+ chainId: number;
463
+ executorAddress: string;
464
+ coin: string;
465
+ dex?: string;
466
+ }): Promise<{
467
+ context: HyperliquidOpenMarketContext;
468
+ }>;
469
+ /** MCP: spot vs perp USD balances. */
470
+ declare function hyperliquidFetchUsdClassBalancesSummary(args: {
471
+ chainId: number;
472
+ executorAddress: string;
473
+ }): Promise<{
474
+ balances: HyperliquidUsdClassBalances;
475
+ }>;
476
+ /** MCP: vault catalog (may be slow on mainnet — large stats payload). */
477
+ declare function hyperliquidFetchVaultCatalogSummary(args: {
478
+ chainId: number;
479
+ executorAddress?: string;
480
+ }): Promise<{
481
+ vaults: HyperliquidVaultSummary[];
482
+ }>;
483
+ /** MCP: user vault equity rows. */
484
+ declare function hyperliquidFetchUserVaultEquitiesSummary(args: {
485
+ chainId: number;
486
+ executorAddress: string;
487
+ }): Promise<{
488
+ rows: HyperliquidVaultEquity[];
489
+ }>;
490
+ /** MCP: HYPE staking summary. */
491
+ declare function hyperliquidFetchStakingSummaryForExecutor(args: {
492
+ chainId: number;
493
+ executorAddress: string;
494
+ }): Promise<{
495
+ summary: {
496
+ delegated: string;
497
+ undelegated: string;
498
+ };
499
+ }>;
500
+ /** MCP: HYPE delegations. */
501
+ declare function hyperliquidFetchDelegationsForExecutor(args: {
502
+ chainId: number;
503
+ executorAddress: string;
504
+ }): Promise<{
505
+ delegations: {
506
+ validator: string;
507
+ amount: string;
508
+ }[];
509
+ }>;
510
+ /** MCP: mid price + OHLCV candles. */
511
+ declare function hyperliquidFetchMarketSnapshotSummary(args: {
512
+ chainId: number;
513
+ coin: string;
514
+ interval?: HyperliquidOhlcvInterval;
515
+ dex?: string;
516
+ candleLimit?: number;
517
+ }): Promise<{
518
+ snapshot: HyperliquidMarketSnapshot;
519
+ resolvedCoin: string;
520
+ dex: string | null;
521
+ }>;
522
+ /** MCP: OHLCV history for an explicit lookback or time range. */
523
+ declare function hyperliquidFetchOhlcvSummary(args: {
524
+ chainId: number;
525
+ coin: string;
526
+ interval?: HyperliquidOhlcvInterval;
527
+ dex?: string;
528
+ lookbackDays?: number;
529
+ lookbackHours?: number;
530
+ startTimeMs?: number;
531
+ endTimeMs?: number;
532
+ }): Promise<{
533
+ ohlcv: HyperliquidOhlcvRange;
534
+ resolvedCoin: string;
535
+ dex: string | null;
536
+ }>;
537
+
538
+ /** Hyperliquid CoreWriter uses 1e8 fixed-point for prices and sizes. */
539
+ declare function hyperliquidEncodePx8(human: string | number): bigint;
540
+ /** USD notional amounts on HyperCore typically use 6 decimals. */
541
+ declare function hyperliquidEncodeUsd6(human: string | number): bigint;
542
+ /** HYPE / token wei on L1 actions (uint64). */
543
+ declare function hyperliquidEncodeWei8(human: string | number): bigint;
544
+ declare function hyperliquidResolveTif(tif: HyperliquidTifKey | string): number;
545
+ declare function buildCoreWriterLimitOrderCalldata(args: {
546
+ asset: number;
547
+ isBuy: boolean;
548
+ limitPxHuman: string;
549
+ szHuman: string;
550
+ reduceOnly?: boolean;
551
+ tif?: HyperliquidTifKey;
552
+ cloid?: bigint;
553
+ }): Hex;
554
+ declare function buildCoreWriterCancelByOidCalldata(args: {
555
+ asset: number;
556
+ oid: bigint | number;
557
+ }): Hex;
558
+ declare function buildCoreWriterCancelByCloidCalldata(args: {
559
+ asset: number;
560
+ cloid: bigint;
561
+ }): Hex;
562
+ declare function buildCoreWriterUsdClassTransferCalldata(args: {
563
+ usdHuman: string;
564
+ toPerp: boolean;
565
+ }): Hex;
566
+ declare function buildCoreWriterVaultTransferCalldata(args: {
567
+ vault: `0x${string}`;
568
+ isDeposit: boolean;
569
+ usdHuman: string;
570
+ }): Hex;
571
+ declare function buildCoreWriterStakingDepositCalldata(args: {
572
+ hypeHuman: string;
573
+ }): Hex;
574
+ declare function buildCoreWriterStakingWithdrawCalldata(args: {
575
+ hypeHuman: string;
576
+ }): Hex;
577
+ declare function buildCoreWriterTokenDelegateCalldata(args: {
578
+ validator: `0x${string}`;
579
+ hypeHuman: string;
580
+ isUndelegate: boolean;
581
+ }): Hex;
582
+ declare function coreWriterStep(data: Hex): {
583
+ to: `0x${string}`;
584
+ data: `0x${string}`;
585
+ value: bigint;
586
+ };
587
+
588
+ type HyperliquidMultisignCommon = {
589
+ keyGen: KeyGenSubsetForPermit;
590
+ chainId: number;
591
+ rpcUrl: string;
592
+ chainDetail: EvmChainDetail;
593
+ useCustomGas: boolean;
594
+ customGasChainDetails?: Record<string, unknown> | null;
595
+ executorAddress: Address;
596
+ purposeText: string;
597
+ };
598
+ type HyperliquidLimitOrderArgs = HyperliquidMultisignCommon & {
599
+ coin: string;
600
+ marketKind?: 'perp' | 'spot';
601
+ isBuy: boolean;
602
+ limitPxHuman: string;
603
+ szHuman: string;
604
+ reduceOnly?: boolean;
605
+ tif?: HyperliquidTifKey;
606
+ dex?: string;
607
+ };
608
+ type HyperliquidCancelOrderArgs = HyperliquidMultisignCommon & {
609
+ coin: string;
610
+ marketKind?: 'perp' | 'spot';
611
+ oid: number;
612
+ dex?: string;
613
+ };
614
+ type HyperliquidUsdClassTransferArgs = HyperliquidMultisignCommon & {
615
+ usdHuman: string;
616
+ toPerp: boolean;
617
+ };
618
+ declare function buildEvmMultisignBodyHyperliquidLimitOrderBatch(args: HyperliquidLimitOrderArgs): Promise<MultisignBuildResult>;
619
+ type HyperliquidCloseOrderArgs = Omit<HyperliquidLimitOrderArgs, 'isBuy' | 'reduceOnly' | 'marketKind'> & {
620
+ isLong: boolean;
621
+ };
622
+ /** IoC reduce-only close — inverts side from position direction. */
623
+ declare function buildEvmMultisignBodyHyperliquidCloseBatch(args: HyperliquidCloseOrderArgs): Promise<MultisignBuildResult>;
624
+ declare function buildEvmMultisignBodyHyperliquidCancelBatch(args: HyperliquidCancelOrderArgs): Promise<MultisignBuildResult>;
625
+ declare function buildEvmMultisignBodyHyperliquidUsdClassTransferBatch(args: HyperliquidUsdClassTransferArgs): Promise<MultisignBuildResult>;
626
+
627
+ type HyperliquidVaultCommon = {
628
+ keyGen: KeyGenSubsetForPermit;
629
+ chainId: number;
630
+ rpcUrl: string;
631
+ chainDetail: EvmChainDetail;
632
+ useCustomGas: boolean;
633
+ customGasChainDetails?: Record<string, unknown> | null;
634
+ executorAddress: Address;
635
+ purposeText: string;
636
+ vaultAddress: `0x${string}`;
637
+ usdHuman: string;
638
+ };
639
+ type HyperliquidVaultDepositArgs = HyperliquidVaultCommon;
640
+ type HyperliquidVaultWithdrawArgs = HyperliquidVaultCommon;
641
+ declare function buildEvmMultisignBodyHyperliquidVaultDepositBatch(args: HyperliquidVaultDepositArgs): Promise<MultisignBuildResult>;
642
+ declare function buildEvmMultisignBodyHyperliquidVaultWithdrawBatch(args: HyperliquidVaultWithdrawArgs): Promise<MultisignBuildResult>;
643
+
644
+ type HyperliquidStakingCommon = {
645
+ keyGen: KeyGenSubsetForPermit;
646
+ chainId: number;
647
+ rpcUrl: string;
648
+ chainDetail: EvmChainDetail;
649
+ useCustomGas: boolean;
650
+ customGasChainDetails?: Record<string, unknown> | null;
651
+ executorAddress: Address;
652
+ purposeText: string;
653
+ hypeHuman: string;
654
+ };
655
+ declare function buildEvmMultisignBodyHyperliquidStakeDepositBatch(args: HyperliquidStakingCommon): Promise<MultisignBuildResult>;
656
+ declare function buildEvmMultisignBodyHyperliquidStakeWithdrawBatch(args: HyperliquidStakingCommon): Promise<MultisignBuildResult>;
657
+ type HyperliquidDelegateArgs = HyperliquidStakingCommon & {
658
+ validator: `0x${string}`;
659
+ isUndelegate: boolean;
660
+ };
661
+ declare function buildEvmMultisignBodyHyperliquidDelegateBatch(args: HyperliquidDelegateArgs): Promise<MultisignBuildResult>;
662
+ declare function buildEvmMultisignBodyHyperliquidDelegateOnlyBatch(args: Omit<HyperliquidDelegateArgs, 'isUndelegate'>): Promise<MultisignBuildResult>;
663
+ declare function buildEvmMultisignBodyHyperliquidUndelegateBatch(args: Omit<HyperliquidDelegateArgs, 'isUndelegate'>): Promise<MultisignBuildResult>;
664
+
665
+ declare const HYPERLIQUID_PROTOCOL_ID = "hyperliquid";
666
+ declare const hyperliquidProtocolModule: ProtocolModule;
667
+
668
+ export { HYPERLIQUID_CORE_WRITER_ADDRESS, HYPERLIQUID_CORE_WRITER_GAS_FALLBACK, HYPERLIQUID_DEFAULT_CANDLE_LIMIT, HYPERLIQUID_DEFAULT_LOOKBACK_DAYS, HYPERLIQUID_DEFAULT_OHLCV_INTERVAL, HYPERLIQUID_HLP_VAULT_ADDRESS, HYPERLIQUID_INTERVAL_MS, HYPERLIQUID_MAX_CANDLE_LIMIT, HYPERLIQUID_MAX_LOOKBACK_DAYS, HYPERLIQUID_MAX_OHLCV_BARS, HYPERLIQUID_PROTOCOL_ID, HYPERLIQUID_SPOT_ASSET_OFFSET, HYPERLIQUID_SUPPORTED_CHAIN_IDS, HYPERLIQUID_TIF, type HyperliquidActiveAssetContext, type HyperliquidCancelOrderArgs, type HyperliquidCloseOrderArgs, type HyperliquidDelegateArgs, type HyperliquidLimitOrderArgs, type HyperliquidLivePrice, type HyperliquidMarketSearchHit, type HyperliquidMarketSnapshot, type HyperliquidOhlcvCandle, type HyperliquidOhlcvInterval, type HyperliquidOhlcvRange, type HyperliquidOpenMarketContext, type HyperliquidOpenOrder, type HyperliquidPerpAccountSummary, type HyperliquidPerpAnnotation, type HyperliquidPerpConciseAnnotation, type HyperliquidPerpDex, type HyperliquidPerpMarket, type HyperliquidPositionDisplayRow, type HyperliquidSpotMarket, type HyperliquidSupportedChainId, type HyperliquidTifKey, type HyperliquidUsdClassBalances, type HyperliquidUsdClassTransferArgs, type HyperliquidVaultDepositArgs, type HyperliquidVaultEquity, type HyperliquidVaultSummary, type HyperliquidVaultWithdrawArgs, buildCoreWriterCancelByCloidCalldata, buildCoreWriterCancelByOidCalldata, buildCoreWriterLimitOrderCalldata, buildCoreWriterStakingDepositCalldata, buildCoreWriterStakingWithdrawCalldata, buildCoreWriterTokenDelegateCalldata, buildCoreWriterUsdClassTransferCalldata, buildCoreWriterVaultTransferCalldata, buildEvmMultisignBodyHyperliquidCancelBatch, buildEvmMultisignBodyHyperliquidCloseBatch, buildEvmMultisignBodyHyperliquidDelegateBatch, buildEvmMultisignBodyHyperliquidDelegateOnlyBatch, buildEvmMultisignBodyHyperliquidLimitOrderBatch, buildEvmMultisignBodyHyperliquidStakeDepositBatch, buildEvmMultisignBodyHyperliquidStakeWithdrawBatch, buildEvmMultisignBodyHyperliquidUndelegateBatch, buildEvmMultisignBodyHyperliquidUsdClassTransferBatch, buildEvmMultisignBodyHyperliquidVaultDepositBatch, buildEvmMultisignBodyHyperliquidVaultWithdrawBatch, coreWriterStep, hyperliquidApiBaseUrl, hyperliquidCollectAllPerpMarkets, hyperliquidEncodePx8, hyperliquidEncodeUsd6, hyperliquidEncodeWei8, hyperliquidFetchActiveAssetData, hyperliquidFetchAllMids, hyperliquidFetchCandles, hyperliquidFetchClearinghouseState, hyperliquidFetchDelegations, hyperliquidFetchDelegationsForExecutor, hyperliquidFetchDexList, hyperliquidFetchMarketSnapshot, hyperliquidFetchMarketSnapshotSummary, hyperliquidFetchMarketsSummary, hyperliquidFetchOhlcvRange, hyperliquidFetchOhlcvSummary, hyperliquidFetchOpenContextSummary, hyperliquidFetchOpenMarketContext, hyperliquidFetchOpenOrders, hyperliquidFetchOpenOrdersSummary, hyperliquidFetchOrdersForExecutor, hyperliquidFetchPerpAssetContext, hyperliquidFetchPerpConciseAnnotations, hyperliquidFetchPerpMeta, hyperliquidFetchPositionDisplayRows, hyperliquidFetchPositionsForExecutor, hyperliquidFetchSpotClearinghouseState, hyperliquidFetchSpotMeta, hyperliquidFetchStakingSummary, hyperliquidFetchStakingSummaryForExecutor, hyperliquidFetchUsdClassBalances, hyperliquidFetchUsdClassBalancesSummary, hyperliquidFetchUserVaultEquities, hyperliquidFetchUserVaultEquitiesSummary, hyperliquidFetchVaultCatalogSummary, hyperliquidFetchVaultSummaries, hyperliquidInferDexFromCoin, hyperliquidIsSpotAssetId, hyperliquidMarketSymbol, hyperliquidProtocolModule, hyperliquidResolveAsset, hyperliquidResolveOhlcvWindow, hyperliquidResolvePerpAsset, hyperliquidResolvePerpMarket, hyperliquidResolveSpotAsset, hyperliquidResolveTif, hyperliquidSearchMarkets, hyperliquidSearchMarketsSummary, hyperliquidVaultStatsUrl, isHyperliquidChainSupported };