opentool 0.15.1 → 0.17.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 +355 -427
- package/dist/adapters/hyperliquid/browser.js.map +1 -1
- package/dist/adapters/hyperliquid/index.d.ts +2 -2
- package/dist/adapters/hyperliquid/index.js +279 -351
- package/dist/adapters/hyperliquid/index.js.map +1 -1
- package/dist/{browser-IWBnx7Q3.d.ts → browser-Bjl6u4Yt.d.ts} +6 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +279 -351
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
|
@@ -742,37 +742,6 @@ async function signUserPortfolioMargin(args) {
|
|
|
742
742
|
});
|
|
743
743
|
return splitSignature(signatureHex);
|
|
744
744
|
}
|
|
745
|
-
async function signUserDexAbstraction(args) {
|
|
746
|
-
const { wallet, action } = args;
|
|
747
|
-
const domain = {
|
|
748
|
-
name: "HyperliquidSignTransaction",
|
|
749
|
-
version: "1",
|
|
750
|
-
chainId: Number.parseInt(action.signatureChainId, 16),
|
|
751
|
-
verifyingContract: ZERO_ADDRESS
|
|
752
|
-
};
|
|
753
|
-
const message = {
|
|
754
|
-
hyperliquidChain: action.hyperliquidChain,
|
|
755
|
-
user: action.user,
|
|
756
|
-
enabled: action.enabled,
|
|
757
|
-
nonce: BigInt(action.nonce)
|
|
758
|
-
};
|
|
759
|
-
const types = {
|
|
760
|
-
"HyperliquidTransaction:UserDexAbstraction": [
|
|
761
|
-
{ name: "hyperliquidChain", type: "string" },
|
|
762
|
-
{ name: "user", type: "address" },
|
|
763
|
-
{ name: "enabled", type: "bool" },
|
|
764
|
-
{ name: "nonce", type: "uint64" }
|
|
765
|
-
]
|
|
766
|
-
};
|
|
767
|
-
const signatureHex = await wallet.walletClient.signTypedData({
|
|
768
|
-
account: wallet.account,
|
|
769
|
-
domain,
|
|
770
|
-
types,
|
|
771
|
-
primaryType: "HyperliquidTransaction:UserDexAbstraction",
|
|
772
|
-
message
|
|
773
|
-
});
|
|
774
|
-
return splitSignature(signatureHex);
|
|
775
|
-
}
|
|
776
745
|
async function signUserSetAbstraction(args) {
|
|
777
746
|
const { wallet, action } = args;
|
|
778
747
|
const domain = {
|
|
@@ -872,6 +841,270 @@ function assertPositiveNumber(value, label) {
|
|
|
872
841
|
}
|
|
873
842
|
}
|
|
874
843
|
|
|
844
|
+
// src/adapters/hyperliquid/symbols.ts
|
|
845
|
+
var UNKNOWN_SYMBOL2 = "UNKNOWN";
|
|
846
|
+
function extractHyperliquidDex(symbol) {
|
|
847
|
+
const idx = symbol.indexOf(":");
|
|
848
|
+
if (idx <= 0) return null;
|
|
849
|
+
const dex = symbol.slice(0, idx).trim().toLowerCase();
|
|
850
|
+
return dex || null;
|
|
851
|
+
}
|
|
852
|
+
function parseHyperliquidSymbol(value) {
|
|
853
|
+
if (!value) return null;
|
|
854
|
+
const trimmed = value.trim();
|
|
855
|
+
if (!trimmed) return null;
|
|
856
|
+
if (trimmed.startsWith("@")) {
|
|
857
|
+
return {
|
|
858
|
+
raw: trimmed,
|
|
859
|
+
kind: "spotIndex",
|
|
860
|
+
normalized: trimmed,
|
|
861
|
+
routeTicker: trimmed,
|
|
862
|
+
displaySymbol: trimmed,
|
|
863
|
+
base: null,
|
|
864
|
+
quote: null,
|
|
865
|
+
pair: null,
|
|
866
|
+
dex: null,
|
|
867
|
+
leverageMode: "cross"
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
const dex = extractHyperliquidDex(trimmed);
|
|
871
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
872
|
+
const base = normalizeHyperliquidBaseSymbol(trimmed);
|
|
873
|
+
if (dex) {
|
|
874
|
+
if (!base) return null;
|
|
875
|
+
return {
|
|
876
|
+
raw: trimmed,
|
|
877
|
+
kind: "perp",
|
|
878
|
+
normalized: `${dex}:${base}`,
|
|
879
|
+
routeTicker: `${dex}:${base}`,
|
|
880
|
+
displaySymbol: `${dex.toUpperCase()}:${base}-USDC`,
|
|
881
|
+
base,
|
|
882
|
+
quote: null,
|
|
883
|
+
pair: null,
|
|
884
|
+
dex,
|
|
885
|
+
leverageMode: "isolated"
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
if (pair) {
|
|
889
|
+
const [pairBase, pairQuote] = pair.split("/");
|
|
890
|
+
return {
|
|
891
|
+
raw: trimmed,
|
|
892
|
+
kind: "spot",
|
|
893
|
+
normalized: pair,
|
|
894
|
+
routeTicker: pair.replace("/", "-"),
|
|
895
|
+
displaySymbol: pair.replace("/", "-"),
|
|
896
|
+
base: pairBase ?? null,
|
|
897
|
+
quote: pairQuote ?? null,
|
|
898
|
+
pair,
|
|
899
|
+
dex: null,
|
|
900
|
+
leverageMode: "cross"
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
if (!base) return null;
|
|
904
|
+
return {
|
|
905
|
+
raw: trimmed,
|
|
906
|
+
kind: "perp",
|
|
907
|
+
normalized: base,
|
|
908
|
+
routeTicker: base,
|
|
909
|
+
displaySymbol: `${base}-USDC`,
|
|
910
|
+
base,
|
|
911
|
+
quote: null,
|
|
912
|
+
pair: null,
|
|
913
|
+
dex: null,
|
|
914
|
+
leverageMode: "cross"
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function normalizeSpotTokenName2(value) {
|
|
918
|
+
const raw = (value ?? "").trim();
|
|
919
|
+
if (!raw) return "";
|
|
920
|
+
if (raw.endsWith("0") && raw.length > 1) {
|
|
921
|
+
return raw.slice(0, -1);
|
|
922
|
+
}
|
|
923
|
+
return raw;
|
|
924
|
+
}
|
|
925
|
+
function canonicalizeHyperliquidTokenCase(value) {
|
|
926
|
+
const trimmed = value.trim();
|
|
927
|
+
if (!trimmed) return "";
|
|
928
|
+
return trimmed === trimmed.toLowerCase() ? trimmed.toUpperCase() : trimmed;
|
|
929
|
+
}
|
|
930
|
+
function normalizeHyperliquidBaseSymbol(value) {
|
|
931
|
+
if (!value) return null;
|
|
932
|
+
const trimmed = value.trim();
|
|
933
|
+
if (!trimmed) return null;
|
|
934
|
+
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
935
|
+
const base = withoutDex.split("-")[0] ?? withoutDex;
|
|
936
|
+
const baseNoPair = base.split("/")[0] ?? base;
|
|
937
|
+
const normalized = canonicalizeHyperliquidTokenCase(baseNoPair);
|
|
938
|
+
if (!normalized || normalized === UNKNOWN_SYMBOL2) return null;
|
|
939
|
+
return normalized;
|
|
940
|
+
}
|
|
941
|
+
function normalizeHyperliquidMetaSymbol(symbol) {
|
|
942
|
+
const trimmed = symbol.trim();
|
|
943
|
+
const noDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
944
|
+
const noPair = noDex.split("-")[0] ?? noDex;
|
|
945
|
+
return (noPair.split("/")[0] ?? noPair).trim();
|
|
946
|
+
}
|
|
947
|
+
function resolveHyperliquidPair(value) {
|
|
948
|
+
if (!value) return null;
|
|
949
|
+
const trimmed = value.trim();
|
|
950
|
+
if (!trimmed) return null;
|
|
951
|
+
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
952
|
+
if (withoutDex.includes("/")) {
|
|
953
|
+
const [base, ...rest] = withoutDex.split("/");
|
|
954
|
+
const quote = rest.join("/").trim();
|
|
955
|
+
if (!base || !quote) return null;
|
|
956
|
+
return `${canonicalizeHyperliquidTokenCase(base)}/${canonicalizeHyperliquidTokenCase(quote)}`;
|
|
957
|
+
}
|
|
958
|
+
if (withoutDex.includes("-")) {
|
|
959
|
+
const [base, ...rest] = withoutDex.split("-");
|
|
960
|
+
const quote = rest.join("-").trim();
|
|
961
|
+
if (!base || !quote) return null;
|
|
962
|
+
return `${canonicalizeHyperliquidTokenCase(base)}/${canonicalizeHyperliquidTokenCase(quote)}`;
|
|
963
|
+
}
|
|
964
|
+
return null;
|
|
965
|
+
}
|
|
966
|
+
function resolveHyperliquidLeverageMode(symbol) {
|
|
967
|
+
return symbol.includes(":") ? "isolated" : "cross";
|
|
968
|
+
}
|
|
969
|
+
function resolveHyperliquidProfileChain(environment) {
|
|
970
|
+
return environment === "testnet" ? "hyperliquid-testnet" : "hyperliquid";
|
|
971
|
+
}
|
|
972
|
+
function buildHyperliquidProfileAssets(params) {
|
|
973
|
+
const chain = resolveHyperliquidProfileChain(params.environment);
|
|
974
|
+
return params.assets.map((asset) => {
|
|
975
|
+
const symbols = asset.assetSymbols.map((symbol) => normalizeHyperliquidBaseSymbol(symbol)).filter((symbol) => Boolean(symbol));
|
|
976
|
+
if (symbols.length === 0) return null;
|
|
977
|
+
const explicitPair = typeof asset.pair === "string" ? resolveHyperliquidPair(asset.pair) : null;
|
|
978
|
+
const derivedPair = symbols.length === 1 ? resolveHyperliquidPair(asset.assetSymbols[0] ?? symbols[0]) : null;
|
|
979
|
+
const pair = explicitPair ?? derivedPair ?? void 0;
|
|
980
|
+
const leverage = typeof asset.leverage === "number" && Number.isFinite(asset.leverage) && asset.leverage > 0 ? asset.leverage : void 0;
|
|
981
|
+
const walletAddress = typeof asset.walletAddress === "string" && asset.walletAddress.trim().length > 0 ? asset.walletAddress.trim() : void 0;
|
|
982
|
+
return {
|
|
983
|
+
venue: "hyperliquid",
|
|
984
|
+
chain,
|
|
985
|
+
assetSymbols: symbols,
|
|
986
|
+
...pair ? { pair } : {},
|
|
987
|
+
...leverage ? { leverage } : {},
|
|
988
|
+
...walletAddress ? { walletAddress } : {}
|
|
989
|
+
};
|
|
990
|
+
}).filter((asset) => asset !== null);
|
|
991
|
+
}
|
|
992
|
+
function parseSpotPairSymbol(symbol) {
|
|
993
|
+
const trimmed = symbol.trim();
|
|
994
|
+
if (!trimmed.includes("/")) return null;
|
|
995
|
+
const [rawBase, rawQuote] = trimmed.split("/");
|
|
996
|
+
const base = rawBase?.trim().toUpperCase() ?? "";
|
|
997
|
+
const quote = rawQuote?.trim().toUpperCase() ?? "";
|
|
998
|
+
if (!base || !quote) return null;
|
|
999
|
+
return { base, quote };
|
|
1000
|
+
}
|
|
1001
|
+
function isHyperliquidSpotSymbol(symbol) {
|
|
1002
|
+
const trimmed = symbol.trim();
|
|
1003
|
+
if (!trimmed) return false;
|
|
1004
|
+
if (trimmed.startsWith("@") || trimmed.includes("/")) return true;
|
|
1005
|
+
if (trimmed.includes(":")) return false;
|
|
1006
|
+
return resolveHyperliquidPair(trimmed) !== null;
|
|
1007
|
+
}
|
|
1008
|
+
function resolveHyperliquidMarketDataCoin(value) {
|
|
1009
|
+
if (!value) return null;
|
|
1010
|
+
const trimmed = value.trim();
|
|
1011
|
+
if (!trimmed) return null;
|
|
1012
|
+
if (trimmed.startsWith("@")) return trimmed;
|
|
1013
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
1014
|
+
if (pair && !extractHyperliquidDex(trimmed)) {
|
|
1015
|
+
return pair;
|
|
1016
|
+
}
|
|
1017
|
+
return trimmed;
|
|
1018
|
+
}
|
|
1019
|
+
function supportsHyperliquidBuilderFee(params) {
|
|
1020
|
+
if (!isHyperliquidSpotSymbol(params.symbol)) {
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
return params.side === "sell";
|
|
1024
|
+
}
|
|
1025
|
+
function resolveSpotMidCandidates(baseSymbol) {
|
|
1026
|
+
const base = baseSymbol.trim().toUpperCase();
|
|
1027
|
+
if (!base) return [];
|
|
1028
|
+
const candidates = [base];
|
|
1029
|
+
if (base.startsWith("U") && base.length > 1) {
|
|
1030
|
+
candidates.push(base.slice(1));
|
|
1031
|
+
}
|
|
1032
|
+
return Array.from(new Set(candidates));
|
|
1033
|
+
}
|
|
1034
|
+
function resolveSpotTokenCandidates(value) {
|
|
1035
|
+
const normalized = normalizeSpotTokenName2(value).toUpperCase();
|
|
1036
|
+
if (!normalized) return [];
|
|
1037
|
+
const candidates = [normalized];
|
|
1038
|
+
if (normalized.startsWith("U") && normalized.length > 1) {
|
|
1039
|
+
candidates.push(normalized.slice(1));
|
|
1040
|
+
}
|
|
1041
|
+
return Array.from(new Set(candidates));
|
|
1042
|
+
}
|
|
1043
|
+
function resolveHyperliquidOrderSymbol(value) {
|
|
1044
|
+
if (!value) return null;
|
|
1045
|
+
const trimmed = value.trim();
|
|
1046
|
+
if (!trimmed) return null;
|
|
1047
|
+
if (trimmed.startsWith("@")) return trimmed;
|
|
1048
|
+
if (trimmed.includes(":")) {
|
|
1049
|
+
const [rawDex, ...restParts] = trimmed.split(":");
|
|
1050
|
+
const dex = rawDex.trim().toLowerCase();
|
|
1051
|
+
const rest = restParts.join(":");
|
|
1052
|
+
const normalizedBase = normalizeHyperliquidBaseSymbol(rest);
|
|
1053
|
+
if (!dex || !normalizedBase || normalizedBase === UNKNOWN_SYMBOL2) {
|
|
1054
|
+
return null;
|
|
1055
|
+
}
|
|
1056
|
+
return `${dex}:${normalizedBase}`;
|
|
1057
|
+
}
|
|
1058
|
+
const pair = resolveHyperliquidPair(trimmed);
|
|
1059
|
+
if (pair) return pair;
|
|
1060
|
+
return normalizeHyperliquidBaseSymbol(trimmed);
|
|
1061
|
+
}
|
|
1062
|
+
function resolveHyperliquidSymbol(asset, override) {
|
|
1063
|
+
const raw = override && override.trim().length > 0 ? override.trim() : asset.trim();
|
|
1064
|
+
if (!raw) return raw;
|
|
1065
|
+
if (raw.startsWith("@")) return raw;
|
|
1066
|
+
if (raw.includes(":")) {
|
|
1067
|
+
const [dexRaw, ...restParts] = raw.split(":");
|
|
1068
|
+
const dex = dexRaw.trim().toLowerCase();
|
|
1069
|
+
const rest = restParts.join(":");
|
|
1070
|
+
const normalizedBase = normalizeHyperliquidBaseSymbol(rest) ?? canonicalizeHyperliquidTokenCase(rest);
|
|
1071
|
+
if (!dex) return normalizedBase;
|
|
1072
|
+
return `${dex}:${normalizedBase}`;
|
|
1073
|
+
}
|
|
1074
|
+
if (raw.includes("/")) {
|
|
1075
|
+
return resolveHyperliquidPair(raw) ?? raw;
|
|
1076
|
+
}
|
|
1077
|
+
if (raw.includes("-")) {
|
|
1078
|
+
return resolveHyperliquidPair(raw) ?? raw;
|
|
1079
|
+
}
|
|
1080
|
+
return normalizeHyperliquidBaseSymbol(raw) ?? canonicalizeHyperliquidTokenCase(raw);
|
|
1081
|
+
}
|
|
1082
|
+
function resolveHyperliquidPerpSymbol(asset) {
|
|
1083
|
+
const raw = asset.trim();
|
|
1084
|
+
if (!raw) return raw;
|
|
1085
|
+
const dex = extractHyperliquidDex(raw);
|
|
1086
|
+
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw.toUpperCase();
|
|
1087
|
+
return dex ? `${dex}:${base}` : base;
|
|
1088
|
+
}
|
|
1089
|
+
function resolveHyperliquidSpotSymbol(asset, defaultQuote = "USDC") {
|
|
1090
|
+
const quote = defaultQuote.trim().toUpperCase() || "USDC";
|
|
1091
|
+
const raw = asset.trim().toUpperCase();
|
|
1092
|
+
if (!raw) {
|
|
1093
|
+
return { symbol: raw, base: raw, quote };
|
|
1094
|
+
}
|
|
1095
|
+
const pair = resolveHyperliquidPair(raw);
|
|
1096
|
+
if (pair) {
|
|
1097
|
+
const [base2, pairQuote] = pair.split("/");
|
|
1098
|
+
return {
|
|
1099
|
+
symbol: pair,
|
|
1100
|
+
base: base2?.trim() ?? raw,
|
|
1101
|
+
quote: pairQuote?.trim() ?? quote
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1104
|
+
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw;
|
|
1105
|
+
return { symbol: `${base}/${quote}`, base, quote };
|
|
1106
|
+
}
|
|
1107
|
+
|
|
875
1108
|
// src/adapters/hyperliquid/info.ts
|
|
876
1109
|
async function postInfo(environment, payload) {
|
|
877
1110
|
const baseUrl = API_BASES[environment];
|
|
@@ -967,6 +1200,9 @@ var HyperliquidInfoClient = class {
|
|
|
967
1200
|
async function fetchHyperliquidMeta(environment = "mainnet") {
|
|
968
1201
|
return postInfo(environment, { type: "meta" });
|
|
969
1202
|
}
|
|
1203
|
+
async function fetchHyperliquidDexMeta(environment = "mainnet", dex) {
|
|
1204
|
+
return postInfo(environment, { type: "meta", dex });
|
|
1205
|
+
}
|
|
970
1206
|
async function fetchHyperliquidMetaAndAssetCtxs(environment = "mainnet") {
|
|
971
1207
|
return postInfo(environment, { type: "metaAndAssetCtxs" });
|
|
972
1208
|
}
|
|
@@ -1187,17 +1423,6 @@ var HyperliquidExchangeClient = class {
|
|
|
1187
1423
|
...params
|
|
1188
1424
|
});
|
|
1189
1425
|
}
|
|
1190
|
-
setDexAbstraction(params) {
|
|
1191
|
-
const base = {
|
|
1192
|
-
wallet: this.wallet,
|
|
1193
|
-
enabled: params.enabled,
|
|
1194
|
-
environment: this.environment,
|
|
1195
|
-
vaultAddress: this.vaultAddress,
|
|
1196
|
-
expiresAfter: this.expiresAfter,
|
|
1197
|
-
nonceSource: this.nonceSource
|
|
1198
|
-
};
|
|
1199
|
-
return setHyperliquidDexAbstraction(params.user ? { ...base, user: params.user } : base);
|
|
1200
|
-
}
|
|
1201
1426
|
setAccountAbstractionMode(params) {
|
|
1202
1427
|
const base = {
|
|
1203
1428
|
wallet: this.wallet,
|
|
@@ -1239,54 +1464,14 @@ async function setHyperliquidPortfolioMargin(options) {
|
|
|
1239
1464
|
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1240
1465
|
const user = normalizeAddress(options.user ?? options.wallet.address);
|
|
1241
1466
|
const action = {
|
|
1242
|
-
type: "userPortfolioMargin",
|
|
1243
|
-
enabled: Boolean(options.enabled),
|
|
1244
|
-
hyperliquidChain,
|
|
1245
|
-
signatureChainId,
|
|
1246
|
-
user,
|
|
1247
|
-
nonce
|
|
1248
|
-
};
|
|
1249
|
-
const signature = await signUserPortfolioMargin({
|
|
1250
|
-
wallet: options.wallet,
|
|
1251
|
-
action
|
|
1252
|
-
});
|
|
1253
|
-
const body = {
|
|
1254
|
-
action,
|
|
1255
|
-
nonce,
|
|
1256
|
-
signature
|
|
1257
|
-
};
|
|
1258
|
-
if (options.vaultAddress) {
|
|
1259
|
-
body.vaultAddress = normalizeAddress(options.vaultAddress);
|
|
1260
|
-
}
|
|
1261
|
-
if (typeof options.expiresAfter === "number") {
|
|
1262
|
-
body.expiresAfter = options.expiresAfter;
|
|
1263
|
-
}
|
|
1264
|
-
return postExchange(env, body);
|
|
1265
|
-
}
|
|
1266
|
-
async function setHyperliquidDexAbstraction(options) {
|
|
1267
|
-
const env = options.environment ?? "mainnet";
|
|
1268
|
-
if (!options.wallet?.account || !options.wallet.walletClient) {
|
|
1269
|
-
throw new Error("Wallet with signing capability is required for dex abstraction.");
|
|
1270
|
-
}
|
|
1271
|
-
const nonce = resolveRequiredExchangeNonce({
|
|
1272
|
-
nonce: options.nonce,
|
|
1273
|
-
nonceSource: options.nonceSource,
|
|
1274
|
-
walletNonceProvider: options.walletNonceProvider,
|
|
1275
|
-
wallet: options.wallet,
|
|
1276
|
-
action: "Hyperliquid dex abstraction"
|
|
1277
|
-
});
|
|
1278
|
-
const signatureChainId = getSignatureChainId(env);
|
|
1279
|
-
const hyperliquidChain = HL_CHAIN_LABEL[env];
|
|
1280
|
-
const user = normalizeAddress(options.user ?? options.wallet.address);
|
|
1281
|
-
const action = {
|
|
1282
|
-
type: "userDexAbstraction",
|
|
1467
|
+
type: "userPortfolioMargin",
|
|
1283
1468
|
enabled: Boolean(options.enabled),
|
|
1284
1469
|
hyperliquidChain,
|
|
1285
1470
|
signatureChainId,
|
|
1286
1471
|
user,
|
|
1287
1472
|
nonce
|
|
1288
1473
|
};
|
|
1289
|
-
const signature = await
|
|
1474
|
+
const signature = await signUserPortfolioMargin({
|
|
1290
1475
|
wallet: options.wallet,
|
|
1291
1476
|
action
|
|
1292
1477
|
});
|
|
@@ -1754,264 +1939,6 @@ function resolveHyperliquidStoreNetwork(environment) {
|
|
|
1754
1939
|
return environment === "mainnet" ? "hyperliquid" : "hyperliquid-testnet";
|
|
1755
1940
|
}
|
|
1756
1941
|
|
|
1757
|
-
// src/adapters/hyperliquid/symbols.ts
|
|
1758
|
-
var UNKNOWN_SYMBOL2 = "UNKNOWN";
|
|
1759
|
-
function extractHyperliquidDex(symbol) {
|
|
1760
|
-
const idx = symbol.indexOf(":");
|
|
1761
|
-
if (idx <= 0) return null;
|
|
1762
|
-
const dex = symbol.slice(0, idx).trim().toLowerCase();
|
|
1763
|
-
return dex || null;
|
|
1764
|
-
}
|
|
1765
|
-
function parseHyperliquidSymbol(value) {
|
|
1766
|
-
if (!value) return null;
|
|
1767
|
-
const trimmed = value.trim();
|
|
1768
|
-
if (!trimmed) return null;
|
|
1769
|
-
if (trimmed.startsWith("@")) {
|
|
1770
|
-
return {
|
|
1771
|
-
raw: trimmed,
|
|
1772
|
-
kind: "spotIndex",
|
|
1773
|
-
normalized: trimmed,
|
|
1774
|
-
routeTicker: trimmed,
|
|
1775
|
-
displaySymbol: trimmed,
|
|
1776
|
-
base: null,
|
|
1777
|
-
quote: null,
|
|
1778
|
-
pair: null,
|
|
1779
|
-
dex: null,
|
|
1780
|
-
leverageMode: "cross"
|
|
1781
|
-
};
|
|
1782
|
-
}
|
|
1783
|
-
const dex = extractHyperliquidDex(trimmed);
|
|
1784
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
1785
|
-
const base = normalizeHyperliquidBaseSymbol(trimmed);
|
|
1786
|
-
if (dex) {
|
|
1787
|
-
if (!base) return null;
|
|
1788
|
-
return {
|
|
1789
|
-
raw: trimmed,
|
|
1790
|
-
kind: "perp",
|
|
1791
|
-
normalized: `${dex}:${base}`,
|
|
1792
|
-
routeTicker: `${dex}:${base}`,
|
|
1793
|
-
displaySymbol: `${dex.toUpperCase()}:${base}-USDC`,
|
|
1794
|
-
base,
|
|
1795
|
-
quote: null,
|
|
1796
|
-
pair: null,
|
|
1797
|
-
dex,
|
|
1798
|
-
leverageMode: "isolated"
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
if (pair) {
|
|
1802
|
-
const [pairBase, pairQuote] = pair.split("/");
|
|
1803
|
-
return {
|
|
1804
|
-
raw: trimmed,
|
|
1805
|
-
kind: "spot",
|
|
1806
|
-
normalized: pair,
|
|
1807
|
-
routeTicker: pair.replace("/", "-"),
|
|
1808
|
-
displaySymbol: pair.replace("/", "-"),
|
|
1809
|
-
base: pairBase ?? null,
|
|
1810
|
-
quote: pairQuote ?? null,
|
|
1811
|
-
pair,
|
|
1812
|
-
dex: null,
|
|
1813
|
-
leverageMode: "cross"
|
|
1814
|
-
};
|
|
1815
|
-
}
|
|
1816
|
-
if (!base) return null;
|
|
1817
|
-
return {
|
|
1818
|
-
raw: trimmed,
|
|
1819
|
-
kind: "perp",
|
|
1820
|
-
normalized: base,
|
|
1821
|
-
routeTicker: base,
|
|
1822
|
-
displaySymbol: `${base}-USDC`,
|
|
1823
|
-
base,
|
|
1824
|
-
quote: null,
|
|
1825
|
-
pair: null,
|
|
1826
|
-
dex: null,
|
|
1827
|
-
leverageMode: "cross"
|
|
1828
|
-
};
|
|
1829
|
-
}
|
|
1830
|
-
function normalizeSpotTokenName2(value) {
|
|
1831
|
-
const raw = (value ?? "").trim();
|
|
1832
|
-
if (!raw) return "";
|
|
1833
|
-
if (raw.endsWith("0") && raw.length > 1) {
|
|
1834
|
-
return raw.slice(0, -1);
|
|
1835
|
-
}
|
|
1836
|
-
return raw;
|
|
1837
|
-
}
|
|
1838
|
-
function normalizeHyperliquidBaseSymbol(value) {
|
|
1839
|
-
if (!value) return null;
|
|
1840
|
-
const trimmed = value.trim();
|
|
1841
|
-
if (!trimmed) return null;
|
|
1842
|
-
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
1843
|
-
const base = withoutDex.split("-")[0] ?? withoutDex;
|
|
1844
|
-
const baseNoPair = base.split("/")[0] ?? base;
|
|
1845
|
-
const normalized = baseNoPair.trim().toUpperCase();
|
|
1846
|
-
if (!normalized || normalized === UNKNOWN_SYMBOL2) return null;
|
|
1847
|
-
return normalized;
|
|
1848
|
-
}
|
|
1849
|
-
function normalizeHyperliquidMetaSymbol(symbol) {
|
|
1850
|
-
const trimmed = symbol.trim();
|
|
1851
|
-
const noDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
1852
|
-
const noPair = noDex.split("-")[0] ?? noDex;
|
|
1853
|
-
return (noPair.split("/")[0] ?? noPair).trim();
|
|
1854
|
-
}
|
|
1855
|
-
function resolveHyperliquidPair(value) {
|
|
1856
|
-
if (!value) return null;
|
|
1857
|
-
const trimmed = value.trim();
|
|
1858
|
-
if (!trimmed) return null;
|
|
1859
|
-
const withoutDex = trimmed.includes(":") ? trimmed.split(":").slice(1).join(":") : trimmed;
|
|
1860
|
-
if (withoutDex.includes("/")) {
|
|
1861
|
-
return withoutDex.toUpperCase();
|
|
1862
|
-
}
|
|
1863
|
-
if (withoutDex.includes("-")) {
|
|
1864
|
-
const [base, ...rest] = withoutDex.split("-");
|
|
1865
|
-
const quote = rest.join("-").trim();
|
|
1866
|
-
if (!base || !quote) return null;
|
|
1867
|
-
return `${base.toUpperCase()}/${quote.toUpperCase()}`;
|
|
1868
|
-
}
|
|
1869
|
-
return null;
|
|
1870
|
-
}
|
|
1871
|
-
function resolveHyperliquidLeverageMode(symbol) {
|
|
1872
|
-
return symbol.includes(":") ? "isolated" : "cross";
|
|
1873
|
-
}
|
|
1874
|
-
function resolveHyperliquidProfileChain(environment) {
|
|
1875
|
-
return environment === "testnet" ? "hyperliquid-testnet" : "hyperliquid";
|
|
1876
|
-
}
|
|
1877
|
-
function buildHyperliquidProfileAssets(params) {
|
|
1878
|
-
const chain = resolveHyperliquidProfileChain(params.environment);
|
|
1879
|
-
return params.assets.map((asset) => {
|
|
1880
|
-
const symbols = asset.assetSymbols.map((symbol) => normalizeHyperliquidBaseSymbol(symbol)).filter((symbol) => Boolean(symbol));
|
|
1881
|
-
if (symbols.length === 0) return null;
|
|
1882
|
-
const explicitPair = typeof asset.pair === "string" ? resolveHyperliquidPair(asset.pair) : null;
|
|
1883
|
-
const derivedPair = symbols.length === 1 ? resolveHyperliquidPair(asset.assetSymbols[0] ?? symbols[0]) : null;
|
|
1884
|
-
const pair = explicitPair ?? derivedPair ?? void 0;
|
|
1885
|
-
const leverage = typeof asset.leverage === "number" && Number.isFinite(asset.leverage) && asset.leverage > 0 ? asset.leverage : void 0;
|
|
1886
|
-
const walletAddress = typeof asset.walletAddress === "string" && asset.walletAddress.trim().length > 0 ? asset.walletAddress.trim() : void 0;
|
|
1887
|
-
return {
|
|
1888
|
-
venue: "hyperliquid",
|
|
1889
|
-
chain,
|
|
1890
|
-
assetSymbols: symbols,
|
|
1891
|
-
...pair ? { pair } : {},
|
|
1892
|
-
...leverage ? { leverage } : {},
|
|
1893
|
-
...walletAddress ? { walletAddress } : {}
|
|
1894
|
-
};
|
|
1895
|
-
}).filter((asset) => asset !== null);
|
|
1896
|
-
}
|
|
1897
|
-
function parseSpotPairSymbol(symbol) {
|
|
1898
|
-
const trimmed = symbol.trim();
|
|
1899
|
-
if (!trimmed.includes("/")) return null;
|
|
1900
|
-
const [rawBase, rawQuote] = trimmed.split("/");
|
|
1901
|
-
const base = rawBase?.trim().toUpperCase() ?? "";
|
|
1902
|
-
const quote = rawQuote?.trim().toUpperCase() ?? "";
|
|
1903
|
-
if (!base || !quote) return null;
|
|
1904
|
-
return { base, quote };
|
|
1905
|
-
}
|
|
1906
|
-
function isHyperliquidSpotSymbol(symbol) {
|
|
1907
|
-
const trimmed = symbol.trim();
|
|
1908
|
-
if (!trimmed) return false;
|
|
1909
|
-
if (trimmed.startsWith("@") || trimmed.includes("/")) return true;
|
|
1910
|
-
if (trimmed.includes(":")) return false;
|
|
1911
|
-
return resolveHyperliquidPair(trimmed) !== null;
|
|
1912
|
-
}
|
|
1913
|
-
function resolveHyperliquidMarketDataCoin(value) {
|
|
1914
|
-
if (!value) return null;
|
|
1915
|
-
const trimmed = value.trim();
|
|
1916
|
-
if (!trimmed) return null;
|
|
1917
|
-
if (trimmed.startsWith("@")) return trimmed;
|
|
1918
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
1919
|
-
if (pair && !extractHyperliquidDex(trimmed)) {
|
|
1920
|
-
return pair;
|
|
1921
|
-
}
|
|
1922
|
-
return trimmed;
|
|
1923
|
-
}
|
|
1924
|
-
function resolveSpotMidCandidates(baseSymbol) {
|
|
1925
|
-
const base = baseSymbol.trim().toUpperCase();
|
|
1926
|
-
if (!base) return [];
|
|
1927
|
-
const candidates = [base];
|
|
1928
|
-
if (base.startsWith("U") && base.length > 1) {
|
|
1929
|
-
candidates.push(base.slice(1));
|
|
1930
|
-
}
|
|
1931
|
-
return Array.from(new Set(candidates));
|
|
1932
|
-
}
|
|
1933
|
-
function resolveSpotTokenCandidates(value) {
|
|
1934
|
-
const normalized = normalizeSpotTokenName2(value).toUpperCase();
|
|
1935
|
-
if (!normalized) return [];
|
|
1936
|
-
const candidates = [normalized];
|
|
1937
|
-
if (normalized.startsWith("U") && normalized.length > 1) {
|
|
1938
|
-
candidates.push(normalized.slice(1));
|
|
1939
|
-
}
|
|
1940
|
-
return Array.from(new Set(candidates));
|
|
1941
|
-
}
|
|
1942
|
-
function resolveHyperliquidOrderSymbol(value) {
|
|
1943
|
-
if (!value) return null;
|
|
1944
|
-
const trimmed = value.trim();
|
|
1945
|
-
if (!trimmed) return null;
|
|
1946
|
-
if (trimmed.startsWith("@")) return trimmed;
|
|
1947
|
-
if (trimmed.includes(":")) {
|
|
1948
|
-
const [rawDex, ...restParts] = trimmed.split(":");
|
|
1949
|
-
const dex = rawDex.trim().toLowerCase();
|
|
1950
|
-
const rest = restParts.join(":");
|
|
1951
|
-
const base = rest.split("/")[0]?.split("-")[0] ?? rest;
|
|
1952
|
-
const normalizedBase = base.trim().toUpperCase();
|
|
1953
|
-
if (!dex || !normalizedBase || normalizedBase === UNKNOWN_SYMBOL2) {
|
|
1954
|
-
return null;
|
|
1955
|
-
}
|
|
1956
|
-
return `${dex}:${normalizedBase}`;
|
|
1957
|
-
}
|
|
1958
|
-
const pair = resolveHyperliquidPair(trimmed);
|
|
1959
|
-
if (pair) return pair;
|
|
1960
|
-
return normalizeHyperliquidBaseSymbol(trimmed);
|
|
1961
|
-
}
|
|
1962
|
-
function resolveHyperliquidSymbol(asset, override) {
|
|
1963
|
-
const raw = override && override.trim().length > 0 ? override.trim() : asset.trim();
|
|
1964
|
-
if (!raw) return raw;
|
|
1965
|
-
if (raw.startsWith("@")) return raw;
|
|
1966
|
-
if (raw.includes(":")) {
|
|
1967
|
-
const [dexRaw, ...restParts] = raw.split(":");
|
|
1968
|
-
const dex = dexRaw.trim().toLowerCase();
|
|
1969
|
-
const rest = restParts.join(":");
|
|
1970
|
-
const base2 = rest.split("/")[0]?.split("-")[0] ?? rest;
|
|
1971
|
-
const normalizedBase = base2.trim().toUpperCase();
|
|
1972
|
-
if (!dex) return normalizedBase;
|
|
1973
|
-
return `${dex}:${normalizedBase}`;
|
|
1974
|
-
}
|
|
1975
|
-
if (raw.includes("/")) {
|
|
1976
|
-
return raw.toUpperCase();
|
|
1977
|
-
}
|
|
1978
|
-
if (raw.includes("-")) {
|
|
1979
|
-
const [base2, ...rest] = raw.split("-");
|
|
1980
|
-
const quote = rest.join("-").trim();
|
|
1981
|
-
if (base2 && quote) {
|
|
1982
|
-
return `${base2.toUpperCase()}/${quote.toUpperCase()}`;
|
|
1983
|
-
}
|
|
1984
|
-
}
|
|
1985
|
-
const base = raw.split("-")[0] ?? raw;
|
|
1986
|
-
const baseNoPair = base.split("/")[0] ?? base;
|
|
1987
|
-
return baseNoPair.trim().toUpperCase();
|
|
1988
|
-
}
|
|
1989
|
-
function resolveHyperliquidPerpSymbol(asset) {
|
|
1990
|
-
const raw = asset.trim();
|
|
1991
|
-
if (!raw) return raw;
|
|
1992
|
-
const dex = extractHyperliquidDex(raw);
|
|
1993
|
-
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw.toUpperCase();
|
|
1994
|
-
return dex ? `${dex}:${base}` : base;
|
|
1995
|
-
}
|
|
1996
|
-
function resolveHyperliquidSpotSymbol(asset, defaultQuote = "USDC") {
|
|
1997
|
-
const quote = defaultQuote.trim().toUpperCase() || "USDC";
|
|
1998
|
-
const raw = asset.trim().toUpperCase();
|
|
1999
|
-
if (!raw) {
|
|
2000
|
-
return { symbol: raw, base: raw, quote };
|
|
2001
|
-
}
|
|
2002
|
-
const pair = resolveHyperliquidPair(raw);
|
|
2003
|
-
if (pair) {
|
|
2004
|
-
const [base2, pairQuote] = pair.split("/");
|
|
2005
|
-
return {
|
|
2006
|
-
symbol: pair,
|
|
2007
|
-
base: base2?.trim() ?? raw,
|
|
2008
|
-
quote: pairQuote?.trim() ?? quote
|
|
2009
|
-
};
|
|
2010
|
-
}
|
|
2011
|
-
const base = normalizeHyperliquidBaseSymbol(raw) ?? raw;
|
|
2012
|
-
return { symbol: `${base}/${quote}`, base, quote };
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
1942
|
// src/adapters/hyperliquid/strategy.ts
|
|
2016
1943
|
function clampDcaWeight(value) {
|
|
2017
1944
|
if (typeof value !== "number" || !Number.isFinite(value)) return 0;
|
|
@@ -3057,12 +2984,14 @@ async function placeHyperliquidOrder(options) {
|
|
|
3057
2984
|
const action = {
|
|
3058
2985
|
type: "order",
|
|
3059
2986
|
orders: preparedOrders,
|
|
3060
|
-
grouping
|
|
3061
|
-
|
|
2987
|
+
grouping
|
|
2988
|
+
};
|
|
2989
|
+
if (orders.every((intent) => supportsHyperliquidBuilderFee(intent))) {
|
|
2990
|
+
action.builder = {
|
|
3062
2991
|
b: normalizeAddress(BUILDER_CODE.address),
|
|
3063
2992
|
f: BUILDER_CODE.fee
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
2993
|
+
};
|
|
2994
|
+
}
|
|
3066
2995
|
const effectiveNonce = resolveRequiredNonce({
|
|
3067
2996
|
nonce,
|
|
3068
2997
|
nonceSource: options.nonceSource,
|
|
@@ -3487,7 +3416,6 @@ async function placeHyperliquidOrder2(options) {
|
|
|
3487
3416
|
expiresAfter,
|
|
3488
3417
|
nonce
|
|
3489
3418
|
} = options;
|
|
3490
|
-
const effectiveBuilder = BUILDER_CODE;
|
|
3491
3419
|
if (!wallet?.account || !wallet.walletClient) {
|
|
3492
3420
|
throw new Error("Hyperliquid order signing requires a wallet with signing capabilities.");
|
|
3493
3421
|
}
|
|
@@ -3539,10 +3467,10 @@ async function placeHyperliquidOrder2(options) {
|
|
|
3539
3467
|
orders: preparedOrders,
|
|
3540
3468
|
grouping
|
|
3541
3469
|
};
|
|
3542
|
-
if (
|
|
3470
|
+
if (orders.every((intent) => supportsHyperliquidBuilderFee(intent))) {
|
|
3543
3471
|
action.builder = {
|
|
3544
|
-
b: normalizeAddress(
|
|
3545
|
-
f:
|
|
3472
|
+
b: normalizeAddress(BUILDER_CODE.address),
|
|
3473
|
+
f: BUILDER_CODE.fee
|
|
3546
3474
|
};
|
|
3547
3475
|
}
|
|
3548
3476
|
const effectiveNonce = resolveRequiredNonce2({
|
|
@@ -3875,6 +3803,6 @@ var __hyperliquidInternals = {
|
|
|
3875
3803
|
splitSignature
|
|
3876
3804
|
};
|
|
3877
3805
|
|
|
3878
|
-
export { DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, DEFAULT_HYPERLIQUID_TPSL_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, estimateHyperliquidLiquidationPrice, 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, parseHyperliquidSymbol, parseSpotPairSymbol, placeHyperliquidOrder2 as placeHyperliquidOrder, placeHyperliquidOrderWithTpSl, placeHyperliquidPositionTpSl, placeHyperliquidTwapOrder, planHyperliquidTrade, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, 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, resolveSpotMidCandidates, resolveSpotTokenCandidates, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode,
|
|
3806
|
+
export { DEFAULT_HYPERLIQUID_CADENCE_CRON, DEFAULT_HYPERLIQUID_MARKET_SLIPPAGE_BPS, DEFAULT_HYPERLIQUID_TPSL_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, estimateHyperliquidLiquidationPrice, 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, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, getHyperliquidMaxBuilderFee, isHyperliquidSpotSymbol, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeSpotTokenName2 as normalizeSpotTokenName, parseHyperliquidJson, parseHyperliquidSymbol, parseSpotPairSymbol, placeHyperliquidOrder2 as placeHyperliquidOrder, placeHyperliquidOrderWithTpSl, placeHyperliquidPositionTpSl, placeHyperliquidTwapOrder, planHyperliquidTrade, readHyperliquidAccountValue, readHyperliquidNumber, readHyperliquidPerpPosition, readHyperliquidPerpPositionSize, readHyperliquidSpotAccountValue, readHyperliquidSpotBalance, readHyperliquidSpotBalanceSize, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, 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, resolveSpotMidCandidates, resolveSpotTokenCandidates, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidPortfolioMargin, supportsHyperliquidBuilderFee, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, withdrawFromHyperliquid };
|
|
3879
3807
|
//# sourceMappingURL=index.js.map
|
|
3880
3808
|
//# sourceMappingURL=index.js.map
|