opentool 0.15.1 → 0.16.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 +1 -1
- package/dist/adapters/hyperliquid/browser.js +273 -263
- package/dist/adapters/hyperliquid/browser.js.map +1 -1
- package/dist/adapters/hyperliquid/index.d.ts +2 -2
- package/dist/adapters/hyperliquid/index.js +277 -267
- package/dist/adapters/hyperliquid/index.js.map +1 -1
- package/dist/{browser-IWBnx7Q3.d.ts → browser-CY6nxlxO.d.ts} +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +277 -267
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2543,6 +2543,270 @@ function assertPositiveNumber(value, label) {
|
|
|
2543
2543
|
}
|
|
2544
2544
|
}
|
|
2545
2545
|
|
|
2546
|
+
// src/adapters/hyperliquid/symbols.ts
|
|
2547
|
+
var UNKNOWN_SYMBOL2 = "UNKNOWN";
|
|
2548
|
+
function extractHyperliquidDex(symbol) {
|
|
2549
|
+
const idx = symbol.indexOf(":");
|
|
2550
|
+
if (idx <= 0) return null;
|
|
2551
|
+
const dex = symbol.slice(0, idx).trim().toLowerCase();
|
|
2552
|
+
return dex || null;
|
|
2553
|
+
}
|
|
2554
|
+
function parseHyperliquidSymbol(value) {
|
|
2555
|
+
if (!value) return null;
|
|
2556
|
+
const trimmed = value.trim();
|
|
2557
|
+
if (!trimmed) return null;
|
|
2558
|
+
if (trimmed.startsWith("@")) {
|
|
2559
|
+
return {
|
|
2560
|
+
raw: trimmed,
|
|
2561
|
+
kind: "spotIndex",
|
|
2562
|
+
normalized: trimmed,
|
|
2563
|
+
routeTicker: trimmed,
|
|
2564
|
+
displaySymbol: trimmed,
|
|
2565
|
+
base: null,
|
|
2566
|
+
quote: null,
|
|
2567
|
+
pair: null,
|
|
2568
|
+
dex: null,
|
|
2569
|
+
leverageMode: "cross"
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
const dex = extractHyperliquidDex(trimmed);
|
|
2573
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
2574
|
+
const base2 = normalizeHyperliquidBaseSymbol(trimmed);
|
|
2575
|
+
if (dex) {
|
|
2576
|
+
if (!base2) return null;
|
|
2577
|
+
return {
|
|
2578
|
+
raw: trimmed,
|
|
2579
|
+
kind: "perp",
|
|
2580
|
+
normalized: `${dex}:${base2}`,
|
|
2581
|
+
routeTicker: `${dex}:${base2}`,
|
|
2582
|
+
displaySymbol: `${dex.toUpperCase()}:${base2}-USDC`,
|
|
2583
|
+
base: base2,
|
|
2584
|
+
quote: null,
|
|
2585
|
+
pair: null,
|
|
2586
|
+
dex,
|
|
2587
|
+
leverageMode: "isolated"
|
|
2588
|
+
};
|
|
2589
|
+
}
|
|
2590
|
+
if (pair) {
|
|
2591
|
+
const [pairBase, pairQuote] = pair.split("/");
|
|
2592
|
+
return {
|
|
2593
|
+
raw: trimmed,
|
|
2594
|
+
kind: "spot",
|
|
2595
|
+
normalized: pair,
|
|
2596
|
+
routeTicker: pair.replace("/", "-"),
|
|
2597
|
+
displaySymbol: pair.replace("/", "-"),
|
|
2598
|
+
base: pairBase ?? null,
|
|
2599
|
+
quote: pairQuote ?? null,
|
|
2600
|
+
pair,
|
|
2601
|
+
dex: null,
|
|
2602
|
+
leverageMode: "cross"
|
|
2603
|
+
};
|
|
2604
|
+
}
|
|
2605
|
+
if (!base2) return null;
|
|
2606
|
+
return {
|
|
2607
|
+
raw: trimmed,
|
|
2608
|
+
kind: "perp",
|
|
2609
|
+
normalized: base2,
|
|
2610
|
+
routeTicker: base2,
|
|
2611
|
+
displaySymbol: `${base2}-USDC`,
|
|
2612
|
+
base: base2,
|
|
2613
|
+
quote: null,
|
|
2614
|
+
pair: null,
|
|
2615
|
+
dex: null,
|
|
2616
|
+
leverageMode: "cross"
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
function normalizeSpotTokenName2(value) {
|
|
2620
|
+
const raw = (value ?? "").trim();
|
|
2621
|
+
if (!raw) return "";
|
|
2622
|
+
if (raw.endsWith("0") && raw.length > 1) {
|
|
2623
|
+
return raw.slice(0, -1);
|
|
2624
|
+
}
|
|
2625
|
+
return raw;
|
|
2626
|
+
}
|
|
2627
|
+
function canonicalizeHyperliquidTokenCase(value) {
|
|
2628
|
+
const trimmed = value.trim();
|
|
2629
|
+
if (!trimmed) return "";
|
|
2630
|
+
return trimmed === trimmed.toLowerCase() ? trimmed.toUpperCase() : trimmed;
|
|
2631
|
+
}
|
|
2632
|
+
function normalizeHyperliquidBaseSymbol(value) {
|
|
2633
|
+
if (!value) return null;
|
|
2634
|
+
const trimmed = value.trim();
|
|
2635
|
+
if (!trimmed) return null;
|
|
2636
|
+
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
2637
|
+
const base2 = withoutDex.split("-")[0] ?? withoutDex;
|
|
2638
|
+
const baseNoPair = base2.split("/")[0] ?? base2;
|
|
2639
|
+
const normalized = canonicalizeHyperliquidTokenCase(baseNoPair);
|
|
2640
|
+
if (!normalized || normalized === UNKNOWN_SYMBOL2) return null;
|
|
2641
|
+
return normalized;
|
|
2642
|
+
}
|
|
2643
|
+
function normalizeHyperliquidMetaSymbol(symbol) {
|
|
2644
|
+
const trimmed = symbol.trim();
|
|
2645
|
+
const noDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
2646
|
+
const noPair = noDex.split("-")[0] ?? noDex;
|
|
2647
|
+
return (noPair.split("/")[0] ?? noPair).trim();
|
|
2648
|
+
}
|
|
2649
|
+
function resolveHyperliquidPair(value) {
|
|
2650
|
+
if (!value) return null;
|
|
2651
|
+
const trimmed = value.trim();
|
|
2652
|
+
if (!trimmed) return null;
|
|
2653
|
+
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
2654
|
+
if (withoutDex.includes("/")) {
|
|
2655
|
+
const [base2, ...rest] = withoutDex.split("/");
|
|
2656
|
+
const quote = rest.join("/").trim();
|
|
2657
|
+
if (!base2 || !quote) return null;
|
|
2658
|
+
return `${canonicalizeHyperliquidTokenCase(base2)}/${canonicalizeHyperliquidTokenCase(quote)}`;
|
|
2659
|
+
}
|
|
2660
|
+
if (withoutDex.includes("-")) {
|
|
2661
|
+
const [base2, ...rest] = withoutDex.split("-");
|
|
2662
|
+
const quote = rest.join("-").trim();
|
|
2663
|
+
if (!base2 || !quote) return null;
|
|
2664
|
+
return `${canonicalizeHyperliquidTokenCase(base2)}/${canonicalizeHyperliquidTokenCase(quote)}`;
|
|
2665
|
+
}
|
|
2666
|
+
return null;
|
|
2667
|
+
}
|
|
2668
|
+
function resolveHyperliquidLeverageMode(symbol) {
|
|
2669
|
+
return symbol.includes(":") ? "isolated" : "cross";
|
|
2670
|
+
}
|
|
2671
|
+
function resolveHyperliquidProfileChain(environment) {
|
|
2672
|
+
return environment === "testnet" ? "hyperliquid-testnet" : "hyperliquid";
|
|
2673
|
+
}
|
|
2674
|
+
function buildHyperliquidProfileAssets(params) {
|
|
2675
|
+
const chain = resolveHyperliquidProfileChain(params.environment);
|
|
2676
|
+
return params.assets.map((asset) => {
|
|
2677
|
+
const symbols = asset.assetSymbols.map((symbol) => normalizeHyperliquidBaseSymbol(symbol)).filter((symbol) => Boolean(symbol));
|
|
2678
|
+
if (symbols.length === 0) return null;
|
|
2679
|
+
const explicitPair = typeof asset.pair === "string" ? resolveHyperliquidPair(asset.pair) : null;
|
|
2680
|
+
const derivedPair = symbols.length === 1 ? resolveHyperliquidPair(asset.assetSymbols[0] ?? symbols[0]) : null;
|
|
2681
|
+
const pair = explicitPair ?? derivedPair ?? void 0;
|
|
2682
|
+
const leverage = typeof asset.leverage === "number" && Number.isFinite(asset.leverage) && asset.leverage > 0 ? asset.leverage : void 0;
|
|
2683
|
+
const walletAddress = typeof asset.walletAddress === "string" && asset.walletAddress.trim().length > 0 ? asset.walletAddress.trim() : void 0;
|
|
2684
|
+
return {
|
|
2685
|
+
venue: "hyperliquid",
|
|
2686
|
+
chain,
|
|
2687
|
+
assetSymbols: symbols,
|
|
2688
|
+
...pair ? { pair } : {},
|
|
2689
|
+
...leverage ? { leverage } : {},
|
|
2690
|
+
...walletAddress ? { walletAddress } : {}
|
|
2691
|
+
};
|
|
2692
|
+
}).filter((asset) => asset !== null);
|
|
2693
|
+
}
|
|
2694
|
+
function parseSpotPairSymbol(symbol) {
|
|
2695
|
+
const trimmed = symbol.trim();
|
|
2696
|
+
if (!trimmed.includes("/")) return null;
|
|
2697
|
+
const [rawBase, rawQuote] = trimmed.split("/");
|
|
2698
|
+
const base2 = rawBase?.trim().toUpperCase() ?? "";
|
|
2699
|
+
const quote = rawQuote?.trim().toUpperCase() ?? "";
|
|
2700
|
+
if (!base2 || !quote) return null;
|
|
2701
|
+
return { base: base2, quote };
|
|
2702
|
+
}
|
|
2703
|
+
function isHyperliquidSpotSymbol(symbol) {
|
|
2704
|
+
const trimmed = symbol.trim();
|
|
2705
|
+
if (!trimmed) return false;
|
|
2706
|
+
if (trimmed.startsWith("@") || trimmed.includes("/")) return true;
|
|
2707
|
+
if (trimmed.includes(":")) return false;
|
|
2708
|
+
return resolveHyperliquidPair(trimmed) !== null;
|
|
2709
|
+
}
|
|
2710
|
+
function resolveHyperliquidMarketDataCoin(value) {
|
|
2711
|
+
if (!value) return null;
|
|
2712
|
+
const trimmed = value.trim();
|
|
2713
|
+
if (!trimmed) return null;
|
|
2714
|
+
if (trimmed.startsWith("@")) return trimmed;
|
|
2715
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
2716
|
+
if (pair && !extractHyperliquidDex(trimmed)) {
|
|
2717
|
+
return pair;
|
|
2718
|
+
}
|
|
2719
|
+
return trimmed;
|
|
2720
|
+
}
|
|
2721
|
+
function supportsHyperliquidBuilderFee(params) {
|
|
2722
|
+
if (!isHyperliquidSpotSymbol(params.symbol)) {
|
|
2723
|
+
return true;
|
|
2724
|
+
}
|
|
2725
|
+
return params.side === "sell";
|
|
2726
|
+
}
|
|
2727
|
+
function resolveSpotMidCandidates(baseSymbol) {
|
|
2728
|
+
const base2 = baseSymbol.trim().toUpperCase();
|
|
2729
|
+
if (!base2) return [];
|
|
2730
|
+
const candidates = [base2];
|
|
2731
|
+
if (base2.startsWith("U") && base2.length > 1) {
|
|
2732
|
+
candidates.push(base2.slice(1));
|
|
2733
|
+
}
|
|
2734
|
+
return Array.from(new Set(candidates));
|
|
2735
|
+
}
|
|
2736
|
+
function resolveSpotTokenCandidates(value) {
|
|
2737
|
+
const normalized = normalizeSpotTokenName2(value).toUpperCase();
|
|
2738
|
+
if (!normalized) return [];
|
|
2739
|
+
const candidates = [normalized];
|
|
2740
|
+
if (normalized.startsWith("U") && normalized.length > 1) {
|
|
2741
|
+
candidates.push(normalized.slice(1));
|
|
2742
|
+
}
|
|
2743
|
+
return Array.from(new Set(candidates));
|
|
2744
|
+
}
|
|
2745
|
+
function resolveHyperliquidOrderSymbol(value) {
|
|
2746
|
+
if (!value) return null;
|
|
2747
|
+
const trimmed = value.trim();
|
|
2748
|
+
if (!trimmed) return null;
|
|
2749
|
+
if (trimmed.startsWith("@")) return trimmed;
|
|
2750
|
+
if (trimmed.includes(":")) {
|
|
2751
|
+
const [rawDex, ...restParts] = trimmed.split(":");
|
|
2752
|
+
const dex = rawDex.trim().toLowerCase();
|
|
2753
|
+
const rest = restParts.join(":");
|
|
2754
|
+
const normalizedBase = normalizeHyperliquidBaseSymbol(rest);
|
|
2755
|
+
if (!dex || !normalizedBase || normalizedBase === UNKNOWN_SYMBOL2) {
|
|
2756
|
+
return null;
|
|
2757
|
+
}
|
|
2758
|
+
return `${dex}:${normalizedBase}`;
|
|
2759
|
+
}
|
|
2760
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
2761
|
+
if (pair) return pair;
|
|
2762
|
+
return normalizeHyperliquidBaseSymbol(trimmed);
|
|
2763
|
+
}
|
|
2764
|
+
function resolveHyperliquidSymbol(asset, override) {
|
|
2765
|
+
const raw = override && override.trim().length > 0 ? override.trim() : asset.trim();
|
|
2766
|
+
if (!raw) return raw;
|
|
2767
|
+
if (raw.startsWith("@")) return raw;
|
|
2768
|
+
if (raw.includes(":")) {
|
|
2769
|
+
const [dexRaw, ...restParts] = raw.split(":");
|
|
2770
|
+
const dex = dexRaw.trim().toLowerCase();
|
|
2771
|
+
const rest = restParts.join(":");
|
|
2772
|
+
const normalizedBase = normalizeHyperliquidBaseSymbol(rest) ?? canonicalizeHyperliquidTokenCase(rest);
|
|
2773
|
+
if (!dex) return normalizedBase;
|
|
2774
|
+
return `${dex}:${normalizedBase}`;
|
|
2775
|
+
}
|
|
2776
|
+
if (raw.includes("/")) {
|
|
2777
|
+
return resolveHyperliquidPair(raw) ?? raw;
|
|
2778
|
+
}
|
|
2779
|
+
if (raw.includes("-")) {
|
|
2780
|
+
return resolveHyperliquidPair(raw) ?? raw;
|
|
2781
|
+
}
|
|
2782
|
+
return normalizeHyperliquidBaseSymbol(raw) ?? canonicalizeHyperliquidTokenCase(raw);
|
|
2783
|
+
}
|
|
2784
|
+
function resolveHyperliquidPerpSymbol(asset) {
|
|
2785
|
+
const raw = asset.trim();
|
|
2786
|
+
if (!raw) return raw;
|
|
2787
|
+
const dex = extractHyperliquidDex(raw);
|
|
2788
|
+
const base2 = normalizeHyperliquidBaseSymbol(raw) ?? raw.toUpperCase();
|
|
2789
|
+
return dex ? `${dex}:${base2}` : base2;
|
|
2790
|
+
}
|
|
2791
|
+
function resolveHyperliquidSpotSymbol(asset, defaultQuote = "USDC") {
|
|
2792
|
+
const quote = defaultQuote.trim().toUpperCase() || "USDC";
|
|
2793
|
+
const raw = asset.trim().toUpperCase();
|
|
2794
|
+
if (!raw) {
|
|
2795
|
+
return { symbol: raw, base: raw, quote };
|
|
2796
|
+
}
|
|
2797
|
+
const pair = resolveHyperliquidPair(raw);
|
|
2798
|
+
if (pair) {
|
|
2799
|
+
const [base3, pairQuote] = pair.split("/");
|
|
2800
|
+
return {
|
|
2801
|
+
symbol: pair,
|
|
2802
|
+
base: base3?.trim() ?? raw,
|
|
2803
|
+
quote: pairQuote?.trim() ?? quote
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
const base2 = normalizeHyperliquidBaseSymbol(raw) ?? raw;
|
|
2807
|
+
return { symbol: `${base2}/${quote}`, base: base2, quote };
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2546
2810
|
// src/adapters/hyperliquid/info.ts
|
|
2547
2811
|
async function postInfo(environment, payload) {
|
|
2548
2812
|
const baseUrl = API_BASES[environment];
|
|
@@ -2638,6 +2902,9 @@ var HyperliquidInfoClient = class {
|
|
|
2638
2902
|
async function fetchHyperliquidMeta(environment = "mainnet") {
|
|
2639
2903
|
return postInfo(environment, { type: "meta" });
|
|
2640
2904
|
}
|
|
2905
|
+
async function fetchHyperliquidDexMeta(environment = "mainnet", dex) {
|
|
2906
|
+
return postInfo(environment, { type: "meta", dex });
|
|
2907
|
+
}
|
|
2641
2908
|
async function fetchHyperliquidMetaAndAssetCtxs(environment = "mainnet") {
|
|
2642
2909
|
return postInfo(environment, { type: "metaAndAssetCtxs" });
|
|
2643
2910
|
}
|
|
@@ -3425,264 +3692,6 @@ function resolveHyperliquidStoreNetwork(environment) {
|
|
|
3425
3692
|
return environment === "mainnet" ? "hyperliquid" : "hyperliquid-testnet";
|
|
3426
3693
|
}
|
|
3427
3694
|
|
|
3428
|
-
// src/adapters/hyperliquid/symbols.ts
|
|
3429
|
-
var UNKNOWN_SYMBOL2 = "UNKNOWN";
|
|
3430
|
-
function extractHyperliquidDex(symbol) {
|
|
3431
|
-
const idx = symbol.indexOf(":");
|
|
3432
|
-
if (idx <= 0) return null;
|
|
3433
|
-
const dex = symbol.slice(0, idx).trim().toLowerCase();
|
|
3434
|
-
return dex || null;
|
|
3435
|
-
}
|
|
3436
|
-
function parseHyperliquidSymbol(value) {
|
|
3437
|
-
if (!value) return null;
|
|
3438
|
-
const trimmed = value.trim();
|
|
3439
|
-
if (!trimmed) return null;
|
|
3440
|
-
if (trimmed.startsWith("@")) {
|
|
3441
|
-
return {
|
|
3442
|
-
raw: trimmed,
|
|
3443
|
-
kind: "spotIndex",
|
|
3444
|
-
normalized: trimmed,
|
|
3445
|
-
routeTicker: trimmed,
|
|
3446
|
-
displaySymbol: trimmed,
|
|
3447
|
-
base: null,
|
|
3448
|
-
quote: null,
|
|
3449
|
-
pair: null,
|
|
3450
|
-
dex: null,
|
|
3451
|
-
leverageMode: "cross"
|
|
3452
|
-
};
|
|
3453
|
-
}
|
|
3454
|
-
const dex = extractHyperliquidDex(trimmed);
|
|
3455
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
3456
|
-
const base2 = normalizeHyperliquidBaseSymbol(trimmed);
|
|
3457
|
-
if (dex) {
|
|
3458
|
-
if (!base2) return null;
|
|
3459
|
-
return {
|
|
3460
|
-
raw: trimmed,
|
|
3461
|
-
kind: "perp",
|
|
3462
|
-
normalized: `${dex}:${base2}`,
|
|
3463
|
-
routeTicker: `${dex}:${base2}`,
|
|
3464
|
-
displaySymbol: `${dex.toUpperCase()}:${base2}-USDC`,
|
|
3465
|
-
base: base2,
|
|
3466
|
-
quote: null,
|
|
3467
|
-
pair: null,
|
|
3468
|
-
dex,
|
|
3469
|
-
leverageMode: "isolated"
|
|
3470
|
-
};
|
|
3471
|
-
}
|
|
3472
|
-
if (pair) {
|
|
3473
|
-
const [pairBase, pairQuote] = pair.split("/");
|
|
3474
|
-
return {
|
|
3475
|
-
raw: trimmed,
|
|
3476
|
-
kind: "spot",
|
|
3477
|
-
normalized: pair,
|
|
3478
|
-
routeTicker: pair.replace("/", "-"),
|
|
3479
|
-
displaySymbol: pair.replace("/", "-"),
|
|
3480
|
-
base: pairBase ?? null,
|
|
3481
|
-
quote: pairQuote ?? null,
|
|
3482
|
-
pair,
|
|
3483
|
-
dex: null,
|
|
3484
|
-
leverageMode: "cross"
|
|
3485
|
-
};
|
|
3486
|
-
}
|
|
3487
|
-
if (!base2) return null;
|
|
3488
|
-
return {
|
|
3489
|
-
raw: trimmed,
|
|
3490
|
-
kind: "perp",
|
|
3491
|
-
normalized: base2,
|
|
3492
|
-
routeTicker: base2,
|
|
3493
|
-
displaySymbol: `${base2}-USDC`,
|
|
3494
|
-
base: base2,
|
|
3495
|
-
quote: null,
|
|
3496
|
-
pair: null,
|
|
3497
|
-
dex: null,
|
|
3498
|
-
leverageMode: "cross"
|
|
3499
|
-
};
|
|
3500
|
-
}
|
|
3501
|
-
function normalizeSpotTokenName2(value) {
|
|
3502
|
-
const raw = (value ?? "").trim();
|
|
3503
|
-
if (!raw) return "";
|
|
3504
|
-
if (raw.endsWith("0") && raw.length > 1) {
|
|
3505
|
-
return raw.slice(0, -1);
|
|
3506
|
-
}
|
|
3507
|
-
return raw;
|
|
3508
|
-
}
|
|
3509
|
-
function normalizeHyperliquidBaseSymbol(value) {
|
|
3510
|
-
if (!value) return null;
|
|
3511
|
-
const trimmed = value.trim();
|
|
3512
|
-
if (!trimmed) return null;
|
|
3513
|
-
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
3514
|
-
const base2 = withoutDex.split("-")[0] ?? withoutDex;
|
|
3515
|
-
const baseNoPair = base2.split("/")[0] ?? base2;
|
|
3516
|
-
const normalized = baseNoPair.trim().toUpperCase();
|
|
3517
|
-
if (!normalized || normalized === UNKNOWN_SYMBOL2) return null;
|
|
3518
|
-
return normalized;
|
|
3519
|
-
}
|
|
3520
|
-
function normalizeHyperliquidMetaSymbol(symbol) {
|
|
3521
|
-
const trimmed = symbol.trim();
|
|
3522
|
-
const noDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
3523
|
-
const noPair = noDex.split("-")[0] ?? noDex;
|
|
3524
|
-
return (noPair.split("/")[0] ?? noPair).trim();
|
|
3525
|
-
}
|
|
3526
|
-
function resolveHyperliquidPair(value) {
|
|
3527
|
-
if (!value) return null;
|
|
3528
|
-
const trimmed = value.trim();
|
|
3529
|
-
if (!trimmed) return null;
|
|
3530
|
-
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
3531
|
-
if (withoutDex.includes("/")) {
|
|
3532
|
-
return withoutDex.toUpperCase();
|
|
3533
|
-
}
|
|
3534
|
-
if (withoutDex.includes("-")) {
|
|
3535
|
-
const [base2, ...rest] = withoutDex.split("-");
|
|
3536
|
-
const quote = rest.join("-").trim();
|
|
3537
|
-
if (!base2 || !quote) return null;
|
|
3538
|
-
return `${base2.toUpperCase()}/${quote.toUpperCase()}`;
|
|
3539
|
-
}
|
|
3540
|
-
return null;
|
|
3541
|
-
}
|
|
3542
|
-
function resolveHyperliquidLeverageMode(symbol) {
|
|
3543
|
-
return symbol.includes(":") ? "isolated" : "cross";
|
|
3544
|
-
}
|
|
3545
|
-
function resolveHyperliquidProfileChain(environment) {
|
|
3546
|
-
return environment === "testnet" ? "hyperliquid-testnet" : "hyperliquid";
|
|
3547
|
-
}
|
|
3548
|
-
function buildHyperliquidProfileAssets(params) {
|
|
3549
|
-
const chain = resolveHyperliquidProfileChain(params.environment);
|
|
3550
|
-
return params.assets.map((asset) => {
|
|
3551
|
-
const symbols = asset.assetSymbols.map((symbol) => normalizeHyperliquidBaseSymbol(symbol)).filter((symbol) => Boolean(symbol));
|
|
3552
|
-
if (symbols.length === 0) return null;
|
|
3553
|
-
const explicitPair = typeof asset.pair === "string" ? resolveHyperliquidPair(asset.pair) : null;
|
|
3554
|
-
const derivedPair = symbols.length === 1 ? resolveHyperliquidPair(asset.assetSymbols[0] ?? symbols[0]) : null;
|
|
3555
|
-
const pair = explicitPair ?? derivedPair ?? void 0;
|
|
3556
|
-
const leverage = typeof asset.leverage === "number" && Number.isFinite(asset.leverage) && asset.leverage > 0 ? asset.leverage : void 0;
|
|
3557
|
-
const walletAddress = typeof asset.walletAddress === "string" && asset.walletAddress.trim().length > 0 ? asset.walletAddress.trim() : void 0;
|
|
3558
|
-
return {
|
|
3559
|
-
venue: "hyperliquid",
|
|
3560
|
-
chain,
|
|
3561
|
-
assetSymbols: symbols,
|
|
3562
|
-
...pair ? { pair } : {},
|
|
3563
|
-
...leverage ? { leverage } : {},
|
|
3564
|
-
...walletAddress ? { walletAddress } : {}
|
|
3565
|
-
};
|
|
3566
|
-
}).filter((asset) => asset !== null);
|
|
3567
|
-
}
|
|
3568
|
-
function parseSpotPairSymbol(symbol) {
|
|
3569
|
-
const trimmed = symbol.trim();
|
|
3570
|
-
if (!trimmed.includes("/")) return null;
|
|
3571
|
-
const [rawBase, rawQuote] = trimmed.split("/");
|
|
3572
|
-
const base2 = rawBase?.trim().toUpperCase() ?? "";
|
|
3573
|
-
const quote = rawQuote?.trim().toUpperCase() ?? "";
|
|
3574
|
-
if (!base2 || !quote) return null;
|
|
3575
|
-
return { base: base2, quote };
|
|
3576
|
-
}
|
|
3577
|
-
function isHyperliquidSpotSymbol(symbol) {
|
|
3578
|
-
const trimmed = symbol.trim();
|
|
3579
|
-
if (!trimmed) return false;
|
|
3580
|
-
if (trimmed.startsWith("@") || trimmed.includes("/")) return true;
|
|
3581
|
-
if (trimmed.includes(":")) return false;
|
|
3582
|
-
return resolveHyperliquidPair(trimmed) !== null;
|
|
3583
|
-
}
|
|
3584
|
-
function resolveHyperliquidMarketDataCoin(value) {
|
|
3585
|
-
if (!value) return null;
|
|
3586
|
-
const trimmed = value.trim();
|
|
3587
|
-
if (!trimmed) return null;
|
|
3588
|
-
if (trimmed.startsWith("@")) return trimmed;
|
|
3589
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
3590
|
-
if (pair && !extractHyperliquidDex(trimmed)) {
|
|
3591
|
-
return pair;
|
|
3592
|
-
}
|
|
3593
|
-
return trimmed;
|
|
3594
|
-
}
|
|
3595
|
-
function resolveSpotMidCandidates(baseSymbol) {
|
|
3596
|
-
const base2 = baseSymbol.trim().toUpperCase();
|
|
3597
|
-
if (!base2) return [];
|
|
3598
|
-
const candidates = [base2];
|
|
3599
|
-
if (base2.startsWith("U") && base2.length > 1) {
|
|
3600
|
-
candidates.push(base2.slice(1));
|
|
3601
|
-
}
|
|
3602
|
-
return Array.from(new Set(candidates));
|
|
3603
|
-
}
|
|
3604
|
-
function resolveSpotTokenCandidates(value) {
|
|
3605
|
-
const normalized = normalizeSpotTokenName2(value).toUpperCase();
|
|
3606
|
-
if (!normalized) return [];
|
|
3607
|
-
const candidates = [normalized];
|
|
3608
|
-
if (normalized.startsWith("U") && normalized.length > 1) {
|
|
3609
|
-
candidates.push(normalized.slice(1));
|
|
3610
|
-
}
|
|
3611
|
-
return Array.from(new Set(candidates));
|
|
3612
|
-
}
|
|
3613
|
-
function resolveHyperliquidOrderSymbol(value) {
|
|
3614
|
-
if (!value) return null;
|
|
3615
|
-
const trimmed = value.trim();
|
|
3616
|
-
if (!trimmed) return null;
|
|
3617
|
-
if (trimmed.startsWith("@")) return trimmed;
|
|
3618
|
-
if (trimmed.includes(":")) {
|
|
3619
|
-
const [rawDex, ...restParts] = trimmed.split(":");
|
|
3620
|
-
const dex = rawDex.trim().toLowerCase();
|
|
3621
|
-
const rest = restParts.join(":");
|
|
3622
|
-
const base2 = rest.split("/")[0]?.split("-")[0] ?? rest;
|
|
3623
|
-
const normalizedBase = base2.trim().toUpperCase();
|
|
3624
|
-
if (!dex || !normalizedBase || normalizedBase === UNKNOWN_SYMBOL2) {
|
|
3625
|
-
return null;
|
|
3626
|
-
}
|
|
3627
|
-
return `${dex}:${normalizedBase}`;
|
|
3628
|
-
}
|
|
3629
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
3630
|
-
if (pair) return pair;
|
|
3631
|
-
return normalizeHyperliquidBaseSymbol(trimmed);
|
|
3632
|
-
}
|
|
3633
|
-
function resolveHyperliquidSymbol(asset, override) {
|
|
3634
|
-
const raw = override && override.trim().length > 0 ? override.trim() : asset.trim();
|
|
3635
|
-
if (!raw) return raw;
|
|
3636
|
-
if (raw.startsWith("@")) return raw;
|
|
3637
|
-
if (raw.includes(":")) {
|
|
3638
|
-
const [dexRaw, ...restParts] = raw.split(":");
|
|
3639
|
-
const dex = dexRaw.trim().toLowerCase();
|
|
3640
|
-
const rest = restParts.join(":");
|
|
3641
|
-
const base3 = rest.split("/")[0]?.split("-")[0] ?? rest;
|
|
3642
|
-
const normalizedBase = base3.trim().toUpperCase();
|
|
3643
|
-
if (!dex) return normalizedBase;
|
|
3644
|
-
return `${dex}:${normalizedBase}`;
|
|
3645
|
-
}
|
|
3646
|
-
if (raw.includes("/")) {
|
|
3647
|
-
return raw.toUpperCase();
|
|
3648
|
-
}
|
|
3649
|
-
if (raw.includes("-")) {
|
|
3650
|
-
const [base3, ...rest] = raw.split("-");
|
|
3651
|
-
const quote = rest.join("-").trim();
|
|
3652
|
-
if (base3 && quote) {
|
|
3653
|
-
return `${base3.toUpperCase()}/${quote.toUpperCase()}`;
|
|
3654
|
-
}
|
|
3655
|
-
}
|
|
3656
|
-
const base2 = raw.split("-")[0] ?? raw;
|
|
3657
|
-
const baseNoPair = base2.split("/")[0] ?? base2;
|
|
3658
|
-
return baseNoPair.trim().toUpperCase();
|
|
3659
|
-
}
|
|
3660
|
-
function resolveHyperliquidPerpSymbol(asset) {
|
|
3661
|
-
const raw = asset.trim();
|
|
3662
|
-
if (!raw) return raw;
|
|
3663
|
-
const dex = extractHyperliquidDex(raw);
|
|
3664
|
-
const base2 = normalizeHyperliquidBaseSymbol(raw) ?? raw.toUpperCase();
|
|
3665
|
-
return dex ? `${dex}:${base2}` : base2;
|
|
3666
|
-
}
|
|
3667
|
-
function resolveHyperliquidSpotSymbol(asset, defaultQuote = "USDC") {
|
|
3668
|
-
const quote = defaultQuote.trim().toUpperCase() || "USDC";
|
|
3669
|
-
const raw = asset.trim().toUpperCase();
|
|
3670
|
-
if (!raw) {
|
|
3671
|
-
return { symbol: raw, base: raw, quote };
|
|
3672
|
-
}
|
|
3673
|
-
const pair = resolveHyperliquidPair(raw);
|
|
3674
|
-
if (pair) {
|
|
3675
|
-
const [base3, pairQuote] = pair.split("/");
|
|
3676
|
-
return {
|
|
3677
|
-
symbol: pair,
|
|
3678
|
-
base: base3?.trim() ?? raw,
|
|
3679
|
-
quote: pairQuote?.trim() ?? quote
|
|
3680
|
-
};
|
|
3681
|
-
}
|
|
3682
|
-
const base2 = normalizeHyperliquidBaseSymbol(raw) ?? raw;
|
|
3683
|
-
return { symbol: `${base2}/${quote}`, base: base2, quote };
|
|
3684
|
-
}
|
|
3685
|
-
|
|
3686
3695
|
// src/adapters/hyperliquid/strategy.ts
|
|
3687
3696
|
function clampDcaWeight(value) {
|
|
3688
3697
|
if (typeof value !== "number" || !Number.isFinite(value)) return 0;
|
|
@@ -4728,12 +4737,14 @@ async function placeHyperliquidOrder(options) {
|
|
|
4728
4737
|
const action = {
|
|
4729
4738
|
type: "order",
|
|
4730
4739
|
orders: preparedOrders,
|
|
4731
|
-
grouping
|
|
4732
|
-
|
|
4740
|
+
grouping
|
|
4741
|
+
};
|
|
4742
|
+
if (orders.every((intent) => supportsHyperliquidBuilderFee(intent))) {
|
|
4743
|
+
action.builder = {
|
|
4733
4744
|
b: normalizeAddress(BUILDER_CODE.address),
|
|
4734
4745
|
f: BUILDER_CODE.fee
|
|
4735
|
-
}
|
|
4736
|
-
}
|
|
4746
|
+
};
|
|
4747
|
+
}
|
|
4737
4748
|
const effectiveNonce = resolveRequiredNonce({
|
|
4738
4749
|
nonce,
|
|
4739
4750
|
nonceSource: options.nonceSource,
|
|
@@ -5158,7 +5169,6 @@ async function placeHyperliquidOrder2(options) {
|
|
|
5158
5169
|
expiresAfter,
|
|
5159
5170
|
nonce
|
|
5160
5171
|
} = options;
|
|
5161
|
-
const effectiveBuilder = BUILDER_CODE;
|
|
5162
5172
|
if (!wallet2?.account || !wallet2.walletClient) {
|
|
5163
5173
|
throw new Error("Hyperliquid order signing requires a wallet with signing capabilities.");
|
|
5164
5174
|
}
|
|
@@ -5210,10 +5220,10 @@ async function placeHyperliquidOrder2(options) {
|
|
|
5210
5220
|
orders: preparedOrders,
|
|
5211
5221
|
grouping
|
|
5212
5222
|
};
|
|
5213
|
-
if (
|
|
5223
|
+
if (orders.every((intent) => supportsHyperliquidBuilderFee(intent))) {
|
|
5214
5224
|
action.builder = {
|
|
5215
|
-
b: normalizeAddress(
|
|
5216
|
-
f:
|
|
5225
|
+
b: normalizeAddress(BUILDER_CODE.address),
|
|
5226
|
+
f: BUILDER_CODE.fee
|
|
5217
5227
|
};
|
|
5218
5228
|
}
|
|
5219
5229
|
const effectiveNonce = resolveRequiredNonce2({
|
|
@@ -7405,6 +7415,6 @@ function buildBacktestDecisionSeriesInput(request) {
|
|
|
7405
7415
|
};
|
|
7406
7416
|
}
|
|
7407
7417
|
|
|
7408
|
-
export { AIAbortError, AIError, AIFetchError, AIResponseError, BACKTEST_DECISION_MODE, DEFAULT_BASE_URL, DEFAULT_CHAIN, DEFAULT_FACILITATOR, DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, DEFAULT_HYPERLIQUID_TPSL_MARKET_SLIPPAGE_BPS, DEFAULT_MODEL, DEFAULT_OPENPOND_GATEWAY_URL2 as DEFAULT_OPENPOND_GATEWAY_URL, DEFAULT_TIMEOUT_MS, DEFAULT_TOKENS, HTTP_METHODS2 as HTTP_METHODS, HyperliquidApiError, HyperliquidBuilderApprovalError, HyperliquidExchangeClient, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidTermsError, NewsSignalClient, PAYMENT_HEADERS, POLYMARKET_CHAIN_ID, POLYMARKET_CLOB_AUTH_DOMAIN, POLYMARKET_CLOB_DOMAIN, POLYMARKET_ENDPOINTS, POLYMARKET_EXCHANGE_ADDRESSES, PolymarketApiError, PolymarketAuthError, PolymarketExchangeClient, PolymarketInfoClient, SUPPORTED_CURRENCIES, StoreError, WEBSEARCH_TOOL_DEFINITION, WEBSEARCH_TOOL_NAME, X402BrowserClient, X402Client, X402PaymentRequiredError, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, backtestDecisionRequestSchema, batchModifyHyperliquidOrders, buildBacktestDecisionSeriesInput, buildHmacSignature, buildHyperliquidMarketIdentity, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, buildL1Headers, buildL2Headers, buildPolymarketOrderAmounts, buildSignedOrderPayload, cancelAllHyperliquidOrders, cancelAllPolymarketOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, cancelMarketPolymarketOrders, cancelPolymarketOrder, cancelPolymarketOrders, chains, clampHyperliquidAbs, clampHyperliquidFloat, clampHyperliquidInt, computeHyperliquidMarketIocLimitPrice, createAIClient, createDevServer, createHyperliquidSubAccount, createMcpAdapter, createMonotonicNonceFactory, createPolymarketApiKey, createStdioServer, defineX402Payment, depositToHyperliquidBridge, derivePolymarketApiKey, ensureTextContent, estimateCountBack, estimateHyperliquidLiquidationPrice, evaluateNewsContinuationGate, executeTool, extractHyperliquidDex, extractHyperliquidOrderIds, fetchHyperliquidAllMids, fetchHyperliquidAssetCtxs, fetchHyperliquidBars, fetchHyperliquidClearinghouseState, fetchHyperliquidFrontendOpenOrders, fetchHyperliquidHistoricalOrders, fetchHyperliquidMeta, fetchHyperliquidMetaAndAssetCtxs, fetchHyperliquidOpenOrders, fetchHyperliquidOrderStatus, fetchHyperliquidPerpMarketInfo, fetchHyperliquidPreTransferCheck, fetchHyperliquidSizeDecimals, fetchHyperliquidSpotAccountValue, fetchHyperliquidSpotAssetCtxs, fetchHyperliquidSpotClearinghouseState, fetchHyperliquidSpotMarketInfo, fetchHyperliquidSpotMeta, fetchHyperliquidSpotMetaAndAssetCtxs, fetchHyperliquidSpotTickSize, fetchHyperliquidSpotUsdPriceMap, fetchHyperliquidTickSize, fetchHyperliquidUserFills, fetchHyperliquidUserFillsByTime, fetchHyperliquidUserRateLimit, fetchNewsEventSignal, fetchNewsPropositionSignal, fetchPolymarketMarket, fetchPolymarketMarkets, fetchPolymarketMidpoint, fetchPolymarketOrderbook, fetchPolymarketPrice, fetchPolymarketPriceHistory, flattenMessageContent, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, generateText, getHyperliquidMaxBuilderFee, getModelConfig, getMyPerformance, getMyTools, getRpcUrl, getX402PaymentContext, isHyperliquidSpotSymbol, isStreamingSupported, isToolCallingSupported, listModels, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeModelName, normalizeNumberArrayish, normalizeSpotTokenName2 as normalizeSpotTokenName, normalizeStringArrayish, parseHyperliquidJson, parseHyperliquidSymbol, parseSpotPairSymbol, parseTimeToSeconds, payX402, payX402WithWallet, placeHyperliquidOrder2 as placeHyperliquidOrder, placeHyperliquidOrderWithTpSl, placeHyperliquidPositionTpSl, placeHyperliquidTwapOrder, placePolymarketOrder, planHyperliquidTrade, postAgentDigest, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, registry, requireX402Payment, reserveHyperliquidRequestWeight, resolutionToSeconds, resolveBacktestAccountValueUsd, resolveBacktestMode, resolveBacktestWindow, resolveConfig2 as resolveConfig, resolveExchangeAddress, resolveHyperliquidAbstractionFromMode, resolveHyperliquidBudgetUsd, resolveHyperliquidCadenceCron, resolveHyperliquidCadenceFromResolution, resolveHyperliquidChain, resolveHyperliquidChainConfig, resolveHyperliquidDcaSymbolEntries, resolveHyperliquidErrorDetail, resolveHyperliquidHourlyInterval, resolveHyperliquidIntervalCron, resolveHyperliquidLeverageMode, resolveHyperliquidMarketDataCoin, resolveHyperliquidMaxPerRunUsd, resolveHyperliquidOrderRef, resolveHyperliquidOrderSymbol, resolveHyperliquidPair, resolveHyperliquidPerpSymbol, resolveHyperliquidProfileChain, resolveHyperliquidRpcEnvVar, resolveHyperliquidScheduleEvery, resolveHyperliquidScheduleUnit, resolveHyperliquidSpotSymbol, resolveHyperliquidStoreNetwork, resolveHyperliquidSymbol, resolveHyperliquidTargetSize, resolveNewsGatewayBase, resolvePolymarketBaseUrl, resolveRuntimePath, resolveSpotMidCandidates, resolveSpotTokenCandidates, resolveToolset, responseToToolResponse, retrieve, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, store, streamText, tokens, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, wallet, walletToolkit, withX402Payment, withdrawFromHyperliquid };
|
|
7418
|
+
export { AIAbortError, AIError, AIFetchError, AIResponseError, BACKTEST_DECISION_MODE, DEFAULT_BASE_URL, DEFAULT_CHAIN, DEFAULT_FACILITATOR, DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, DEFAULT_HYPERLIQUID_TPSL_MARKET_SLIPPAGE_BPS, DEFAULT_MODEL, DEFAULT_OPENPOND_GATEWAY_URL2 as DEFAULT_OPENPOND_GATEWAY_URL, DEFAULT_TIMEOUT_MS, DEFAULT_TOKENS, HTTP_METHODS2 as HTTP_METHODS, HyperliquidApiError, HyperliquidBuilderApprovalError, HyperliquidExchangeClient, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidTermsError, NewsSignalClient, PAYMENT_HEADERS, POLYMARKET_CHAIN_ID, POLYMARKET_CLOB_AUTH_DOMAIN, POLYMARKET_CLOB_DOMAIN, POLYMARKET_ENDPOINTS, POLYMARKET_EXCHANGE_ADDRESSES, PolymarketApiError, PolymarketAuthError, PolymarketExchangeClient, PolymarketInfoClient, SUPPORTED_CURRENCIES, StoreError, WEBSEARCH_TOOL_DEFINITION, WEBSEARCH_TOOL_NAME, X402BrowserClient, X402Client, X402PaymentRequiredError, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, backtestDecisionRequestSchema, batchModifyHyperliquidOrders, buildBacktestDecisionSeriesInput, buildHmacSignature, buildHyperliquidMarketIdentity, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, buildL1Headers, buildL2Headers, buildPolymarketOrderAmounts, buildSignedOrderPayload, cancelAllHyperliquidOrders, cancelAllPolymarketOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, cancelMarketPolymarketOrders, cancelPolymarketOrder, cancelPolymarketOrders, chains, clampHyperliquidAbs, clampHyperliquidFloat, clampHyperliquidInt, computeHyperliquidMarketIocLimitPrice, createAIClient, createDevServer, createHyperliquidSubAccount, createMcpAdapter, createMonotonicNonceFactory, createPolymarketApiKey, createStdioServer, defineX402Payment, depositToHyperliquidBridge, derivePolymarketApiKey, ensureTextContent, estimateCountBack, estimateHyperliquidLiquidationPrice, evaluateNewsContinuationGate, executeTool, extractHyperliquidDex, extractHyperliquidOrderIds, fetchHyperliquidAllMids, fetchHyperliquidAssetCtxs, fetchHyperliquidBars, fetchHyperliquidClearinghouseState, fetchHyperliquidDexMeta, fetchHyperliquidFrontendOpenOrders, fetchHyperliquidHistoricalOrders, fetchHyperliquidMeta, fetchHyperliquidMetaAndAssetCtxs, fetchHyperliquidOpenOrders, fetchHyperliquidOrderStatus, fetchHyperliquidPerpMarketInfo, fetchHyperliquidPreTransferCheck, fetchHyperliquidSizeDecimals, fetchHyperliquidSpotAccountValue, fetchHyperliquidSpotAssetCtxs, fetchHyperliquidSpotClearinghouseState, fetchHyperliquidSpotMarketInfo, fetchHyperliquidSpotMeta, fetchHyperliquidSpotMetaAndAssetCtxs, fetchHyperliquidSpotTickSize, fetchHyperliquidSpotUsdPriceMap, fetchHyperliquidTickSize, fetchHyperliquidUserFills, fetchHyperliquidUserFillsByTime, fetchHyperliquidUserRateLimit, fetchNewsEventSignal, fetchNewsPropositionSignal, fetchPolymarketMarket, fetchPolymarketMarkets, fetchPolymarketMidpoint, fetchPolymarketOrderbook, fetchPolymarketPrice, fetchPolymarketPriceHistory, flattenMessageContent, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, generateText, getHyperliquidMaxBuilderFee, getModelConfig, getMyPerformance, getMyTools, getRpcUrl, getX402PaymentContext, isHyperliquidSpotSymbol, isStreamingSupported, isToolCallingSupported, listModels, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeModelName, normalizeNumberArrayish, normalizeSpotTokenName2 as normalizeSpotTokenName, normalizeStringArrayish, parseHyperliquidJson, parseHyperliquidSymbol, parseSpotPairSymbol, parseTimeToSeconds, payX402, payX402WithWallet, placeHyperliquidOrder2 as placeHyperliquidOrder, placeHyperliquidOrderWithTpSl, placeHyperliquidPositionTpSl, placeHyperliquidTwapOrder, placePolymarketOrder, planHyperliquidTrade, postAgentDigest, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, registry, requireX402Payment, reserveHyperliquidRequestWeight, resolutionToSeconds, resolveBacktestAccountValueUsd, resolveBacktestMode, resolveBacktestWindow, resolveConfig2 as resolveConfig, resolveExchangeAddress, resolveHyperliquidAbstractionFromMode, resolveHyperliquidBudgetUsd, resolveHyperliquidCadenceCron, resolveHyperliquidCadenceFromResolution, resolveHyperliquidChain, resolveHyperliquidChainConfig, resolveHyperliquidDcaSymbolEntries, resolveHyperliquidErrorDetail, resolveHyperliquidHourlyInterval, resolveHyperliquidIntervalCron, resolveHyperliquidLeverageMode, resolveHyperliquidMarketDataCoin, resolveHyperliquidMaxPerRunUsd, resolveHyperliquidOrderRef, resolveHyperliquidOrderSymbol, resolveHyperliquidPair, resolveHyperliquidPerpSymbol, resolveHyperliquidProfileChain, resolveHyperliquidRpcEnvVar, resolveHyperliquidScheduleEvery, resolveHyperliquidScheduleUnit, resolveHyperliquidSpotSymbol, resolveHyperliquidStoreNetwork, resolveHyperliquidSymbol, resolveHyperliquidTargetSize, resolveNewsGatewayBase, resolvePolymarketBaseUrl, resolveRuntimePath, resolveSpotMidCandidates, resolveSpotTokenCandidates, resolveToolset, responseToToolResponse, retrieve, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, store, streamText, supportsHyperliquidBuilderFee, tokens, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, wallet, walletToolkit, withX402Payment, withdrawFromHyperliquid };
|
|
7409
7419
|
//# sourceMappingURL=index.js.map
|
|
7410
7420
|
//# sourceMappingURL=index.js.map
|