opentool 0.10.4 → 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/index.js CHANGED
@@ -1299,15 +1299,9 @@ var registry = {
1299
1299
  chains,
1300
1300
  tokens
1301
1301
  };
1302
- function normalizePrivateKey(raw) {
1303
- const trimmed = raw.trim();
1304
- const withPrefix = trimmed.startsWith("0x") ? trimmed : `0x${trimmed}`;
1305
- if (!/^0x[0-9a-fA-F]{64}$/.test(withPrefix)) {
1306
- throw new Error("wallet() privateKey must be a 32-byte hex string");
1307
- }
1308
- return withPrefix;
1309
- }
1310
- function createNonceSource(start = Date.now()) {
1302
+
1303
+ // src/wallet/nonces.ts
1304
+ function createMonotonicNonceSource(start = Date.now()) {
1311
1305
  let last = start;
1312
1306
  return () => {
1313
1307
  const now = Date.now();
@@ -1319,6 +1313,16 @@ function createNonceSource(start = Date.now()) {
1319
1313
  return last;
1320
1314
  };
1321
1315
  }
1316
+
1317
+ // src/wallet/providers/private-key.ts
1318
+ function normalizePrivateKey(raw) {
1319
+ const trimmed = raw.trim();
1320
+ const withPrefix = trimmed.startsWith("0x") ? trimmed : `0x${trimmed}`;
1321
+ if (!/^0x[0-9a-fA-F]{64}$/.test(withPrefix)) {
1322
+ throw new Error("wallet() privateKey must be a 32-byte hex string");
1323
+ }
1324
+ return withPrefix;
1325
+ }
1322
1326
  function createPrivateKeyProvider(config) {
1323
1327
  const privateKey = normalizePrivateKey(config.privateKey);
1324
1328
  const account = privateKeyToAccount(privateKey);
@@ -1365,19 +1369,7 @@ function createPrivateKeyProvider(config) {
1365
1369
  sendTransaction,
1366
1370
  getNativeBalance,
1367
1371
  transfer,
1368
- nonceSource: createNonceSource()
1369
- };
1370
- }
1371
- function createNonceSource2(start = Date.now()) {
1372
- let last = start;
1373
- return () => {
1374
- const now = Date.now();
1375
- if (now > last) {
1376
- last = now;
1377
- } else {
1378
- last += 1;
1379
- }
1380
- return last;
1372
+ nonceSource: createMonotonicNonceSource()
1381
1373
  };
1382
1374
  }
1383
1375
  async function createTurnkeyProvider(config) {
@@ -1436,7 +1428,7 @@ async function createTurnkeyProvider(config) {
1436
1428
  sendTransaction,
1437
1429
  getNativeBalance,
1438
1430
  transfer,
1439
- nonceSource: createNonceSource2()
1431
+ nonceSource: createMonotonicNonceSource()
1440
1432
  };
1441
1433
  }
1442
1434
 
@@ -2703,6 +2695,16 @@ async function fetchHyperliquidSpotClearinghouseState(params) {
2703
2695
  }
2704
2696
 
2705
2697
  // src/adapters/hyperliquid/exchange.ts
2698
+ function resolveRequiredExchangeNonce(options) {
2699
+ if (typeof options.nonce === "number") {
2700
+ return options.nonce;
2701
+ }
2702
+ const resolved = options.walletNonceProvider?.() ?? options.wallet.nonceSource?.() ?? options.nonceSource?.();
2703
+ if (resolved === void 0) {
2704
+ throw new Error(`${options.action} requires an explicit nonce or wallet nonce source.`);
2705
+ }
2706
+ return resolved;
2707
+ }
2706
2708
  var HyperliquidExchangeClient = class {
2707
2709
  constructor(args) {
2708
2710
  this.wallet = args.wallet;
@@ -2873,7 +2875,13 @@ async function setHyperliquidPortfolioMargin(options) {
2873
2875
  if (!options.wallet?.account || !options.wallet.walletClient) {
2874
2876
  throw new Error("Wallet with signing capability is required for portfolio margin.");
2875
2877
  }
2876
- const nonce = options.nonce ?? options.walletNonceProvider?.() ?? options.wallet.nonceSource?.() ?? options.nonceSource?.() ?? Date.now();
2878
+ const nonce = resolveRequiredExchangeNonce({
2879
+ nonce: options.nonce,
2880
+ nonceSource: options.nonceSource,
2881
+ walletNonceProvider: options.walletNonceProvider,
2882
+ wallet: options.wallet,
2883
+ action: "Hyperliquid portfolio margin"
2884
+ });
2877
2885
  const signatureChainId = getSignatureChainId(env);
2878
2886
  const hyperliquidChain = HL_CHAIN_LABEL[env];
2879
2887
  const user = normalizeAddress(options.user ?? options.wallet.address);
@@ -2907,7 +2915,13 @@ async function setHyperliquidDexAbstraction(options) {
2907
2915
  if (!options.wallet?.account || !options.wallet.walletClient) {
2908
2916
  throw new Error("Wallet with signing capability is required for dex abstraction.");
2909
2917
  }
2910
- const nonce = options.nonce ?? options.walletNonceProvider?.() ?? options.wallet.nonceSource?.() ?? options.nonceSource?.() ?? Date.now();
2918
+ const nonce = resolveRequiredExchangeNonce({
2919
+ nonce: options.nonce,
2920
+ nonceSource: options.nonceSource,
2921
+ walletNonceProvider: options.walletNonceProvider,
2922
+ wallet: options.wallet,
2923
+ action: "Hyperliquid dex abstraction"
2924
+ });
2911
2925
  const signatureChainId = getSignatureChainId(env);
2912
2926
  const hyperliquidChain = HL_CHAIN_LABEL[env];
2913
2927
  const user = normalizeAddress(options.user ?? options.wallet.address);
@@ -2941,7 +2955,13 @@ async function setHyperliquidAccountAbstractionMode(options) {
2941
2955
  if (!options.wallet?.account || !options.wallet.walletClient) {
2942
2956
  throw new Error("Wallet with signing capability is required for account abstraction mode.");
2943
2957
  }
2944
- const nonce = options.nonce ?? options.walletNonceProvider?.() ?? options.wallet.nonceSource?.() ?? options.nonceSource?.() ?? Date.now();
2958
+ const nonce = resolveRequiredExchangeNonce({
2959
+ nonce: options.nonce,
2960
+ nonceSource: options.nonceSource,
2961
+ walletNonceProvider: options.walletNonceProvider,
2962
+ wallet: options.wallet,
2963
+ action: "Hyperliquid account abstraction mode"
2964
+ });
2945
2965
  const signatureChainId = getSignatureChainId(env);
2946
2966
  const hyperliquidChain = HL_CHAIN_LABEL[env];
2947
2967
  const user = normalizeAddress(options.user ?? options.wallet.address);
@@ -3141,7 +3161,12 @@ async function sendHyperliquidSpot(options) {
3141
3161
  assertPositiveDecimal(options.amount, "amount");
3142
3162
  const signatureChainId = getSignatureChainId(env);
3143
3163
  const hyperliquidChain = HL_CHAIN_LABEL[env];
3144
- const nonce = options.nonce ?? options.nonceSource?.() ?? Date.now();
3164
+ const nonce = resolveRequiredExchangeNonce({
3165
+ nonce: options.nonce,
3166
+ nonceSource: options.nonceSource,
3167
+ wallet: options.wallet,
3168
+ action: "Hyperliquid spot send"
3169
+ });
3145
3170
  const time = BigInt(nonce);
3146
3171
  const signature = await signSpotSend({
3147
3172
  wallet: options.wallet,
@@ -4515,6 +4540,16 @@ function resolveHyperliquidCadenceFromResolution(resolution) {
4515
4540
  }
4516
4541
 
4517
4542
  // src/adapters/hyperliquid/index.ts
4543
+ function resolveRequiredNonce(params) {
4544
+ if (typeof params.nonce === "number") {
4545
+ return params.nonce;
4546
+ }
4547
+ const resolved = params.nonceSource?.() ?? params.wallet?.nonceSource?.();
4548
+ if (resolved === void 0) {
4549
+ throw new Error(`${params.action} requires an explicit nonce or wallet nonce source.`);
4550
+ }
4551
+ return resolved;
4552
+ }
4518
4553
  function assertPositiveDecimalInput(value, label) {
4519
4554
  if (typeof value === "number") {
4520
4555
  if (!Number.isFinite(value) || value <= 0) {
@@ -4623,7 +4658,12 @@ async function placeHyperliquidOrder(options) {
4623
4658
  f: effectiveBuilder.fee
4624
4659
  };
4625
4660
  }
4626
- const effectiveNonce = nonce ?? Date.now();
4661
+ const effectiveNonce = resolveRequiredNonce({
4662
+ nonce,
4663
+ nonceSource: options.nonceSource,
4664
+ wallet: wallet2,
4665
+ action: "Hyperliquid order submission"
4666
+ });
4627
4667
  const signature = await signL1Action({
4628
4668
  wallet: wallet2,
4629
4669
  action,
@@ -4739,8 +4779,13 @@ async function withdrawFromHyperliquid(options) {
4739
4779
  chainId: Number.parseInt(signatureChainId, 16),
4740
4780
  verifyingContract: ZERO_ADDRESS
4741
4781
  };
4742
- const time = BigInt(Date.now());
4743
- const nonce = Number(time);
4782
+ const nonce = resolveRequiredNonce({
4783
+ nonce: options.nonce,
4784
+ nonceSource: options.nonceSource,
4785
+ wallet: wallet2,
4786
+ action: "Hyperliquid withdraw"
4787
+ });
4788
+ const time = BigInt(nonce);
4744
4789
  const normalizedDestination = normalizeAddress(destination);
4745
4790
  const message = {
4746
4791
  hyperliquidChain,
@@ -4820,7 +4865,12 @@ async function approveHyperliquidBuilderFee(options) {
4820
4865
  const inferredEnvironment = environment ?? "mainnet";
4821
4866
  const resolvedBaseUrl = API_BASES[inferredEnvironment];
4822
4867
  const maxFeeRate = formattedPercent;
4823
- const effectiveNonce = nonce ?? Date.now();
4868
+ const effectiveNonce = resolveRequiredNonce({
4869
+ nonce,
4870
+ nonceSource: options.nonceSource,
4871
+ wallet: wallet2,
4872
+ action: "Hyperliquid builder approval"
4873
+ });
4824
4874
  const signatureNonce = BigInt(effectiveNonce);
4825
4875
  const signatureChainHex = signatureChainId ?? getSignatureChainId(inferredEnvironment);
4826
4876
  const approvalSignature = await signApproveBuilderFee({
@@ -5761,6 +5811,176 @@ async function fetchPolymarketPriceHistory(params) {
5761
5811
  })).filter((point) => Number.isFinite(point.t) && Number.isFinite(point.p));
5762
5812
  }
5763
5813
 
5814
+ // src/adapters/news/signals.ts
5815
+ var DEFAULT_OPENPOND_GATEWAY_URL2 = "https://gateway.openpond.dev";
5816
+ function resolveFetchImplementation(override) {
5817
+ const fetchImplementation = override ?? globalThis.fetch;
5818
+ if (!fetchImplementation) {
5819
+ throw new Error(
5820
+ "No fetch implementation available. Provide one via NewsSignalClientConfig.fetchImplementation."
5821
+ );
5822
+ }
5823
+ return fetchImplementation;
5824
+ }
5825
+ function resolveNewsGatewayBase(override) {
5826
+ const value = override ?? process.env.OPENPOND_GATEWAY_URL ?? DEFAULT_OPENPOND_GATEWAY_URL2;
5827
+ if (typeof value !== "string") {
5828
+ throw new Error("OPENPOND_GATEWAY_URL is required.");
5829
+ }
5830
+ const trimmed = value.trim();
5831
+ if (!trimmed) {
5832
+ throw new Error("OPENPOND_GATEWAY_URL is required.");
5833
+ }
5834
+ return trimmed.replace(/\/$/, "");
5835
+ }
5836
+ function normalizeAsOf(value) {
5837
+ if (value == null) return void 0;
5838
+ const date = value instanceof Date ? value : new Date(value);
5839
+ if (Number.isNaN(date.getTime())) {
5840
+ throw new Error("asOf must be a valid ISO-8601 datetime or Date.");
5841
+ }
5842
+ return date.toISOString();
5843
+ }
5844
+ async function postGatewayJson(params) {
5845
+ const gatewayBase = resolveNewsGatewayBase(params.gatewayBase);
5846
+ const fetchImplementation = resolveFetchImplementation(params.fetchImplementation);
5847
+ const response = await fetchImplementation(`${gatewayBase}${params.path}`, {
5848
+ method: "POST",
5849
+ headers: { "content-type": "application/json" },
5850
+ body: JSON.stringify(params.body)
5851
+ });
5852
+ const text = await response.text().catch(() => "");
5853
+ let payload = null;
5854
+ try {
5855
+ payload = text ? JSON.parse(text) : null;
5856
+ } catch {
5857
+ payload = text;
5858
+ }
5859
+ if (!response.ok) {
5860
+ throw new Error(
5861
+ `Gateway request failed (${response.status}) for ${params.path}: ${typeof payload === "string" && payload ? payload : "no_body"}`
5862
+ );
5863
+ }
5864
+ return payload;
5865
+ }
5866
+ async function fetchNewsEventSignal(params) {
5867
+ if (!params.query?.trim() && !params.eventKey?.trim()) {
5868
+ throw new Error("query or eventKey is required.");
5869
+ }
5870
+ return postGatewayJson({
5871
+ path: "/v1/news/event-signal",
5872
+ gatewayBase: params.gatewayBase,
5873
+ fetchImplementation: params.fetchImplementation,
5874
+ body: {
5875
+ ...params.query?.trim() ? { query: params.query.trim() } : {},
5876
+ ...params.eventKey?.trim() ? { eventKey: params.eventKey.trim() } : {},
5877
+ ...normalizeAsOf(params.asOf) ? { asOf: normalizeAsOf(params.asOf) } : {},
5878
+ ...typeof params.includePredictionMarkets === "boolean" ? { includePredictionMarkets: params.includePredictionMarkets } : {},
5879
+ ...typeof params.ingestOnRequest === "boolean" ? { ingestOnRequest: params.ingestOnRequest } : {},
5880
+ ...typeof params.maxAgeHours === "number" ? { maxAgeHours: params.maxAgeHours } : {},
5881
+ policy: {
5882
+ ...typeof params.minConfidence === "number" ? { minConfidence: params.minConfidence } : {},
5883
+ ...typeof params.minIndependentSources === "number" ? { minIndependentSources: params.minIndependentSources } : {},
5884
+ ...typeof params.minTierASources === "number" ? { minTierASources: params.minTierASources } : {}
5885
+ }
5886
+ }
5887
+ });
5888
+ }
5889
+ async function fetchNewsPropositionSignal(params) {
5890
+ const question = params.question.trim();
5891
+ if (!question) {
5892
+ throw new Error("question is required.");
5893
+ }
5894
+ return postGatewayJson({
5895
+ path: "/v1/news/event-proposition-signal",
5896
+ gatewayBase: params.gatewayBase,
5897
+ fetchImplementation: params.fetchImplementation,
5898
+ body: {
5899
+ question,
5900
+ ...params.query?.trim() ? { query: params.query.trim() } : {},
5901
+ ...params.eventKey?.trim() ? { eventKey: params.eventKey.trim() } : {},
5902
+ ...params.propositionType?.trim() ? { propositionType: params.propositionType.trim() } : {},
5903
+ ...normalizeAsOf(params.asOf) ? { asOf: normalizeAsOf(params.asOf) } : {},
5904
+ ...typeof params.includePredictionMarkets === "boolean" ? { includePredictionMarkets: params.includePredictionMarkets } : {},
5905
+ ...typeof params.ingestOnRequest === "boolean" ? { ingestOnRequest: params.ingestOnRequest } : {},
5906
+ ...typeof params.maxAgeHours === "number" ? { maxAgeHours: params.maxAgeHours } : {},
5907
+ ...typeof params.candidateLimit === "number" ? { candidateLimit: params.candidateLimit } : {}
5908
+ }
5909
+ });
5910
+ }
5911
+ function evaluateNewsContinuationGate(signal, gate) {
5912
+ const blockedAction = gate.onBlocked ?? "skip";
5913
+ const blockingFactors = [];
5914
+ if (gate.mode === "event") {
5915
+ const eventSignal = signal;
5916
+ if (gate.requireTriggerPassed !== false && !eventSignal.triggerPassed) {
5917
+ blockingFactors.push("trigger_not_passed");
5918
+ }
5919
+ if (typeof gate.minConfidence === "number" && eventSignal.eventConfidence < gate.minConfidence) {
5920
+ blockingFactors.push("confidence_below_threshold");
5921
+ }
5922
+ if (typeof gate.maxDataAgeMs === "number" && typeof eventSignal.dataAgeMs === "number" && eventSignal.dataAgeMs > gate.maxDataAgeMs) {
5923
+ blockingFactors.push("signal_too_stale");
5924
+ }
5925
+ if (typeof gate.minIndependentSources === "number" && eventSignal.supportingSourceCount < gate.minIndependentSources) {
5926
+ blockingFactors.push("insufficient_supporting_sources");
5927
+ }
5928
+ if (typeof gate.minTierASources === "number" && eventSignal.tierASourceCount < gate.minTierASources) {
5929
+ blockingFactors.push("insufficient_tier_a_sources");
5930
+ }
5931
+ } else {
5932
+ const propositionSignal = signal;
5933
+ if (gate.requireResolvedEvent !== false && propositionSignal.propositionStatus === "no_matching_event") {
5934
+ blockingFactors.push("no_matching_event");
5935
+ }
5936
+ if (gate.expectedAnswer && propositionSignal.answer !== gate.expectedAnswer) {
5937
+ blockingFactors.push("unexpected_answer");
5938
+ }
5939
+ if (typeof gate.minConfidence === "number" && propositionSignal.propositionConfidence < gate.minConfidence) {
5940
+ blockingFactors.push("confidence_below_threshold");
5941
+ }
5942
+ if (typeof gate.maxDataAgeMs === "number" && typeof propositionSignal.dataAgeMs === "number" && propositionSignal.dataAgeMs > gate.maxDataAgeMs) {
5943
+ blockingFactors.push("signal_too_stale");
5944
+ }
5945
+ }
5946
+ if (blockingFactors.length === 0) {
5947
+ return {
5948
+ allowed: true,
5949
+ action: "continue",
5950
+ reason: "All continuation gate checks passed.",
5951
+ matchedRule: gate.mode,
5952
+ blockingFactors: []
5953
+ };
5954
+ }
5955
+ return {
5956
+ allowed: false,
5957
+ action: blockedAction,
5958
+ reason: `Blocked by continuation gate: ${blockingFactors.join(", ")}.`,
5959
+ matchedRule: gate.mode,
5960
+ blockingFactors
5961
+ };
5962
+ }
5963
+ var NewsSignalClient = class {
5964
+ constructor(config = {}) {
5965
+ this.gatewayBase = resolveNewsGatewayBase(config.gatewayBase);
5966
+ this.fetchImplementation = resolveFetchImplementation(config.fetchImplementation);
5967
+ }
5968
+ eventSignal(params) {
5969
+ return fetchNewsEventSignal({
5970
+ ...params,
5971
+ gatewayBase: this.gatewayBase,
5972
+ fetchImplementation: this.fetchImplementation
5973
+ });
5974
+ }
5975
+ propositionSignal(params) {
5976
+ return fetchNewsPropositionSignal({
5977
+ ...params,
5978
+ gatewayBase: this.gatewayBase,
5979
+ fetchImplementation: this.fetchImplementation
5980
+ });
5981
+ }
5982
+ };
5983
+
5764
5984
  // src/ai/errors.ts
5765
5985
  var AIError = class extends Error {
5766
5986
  constructor(message, options) {
@@ -7705,6 +7925,6 @@ function timestamp() {
7705
7925
  return (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19);
7706
7926
  }
7707
7927
 
7708
- 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_MODEL, DEFAULT_TIMEOUT_MS, DEFAULT_TOKENS, HTTP_METHODS2 as HTTP_METHODS, HyperliquidApiError, HyperliquidBuilderApprovalError, HyperliquidExchangeClient, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidTermsError, 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, 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, fetchPolymarketMarket, fetchPolymarketMarkets, fetchPolymarketMidpoint, fetchPolymarketOrderbook, fetchPolymarketPrice, fetchPolymarketPriceHistory, flattenMessageContent, formatHyperliquidMarketablePrice, formatHyperliquidOrderSize, formatHyperliquidPrice, formatHyperliquidSize, generateMetadata, generateMetadataCommand, generateText, getHyperliquidMaxBuilderFee, getModelConfig, getMyPerformance, getMyTools, getRpcUrl, getX402PaymentContext, isHyperliquidSpotSymbol, isStreamingSupported, isToolCallingSupported, listModels, loadAndValidateTools, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeModelName, normalizeNumberArrayish, normalizeSpotTokenName2 as normalizeSpotTokenName, normalizeStringArrayish, parseHyperliquidJson, parseSpotPairSymbol, parseTimeToSeconds, payX402, payX402WithWallet, placeHyperliquidOrder, 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, resolveHyperliquidMaxPerRunUsd, resolveHyperliquidOrderRef, resolveHyperliquidOrderSymbol, resolveHyperliquidPair, resolveHyperliquidPerpSymbol, resolveHyperliquidProfileChain, resolveHyperliquidRpcEnvVar, resolveHyperliquidScheduleEvery, resolveHyperliquidScheduleUnit, resolveHyperliquidSpotSymbol, resolveHyperliquidStoreNetwork, resolveHyperliquidSymbol, resolveHyperliquidTargetSize, resolvePolymarketBaseUrl, resolveRuntimePath, resolveSpotMidCandidates, resolveSpotTokenCandidates, resolveToolset, responseToToolResponse, retrieve, roundHyperliquidPriceToTick, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidAccountAbstractionMode, setHyperliquidDexAbstraction, setHyperliquidPortfolioMargin, store, streamText, tokens, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, validateCommand, wallet, walletToolkit, withX402Payment, withdrawFromHyperliquid };
7928
+ 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_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, 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, generateMetadata, generateMetadataCommand, generateText, getHyperliquidMaxBuilderFee, getModelConfig, getMyPerformance, getMyTools, getRpcUrl, getX402PaymentContext, isHyperliquidSpotSymbol, isStreamingSupported, isToolCallingSupported, listModels, loadAndValidateTools, modifyHyperliquidOrder, normalizeHyperliquidBaseSymbol, normalizeHyperliquidDcaEntries, normalizeHyperliquidIndicatorBars, normalizeHyperliquidMetaSymbol, normalizeModelName, normalizeNumberArrayish, normalizeSpotTokenName2 as normalizeSpotTokenName, normalizeStringArrayish, parseHyperliquidJson, parseSpotPairSymbol, parseTimeToSeconds, payX402, payX402WithWallet, placeHyperliquidOrder, 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, 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, validateCommand, wallet, walletToolkit, withX402Payment, withdrawFromHyperliquid };
7709
7929
  //# sourceMappingURL=index.js.map
7710
7930
  //# sourceMappingURL=index.js.map