opentool 0.10.3 → 0.10.5
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/index.d.ts +104 -3
- package/dist/adapters/hyperliquid/index.js +332 -10
- package/dist/adapters/hyperliquid/index.js.map +1 -1
- package/dist/adapters/news/index.d.ts +176 -0
- package/dist/adapters/news/index.js +173 -0
- package/dist/adapters/news/index.js.map +1 -0
- package/dist/index.d.ts +35 -4
- package/dist/index.js +570 -34
- package/dist/index.js.map +1 -1
- package/dist/{types-3w880w_t.d.ts → types-rAQrDrah.d.ts} +3 -2
- package/dist/wallet/browser.d.ts +33 -0
- package/dist/wallet/browser.js +271 -0
- package/dist/wallet/browser.js.map +1 -0
- package/dist/wallet/index.d.ts +2 -2
- package/dist/wallet/index.js +15 -23
- package/dist/wallet/index.js.map +1 -1
- package/package.json +9 -1
- package/templates/base/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as WalletFullContext } from '../../types-rAQrDrah.js';
|
|
2
2
|
import { StoreOptions, StoreResponse } from '../../store/index.js';
|
|
3
3
|
import 'viem';
|
|
4
4
|
import 'viem/accounts';
|
|
@@ -357,7 +357,7 @@ declare function sendHyperliquidSpot(options: {
|
|
|
357
357
|
amount: string | number | bigint;
|
|
358
358
|
environment?: HyperliquidEnvironment;
|
|
359
359
|
nonce?: number;
|
|
360
|
-
nonceSource?: NonceSource;
|
|
360
|
+
nonceSource?: NonceSource | undefined;
|
|
361
361
|
}): Promise<HyperliquidExchangeResponse<unknown>>;
|
|
362
362
|
|
|
363
363
|
type HyperliquidChain = "arbitrum" | "arbitrum-sepolia";
|
|
@@ -375,6 +375,7 @@ declare function normalizeSpotTokenName(value?: string | null): string;
|
|
|
375
375
|
declare function normalizeHyperliquidBaseSymbol(value?: string | null): string | null;
|
|
376
376
|
declare function normalizeHyperliquidMetaSymbol(symbol: string): string;
|
|
377
377
|
declare function resolveHyperliquidPair(value?: string | null): string | null;
|
|
378
|
+
declare function resolveHyperliquidLeverageMode(symbol: string): "cross" | "isolated";
|
|
378
379
|
type HyperliquidProfileChain = "hyperliquid" | "hyperliquid-testnet";
|
|
379
380
|
type HyperliquidProfileAssetInput = {
|
|
380
381
|
assetSymbols: string[];
|
|
@@ -404,6 +405,72 @@ declare function resolveSpotMidCandidates(baseSymbol: string): string[];
|
|
|
404
405
|
declare function resolveSpotTokenCandidates(value: string): string[];
|
|
405
406
|
declare function resolveHyperliquidOrderSymbol(value?: string | null): string | null;
|
|
406
407
|
declare function resolveHyperliquidSymbol(asset: string, override?: string): string;
|
|
408
|
+
declare function resolveHyperliquidPerpSymbol(asset: string): string;
|
|
409
|
+
declare function resolveHyperliquidSpotSymbol(asset: string, defaultQuote?: string): {
|
|
410
|
+
symbol: string;
|
|
411
|
+
base: string;
|
|
412
|
+
quote: string;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
type HyperliquidExecutionMode = "long-only" | "long-short";
|
|
416
|
+
type HyperliquidTradeSignal = "buy" | "sell" | "hold" | "unknown";
|
|
417
|
+
type HyperliquidTradePlan = {
|
|
418
|
+
side: "buy" | "sell";
|
|
419
|
+
size: number;
|
|
420
|
+
reduceOnly: boolean;
|
|
421
|
+
targetSize: number;
|
|
422
|
+
};
|
|
423
|
+
interface HyperliquidTargetSizeConfig {
|
|
424
|
+
allocationMode: "percent_equity" | "fixed";
|
|
425
|
+
percentOfEquity: number;
|
|
426
|
+
maxPercentOfEquity: number;
|
|
427
|
+
amountUsd?: number;
|
|
428
|
+
}
|
|
429
|
+
interface HyperliquidTargetSizeExecution {
|
|
430
|
+
size?: number;
|
|
431
|
+
}
|
|
432
|
+
type HyperliquidDcaSymbolInput = {
|
|
433
|
+
symbol: string;
|
|
434
|
+
weight?: number;
|
|
435
|
+
} | string;
|
|
436
|
+
type HyperliquidDcaSymbolEntry = {
|
|
437
|
+
symbol: string;
|
|
438
|
+
weight: number;
|
|
439
|
+
};
|
|
440
|
+
type HyperliquidDcaNormalizedEntry = {
|
|
441
|
+
symbol: string;
|
|
442
|
+
weight: number;
|
|
443
|
+
normalizedWeight: number;
|
|
444
|
+
};
|
|
445
|
+
declare function resolveHyperliquidBudgetUsd(params: {
|
|
446
|
+
config: HyperliquidTargetSizeConfig;
|
|
447
|
+
accountValue: number | null;
|
|
448
|
+
}): number;
|
|
449
|
+
declare function resolveHyperliquidDcaSymbolEntries(inputs: HyperliquidDcaSymbolInput[] | undefined, fallbackSymbol: string): HyperliquidDcaSymbolEntry[];
|
|
450
|
+
declare function normalizeHyperliquidDcaEntries(params: {
|
|
451
|
+
entries: Array<{
|
|
452
|
+
symbol: string;
|
|
453
|
+
weight?: number;
|
|
454
|
+
}> | undefined;
|
|
455
|
+
fallbackSymbol: string;
|
|
456
|
+
}): HyperliquidDcaNormalizedEntry[];
|
|
457
|
+
declare function resolveHyperliquidMaxPerRunUsd(targetNotionalUsd: number, hedgeRatio: number): number;
|
|
458
|
+
declare function clampHyperliquidAbs(value: number, limit: number): number;
|
|
459
|
+
declare function resolveHyperliquidTargetSize(params: {
|
|
460
|
+
config: HyperliquidTargetSizeConfig;
|
|
461
|
+
execution: HyperliquidTargetSizeExecution;
|
|
462
|
+
accountValue: number | null;
|
|
463
|
+
currentPrice: number;
|
|
464
|
+
}): {
|
|
465
|
+
targetSize: number;
|
|
466
|
+
budgetUsd: number;
|
|
467
|
+
};
|
|
468
|
+
declare function planHyperliquidTrade(params: {
|
|
469
|
+
signal: HyperliquidTradeSignal;
|
|
470
|
+
mode: HyperliquidExecutionMode;
|
|
471
|
+
currentSize: number;
|
|
472
|
+
targetSize: number;
|
|
473
|
+
}): HyperliquidTradePlan | null;
|
|
407
474
|
|
|
408
475
|
type HyperliquidTickSize = {
|
|
409
476
|
tickSizeInt: bigint;
|
|
@@ -491,6 +558,14 @@ type HyperliquidBar = {
|
|
|
491
558
|
volume?: number;
|
|
492
559
|
[key: string]: unknown;
|
|
493
560
|
};
|
|
561
|
+
type HyperliquidIndicatorBar = {
|
|
562
|
+
time: number;
|
|
563
|
+
open: number;
|
|
564
|
+
high: number;
|
|
565
|
+
low: number;
|
|
566
|
+
close: number;
|
|
567
|
+
volume: number;
|
|
568
|
+
};
|
|
494
569
|
type HyperliquidPerpMarketInfo = {
|
|
495
570
|
symbol: string;
|
|
496
571
|
price: number;
|
|
@@ -518,6 +593,7 @@ declare function fetchHyperliquidBars(params: {
|
|
|
518
593
|
toSeconds?: number;
|
|
519
594
|
gatewayBase?: string | null;
|
|
520
595
|
}): Promise<HyperliquidBar[]>;
|
|
596
|
+
declare function normalizeHyperliquidIndicatorBars(bars: HyperliquidBar[]): HyperliquidIndicatorBar[];
|
|
521
597
|
declare function fetchHyperliquidTickSize(params: {
|
|
522
598
|
environment: HyperliquidEnvironment;
|
|
523
599
|
symbol: string;
|
|
@@ -556,6 +632,27 @@ declare const __hyperliquidMarketDataInternals: {
|
|
|
556
632
|
formatScaledInt: typeof formatScaledInt;
|
|
557
633
|
};
|
|
558
634
|
|
|
635
|
+
type HyperliquidScheduleUnit = "minutes" | "hours";
|
|
636
|
+
type HyperliquidCadence = "daily" | "hourly" | "weekly" | "twice-weekly" | "monthly";
|
|
637
|
+
type HyperliquidResolution = "1" | "5" | "15" | "30" | "60" | "240" | "1D" | "1W";
|
|
638
|
+
declare const DEFAULT_HYPERLIQUID_CADENCE_CRON: Record<HyperliquidCadence, string>;
|
|
639
|
+
declare function parseHyperliquidJson(raw: string | null): unknown | null;
|
|
640
|
+
declare function clampHyperliquidInt(value: unknown, min: number, max: number, fallback: number): number;
|
|
641
|
+
declare function clampHyperliquidFloat(value: unknown, min: number, max: number, fallback: number): number;
|
|
642
|
+
declare function resolveHyperliquidScheduleEvery(input: unknown, options?: {
|
|
643
|
+
min?: number;
|
|
644
|
+
max?: number;
|
|
645
|
+
fallback?: number;
|
|
646
|
+
}): number;
|
|
647
|
+
declare function resolveHyperliquidScheduleUnit(input: unknown, fallback?: HyperliquidScheduleUnit): HyperliquidScheduleUnit;
|
|
648
|
+
declare function resolveHyperliquidIntervalCron(every: number, unit: HyperliquidScheduleUnit): string;
|
|
649
|
+
declare function resolveHyperliquidHourlyInterval(input: unknown, fallback?: number): number;
|
|
650
|
+
declare function resolveHyperliquidCadenceCron(cadence: HyperliquidCadence, hourlyInterval: unknown, cadenceToCron?: Record<HyperliquidCadence, string>): string;
|
|
651
|
+
declare function resolveHyperliquidCadenceFromResolution(resolution: HyperliquidResolution): {
|
|
652
|
+
cadence: HyperliquidCadence;
|
|
653
|
+
hourlyInterval?: number;
|
|
654
|
+
};
|
|
655
|
+
|
|
559
656
|
interface HyperliquidOrderOptions {
|
|
560
657
|
wallet: WalletFullContext;
|
|
561
658
|
orders: HyperliquidOrderIntent[];
|
|
@@ -564,6 +661,7 @@ interface HyperliquidOrderOptions {
|
|
|
564
661
|
vaultAddress?: `0x${string}`;
|
|
565
662
|
expiresAfter?: number;
|
|
566
663
|
nonce?: number;
|
|
664
|
+
nonceSource?: NonceSource;
|
|
567
665
|
}
|
|
568
666
|
type HyperliquidOrderStatus = {
|
|
569
667
|
resting: {
|
|
@@ -611,6 +709,7 @@ interface HyperliquidApproveBuilderFeeOptions {
|
|
|
611
709
|
environment: HyperliquidEnvironment;
|
|
612
710
|
wallet: WalletFullContext;
|
|
613
711
|
nonce?: number;
|
|
712
|
+
nonceSource?: NonceSource;
|
|
614
713
|
/** Override default signature chain id. */
|
|
615
714
|
signatureChainId?: string;
|
|
616
715
|
}
|
|
@@ -643,6 +742,8 @@ declare function withdrawFromHyperliquid(options: {
|
|
|
643
742
|
amount: string;
|
|
644
743
|
destination: `0x${string}`;
|
|
645
744
|
wallet: WalletFullContext;
|
|
745
|
+
nonce?: number;
|
|
746
|
+
nonceSource?: NonceSource;
|
|
646
747
|
}): Promise<HyperliquidWithdrawResult>;
|
|
647
748
|
declare function fetchHyperliquidClearinghouseState(params: {
|
|
648
749
|
environment: HyperliquidEnvironment;
|
|
@@ -668,4 +769,4 @@ declare const __hyperliquidInternals: {
|
|
|
668
769
|
splitSignature: typeof splitSignature;
|
|
669
770
|
};
|
|
670
771
|
|
|
671
|
-
export { DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, type HyperliquidAbstraction, type HyperliquidAccountMode, HyperliquidApiError, type HyperliquidApproveBuilderFeeOptions, type HyperliquidApproveBuilderFeeResponse, type HyperliquidBar, type HyperliquidBarResolution, HyperliquidBuilderApprovalError, type HyperliquidBuilderApprovalRecordInput, type HyperliquidBuilderFee, type HyperliquidChain, type HyperliquidClearinghouseState, type HyperliquidDepositResult, type HyperliquidEnvironment, HyperliquidExchangeClient, type HyperliquidExchangeResponse, type HyperliquidGrouping, HyperliquidGuardError, HyperliquidInfoClient, type HyperliquidMarketIdentityInput, type HyperliquidMarketType, type HyperliquidOrderIntent, type HyperliquidOrderOptions, type HyperliquidOrderResponse, type HyperliquidOrderStatus, type HyperliquidPerpMarketInfo, type HyperliquidProfileAsset, type HyperliquidProfileAssetInput, type HyperliquidProfileChain, type HyperliquidSpotMarketInfo, type HyperliquidStoreNetwork, HyperliquidTermsError, type HyperliquidTermsRecordInput, type HyperliquidTickSize, type HyperliquidTimeInForce, type HyperliquidTriggerOptions, type HyperliquidTriggerType, type HyperliquidWithdrawResult, type MarketIdentity,
|
|
772
|
+
export { DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, type HyperliquidAbstraction, type HyperliquidAccountMode, HyperliquidApiError, type HyperliquidApproveBuilderFeeOptions, type HyperliquidApproveBuilderFeeResponse, type HyperliquidBar, type HyperliquidBarResolution, HyperliquidBuilderApprovalError, type HyperliquidBuilderApprovalRecordInput, type HyperliquidBuilderFee, type HyperliquidCadence, type HyperliquidChain, type HyperliquidClearinghouseState, type HyperliquidDcaNormalizedEntry, type HyperliquidDcaSymbolEntry, type HyperliquidDcaSymbolInput, type HyperliquidDepositResult, type HyperliquidEnvironment, HyperliquidExchangeClient, type HyperliquidExchangeResponse, type HyperliquidExecutionMode, type HyperliquidGrouping, HyperliquidGuardError, type HyperliquidIndicatorBar, HyperliquidInfoClient, type HyperliquidMarketIdentityInput, type HyperliquidMarketType, type 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, HyperliquidTermsError, type HyperliquidTermsRecordInput, type HyperliquidTickSize, type HyperliquidTimeInForce, type HyperliquidTradePlan, type HyperliquidTradeSignal, type HyperliquidTriggerOptions, type HyperliquidTriggerType, type HyperliquidWithdrawResult, type MarketIdentity, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, batchModifyHyperliquidOrders, buildHyperliquidMarketIdentity, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, cancelAllHyperliquidOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, clampHyperliquidAbs, clampHyperliquidFloat, clampHyperliquidInt, computeHyperliquidMarketIocLimitPrice, createHyperliquidSubAccount, createMonotonicNonceFactory, depositToHyperliquidBridge, 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, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, getHyperliquidMaxBuilderFee, isHyperliquidSpotSymbol, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeSpotTokenName, parseHyperliquidJson, parseSpotPairSymbol, placeHyperliquidOrder, placeHyperliquidTwapOrder, planHyperliquidTrade, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, resolveHyperliquidAbstractionFromMode, 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, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, withdrawFromHyperliquid };
|
|
@@ -1021,6 +1021,16 @@ async function fetchHyperliquidSpotClearinghouseState(params) {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
1023
|
// src/adapters/hyperliquid/exchange.ts
|
|
1024
|
+
function resolveRequiredExchangeNonce(options) {
|
|
1025
|
+
if (typeof options.nonce === "number") {
|
|
1026
|
+
return options.nonce;
|
|
1027
|
+
}
|
|
1028
|
+
const resolved = options.walletNonceProvider?.() ?? options.wallet.nonceSource?.() ?? options.nonceSource?.();
|
|
1029
|
+
if (resolved === void 0) {
|
|
1030
|
+
throw new Error(`${options.action} requires an explicit nonce or wallet nonce source.`);
|
|
1031
|
+
}
|
|
1032
|
+
return resolved;
|
|
1033
|
+
}
|
|
1024
1034
|
var HyperliquidExchangeClient = class {
|
|
1025
1035
|
constructor(args) {
|
|
1026
1036
|
this.wallet = args.wallet;
|
|
@@ -1191,7 +1201,13 @@ async function setHyperliquidPortfolioMargin(options) {
|
|
|
1191
1201
|
if (!options.wallet?.account || !options.wallet.walletClient) {
|
|
1192
1202
|
throw new Error("Wallet with signing capability is required for portfolio margin.");
|
|
1193
1203
|
}
|
|
1194
|
-
const nonce =
|
|
1204
|
+
const nonce = resolveRequiredExchangeNonce({
|
|
1205
|
+
nonce: options.nonce,
|
|
1206
|
+
nonceSource: options.nonceSource,
|
|
1207
|
+
walletNonceProvider: options.walletNonceProvider,
|
|
1208
|
+
wallet: options.wallet,
|
|
1209
|
+
action: "Hyperliquid portfolio margin"
|
|
1210
|
+
});
|
|
1195
1211
|
const signatureChainId = getSignatureChainId(env);
|
|
1196
1212
|
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1197
1213
|
const user = normalizeAddress(options.user ?? options.wallet.address);
|
|
@@ -1225,7 +1241,13 @@ async function setHyperliquidDexAbstraction(options) {
|
|
|
1225
1241
|
if (!options.wallet?.account || !options.wallet.walletClient) {
|
|
1226
1242
|
throw new Error("Wallet with signing capability is required for dex abstraction.");
|
|
1227
1243
|
}
|
|
1228
|
-
const nonce =
|
|
1244
|
+
const nonce = resolveRequiredExchangeNonce({
|
|
1245
|
+
nonce: options.nonce,
|
|
1246
|
+
nonceSource: options.nonceSource,
|
|
1247
|
+
walletNonceProvider: options.walletNonceProvider,
|
|
1248
|
+
wallet: options.wallet,
|
|
1249
|
+
action: "Hyperliquid dex abstraction"
|
|
1250
|
+
});
|
|
1229
1251
|
const signatureChainId = getSignatureChainId(env);
|
|
1230
1252
|
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1231
1253
|
const user = normalizeAddress(options.user ?? options.wallet.address);
|
|
@@ -1259,7 +1281,13 @@ async function setHyperliquidAccountAbstractionMode(options) {
|
|
|
1259
1281
|
if (!options.wallet?.account || !options.wallet.walletClient) {
|
|
1260
1282
|
throw new Error("Wallet with signing capability is required for account abstraction mode.");
|
|
1261
1283
|
}
|
|
1262
|
-
const nonce =
|
|
1284
|
+
const nonce = resolveRequiredExchangeNonce({
|
|
1285
|
+
nonce: options.nonce,
|
|
1286
|
+
nonceSource: options.nonceSource,
|
|
1287
|
+
walletNonceProvider: options.walletNonceProvider,
|
|
1288
|
+
wallet: options.wallet,
|
|
1289
|
+
action: "Hyperliquid account abstraction mode"
|
|
1290
|
+
});
|
|
1263
1291
|
const signatureChainId = getSignatureChainId(env);
|
|
1264
1292
|
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1265
1293
|
const user = normalizeAddress(options.user ?? options.wallet.address);
|
|
@@ -1459,7 +1487,12 @@ async function sendHyperliquidSpot(options) {
|
|
|
1459
1487
|
assertPositiveDecimal(options.amount, "amount");
|
|
1460
1488
|
const signatureChainId = getSignatureChainId(env);
|
|
1461
1489
|
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1462
|
-
const nonce =
|
|
1490
|
+
const nonce = resolveRequiredExchangeNonce({
|
|
1491
|
+
nonce: options.nonce,
|
|
1492
|
+
nonceSource: options.nonceSource,
|
|
1493
|
+
wallet: options.wallet,
|
|
1494
|
+
action: "Hyperliquid spot send"
|
|
1495
|
+
});
|
|
1463
1496
|
const time = BigInt(nonce);
|
|
1464
1497
|
const signature = await signSpotSend({
|
|
1465
1498
|
wallet: options.wallet,
|
|
@@ -1743,6 +1776,9 @@ function resolveHyperliquidPair(value) {
|
|
|
1743
1776
|
}
|
|
1744
1777
|
return null;
|
|
1745
1778
|
}
|
|
1779
|
+
function resolveHyperliquidLeverageMode(symbol) {
|
|
1780
|
+
return symbol.includes(":") ? "isolated" : "cross";
|
|
1781
|
+
}
|
|
1746
1782
|
function resolveHyperliquidProfileChain(environment) {
|
|
1747
1783
|
return environment === "testnet" ? "hyperliquid-testnet" : "hyperliquid";
|
|
1748
1784
|
}
|
|
@@ -1843,6 +1879,175 @@ function resolveHyperliquidSymbol(asset, override) {
|
|
|
1843
1879
|
const baseNoPair = base.split("/")[0] ?? base;
|
|
1844
1880
|
return baseNoPair.trim().toUpperCase();
|
|
1845
1881
|
}
|
|
1882
|
+
function resolveHyperliquidPerpSymbol(asset) {
|
|
1883
|
+
const raw = asset.trim();
|
|
1884
|
+
if (!raw) return raw;
|
|
1885
|
+
const dex = extractHyperliquidDex(raw);
|
|
1886
|
+
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw.toUpperCase();
|
|
1887
|
+
return dex ? `${dex}:${base}` : base;
|
|
1888
|
+
}
|
|
1889
|
+
function resolveHyperliquidSpotSymbol(asset, defaultQuote = "USDC") {
|
|
1890
|
+
const quote = defaultQuote.trim().toUpperCase() || "USDC";
|
|
1891
|
+
const raw = asset.trim().toUpperCase();
|
|
1892
|
+
if (!raw) {
|
|
1893
|
+
return { symbol: raw, base: raw, quote };
|
|
1894
|
+
}
|
|
1895
|
+
const pair = resolveHyperliquidPair(raw);
|
|
1896
|
+
if (pair) {
|
|
1897
|
+
const [base2, pairQuote] = pair.split("/");
|
|
1898
|
+
return {
|
|
1899
|
+
symbol: pair,
|
|
1900
|
+
base: base2?.trim() ?? raw,
|
|
1901
|
+
quote: pairQuote?.trim() ?? quote
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1904
|
+
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw;
|
|
1905
|
+
return { symbol: `${base}/${quote}`, base, quote };
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
// src/adapters/hyperliquid/strategy.ts
|
|
1909
|
+
function clampDcaWeight(value) {
|
|
1910
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return 0;
|
|
1911
|
+
return Math.min(1e6, Math.max(0, value));
|
|
1912
|
+
}
|
|
1913
|
+
function resolveHyperliquidBudgetUsd(params) {
|
|
1914
|
+
const { config, accountValue } = params;
|
|
1915
|
+
if (config.allocationMode === "fixed") {
|
|
1916
|
+
const desiredUsd = config.amountUsd ?? 0;
|
|
1917
|
+
if (!Number.isFinite(desiredUsd) || desiredUsd <= 0) {
|
|
1918
|
+
throw new Error("fixed allocation requires amountUsd");
|
|
1919
|
+
}
|
|
1920
|
+
return desiredUsd;
|
|
1921
|
+
}
|
|
1922
|
+
if (!Number.isFinite(accountValue ?? Number.NaN)) {
|
|
1923
|
+
throw new Error("percent allocation requires accountValue");
|
|
1924
|
+
}
|
|
1925
|
+
const rawUsd = accountValue * (config.percentOfEquity / 100);
|
|
1926
|
+
const maxPercentUsd = accountValue * (config.maxPercentOfEquity / 100);
|
|
1927
|
+
return Math.min(rawUsd, maxPercentUsd);
|
|
1928
|
+
}
|
|
1929
|
+
function resolveHyperliquidDcaSymbolEntries(inputs, fallbackSymbol) {
|
|
1930
|
+
const entries = [];
|
|
1931
|
+
const values = Array.isArray(inputs) ? inputs : [];
|
|
1932
|
+
for (const input of values) {
|
|
1933
|
+
if (typeof input === "string") {
|
|
1934
|
+
const trimmed = input.trim();
|
|
1935
|
+
if (!trimmed) continue;
|
|
1936
|
+
const [rawSymbol, rawWeight] = trimmed.split(":");
|
|
1937
|
+
const symbol2 = rawSymbol?.trim();
|
|
1938
|
+
if (!symbol2) continue;
|
|
1939
|
+
const parsedWeight2 = typeof rawWeight === "string" && rawWeight.trim().length > 0 ? Number.parseFloat(rawWeight.trim()) : 1;
|
|
1940
|
+
const weight2 = Number.isFinite(parsedWeight2) && parsedWeight2 > 0 ? parsedWeight2 : 1;
|
|
1941
|
+
entries.push({ symbol: symbol2, weight: weight2 });
|
|
1942
|
+
continue;
|
|
1943
|
+
}
|
|
1944
|
+
if (!input || typeof input !== "object") continue;
|
|
1945
|
+
const symbol = input.symbol?.trim();
|
|
1946
|
+
if (!symbol) continue;
|
|
1947
|
+
const parsedWeight = typeof input.weight === "number" && Number.isFinite(input.weight) ? input.weight : 1;
|
|
1948
|
+
const weight = parsedWeight > 0 ? parsedWeight : 1;
|
|
1949
|
+
entries.push({ symbol, weight });
|
|
1950
|
+
}
|
|
1951
|
+
if (entries.length > 0) {
|
|
1952
|
+
return entries;
|
|
1953
|
+
}
|
|
1954
|
+
return [{ symbol: fallbackSymbol, weight: 1 }];
|
|
1955
|
+
}
|
|
1956
|
+
function normalizeHyperliquidDcaEntries(params) {
|
|
1957
|
+
const map = /* @__PURE__ */ new Map();
|
|
1958
|
+
const entries = Array.isArray(params.entries) ? params.entries : [];
|
|
1959
|
+
for (const entry of entries) {
|
|
1960
|
+
if (!entry || typeof entry !== "object") continue;
|
|
1961
|
+
const symbol = typeof entry.symbol === "string" ? entry.symbol.trim() : "";
|
|
1962
|
+
if (!symbol) continue;
|
|
1963
|
+
const key = symbol.toUpperCase();
|
|
1964
|
+
const weight = clampDcaWeight(entry.weight);
|
|
1965
|
+
if (weight <= 0) continue;
|
|
1966
|
+
const existing = map.get(key);
|
|
1967
|
+
if (existing) {
|
|
1968
|
+
existing.weight += weight;
|
|
1969
|
+
} else {
|
|
1970
|
+
map.set(key, { symbol, weight });
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
if (map.size === 0) {
|
|
1974
|
+
map.set(params.fallbackSymbol.toUpperCase(), {
|
|
1975
|
+
symbol: params.fallbackSymbol,
|
|
1976
|
+
weight: 1
|
|
1977
|
+
});
|
|
1978
|
+
}
|
|
1979
|
+
const entriesList = Array.from(map.values());
|
|
1980
|
+
const totalWeight = entriesList.reduce((sum, entry) => sum + entry.weight, 0);
|
|
1981
|
+
if (!Number.isFinite(totalWeight) || totalWeight <= 0) {
|
|
1982
|
+
return [];
|
|
1983
|
+
}
|
|
1984
|
+
return entriesList.map((entry) => ({
|
|
1985
|
+
symbol: entry.symbol,
|
|
1986
|
+
weight: entry.weight,
|
|
1987
|
+
normalizedWeight: entry.weight / totalWeight
|
|
1988
|
+
}));
|
|
1989
|
+
}
|
|
1990
|
+
function resolveHyperliquidMaxPerRunUsd(targetNotionalUsd, hedgeRatio) {
|
|
1991
|
+
if (!Number.isFinite(targetNotionalUsd) || targetNotionalUsd <= 0) return 0;
|
|
1992
|
+
const ratio = Number.isFinite(hedgeRatio) && hedgeRatio > 0 ? hedgeRatio : 1;
|
|
1993
|
+
return Math.max(targetNotionalUsd, targetNotionalUsd * ratio);
|
|
1994
|
+
}
|
|
1995
|
+
function clampHyperliquidAbs(value, limit) {
|
|
1996
|
+
if (!Number.isFinite(value) || !Number.isFinite(limit) || limit <= 0) return 0;
|
|
1997
|
+
const capped = Math.min(Math.abs(value), limit);
|
|
1998
|
+
return Math.sign(value) * capped;
|
|
1999
|
+
}
|
|
2000
|
+
function resolveHyperliquidTargetSize(params) {
|
|
2001
|
+
const { config, execution, accountValue, currentPrice } = params;
|
|
2002
|
+
if (execution.size && Number.isFinite(execution.size)) {
|
|
2003
|
+
return { targetSize: execution.size, budgetUsd: execution.size * currentPrice };
|
|
2004
|
+
}
|
|
2005
|
+
if (config.allocationMode === "fixed") {
|
|
2006
|
+
const budgetUsd2 = resolveHyperliquidBudgetUsd({
|
|
2007
|
+
config,
|
|
2008
|
+
accountValue
|
|
2009
|
+
});
|
|
2010
|
+
return { targetSize: budgetUsd2 / currentPrice, budgetUsd: budgetUsd2 };
|
|
2011
|
+
}
|
|
2012
|
+
const budgetUsd = resolveHyperliquidBudgetUsd({
|
|
2013
|
+
config,
|
|
2014
|
+
accountValue
|
|
2015
|
+
});
|
|
2016
|
+
return { targetSize: budgetUsd / currentPrice, budgetUsd };
|
|
2017
|
+
}
|
|
2018
|
+
function planHyperliquidTrade(params) {
|
|
2019
|
+
const { signal, mode, currentSize, targetSize } = params;
|
|
2020
|
+
if (signal === "hold" || signal === "unknown") return null;
|
|
2021
|
+
if (signal === "buy") {
|
|
2022
|
+
const desired2 = mode === "long-short" ? targetSize : Math.max(targetSize, 0);
|
|
2023
|
+
const delta2 = desired2 - currentSize;
|
|
2024
|
+
if (delta2 <= 0) return null;
|
|
2025
|
+
return {
|
|
2026
|
+
side: "buy",
|
|
2027
|
+
size: delta2,
|
|
2028
|
+
reduceOnly: false,
|
|
2029
|
+
targetSize: desired2
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
if (mode === "long-only") {
|
|
2033
|
+
if (currentSize <= 0) return null;
|
|
2034
|
+
return {
|
|
2035
|
+
side: "sell",
|
|
2036
|
+
size: currentSize,
|
|
2037
|
+
reduceOnly: true,
|
|
2038
|
+
targetSize: 0
|
|
2039
|
+
};
|
|
2040
|
+
}
|
|
2041
|
+
const desired = -Math.abs(targetSize);
|
|
2042
|
+
const delta = currentSize - desired;
|
|
2043
|
+
if (delta <= 0) return null;
|
|
2044
|
+
return {
|
|
2045
|
+
side: "sell",
|
|
2046
|
+
size: delta,
|
|
2047
|
+
reduceOnly: false,
|
|
2048
|
+
targetSize: desired
|
|
2049
|
+
};
|
|
2050
|
+
}
|
|
1846
2051
|
|
|
1847
2052
|
// src/adapters/hyperliquid/order-utils.ts
|
|
1848
2053
|
var MAX_HYPERLIQUID_PRICE_DECIMALS = 8;
|
|
@@ -2188,9 +2393,10 @@ function readHyperliquidSpotAccountValue(params) {
|
|
|
2188
2393
|
|
|
2189
2394
|
// src/adapters/hyperliquid/market-data.ts
|
|
2190
2395
|
var META_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
2396
|
+
var DEFAULT_OPENPOND_GATEWAY_URL = "https://gateway.openpond.dev";
|
|
2191
2397
|
var allMidsCache = /* @__PURE__ */ new Map();
|
|
2192
2398
|
function resolveGatewayBase(override) {
|
|
2193
|
-
const value = override ?? process.env.OPENPOND_GATEWAY_URL ??
|
|
2399
|
+
const value = override ?? process.env.OPENPOND_GATEWAY_URL ?? DEFAULT_OPENPOND_GATEWAY_URL;
|
|
2194
2400
|
if (typeof value !== "string") {
|
|
2195
2401
|
return null;
|
|
2196
2402
|
}
|
|
@@ -2359,6 +2565,25 @@ async function fetchHyperliquidBars(params) {
|
|
|
2359
2565
|
return typeof record.close === "number" && Number.isFinite(record.close) && typeof record.time === "number" && Number.isFinite(record.time);
|
|
2360
2566
|
});
|
|
2361
2567
|
}
|
|
2568
|
+
function normalizeHyperliquidIndicatorBars(bars) {
|
|
2569
|
+
return bars.filter(
|
|
2570
|
+
(bar) => bar && typeof bar === "object" && typeof bar.time === "number" && Number.isFinite(bar.time) && typeof bar.close === "number" && Number.isFinite(bar.close)
|
|
2571
|
+
).map((bar) => {
|
|
2572
|
+
const close = bar.close;
|
|
2573
|
+
const open = typeof bar.open === "number" && Number.isFinite(bar.open) ? bar.open : close;
|
|
2574
|
+
const high = typeof bar.high === "number" && Number.isFinite(bar.high) ? bar.high : close;
|
|
2575
|
+
const low = typeof bar.low === "number" && Number.isFinite(bar.low) ? bar.low : close;
|
|
2576
|
+
const volume = typeof bar.volume === "number" && Number.isFinite(bar.volume) ? bar.volume : 0;
|
|
2577
|
+
return {
|
|
2578
|
+
time: bar.time,
|
|
2579
|
+
open,
|
|
2580
|
+
high,
|
|
2581
|
+
low,
|
|
2582
|
+
close,
|
|
2583
|
+
volume
|
|
2584
|
+
};
|
|
2585
|
+
});
|
|
2586
|
+
}
|
|
2362
2587
|
async function fetchHyperliquidTickSize(params) {
|
|
2363
2588
|
return fetchHyperliquidTickSizeForCoin(params.environment, params.symbol);
|
|
2364
2589
|
}
|
|
@@ -2568,7 +2793,89 @@ var __hyperliquidMarketDataInternals = {
|
|
|
2568
2793
|
formatScaledInt
|
|
2569
2794
|
};
|
|
2570
2795
|
|
|
2796
|
+
// src/adapters/hyperliquid/utils.ts
|
|
2797
|
+
var DEFAULT_HYPERLIQUID_CADENCE_CRON = {
|
|
2798
|
+
daily: "0 8 * * *",
|
|
2799
|
+
hourly: "0 * * * *",
|
|
2800
|
+
weekly: "0 8 * * 1",
|
|
2801
|
+
"twice-weekly": "0 8 * * 1,4",
|
|
2802
|
+
monthly: "0 8 1 * *"
|
|
2803
|
+
};
|
|
2804
|
+
function parseHyperliquidJson(raw) {
|
|
2805
|
+
if (!raw) return null;
|
|
2806
|
+
try {
|
|
2807
|
+
return JSON.parse(raw);
|
|
2808
|
+
} catch {
|
|
2809
|
+
return null;
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
function clampHyperliquidInt(value, min, max, fallback) {
|
|
2813
|
+
if (value == null) return fallback;
|
|
2814
|
+
if (typeof value === "string" && value.trim().length === 0) return fallback;
|
|
2815
|
+
const parsed = Number(value);
|
|
2816
|
+
if (!Number.isFinite(parsed)) return fallback;
|
|
2817
|
+
const numeric = Math.trunc(parsed);
|
|
2818
|
+
if (!Number.isFinite(numeric)) return fallback;
|
|
2819
|
+
return Math.min(max, Math.max(min, numeric));
|
|
2820
|
+
}
|
|
2821
|
+
function clampHyperliquidFloat(value, min, max, fallback) {
|
|
2822
|
+
if (value == null) return fallback;
|
|
2823
|
+
if (typeof value === "string" && value.trim().length === 0) return fallback;
|
|
2824
|
+
const numeric = Number(value);
|
|
2825
|
+
if (!Number.isFinite(numeric)) return fallback;
|
|
2826
|
+
return Math.min(max, Math.max(min, numeric));
|
|
2827
|
+
}
|
|
2828
|
+
function resolveHyperliquidScheduleEvery(input, options) {
|
|
2829
|
+
const min = options?.min ?? 1;
|
|
2830
|
+
const max = options?.max ?? 59;
|
|
2831
|
+
const fallback = options?.fallback ?? 1;
|
|
2832
|
+
return clampHyperliquidInt(input, min, max, fallback);
|
|
2833
|
+
}
|
|
2834
|
+
function resolveHyperliquidScheduleUnit(input, fallback = "hours") {
|
|
2835
|
+
if (input === "minutes") return "minutes";
|
|
2836
|
+
if (input === "hours") return "hours";
|
|
2837
|
+
return fallback;
|
|
2838
|
+
}
|
|
2839
|
+
function resolveHyperliquidIntervalCron(every, unit) {
|
|
2840
|
+
if (unit === "minutes") {
|
|
2841
|
+
return every === 1 ? "* * * * *" : `*/${every} * * * *`;
|
|
2842
|
+
}
|
|
2843
|
+
return every === 1 ? "0 * * * *" : `0 */${every} * * *`;
|
|
2844
|
+
}
|
|
2845
|
+
function resolveHyperliquidHourlyInterval(input, fallback = 1) {
|
|
2846
|
+
return clampHyperliquidInt(input, 1, 24, fallback);
|
|
2847
|
+
}
|
|
2848
|
+
function resolveHyperliquidCadenceCron(cadence, hourlyInterval, cadenceToCron = DEFAULT_HYPERLIQUID_CADENCE_CRON) {
|
|
2849
|
+
if (cadence !== "hourly") {
|
|
2850
|
+
return cadenceToCron[cadence];
|
|
2851
|
+
}
|
|
2852
|
+
const interval = resolveHyperliquidHourlyInterval(hourlyInterval, 1);
|
|
2853
|
+
return interval === 1 ? cadenceToCron.hourly : `0 */${interval} * * *`;
|
|
2854
|
+
}
|
|
2855
|
+
function resolveHyperliquidCadenceFromResolution(resolution) {
|
|
2856
|
+
if (resolution === "60") {
|
|
2857
|
+
return { cadence: "hourly", hourlyInterval: 1 };
|
|
2858
|
+
}
|
|
2859
|
+
if (resolution === "240") {
|
|
2860
|
+
return { cadence: "hourly", hourlyInterval: 4 };
|
|
2861
|
+
}
|
|
2862
|
+
if (resolution === "1W") {
|
|
2863
|
+
return { cadence: "weekly" };
|
|
2864
|
+
}
|
|
2865
|
+
return { cadence: "daily" };
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2571
2868
|
// src/adapters/hyperliquid/index.ts
|
|
2869
|
+
function resolveRequiredNonce(params) {
|
|
2870
|
+
if (typeof params.nonce === "number") {
|
|
2871
|
+
return params.nonce;
|
|
2872
|
+
}
|
|
2873
|
+
const resolved = params.nonceSource?.() ?? params.wallet?.nonceSource?.();
|
|
2874
|
+
if (resolved === void 0) {
|
|
2875
|
+
throw new Error(`${params.action} requires an explicit nonce or wallet nonce source.`);
|
|
2876
|
+
}
|
|
2877
|
+
return resolved;
|
|
2878
|
+
}
|
|
2572
2879
|
function assertPositiveDecimalInput(value, label) {
|
|
2573
2880
|
if (typeof value === "number") {
|
|
2574
2881
|
if (!Number.isFinite(value) || value <= 0) {
|
|
@@ -2677,7 +2984,12 @@ async function placeHyperliquidOrder(options) {
|
|
|
2677
2984
|
f: effectiveBuilder.fee
|
|
2678
2985
|
};
|
|
2679
2986
|
}
|
|
2680
|
-
const effectiveNonce =
|
|
2987
|
+
const effectiveNonce = resolveRequiredNonce({
|
|
2988
|
+
nonce,
|
|
2989
|
+
nonceSource: options.nonceSource,
|
|
2990
|
+
wallet,
|
|
2991
|
+
action: "Hyperliquid order submission"
|
|
2992
|
+
});
|
|
2681
2993
|
const signature = await signL1Action({
|
|
2682
2994
|
wallet,
|
|
2683
2995
|
action,
|
|
@@ -2793,8 +3105,13 @@ async function withdrawFromHyperliquid(options) {
|
|
|
2793
3105
|
chainId: Number.parseInt(signatureChainId, 16),
|
|
2794
3106
|
verifyingContract: ZERO_ADDRESS
|
|
2795
3107
|
};
|
|
2796
|
-
const
|
|
2797
|
-
|
|
3108
|
+
const nonce = resolveRequiredNonce({
|
|
3109
|
+
nonce: options.nonce,
|
|
3110
|
+
nonceSource: options.nonceSource,
|
|
3111
|
+
wallet,
|
|
3112
|
+
action: "Hyperliquid withdraw"
|
|
3113
|
+
});
|
|
3114
|
+
const time = BigInt(nonce);
|
|
2798
3115
|
const normalizedDestination = normalizeAddress(destination);
|
|
2799
3116
|
const message = {
|
|
2800
3117
|
hyperliquidChain,
|
|
@@ -2874,7 +3191,12 @@ async function approveHyperliquidBuilderFee(options) {
|
|
|
2874
3191
|
const inferredEnvironment = environment ?? "mainnet";
|
|
2875
3192
|
const resolvedBaseUrl = API_BASES[inferredEnvironment];
|
|
2876
3193
|
const maxFeeRate = formattedPercent;
|
|
2877
|
-
const effectiveNonce =
|
|
3194
|
+
const effectiveNonce = resolveRequiredNonce({
|
|
3195
|
+
nonce,
|
|
3196
|
+
nonceSource: options.nonceSource,
|
|
3197
|
+
wallet,
|
|
3198
|
+
action: "Hyperliquid builder approval"
|
|
3199
|
+
});
|
|
2878
3200
|
const signatureNonce = BigInt(effectiveNonce);
|
|
2879
3201
|
const signatureChainHex = signatureChainId ?? getSignatureChainId(inferredEnvironment);
|
|
2880
3202
|
const approvalSignature = await signApproveBuilderFee({
|
|
@@ -2992,6 +3314,6 @@ var __hyperliquidInternals = {
|
|
|
2992
3314
|
splitSignature
|
|
2993
3315
|
};
|
|
2994
3316
|
|
|
2995
|
-
export { DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, HyperliquidApiError, HyperliquidBuilderApprovalError, HyperliquidExchangeClient, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidTermsError, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, batchModifyHyperliquidOrders, buildHyperliquidMarketIdentity, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, cancelAllHyperliquidOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, computeHyperliquidMarketIocLimitPrice, createHyperliquidSubAccount, createMonotonicNonceFactory, depositToHyperliquidBridge, 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, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, getHyperliquidMaxBuilderFee, isHyperliquidSpotSymbol, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidMetaSymbol, normalizeSpotTokenName2 as normalizeSpotTokenName, parseSpotPairSymbol, placeHyperliquidOrder, placeHyperliquidTwapOrder, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, resolveHyperliquidAbstractionFromMode, resolveHyperliquidChain, resolveHyperliquidChainConfig, resolveHyperliquidErrorDetail, resolveHyperliquidOrderRef, resolveHyperliquidOrderSymbol, resolveHyperliquidPair, resolveHyperliquidProfileChain, resolveHyperliquidRpcEnvVar, resolveHyperliquidStoreNetwork, resolveHyperliquidSymbol, resolveSpotMidCandidates, resolveSpotTokenCandidates, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, withdrawFromHyperliquid };
|
|
3317
|
+
export { DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, HyperliquidApiError, HyperliquidBuilderApprovalError, HyperliquidExchangeClient, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidTermsError, __hyperliquidInternals, __hyperliquidMarketDataInternals, approveHyperliquidBuilderFee, batchModifyHyperliquidOrders, buildHyperliquidMarketIdentity, buildHyperliquidProfileAssets, buildHyperliquidSpotUsdPriceMap, cancelAllHyperliquidOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, clampHyperliquidAbs, clampHyperliquidFloat, clampHyperliquidInt, computeHyperliquidMarketIocLimitPrice, createHyperliquidSubAccount, createMonotonicNonceFactory, depositToHyperliquidBridge, 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, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, getHyperliquidMaxBuilderFee, isHyperliquidSpotSymbol, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeSpotTokenName2 as normalizeSpotTokenName, parseHyperliquidJson, parseSpotPairSymbol, placeHyperliquidOrder, placeHyperliquidTwapOrder, planHyperliquidTrade, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, resolveHyperliquidAbstractionFromMode, 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, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, withdrawFromHyperliquid };
|
|
2996
3318
|
//# sourceMappingURL=index.js.map
|
|
2997
3319
|
//# sourceMappingURL=index.js.map
|