@dreamcash-org/mcp 0.2.0 → 0.3.1

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.
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  };
17
17
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
18
18
 
19
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/chunk-vYduTEsO.mjs
19
+ // node_modules/@modelcontextprotocol/server/dist/chunk-vYduTEsO.mjs
20
20
  var __create = Object.create;
21
21
  var __defProp2 = Object.defineProperty;
22
22
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -56,7 +56,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
56
56
  enumerable: true
57
57
  }) : target, mod));
58
58
 
59
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/dialects-CDpMbily.mjs
59
+ // node_modules/@modelcontextprotocol/server/dist/dialects-CDpMbily.mjs
60
60
  var DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
61
61
  var DRAFT_2019_09_URIS = new Set(["https://json-schema.org/draft/2019-09/schema", "http://json-schema.org/draft/2019-09/schema"]);
62
62
  var DRAFT_07_URIS = new Set(["https://json-schema.org/draft-07/schema", "http://json-schema.org/draft-07/schema"]);
@@ -77,7 +77,7 @@ function declaredDialect(schema, remedy) {
77
77
  throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
78
78
  }
79
79
 
80
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
80
+ // node_modules/zod/v4/core/util.js
81
81
  var exports_util = {};
82
82
  __export(exports_util, {
83
83
  unwrapMessage: () => unwrapMessage,
@@ -926,7 +926,7 @@ function constantCatch(value) {
926
926
  return fn;
927
927
  }
928
928
 
929
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
929
+ // node_modules/zod/v4/core/core.js
930
930
  var _a;
931
931
  var NEVER = /* @__PURE__ */ Object.freeze({
932
932
  status: "aborted"
@@ -1047,7 +1047,7 @@ function config(newConfig) {
1047
1047
  Object.assign(globalConfig, newConfig);
1048
1048
  return globalConfig;
1049
1049
  }
1050
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
1050
+ // node_modules/zod/v4/core/errors.js
1051
1051
  function _getMessage() {
1052
1052
  const internals = this._zod;
1053
1053
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -1162,7 +1162,7 @@ function formatError(error, mapper = (issue2) => issue2.message) {
1162
1162
  return fieldErrors;
1163
1163
  }
1164
1164
 
1165
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
1165
+ // node_modules/zod/v4/core/parse.js
1166
1166
  function finalizeParams(callee, params) {
1167
1167
  return { callee: params?.callee ?? callee, Err: params?.Err };
1168
1168
  }
@@ -1309,7 +1309,7 @@ var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1309
1309
  var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1310
1310
  return _safeParseAsync(_Err)(schema, value, _ctx);
1311
1311
  };
1312
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/regexes.js
1312
+ // node_modules/zod/v4/core/regexes.js
1313
1313
  var cuid = /^[cC][0-9a-z]{6,}$/;
1314
1314
  var cuid2 = /^[0-9a-z]+$/;
1315
1315
  var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
@@ -1369,7 +1369,7 @@ var _null = /^null$/i;
1369
1369
  var lowercase = /^[^A-Z]*$/;
1370
1370
  var uppercase = /^[^a-z]*$/;
1371
1371
 
1372
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/checks.js
1372
+ // node_modules/zod/v4/core/checks.js
1373
1373
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1374
1374
  var _a2;
1375
1375
  inst._zod ?? (inst._zod = {});
@@ -1685,7 +1685,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
1685
1685
  };
1686
1686
  });
1687
1687
 
1688
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/doc.js
1688
+ // node_modules/zod/v4/core/doc.js
1689
1689
  class Doc {
1690
1690
  constructor(args = [], closed = {}) {
1691
1691
  this.content = [];
@@ -1727,14 +1727,14 @@ ${content.join(`
1727
1727
  }
1728
1728
  }
1729
1729
 
1730
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/versions.js
1730
+ // node_modules/zod/v4/core/versions.js
1731
1731
  var version = {
1732
1732
  major: 4,
1733
1733
  minor: 6,
1734
1734
  patch: 7
1735
1735
  };
1736
1736
 
1737
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/schemas.js
1737
+ // node_modules/zod/v4/core/schemas.js
1738
1738
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1739
1739
  var _a2;
1740
1740
  inst ?? (inst = {});
@@ -3453,7 +3453,7 @@ function handleRefineResult(result, payload, input, inst) {
3453
3453
  payload.issues.push(issue(_iss));
3454
3454
  }
3455
3455
  }
3456
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
3456
+ // node_modules/zod/v4/core/memoizer.js
3457
3457
  class $ZodCyclicError extends Error {
3458
3458
  constructor() {
3459
3459
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -3722,7 +3722,7 @@ function isBackEdge(ctx, value) {
3722
3722
  const backEdges = ctx[STATE]?.backEdges;
3723
3723
  return backEdges !== undefined && isRef(value) && backEdges.has(value);
3724
3724
  }
3725
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
3725
+ // node_modules/zod/v4/locales/en.js
3726
3726
  var error = () => {
3727
3727
  const Sizable = {
3728
3728
  string: { unit: "characters", verb: "to have" },
@@ -3844,7 +3844,7 @@ function en_default() {
3844
3844
  localeError: error()
3845
3845
  };
3846
3846
  }
3847
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
3847
+ // node_modules/zod/v4/core/registries.js
3848
3848
  var _a2;
3849
3849
  class $ZodRegistry {
3850
3850
  constructor() {
@@ -3891,7 +3891,7 @@ function registry() {
3891
3891
  }
3892
3892
  (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
3893
3893
  var globalRegistry = globalThis.__zod_globalRegistry;
3894
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
3894
+ // node_modules/zod/v4/core/api.js
3895
3895
  function snapshotChecks(def) {
3896
3896
  if (def.checks)
3897
3897
  def.checks = [...def.checks];
@@ -4377,7 +4377,7 @@ function _check(fn, params) {
4377
4377
  ch._zod.check = fn;
4378
4378
  return ch;
4379
4379
  }
4380
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
4380
+ // node_modules/zod/v4/core/to-json-schema.js
4381
4381
  function assignProps(target, ...sources) {
4382
4382
  for (const source of sources) {
4383
4383
  for (const key of Reflect.ownKeys(source)) {
@@ -4900,7 +4900,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
4900
4900
  extractDefs(ctx, schema);
4901
4901
  return finalize(ctx, schema);
4902
4902
  };
4903
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
4903
+ // node_modules/zod/v4/core/json-schema-processors.js
4904
4904
  var narrowMin = (agg, key, value) => {
4905
4905
  if (agg[key] === undefined || value > agg[key])
4906
4906
  agg[key] = value;
@@ -5643,7 +5643,7 @@ function toJSONSchema(input, params) {
5643
5643
  extractDefs(ctx, input);
5644
5644
  return finalize(ctx, input);
5645
5645
  }
5646
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/errors.js
5646
+ // node_modules/zod/v4/classic/errors.js
5647
5647
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
5648
5648
  function _lazyMethod(proto, key, make) {
5649
5649
  Object.defineProperty(proto, key, {
@@ -5688,7 +5688,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, undefi
5688
5688
  Parent: Error
5689
5689
  });
5690
5690
 
5691
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/parse.js
5691
+ // node_modules/zod/v4/classic/parse.js
5692
5692
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
5693
5693
  var parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
5694
5694
  var safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -5702,7 +5702,7 @@ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
5702
5702
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
5703
5703
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
5704
5704
 
5705
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
5705
+ // node_modules/zod/v4/classic/schemas.js
5706
5706
  function _ensureDefaultLocale() {
5707
5707
  if (!globalConfig.localeError)
5708
5708
  config(en_default());
@@ -6714,7 +6714,7 @@ function preprocess(fn, schema) {
6714
6714
  out: schema
6715
6715
  });
6716
6716
  }
6717
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/compat.js
6717
+ // node_modules/zod/v4/classic/compat.js
6718
6718
  var ZodIssueCode = {
6719
6719
  invalid_type: "invalid_type",
6720
6720
  too_big: "too_big",
@@ -6730,7 +6730,7 @@ var ZodIssueCode = {
6730
6730
  };
6731
6731
  var ZodFirstPartyTypeKind;
6732
6732
  (function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
6733
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/iso.js
6733
+ // node_modules/zod/v4/classic/iso.js
6734
6734
  var exports_iso = {};
6735
6735
  __export(exports_iso, {
6736
6736
  time: () => time2,
@@ -6754,7 +6754,7 @@ function time2(params) {
6754
6754
  function duration2(params) {
6755
6755
  return _isoDuration(ZodISODuration, params);
6756
6756
  }
6757
- // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/coerce.js
6757
+ // node_modules/zod/v4/classic/coerce.js
6758
6758
  var exports_coerce = {};
6759
6759
  __export(exports_coerce, {
6760
6760
  string: () => string3,
@@ -6778,7 +6778,7 @@ function bigint2(params) {
6778
6778
  function date3(params) {
6779
6779
  return _coercedDate(ZodDate, params);
6780
6780
  }
6781
- // ../../node_modules/.bun/@modelcontextprotocol+core@2.4.0/node_modules/@modelcontextprotocol/core/dist/schemas-DscsoNZN.mjs
6781
+ // node_modules/@modelcontextprotocol/core/dist/schemas-DscsoNZN.mjs
6782
6782
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
6783
6783
  var SUPPORTED_PROTOCOL_VERSIONS = [
6784
6784
  LATEST_PROTOCOL_VERSION,
@@ -7568,7 +7568,7 @@ var ServerResultSchema = union([
7568
7568
  SubscriptionsListenResultSchema
7569
7569
  ]);
7570
7570
 
7571
- // ../../node_modules/.bun/@modelcontextprotocol+core@2.4.0/node_modules/@modelcontextprotocol/core/dist/auth-UMQCo-ad.mjs
7571
+ // node_modules/@modelcontextprotocol/core/dist/auth-UMQCo-ad.mjs
7572
7572
  var SafeUrlSchema = url().superRefine((val, ctx) => {
7573
7573
  if (!URL.canParse(val)) {
7574
7574
  ctx.addIssue({
@@ -7724,7 +7724,7 @@ var OAuthTokenRevocationRequestSchema = object({
7724
7724
  token_type_hint: string2().optional()
7725
7725
  }).strip();
7726
7726
 
7727
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/src-DdvbAHrR.mjs
7727
+ // node_modules/@modelcontextprotocol/server/dist/src-DdvbAHrR.mjs
7728
7728
  var BRANDS = Symbol.for("mcp.sdk.errorBrands");
7729
7729
  function stampErrorBrands(instance, ctor) {
7730
7730
  const brands = /* @__PURE__ */ new Set;
@@ -12129,7 +12129,7 @@ function serializeMessage(message) {
12129
12129
  `;
12130
12130
  }
12131
12131
 
12132
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/ajvProvider-DyjnscPj.mjs
12132
+ // node_modules/@modelcontextprotocol/server/dist/ajvProvider-DyjnscPj.mjs
12133
12133
  var require_code$1 = /* @__PURE__ */ __commonJSMin((exports) => {
12134
12134
  Object.defineProperty(exports, "__esModule", { value: true });
12135
12135
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
@@ -20099,10 +20099,10 @@ var AjvJsonSchemaValidator = class {
20099
20099
  };
20100
20100
  var Ajv = import_ajv.Ajv;
20101
20101
 
20102
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
20102
+ // node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs
20103
20103
  import process2 from "node:process";
20104
20104
 
20105
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/mcp-oHn3ureC.mjs
20105
+ // node_modules/@modelcontextprotocol/server/dist/mcp-oHn3ureC.mjs
20106
20106
  var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
20107
20107
  var DEFAULT_SSE_KEEP_ALIVE_MS = 15000;
20108
20108
  var MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
@@ -20964,7 +20964,7 @@ function discoverAdvertisedCapabilities(capabilities) {
20964
20964
  return { ...capabilities };
20965
20965
  }
20966
20966
 
20967
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/listenRouter-Bartj63y.mjs
20967
+ // node_modules/@modelcontextprotocol/server/dist/listenRouter-Bartj63y.mjs
20968
20968
  var CHANGE_NOTIFICATION_METHODS = new Set([
20969
20969
  "notifications/tools/list_changed",
20970
20970
  "notifications/prompts/list_changed",
@@ -20972,7 +20972,7 @@ var CHANGE_NOTIFICATION_METHODS = new Set([
20972
20972
  "notifications/resources/updated"
20973
20973
  ]);
20974
20974
 
20975
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/stdio.mjs
20975
+ // node_modules/@modelcontextprotocol/server/dist/stdio.mjs
20976
20976
  var swallowsErrorsAfterClose = Symbol("swallowsErrorsAfterClose");
20977
20977
  var StdioServerTransport = class {
20978
20978
  _readBuffer;
@@ -21082,294 +21082,8 @@ var StdioServerTransport = class {
21082
21082
  }
21083
21083
  };
21084
21084
 
21085
- // ../constants/src/appStores.ts
21086
- var DREAMCASH_APP_STORE_URL = "https://apps.apple.com/app/id6748916424";
21087
- var DREAMCASH_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=xyz.dreamcash.app";
21088
- // ../constants/src/chains.ts
21089
- var ARBITRUM_ONE = {
21090
- id: 42161,
21091
- name: "Arbitrum One",
21092
- nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
21093
- blockTimeMs: 250,
21094
- rpcUrls: [
21095
- "https://arb1.arbitrum.io/rpc",
21096
- "https://arb-mainnet.g.alchemy.com/v2/51PmJ8CQYIfaS57viRzGZ",
21097
- "https://arbitrum-one.publicnode.com",
21098
- "https://1rpc.io/arb"
21099
- ],
21100
- explorer: {
21101
- name: "Arbiscan",
21102
- url: "https://arbiscan.io",
21103
- apiUrl: "https://api.arbiscan.io/api"
21104
- },
21105
- multicall3: {
21106
- address: "0xca11bde05977b3631167028862be2a173976ca11",
21107
- blockCreated: 7654707
21108
- }
21109
- };
21110
- var HYPERLIQUID_SIGNING_CHAIN_ID = ARBITRUM_ONE.id;
21111
- // ../constants/src/evmChains.ts
21112
- var MULTICALL3 = "0xcA11bde05977b3631167028862bE2a173976CA11";
21113
- var ETHER = { name: "Ether", symbol: "ETH", decimals: 18 };
21114
- var RELAY_SELL_CONTRACTS = {
21115
- depository: "0x4cd00e387622c35bddb9b4c962c136462338bc31",
21116
- approvalProxy: "0x5567954cd026cebfe486062cb75848e0f1c12e58"
21117
- };
21118
- var ETHER_COIN = {
21119
- coingeckoCoinId: "ethereum",
21120
- imageUrl: "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628"
21121
- };
21122
- var RELAY_NATIVE_SELL_ROUTER = "0x0729e2a4716d9f7dd17858d5d504426d228697f7";
21123
- var CHAINS = {
21124
- 1: {
21125
- vm: "evm",
21126
- name: "Ethereum",
21127
- nativeCurrency: ETHER,
21128
- rpcUrl: "https://ethereum-rpc.publicnode.com",
21129
- explorer: { name: "Etherscan", url: "https://etherscan.io" },
21130
- multicall3: MULTICALL3,
21131
- alchemyNetwork: "eth-mainnet",
21132
- coingeckoNetwork: "eth",
21133
- dexscreenerChain: "ethereum",
21134
- blockTimeMs: 12000,
21135
- v4PoolManager: "0x000000000004444c5dc75cb358380d2e3de08a90",
21136
- securitiesSource: { kind: "coingecko", platform: "ethereum" },
21137
- relaySellContracts: RELAY_SELL_CONTRACTS,
21138
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21139
- nativeCoin: ETHER_COIN
21140
- },
21141
- 10: {
21142
- vm: "evm",
21143
- name: "Optimism",
21144
- nativeCurrency: ETHER,
21145
- rpcUrl: "https://mainnet.optimism.io",
21146
- explorer: {
21147
- name: "Optimistic Etherscan",
21148
- url: "https://optimistic.etherscan.io"
21149
- },
21150
- multicall3: MULTICALL3,
21151
- alchemyNetwork: "opt-mainnet",
21152
- coingeckoNetwork: "optimism",
21153
- dexscreenerChain: "optimism",
21154
- blockTimeMs: 2000,
21155
- v4PoolManager: "0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",
21156
- securitiesSource: { kind: "coingecko", platform: "optimistic-ethereum" },
21157
- relaySellContracts: RELAY_SELL_CONTRACTS,
21158
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21159
- nativeCoin: ETHER_COIN
21160
- },
21161
- 56: {
21162
- vm: "evm",
21163
- name: "BNB Chain",
21164
- nativeCurrency: { name: "BNB", symbol: "BNB", decimals: 18 },
21165
- rpcUrl: "https://bsc-dataseed.bnbchain.org",
21166
- explorer: { name: "BscScan", url: "https://bscscan.com" },
21167
- multicall3: MULTICALL3,
21168
- alchemyNetwork: "bnb-mainnet",
21169
- coingeckoNetwork: "bsc",
21170
- dexscreenerChain: "bsc",
21171
- blockTimeMs: 450,
21172
- v4PoolManager: "0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",
21173
- securitiesSource: { kind: "coingecko", platform: "binance-smart-chain" },
21174
- relaySellContracts: RELAY_SELL_CONTRACTS,
21175
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21176
- nativeCoin: {
21177
- coingeckoCoinId: "binancecoin",
21178
- imageUrl: "https://coin-images.coingecko.com/coins/images/825/large/bnb-icon2_2x.png?1696501970"
21179
- }
21180
- },
21181
- 130: {
21182
- vm: "evm",
21183
- name: "Unichain",
21184
- nativeCurrency: ETHER,
21185
- rpcUrl: "https://mainnet.unichain.org",
21186
- explorer: { name: "Uniscan", url: "https://uniscan.xyz" },
21187
- multicall3: MULTICALL3,
21188
- alchemyNetwork: "unichain-mainnet",
21189
- coingeckoNetwork: "unichain",
21190
- dexscreenerChain: "unichain",
21191
- blockTimeMs: 1000,
21192
- v4PoolManager: "0x1f98400000000000000000000000000000000004",
21193
- securitiesSource: { kind: "coingecko", platform: "unichain" },
21194
- relaySellContracts: RELAY_SELL_CONTRACTS,
21195
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21196
- nativeCoin: ETHER_COIN
21197
- },
21198
- 480: {
21199
- vm: "evm",
21200
- name: "World Chain",
21201
- nativeCurrency: ETHER,
21202
- rpcUrl: "https://worldchain-mainnet.g.alchemy.com/public",
21203
- explorer: { name: "Worldscan", url: "https://worldscan.org" },
21204
- multicall3: MULTICALL3,
21205
- alchemyNetwork: "worldchain-mainnet",
21206
- coingeckoNetwork: "world-chain",
21207
- dexscreenerChain: "worldchain",
21208
- blockTimeMs: 2000,
21209
- v4PoolManager: "0xb1860d529182ac3bc1f51fa2abd56662b7d13f33",
21210
- securitiesSource: { kind: "coingecko", platform: "world-chain" },
21211
- relaySellContracts: RELAY_SELL_CONTRACTS,
21212
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21213
- nativeCoin: ETHER_COIN
21214
- },
21215
- 4663: {
21216
- vm: "evm",
21217
- name: "Robinhood Chain",
21218
- nativeCurrency: ETHER,
21219
- rpcUrl: "https://rpc.mainnet.chain.robinhood.com",
21220
- explorer: {
21221
- name: "Blockscout",
21222
- url: "https://robinhoodchain.blockscout.com"
21223
- },
21224
- multicall3: MULTICALL3,
21225
- alchemyNetwork: "robinhood-mainnet",
21226
- coingeckoNetwork: "robinhood",
21227
- dexscreenerChain: "robinhood",
21228
- blockTimeMs: 100,
21229
- v4PoolManager: "0x8366a39cc670b4001a1121b8f6a443a643e40951",
21230
- securitiesSource: {
21231
- kind: "registry",
21232
- url: "https://api.robinhood.com/rhj/assets/"
21233
- },
21234
- relaySellContracts: RELAY_SELL_CONTRACTS,
21235
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21236
- nativeCoin: ETHER_COIN
21237
- },
21238
- 8453: {
21239
- vm: "evm",
21240
- name: "Base",
21241
- nativeCurrency: ETHER,
21242
- rpcUrl: "https://mainnet.base.org",
21243
- explorer: { name: "Basescan", url: "https://basescan.org" },
21244
- multicall3: MULTICALL3,
21245
- alchemyNetwork: "base-mainnet",
21246
- coingeckoNetwork: "base",
21247
- dexscreenerChain: "base",
21248
- blockTimeMs: 2000,
21249
- v4PoolManager: "0x498581ff718922c3f8e6a244956af099b2652b2b",
21250
- securitiesSource: { kind: "coingecko", platform: "base" },
21251
- relaySellContracts: RELAY_SELL_CONTRACTS,
21252
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21253
- nativeCoin: ETHER_COIN
21254
- },
21255
- 42161: {
21256
- vm: "evm",
21257
- name: "Arbitrum",
21258
- nativeCurrency: ETHER,
21259
- rpcUrl: "https://arb1.arbitrum.io/rpc",
21260
- explorer: { name: "Arbiscan", url: "https://arbiscan.io" },
21261
- multicall3: MULTICALL3,
21262
- alchemyNetwork: "arb-mainnet",
21263
- coingeckoNetwork: "arbitrum",
21264
- dexscreenerChain: "arbitrum",
21265
- blockTimeMs: 250,
21266
- v4PoolManager: "0x360e68faccca8ca495c1b759fd9eee466db9fb32",
21267
- securitiesSource: { kind: "coingecko", platform: "arbitrum-one" },
21268
- relaySellContracts: RELAY_SELL_CONTRACTS,
21269
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21270
- nativeCoin: ETHER_COIN
21271
- },
21272
- 99901: {
21273
- vm: "evm",
21274
- name: "Elysium",
21275
- nativeCurrency: { name: "HYPE", symbol: "HYPE", decimals: 18 },
21276
- rpcUrl: "https://rpc.elysium.kinetiq.xyz",
21277
- explorer: {
21278
- name: "Elysium Explorer",
21279
- url: "https://elysium.kinetiq.xyz/explorer"
21280
- },
21281
- multicall3: MULTICALL3,
21282
- alchemyNetwork: "elysium-mainnet",
21283
- coingeckoNetwork: "elysium",
21284
- dexscreenerChain: "elysium",
21285
- blockTimeMs: 100,
21286
- v4PoolManager: "0xe2e105d3f7209a9da11f83ccf3e7398a753823f1",
21287
- securitiesSource: { kind: "coingecko", platform: "elysium-kinetiq" },
21288
- relaySellContracts: RELAY_SELL_CONTRACTS,
21289
- relayNativeSellRouter: RELAY_NATIVE_SELL_ROUTER,
21290
- nativeCoin: {
21291
- coingeckoCoinId: "hyperliquid",
21292
- imageUrl: "https://coin-images.coingecko.com/coins/images/50882/large/hyperliquid.jpg?1729431300"
21293
- }
21294
- },
21295
- 792703809: {
21296
- vm: "svm",
21297
- name: "Solana",
21298
- nativeCurrency: { name: "Solana", symbol: "SOL", decimals: 9 },
21299
- rpcUrl: "https://api.mainnet-beta.solana.com",
21300
- explorer: { name: "Solscan", url: "https://solscan.io" },
21301
- alchemyNetwork: "solana-mainnet",
21302
- coingeckoNetwork: "solana",
21303
- dexscreenerChain: "solana",
21304
- blockTimeMs: 400,
21305
- securitiesSource: { kind: "coingecko", platform: "solana" },
21306
- relaySellPrograms: {
21307
- depositoryProgram: "DPArtTLbEqa6EuXHfL5UFLBZhFjiEXWRudhvXDrjwXUr",
21308
- depository: "99vQwtBwYtrqqD9YSXbdum3KBdxPAVxYTaQ3cfnJSrN2",
21309
- jupiter: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"
21310
- }
21311
- }
21312
- };
21313
- var CHAIN_IDS = Object.keys(CHAINS).map(Number);
21314
- var isChainId = (chainId) => (chainId in CHAINS);
21315
- var EVM_CHAINS = Object.fromEntries(Object.entries(CHAINS).filter(([, chain]) => chain.vm === "evm"));
21316
- var isEvmChainId = (chainId) => isChainId(chainId) && CHAINS[chainId].vm === "evm";
21317
- var EVM_CHAIN_IDS = CHAIN_IDS.filter(isEvmChainId);
21318
- // ../constants/src/evmContracts.ts
21319
- var CALIBUR_ADDRESS = "0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00";
21320
- var CALIBUR_EXECUTE_ABI = [
21321
- {
21322
- name: "execute",
21323
- type: "function",
21324
- stateMutability: "payable",
21325
- inputs: [
21326
- {
21327
- name: "signedBatchedCall",
21328
- type: "tuple",
21329
- components: [
21330
- {
21331
- name: "batchedCall",
21332
- type: "tuple",
21333
- components: [
21334
- {
21335
- name: "calls",
21336
- type: "tuple[]",
21337
- components: [
21338
- { name: "to", type: "address" },
21339
- { name: "value", type: "uint256" },
21340
- { name: "data", type: "bytes" }
21341
- ]
21342
- },
21343
- { name: "revertOnFailure", type: "bool" }
21344
- ]
21345
- },
21346
- { name: "nonce", type: "uint256" },
21347
- { name: "keyHash", type: "bytes32" },
21348
- { name: "executor", type: "address" },
21349
- { name: "deadline", type: "uint256" }
21350
- ]
21351
- },
21352
- { name: "wrappedSignature", type: "bytes" }
21353
- ],
21354
- outputs: []
21355
- }
21356
- ];
21357
- var CALIBUR_ABI = [
21358
- ...CALIBUR_EXECUTE_ABI,
21359
- {
21360
- name: "getSeq",
21361
- type: "function",
21362
- stateMutability: "view",
21363
- inputs: [{ name: "key", type: "uint256" }],
21364
- outputs: [{ name: "", type: "uint256" }]
21365
- }
21366
- ];
21367
- var CALIBUR_EIP712_DOMAIN = {
21368
- name: "Calibur",
21369
- version: "1.0.0",
21370
- salt: `0x${CALIBUR_ADDRESS.slice(2).padStart(64, "0")}`
21371
- };
21372
- // ../constants/src/hyperliquid/aiAgent.ts
21085
+ // src/shared/aiAgent.ts
21086
+ var AI_REPLY_STYLE = "How to reply: lead with the answer in a line or two, in the user's own words, and add detail only when asked. No tables or extra sections for a simple question. Never show tool or field names, and skip exchange mechanics the user didn't ask about. Say once in a chat, not in each reply, that what you suggest is your own analysis, not advice from Dreamcash. A liquidation price over 90% away means the position practically can't be liquidated: say that, not the number.";
21373
21087
  var AI_CLIENT_NAME_MAX_LENGTH = 60;
21374
21088
  var TRADE_REQUEST_TTL_MS = 15 * 60 * 1000;
21375
21089
  var AI_AGENT_SIGNATURE_HEADER = "x-dreamcash-agent-signature";
@@ -21381,7 +21095,10 @@ var aiAgentRequestMessage = ({
21381
21095
  bodySha256
21382
21096
  }) => `Dreamcash agent ${method.toUpperCase()} ${path} ${timestampMs} ${bodySha256}`;
21383
21097
  var DREAMCASH_MCP_VERSION_HEADER = "x-dreamcash-mcp-version";
21384
- // ../constants/src/hyperliquid/assetIndex.ts
21098
+ // src/shared/appStores.ts
21099
+ var DREAMCASH_APP_STORE_URL = "https://apps.apple.com/app/id6748916424";
21100
+ var DREAMCASH_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=xyz.dreamcash.app";
21101
+ // src/shared/assetIndex.ts
21385
21102
  var SPOT_ASSET_INDEX_OFFSET = 1e4;
21386
21103
  var HIP3_ASSET_INDEX_OFFSET = 1e5;
21387
21104
  var DEX_INDEX_MULTIPLIER = 1e4;
@@ -21389,65 +21106,7 @@ var HIP4_ASSET_INDEX_OFFSET = 1e8;
21389
21106
  var hip3DexIdOfAssetIndex = (assetIndex) => Math.floor((assetIndex - HIP3_ASSET_INDEX_OFFSET) / DEX_INDEX_MULTIPLIER);
21390
21107
  var isHip3Coin = (coin) => coin.includes(":");
21391
21108
  var getDexFromCoin = (coin) => isHip3Coin(coin) ? coin.split(":")[0] : undefined;
21392
- // ../constants/src/hyperliquid/dexes.ts
21393
- var HIP3_DEXES = [
21394
- { id: 1, dex: "xyz", collateral: "USDC", listed: true },
21395
- { id: 2, dex: "flx", collateral: "USDH", listed: true },
21396
- { id: 3, dex: "vntl", collateral: "USDH", listed: false },
21397
- { id: 4, dex: "hyna", collateral: "USDE", listed: true },
21398
- { id: 5, dex: "km", collateral: "USDH", listed: false },
21399
- { id: 6, dex: "abcd", collateral: "USDE", listed: false },
21400
- { id: 7, dex: "cash", collateral: "USDT0", listed: true }
21401
- ];
21402
- var LISTED_DEXES = HIP3_DEXES.filter((dex) => dex.listed);
21403
- var COLLATERAL_COINS = Array.from(new Set([
21404
- "USDC",
21405
- ...LISTED_DEXES.map((dex) => dex.collateral)
21406
- ]));
21407
- // ../constants/src/hyperliquid/fees.ts
21408
- var BUILDER_FEE_APPROVAL_TENTH_OF_BASIS_POINTS = 50;
21409
- var BUILDER_FEE = `${BUILDER_FEE_APPROVAL_TENTH_OF_BASIS_POINTS / 1000}%`;
21410
- // ../constants/src/hyperliquid/tokens.ts
21411
- var USDC_TOKEN_ADDRESS = "0x6d1e7cde53ba9467b783cb7c530ce054";
21412
- var STABLE_TOKENS = {
21413
- USDC: {
21414
- coin: "USDC",
21415
- symbol: "USDC",
21416
- tokenIndex: 0,
21417
- pairIndex: null,
21418
- weiDecimals: 8,
21419
- tokenId: USDC_TOKEN_ADDRESS,
21420
- evmAddress: "0xb88339CB7199b77E23DB6E890353E22632Ba630f"
21421
- },
21422
- USDH: {
21423
- coin: "USDH",
21424
- symbol: "USDH",
21425
- tokenIndex: 360,
21426
- pairIndex: 10230,
21427
- weiDecimals: 8
21428
- },
21429
- USDT0: {
21430
- coin: "USDT0",
21431
- symbol: "USDT",
21432
- tokenIndex: 268,
21433
- pairIndex: 10166,
21434
- weiDecimals: 8
21435
- },
21436
- USDE: {
21437
- coin: "USDE",
21438
- symbol: "USDE",
21439
- tokenIndex: 235,
21440
- pairIndex: 10150,
21441
- weiDecimals: 8
21442
- }
21443
- };
21444
- var STABLECOIN_COINS = Object.keys(STABLE_TOKENS);
21445
- // ../constants/src/onchain.ts
21446
- var ONCHAIN_QUOTE_TTL_MS = 2 * 60 * 1000;
21447
- var ONCHAIN_QUOTE_PREVIEW_MIN_REMAINING_MS = 30 * 1000;
21448
- // ../constants/src/predictions.ts
21449
- var COMBINING_MARKS = new RegExp("\\p{M}+", "gu");
21450
- // ../constants/src/vault.ts
21109
+ // src/shared/vault.ts
21451
21110
  var AGENT_VAULT_ADDRESSES = [
21452
21111
  "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"
21453
21112
  ];
@@ -21456,9 +21115,8 @@ import { createHash } from "node:crypto";
21456
21115
  // package.json
21457
21116
  var package_default = {
21458
21117
  name: "@dreamcash-org/mcp",
21459
- version: "0.2.0",
21118
+ version: "0.3.1",
21460
21119
  description: "Connect your own AI agent to your Dreamcash account: it reads your account and trades, each trade confirmed by you or on its own within your limits.",
21461
- license: "MIT",
21462
21120
  keywords: [
21463
21121
  "mcp",
21464
21122
  "mcp-server",
@@ -21468,11 +21126,11 @@ var package_default = {
21468
21126
  "ai-agent",
21469
21127
  "trading"
21470
21128
  ],
21129
+ license: "MIT",
21471
21130
  homepage: "https://dreamcash.xyz",
21472
21131
  repository: {
21473
21132
  type: "git",
21474
- url: "git+https://github.com/dreamcash-org/mono.git",
21475
- directory: "packages/dreamcash-mcp"
21133
+ url: "git+https://github.com/dreamcash-org/mcp.git"
21476
21134
  },
21477
21135
  type: "module",
21478
21136
  bin: {
@@ -21490,26 +21148,19 @@ var package_default = {
21490
21148
  },
21491
21149
  scripts: {
21492
21150
  build: "bun build.ts",
21493
- prepack: "bun run build",
21494
- start: "bun src/main.ts",
21495
21151
  test: "bun test",
21496
- "test:testnet": "HL_NETWORK=testnet bun test --timeout 180000 src/agentFlow.hl.test.ts",
21497
- "test:types": "tsc --noEmit"
21152
+ typecheck: "tsc --noEmit"
21498
21153
  },
21499
21154
  devDependencies: {
21500
- "@dreamcash/constants": "workspace:*",
21501
- "@dreamcash/hyperliquid-orders": "workspace:*",
21502
- "@dreamcash/tsconfig": "workspace:*",
21503
- "@dreamcash/utils": "workspace:*",
21504
21155
  "@modelcontextprotocol/client": "2.4.0",
21505
21156
  "@modelcontextprotocol/server": "2.4.0",
21506
21157
  "@nktkas/hyperliquid": "0.32.2",
21158
+ "@tanstack/query-core": "5.104.2",
21507
21159
  "@types/bun": "1.3.13",
21508
- "@types/node": "^20",
21509
- "@types/react": "^19",
21510
- typescript: "^5",
21511
- viem: "^2.40.3",
21512
- zod: "^4.6.7"
21160
+ "@types/node": "20.14.10",
21161
+ typescript: "5.9.3",
21162
+ viem: "2.52.2",
21163
+ zod: "4.6.7"
21513
21164
  }
21514
21165
  };
21515
21166
 
@@ -21600,7 +21251,7 @@ import {
21600
21251
  } from "node:fs/promises";
21601
21252
  import { homedir } from "node:os";
21602
21253
  import { dirname, join } from "node:path";
21603
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/isHex.js
21254
+ // node_modules/viem/_esm/utils/data/isHex.js
21604
21255
  function isHex(value, { strict = true } = {}) {
21605
21256
  if (!value)
21606
21257
  return false;
@@ -21608,10 +21259,10 @@ function isHex(value, { strict = true } = {}) {
21608
21259
  return false;
21609
21260
  return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith("0x");
21610
21261
  }
21611
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/version.js
21262
+ // node_modules/viem/_esm/errors/version.js
21612
21263
  var version2 = "2.52.2";
21613
21264
 
21614
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/base.js
21265
+ // node_modules/viem/_esm/errors/base.js
21615
21266
  var errorConfig = {
21616
21267
  getDocsUrl: ({ docsBaseUrl, docsPath = "", docsSlug }) => docsPath ? `${docsBaseUrl ?? "https://viem.sh"}${docsPath}${docsSlug ? `#${docsSlug}` : ""}` : undefined,
21617
21268
  version: `viem@${version2}`
@@ -21696,7 +21347,7 @@ function walk(err, fn) {
21696
21347
  return fn ? null : err;
21697
21348
  }
21698
21349
 
21699
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/data.js
21350
+ // node_modules/viem/_esm/errors/data.js
21700
21351
  class SliceOffsetOutOfBoundsError extends BaseError {
21701
21352
  constructor({ offset, position, size }) {
21702
21353
  super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size}).`, { name: "SliceOffsetOutOfBoundsError" });
@@ -21709,7 +21360,7 @@ class SizeExceedsPaddingSizeError extends BaseError {
21709
21360
  }
21710
21361
  }
21711
21362
 
21712
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/pad.js
21363
+ // node_modules/viem/_esm/utils/data/pad.js
21713
21364
  function pad(hexOrBytes, { dir, size = 32 } = {}) {
21714
21365
  if (typeof hexOrBytes === "string")
21715
21366
  return padHex(hexOrBytes, { dir, size });
@@ -21744,7 +21395,7 @@ function padBytes(bytes, { dir, size = 32 } = {}) {
21744
21395
  return paddedBytes;
21745
21396
  }
21746
21397
 
21747
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/encoding.js
21398
+ // node_modules/viem/_esm/errors/encoding.js
21748
21399
  class IntegerOutOfRangeError extends BaseError {
21749
21400
  constructor({ max, min, signed, size, value }) {
21750
21401
  super(`Number "${value}" is not in safe ${size ? `${size * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
@@ -21756,14 +21407,14 @@ class SizeOverflowError extends BaseError {
21756
21407
  }
21757
21408
  }
21758
21409
 
21759
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/size.js
21410
+ // node_modules/viem/_esm/utils/data/size.js
21760
21411
  function size(value) {
21761
21412
  if (isHex(value, { strict: false }))
21762
21413
  return Math.ceil((value.length - 2) / 2);
21763
21414
  return value.length;
21764
21415
  }
21765
21416
 
21766
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/trim.js
21417
+ // node_modules/viem/_esm/utils/data/trim.js
21767
21418
  function trim(hexOrBytes, { dir = "left" } = {}) {
21768
21419
  let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
21769
21420
  let sliceLength = 0;
@@ -21782,7 +21433,7 @@ function trim(hexOrBytes, { dir = "left" } = {}) {
21782
21433
  return data;
21783
21434
  }
21784
21435
 
21785
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/encoding/fromHex.js
21436
+ // node_modules/viem/_esm/utils/encoding/fromHex.js
21786
21437
  function assertSize(hexOrBytes, { size: size2 }) {
21787
21438
  if (size(hexOrBytes) > size2)
21788
21439
  throw new SizeOverflowError({
@@ -21817,7 +21468,7 @@ function hexToNumber(hex, opts = {}) {
21817
21468
  return number4;
21818
21469
  }
21819
21470
 
21820
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/encoding/toHex.js
21471
+ // node_modules/viem/_esm/utils/encoding/toHex.js
21821
21472
  var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
21822
21473
  function toHex(value, opts = {}) {
21823
21474
  if (typeof value === "number" || typeof value === "bigint")
@@ -21883,7 +21534,7 @@ function stringToHex(value_, opts = {}) {
21883
21534
  return bytesToHex(value, opts);
21884
21535
  }
21885
21536
 
21886
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/encoding/toBytes.js
21537
+ // node_modules/viem/_esm/utils/encoding/toBytes.js
21887
21538
  var encoder2 = /* @__PURE__ */ new TextEncoder;
21888
21539
  function toBytes(value, opts = {}) {
21889
21540
  if (typeof value === "number" || typeof value === "bigint")
@@ -21953,11 +21604,7 @@ function stringToBytes(value, opts = {}) {
21953
21604
  }
21954
21605
  return bytes;
21955
21606
  }
21956
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/cryptoNode.js
21957
- import * as nc from "node:crypto";
21958
- var crypto2 = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
21959
-
21960
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
21607
+ // node_modules/viem/node_modules/@noble/hashes/esm/utils.js
21961
21608
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
21962
21609
  function isBytes(a) {
21963
21610
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
@@ -21972,12 +21619,6 @@ function abytes(b, ...lengths) {
21972
21619
  if (lengths.length > 0 && !lengths.includes(b.length))
21973
21620
  throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
21974
21621
  }
21975
- function ahash(h) {
21976
- if (typeof h !== "function" || typeof h.create !== "function")
21977
- throw new Error("Hash should be wrapped by utils.createHasher");
21978
- anumber(h.outputLen);
21979
- anumber(h.blockLen);
21980
- }
21981
21622
  function aexists(instance, checkFinished = true) {
21982
21623
  if (instance.destroyed)
21983
21624
  throw new Error("Hash instance has been destroyed");
@@ -22027,21 +21668,6 @@ function toBytes2(data) {
22027
21668
  abytes(data);
22028
21669
  return data;
22029
21670
  }
22030
- function concatBytes(...arrays) {
22031
- let sum = 0;
22032
- for (let i = 0;i < arrays.length; i++) {
22033
- const a = arrays[i];
22034
- abytes(a);
22035
- sum += a.length;
22036
- }
22037
- const res = new Uint8Array(sum);
22038
- for (let i = 0, pad2 = 0;i < arrays.length; i++) {
22039
- const a = arrays[i];
22040
- res.set(a, pad2);
22041
- pad2 += a.length;
22042
- }
22043
- return res;
22044
- }
22045
21671
  class Hash {
22046
21672
  }
22047
21673
  function createHasher(hashCons) {
@@ -22052,17 +21678,8 @@ function createHasher(hashCons) {
22052
21678
  hashC.create = () => hashCons();
22053
21679
  return hashC;
22054
21680
  }
22055
- function randomBytes(bytesLength = 32) {
22056
- if (crypto2 && typeof crypto2.getRandomValues === "function") {
22057
- return crypto2.getRandomValues(new Uint8Array(bytesLength));
22058
- }
22059
- if (crypto2 && typeof crypto2.randomBytes === "function") {
22060
- return Uint8Array.from(crypto2.randomBytes(bytesLength));
22061
- }
22062
- throw new Error("crypto.getRandomValues must be defined");
22063
- }
22064
21681
 
22065
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js
21682
+ // node_modules/viem/node_modules/@noble/hashes/esm/_md.js
22066
21683
  function setBigUint64(view, byteOffset, value, isLE2) {
22067
21684
  if (typeof view.setBigUint64 === "function")
22068
21685
  return view.setBigUint64(byteOffset, value, isLE2);
@@ -22183,7 +21800,7 @@ var SHA256_IV = /* @__PURE__ */ Uint32Array.from([
22183
21800
  1541459225
22184
21801
  ]);
22185
21802
 
22186
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js
21803
+ // node_modules/viem/node_modules/@noble/hashes/esm/_u64.js
22187
21804
  var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
22188
21805
  var _32n = /* @__PURE__ */ BigInt(32);
22189
21806
  function fromBig(n, le = false) {
@@ -22206,7 +21823,7 @@ var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
22206
21823
  var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
22207
21824
  var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
22208
21825
 
22209
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js
21826
+ // node_modules/viem/node_modules/@noble/hashes/esm/sha2.js
22210
21827
  var SHA256_K = /* @__PURE__ */ Uint32Array.from([
22211
21828
  1116352408,
22212
21829
  1899447441,
@@ -22346,10 +21963,10 @@ class SHA256 extends HashMD {
22346
21963
  }
22347
21964
  var sha256 = /* @__PURE__ */ createHasher(() => new SHA256);
22348
21965
 
22349
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js
21966
+ // node_modules/viem/node_modules/@noble/hashes/esm/sha256.js
22350
21967
  var sha2562 = sha256;
22351
21968
 
22352
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/hash/sha256.js
21969
+ // node_modules/viem/_esm/utils/hash/sha256.js
22353
21970
  function sha2563(value, to_) {
22354
21971
  const to = to_ || "hex";
22355
21972
  const bytes = sha2562(isHex(value, { strict: false }) ? toBytes(value) : value);
@@ -22357,28 +21974,370 @@ function sha2563(value, to_) {
22357
21974
  return bytes;
22358
21975
  return toHex(bytes);
22359
21976
  }
22360
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/unit/formatUnits.js
22361
- function formatUnits(value, decimals) {
22362
- let display = value.toString();
22363
- const negative = display.startsWith("-");
22364
- if (negative)
22365
- display = display.slice(1);
22366
- display = display.padStart(decimals, "0");
22367
- let [integer2, fraction] = [
22368
- display.slice(0, display.length - decimals),
22369
- display.slice(display.length - decimals)
22370
- ];
22371
- fraction = fraction.replace(/(0+)$/, "");
22372
- return `${negative ? "-" : ""}${integer2 || "0"}${fraction ? `.${fraction}` : ""}`;
21977
+ // node_modules/@noble/curves/node_modules/@noble/hashes/esm/cryptoNode.js
21978
+ import * as nc from "node:crypto";
21979
+ var crypto2 = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
21980
+
21981
+ // node_modules/@noble/curves/node_modules/@noble/hashes/esm/utils.js
21982
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
21983
+ function isBytes3(a) {
21984
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
21985
+ }
21986
+ function anumber2(n) {
21987
+ if (!Number.isSafeInteger(n) || n < 0)
21988
+ throw new Error("positive integer expected, got " + n);
21989
+ }
21990
+ function abytes2(b, ...lengths) {
21991
+ if (!isBytes3(b))
21992
+ throw new Error("Uint8Array expected");
21993
+ if (lengths.length > 0 && !lengths.includes(b.length))
21994
+ throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
21995
+ }
21996
+ function ahash(h) {
21997
+ if (typeof h !== "function" || typeof h.create !== "function")
21998
+ throw new Error("Hash should be wrapped by utils.createHasher");
21999
+ anumber2(h.outputLen);
22000
+ anumber2(h.blockLen);
22001
+ }
22002
+ function aexists2(instance, checkFinished = true) {
22003
+ if (instance.destroyed)
22004
+ throw new Error("Hash instance has been destroyed");
22005
+ if (checkFinished && instance.finished)
22006
+ throw new Error("Hash#digest() has already been called");
22007
+ }
22008
+ function aoutput2(out, instance) {
22009
+ abytes2(out);
22010
+ const min = instance.outputLen;
22011
+ if (out.length < min) {
22012
+ throw new Error("digestInto() expects output buffer of length at least " + min);
22013
+ }
22014
+ }
22015
+ function clean2(...arrays) {
22016
+ for (let i = 0;i < arrays.length; i++) {
22017
+ arrays[i].fill(0);
22018
+ }
22019
+ }
22020
+ function createView2(arr) {
22021
+ return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
22022
+ }
22023
+ function rotr2(word, shift) {
22024
+ return word << 32 - shift | word >>> shift;
22025
+ }
22026
+ function utf8ToBytes2(str) {
22027
+ if (typeof str !== "string")
22028
+ throw new Error("string expected");
22029
+ return new Uint8Array(new TextEncoder().encode(str));
22030
+ }
22031
+ function toBytes3(data) {
22032
+ if (typeof data === "string")
22033
+ data = utf8ToBytes2(data);
22034
+ abytes2(data);
22035
+ return data;
22036
+ }
22037
+ function concatBytes2(...arrays) {
22038
+ let sum = 0;
22039
+ for (let i = 0;i < arrays.length; i++) {
22040
+ const a = arrays[i];
22041
+ abytes2(a);
22042
+ sum += a.length;
22043
+ }
22044
+ const res = new Uint8Array(sum);
22045
+ for (let i = 0, pad3 = 0;i < arrays.length; i++) {
22046
+ const a = arrays[i];
22047
+ res.set(a, pad3);
22048
+ pad3 += a.length;
22049
+ }
22050
+ return res;
22051
+ }
22052
+ class Hash2 {
22053
+ }
22054
+ function createHasher2(hashCons) {
22055
+ const hashC = (msg) => hashCons().update(toBytes3(msg)).digest();
22056
+ const tmp = hashCons();
22057
+ hashC.outputLen = tmp.outputLen;
22058
+ hashC.blockLen = tmp.blockLen;
22059
+ hashC.create = () => hashCons();
22060
+ return hashC;
22061
+ }
22062
+ function randomBytes(bytesLength = 32) {
22063
+ if (crypto2 && typeof crypto2.getRandomValues === "function") {
22064
+ return crypto2.getRandomValues(new Uint8Array(bytesLength));
22065
+ }
22066
+ if (crypto2 && typeof crypto2.randomBytes === "function") {
22067
+ return Uint8Array.from(crypto2.randomBytes(bytesLength));
22068
+ }
22069
+ throw new Error("crypto.getRandomValues must be defined");
22070
+ }
22071
+
22072
+ // node_modules/@noble/curves/node_modules/@noble/hashes/esm/_md.js
22073
+ function setBigUint642(view, byteOffset, value, isLE2) {
22074
+ if (typeof view.setBigUint64 === "function")
22075
+ return view.setBigUint64(byteOffset, value, isLE2);
22076
+ const _32n2 = BigInt(32);
22077
+ const _u32_max = BigInt(4294967295);
22078
+ const wh = Number(value >> _32n2 & _u32_max);
22079
+ const wl = Number(value & _u32_max);
22080
+ const h = isLE2 ? 4 : 0;
22081
+ const l = isLE2 ? 0 : 4;
22082
+ view.setUint32(byteOffset + h, wh, isLE2);
22083
+ view.setUint32(byteOffset + l, wl, isLE2);
22084
+ }
22085
+ function Chi2(a, b, c) {
22086
+ return a & b ^ ~a & c;
22087
+ }
22088
+ function Maj2(a, b, c) {
22089
+ return a & b ^ a & c ^ b & c;
22373
22090
  }
22374
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js
22375
- class HMAC extends Hash {
22091
+
22092
+ class HashMD2 extends Hash2 {
22093
+ constructor(blockLen, outputLen, padOffset, isLE2) {
22094
+ super();
22095
+ this.finished = false;
22096
+ this.length = 0;
22097
+ this.pos = 0;
22098
+ this.destroyed = false;
22099
+ this.blockLen = blockLen;
22100
+ this.outputLen = outputLen;
22101
+ this.padOffset = padOffset;
22102
+ this.isLE = isLE2;
22103
+ this.buffer = new Uint8Array(blockLen);
22104
+ this.view = createView2(this.buffer);
22105
+ }
22106
+ update(data) {
22107
+ aexists2(this);
22108
+ data = toBytes3(data);
22109
+ abytes2(data);
22110
+ const { view, buffer, blockLen } = this;
22111
+ const len = data.length;
22112
+ for (let pos = 0;pos < len; ) {
22113
+ const take = Math.min(blockLen - this.pos, len - pos);
22114
+ if (take === blockLen) {
22115
+ const dataView = createView2(data);
22116
+ for (;blockLen <= len - pos; pos += blockLen)
22117
+ this.process(dataView, pos);
22118
+ continue;
22119
+ }
22120
+ buffer.set(data.subarray(pos, pos + take), this.pos);
22121
+ this.pos += take;
22122
+ pos += take;
22123
+ if (this.pos === blockLen) {
22124
+ this.process(view, 0);
22125
+ this.pos = 0;
22126
+ }
22127
+ }
22128
+ this.length += data.length;
22129
+ this.roundClean();
22130
+ return this;
22131
+ }
22132
+ digestInto(out) {
22133
+ aexists2(this);
22134
+ aoutput2(out, this);
22135
+ this.finished = true;
22136
+ const { buffer, view, blockLen, isLE: isLE2 } = this;
22137
+ let { pos } = this;
22138
+ buffer[pos++] = 128;
22139
+ clean2(this.buffer.subarray(pos));
22140
+ if (this.padOffset > blockLen - pos) {
22141
+ this.process(view, 0);
22142
+ pos = 0;
22143
+ }
22144
+ for (let i = pos;i < blockLen; i++)
22145
+ buffer[i] = 0;
22146
+ setBigUint642(view, blockLen - 8, BigInt(this.length * 8), isLE2);
22147
+ this.process(view, 0);
22148
+ const oview = createView2(out);
22149
+ const len = this.outputLen;
22150
+ if (len % 4)
22151
+ throw new Error("_sha2: outputLen should be aligned to 32bit");
22152
+ const outLen = len / 4;
22153
+ const state = this.get();
22154
+ if (outLen > state.length)
22155
+ throw new Error("_sha2: outputLen bigger than state");
22156
+ for (let i = 0;i < outLen; i++)
22157
+ oview.setUint32(4 * i, state[i], isLE2);
22158
+ }
22159
+ digest() {
22160
+ const { buffer, outputLen } = this;
22161
+ this.digestInto(buffer);
22162
+ const res = buffer.slice(0, outputLen);
22163
+ this.destroy();
22164
+ return res;
22165
+ }
22166
+ _cloneInto(to) {
22167
+ to || (to = new this.constructor);
22168
+ to.set(...this.get());
22169
+ const { blockLen, buffer, length, finished, destroyed, pos } = this;
22170
+ to.destroyed = destroyed;
22171
+ to.finished = finished;
22172
+ to.length = length;
22173
+ to.pos = pos;
22174
+ if (length % blockLen)
22175
+ to.buffer.set(buffer);
22176
+ return to;
22177
+ }
22178
+ clone() {
22179
+ return this._cloneInto();
22180
+ }
22181
+ }
22182
+ var SHA256_IV2 = /* @__PURE__ */ Uint32Array.from([
22183
+ 1779033703,
22184
+ 3144134277,
22185
+ 1013904242,
22186
+ 2773480762,
22187
+ 1359893119,
22188
+ 2600822924,
22189
+ 528734635,
22190
+ 1541459225
22191
+ ]);
22192
+
22193
+ // node_modules/@noble/curves/node_modules/@noble/hashes/esm/sha2.js
22194
+ var SHA256_K2 = /* @__PURE__ */ Uint32Array.from([
22195
+ 1116352408,
22196
+ 1899447441,
22197
+ 3049323471,
22198
+ 3921009573,
22199
+ 961987163,
22200
+ 1508970993,
22201
+ 2453635748,
22202
+ 2870763221,
22203
+ 3624381080,
22204
+ 310598401,
22205
+ 607225278,
22206
+ 1426881987,
22207
+ 1925078388,
22208
+ 2162078206,
22209
+ 2614888103,
22210
+ 3248222580,
22211
+ 3835390401,
22212
+ 4022224774,
22213
+ 264347078,
22214
+ 604807628,
22215
+ 770255983,
22216
+ 1249150122,
22217
+ 1555081692,
22218
+ 1996064986,
22219
+ 2554220882,
22220
+ 2821834349,
22221
+ 2952996808,
22222
+ 3210313671,
22223
+ 3336571891,
22224
+ 3584528711,
22225
+ 113926993,
22226
+ 338241895,
22227
+ 666307205,
22228
+ 773529912,
22229
+ 1294757372,
22230
+ 1396182291,
22231
+ 1695183700,
22232
+ 1986661051,
22233
+ 2177026350,
22234
+ 2456956037,
22235
+ 2730485921,
22236
+ 2820302411,
22237
+ 3259730800,
22238
+ 3345764771,
22239
+ 3516065817,
22240
+ 3600352804,
22241
+ 4094571909,
22242
+ 275423344,
22243
+ 430227734,
22244
+ 506948616,
22245
+ 659060556,
22246
+ 883997877,
22247
+ 958139571,
22248
+ 1322822218,
22249
+ 1537002063,
22250
+ 1747873779,
22251
+ 1955562222,
22252
+ 2024104815,
22253
+ 2227730452,
22254
+ 2361852424,
22255
+ 2428436474,
22256
+ 2756734187,
22257
+ 3204031479,
22258
+ 3329325298
22259
+ ]);
22260
+ var SHA256_W2 = /* @__PURE__ */ new Uint32Array(64);
22261
+
22262
+ class SHA2562 extends HashMD2 {
22263
+ constructor(outputLen = 32) {
22264
+ super(64, outputLen, 8, false);
22265
+ this.A = SHA256_IV2[0] | 0;
22266
+ this.B = SHA256_IV2[1] | 0;
22267
+ this.C = SHA256_IV2[2] | 0;
22268
+ this.D = SHA256_IV2[3] | 0;
22269
+ this.E = SHA256_IV2[4] | 0;
22270
+ this.F = SHA256_IV2[5] | 0;
22271
+ this.G = SHA256_IV2[6] | 0;
22272
+ this.H = SHA256_IV2[7] | 0;
22273
+ }
22274
+ get() {
22275
+ const { A, B, C, D, E, F, G, H } = this;
22276
+ return [A, B, C, D, E, F, G, H];
22277
+ }
22278
+ set(A, B, C, D, E, F, G, H) {
22279
+ this.A = A | 0;
22280
+ this.B = B | 0;
22281
+ this.C = C | 0;
22282
+ this.D = D | 0;
22283
+ this.E = E | 0;
22284
+ this.F = F | 0;
22285
+ this.G = G | 0;
22286
+ this.H = H | 0;
22287
+ }
22288
+ process(view, offset) {
22289
+ for (let i = 0;i < 16; i++, offset += 4)
22290
+ SHA256_W2[i] = view.getUint32(offset, false);
22291
+ for (let i = 16;i < 64; i++) {
22292
+ const W15 = SHA256_W2[i - 15];
22293
+ const W2 = SHA256_W2[i - 2];
22294
+ const s0 = rotr2(W15, 7) ^ rotr2(W15, 18) ^ W15 >>> 3;
22295
+ const s1 = rotr2(W2, 17) ^ rotr2(W2, 19) ^ W2 >>> 10;
22296
+ SHA256_W2[i] = s1 + SHA256_W2[i - 7] + s0 + SHA256_W2[i - 16] | 0;
22297
+ }
22298
+ let { A, B, C, D, E, F, G, H } = this;
22299
+ for (let i = 0;i < 64; i++) {
22300
+ const sigma1 = rotr2(E, 6) ^ rotr2(E, 11) ^ rotr2(E, 25);
22301
+ const T1 = H + sigma1 + Chi2(E, F, G) + SHA256_K2[i] + SHA256_W2[i] | 0;
22302
+ const sigma0 = rotr2(A, 2) ^ rotr2(A, 13) ^ rotr2(A, 22);
22303
+ const T2 = sigma0 + Maj2(A, B, C) | 0;
22304
+ H = G;
22305
+ G = F;
22306
+ F = E;
22307
+ E = D + T1 | 0;
22308
+ D = C;
22309
+ C = B;
22310
+ B = A;
22311
+ A = T1 + T2 | 0;
22312
+ }
22313
+ A = A + this.A | 0;
22314
+ B = B + this.B | 0;
22315
+ C = C + this.C | 0;
22316
+ D = D + this.D | 0;
22317
+ E = E + this.E | 0;
22318
+ F = F + this.F | 0;
22319
+ G = G + this.G | 0;
22320
+ H = H + this.H | 0;
22321
+ this.set(A, B, C, D, E, F, G, H);
22322
+ }
22323
+ roundClean() {
22324
+ clean2(SHA256_W2);
22325
+ }
22326
+ destroy() {
22327
+ this.set(0, 0, 0, 0, 0, 0, 0, 0);
22328
+ clean2(this.buffer);
22329
+ }
22330
+ }
22331
+ var sha2564 = /* @__PURE__ */ createHasher2(() => new SHA2562);
22332
+
22333
+ // node_modules/@noble/curves/node_modules/@noble/hashes/esm/hmac.js
22334
+ class HMAC extends Hash2 {
22376
22335
  constructor(hash, _key) {
22377
22336
  super();
22378
22337
  this.finished = false;
22379
22338
  this.destroyed = false;
22380
22339
  ahash(hash);
22381
- const key = toBytes2(_key);
22340
+ const key = toBytes3(_key);
22382
22341
  this.iHash = hash.create();
22383
22342
  if (typeof this.iHash.update !== "function")
22384
22343
  throw new Error("Expected instance of class which extends utils.Hash");
@@ -22394,16 +22353,16 @@ class HMAC extends Hash {
22394
22353
  for (let i = 0;i < pad3.length; i++)
22395
22354
  pad3[i] ^= 54 ^ 92;
22396
22355
  this.oHash.update(pad3);
22397
- clean(pad3);
22356
+ clean2(pad3);
22398
22357
  }
22399
22358
  update(buf) {
22400
- aexists(this);
22359
+ aexists2(this);
22401
22360
  this.iHash.update(buf);
22402
22361
  return this;
22403
22362
  }
22404
22363
  digestInto(out) {
22405
- aexists(this);
22406
- abytes(out, this.outputLen);
22364
+ aexists2(this);
22365
+ abytes2(out, this.outputLen);
22407
22366
  this.finished = true;
22408
22367
  this.iHash.digestInto(out);
22409
22368
  this.oHash.update(out);
@@ -22439,15 +22398,15 @@ class HMAC extends Hash {
22439
22398
  var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
22440
22399
  hmac.create = (hash, key) => new HMAC(hash, key);
22441
22400
 
22442
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
22401
+ // node_modules/@noble/curves/esm/abstract/utils.js
22443
22402
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22444
22403
  var _0n = /* @__PURE__ */ BigInt(0);
22445
22404
  var _1n = /* @__PURE__ */ BigInt(1);
22446
- function isBytes3(a) {
22405
+ function isBytes4(a) {
22447
22406
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
22448
22407
  }
22449
- function abytes2(item) {
22450
- if (!isBytes3(item))
22408
+ function abytes3(item) {
22409
+ if (!isBytes4(item))
22451
22410
  throw new Error("Uint8Array expected");
22452
22411
  }
22453
22412
  function abool(title, value) {
@@ -22466,7 +22425,7 @@ function hexToNumber3(hex) {
22466
22425
  var hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
22467
22426
  var hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
22468
22427
  function bytesToHex3(bytes) {
22469
- abytes2(bytes);
22428
+ abytes3(bytes);
22470
22429
  if (hasHexBuiltin)
22471
22430
  return bytes.toHex();
22472
22431
  let hex = "";
@@ -22510,7 +22469,7 @@ function bytesToNumberBE(bytes) {
22510
22469
  return hexToNumber3(bytesToHex3(bytes));
22511
22470
  }
22512
22471
  function bytesToNumberLE(bytes) {
22513
- abytes2(bytes);
22472
+ abytes3(bytes);
22514
22473
  return hexToNumber3(bytesToHex3(Uint8Array.from(bytes).reverse()));
22515
22474
  }
22516
22475
  function numberToBytesBE(n, len) {
@@ -22527,7 +22486,7 @@ function ensureBytes(title, hex, expectedLength) {
22527
22486
  } catch (e) {
22528
22487
  throw new Error(title + " must be hex string or Uint8Array, cause: " + e);
22529
22488
  }
22530
- } else if (isBytes3(hex)) {
22489
+ } else if (isBytes4(hex)) {
22531
22490
  res = Uint8Array.from(hex);
22532
22491
  } else {
22533
22492
  throw new Error(title + " must be hex string or Uint8Array");
@@ -22541,7 +22500,7 @@ function concatBytes3(...arrays) {
22541
22500
  let sum = 0;
22542
22501
  for (let i = 0;i < arrays.length; i++) {
22543
22502
  const a = arrays[i];
22544
- abytes2(a);
22503
+ abytes3(a);
22545
22504
  sum += a.length;
22546
22505
  }
22547
22506
  const res = new Uint8Array(sum);
@@ -22622,7 +22581,7 @@ var validatorFns = {
22622
22581
  function: (val) => typeof val === "function",
22623
22582
  boolean: (val) => typeof val === "boolean",
22624
22583
  string: (val) => typeof val === "string",
22625
- stringOrUint8Array: (val) => typeof val === "string" || isBytes3(val),
22584
+ stringOrUint8Array: (val) => typeof val === "string" || isBytes4(val),
22626
22585
  isSafeInteger: (val) => Number.isSafeInteger(val),
22627
22586
  array: (val) => Array.isArray(val),
22628
22587
  field: (val, object2) => object2.Fp.isValid(val),
@@ -22658,7 +22617,7 @@ function memoized(fn) {
22658
22617
  };
22659
22618
  }
22660
22619
 
22661
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/modular.js
22620
+ // node_modules/@noble/curves/esm/abstract/modular.js
22662
22621
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22663
22622
  var _0n2 = BigInt(0);
22664
22623
  var _1n2 = BigInt(1);
@@ -22851,7 +22810,7 @@ function FpLegendre(Fp, n) {
22851
22810
  }
22852
22811
  function nLength(n, nBitLength) {
22853
22812
  if (nBitLength !== undefined)
22854
- anumber(nBitLength);
22813
+ anumber2(nBitLength);
22855
22814
  const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
22856
22815
  const nByteLength = Math.ceil(_nBitLength / 8);
22857
22816
  return { nBitLength: _nBitLength, nByteLength };
@@ -22929,7 +22888,7 @@ function mapHashToField(key, fieldOrder, isLE2 = false) {
22929
22888
  return isLE2 ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
22930
22889
  }
22931
22890
 
22932
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/curve.js
22891
+ // node_modules/@noble/curves/esm/abstract/curve.js
22933
22892
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
22934
22893
  var _0n3 = BigInt(0);
22935
22894
  var _1n3 = BigInt(1);
@@ -23133,7 +23092,7 @@ function validateBasic(curve) {
23133
23092
  });
23134
23093
  }
23135
23094
 
23136
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/weierstrass.js
23095
+ // node_modules/@noble/curves/esm/abstract/weierstrass.js
23137
23096
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
23138
23097
  function validateSigVerOpts(opts) {
23139
23098
  if (opts.lowS !== undefined)
@@ -23277,7 +23236,7 @@ function weierstrassPoints(opts) {
23277
23236
  const CURVE = validatePointOpts(opts);
23278
23237
  const { Fp } = CURVE;
23279
23238
  const Fn = Field(CURVE.n, CURVE.nBitLength);
23280
- const toBytes3 = CURVE.toBytes || ((_c, point, _isCompressed) => {
23239
+ const toBytes4 = CURVE.toBytes || ((_c, point, _isCompressed) => {
23281
23240
  const a = point.toAffine();
23282
23241
  return concatBytes3(Uint8Array.from([4]), Fp.toBytes(a.x), Fp.toBytes(a.y));
23283
23242
  });
@@ -23310,7 +23269,7 @@ function weierstrassPoints(opts) {
23310
23269
  function normPrivateKeyToScalar(key) {
23311
23270
  const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n: N } = CURVE;
23312
23271
  if (lengths && typeof key !== "bigint") {
23313
- if (isBytes3(key))
23272
+ if (isBytes4(key))
23314
23273
  key = bytesToHex3(key);
23315
23274
  if (typeof key !== "string" || !lengths.includes(key.length))
23316
23275
  throw new Error("invalid private key");
@@ -23605,7 +23564,7 @@ function weierstrassPoints(opts) {
23605
23564
  toRawBytes(isCompressed = true) {
23606
23565
  abool("isCompressed", isCompressed);
23607
23566
  this.assertValidity();
23608
- return toBytes3(Point, this, isCompressed);
23567
+ return toBytes4(Point, this, isCompressed);
23609
23568
  }
23610
23569
  toHex(isCompressed = true) {
23611
23570
  abool("isCompressed", isCompressed);
@@ -23887,7 +23846,7 @@ function weierstrass(curveDef) {
23887
23846
  throw new Error("options.strict was renamed to lowS");
23888
23847
  if (format !== undefined && format !== "compact" && format !== "der")
23889
23848
  throw new Error("format must be compact or der");
23890
- const isHex2 = typeof sg === "string" || isBytes3(sg);
23849
+ const isHex2 = typeof sg === "string" || isBytes4(sg);
23891
23850
  const isObj = !isHex2 && !format && typeof sg === "object" && sg !== null && typeof sg.r === "bigint" && typeof sg.s === "bigint";
23892
23851
  if (!isHex2 && !isObj)
23893
23852
  throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");
@@ -23940,12 +23899,12 @@ function weierstrass(curveDef) {
23940
23899
  };
23941
23900
  }
23942
23901
 
23943
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/_shortw_utils.js
23902
+ // node_modules/@noble/curves/esm/_shortw_utils.js
23944
23903
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
23945
23904
  function getHash(hash) {
23946
23905
  return {
23947
23906
  hash,
23948
- hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),
23907
+ hmac: (key, ...msgs) => hmac(hash, key, concatBytes2(...msgs)),
23949
23908
  randomBytes
23950
23909
  };
23951
23910
  }
@@ -23954,7 +23913,7 @@ function createCurve(curveDef, defHash) {
23954
23913
  return { ...create(defHash), create };
23955
23914
  }
23956
23915
 
23957
- // ../../node_modules/.bun/@noble+curves@1.9.1/node_modules/@noble/curves/esm/secp256k1.js
23916
+ // node_modules/@noble/curves/esm/secp256k1.js
23958
23917
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
23959
23918
  var secp256k1P = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f");
23960
23919
  var secp256k1N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
@@ -24019,13 +23978,13 @@ var secp256k1 = createCurve({
24019
23978
  return { k1neg, k1, k2neg, k2 };
24020
23979
  }
24021
23980
  }
24022
- }, sha256);
23981
+ }, sha2564);
24023
23982
 
24024
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/generatePrivateKey.js
23983
+ // node_modules/viem/_esm/accounts/generatePrivateKey.js
24025
23984
  function generatePrivateKey() {
24026
23985
  return toHex(secp256k1.utils.randomPrivateKey());
24027
23986
  }
24028
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/address.js
23987
+ // node_modules/viem/_esm/errors/address.js
24029
23988
  class InvalidAddressError2 extends BaseError {
24030
23989
  constructor({ address }) {
24031
23990
  super(`Address "${address}" is invalid.`, {
@@ -24038,7 +23997,7 @@ class InvalidAddressError2 extends BaseError {
24038
23997
  }
24039
23998
  }
24040
23999
 
24041
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/lru.js
24000
+ // node_modules/viem/_esm/utils/lru.js
24042
24001
  class LruMap extends Map {
24043
24002
  constructor(size3) {
24044
24003
  super();
@@ -24071,7 +24030,7 @@ class LruMap extends Map {
24071
24030
  }
24072
24031
  }
24073
24032
 
24074
- // ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/sha3.js
24033
+ // node_modules/viem/node_modules/@noble/hashes/esm/sha3.js
24075
24034
  var _0n6 = BigInt(0);
24076
24035
  var _1n6 = BigInt(1);
24077
24036
  var _2n4 = BigInt(2);
@@ -24252,7 +24211,7 @@ class Keccak extends Hash {
24252
24211
  var gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));
24253
24212
  var keccak_256 = /* @__PURE__ */ (() => gen(1, 136, 256 / 8))();
24254
24213
 
24255
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/hash/keccak256.js
24214
+ // node_modules/viem/_esm/utils/hash/keccak256.js
24256
24215
  function keccak2562(value, to_) {
24257
24216
  const to = to_ || "hex";
24258
24217
  const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);
@@ -24261,7 +24220,7 @@ function keccak2562(value, to_) {
24261
24220
  return toHex(bytes);
24262
24221
  }
24263
24222
 
24264
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/address/getAddress.js
24223
+ // node_modules/viem/_esm/utils/address/getAddress.js
24265
24224
  var checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
24266
24225
  function checksumAddress2(address_, chainId) {
24267
24226
  if (checksumAddressCache.has(`${address_}.${chainId}`))
@@ -24282,7 +24241,7 @@ function checksumAddress2(address_, chainId) {
24282
24241
  return result;
24283
24242
  }
24284
24243
 
24285
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/address/isAddress.js
24244
+ // node_modules/viem/_esm/utils/address/isAddress.js
24286
24245
  var addressRegex = /^0x[a-fA-F0-9]{40}$/;
24287
24246
  var isAddressCache = /* @__PURE__ */ new LruMap(8192);
24288
24247
  function isAddress2(address, options) {
@@ -24303,7 +24262,7 @@ function isAddress2(address, options) {
24303
24262
  return result;
24304
24263
  }
24305
24264
 
24306
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/toAccount.js
24265
+ // node_modules/viem/_esm/accounts/toAccount.js
24307
24266
  function toAccount(source) {
24308
24267
  if (typeof source === "string") {
24309
24268
  if (!isAddress2(source, { strict: false }))
@@ -24328,13 +24287,13 @@ function toAccount(source) {
24328
24287
  };
24329
24288
  }
24330
24289
 
24331
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
24290
+ // node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js
24332
24291
  function publicKeyToAddress(publicKey) {
24333
24292
  const address = keccak2562(`0x${publicKey.substring(4)}`).substring(26);
24334
24293
  return checksumAddress2(`0x${address}`);
24335
24294
  }
24336
24295
 
24337
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/signature/serializeSignature.js
24296
+ // node_modules/viem/_esm/utils/signature/serializeSignature.js
24338
24297
  function serializeSignature3({ r, s, to = "hex", v, yParity }) {
24339
24298
  const yParity_ = (() => {
24340
24299
  if (yParity === 0 || yParity === 1)
@@ -24349,7 +24308,7 @@ function serializeSignature3({ r, s, to = "hex", v, yParity }) {
24349
24308
  return hexToBytes(signature);
24350
24309
  }
24351
24310
 
24352
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/sign.js
24311
+ // node_modules/viem/_esm/accounts/utils/sign.js
24353
24312
  var extraEntropy = false;
24354
24313
  async function sign({ hash, privateKey, to = "object" }) {
24355
24314
  const { r, s, recovery } = secp256k1.sign(hash.slice(2), privateKey.slice(2), {
@@ -24369,7 +24328,7 @@ async function sign({ hash, privateKey, to = "object" }) {
24369
24328
  })();
24370
24329
  }
24371
24330
 
24372
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/concat.js
24331
+ // node_modules/viem/_esm/utils/data/concat.js
24373
24332
  function concat2(values) {
24374
24333
  if (typeof values[0] === "string")
24375
24334
  return concatHex2(values);
@@ -24392,7 +24351,7 @@ function concatHex2(values) {
24392
24351
  return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
24393
24352
  }
24394
24353
 
24395
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/cursor.js
24354
+ // node_modules/viem/_esm/errors/cursor.js
24396
24355
  class NegativeOffsetError extends BaseError {
24397
24356
  constructor({ offset }) {
24398
24357
  super(`Offset \`${offset}\` cannot be negative.`, {
@@ -24413,7 +24372,7 @@ class RecursiveReadLimitExceededError extends BaseError {
24413
24372
  }
24414
24373
  }
24415
24374
 
24416
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/cursor.js
24375
+ // node_modules/viem/_esm/utils/cursor.js
24417
24376
  var staticCursor = {
24418
24377
  bytes: new Uint8Array,
24419
24378
  dataView: new DataView(new ArrayBuffer(0)),
@@ -24582,7 +24541,7 @@ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
24582
24541
  return cursor;
24583
24542
  }
24584
24543
 
24585
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/encoding/toRlp.js
24544
+ // node_modules/viem/_esm/utils/encoding/toRlp.js
24586
24545
  function toRlp2(bytes, to = "hex") {
24587
24546
  const encodable = getEncodable(bytes);
24588
24547
  const cursor = createCursor(new Uint8Array(encodable.length));
@@ -24671,7 +24630,7 @@ function getSizeOfLength(length) {
24671
24630
  throw new BaseError("Length is too large.");
24672
24631
  }
24673
24632
 
24674
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/authorization/hashAuthorization.js
24633
+ // node_modules/viem/_esm/utils/authorization/hashAuthorization.js
24675
24634
  function hashAuthorization(parameters) {
24676
24635
  const { chainId, nonce, to } = parameters;
24677
24636
  const address = parameters.contractAddress ?? parameters.address;
@@ -24688,7 +24647,7 @@ function hashAuthorization(parameters) {
24688
24647
  return hash;
24689
24648
  }
24690
24649
 
24691
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/signAuthorization.js
24650
+ // node_modules/viem/_esm/accounts/utils/signAuthorization.js
24692
24651
  async function signAuthorization(parameters) {
24693
24652
  const { chainId, nonce, privateKey, to = "object" } = parameters;
24694
24653
  const address = parameters.contractAddress ?? parameters.address;
@@ -24707,11 +24666,11 @@ async function signAuthorization(parameters) {
24707
24666
  return signature;
24708
24667
  }
24709
24668
 
24710
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/constants/strings.js
24669
+ // node_modules/viem/_esm/constants/strings.js
24711
24670
  var presignMessagePrefix2 = `\x19Ethereum Signed Message:
24712
24671
  `;
24713
24672
 
24714
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
24673
+ // node_modules/viem/_esm/utils/signature/toPrefixedMessage.js
24715
24674
  function toPrefixedMessage2(message_) {
24716
24675
  const message = (() => {
24717
24676
  if (typeof message_ === "string")
@@ -24724,28 +24683,43 @@ function toPrefixedMessage2(message_) {
24724
24683
  return concat2([prefix, message]);
24725
24684
  }
24726
24685
 
24727
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/signature/hashMessage.js
24686
+ // node_modules/viem/_esm/utils/signature/hashMessage.js
24728
24687
  function hashMessage2(message, to_) {
24729
24688
  return keccak2562(toPrefixedMessage2(message), to_);
24730
24689
  }
24731
24690
 
24732
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/signMessage.js
24691
+ // node_modules/viem/_esm/accounts/utils/signMessage.js
24733
24692
  async function signMessage({ message, privateKey }) {
24734
24693
  return await sign({ hash: hashMessage2(message), privateKey, to: "hex" });
24735
24694
  }
24736
24695
 
24737
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/constants/unit.js
24696
+ // node_modules/viem/_esm/constants/unit.js
24738
24697
  var gweiUnits2 = {
24739
24698
  ether: -9,
24740
24699
  wei: 9
24741
24700
  };
24742
24701
 
24743
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/unit/formatGwei.js
24702
+ // node_modules/viem/_esm/utils/unit/formatUnits.js
24703
+ function formatUnits2(value, decimals) {
24704
+ let display = value.toString();
24705
+ const negative = display.startsWith("-");
24706
+ if (negative)
24707
+ display = display.slice(1);
24708
+ display = display.padStart(decimals, "0");
24709
+ let [integer2, fraction] = [
24710
+ display.slice(0, display.length - decimals),
24711
+ display.slice(display.length - decimals)
24712
+ ];
24713
+ fraction = fraction.replace(/(0+)$/, "");
24714
+ return `${negative ? "-" : ""}${integer2 || "0"}${fraction ? `.${fraction}` : ""}`;
24715
+ }
24716
+
24717
+ // node_modules/viem/_esm/utils/unit/formatGwei.js
24744
24718
  function formatGwei2(wei, unit = "wei") {
24745
- return formatUnits(wei, gweiUnits2[unit]);
24719
+ return formatUnits2(wei, gweiUnits2[unit]);
24746
24720
  }
24747
24721
 
24748
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/transaction.js
24722
+ // node_modules/viem/_esm/errors/transaction.js
24749
24723
  function prettyPrint(args) {
24750
24724
  const entries = Object.entries(args).map(([key, value]) => {
24751
24725
  if (value === undefined || value === false)
@@ -24791,7 +24765,7 @@ class InvalidStorageKeySizeError2 extends BaseError {
24791
24765
  }
24792
24766
  }
24793
24767
 
24794
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
24768
+ // node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
24795
24769
  function serializeAuthorizationList(authorizationList) {
24796
24770
  if (!authorizationList || authorizationList.length === 0)
24797
24771
  return [];
@@ -24809,7 +24783,7 @@ function serializeAuthorizationList(authorizationList) {
24809
24783
  return serializedAuthorizationList;
24810
24784
  }
24811
24785
 
24812
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/blobsToCommitments.js
24786
+ // node_modules/viem/_esm/utils/blob/blobsToCommitments.js
24813
24787
  function blobsToCommitments2(parameters) {
24814
24788
  const { kzg } = parameters;
24815
24789
  const to = parameters.to ?? (typeof parameters.blobs[0] === "string" ? "hex" : "bytes");
@@ -24820,7 +24794,7 @@ function blobsToCommitments2(parameters) {
24820
24794
  return to === "bytes" ? commitments : commitments.map((x) => bytesToHex(x));
24821
24795
  }
24822
24796
 
24823
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/blobsToProofs.js
24797
+ // node_modules/viem/_esm/utils/blob/blobsToProofs.js
24824
24798
  function blobsToProofs2(parameters) {
24825
24799
  const { kzg } = parameters;
24826
24800
  const to = parameters.to ?? (typeof parameters.blobs[0] === "string" ? "hex" : "bytes");
@@ -24835,7 +24809,7 @@ function blobsToProofs2(parameters) {
24835
24809
  return to === "bytes" ? proofs : proofs.map((x) => bytesToHex(x));
24836
24810
  }
24837
24811
 
24838
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24812
+ // node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24839
24813
  function commitmentToVersionedHash2(parameters) {
24840
24814
  const { commitment, version: version3 = 1 } = parameters;
24841
24815
  const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
@@ -24844,7 +24818,7 @@ function commitmentToVersionedHash2(parameters) {
24844
24818
  return to === "bytes" ? versionedHash : bytesToHex(versionedHash);
24845
24819
  }
24846
24820
 
24847
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
24821
+ // node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
24848
24822
  function commitmentsToVersionedHashes2(parameters) {
24849
24823
  const { commitments, version: version3 } = parameters;
24850
24824
  const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
@@ -24859,17 +24833,17 @@ function commitmentsToVersionedHashes2(parameters) {
24859
24833
  return hashes;
24860
24834
  }
24861
24835
 
24862
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/constants/blob.js
24836
+ // node_modules/viem/_esm/constants/blob.js
24863
24837
  var blobsPerTransaction = 6;
24864
24838
  var bytesPerFieldElement = 32;
24865
24839
  var fieldElementsPerBlob = 4096;
24866
24840
  var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
24867
24841
  var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
24868
24842
 
24869
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/constants/kzg.js
24843
+ // node_modules/viem/_esm/constants/kzg.js
24870
24844
  var versionedHashVersionKzg = 1;
24871
24845
 
24872
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/blob.js
24846
+ // node_modules/viem/_esm/errors/blob.js
24873
24847
  class BlobSizeTooLargeError extends BaseError {
24874
24848
  constructor({ maxSize, size: size3 }) {
24875
24849
  super("Blob size is too large.", {
@@ -24906,7 +24880,7 @@ class InvalidVersionedHashVersionError extends BaseError {
24906
24880
  }
24907
24881
  }
24908
24882
 
24909
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/toBlobs.js
24883
+ // node_modules/viem/_esm/utils/blob/toBlobs.js
24910
24884
  function toBlobs2(parameters) {
24911
24885
  const to = parameters.to ?? (typeof parameters.data === "string" ? "hex" : "bytes");
24912
24886
  const data = typeof parameters.data === "string" ? hexToBytes(parameters.data) : parameters.data;
@@ -24941,7 +24915,7 @@ function toBlobs2(parameters) {
24941
24915
  return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex(x.bytes));
24942
24916
  }
24943
24917
 
24944
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/blob/toBlobSidecars.js
24918
+ // node_modules/viem/_esm/utils/blob/toBlobSidecars.js
24945
24919
  function toBlobSidecars2(parameters) {
24946
24920
  const { data, kzg, to } = parameters;
24947
24921
  const blobs = parameters.blobs ?? toBlobs2({ data, to });
@@ -24957,7 +24931,7 @@ function toBlobSidecars2(parameters) {
24957
24931
  return sidecars;
24958
24932
  }
24959
24933
 
24960
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/constants/number.js
24934
+ // node_modules/viem/_esm/constants/number.js
24961
24935
  var maxInt82 = 2n ** (8n - 1n) - 1n;
24962
24936
  var maxInt162 = 2n ** (16n - 1n) - 1n;
24963
24937
  var maxInt242 = 2n ** (24n - 1n) - 1n;
@@ -25055,14 +25029,14 @@ var maxUint2402 = 2n ** 240n - 1n;
25055
25029
  var maxUint2482 = 2n ** 248n - 1n;
25056
25030
  var maxUint2562 = 2n ** 256n - 1n;
25057
25031
 
25058
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/chain.js
25032
+ // node_modules/viem/_esm/errors/chain.js
25059
25033
  class InvalidChainIdError2 extends BaseError {
25060
25034
  constructor({ chainId }) {
25061
25035
  super(typeof chainId === "number" ? `Chain ID "${chainId}" is invalid.` : "Chain ID is invalid.", { name: "InvalidChainIdError" });
25062
25036
  }
25063
25037
  }
25064
25038
 
25065
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/node.js
25039
+ // node_modules/viem/_esm/errors/node.js
25066
25040
  class ExecutionRevertedError2 extends BaseError {
25067
25041
  constructor({ cause, message } = {}) {
25068
25042
  const reason = message?.replace("execution reverted: ", "")?.replace("execution reverted", "");
@@ -25246,7 +25220,7 @@ Object.defineProperty(TipAboveFeeCapError2, "nodeMessage", {
25246
25220
  value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
25247
25221
  });
25248
25222
 
25249
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/data/slice.js
25223
+ // node_modules/viem/_esm/utils/data/slice.js
25250
25224
  function slice2(value, start, end, { strict } = {}) {
25251
25225
  if (isHex(value, { strict: false }))
25252
25226
  return sliceHex2(value, start, end, {
@@ -25288,7 +25262,7 @@ function sliceHex2(value_, start, end, { strict } = {}) {
25288
25262
  return value;
25289
25263
  }
25290
25264
 
25291
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/transaction/assertTransaction.js
25265
+ // node_modules/viem/_esm/utils/transaction/assertTransaction.js
25292
25266
  function assertTransactionEIP7702(transaction) {
25293
25267
  const { authorizationList } = transaction;
25294
25268
  if (authorizationList) {
@@ -25356,7 +25330,7 @@ function assertTransactionLegacy2(transaction) {
25356
25330
  throw new FeeCapTooHighError2({ maxFeePerGas: gasPrice });
25357
25331
  }
25358
25332
 
25359
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/transaction/getTransactionType.js
25333
+ // node_modules/viem/_esm/utils/transaction/getTransactionType.js
25360
25334
  function getTransactionType2(transaction) {
25361
25335
  if (transaction.type)
25362
25336
  return transaction.type;
@@ -25375,7 +25349,7 @@ function getTransactionType2(transaction) {
25375
25349
  throw new InvalidSerializableTransactionError2({ transaction });
25376
25350
  }
25377
25351
 
25378
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/transaction/serializeAccessList.js
25352
+ // node_modules/viem/_esm/utils/transaction/serializeAccessList.js
25379
25353
  function serializeAccessList2(accessList) {
25380
25354
  if (!accessList || accessList.length === 0)
25381
25355
  return [];
@@ -25395,7 +25369,7 @@ function serializeAccessList2(accessList) {
25395
25369
  return serializedAccessList;
25396
25370
  }
25397
25371
 
25398
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25372
+ // node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25399
25373
  function serializeTransaction2(transaction, signature) {
25400
25374
  const type = getTransactionType2(transaction);
25401
25375
  if (type === "eip1559")
@@ -25589,7 +25563,7 @@ function toYParitySignatureArray(transaction, signature_) {
25589
25563
  return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
25590
25564
  }
25591
25565
 
25592
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/signTransaction.js
25566
+ // node_modules/viem/_esm/accounts/utils/signTransaction.js
25593
25567
  async function signTransaction(parameters) {
25594
25568
  const { privateKey, transaction, serializer = serializeTransaction2 } = parameters;
25595
25569
  const signableTransaction = (() => {
@@ -25607,7 +25581,7 @@ async function signTransaction(parameters) {
25607
25581
  return await serializer(transaction, signature);
25608
25582
  }
25609
25583
 
25610
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/abi.js
25584
+ // node_modules/viem/_esm/errors/abi.js
25611
25585
  class AbiEncodingArrayLengthMismatchError2 extends BaseError {
25612
25586
  constructor({ expectedLength, givenLength, type }) {
25613
25587
  super([
@@ -25660,11 +25634,11 @@ class InvalidArrayError2 extends BaseError {
25660
25634
  }
25661
25635
  }
25662
25636
 
25663
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/regex.js
25637
+ // node_modules/viem/_esm/utils/regex.js
25664
25638
  var bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
25665
25639
  var integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
25666
25640
 
25667
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
25641
+ // node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
25668
25642
  function encodeAbiParameters2(params, values) {
25669
25643
  if (params.length !== values.length)
25670
25644
  throw new AbiEncodingLengthMismatchError2({
@@ -25875,13 +25849,13 @@ function getArrayComponents(type) {
25875
25849
  return matches ? [matches[2] ? Number(matches[2]) : null, matches[1]] : undefined;
25876
25850
  }
25877
25851
 
25878
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/stringify.js
25852
+ // node_modules/viem/_esm/utils/stringify.js
25879
25853
  var stringify2 = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
25880
25854
  const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
25881
25855
  return typeof replacer === "function" ? replacer(key, value2) : value2;
25882
25856
  }, space);
25883
25857
 
25884
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/errors/typedData.js
25858
+ // node_modules/viem/_esm/errors/typedData.js
25885
25859
  class InvalidDomainError2 extends BaseError {
25886
25860
  constructor({ domain }) {
25887
25861
  super(`Invalid domain "${stringify2(domain)}".`, {
@@ -25908,7 +25882,7 @@ class InvalidStructTypeError2 extends BaseError {
25908
25882
  }
25909
25883
  }
25910
25884
 
25911
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/typedData.js
25885
+ // node_modules/viem/_esm/utils/typedData.js
25912
25886
  function validateTypedData2(parameters) {
25913
25887
  const { domain, message, primaryType, types } = parameters;
25914
25888
  const validateData = (struct, data) => {
@@ -25973,7 +25947,7 @@ function validateReference(type) {
25973
25947
  throw new InvalidStructTypeError2({ type });
25974
25948
  }
25975
25949
 
25976
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/utils/signature/hashTypedData.js
25950
+ // node_modules/viem/_esm/utils/signature/hashTypedData.js
25977
25951
  function hashTypedData2(parameters) {
25978
25952
  const { domain = {}, message, primaryType } = parameters;
25979
25953
  const types = {
@@ -26083,7 +26057,7 @@ function encodeField({ types, name, type, value }) {
26083
26057
  return [{ type }, value];
26084
26058
  }
26085
26059
 
26086
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/utils/signTypedData.js
26060
+ // node_modules/viem/_esm/accounts/utils/signTypedData.js
26087
26061
  async function signTypedData(parameters) {
26088
26062
  const { privateKey, ...typedData } = parameters;
26089
26063
  return await sign({
@@ -26093,7 +26067,7 @@ async function signTypedData(parameters) {
26093
26067
  });
26094
26068
  }
26095
26069
 
26096
- // ../../node_modules/.bun/viem@2.52.2+336253948d369456/node_modules/viem/_esm/accounts/privateKeyToAccount.js
26070
+ // node_modules/viem/_esm/accounts/privateKeyToAccount.js
26097
26071
  function privateKeyToAccount(privateKey, options = {}) {
26098
26072
  const { nonceManager: nonceManager2 } = options;
26099
26073
  const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));
@@ -26167,26 +26141,8 @@ var newAgentAccount = async (file = defaultKeyFile()) => {
26167
26141
  return account;
26168
26142
  };
26169
26143
  var adoptPendingKey = (file) => rename(pendingKeyFile(file), file);
26170
- // ../hyperliquid-orders/src/trade.ts
26171
- var OUTCOME_PRICE_DECIMALS = 5;
26172
- // ../hyperliquid-orders/src/plan.ts
26173
- var AGENT_KEY_METHODS = [
26174
- "order",
26175
- "cancel",
26176
- "modify",
26177
- "updateLeverage",
26178
- "updateIsolatedMargin",
26179
- "vaultTransfer"
26180
- ];
26181
- var USER_SIGNED_METHODS = [
26182
- "approveAgent",
26183
- "approveBuilderFee",
26184
- "withdraw3",
26185
- "usdClassTransfer"
26186
- ];
26187
- var MAX_AGENT_VALIDITY_MS = 180 * 86400000;
26188
- var OUTCOME_PRICE_SCALE = 10 ** OUTCOME_PRICE_DECIMALS;
26189
- // ../hyperliquid-orders/src/hip4/coinId.ts
26144
+
26145
+ // src/shared/coinId.ts
26190
26146
  var yesCoinId = (outcomeId) => `#${outcomeId * 10}`;
26191
26147
  var noCoinId = (outcomeId) => `#${outcomeId * 10 + 1}`;
26192
26148
  var stripOutcomePrefix = (coin) => {
@@ -26204,7 +26160,22 @@ var outcomeAssetId = (coin) => {
26204
26160
  return null;
26205
26161
  return HIP4_ASSET_INDEX_OFFSET + n;
26206
26162
  };
26207
- // ../../node_modules/.bun/valibot@1.3.1+1fb4c65d43e298b9/node_modules/valibot/dist/index.mjs
26163
+ // src/shared/planTypes.ts
26164
+ var AGENT_KEY_METHODS = [
26165
+ "order",
26166
+ "cancel",
26167
+ "modify",
26168
+ "updateLeverage",
26169
+ "updateIsolatedMargin",
26170
+ "vaultTransfer"
26171
+ ];
26172
+ var USER_SIGNED_METHODS = [
26173
+ "approveAgent",
26174
+ "approveBuilderFee",
26175
+ "withdraw3",
26176
+ "usdClassTransfer"
26177
+ ];
26178
+ // node_modules/valibot/dist/index.mjs
26208
26179
  var store$4;
26209
26180
  function getGlobalConfig(config$1) {
26210
26181
  return {
@@ -27172,7 +27143,7 @@ function summarize(issues) {
27172
27143
  return summary;
27173
27144
  }
27174
27145
 
27175
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/_base.js
27146
+ // node_modules/@nktkas/hyperliquid/esm/_base.js
27176
27147
  class HyperliquidError extends Error {
27177
27148
  constructor(message, options) {
27178
27149
  super(message, options);
@@ -27197,7 +27168,7 @@ function parse5(schema, input) {
27197
27168
  }
27198
27169
  }
27199
27170
 
27200
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/transport/_base.js
27171
+ // node_modules/@nktkas/hyperliquid/esm/transport/_base.js
27201
27172
  class TransportError extends HyperliquidError {
27202
27173
  constructor(message, options) {
27203
27174
  super(message, options);
@@ -27205,7 +27176,7 @@ class TransportError extends HyperliquidError {
27205
27176
  }
27206
27177
  }
27207
27178
 
27208
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/transport/_polyfills.js
27179
+ // node_modules/@nktkas/hyperliquid/esm/transport/_polyfills.js
27209
27180
  var DOMException_ = /* @__PURE__ */ (() => {
27210
27181
  return globalThis.DOMException || class DOMExceptionPolyfill extends Error {
27211
27182
  constructor(message = "", name = "Error") {
@@ -27235,7 +27206,7 @@ var AbortSignal_ = /* @__PURE__ */ (() => {
27235
27206
  };
27236
27207
  })();
27237
27208
 
27238
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/transport/http/mod.js
27209
+ // node_modules/@nktkas/hyperliquid/esm/transport/http/mod.js
27239
27210
  var MAINNET_API_URL = "https://api.hyperliquid.xyz";
27240
27211
  var TESTNET_API_URL = "https://api.hyperliquid-testnet.xyz";
27241
27212
  var MAINNET_RPC_URL = "https://rpc.hyperliquid.xyz";
@@ -27287,20 +27258,16 @@ class HttpTransport {
27287
27258
  }, this.fetchOptions, { signal });
27288
27259
  const response = await fetch(url2, init);
27289
27260
  if (!response.ok || !response.headers.get("Content-Type")?.includes("application/json")) {
27290
- const clone2 = response.clone();
27261
+ const clone3 = response.clone();
27291
27262
  const body2 = await response.text().catch(() => {
27292
27263
  return;
27293
27264
  });
27294
- throw new HttpRequestError2({ response: clone2, message: body2 });
27265
+ throw new HttpRequestError2({ response: clone3, message: body2 });
27295
27266
  }
27267
+ const clone2 = response.clone();
27296
27268
  const body = await response.json();
27297
27269
  if (body?.type === "error") {
27298
- const unreadResponse = new Response(JSON.stringify(body), {
27299
- status: response.status,
27300
- statusText: response.statusText,
27301
- headers: response.headers
27302
- });
27303
- throw new HttpRequestError2({ response: unreadResponse, message: body?.message });
27270
+ throw new HttpRequestError2({ response: clone2, message: body?.message });
27304
27271
  }
27305
27272
  return body;
27306
27273
  } catch (error2) {
@@ -27338,12 +27305,12 @@ class HttpTransport {
27338
27305
  }
27339
27306
  }
27340
27307
 
27341
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/utils/_format.js
27308
+ // node_modules/@nktkas/hyperliquid/esm/utils/_format.js
27342
27309
  function formatDecimalString(value) {
27343
27310
  return value.trim().replace(/^(-?)0+(?=\d)/, "$1").replace(/\.0*$|(\.\d+?)0+$/, "$1").replace(/^(-?)\./, "$10.").replace(/^-?$/, "0").replace(/^-0$/, "0");
27344
27311
  }
27345
27312
 
27346
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/_schemas.js
27313
+ // node_modules/@nktkas/hyperliquid/esm/api/_schemas.js
27347
27314
  var UnsignedDecimal = /* @__PURE__ */ (() => {
27348
27315
  return pipe2(union2([string4(), number4()]), toString(), string4(), transform2((value) => formatDecimalString(value)), regex(/^[0-9]+(\.[0-9]+)?$/));
27349
27316
  })();
@@ -27369,7 +27336,7 @@ var Percent = /* @__PURE__ */ (() => {
27369
27336
  return pipe2(string4(), regex(/^[0-9]+(\.[0-9]+)?%$/), transform2((value) => value));
27370
27337
  })();
27371
27338
 
27372
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/commonSchemas.js
27339
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/commonSchemas.js
27373
27340
  var SignatureSchema = /* @__PURE__ */ (() => {
27374
27341
  return object2({
27375
27342
  r: pipe2(Hex, length(66)),
@@ -27381,7 +27348,7 @@ var HyperliquidChainSchema = /* @__PURE__ */ (() => {
27381
27348
  return picklist(["Mainnet", "Testnet"]);
27382
27349
  })();
27383
27350
 
27384
- // ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/_u64.js
27351
+ // node_modules/@noble/hashes/_u64.js
27385
27352
  var U32_MASK642 = /* @__PURE__ */ (() => BigInt(2 ** 32 - 1))();
27386
27353
  var _32n2 = /* @__PURE__ */ BigInt(32);
27387
27354
  function fromBig2(n, le = false) {
@@ -27400,12 +27367,12 @@ function split2(lst, le = false) {
27400
27367
  return [Ah, Al];
27401
27368
  }
27402
27369
 
27403
- // ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/utils.js
27404
- function isBytes4(a) {
27370
+ // node_modules/@noble/hashes/utils.js
27371
+ function isBytes5(a) {
27405
27372
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
27406
27373
  }
27407
27374
  var atitle = (title) => title ? `"${title}" ` : "";
27408
- function anumber2(n, title = "") {
27375
+ function anumber3(n, title = "") {
27409
27376
  if (typeof n !== "number")
27410
27377
  throw new TypeError(atitle(title) + "expected number, got " + typeof n);
27411
27378
  if (!Number.isSafeInteger(n) || n < 0)
@@ -27417,12 +27384,12 @@ function abool2(value, title = "") {
27417
27384
  throw new TypeError(atitle(title) + "expected boolean, got type=" + typeof value);
27418
27385
  return value;
27419
27386
  }
27420
- function abytes3(value, length2, title = "") {
27421
- if (isBytes4(value) && (length2 === undefined || value.length === length2))
27387
+ function abytes4(value, length2, title = "") {
27388
+ if (isBytes5(value) && (length2 === undefined || value.length === length2))
27422
27389
  return value;
27423
27390
  if (length2 !== undefined)
27424
- anumber2(length2, "length");
27425
- const bytes = isBytes4(value);
27391
+ anumber3(length2, "length");
27392
+ const bytes = isBytes5(value);
27426
27393
  const ofLen = length2 !== undefined ? ` of length ${length2}` : "";
27427
27394
  const got = bytes ? `length=${value.length}` : `type=${typeof value}`;
27428
27395
  const message = atitle(title) + "expected Uint8Array" + ofLen + ", got " + got;
@@ -27434,14 +27401,22 @@ var aobject = (value, label) => {
27434
27401
  if (value === null || typeof value !== "object" || Array.isArray(value))
27435
27402
  throw new TypeError((label === "object" ? "" : `"${label}" `) + "expected object, got type=" + typeof value);
27436
27403
  };
27437
- function aexists2(instance, checkFinished = true) {
27404
+ var aopts = (value, label) => {
27405
+ aobject(value, label);
27406
+ const proto = Object.getPrototypeOf(value);
27407
+ if (proto !== Object.prototype && proto !== null)
27408
+ throw new TypeError(`"${label}" expected plain object`);
27409
+ if (Object.hasOwn(value, "__proto__"))
27410
+ throw new TypeError(`"${label}.__proto__" is not allowed`);
27411
+ };
27412
+ function aexists3(instance, checkFinished = true) {
27438
27413
  if (instance.destroyed)
27439
27414
  throw new Error("hash was destroyed");
27440
27415
  if (checkFinished && instance.finished)
27441
27416
  throw new Error("digest() was already called");
27442
27417
  }
27443
- function aoutput2(out, instance) {
27444
- abytes3(out, undefined, "output");
27418
+ function aoutput3(out, instance) {
27419
+ abytes4(out, undefined, "output");
27445
27420
  const min = instance.outputLen;
27446
27421
  if (!(out.length >= min)) {
27447
27422
  throw new RangeError('"output" expected length >= ' + min);
@@ -27450,7 +27425,7 @@ function aoutput2(out, instance) {
27450
27425
  function u322(arr) {
27451
27426
  return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
27452
27427
  }
27453
- function clean2(...arrays) {
27428
+ function clean3(...arrays) {
27454
27429
  for (let i = 0;i < arrays.length; i++) {
27455
27430
  arrays[i].fill(0);
27456
27431
  }
@@ -27469,7 +27444,7 @@ var swap32IfBE2 = isLE2 ? (u) => u : byteSwap322;
27469
27444
  var hasHexBuiltin2 = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
27470
27445
  var hexes3 = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
27471
27446
  function bytesToHex4(bytes) {
27472
- abytes3(bytes);
27447
+ abytes4(bytes);
27473
27448
  if (hasHexBuiltin2)
27474
27449
  return bytes.toHex();
27475
27450
  let hex = "";
@@ -27513,7 +27488,7 @@ function concatBytes5(...arrays) {
27513
27488
  let sum = 0;
27514
27489
  for (let i = 0;i < arrays.length; i++) {
27515
27490
  const a = arrays[i];
27516
- abytes3(a);
27491
+ abytes4(a);
27517
27492
  sum += a.length;
27518
27493
  }
27519
27494
  const res = new Uint8Array(sum);
@@ -27525,13 +27500,13 @@ function concatBytes5(...arrays) {
27525
27500
  return res;
27526
27501
  }
27527
27502
  function checkOpts(defaults, opts, title = "opts") {
27528
- aobject(defaults, "defaults");
27503
+ aopts(defaults, "defaults");
27529
27504
  if (opts !== undefined)
27530
- aobject(opts, title);
27531
- const merged = Object.assign(defaults, opts);
27505
+ aopts(opts, title);
27506
+ const merged = Object.assign(Object.create(null), defaults, opts);
27532
27507
  return merged;
27533
27508
  }
27534
- function createHasher2(hashCons, info = {}) {
27509
+ function createHasher3(hashCons, info = {}) {
27535
27510
  if (typeof hashCons !== "function")
27536
27511
  throw new TypeError('"hashCons" expected function, got type=' + typeof hashCons);
27537
27512
  info = checkOpts({}, info, "info");
@@ -27545,7 +27520,7 @@ function createHasher2(hashCons, info = {}) {
27545
27520
  return Object.freeze(hashC);
27546
27521
  }
27547
27522
 
27548
- // ../../node_modules/.bun/@noble+hashes@2.3.0/node_modules/@noble/hashes/sha3.js
27523
+ // node_modules/@noble/hashes/sha3.js
27549
27524
  var _0n7 = BigInt(0);
27550
27525
  var _1n7 = BigInt(1);
27551
27526
  var _2n5 = BigInt(2);
@@ -27582,7 +27557,7 @@ function keccakP2(s, rounds = 24) {
27582
27557
  throw new TypeError('"s" expected Uint32Array(50), got type=' + typeof s);
27583
27558
  if (s.length !== 50)
27584
27559
  throw new RangeError('"s" expected Uint32Array(50), got length=' + s.length);
27585
- anumber2(rounds, "rounds");
27560
+ anumber3(rounds, "rounds");
27586
27561
  if (rounds < 1 || rounds > 24)
27587
27562
  throw new Error('"rounds" expected integer 1..24');
27588
27563
  for (let round = 24 - rounds;round < 24; round++) {
@@ -27628,7 +27603,7 @@ function keccakP2(s, rounds = 24) {
27628
27603
  s[0] ^= SHA3_IOTA_H2[round];
27629
27604
  s[1] ^= SHA3_IOTA_L2[round];
27630
27605
  }
27631
- clean2(B);
27606
+ clean3(B);
27632
27607
  }
27633
27608
 
27634
27609
  class Keccak2 {
@@ -27645,9 +27620,9 @@ class Keccak2 {
27645
27620
  enableXOF = false;
27646
27621
  rounds;
27647
27622
  constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
27648
- anumber2(blockLen, "blockLen");
27649
- anumber2(suffix, "suffix");
27650
- anumber2(rounds, "rounds");
27623
+ anumber3(blockLen, "blockLen");
27624
+ anumber3(suffix, "suffix");
27625
+ anumber3(rounds, "rounds");
27651
27626
  abool2(enableXOF, "enableXOF");
27652
27627
  this.blockLen = blockLen;
27653
27628
  this.suffix = suffix;
@@ -27655,7 +27630,7 @@ class Keccak2 {
27655
27630
  this.enableXOF = enableXOF;
27656
27631
  this.canXOF = enableXOF;
27657
27632
  this.rounds = rounds;
27658
- anumber2(outputLen, "outputLen");
27633
+ anumber3(outputLen, "outputLen");
27659
27634
  if (!(0 < blockLen && blockLen < 200))
27660
27635
  throw new Error('"blockLen" must be 1..199');
27661
27636
  this.state = new Uint8Array(200);
@@ -27672,8 +27647,8 @@ class Keccak2 {
27672
27647
  this.pos = 0;
27673
27648
  }
27674
27649
  update(data) {
27675
- aexists2(this);
27676
- abytes3(data);
27650
+ aexists3(this);
27651
+ abytes4(data);
27677
27652
  const { blockLen, state, state32 } = this;
27678
27653
  const len = data.length;
27679
27654
  const canUseU32 = blockLen % 4 === 0 && data.byteOffset % 4 === 0;
@@ -27708,8 +27683,8 @@ class Keccak2 {
27708
27683
  this.keccak();
27709
27684
  }
27710
27685
  writeInto(out) {
27711
- aexists2(this, false);
27712
- abytes3(out);
27686
+ aexists3(this, false);
27687
+ abytes4(out);
27713
27688
  this.finish();
27714
27689
  const bufferOut = this.state;
27715
27690
  const { blockLen } = this;
@@ -27729,11 +27704,11 @@ class Keccak2 {
27729
27704
  return this.writeInto(out);
27730
27705
  }
27731
27706
  xof(bytes) {
27732
- anumber2(bytes);
27707
+ anumber3(bytes);
27733
27708
  return this.xofInto(new Uint8Array(bytes));
27734
27709
  }
27735
27710
  digestInto(out) {
27736
- aoutput2(out, this);
27711
+ aoutput3(out, this);
27737
27712
  if (this.finished)
27738
27713
  throw new Error("digest() was already called");
27739
27714
  this.writeInto(out.length === this.outputLen ? out : out.subarray(0, this.outputLen));
@@ -27746,7 +27721,7 @@ class Keccak2 {
27746
27721
  }
27747
27722
  destroy() {
27748
27723
  this.destroyed = true;
27749
- clean2(this.state);
27724
+ clean3(this.state);
27750
27725
  }
27751
27726
  _cloneInto(to) {
27752
27727
  const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
@@ -27765,10 +27740,10 @@ class Keccak2 {
27765
27740
  return to;
27766
27741
  }
27767
27742
  }
27768
- var genKeccak = (suffix, blockLen, outputLen, info = {}) => createHasher2(() => new Keccak2(blockLen, suffix, outputLen), info);
27743
+ var genKeccak = (suffix, blockLen, outputLen, info = {}) => createHasher3(() => new Keccak2(blockLen, suffix, outputLen), info);
27769
27744
  var keccak_2562 = /* @__PURE__ */ genKeccak(1, 136, 32);
27770
27745
 
27771
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/bytes/1.0.6/concat.js
27746
+ // node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/bytes/1.0.6/concat.js
27772
27747
  function concat3(buffers) {
27773
27748
  let length2 = 0;
27774
27749
  for (const buffer of buffers) {
@@ -27783,7 +27758,7 @@ function concat3(buffers) {
27783
27758
  return output;
27784
27759
  }
27785
27760
 
27786
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/msgpack/1.0.3/encode.js
27761
+ // node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/msgpack/1.0.3/encode.js
27787
27762
  var FOUR_BITS = 16;
27788
27763
  var FIVE_BITS = 32;
27789
27764
  var SEVEN_BITS = 128;
@@ -27978,7 +27953,7 @@ function encodeSlice(object3, byteParts) {
27978
27953
  throw new Error("Cannot safely encode value into messagepack");
27979
27954
  }
27980
27955
 
27981
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/signing/_abstractWallet.js
27956
+ // node_modules/@nktkas/hyperliquid/esm/signing/_abstractWallet.js
27982
27957
  function isEthersV6Signer(wallet) {
27983
27958
  return "signTypedData" in wallet && typeof wallet.signTypedData === "function" && wallet.signTypedData.length === 3 && "getAddress" in wallet && typeof wallet.getAddress === "function";
27984
27959
  }
@@ -27999,7 +27974,7 @@ class AbstractWalletError extends HyperliquidError {
27999
27974
  }
28000
27975
  }
28001
27976
  async function signTypedData3(args) {
28002
- const { wallet, domain, types: types2, primaryType, message } = args;
27977
+ const { wallet, domain, types, primaryType, message } = args;
28003
27978
  const isViemWallet = isViemJsonRpcAccount(wallet) || isViemLocalAccount(wallet);
28004
27979
  const isEthersV6 = isEthersV6Signer(wallet);
28005
27980
  const isEthersV5 = isEthersV5Signer(wallet);
@@ -28015,15 +27990,15 @@ async function signTypedData3(args) {
28015
27990
  { name: "chainId", type: "uint256" },
28016
27991
  { name: "verifyingContract", type: "address" }
28017
27992
  ],
28018
- ...types2
27993
+ ...types
28019
27994
  },
28020
27995
  primaryType,
28021
27996
  message
28022
27997
  });
28023
27998
  } else if (isEthersV6) {
28024
- signature = await wallet.signTypedData(domain, types2, message);
27999
+ signature = await wallet.signTypedData(domain, types, message);
28025
28000
  } else if (isEthersV5) {
28026
- signature = await wallet._signTypedData(domain, types2, message);
28001
+ signature = await wallet._signTypedData(domain, types, message);
28027
28002
  } else {
28028
28003
  throw new AbstractWalletError("Failed to sign typed data: unknown wallet type");
28029
28004
  }
@@ -28086,7 +28061,7 @@ async function getWalletAddress(wallet) {
28086
28061
  throw new AbstractWalletError("Failed to get wallet address: unknown wallet type");
28087
28062
  }
28088
28063
 
28089
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/signing/mod.js
28064
+ // node_modules/@nktkas/hyperliquid/esm/signing/mod.js
28090
28065
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
28091
28066
  function createL1ActionHash(args) {
28092
28067
  const { action, nonce, vaultAddress, expiresAfter } = args;
@@ -28157,15 +28132,15 @@ async function signL1Action(args) {
28157
28132
  });
28158
28133
  }
28159
28134
  async function signUserSignedAction(args) {
28160
- let { wallet, action, types: types2 } = args;
28161
- const primaryType = Object.keys(types2)[0];
28135
+ let { wallet, action, types } = args;
28136
+ const primaryType = Object.keys(types)[0];
28162
28137
  if (action.type === "approveAgent" && !action.agentName) {
28163
28138
  action = { ...action, agentName: "" };
28164
28139
  }
28165
28140
  if ("payloadMultiSigUser" in action && "outerSigner" in action) {
28166
- const primaryTypeArray = types2[primaryType];
28167
- types2 = {
28168
- ...types2,
28141
+ const primaryTypeArray = types[primaryType];
28142
+ types = {
28143
+ ...types,
28169
28144
  [primaryType]: [
28170
28145
  primaryTypeArray[0],
28171
28146
  { name: "payloadMultiSigUser", type: "address" },
@@ -28174,7 +28149,7 @@ async function signUserSignedAction(args) {
28174
28149
  ]
28175
28150
  };
28176
28151
  }
28177
- const knownKeys = new Set(types2[primaryType].map((f) => f.name));
28152
+ const knownKeys = new Set(types[primaryType].map((f) => f.name));
28178
28153
  const message = Object.fromEntries(Object.entries(action).filter(([k]) => knownKeys.has(k)));
28179
28154
  return await signTypedData3({
28180
28155
  wallet,
@@ -28184,7 +28159,7 @@ async function signUserSignedAction(args) {
28184
28159
  chainId: parseInt(action.signatureChainId),
28185
28160
  verifyingContract: ZERO_ADDRESS
28186
28161
  },
28187
- types: types2,
28162
+ types,
28188
28163
  primaryType,
28189
28164
  message
28190
28165
  });
@@ -28217,7 +28192,7 @@ async function signMultiSigAction(args) {
28217
28192
  });
28218
28193
  }
28219
28194
 
28220
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/_nonce.js
28195
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/_nonce.js
28221
28196
  class NonceManager {
28222
28197
  _map = new Map;
28223
28198
  getNonce(key) {
@@ -28238,7 +28213,7 @@ class NonceManager {
28238
28213
  }
28239
28214
  var globalNonceManager = /* @__PURE__ */ new NonceManager;
28240
28215
 
28241
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/async/1.1.1/unstable_semaphore.js
28216
+ // node_modules/@nktkas/hyperliquid/esm/deps/jsr.io/@std/async/1.1.1/unstable_semaphore.js
28242
28217
  class Semaphore {
28243
28218
  #max;
28244
28219
  #count;
@@ -28284,7 +28259,7 @@ class Semaphore {
28284
28259
  }
28285
28260
  }
28286
28261
 
28287
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/_semaphore.js
28262
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/_semaphore.js
28288
28263
  class RefCountedRegistry {
28289
28264
  _map = new Map;
28290
28265
  _factory;
@@ -28321,7 +28296,7 @@ async function withLock(key, fn) {
28321
28296
  }
28322
28297
  }
28323
28298
 
28324
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/errors.js
28299
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/errors.js
28325
28300
  class ApiRequestError extends HyperliquidError {
28326
28301
  response;
28327
28302
  constructor(response) {
@@ -28375,7 +28350,7 @@ function assertSuccessResponse(response) {
28375
28350
  }
28376
28351
  }
28377
28352
 
28378
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/execute.js
28353
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/_base/execute.js
28379
28354
  async function executeL1Action(config2, action, options) {
28380
28355
  const { transport } = config2;
28381
28356
  const leader = getLeader(config2);
@@ -28386,21 +28361,17 @@ async function executeL1Action(config2, action, options) {
28386
28361
  const vaultAddress = parse5(optional2(Address), options?.vaultAddress ?? config2.defaultVaultAddress);
28387
28362
  const expiresAfter = parse5(optional2(UnsignedInteger), options?.expiresAfter ?? (typeof config2.defaultExpiresAfter === "number" ? config2.defaultExpiresAfter : await config2.defaultExpiresAfter?.()));
28388
28363
  const signal = options?.signal;
28389
- config2.beforeSign?.(action);
28390
- let finalAction, signature;
28391
- if ("wallet" in config2) {
28392
- finalAction = action;
28393
- signature = await signL1Action({
28364
+ const [finalAction, signature] = "wallet" in config2 ? [
28365
+ action,
28366
+ await signL1Action({
28394
28367
  wallet: leader,
28395
28368
  action,
28396
28369
  nonce,
28397
28370
  isTestnet: transport.isTestnet,
28398
28371
  vaultAddress,
28399
28372
  expiresAfter
28400
- });
28401
- } else {
28402
- [finalAction, signature] = await signMultiSigL1(config2, action, walletAddress, nonce, vaultAddress, expiresAfter);
28403
- }
28373
+ })
28374
+ ] : await signMultiSigL1(config2, action, walletAddress, nonce, vaultAddress, expiresAfter);
28404
28375
  const response = await transport.request("exchange", {
28405
28376
  action: finalAction,
28406
28377
  signature,
@@ -28412,12 +28383,12 @@ async function executeL1Action(config2, action, options) {
28412
28383
  return response;
28413
28384
  });
28414
28385
  }
28415
- function getNonceFieldName(types2) {
28416
- const primaryType = Object.keys(types2)[0];
28417
- const field = types2[primaryType].find((f) => f.name === "nonce" || f.name === "time");
28386
+ function getNonceFieldName(types) {
28387
+ const primaryType = Object.keys(types)[0];
28388
+ const field = types[primaryType].find((f) => f.name === "nonce" || f.name === "time");
28418
28389
  return field?.name ?? "nonce";
28419
28390
  }
28420
- async function executeUserSignedAction(config2, action, types2, options) {
28391
+ async function executeUserSignedAction(config2, action, types, options) {
28421
28392
  const { transport } = config2;
28422
28393
  const leader = getLeader(config2);
28423
28394
  const walletAddress = await getWalletAddress(leader);
@@ -28426,7 +28397,7 @@ async function executeUserSignedAction(config2, action, types2, options) {
28426
28397
  const nonce = await (config2.nonceManager?.(walletAddress) ?? globalNonceManager.getNonce(key));
28427
28398
  const signal = options?.signal;
28428
28399
  const { type, ...restAction } = action;
28429
- const nonceFieldName = getNonceFieldName(types2);
28400
+ const nonceFieldName = getNonceFieldName(types);
28430
28401
  const fullAction = {
28431
28402
  type,
28432
28403
  signatureChainId: await getSignatureChainId(config2),
@@ -28434,13 +28405,7 @@ async function executeUserSignedAction(config2, action, types2, options) {
28434
28405
  ...restAction,
28435
28406
  [nonceFieldName]: nonce
28436
28407
  };
28437
- let finalAction, signature;
28438
- if ("wallet" in config2) {
28439
- finalAction = fullAction;
28440
- signature = await signUserSignedAction({ wallet: leader, action: fullAction, types: types2 });
28441
- } else {
28442
- [finalAction, signature] = await signMultiSigUserSigned(config2, fullAction, types2, walletAddress, nonce);
28443
- }
28408
+ const [finalAction, signature] = "wallet" in config2 ? [fullAction, await signUserSignedAction({ wallet: leader, action: fullAction, types })] : await signMultiSigUserSigned(config2, fullAction, types, walletAddress, nonce);
28444
28409
  const response = await transport.request("exchange", {
28445
28410
  action: finalAction,
28446
28411
  signature,
@@ -28492,7 +28457,7 @@ async function signMultiSigL1(config2, action, outerSigner, nonce, vaultAddress,
28492
28457
  });
28493
28458
  return [multiSigAction, signature];
28494
28459
  }
28495
- async function signMultiSigUserSigned(config2, action, types2, outerSigner, nonce) {
28460
+ async function signMultiSigUserSigned(config2, action, types, outerSigner, nonce) {
28496
28461
  const { signers, multiSigUser, transport: { isTestnet } } = config2;
28497
28462
  const multiSigUser_ = parse5(Address, multiSigUser);
28498
28463
  const outerSigner_ = parse5(Address, outerSigner);
@@ -28504,7 +28469,7 @@ async function signMultiSigUserSigned(config2, action, types2, outerSigner, nonc
28504
28469
  outerSigner: outerSigner_,
28505
28470
  ...action
28506
28471
  },
28507
- types: types2
28472
+ types
28508
28473
  });
28509
28474
  return trimSignature(signature2);
28510
28475
  }));
@@ -28537,7 +28502,7 @@ async function getSignatureChainId(config2) {
28537
28502
  return getWalletChainId(getLeader(config2));
28538
28503
  }
28539
28504
 
28540
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/agentEnableDexAbstraction.js
28505
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/agentEnableDexAbstraction.js
28541
28506
  var AgentEnableDexAbstractionRequest = /* @__PURE__ */ (() => {
28542
28507
  return object2({
28543
28508
  action: object2({
@@ -28556,7 +28521,7 @@ function agentEnableDexAbstraction(config2, opts) {
28556
28521
  return executeL1Action(config2, action, opts);
28557
28522
  }
28558
28523
 
28559
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/agentSetAbstraction.js
28524
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/agentSetAbstraction.js
28560
28525
  var AgentSetAbstractionRequest = /* @__PURE__ */ (() => {
28561
28526
  return object2({
28562
28527
  action: object2({
@@ -28576,7 +28541,7 @@ function agentSetAbstraction(config2, params, opts) {
28576
28541
  return executeL1Action(config2, action, opts);
28577
28542
  }
28578
28543
 
28579
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/approveAgent.js
28544
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/approveAgent.js
28580
28545
  var ApproveAgentRequest = /* @__PURE__ */ (() => {
28581
28546
  return object2({
28582
28547
  action: object2({
@@ -28613,7 +28578,7 @@ function approveAgent(config2, params, opts) {
28613
28578
  return executeUserSignedAction(config2, action, ApproveAgentTypes, opts);
28614
28579
  }
28615
28580
 
28616
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/approveBuilderFee.js
28581
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/approveBuilderFee.js
28617
28582
  var ApproveBuilderFeeRequest = /* @__PURE__ */ (() => {
28618
28583
  return object2({
28619
28584
  action: object2({
@@ -28644,7 +28609,7 @@ function approveBuilderFee(config2, params, opts) {
28644
28609
  return executeUserSignedAction(config2, action, ApproveBuilderFeeTypes, opts);
28645
28610
  }
28646
28611
 
28647
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/batchModify.js
28612
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/batchModify.js
28648
28613
  var BatchModifyRequest = /* @__PURE__ */ (() => {
28649
28614
  return object2({
28650
28615
  action: object2({
@@ -28689,7 +28654,7 @@ function batchModify(config2, params, opts) {
28689
28654
  return executeL1Action(config2, action, opts);
28690
28655
  }
28691
28656
 
28692
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/borrowLend.js
28657
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/borrowLend.js
28693
28658
  var BorrowLendRequest = /* @__PURE__ */ (() => {
28694
28659
  return object2({
28695
28660
  action: object2({
@@ -28712,7 +28677,7 @@ function borrowLend(config2, params, opts) {
28712
28677
  return executeL1Action(config2, action, opts);
28713
28678
  }
28714
28679
 
28715
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cancel.js
28680
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cancel.js
28716
28681
  var CancelRequest = /* @__PURE__ */ (() => {
28717
28682
  return object2({
28718
28683
  action: object2({
@@ -28736,7 +28701,7 @@ function cancel(config2, params, opts) {
28736
28701
  return executeL1Action(config2, action, opts);
28737
28702
  }
28738
28703
 
28739
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cancelByCloid.js
28704
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cancelByCloid.js
28740
28705
  var CancelByCloidRequest = /* @__PURE__ */ (() => {
28741
28706
  return object2({
28742
28707
  action: object2({
@@ -28760,7 +28725,7 @@ function cancelByCloid(config2, params, opts) {
28760
28725
  return executeL1Action(config2, action, opts);
28761
28726
  }
28762
28727
 
28763
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cDeposit.js
28728
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cDeposit.js
28764
28729
  var CDepositRequest = /* @__PURE__ */ (() => {
28765
28730
  return object2({
28766
28731
  action: object2({
@@ -28789,7 +28754,7 @@ function cDeposit(config2, params, opts) {
28789
28754
  return executeUserSignedAction(config2, action, CDepositTypes, opts);
28790
28755
  }
28791
28756
 
28792
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/claimRewards.js
28757
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/claimRewards.js
28793
28758
  var ClaimRewardsRequest = /* @__PURE__ */ (() => {
28794
28759
  return object2({
28795
28760
  action: object2({
@@ -28808,7 +28773,7 @@ function claimRewards(config2, opts) {
28808
28773
  return executeL1Action(config2, action, opts);
28809
28774
  }
28810
28775
 
28811
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/convertToMultiSigUser.js
28776
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/convertToMultiSigUser.js
28812
28777
  var ConvertToMultiSigUserRequestSignersSchema = /* @__PURE__ */ (() => {
28813
28778
  return nullable2(object2({
28814
28779
  authorizedUsers: array2(Address),
@@ -28846,7 +28811,7 @@ function convertToMultiSigUser(config2, params, opts) {
28846
28811
  return executeUserSignedAction(config2, action, ConvertToMultiSigUserTypes, opts);
28847
28812
  }
28848
28813
 
28849
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/createSubAccount.js
28814
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/createSubAccount.js
28850
28815
  var CreateSubAccountRequest = /* @__PURE__ */ (() => {
28851
28816
  return object2({
28852
28817
  action: object2({
@@ -28866,7 +28831,7 @@ function createSubAccount(config2, params, opts) {
28866
28831
  return executeL1Action(config2, action, opts);
28867
28832
  }
28868
28833
 
28869
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/createVault.js
28834
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/createVault.js
28870
28835
  var CreateVaultRequest = /* @__PURE__ */ (() => {
28871
28836
  return object2({
28872
28837
  action: object2({
@@ -28889,7 +28854,7 @@ function createVault(config2, params, opts) {
28889
28854
  return executeL1Action(config2, action, opts);
28890
28855
  }
28891
28856
 
28892
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cSignerAction.js
28857
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cSignerAction.js
28893
28858
  var CSignerActionRequest = /* @__PURE__ */ (() => {
28894
28859
  return object2({
28895
28860
  action: variant("type", [
@@ -28915,7 +28880,7 @@ function cSignerAction(config2, params, opts) {
28915
28880
  return executeL1Action(config2, action, opts);
28916
28881
  }
28917
28882
 
28918
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cValidatorAction.js
28883
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cValidatorAction.js
28919
28884
  var CValidatorActionRequest = /* @__PURE__ */ (() => {
28920
28885
  return object2({
28921
28886
  action: variant("type", [
@@ -28968,7 +28933,7 @@ function cValidatorAction(config2, params, opts) {
28968
28933
  return executeL1Action(config2, action, opts);
28969
28934
  }
28970
28935
 
28971
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cWithdraw.js
28936
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/cWithdraw.js
28972
28937
  var CWithdrawRequest = /* @__PURE__ */ (() => {
28973
28938
  return object2({
28974
28939
  action: object2({
@@ -28997,7 +28962,7 @@ function cWithdraw(config2, params, opts) {
28997
28962
  return executeUserSignedAction(config2, action, CWithdrawTypes, opts);
28998
28963
  }
28999
28964
 
29000
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/evmUserModify.js
28965
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/evmUserModify.js
29001
28966
  var EvmUserModifyRequest = /* @__PURE__ */ (() => {
29002
28967
  return object2({
29003
28968
  action: object2({
@@ -29017,7 +28982,7 @@ function evmUserModify(config2, params, opts) {
29017
28982
  return executeL1Action(config2, action, opts);
29018
28983
  }
29019
28984
 
29020
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/linkStakingUser.js
28985
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/linkStakingUser.js
29021
28986
  var LinkStakingUserRequest = /* @__PURE__ */ (() => {
29022
28987
  return object2({
29023
28988
  action: object2({
@@ -29048,7 +29013,7 @@ function linkStakingUser(config2, params, opts) {
29048
29013
  return executeUserSignedAction(config2, action, LinkStakingUserTypes, opts);
29049
29014
  }
29050
29015
 
29051
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/modify.js
29016
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/modify.js
29052
29017
  var ModifyRequest = /* @__PURE__ */ (() => {
29053
29018
  return object2({
29054
29019
  action: object2({
@@ -29091,7 +29056,7 @@ function modify(config2, params, opts) {
29091
29056
  return executeL1Action(config2, action, opts);
29092
29057
  }
29093
29058
 
29094
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/noop.js
29059
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/noop.js
29095
29060
  var NoopRequest = /* @__PURE__ */ (() => {
29096
29061
  return object2({
29097
29062
  action: object2({
@@ -29110,7 +29075,7 @@ function noop(config2, opts) {
29110
29075
  return executeL1Action(config2, action, opts);
29111
29076
  }
29112
29077
 
29113
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/order.js
29078
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/order.js
29114
29079
  var OrderRequest = /* @__PURE__ */ (() => {
29115
29080
  return object2({
29116
29081
  action: object2({
@@ -29157,7 +29122,7 @@ function order(config2, params, opts) {
29157
29122
  return executeL1Action(config2, action, opts);
29158
29123
  }
29159
29124
 
29160
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/perpDeploy.js
29125
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/perpDeploy.js
29161
29126
  var PerpDeployRequest = /* @__PURE__ */ (() => {
29162
29127
  return object2({
29163
29128
  action: variant("type", [
@@ -29288,7 +29253,7 @@ function perpDeploy(config2, params, opts) {
29288
29253
  return executeL1Action(config2, action, opts);
29289
29254
  }
29290
29255
 
29291
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/registerReferrer.js
29256
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/registerReferrer.js
29292
29257
  var RegisterReferrerRequest = /* @__PURE__ */ (() => {
29293
29258
  return object2({
29294
29259
  action: object2({
@@ -29308,7 +29273,7 @@ function registerReferrer(config2, params, opts) {
29308
29273
  return executeL1Action(config2, action, opts);
29309
29274
  }
29310
29275
 
29311
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/reserveRequestWeight.js
29276
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/reserveRequestWeight.js
29312
29277
  var ReserveRequestWeightRequest = /* @__PURE__ */ (() => {
29313
29278
  return object2({
29314
29279
  action: object2({
@@ -29328,7 +29293,7 @@ function reserveRequestWeight(config2, params, opts) {
29328
29293
  return executeL1Action(config2, action, opts);
29329
29294
  }
29330
29295
 
29331
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/scheduleCancel.js
29296
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/scheduleCancel.js
29332
29297
  var ScheduleCancelRequest = /* @__PURE__ */ (() => {
29333
29298
  return object2({
29334
29299
  action: object2({
@@ -29352,7 +29317,7 @@ function scheduleCancel(config2, paramsOrOpts, maybeOpts) {
29352
29317
  return executeL1Action(config2, action, opts);
29353
29318
  }
29354
29319
 
29355
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/sendAsset.js
29320
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/sendAsset.js
29356
29321
  var SendAssetRequest = /* @__PURE__ */ (() => {
29357
29322
  return object2({
29358
29323
  action: object2({
@@ -29391,7 +29356,7 @@ function sendAsset(config2, params, opts) {
29391
29356
  return executeUserSignedAction(config2, action, SendAssetTypes, opts);
29392
29357
  }
29393
29358
 
29394
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/sendToEvmWithData.js
29359
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/sendToEvmWithData.js
29395
29360
  var SendToEvmWithDataRequest = /* @__PURE__ */ (() => {
29396
29361
  return object2({
29397
29362
  action: object2({
@@ -29434,7 +29399,7 @@ function sendToEvmWithData(config2, params, opts) {
29434
29399
  return executeUserSignedAction(config2, action, SendToEvmWithDataTypes, opts);
29435
29400
  }
29436
29401
 
29437
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/setDisplayName.js
29402
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/setDisplayName.js
29438
29403
  var SetDisplayNameRequest = /* @__PURE__ */ (() => {
29439
29404
  return object2({
29440
29405
  action: object2({
@@ -29454,7 +29419,7 @@ function setDisplayName(config2, params, opts) {
29454
29419
  return executeL1Action(config2, action, opts);
29455
29420
  }
29456
29421
 
29457
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/setReferrer.js
29422
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/setReferrer.js
29458
29423
  var SetReferrerRequest = /* @__PURE__ */ (() => {
29459
29424
  return object2({
29460
29425
  action: object2({
@@ -29474,7 +29439,7 @@ function setReferrer(config2, params, opts) {
29474
29439
  return executeL1Action(config2, action, opts);
29475
29440
  }
29476
29441
 
29477
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotDeploy.js
29442
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotDeploy.js
29478
29443
  var SpotDeployRequest = /* @__PURE__ */ (() => {
29479
29444
  return object2({
29480
29445
  action: variant("type", [
@@ -29556,7 +29521,7 @@ function spotDeploy(config2, params, opts) {
29556
29521
  return executeL1Action(config2, action, opts);
29557
29522
  }
29558
29523
 
29559
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotSend.js
29524
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotSend.js
29560
29525
  var SpotSendRequest = /* @__PURE__ */ (() => {
29561
29526
  return object2({
29562
29527
  action: object2({
@@ -29589,7 +29554,7 @@ function spotSend(config2, params, opts) {
29589
29554
  return executeUserSignedAction(config2, action, SpotSendTypes, opts);
29590
29555
  }
29591
29556
 
29592
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotUser.js
29557
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/spotUser.js
29593
29558
  var SpotUserRequest = /* @__PURE__ */ (() => {
29594
29559
  return object2({
29595
29560
  action: object2({
@@ -29611,7 +29576,7 @@ function spotUser(config2, params, opts) {
29611
29576
  return executeL1Action(config2, action, opts);
29612
29577
  }
29613
29578
 
29614
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountModify.js
29579
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountModify.js
29615
29580
  var SubAccountModifyRequest = /* @__PURE__ */ (() => {
29616
29581
  return object2({
29617
29582
  action: object2({
@@ -29632,7 +29597,7 @@ function subAccountModify(config2, params, opts) {
29632
29597
  return executeL1Action(config2, action, opts);
29633
29598
  }
29634
29599
 
29635
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountSpotTransfer.js
29600
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountSpotTransfer.js
29636
29601
  var SubAccountSpotTransferRequest = /* @__PURE__ */ (() => {
29637
29602
  return object2({
29638
29603
  action: object2({
@@ -29655,7 +29620,7 @@ function subAccountSpotTransfer(config2, params, opts) {
29655
29620
  return executeL1Action(config2, action, opts);
29656
29621
  }
29657
29622
 
29658
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountTransfer.js
29623
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/subAccountTransfer.js
29659
29624
  var SubAccountTransferRequest = /* @__PURE__ */ (() => {
29660
29625
  return object2({
29661
29626
  action: object2({
@@ -29677,7 +29642,7 @@ function subAccountTransfer(config2, params, opts) {
29677
29642
  return executeL1Action(config2, action, opts);
29678
29643
  }
29679
29644
 
29680
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/tokenDelegate.js
29645
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/tokenDelegate.js
29681
29646
  var TokenDelegateRequest = /* @__PURE__ */ (() => {
29682
29647
  return object2({
29683
29648
  action: object2({
@@ -29710,7 +29675,7 @@ function tokenDelegate(config2, params, opts) {
29710
29675
  return executeUserSignedAction(config2, action, TokenDelegateTypes, opts);
29711
29676
  }
29712
29677
 
29713
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/topUpIsolatedOnlyMargin.js
29678
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/topUpIsolatedOnlyMargin.js
29714
29679
  var TopUpIsolatedOnlyMarginRequest = /* @__PURE__ */ (() => {
29715
29680
  return object2({
29716
29681
  action: object2({
@@ -29732,7 +29697,7 @@ function topUpIsolatedOnlyMargin(config2, params, opts) {
29732
29697
  return executeL1Action(config2, action, opts);
29733
29698
  }
29734
29699
 
29735
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/twapCancel.js
29700
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/twapCancel.js
29736
29701
  var TwapCancelRequest = /* @__PURE__ */ (() => {
29737
29702
  return object2({
29738
29703
  action: object2({
@@ -29754,7 +29719,7 @@ function twapCancel(config2, params, opts) {
29754
29719
  return executeL1Action(config2, action, opts);
29755
29720
  }
29756
29721
 
29757
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/twapOrder.js
29722
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/twapOrder.js
29758
29723
  var TwapOrderRequest = /* @__PURE__ */ (() => {
29759
29724
  return object2({
29760
29725
  action: object2({
@@ -29782,7 +29747,7 @@ function twapOrder(config2, params, opts) {
29782
29747
  return executeL1Action(config2, action, opts);
29783
29748
  }
29784
29749
 
29785
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/updateIsolatedMargin.js
29750
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/updateIsolatedMargin.js
29786
29751
  var UpdateIsolatedMarginRequest = /* @__PURE__ */ (() => {
29787
29752
  return object2({
29788
29753
  action: object2({
@@ -29805,7 +29770,7 @@ function updateIsolatedMargin(config2, params, opts) {
29805
29770
  return executeL1Action(config2, action, opts);
29806
29771
  }
29807
29772
 
29808
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/updateLeverage.js
29773
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/updateLeverage.js
29809
29774
  var UpdateLeverageRequest = /* @__PURE__ */ (() => {
29810
29775
  return object2({
29811
29776
  action: object2({
@@ -29828,7 +29793,7 @@ function updateLeverage(config2, params, opts) {
29828
29793
  return executeL1Action(config2, action, opts);
29829
29794
  }
29830
29795
 
29831
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/usdClassTransfer.js
29796
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/usdClassTransfer.js
29832
29797
  var UsdClassTransferRequest = /* @__PURE__ */ (() => {
29833
29798
  return object2({
29834
29799
  action: object2({
@@ -29859,7 +29824,7 @@ function usdClassTransfer(config2, params, opts) {
29859
29824
  return executeUserSignedAction(config2, action, UsdClassTransferTypes, opts);
29860
29825
  }
29861
29826
 
29862
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/usdSend.js
29827
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/usdSend.js
29863
29828
  var UsdSendRequest = /* @__PURE__ */ (() => {
29864
29829
  return object2({
29865
29830
  action: object2({
@@ -29890,7 +29855,7 @@ function usdSend(config2, params, opts) {
29890
29855
  return executeUserSignedAction(config2, action, UsdSendTypes, opts);
29891
29856
  }
29892
29857
 
29893
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userDexAbstraction.js
29858
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userDexAbstraction.js
29894
29859
  var UserDexAbstractionRequest = /* @__PURE__ */ (() => {
29895
29860
  return object2({
29896
29861
  action: object2({
@@ -29921,7 +29886,7 @@ function userDexAbstraction(config2, params, opts) {
29921
29886
  return executeUserSignedAction(config2, action, UserDexAbstractionTypes, opts);
29922
29887
  }
29923
29888
 
29924
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userPortfolioMargin.js
29889
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userPortfolioMargin.js
29925
29890
  var UserPortfolioMarginRequest = /* @__PURE__ */ (() => {
29926
29891
  return object2({
29927
29892
  action: object2({
@@ -29952,7 +29917,7 @@ function userPortfolioMargin(config2, params, opts) {
29952
29917
  return executeUserSignedAction(config2, action, UserPortfolioMarginTypes, opts);
29953
29918
  }
29954
29919
 
29955
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userSetAbstraction.js
29920
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/userSetAbstraction.js
29956
29921
  var UserSetAbstractionRequest = /* @__PURE__ */ (() => {
29957
29922
  return object2({
29958
29923
  action: object2({
@@ -29983,7 +29948,7 @@ function userSetAbstraction(config2, params, opts) {
29983
29948
  return executeUserSignedAction(config2, action, UserSetAbstractionTypes, opts);
29984
29949
  }
29985
29950
 
29986
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/validatorL1Stream.js
29951
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/validatorL1Stream.js
29987
29952
  var ValidatorL1StreamRequest = /* @__PURE__ */ (() => {
29988
29953
  return object2({
29989
29954
  action: object2({
@@ -30003,7 +29968,7 @@ function validatorL1Stream(config2, params, opts) {
30003
29968
  return executeL1Action(config2, action, opts);
30004
29969
  }
30005
29970
 
30006
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultDistribute.js
29971
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultDistribute.js
30007
29972
  var VaultDistributeRequest = /* @__PURE__ */ (() => {
30008
29973
  return object2({
30009
29974
  action: object2({
@@ -30024,7 +29989,7 @@ function vaultDistribute(config2, params, opts) {
30024
29989
  return executeL1Action(config2, action, opts);
30025
29990
  }
30026
29991
 
30027
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultModify.js
29992
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultModify.js
30028
29993
  var VaultModifyRequest = /* @__PURE__ */ (() => {
30029
29994
  return object2({
30030
29995
  action: object2({
@@ -30046,14 +30011,14 @@ function vaultModify(config2, params, opts) {
30046
30011
  return executeL1Action(config2, action, opts);
30047
30012
  }
30048
30013
 
30049
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultTransfer.js
30014
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/vaultTransfer.js
30050
30015
  var VaultTransferRequest = /* @__PURE__ */ (() => {
30051
30016
  return object2({
30052
30017
  action: object2({
30053
30018
  type: literal2("vaultTransfer"),
30054
30019
  vaultAddress: Address,
30055
30020
  isDeposit: boolean4(),
30056
- usd: UnsignedInteger
30021
+ usd: pipe2(UnsignedInteger, minValue(1))
30057
30022
  }),
30058
30023
  nonce: UnsignedInteger,
30059
30024
  signature: SignatureSchema,
@@ -30068,7 +30033,7 @@ function vaultTransfer(config2, params, opts) {
30068
30033
  return executeL1Action(config2, action, opts);
30069
30034
  }
30070
30035
 
30071
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/withdraw3.js
30036
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/_methods/withdraw3.js
30072
30037
  var Withdraw3Request = /* @__PURE__ */ (() => {
30073
30038
  return object2({
30074
30039
  action: object2({
@@ -30099,7 +30064,7 @@ function withdraw3(config2, params, opts) {
30099
30064
  return executeUserSignedAction(config2, action, Withdraw3Types, opts);
30100
30065
  }
30101
30066
 
30102
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/exchange/client.js
30067
+ // node_modules/@nktkas/hyperliquid/esm/api/exchange/client.js
30103
30068
  class ExchangeClient {
30104
30069
  config_;
30105
30070
  constructor(config2) {
@@ -30263,7 +30228,7 @@ class ExchangeClient {
30263
30228
  }
30264
30229
  }
30265
30230
 
30266
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/activeAssetData.js
30231
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/activeAssetData.js
30267
30232
  var ActiveAssetDataRequest = /* @__PURE__ */ (() => {
30268
30233
  return object2({
30269
30234
  type: literal2("activeAssetData"),
@@ -30279,7 +30244,7 @@ function activeAssetData(config2, params, signal) {
30279
30244
  return config2.transport.request("info", request, signal);
30280
30245
  }
30281
30246
 
30282
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/alignedQuoteTokenInfo.js
30247
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/alignedQuoteTokenInfo.js
30283
30248
  var AlignedQuoteTokenInfoRequest = /* @__PURE__ */ (() => {
30284
30249
  return object2({
30285
30250
  type: literal2("alignedQuoteTokenInfo"),
@@ -30294,7 +30259,7 @@ function alignedQuoteTokenInfo(config2, params, signal) {
30294
30259
  return config2.transport.request("info", request, signal);
30295
30260
  }
30296
30261
 
30297
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allBorrowLendReserveStates.js
30262
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allBorrowLendReserveStates.js
30298
30263
  var AllBorrowLendReserveStatesRequest = /* @__PURE__ */ (() => {
30299
30264
  return object2({
30300
30265
  type: literal2("allBorrowLendReserveStates")
@@ -30307,7 +30272,7 @@ function allBorrowLendReserveStates(config2, signal) {
30307
30272
  return config2.transport.request("info", request, signal);
30308
30273
  }
30309
30274
 
30310
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allMids.js
30275
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allMids.js
30311
30276
  var AllMidsRequest = /* @__PURE__ */ (() => {
30312
30277
  return object2({
30313
30278
  type: literal2("allMids"),
@@ -30324,7 +30289,7 @@ function allMids(config2, paramsOrSignal, maybeSignal) {
30324
30289
  return config2.transport.request("info", request, signal);
30325
30290
  }
30326
30291
 
30327
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allPerpMetas.js
30292
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/allPerpMetas.js
30328
30293
  var AllPerpMetasRequest = /* @__PURE__ */ (() => {
30329
30294
  return object2({
30330
30295
  type: literal2("allPerpMetas")
@@ -30337,7 +30302,7 @@ function allPerpMetas(config2, signal) {
30337
30302
  return config2.transport.request("info", request, signal);
30338
30303
  }
30339
30304
 
30340
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/approvedBuilders.js
30305
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/approvedBuilders.js
30341
30306
  var ApprovedBuildersRequest = /* @__PURE__ */ (() => {
30342
30307
  return object2({
30343
30308
  type: literal2("approvedBuilders"),
@@ -30352,7 +30317,7 @@ function approvedBuilders(config2, params, signal) {
30352
30317
  return config2.transport.request("info", request, signal);
30353
30318
  }
30354
30319
 
30355
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/blockDetails.js
30320
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/blockDetails.js
30356
30321
  var BlockDetailsRequest = /* @__PURE__ */ (() => {
30357
30322
  return object2({
30358
30323
  type: literal2("blockDetails"),
@@ -30367,7 +30332,7 @@ function blockDetails(config2, params, signal) {
30367
30332
  return config2.transport.request("explorer", request, signal);
30368
30333
  }
30369
30334
 
30370
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/borrowLendReserveState.js
30335
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/borrowLendReserveState.js
30371
30336
  var BorrowLendReserveStateRequest = /* @__PURE__ */ (() => {
30372
30337
  return object2({
30373
30338
  type: literal2("borrowLendReserveState"),
@@ -30382,7 +30347,7 @@ function borrowLendReserveState(config2, params, signal) {
30382
30347
  return config2.transport.request("info", request, signal);
30383
30348
  }
30384
30349
 
30385
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/borrowLendUserState.js
30350
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/borrowLendUserState.js
30386
30351
  var BorrowLendUserStateRequest = /* @__PURE__ */ (() => {
30387
30352
  return object2({
30388
30353
  type: literal2("borrowLendUserState"),
@@ -30397,7 +30362,7 @@ function borrowLendUserState(config2, params, signal) {
30397
30362
  return config2.transport.request("info", request, signal);
30398
30363
  }
30399
30364
 
30400
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/candleSnapshot.js
30365
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/candleSnapshot.js
30401
30366
  var CandleSnapshotRequest = /* @__PURE__ */ (() => {
30402
30367
  return object2({
30403
30368
  type: literal2("candleSnapshot"),
@@ -30417,7 +30382,7 @@ function candleSnapshot(config2, params, signal) {
30417
30382
  return config2.transport.request("info", request, signal);
30418
30383
  }
30419
30384
 
30420
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/clearinghouseState.js
30385
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/clearinghouseState.js
30421
30386
  var ClearinghouseStateRequest = /* @__PURE__ */ (() => {
30422
30387
  return object2({
30423
30388
  type: literal2("clearinghouseState"),
@@ -30433,7 +30398,7 @@ function clearinghouseState(config2, params, signal) {
30433
30398
  return config2.transport.request("info", request, signal);
30434
30399
  }
30435
30400
 
30436
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegations.js
30401
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegations.js
30437
30402
  var DelegationsRequest = /* @__PURE__ */ (() => {
30438
30403
  return object2({
30439
30404
  type: literal2("delegations"),
@@ -30448,7 +30413,7 @@ function delegations(config2, params, signal) {
30448
30413
  return config2.transport.request("info", request, signal);
30449
30414
  }
30450
30415
 
30451
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorHistory.js
30416
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorHistory.js
30452
30417
  var DelegatorHistoryRequest = /* @__PURE__ */ (() => {
30453
30418
  return object2({
30454
30419
  type: literal2("delegatorHistory"),
@@ -30463,7 +30428,7 @@ function delegatorHistory(config2, params, signal) {
30463
30428
  return config2.transport.request("info", request, signal);
30464
30429
  }
30465
30430
 
30466
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorRewards.js
30431
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorRewards.js
30467
30432
  var DelegatorRewardsRequest = /* @__PURE__ */ (() => {
30468
30433
  return object2({
30469
30434
  type: literal2("delegatorRewards"),
@@ -30478,7 +30443,7 @@ function delegatorRewards(config2, params, signal) {
30478
30443
  return config2.transport.request("info", request, signal);
30479
30444
  }
30480
30445
 
30481
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorSummary.js
30446
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/delegatorSummary.js
30482
30447
  var DelegatorSummaryRequest = /* @__PURE__ */ (() => {
30483
30448
  return object2({
30484
30449
  type: literal2("delegatorSummary"),
@@ -30493,7 +30458,7 @@ function delegatorSummary(config2, params, signal) {
30493
30458
  return config2.transport.request("info", request, signal);
30494
30459
  }
30495
30460
 
30496
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/exchangeStatus.js
30461
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/exchangeStatus.js
30497
30462
  var ExchangeStatusRequest = /* @__PURE__ */ (() => {
30498
30463
  return object2({
30499
30464
  type: literal2("exchangeStatus")
@@ -30506,7 +30471,7 @@ function exchangeStatus(config2, signal) {
30506
30471
  return config2.transport.request("info", request, signal);
30507
30472
  }
30508
30473
 
30509
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/extraAgents.js
30474
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/extraAgents.js
30510
30475
  var ExtraAgentsRequest = /* @__PURE__ */ (() => {
30511
30476
  return object2({
30512
30477
  type: literal2("extraAgents"),
@@ -30521,7 +30486,7 @@ function extraAgents(config2, params, signal) {
30521
30486
  return config2.transport.request("info", request, signal);
30522
30487
  }
30523
30488
 
30524
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/frontendOpenOrders.js
30489
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/frontendOpenOrders.js
30525
30490
  var FrontendOpenOrdersRequest = /* @__PURE__ */ (() => {
30526
30491
  return object2({
30527
30492
  type: literal2("frontendOpenOrders"),
@@ -30537,7 +30502,7 @@ function frontendOpenOrders(config2, params, signal) {
30537
30502
  return config2.transport.request("info", request, signal);
30538
30503
  }
30539
30504
 
30540
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/fundingHistory.js
30505
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/fundingHistory.js
30541
30506
  var FundingHistoryRequest = /* @__PURE__ */ (() => {
30542
30507
  return object2({
30543
30508
  type: literal2("fundingHistory"),
@@ -30554,7 +30519,7 @@ function fundingHistory(config2, params, signal) {
30554
30519
  return config2.transport.request("info", request, signal);
30555
30520
  }
30556
30521
 
30557
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/gossipRootIps.js
30522
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/gossipRootIps.js
30558
30523
  var GossipRootIpsRequest = /* @__PURE__ */ (() => {
30559
30524
  return object2({
30560
30525
  type: literal2("gossipRootIps")
@@ -30567,7 +30532,7 @@ function gossipRootIps(config2, signal) {
30567
30532
  return config2.transport.request("info", request, signal);
30568
30533
  }
30569
30534
 
30570
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/historicalOrders.js
30535
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/historicalOrders.js
30571
30536
  var HistoricalOrdersRequest = /* @__PURE__ */ (() => {
30572
30537
  return object2({
30573
30538
  type: literal2("historicalOrders"),
@@ -30582,7 +30547,7 @@ function historicalOrders(config2, params, signal) {
30582
30547
  return config2.transport.request("info", request, signal);
30583
30548
  }
30584
30549
 
30585
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/isVip.js
30550
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/isVip.js
30586
30551
  var IsVipRequest = /* @__PURE__ */ (() => {
30587
30552
  return object2({
30588
30553
  type: literal2("isVip"),
@@ -30597,7 +30562,7 @@ function isVip(config2, params, signal) {
30597
30562
  return config2.transport.request("info", request, signal);
30598
30563
  }
30599
30564
 
30600
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/l2Book.js
30565
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/l2Book.js
30601
30566
  var L2BookRequest = /* @__PURE__ */ (() => {
30602
30567
  return object2({
30603
30568
  type: literal2("l2Book"),
@@ -30614,7 +30579,7 @@ function l2Book(config2, params, signal) {
30614
30579
  return config2.transport.request("info", request, signal);
30615
30580
  }
30616
30581
 
30617
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/leadingVaults.js
30582
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/leadingVaults.js
30618
30583
  var LeadingVaultsRequest = /* @__PURE__ */ (() => {
30619
30584
  return object2({
30620
30585
  type: literal2("leadingVaults"),
@@ -30629,7 +30594,7 @@ function leadingVaults(config2, params, signal) {
30629
30594
  return config2.transport.request("info", request, signal);
30630
30595
  }
30631
30596
 
30632
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/legalCheck.js
30597
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/legalCheck.js
30633
30598
  var LegalCheckRequest = /* @__PURE__ */ (() => {
30634
30599
  return object2({
30635
30600
  type: literal2("legalCheck"),
@@ -30644,7 +30609,7 @@ function legalCheck(config2, params, signal) {
30644
30609
  return config2.transport.request("info", request, signal);
30645
30610
  }
30646
30611
 
30647
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/liquidatable.js
30612
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/liquidatable.js
30648
30613
  var LiquidatableRequest = /* @__PURE__ */ (() => {
30649
30614
  return object2({
30650
30615
  type: literal2("liquidatable")
@@ -30657,7 +30622,7 @@ function liquidatable(config2, signal) {
30657
30622
  return config2.transport.request("info", request, signal);
30658
30623
  }
30659
30624
 
30660
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/marginTable.js
30625
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/marginTable.js
30661
30626
  var MarginTableRequest = /* @__PURE__ */ (() => {
30662
30627
  return object2({
30663
30628
  type: literal2("marginTable"),
@@ -30672,7 +30637,7 @@ function marginTable(config2, params, signal) {
30672
30637
  return config2.transport.request("info", request, signal);
30673
30638
  }
30674
30639
 
30675
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/maxBuilderFee.js
30640
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/maxBuilderFee.js
30676
30641
  var MaxBuilderFeeRequest = /* @__PURE__ */ (() => {
30677
30642
  return object2({
30678
30643
  type: literal2("maxBuilderFee"),
@@ -30688,7 +30653,7 @@ function maxBuilderFee(config2, params, signal) {
30688
30653
  return config2.transport.request("info", request, signal);
30689
30654
  }
30690
30655
 
30691
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/maxMarketOrderNtls.js
30656
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/maxMarketOrderNtls.js
30692
30657
  var MaxMarketOrderNtlsRequest = /* @__PURE__ */ (() => {
30693
30658
  return object2({
30694
30659
  type: literal2("maxMarketOrderNtls")
@@ -30701,7 +30666,7 @@ function maxMarketOrderNtls(config2, signal) {
30701
30666
  return config2.transport.request("info", request, signal);
30702
30667
  }
30703
30668
 
30704
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/meta.js
30669
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/meta.js
30705
30670
  var MetaRequest = /* @__PURE__ */ (() => {
30706
30671
  return object2({
30707
30672
  type: literal2("meta"),
@@ -30718,7 +30683,7 @@ function meta2(config2, paramsOrSignal, maybeSignal) {
30718
30683
  return config2.transport.request("info", request, signal);
30719
30684
  }
30720
30685
 
30721
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/metaAndAssetCtxs.js
30686
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/metaAndAssetCtxs.js
30722
30687
  var MetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {
30723
30688
  return object2({
30724
30689
  type: literal2("metaAndAssetCtxs"),
@@ -30735,7 +30700,7 @@ function metaAndAssetCtxs(config2, paramsOrSignal, maybeSignal) {
30735
30700
  return config2.transport.request("info", request, signal);
30736
30701
  }
30737
30702
 
30738
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/openOrders.js
30703
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/openOrders.js
30739
30704
  var OpenOrdersRequest = /* @__PURE__ */ (() => {
30740
30705
  return object2({
30741
30706
  type: literal2("openOrders"),
@@ -30751,7 +30716,7 @@ function openOrders(config2, params, signal) {
30751
30716
  return config2.transport.request("info", request, signal);
30752
30717
  }
30753
30718
 
30754
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/orderStatus.js
30719
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/orderStatus.js
30755
30720
  var OrderStatusRequest = /* @__PURE__ */ (() => {
30756
30721
  return object2({
30757
30722
  type: literal2("orderStatus"),
@@ -30767,7 +30732,7 @@ function orderStatus(config2, params, signal) {
30767
30732
  return config2.transport.request("info", request, signal);
30768
30733
  }
30769
30734
 
30770
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/outcomeMeta.js
30735
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/outcomeMeta.js
30771
30736
  var OutcomeMetaRequest = /* @__PURE__ */ (() => {
30772
30737
  return object2({
30773
30738
  type: literal2("outcomeMeta")
@@ -30780,7 +30745,7 @@ function outcomeMeta(config2, signal) {
30780
30745
  return config2.transport.request("info", request, signal);
30781
30746
  }
30782
30747
 
30783
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpAnnotation.js
30748
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpAnnotation.js
30784
30749
  var PerpAnnotationRequest = /* @__PURE__ */ (() => {
30785
30750
  return object2({
30786
30751
  type: literal2("perpAnnotation"),
@@ -30795,7 +30760,7 @@ function perpAnnotation(config2, params, signal) {
30795
30760
  return config2.transport.request("info", request, signal);
30796
30761
  }
30797
30762
 
30798
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpCategories.js
30763
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpCategories.js
30799
30764
  var PerpCategoriesRequest = /* @__PURE__ */ (() => {
30800
30765
  return object2({
30801
30766
  type: literal2("perpCategories")
@@ -30808,7 +30773,7 @@ function perpCategories(config2, signal) {
30808
30773
  return config2.transport.request("info", request, signal);
30809
30774
  }
30810
30775
 
30811
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpConciseAnnotations.js
30776
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpConciseAnnotations.js
30812
30777
  var PerpConciseAnnotationsRequest = /* @__PURE__ */ (() => {
30813
30778
  return object2({
30814
30779
  type: literal2("perpConciseAnnotations")
@@ -30821,7 +30786,7 @@ function perpConciseAnnotations(config2, signal) {
30821
30786
  return config2.transport.request("info", request, signal);
30822
30787
  }
30823
30788
 
30824
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDeployAuctionStatus.js
30789
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDeployAuctionStatus.js
30825
30790
  var PerpDeployAuctionStatusRequest = /* @__PURE__ */ (() => {
30826
30791
  return object2({
30827
30792
  type: literal2("perpDeployAuctionStatus")
@@ -30834,7 +30799,7 @@ function perpDeployAuctionStatus(config2, signal) {
30834
30799
  return config2.transport.request("info", request, signal);
30835
30800
  }
30836
30801
 
30837
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexLimits.js
30802
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexLimits.js
30838
30803
  var PerpDexLimitsRequest = /* @__PURE__ */ (() => {
30839
30804
  return object2({
30840
30805
  type: literal2("perpDexLimits"),
@@ -30849,7 +30814,7 @@ function perpDexLimits(config2, params, signal) {
30849
30814
  return config2.transport.request("info", request, signal);
30850
30815
  }
30851
30816
 
30852
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexs.js
30817
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexs.js
30853
30818
  var PerpDexsRequest = /* @__PURE__ */ (() => {
30854
30819
  return object2({
30855
30820
  type: literal2("perpDexs")
@@ -30862,7 +30827,7 @@ function perpDexs(config2, signal) {
30862
30827
  return config2.transport.request("info", request, signal);
30863
30828
  }
30864
30829
 
30865
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexStatus.js
30830
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpDexStatus.js
30866
30831
  var PerpDexStatusRequest = /* @__PURE__ */ (() => {
30867
30832
  return object2({
30868
30833
  type: literal2("perpDexStatus"),
@@ -30877,7 +30842,7 @@ function perpDexStatus(config2, params, signal) {
30877
30842
  return config2.transport.request("info", request, signal);
30878
30843
  }
30879
30844
 
30880
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpsAtOpenInterestCap.js
30845
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/perpsAtOpenInterestCap.js
30881
30846
  var PerpsAtOpenInterestCapRequest = /* @__PURE__ */ (() => {
30882
30847
  return object2({
30883
30848
  type: literal2("perpsAtOpenInterestCap"),
@@ -30894,7 +30859,7 @@ function perpsAtOpenInterestCap(config2, paramsOrSignal, maybeSignal) {
30894
30859
  return config2.transport.request("info", request, signal);
30895
30860
  }
30896
30861
 
30897
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/portfolio.js
30862
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/portfolio.js
30898
30863
  var PortfolioRequest = /* @__PURE__ */ (() => {
30899
30864
  return object2({
30900
30865
  type: literal2("portfolio"),
@@ -30909,7 +30874,7 @@ function portfolio(config2, params, signal) {
30909
30874
  return config2.transport.request("info", request, signal);
30910
30875
  }
30911
30876
 
30912
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/predictedFundings.js
30877
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/predictedFundings.js
30913
30878
  var PredictedFundingsRequest = /* @__PURE__ */ (() => {
30914
30879
  return object2({
30915
30880
  type: literal2("predictedFundings")
@@ -30922,7 +30887,7 @@ function predictedFundings(config2, signal) {
30922
30887
  return config2.transport.request("info", request, signal);
30923
30888
  }
30924
30889
 
30925
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/preTransferCheck.js
30890
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/preTransferCheck.js
30926
30891
  var PreTransferCheckRequest = /* @__PURE__ */ (() => {
30927
30892
  return object2({
30928
30893
  type: literal2("preTransferCheck"),
@@ -30938,7 +30903,7 @@ function preTransferCheck(config2, params, signal) {
30938
30903
  return config2.transport.request("info", request, signal);
30939
30904
  }
30940
30905
 
30941
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/recentTrades.js
30906
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/recentTrades.js
30942
30907
  var RecentTradesRequest = /* @__PURE__ */ (() => {
30943
30908
  return object2({
30944
30909
  type: literal2("recentTrades"),
@@ -30953,7 +30918,7 @@ function recentTrades(config2, params, signal) {
30953
30918
  return config2.transport.request("info", request, signal);
30954
30919
  }
30955
30920
 
30956
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/referral.js
30921
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/referral.js
30957
30922
  var ReferralRequest = /* @__PURE__ */ (() => {
30958
30923
  return object2({
30959
30924
  type: literal2("referral"),
@@ -30968,7 +30933,7 @@ function referral(config2, params, signal) {
30968
30933
  return config2.transport.request("info", request, signal);
30969
30934
  }
30970
30935
 
30971
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotClearinghouseState.js
30936
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotClearinghouseState.js
30972
30937
  var SpotClearinghouseStateRequest = /* @__PURE__ */ (() => {
30973
30938
  return object2({
30974
30939
  type: literal2("spotClearinghouseState"),
@@ -30984,7 +30949,7 @@ function spotClearinghouseState(config2, params, signal) {
30984
30949
  return config2.transport.request("info", request, signal);
30985
30950
  }
30986
30951
 
30987
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotDeployState.js
30952
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotDeployState.js
30988
30953
  var SpotDeployStateRequest = /* @__PURE__ */ (() => {
30989
30954
  return object2({
30990
30955
  type: literal2("spotDeployState"),
@@ -30999,7 +30964,7 @@ function spotDeployState(config2, params, signal) {
30999
30964
  return config2.transport.request("info", request, signal);
31000
30965
  }
31001
30966
 
31002
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotMeta.js
30967
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotMeta.js
31003
30968
  var SpotMetaRequest = /* @__PURE__ */ (() => {
31004
30969
  return object2({
31005
30970
  type: literal2("spotMeta")
@@ -31012,7 +30977,7 @@ function spotMeta(config2, signal) {
31012
30977
  return config2.transport.request("info", request, signal);
31013
30978
  }
31014
30979
 
31015
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotMetaAndAssetCtxs.js
30980
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotMetaAndAssetCtxs.js
31016
30981
  var SpotMetaAndAssetCtxsRequest = /* @__PURE__ */ (() => {
31017
30982
  return object2({
31018
30983
  type: literal2("spotMetaAndAssetCtxs")
@@ -31025,7 +30990,7 @@ function spotMetaAndAssetCtxs(config2, signal) {
31025
30990
  return config2.transport.request("info", request, signal);
31026
30991
  }
31027
30992
 
31028
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotPairDeployAuctionStatus.js
30993
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/spotPairDeployAuctionStatus.js
31029
30994
  var SpotPairDeployAuctionStatusRequest = /* @__PURE__ */ (() => {
31030
30995
  return object2({
31031
30996
  type: literal2("spotPairDeployAuctionStatus")
@@ -31038,7 +31003,7 @@ function spotPairDeployAuctionStatus(config2, signal) {
31038
31003
  return config2.transport.request("info", request, signal);
31039
31004
  }
31040
31005
 
31041
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/subAccounts.js
31006
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/subAccounts.js
31042
31007
  var SubAccountsRequest = /* @__PURE__ */ (() => {
31043
31008
  return object2({
31044
31009
  type: literal2("subAccounts"),
@@ -31053,7 +31018,7 @@ function subAccounts(config2, params, signal) {
31053
31018
  return config2.transport.request("info", request, signal);
31054
31019
  }
31055
31020
 
31056
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/subAccounts2.js
31021
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/subAccounts2.js
31057
31022
  var SubAccounts2Request = /* @__PURE__ */ (() => {
31058
31023
  return object2({
31059
31024
  type: literal2("subAccounts2"),
@@ -31068,7 +31033,7 @@ function subAccounts2(config2, params, signal) {
31068
31033
  return config2.transport.request("info", request, signal);
31069
31034
  }
31070
31035
 
31071
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/tokenDetails.js
31036
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/tokenDetails.js
31072
31037
  var TokenDetailsRequest = /* @__PURE__ */ (() => {
31073
31038
  return object2({
31074
31039
  type: literal2("tokenDetails"),
@@ -31083,7 +31048,7 @@ function tokenDetails(config2, params, signal) {
31083
31048
  return config2.transport.request("info", request, signal);
31084
31049
  }
31085
31050
 
31086
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/twapHistory.js
31051
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/twapHistory.js
31087
31052
  var TwapHistoryRequest = /* @__PURE__ */ (() => {
31088
31053
  return object2({
31089
31054
  type: literal2("twapHistory"),
@@ -31098,7 +31063,7 @@ function twapHistory(config2, params, signal) {
31098
31063
  return config2.transport.request("info", request, signal);
31099
31064
  }
31100
31065
 
31101
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/txDetails.js
31066
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/txDetails.js
31102
31067
  var TxDetailsRequest = /* @__PURE__ */ (() => {
31103
31068
  return object2({
31104
31069
  type: literal2("txDetails"),
@@ -31113,7 +31078,7 @@ function txDetails(config2, params, signal) {
31113
31078
  return config2.transport.request("explorer", request, signal);
31114
31079
  }
31115
31080
 
31116
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userAbstraction.js
31081
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userAbstraction.js
31117
31082
  var UserAbstractionRequest = /* @__PURE__ */ (() => {
31118
31083
  return object2({
31119
31084
  type: literal2("userAbstraction"),
@@ -31128,7 +31093,7 @@ function userAbstraction(config2, params, signal) {
31128
31093
  return config2.transport.request("info", request, signal);
31129
31094
  }
31130
31095
 
31131
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userBorrowLendInterest.js
31096
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userBorrowLendInterest.js
31132
31097
  var UserBorrowLendInterestRequest = /* @__PURE__ */ (() => {
31133
31098
  return object2({
31134
31099
  type: literal2("userBorrowLendInterest"),
@@ -31145,7 +31110,7 @@ function userBorrowLendInterest(config2, params, signal) {
31145
31110
  return config2.transport.request("info", request, signal);
31146
31111
  }
31147
31112
 
31148
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userDetails.js
31113
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userDetails.js
31149
31114
  var UserDetailsRequest = /* @__PURE__ */ (() => {
31150
31115
  return object2({
31151
31116
  type: literal2("userDetails"),
@@ -31160,7 +31125,7 @@ function userDetails(config2, params, signal) {
31160
31125
  return config2.transport.request("explorer", request, signal);
31161
31126
  }
31162
31127
 
31163
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userDexAbstraction.js
31128
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userDexAbstraction.js
31164
31129
  var UserDexAbstractionRequest2 = /* @__PURE__ */ (() => {
31165
31130
  return object2({
31166
31131
  type: literal2("userDexAbstraction"),
@@ -31175,7 +31140,7 @@ function userDexAbstraction2(config2, params, signal) {
31175
31140
  return config2.transport.request("info", request, signal);
31176
31141
  }
31177
31142
 
31178
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFees.js
31143
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFees.js
31179
31144
  var UserFeesRequest = /* @__PURE__ */ (() => {
31180
31145
  return object2({
31181
31146
  type: literal2("userFees"),
@@ -31190,7 +31155,7 @@ function userFees(config2, params, signal) {
31190
31155
  return config2.transport.request("info", request, signal);
31191
31156
  }
31192
31157
 
31193
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFills.js
31158
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFills.js
31194
31159
  var UserFillsRequest = /* @__PURE__ */ (() => {
31195
31160
  return object2({
31196
31161
  type: literal2("userFills"),
@@ -31206,7 +31171,7 @@ function userFills(config2, params, signal) {
31206
31171
  return config2.transport.request("info", request, signal);
31207
31172
  }
31208
31173
 
31209
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFillsByTime.js
31174
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFillsByTime.js
31210
31175
  var UserFillsByTimeRequest = /* @__PURE__ */ (() => {
31211
31176
  return object2({
31212
31177
  type: literal2("userFillsByTime"),
@@ -31225,7 +31190,7 @@ function userFillsByTime(config2, params, signal) {
31225
31190
  return config2.transport.request("info", request, signal);
31226
31191
  }
31227
31192
 
31228
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFunding.js
31193
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userFunding.js
31229
31194
  var UserFundingRequest = /* @__PURE__ */ (() => {
31230
31195
  return object2({
31231
31196
  type: literal2("userFunding"),
@@ -31242,7 +31207,7 @@ function userFunding(config2, params, signal) {
31242
31207
  return config2.transport.request("info", request, signal);
31243
31208
  }
31244
31209
 
31245
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userNonFundingLedgerUpdates.js
31210
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userNonFundingLedgerUpdates.js
31246
31211
  var UserNonFundingLedgerUpdatesRequest = /* @__PURE__ */ (() => {
31247
31212
  return object2({
31248
31213
  type: literal2("userNonFundingLedgerUpdates"),
@@ -31259,7 +31224,7 @@ function userNonFundingLedgerUpdates(config2, params, signal) {
31259
31224
  return config2.transport.request("info", request, signal);
31260
31225
  }
31261
31226
 
31262
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userRateLimit.js
31227
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userRateLimit.js
31263
31228
  var UserRateLimitRequest = /* @__PURE__ */ (() => {
31264
31229
  return object2({
31265
31230
  type: literal2("userRateLimit"),
@@ -31274,7 +31239,7 @@ function userRateLimit(config2, params, signal) {
31274
31239
  return config2.transport.request("info", request, signal);
31275
31240
  }
31276
31241
 
31277
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userRole.js
31242
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userRole.js
31278
31243
  var UserRoleRequest = /* @__PURE__ */ (() => {
31279
31244
  return object2({
31280
31245
  type: literal2("userRole"),
@@ -31289,7 +31254,7 @@ function userRole(config2, params, signal) {
31289
31254
  return config2.transport.request("info", request, signal);
31290
31255
  }
31291
31256
 
31292
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userToMultiSigSigners.js
31257
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userToMultiSigSigners.js
31293
31258
  var UserToMultiSigSignersRequest = /* @__PURE__ */ (() => {
31294
31259
  return object2({
31295
31260
  type: literal2("userToMultiSigSigners"),
@@ -31304,7 +31269,7 @@ function userToMultiSigSigners(config2, params, signal) {
31304
31269
  return config2.transport.request("info", request, signal);
31305
31270
  }
31306
31271
 
31307
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userTwapSliceFills.js
31272
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userTwapSliceFills.js
31308
31273
  var UserTwapSliceFillsRequest = /* @__PURE__ */ (() => {
31309
31274
  return object2({
31310
31275
  type: literal2("userTwapSliceFills"),
@@ -31319,7 +31284,7 @@ function userTwapSliceFills(config2, params, signal) {
31319
31284
  return config2.transport.request("info", request, signal);
31320
31285
  }
31321
31286
 
31322
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userTwapSliceFillsByTime.js
31287
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userTwapSliceFillsByTime.js
31323
31288
  var UserTwapSliceFillsByTimeRequest = /* @__PURE__ */ (() => {
31324
31289
  return object2({
31325
31290
  type: literal2("userTwapSliceFillsByTime"),
@@ -31337,7 +31302,7 @@ function userTwapSliceFillsByTime(config2, params, signal) {
31337
31302
  return config2.transport.request("info", request, signal);
31338
31303
  }
31339
31304
 
31340
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userVaultEquities.js
31305
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/userVaultEquities.js
31341
31306
  var UserVaultEquitiesRequest = /* @__PURE__ */ (() => {
31342
31307
  return object2({
31343
31308
  type: literal2("userVaultEquities"),
@@ -31352,7 +31317,7 @@ function userVaultEquities(config2, params, signal) {
31352
31317
  return config2.transport.request("info", request, signal);
31353
31318
  }
31354
31319
 
31355
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/validatorL1Votes.js
31320
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/validatorL1Votes.js
31356
31321
  var ValidatorL1VotesRequest = /* @__PURE__ */ (() => {
31357
31322
  return object2({
31358
31323
  type: literal2("validatorL1Votes")
@@ -31365,7 +31330,7 @@ function validatorL1Votes(config2, signal) {
31365
31330
  return config2.transport.request("info", request, signal);
31366
31331
  }
31367
31332
 
31368
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/validatorSummaries.js
31333
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/validatorSummaries.js
31369
31334
  var ValidatorSummariesRequest = /* @__PURE__ */ (() => {
31370
31335
  return object2({
31371
31336
  type: literal2("validatorSummaries")
@@ -31378,7 +31343,7 @@ function validatorSummaries(config2, signal) {
31378
31343
  return config2.transport.request("info", request, signal);
31379
31344
  }
31380
31345
 
31381
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/vaultDetails.js
31346
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/vaultDetails.js
31382
31347
  var VaultDetailsRequest = /* @__PURE__ */ (() => {
31383
31348
  return object2({
31384
31349
  type: literal2("vaultDetails"),
@@ -31394,7 +31359,7 @@ function vaultDetails(config2, params, signal) {
31394
31359
  return config2.transport.request("info", request, signal);
31395
31360
  }
31396
31361
 
31397
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/vaultSummaries.js
31362
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/vaultSummaries.js
31398
31363
  var VaultSummariesRequest = /* @__PURE__ */ (() => {
31399
31364
  return object2({
31400
31365
  type: literal2("vaultSummaries")
@@ -31407,7 +31372,7 @@ function vaultSummaries(config2, signal) {
31407
31372
  return config2.transport.request("info", request, signal);
31408
31373
  }
31409
31374
 
31410
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/_methods/webData2.js
31375
+ // node_modules/@nktkas/hyperliquid/esm/api/info/_methods/webData2.js
31411
31376
  var WebData2Request = /* @__PURE__ */ (() => {
31412
31377
  return object2({
31413
31378
  type: literal2("webData2"),
@@ -31422,7 +31387,7 @@ function webData2(config2, params, signal) {
31422
31387
  return config2.transport.request("info", request, signal);
31423
31388
  }
31424
31389
 
31425
- // ../../node_modules/.bun/@nktkas+hyperliquid@0.32.2+1fb4c65d43e298b9/node_modules/@nktkas/hyperliquid/esm/api/info/client.js
31390
+ // node_modules/@nktkas/hyperliquid/esm/api/info/client.js
31426
31391
  class InfoClient {
31427
31392
  config_;
31428
31393
  constructor(config2) {
@@ -31669,7 +31634,7 @@ class InfoClient {
31669
31634
  }
31670
31635
  }
31671
31636
 
31672
- // ../hyperliquid/src/utils/orderOutcome.ts
31637
+ // src/shared/orderOutcome.ts
31673
31638
  var isUnreadableSuccess = (response) => response.ok && !response.headers.get("Content-Type")?.includes("application/json");
31674
31639
  var isExchangeAnswerLost = (error2) => error2 instanceof HttpRequestError2 && (error2.response === undefined || isUnreadableSuccess(error2.response) || error2.response.status >= 500 || error2.response.status === 408 || error2.response.status === 499);
31675
31640
  var placeOutcomeOf = (status) => {
@@ -31699,7 +31664,7 @@ var readPlaceStatuses = (response) => {
31699
31664
  return Array.isArray(statuses) ? statuses.map(placeOutcomeOf) : [];
31700
31665
  };
31701
31666
 
31702
- // ../utils/src/tradeRequest.ts
31667
+ // src/shared/tradeRequest.ts
31703
31668
  var refusalOf = (error2) => {
31704
31669
  if (error2 instanceof ApiRequestError)
31705
31670
  return error2.message;
@@ -31717,9 +31682,9 @@ var sendStep = (exchange, step, expiresAfter) => {
31717
31682
  const send = exchange[step.method];
31718
31683
  return send.call(exchange, step.params, options);
31719
31684
  };
31720
- var executeTradePlan = async (plan2, exchange, { expiresAfter }) => {
31685
+ var executeTradePlan = async (plan, exchange, { expiresAfter }) => {
31721
31686
  let mainResponse;
31722
- for (const step of plan2.steps) {
31687
+ for (const step of plan.steps) {
31723
31688
  if (step.role === "follow_up" && step.onlyIfMainFilled && !filledAnything(mainResponse?.answer)) {
31724
31689
  return {
31725
31690
  kind: "sent",
@@ -31747,7 +31712,7 @@ var executeTradePlan = async (plan2, exchange, { expiresAfter }) => {
31747
31712
  };
31748
31713
  }
31749
31714
  if (refusal === undefined) {
31750
- const unsent = plan2.steps.filter((later) => later.role === "follow_up");
31715
+ const unsent = plan.steps.filter((later) => later.role === "follow_up");
31751
31716
  return unsent.length === 0 ? { kind: "sent", accepted: false } : {
31752
31717
  kind: "sent",
31753
31718
  accepted: false,
@@ -31769,7 +31734,7 @@ var createTradeRequestClients = () => {
31769
31734
  };
31770
31735
  };
31771
31736
 
31772
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/chunk-DYPzFuB5.mjs
31737
+ // node_modules/@modelcontextprotocol/client/dist/chunk-DYPzFuB5.mjs
31773
31738
  var __create2 = Object.create;
31774
31739
  var __defProp3 = Object.defineProperty;
31775
31740
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -31809,7 +31774,7 @@ var __toESM2 = (mod2, isNodeMode, target) => (target = mod2 != null ? __create2(
31809
31774
  enumerable: true
31810
31775
  }) : target, mod2));
31811
31776
 
31812
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/dialects-BAIiebX0.mjs
31777
+ // node_modules/@modelcontextprotocol/client/dist/dialects-BAIiebX0.mjs
31813
31778
  var DRAFT_2020_12_URIS2 = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
31814
31779
  var DRAFT_2019_09_URIS2 = new Set(["https://json-schema.org/draft/2019-09/schema", "http://json-schema.org/draft/2019-09/schema"]);
31815
31780
  var DRAFT_07_URIS2 = new Set(["https://json-schema.org/draft-07/schema", "http://json-schema.org/draft-07/schema"]);
@@ -31830,7 +31795,7 @@ function declaredDialect2(schema, remedy) {
31830
31795
  throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
31831
31796
  }
31832
31797
 
31833
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/src-CeKsbNLO.mjs
31798
+ // node_modules/@modelcontextprotocol/client/dist/src-CeKsbNLO.mjs
31834
31799
  var BRANDS2 = Symbol.for("mcp.sdk.errorBrands");
31835
31800
  function stampErrorBrands2(instance, ctor) {
31836
31801
  const brands = /* @__PURE__ */ new Set;
@@ -36594,7 +36559,7 @@ function unfollowedRedirect(url2, response) {
36594
36559
  return `Redirect to ${target.href} not followed; use that URL as the endpoint if it is the intended server`;
36595
36560
  }
36596
36561
 
36597
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/ajvProvider-BIwGVY6G.mjs
36562
+ // node_modules/@modelcontextprotocol/client/dist/ajvProvider-BIwGVY6G.mjs
36598
36563
  var require_code$12 = /* @__PURE__ */ __commonJSMin2((exports) => {
36599
36564
  Object.defineProperty(exports, "__esModule", { value: true });
36600
36565
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
@@ -36999,11 +36964,11 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
36999
36964
  const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
37000
36965
  return `${varKind} ${this.name}${rhs};` + _n;
37001
36966
  }
37002
- optimizeNames(names, constants2) {
36967
+ optimizeNames(names, constants) {
37003
36968
  if (!names[this.name.str])
37004
36969
  return;
37005
36970
  if (this.rhs)
37006
- this.rhs = optimizeExpr(this.rhs, names, constants2);
36971
+ this.rhs = optimizeExpr(this.rhs, names, constants);
37007
36972
  return this;
37008
36973
  }
37009
36974
  get names() {
@@ -37020,10 +36985,10 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37020
36985
  render({ _n }) {
37021
36986
  return `${this.lhs} = ${this.rhs};` + _n;
37022
36987
  }
37023
- optimizeNames(names, constants2) {
36988
+ optimizeNames(names, constants) {
37024
36989
  if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
37025
36990
  return;
37026
- this.rhs = optimizeExpr(this.rhs, names, constants2);
36991
+ this.rhs = optimizeExpr(this.rhs, names, constants);
37027
36992
  return this;
37028
36993
  }
37029
36994
  get names() {
@@ -37082,8 +37047,8 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37082
37047
  optimizeNodes() {
37083
37048
  return `${this.code}` ? this : undefined;
37084
37049
  }
37085
- optimizeNames(names, constants2) {
37086
- this.code = optimizeExpr(this.code, names, constants2);
37050
+ optimizeNames(names, constants) {
37051
+ this.code = optimizeExpr(this.code, names, constants);
37087
37052
  return this;
37088
37053
  }
37089
37054
  get names() {
@@ -37112,12 +37077,12 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37112
37077
  }
37113
37078
  return nodes.length > 0 ? this : undefined;
37114
37079
  }
37115
- optimizeNames(names, constants2) {
37080
+ optimizeNames(names, constants) {
37116
37081
  const { nodes } = this;
37117
37082
  let i = nodes.length;
37118
37083
  while (i--) {
37119
37084
  const n = nodes[i];
37120
- if (n.optimizeNames(names, constants2))
37085
+ if (n.optimizeNames(names, constants))
37121
37086
  continue;
37122
37087
  subtractNames(names, n.names);
37123
37088
  nodes.splice(i, 1);
@@ -37170,12 +37135,12 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37170
37135
  return;
37171
37136
  return this;
37172
37137
  }
37173
- optimizeNames(names, constants2) {
37138
+ optimizeNames(names, constants) {
37174
37139
  var _a3;
37175
- this.else = (_a3 = this.else) === null || _a3 === undefined ? undefined : _a3.optimizeNames(names, constants2);
37176
- if (!(super.optimizeNames(names, constants2) || this.else))
37140
+ this.else = (_a3 = this.else) === null || _a3 === undefined ? undefined : _a3.optimizeNames(names, constants);
37141
+ if (!(super.optimizeNames(names, constants) || this.else))
37177
37142
  return;
37178
- this.condition = optimizeExpr(this.condition, names, constants2);
37143
+ this.condition = optimizeExpr(this.condition, names, constants);
37179
37144
  return this;
37180
37145
  }
37181
37146
  get names() {
@@ -37198,10 +37163,10 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37198
37163
  render(opts) {
37199
37164
  return `for(${this.iteration})` + super.render(opts);
37200
37165
  }
37201
- optimizeNames(names, constants2) {
37202
- if (!super.optimizeNames(names, constants2))
37166
+ optimizeNames(names, constants) {
37167
+ if (!super.optimizeNames(names, constants))
37203
37168
  return;
37204
- this.iteration = optimizeExpr(this.iteration, names, constants2);
37169
+ this.iteration = optimizeExpr(this.iteration, names, constants);
37205
37170
  return this;
37206
37171
  }
37207
37172
  get names() {
@@ -37236,10 +37201,10 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37236
37201
  render(opts) {
37237
37202
  return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
37238
37203
  }
37239
- optimizeNames(names, constants2) {
37240
- if (!super.optimizeNames(names, constants2))
37204
+ optimizeNames(names, constants) {
37205
+ if (!super.optimizeNames(names, constants))
37241
37206
  return;
37242
- this.iterable = optimizeExpr(this.iterable, names, constants2);
37207
+ this.iterable = optimizeExpr(this.iterable, names, constants);
37243
37208
  return this;
37244
37209
  }
37245
37210
  get names() {
@@ -37280,11 +37245,11 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37280
37245
  (_b = this.finally) === null || _b === undefined || _b.optimizeNodes();
37281
37246
  return this;
37282
37247
  }
37283
- optimizeNames(names, constants2) {
37248
+ optimizeNames(names, constants) {
37284
37249
  var _a3, _b;
37285
- super.optimizeNames(names, constants2);
37286
- (_a3 = this.catch) === null || _a3 === undefined || _a3.optimizeNames(names, constants2);
37287
- (_b = this.finally) === null || _b === undefined || _b.optimizeNames(names, constants2);
37250
+ super.optimizeNames(names, constants);
37251
+ (_a3 = this.catch) === null || _a3 === undefined || _a3.optimizeNames(names, constants);
37252
+ (_b = this.finally) === null || _b === undefined || _b.optimizeNames(names, constants);
37288
37253
  return this;
37289
37254
  }
37290
37255
  get names() {
@@ -37553,7 +37518,7 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37553
37518
  function addExprNames(names, from) {
37554
37519
  return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
37555
37520
  }
37556
- function optimizeExpr(expr, names, constants2) {
37521
+ function optimizeExpr(expr, names, constants) {
37557
37522
  if (expr instanceof code_1.Name)
37558
37523
  return replaceName(expr);
37559
37524
  if (!canOptimize(expr))
@@ -37568,14 +37533,14 @@ var require_codegen2 = /* @__PURE__ */ __commonJSMin2((exports) => {
37568
37533
  return items;
37569
37534
  }, []));
37570
37535
  function replaceName(n) {
37571
- const c = constants2[n.str];
37536
+ const c = constants[n.str];
37572
37537
  if (c === undefined || names[n.str] !== 1)
37573
37538
  return n;
37574
37539
  delete names[n.str];
37575
37540
  return c;
37576
37541
  }
37577
37542
  function canOptimize(e) {
37578
- return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants2[c.str] !== undefined);
37543
+ return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined);
37579
37544
  }
37580
37545
  }
37581
37546
  function subtractNames(names, from) {
@@ -38023,35 +37988,35 @@ var require_dataType2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38023
37988
  DataType2[DataType2["Wrong"] = 1] = "Wrong";
38024
37989
  })(DataType || (exports.DataType = DataType = {}));
38025
37990
  function getSchemaTypes(schema) {
38026
- const types2 = getJSONTypes(schema.type);
38027
- if (types2.includes("null")) {
37991
+ const types = getJSONTypes(schema.type);
37992
+ if (types.includes("null")) {
38028
37993
  if (schema.nullable === false)
38029
37994
  throw new Error("type: null contradicts nullable: false");
38030
37995
  } else {
38031
- if (!types2.length && schema.nullable !== undefined)
37996
+ if (!types.length && schema.nullable !== undefined)
38032
37997
  throw new Error('"nullable" cannot be used without "type"');
38033
37998
  if (schema.nullable === true)
38034
- types2.push("null");
37999
+ types.push("null");
38035
38000
  }
38036
- return types2;
38001
+ return types;
38037
38002
  }
38038
38003
  exports.getSchemaTypes = getSchemaTypes;
38039
38004
  function getJSONTypes(ts) {
38040
- const types2 = Array.isArray(ts) ? ts : ts ? [ts] : [];
38041
- if (types2.every(rules_1.isJSONType))
38042
- return types2;
38043
- throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
38005
+ const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
38006
+ if (types.every(rules_1.isJSONType))
38007
+ return types;
38008
+ throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
38044
38009
  }
38045
38010
  exports.getJSONTypes = getJSONTypes;
38046
- function coerceAndCheckDataType(it, types2) {
38011
+ function coerceAndCheckDataType(it, types) {
38047
38012
  const { gen: gen2, data, opts } = it;
38048
- const coerceTo = coerceToTypes(types2, opts.coerceTypes);
38049
- const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types2[0]));
38013
+ const coerceTo = coerceToTypes(types, opts.coerceTypes);
38014
+ const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
38050
38015
  if (checkTypes) {
38051
- const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong);
38016
+ const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
38052
38017
  gen2.if(wrongType, () => {
38053
38018
  if (coerceTo.length)
38054
- coerceData(it, types2, coerceTo);
38019
+ coerceData(it, types, coerceTo);
38055
38020
  else
38056
38021
  reportTypeError(it);
38057
38022
  });
@@ -38066,15 +38031,15 @@ var require_dataType2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38066
38031
  "boolean",
38067
38032
  "null"
38068
38033
  ]);
38069
- function coerceToTypes(types2, coerceTypes) {
38070
- return coerceTypes ? types2.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
38034
+ function coerceToTypes(types, coerceTypes) {
38035
+ return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
38071
38036
  }
38072
- function coerceData(it, types2, coerceTo) {
38037
+ function coerceData(it, types, coerceTo) {
38073
38038
  const { gen: gen2, data, opts } = it;
38074
38039
  const dataType = gen2.let("dataType", (0, codegen_1._)`typeof ${data}`);
38075
38040
  const coerced = gen2.let("coerced", (0, codegen_1._)`undefined`);
38076
38041
  if (opts.coerceTypes === "array")
38077
- gen2.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen2.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen2.assign(coerced, data)));
38042
+ gen2.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen2.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen2.assign(coerced, data)));
38078
38043
  gen2.if((0, codegen_1._)`${coerced} !== undefined`);
38079
38044
  for (const t of coerceTo)
38080
38045
  if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array")
@@ -38146,18 +38111,18 @@ var require_dataType2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38146
38111
  if (dataTypes.length === 1)
38147
38112
  return checkDataType(dataTypes[0], data, strictNums, correct);
38148
38113
  let cond;
38149
- const types2 = (0, util_1.toHash)(dataTypes);
38150
- if (types2.array && types2.object) {
38114
+ const types = (0, util_1.toHash)(dataTypes);
38115
+ if (types.array && types.object) {
38151
38116
  const notObj = (0, codegen_1._)`typeof ${data} != "object"`;
38152
- cond = types2.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;
38153
- delete types2.null;
38154
- delete types2.array;
38155
- delete types2.object;
38117
+ cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;
38118
+ delete types.null;
38119
+ delete types.array;
38120
+ delete types.object;
38156
38121
  } else
38157
38122
  cond = codegen_1.nil;
38158
- if (types2.number)
38159
- delete types2.integer;
38160
- for (const t in types2)
38123
+ if (types.number)
38124
+ delete types.integer;
38125
+ for (const t in types)
38161
38126
  cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
38162
38127
  return cond;
38163
38128
  }
@@ -38908,8 +38873,8 @@ var require_validate2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38908
38873
  function typeAndKeywords(it, errsCount) {
38909
38874
  if (it.opts.jtd)
38910
38875
  return schemaKeywords(it, [], false, errsCount);
38911
- const types2 = (0, dataType_1.getSchemaTypes)(it.schema);
38912
- schemaKeywords(it, types2, !(0, dataType_1.coerceAndCheckDataType)(it, types2), errsCount);
38876
+ const types = (0, dataType_1.getSchemaTypes)(it.schema);
38877
+ schemaKeywords(it, types, !(0, dataType_1.coerceAndCheckDataType)(it, types), errsCount);
38913
38878
  }
38914
38879
  function checkRefsAndKeywords(it) {
38915
38880
  const { schema, errSchemaPath, opts, self } = it;
@@ -38957,7 +38922,7 @@ var require_validate2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38957
38922
  if (items instanceof codegen_1.Name)
38958
38923
  gen2.assign((0, codegen_1._)`${evaluated}.items`, items);
38959
38924
  }
38960
- function schemaKeywords(it, types2, typeErrors, errsCount) {
38925
+ function schemaKeywords(it, types, typeErrors, errsCount) {
38961
38926
  const { gen: gen2, schema, data, allErrors, opts, self } = it;
38962
38927
  const { RULES } = self;
38963
38928
  if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {
@@ -38965,7 +38930,7 @@ var require_validate2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38965
38930
  return;
38966
38931
  }
38967
38932
  if (!opts.jtd)
38968
- checkStrictTypes(it, types2);
38933
+ checkStrictTypes(it, types);
38969
38934
  gen2.block(() => {
38970
38935
  for (const group of RULES.rules)
38971
38936
  groupKeywords(group);
@@ -38977,7 +38942,7 @@ var require_validate2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38977
38942
  if (group.type) {
38978
38943
  gen2.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
38979
38944
  iterateKeywords(it, group);
38980
- if (types2.length === 1 && types2[0] === group.type && typeErrors) {
38945
+ if (types.length === 1 && types[0] === group.type && typeErrors) {
38981
38946
  gen2.else();
38982
38947
  (0, dataType_2.reportTypeError)(it);
38983
38948
  }
@@ -38998,26 +38963,26 @@ var require_validate2 = /* @__PURE__ */ __commonJSMin2((exports) => {
38998
38963
  keywordCode(it, rule.keyword, rule.definition, group.type);
38999
38964
  });
39000
38965
  }
39001
- function checkStrictTypes(it, types2) {
38966
+ function checkStrictTypes(it, types) {
39002
38967
  if (it.schemaEnv.meta || !it.opts.strictTypes)
39003
38968
  return;
39004
- checkContextTypes(it, types2);
38969
+ checkContextTypes(it, types);
39005
38970
  if (!it.opts.allowUnionTypes)
39006
- checkMultipleTypes(it, types2);
38971
+ checkMultipleTypes(it, types);
39007
38972
  checkKeywordTypes(it, it.dataTypes);
39008
38973
  }
39009
- function checkContextTypes(it, types2) {
39010
- if (!types2.length)
38974
+ function checkContextTypes(it, types) {
38975
+ if (!types.length)
39011
38976
  return;
39012
38977
  if (!it.dataTypes.length) {
39013
- it.dataTypes = types2;
38978
+ it.dataTypes = types;
39014
38979
  return;
39015
38980
  }
39016
- types2.forEach((t) => {
38981
+ types.forEach((t) => {
39017
38982
  if (!includesType(it.dataTypes, t))
39018
38983
  strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
39019
38984
  });
39020
- narrowSchemaTypes(it, types2);
38985
+ narrowSchemaTypes(it, types);
39021
38986
  }
39022
38987
  function checkMultipleTypes(it, ts) {
39023
38988
  if (ts.length > 1 && !(ts.length === 2 && ts.includes("null")))
@@ -44564,10 +44529,10 @@ var AjvJsonSchemaValidator2 = class {
44564
44529
  };
44565
44530
  var Ajv2 = import_ajv2.Ajv;
44566
44531
 
44567
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs
44532
+ // node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs
44568
44533
  var CORS_IS_POSSIBLE = false;
44569
44534
 
44570
- // ../../node_modules/.bun/pkce-challenge@5.0.1/node_modules/pkce-challenge/dist/index.node.js
44535
+ // node_modules/pkce-challenge/dist/index.node.js
44571
44536
  var crypto3;
44572
44537
  crypto3 = globalThis.crypto?.webcrypto ?? globalThis.crypto ?? import("node:crypto").then((m) => m.webcrypto);
44573
44538
  async function getRandomValues(size3) {
@@ -44608,7 +44573,7 @@ async function pkceChallenge(length2) {
44608
44573
  };
44609
44574
  }
44610
44575
 
44611
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/public-CvV4ZHkX.mjs
44576
+ // node_modules/@modelcontextprotocol/client/dist/public-CvV4ZHkX.mjs
44612
44577
  var OAuthClientFlowError = class extends Error {
44613
44578
  static {
44614
44579
  Object.defineProperty(this, "mcpBrand", { value: "mcp.OAuthClientFlowError" });
@@ -45072,22 +45037,22 @@ async function authInternal(provider, { serverUrl, authorizationCode, iss, scope
45072
45037
  }, infoCtx);
45073
45038
  return "AUTHORIZED";
45074
45039
  }
45075
- let tokens2 = discardIfIssuerMismatch(await provider.tokens(infoCtx), issuer);
45076
- if (tokens2 && tokens2.issuer === undefined) {
45077
- tokens2 = {
45078
- ...tokens2,
45040
+ let tokens = discardIfIssuerMismatch(await provider.tokens(infoCtx), issuer);
45041
+ if (tokens && tokens.issuer === undefined) {
45042
+ tokens = {
45043
+ ...tokens,
45079
45044
  issuer
45080
45045
  };
45081
- await provider.saveTokens(tokens2, infoCtx);
45046
+ await provider.saveTokens(tokens, infoCtx);
45082
45047
  }
45083
- if (tokens2?.refresh_token && !forceReauthorization) {
45084
- const refreshScope = await provider.scopeForRefresh?.(tokens2);
45048
+ if (tokens?.refresh_token && !forceReauthorization) {
45049
+ const refreshScope = await provider.scopeForRefresh?.(tokens);
45085
45050
  let newTokens;
45086
45051
  try {
45087
45052
  newTokens = await refreshAuthorization(authorizationServerUrl, {
45088
45053
  metadata,
45089
45054
  clientInformation,
45090
- refreshToken: tokens2.refresh_token,
45055
+ refreshToken: tokens.refresh_token,
45091
45056
  scope: refreshScope,
45092
45057
  resource,
45093
45058
  addClientAuthentication: provider.addClientAuthentication,
@@ -45417,7 +45382,7 @@ async function refreshAuthorization(authorizationServerUrl, { metadata, clientIn
45417
45382
  });
45418
45383
  if (scope)
45419
45384
  tokenRequestParams.set("scope", scope);
45420
- const tokens2 = await executeTokenRequest(authorizationServerUrl, {
45385
+ const tokens = await executeTokenRequest(authorizationServerUrl, {
45421
45386
  metadata,
45422
45387
  tokenRequestParams,
45423
45388
  clientInformation,
@@ -45428,8 +45393,8 @@ async function refreshAuthorization(authorizationServerUrl, { metadata, clientIn
45428
45393
  });
45429
45394
  return {
45430
45395
  refresh_token: refreshToken,
45431
- ...tokens2,
45432
- ...scope && !tokens2.scope && { scope }
45396
+ ...tokens,
45397
+ ...scope && !tokens.scope && { scope }
45433
45398
  };
45434
45399
  }
45435
45400
  async function fetchToken(provider, authorizationServerUrl, { metadata, resource, authorizationCode, iss, scope, fetchFn } = {}) {
@@ -47281,7 +47246,7 @@ var Client = class extends Protocol2 {
47281
47246
  }
47282
47247
  };
47283
47248
 
47284
- // ../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js
47249
+ // node_modules/eventsource-parser/dist/index.js
47285
47250
  class ParseError extends Error {
47286
47251
  constructor(message, options) {
47287
47252
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
@@ -47376,7 +47341,7 @@ ${value2}`, dataLines++;
47376
47341
  }
47377
47342
  if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
47378
47343
  const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
47379
- id = value2.includes("\x00") ? undefined : value2;
47344
+ value2.includes("\x00") || (id = value2);
47380
47345
  return;
47381
47346
  }
47382
47347
  if (firstCharCode === 58) {
@@ -47404,7 +47369,7 @@ ${value2}`, dataLines++;
47404
47369
  ${value}`, dataLines++;
47405
47370
  break;
47406
47371
  case "id":
47407
- id = value.includes("\x00") ? undefined : value;
47372
+ value.includes("\x00") || (id = value);
47408
47373
  break;
47409
47374
  case "retry":
47410
47375
  /^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(new ParseError(`Invalid \`retry\` value: "${value}"`, {
@@ -47441,7 +47406,7 @@ function isEventPrefix(chunk, i, firstCharCode) {
47441
47406
  return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
47442
47407
  }
47443
47408
 
47444
- // ../../node_modules/.bun/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js
47409
+ // node_modules/eventsource-parser/dist/stream.js
47445
47410
  class EventSourceParserStream extends TransformStream {
47446
47411
  constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
47447
47412
  let parser;
@@ -47466,7 +47431,7 @@ class EventSourceParserStream extends TransformStream {
47466
47431
  }
47467
47432
  }
47468
47433
 
47469
- // ../../node_modules/.bun/@modelcontextprotocol+client@2.4.0/node_modules/@modelcontextprotocol/client/dist/index.mjs
47434
+ // node_modules/@modelcontextprotocol/client/dist/index.mjs
47470
47435
  function hasDpopChallenge(wwwAuthenticate) {
47471
47436
  return /(?:^|,)\s*dpop(?:\s|$|,)/i.test(wwwAuthenticate);
47472
47437
  }
@@ -47518,13 +47483,13 @@ var withDpopFromProvider = (provider) => withDpop(async () => {
47518
47483
  throw markAuthSeamEscape(error2);
47519
47484
  }
47520
47485
  }, async () => {
47521
- let tokens2;
47486
+ let tokens;
47522
47487
  try {
47523
- tokens2 = await provider.tokens();
47488
+ tokens = await provider.tokens();
47524
47489
  } catch (error2) {
47525
47490
  throw markAuthSeamEscape(error2);
47526
47491
  }
47527
- return tokens2?.token_type?.toLowerCase() === "dpop" ? tokens2.access_token : undefined;
47492
+ return tokens?.token_type?.toLowerCase() === "dpop" ? tokens.access_token : undefined;
47528
47493
  });
47529
47494
  var SseError = class extends Error {
47530
47495
  static {
@@ -47662,10 +47627,10 @@ var StreamableHTTPClientTransport = class {
47662
47627
  });
47663
47628
  if (challenge.resourceMetadataUrl)
47664
47629
  this._resourceMetadataUrl = challenge.resourceMetadataUrl;
47665
- const tokens2 = await this._oauthProvider.tokens();
47666
- const unionScope = computeScopeUnion(this._scope, tokens2?.scope, challenge.scope);
47630
+ const tokens = await this._oauthProvider.tokens();
47631
+ const unionScope = computeScopeUnion(this._scope, tokens?.scope, challenge.scope);
47667
47632
  this._scope = unionScope;
47668
- const forceReauthorization = isStrictScopeSuperset(unionScope, tokens2?.scope);
47633
+ const forceReauthorization = isStrictScopeSuperset(unionScope, tokens?.scope);
47669
47634
  return auth(this._oauthProvider, {
47670
47635
  serverUrl: this._url,
47671
47636
  resourceMetadataUrl: this._resourceMetadataUrl,
@@ -47721,8 +47686,8 @@ var StreamableHTTPClientTransport = class {
47721
47686
  const isIntentionalAbort = () => this._abortController?.signal.aborted === true || requestSignal?.aborted === true;
47722
47687
  try {
47723
47688
  const headers = await this._commonHeaders();
47724
- const types2 = [...headers.get("accept")?.split(",").map((s) => s.trim().toLowerCase()) ?? [], "text/event-stream"];
47725
- headers.set("accept", [...new Set(types2)].join(", "));
47689
+ const types = [...headers.get("accept")?.split(",").map((s) => s.trim().toLowerCase()) ?? [], "text/event-stream"];
47690
+ headers.set("accept", [...new Set(types)].join(", "));
47726
47691
  if (resumptionToken)
47727
47692
  headers.set("last-event-id", resumptionToken);
47728
47693
  const transportSignal = this._abortController?.signal;
@@ -47963,12 +47928,12 @@ var StreamableHTTPClientTransport = class {
47963
47928
  headers.set(name, value);
47964
47929
  }
47965
47930
  headers.set("content-type", "application/json");
47966
- const types2 = [
47931
+ const types = [
47967
47932
  ...headers.get("accept")?.split(",").map((s) => s.trim().toLowerCase()) ?? [],
47968
47933
  "application/json",
47969
47934
  "text/event-stream"
47970
47935
  ];
47971
- headers.set("accept", [...new Set(types2)].join(", "));
47936
+ headers.set("accept", [...new Set(types)].join(", "));
47972
47937
  const transportSignal = this._abortController?.signal;
47973
47938
  const signal = options?.requestSignal !== undefined && transportSignal !== undefined ? anySignal(transportSignal, options.requestSignal) : options?.requestSignal ?? transportSignal;
47974
47939
  const init = {
@@ -48114,7 +48079,7 @@ var StreamableHTTPClientTransport = class {
48114
48079
  }
48115
48080
  };
48116
48081
 
48117
- // ../../node_modules/.bun/@modelcontextprotocol+server@2.4.0/node_modules/@modelcontextprotocol/server/dist/index.mjs
48082
+ // node_modules/@modelcontextprotocol/server/dist/index.mjs
48118
48083
  var DEFAULT_MAX_REQUEST_BODY_SIZE = 4 * 1024 * 1024;
48119
48084
 
48120
48085
  // src/agentSafety.ts
@@ -48130,7 +48095,7 @@ var refuse = (message) => {
48130
48095
  throw new UnsafePlanError(message);
48131
48096
  };
48132
48097
  var triggerOf = (order2) => ("trigger" in order2.t) ? order2.t.trigger : undefined;
48133
- var ordersIn = (plan2) => plan2.steps.flatMap((step) => step.method === "order" ? step.params.orders : []);
48098
+ var ordersIn = (plan) => plan.steps.flatMap((step) => step.method === "order" ? step.params.orders : []);
48134
48099
  var upper = (name) => name.trim().toUpperCase();
48135
48100
  var isSpotAsset = (assetId) => assetId >= SPOT_ASSET_INDEX_OFFSET && assetId < HIP3_ASSET_INDEX_OFFSET;
48136
48101
  var perpMarketOf = async (info, assetId) => {
@@ -48144,11 +48109,11 @@ var perpMarketOf = async (info, assetId) => {
48144
48109
  return (await info.meta({ dex })).universe[indexInDex]?.name;
48145
48110
  };
48146
48111
  var spotPairOf = async (info, assetId) => {
48147
- const { universe, tokens: tokens2 } = await info.spotMeta();
48112
+ const { universe, tokens } = await info.spotMeta();
48148
48113
  const pair = universe.find((entry) => entry.index === assetId - SPOT_ASSET_INDEX_OFFSET);
48149
48114
  if (!pair)
48150
48115
  return;
48151
- const tokenName = (index) => tokens2.find((token) => token.index === index)?.name;
48116
+ const tokenName = (index) => tokens.find((token) => token.index === index)?.name;
48152
48117
  const [base, quote] = pair.tokens;
48153
48118
  return {
48154
48119
  name: pair.name,
@@ -48216,8 +48181,8 @@ var checkOrderPrice = async (info, order2, market) => {
48216
48181
  refuse(`an order on ${named} is priced ${(worse * 100).toFixed(1)}% worse than the live price`);
48217
48182
  }
48218
48183
  };
48219
- var checkAgentPlan = async (plan2, info) => {
48220
- for (const step of plan2.steps) {
48184
+ var checkAgentPlan = async (plan, info) => {
48185
+ for (const step of plan.steps) {
48221
48186
  if (!AGENT_KEY_METHODS.includes(step.method)) {
48222
48187
  refuse(`${step.method} needs the user's own wallet, not your key`);
48223
48188
  }
@@ -48341,8 +48306,8 @@ var askedRequest = (tool, args) => {
48341
48306
  wallet: typeof args.wallet === "string" ? args.wallet : undefined
48342
48307
  };
48343
48308
  };
48344
- var checkEntries = (plan2, asked) => {
48345
- const entries = ordersIn(plan2).filter((order2) => !triggerOf(order2));
48309
+ var checkEntries = (plan, asked) => {
48310
+ const entries = ordersIn(plan).filter((order2) => !triggerOf(order2));
48346
48311
  for (const order2 of entries) {
48347
48312
  if (asked.isBuy !== undefined && order2.b !== asked.isBuy) {
48348
48313
  refuse(`it ${order2.b ? "buys" : "sells"}, the other side from yours`);
@@ -48359,8 +48324,8 @@ var checkEntries = (plan2, asked) => {
48359
48324
  }
48360
48325
  };
48361
48326
  var near = (price, wanted) => Math.abs(price / wanted - 1) <= PRICE_GRID_TOLERANCE;
48362
- var checkLegs = (plan2, asked, closesWithBuy) => {
48363
- for (const order2 of ordersIn(plan2)) {
48327
+ var checkLegs = (plan, asked, closesWithBuy) => {
48328
+ for (const order2 of ordersIn(plan)) {
48364
48329
  const trigger = triggerOf(order2);
48365
48330
  if (!trigger)
48366
48331
  continue;
@@ -48376,9 +48341,9 @@ var checkLegs = (plan2, asked, closesWithBuy) => {
48376
48341
  }
48377
48342
  }
48378
48343
  };
48379
- var checkLeverage = (plan2, leverage, isCross) => {
48344
+ var checkLeverage = (plan, leverage, isCross) => {
48380
48345
  const mode = (cross) => cross ? "cross" : "isolated";
48381
- for (const step of plan2.steps) {
48346
+ for (const step of plan.steps) {
48382
48347
  if (step.method === "updateLeverage" && (step.params.leverage !== leverage || step.params.isCross !== isCross)) {
48383
48348
  refuse(`it sets ${step.params.leverage}x ${mode(step.params.isCross)}, not the ${leverage}x ${mode(isCross)} you asked`);
48384
48349
  }
@@ -48418,27 +48383,27 @@ var checkModify = async ({ oid, order: order2 }, asked, { info, wallet }) => {
48418
48383
  var KIND_RULES = {
48419
48384
  ORDER: {
48420
48385
  methods: ["updateLeverage", "order", "cancel"],
48421
- check: (plan2, asked) => {
48386
+ check: (plan, asked) => {
48422
48387
  const isLong = asked.side === "long";
48423
- checkEntries(plan2, {
48388
+ checkEntries(plan, {
48424
48389
  isBuy: isLong,
48425
48390
  reduceOnly: asked.reduceOnly,
48426
48391
  maxUsd: asked.sizeUsd
48427
48392
  });
48428
- checkLegs(plan2, asked, !isLong);
48429
- checkLeverage(plan2, asked.leverage, false);
48393
+ checkLegs(plan, asked, !isLong);
48394
+ checkLeverage(plan, asked.leverage, false);
48430
48395
  const asksLegs = asked.takeProfitPrice !== undefined || asked.stopLossPrice !== undefined;
48431
- if (!asksLegs && plan2.steps.some((step) => step.method === "cancel")) {
48396
+ if (!asksLegs && plan.steps.some((step) => step.method === "cancel")) {
48432
48397
  refuse("it cancels orders you didn't ask to");
48433
48398
  }
48434
48399
  }
48435
48400
  },
48436
48401
  CLOSE: {
48437
48402
  methods: ["order"],
48438
- check: async (plan2, asked, account) => {
48439
- checkEntries(plan2, { reduceOnly: true });
48440
- checkLegs(plan2, {});
48441
- for (const order2 of ordersIn(plan2)) {
48403
+ check: async (plan, asked, account) => {
48404
+ checkEntries(plan, { reduceOnly: true });
48405
+ checkLegs(plan, {});
48406
+ for (const order2 of ordersIn(plan)) {
48442
48407
  const held = await positionSizeOf(account, order2.a);
48443
48408
  if (!(Number(order2.s) <= held * asked.percent / 100 * (1 + EPSILON))) {
48444
48409
  refuse(`it closes more than ${asked.percent}% of the position`);
@@ -48448,15 +48413,15 @@ var KIND_RULES = {
48448
48413
  },
48449
48414
  CLOSE_ALL: {
48450
48415
  methods: ["order"],
48451
- check: (plan2) => {
48452
- checkEntries(plan2, { reduceOnly: true });
48453
- checkLegs(plan2, {});
48416
+ check: (plan) => {
48417
+ checkEntries(plan, { reduceOnly: true });
48418
+ checkLegs(plan, {});
48454
48419
  }
48455
48420
  },
48456
48421
  CANCEL: {
48457
48422
  methods: ["cancel"],
48458
- check: (plan2, asked) => {
48459
- for (const step of plan2.steps) {
48423
+ check: (plan, asked) => {
48424
+ for (const step of plan.steps) {
48460
48425
  if (step.method !== "cancel")
48461
48426
  continue;
48462
48427
  for (const { o } of step.params.cancels) {
@@ -48471,17 +48436,17 @@ var KIND_RULES = {
48471
48436
  REMOVE_TPSL: { methods: ["cancel"] },
48472
48437
  SET_TPSL: {
48473
48438
  methods: ["order", "cancel"],
48474
- check: (plan2, asked) => {
48475
- if (ordersIn(plan2).some((order2) => !triggerOf(order2))) {
48439
+ check: (plan, asked) => {
48440
+ if (ordersIn(plan).some((order2) => !triggerOf(order2))) {
48476
48441
  refuse("it places an order, not only a take-profit or stop-loss");
48477
48442
  }
48478
- checkLegs(plan2, asked);
48443
+ checkLegs(plan, asked);
48479
48444
  }
48480
48445
  },
48481
48446
  MODIFY_ORDER: {
48482
48447
  methods: ["modify"],
48483
- check: async (plan2, asked, account) => {
48484
- for (const step of plan2.steps) {
48448
+ check: async (plan, asked, account) => {
48449
+ for (const step of plan.steps) {
48485
48450
  if (step.method === "modify") {
48486
48451
  await checkModify(step.params, asked, account);
48487
48452
  }
@@ -48490,13 +48455,13 @@ var KIND_RULES = {
48490
48455
  },
48491
48456
  SET_LEVERAGE: {
48492
48457
  methods: ["updateLeverage"],
48493
- check: (plan2, asked) => checkLeverage(plan2, asked.leverage, asked.marginMode === "cross")
48458
+ check: (plan, asked) => checkLeverage(plan, asked.leverage, asked.marginMode === "cross")
48494
48459
  },
48495
48460
  ADJUST_MARGIN: {
48496
48461
  methods: ["updateIsolatedMargin"],
48497
- check: (plan2, asked) => {
48462
+ check: (plan, asked) => {
48498
48463
  const ntli = Math.trunc(asked.amountUsd * MICRO_USD);
48499
- for (const step of plan2.steps) {
48464
+ for (const step of plan.steps) {
48500
48465
  if (step.method === "updateIsolatedMargin" && step.params.ntli !== ntli) {
48501
48466
  refuse(`it moves $${step.params.ntli / MICRO_USD} of margin, not $${asked.amountUsd}`);
48502
48467
  }
@@ -48505,31 +48470,31 @@ var KIND_RULES = {
48505
48470
  },
48506
48471
  SPOT_ORDER: {
48507
48472
  methods: ["order"],
48508
- check: (plan2, asked) => {
48509
- checkEntries(plan2, {
48473
+ check: (plan, asked) => {
48474
+ checkEntries(plan, {
48510
48475
  isBuy: asked.side === "buy",
48511
48476
  reduceOnly: false,
48512
48477
  maxUsd: asked.sizeUsd
48513
48478
  });
48514
- checkLegs(plan2, {});
48479
+ checkLegs(plan, {});
48515
48480
  }
48516
48481
  },
48517
48482
  PREDICTION_ORDER: {
48518
48483
  methods: ["order"],
48519
- check: (plan2, asked) => {
48484
+ check: (plan, asked) => {
48520
48485
  const isBuy = asked.action === "buy";
48521
- checkEntries(plan2, {
48486
+ checkEntries(plan, {
48522
48487
  isBuy,
48523
48488
  reduceOnly: false,
48524
48489
  maxUsd: isBuy ? asked.sizeUsd ?? 0 : undefined
48525
48490
  });
48526
- checkLegs(plan2, {});
48491
+ checkLegs(plan, {});
48527
48492
  }
48528
48493
  },
48529
48494
  VAULT_TRANSFER: {
48530
48495
  methods: ["vaultTransfer"],
48531
- check: (plan2, asked) => {
48532
- for (const step of plan2.steps) {
48496
+ check: (plan, asked) => {
48497
+ for (const step of plan.steps) {
48533
48498
  if (step.method !== "vaultTransfer")
48534
48499
  continue;
48535
48500
  const { vaultAddress, isDeposit, usd } = step.params;
@@ -48558,12 +48523,12 @@ var assetsOf = (step) => {
48558
48523
  return [];
48559
48524
  }
48560
48525
  };
48561
- var checkMarket = async (info, plan2, asked, claimed) => {
48562
- const assets2 = new Set(plan2.steps.flatMap(assetsOf));
48526
+ var checkMarket = async (info, plan, asked, claimed) => {
48527
+ const assets = new Set(plan.steps.flatMap(assetsOf));
48563
48528
  if (claimed.kind === "PREDICTION_ORDER") {
48564
48529
  const { outcomeId, side } = claimed.params;
48565
48530
  const expected = outcomeAssetId(side === "yes" ? yesCoinId(outcomeId) : noCoinId(outcomeId));
48566
- for (const assetId of assets2) {
48531
+ for (const assetId of assets) {
48567
48532
  if (assetId !== expected) {
48568
48533
  refuse(`it trades asset ${assetId}, not outcome ${outcomeId} ${side}`);
48569
48534
  }
@@ -48573,7 +48538,7 @@ var checkMarket = async (info, plan2, asked, claimed) => {
48573
48538
  if (asked.market === undefined)
48574
48539
  return;
48575
48540
  const wanted = upper(asked.market);
48576
- for (const assetId of assets2) {
48541
+ for (const assetId of assets) {
48577
48542
  if (!(await namesOf(info, assetId)).includes(wanted)) {
48578
48543
  refuse(`it trades asset ${assetId}, which isn't ${asked.market}`);
48579
48544
  }
@@ -48596,7 +48561,8 @@ var SERVER_FILLED = new Set([
48596
48561
  "orderType",
48597
48562
  "reduceOnly",
48598
48563
  "slippagePct",
48599
- "percent"
48564
+ "percent",
48565
+ "marginMode"
48600
48566
  ]);
48601
48567
  var checkAgentRequest = async ({
48602
48568
  claimed,
@@ -48616,18 +48582,18 @@ var checkAgentRequest = async ({
48616
48582
  refuse("Dreamcash's request isn't the one you asked for");
48617
48583
  }
48618
48584
  const rule = KIND_RULES[asked.kind];
48619
- const { plan: plan2 } = claimed;
48620
- for (const step of plan2.steps) {
48585
+ const { plan } = claimed;
48586
+ for (const step of plan.steps) {
48621
48587
  if (!rule.methods.includes(step.method)) {
48622
48588
  refuse(`a ${asked.kind.toLowerCase()} request doesn't ${step.method}`);
48623
48589
  }
48624
48590
  }
48625
- await checkMarket(info, plan2, asked, claimed);
48626
- await rule.check?.(plan2, claimed.params, {
48591
+ await checkMarket(info, plan, asked, claimed);
48592
+ await rule.check?.(plan, claimed.params, {
48627
48593
  info,
48628
48594
  wallet
48629
48595
  });
48630
- await checkAgentPlan(plan2, info);
48596
+ await checkAgentPlan(plan, info);
48631
48597
  };
48632
48598
 
48633
48599
  // src/util.ts
@@ -48705,11 +48671,13 @@ var executeTradeRequest = async ({
48705
48671
  // src/dreamcashServer.ts
48706
48672
  var INSTRUCTIONS = `Dreamcash is a Hyperliquid trading app. This server connects you to the user's Dreamcash account. Until you're connected, connect_dreamcash is your only tool: ask the user for the 6-character code their Dreamcash app shows (Settings › Connected AI) and call it with that code. You then get tools to read their account (balances, positions, orders, history, PnL, XP, vaults) and Hyperliquid markets, and to ask for trades, which the user approves in their Dreamcash app, or, if they let you, to trade on your own with your own key, kept on this machine (Dreamcash never sees it). Once connected, call how_to_use_dreamcash first: it explains every tool, what you may do and how to behave.
48707
48673
 
48708
- Anything that fails answers {"error": {code, what_happened, what_to_do, tell_the_user, can_retry}}: do what_to_do, and pass tell_the_user on to the user. Amounts are USD unless stated. What you suggest is your own analysis, not advice from Dreamcash.`;
48674
+ Anything that fails answers {"error": {code, what_happened, what_to_do, tell_the_user, can_retry}}: do what_to_do, and pass tell_the_user on to the user. Amounts are USD unless stated.
48675
+
48676
+ ${AI_REPLY_STYLE}`;
48709
48677
  var CONNECT_TOOL = {
48710
48678
  name: "connect_dreamcash",
48711
48679
  title: "Connect to Dreamcash",
48712
- description: "Connects you to the user's Dreamcash account with the 6-character code their Dreamcash app shows under Settings › Connected AI. Without a code it answers whether you're connected, and if not, what to ask the user. again: true pairs a new key, e.g. after the user disconnected you; the key before it keeps working until the new one pairs.",
48680
+ description: "Connects you to the user's Dreamcash account with the 6-character code their Dreamcash app shows under Settings › Connected AI. Without a code it answers whether you're connected, and if not, what to ask the user. again: true pairs a new key, e.g. after the user disconnected you, which revoked your key at once (on Hyperliquid and at Dreamcash). If a new pairing fails, the package keeps the key it had, which works only while that connection is still on.",
48713
48681
  inputSchema: {
48714
48682
  type: "object",
48715
48683
  properties: {
@@ -48815,6 +48783,43 @@ var guidanceFor = (error2) => {
48815
48783
  }
48816
48784
  return unreachable(error2);
48817
48785
  };
48786
+ var withExecution = (content, executed) => content.map((block) => {
48787
+ if (block.type !== "text")
48788
+ return block;
48789
+ try {
48790
+ const answer = JSON.parse(block.text);
48791
+ if (answer.execute_with_agent_key !== true)
48792
+ return block;
48793
+ const { execute_with_agent_key: _carriedOut, ...asked } = answer;
48794
+ return {
48795
+ ...block,
48796
+ text: JSON.stringify({
48797
+ ...asked,
48798
+ status: "status" in executed && typeof executed.status === "string" ? executed.status : asked.status,
48799
+ executed_with_your_key: executed
48800
+ })
48801
+ };
48802
+ } catch {
48803
+ return block;
48804
+ }
48805
+ });
48806
+ var fillTotalsOf = (content) => {
48807
+ const text2 = content.find((block) => block.type === "text");
48808
+ if (!text2 || text2.type !== "text")
48809
+ return;
48810
+ try {
48811
+ const { result } = JSON.parse(text2.text);
48812
+ if (typeof result?.fees_usd !== "number")
48813
+ return;
48814
+ return {
48815
+ realized_pnl_usd: result.realized_pnl_usd,
48816
+ fees_usd: result.fees_usd,
48817
+ dreamcash_part_of_fees_usd: result.dreamcash_part_of_fees_usd
48818
+ };
48819
+ } catch {
48820
+ return;
48821
+ }
48822
+ };
48818
48823
  var tradeRequestToExecute = (tool, args, result) => {
48819
48824
  if (result.isError)
48820
48825
  return;
@@ -48999,17 +49004,16 @@ var createDreamcashServer = ({
48999
49004
  const toExecute = tradeRequestToExecute(name, args, result);
49000
49005
  if (!toExecute)
49001
49006
  return result;
49007
+ const executed = await executeWithKey(toExecute.id, toExecute.asked, account);
49008
+ const totals = "status" in executed && executed.status === "executed" ? await client.callTool({
49009
+ name: "get_trade_request",
49010
+ arguments: { request_id: toExecute.id }
49011
+ }).then((readBack) => fillTotalsOf(readBack.content)).catch(() => {
49012
+ return;
49013
+ }) : undefined;
49002
49014
  return {
49003
49015
  ...result,
49004
- content: [
49005
- ...result.content,
49006
- {
49007
- type: "text",
49008
- text: JSON.stringify({
49009
- executed_with_your_key: await executeWithKey(toExecute.id, toExecute.asked, account)
49010
- })
49011
- }
49012
- ]
49016
+ content: withExecution(result.content, { ...executed, ...totals })
49013
49017
  };
49014
49018
  } catch (error2) {
49015
49019
  if (isUnauthorized(error2))