hive-intelligence 1.13.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12509,14 +12509,14 @@ function validateFeedbackInput(input) {
12509
12509
  `Invalid arguments: message is ${message.length} characters; the limit is ${FEEDBACK_MAX_MESSAGE_CHARS}.`
12510
12510
  );
12511
12511
  }
12512
- let tool100 = null;
12512
+ let tool101 = null;
12513
12513
  if (input.tool !== void 0 && input.tool !== null) {
12514
12514
  if (typeof input.tool !== "string" || !isToolNameShaped(input.tool)) {
12515
12515
  throw new FeedbackValidationError(
12516
12516
  "Invalid arguments: tool must be a Hive tool name (lowercase letters, digits and underscores, 3 to 128 characters) or omitted."
12517
12517
  );
12518
12518
  }
12519
- tool100 = input.tool;
12519
+ tool101 = input.tool;
12520
12520
  }
12521
12521
  let receiptId = null;
12522
12522
  if (input.receiptId !== void 0 && input.receiptId !== null) {
@@ -12527,7 +12527,7 @@ function validateFeedbackInput(input) {
12527
12527
  }
12528
12528
  receiptId = input.receiptId.toLowerCase();
12529
12529
  }
12530
- return { message: scrubFeedbackText(message), tool: tool100, receiptId };
12530
+ return { message: scrubFeedbackText(message), tool: tool101, receiptId };
12531
12531
  }
12532
12532
  function withTimeout(promise, ms) {
12533
12533
  return new Promise((resolve, reject) => {
@@ -27197,10 +27197,10 @@ function setupTools(apiClient) {
27197
27197
  ...derivativesVolumesTools(apiClient),
27198
27198
  ...metadataTools(apiClient)
27199
27199
  ];
27200
- toolCategories.forEach((tool100) => {
27201
- const execute = tool100.execute.bind(tool100);
27202
- tools4[tool100.name] = {
27203
- ...tool100,
27200
+ toolCategories.forEach((tool101) => {
27201
+ const execute = tool101.execute.bind(tool101);
27202
+ tools4[tool101.name] = {
27203
+ ...tool101,
27204
27204
  execute: async (args) => normalizeMcpErrorResult(await execute(args))
27205
27205
  };
27206
27206
  });
@@ -31435,8 +31435,8 @@ var CCXT_REQUIRED_BATCH_FILTERS = {
31435
31435
  ccxt_fetch_borrow_rate_histories: "codes",
31436
31436
  ccxt_fetch_all_greeks: "symbols"
31437
31437
  };
31438
- function withCcxtBounds(tool100) {
31439
- const schema = tool100.inputSchema;
31438
+ function withCcxtBounds(tool101) {
31439
+ const schema = tool101.inputSchema;
31440
31440
  const properties = Object.fromEntries(
31441
31441
  Object.entries(schema.properties || {}).map(
31442
31442
  ([name, rawProperty]) => {
@@ -31455,13 +31455,13 @@ function withCcxtBounds(tool100) {
31455
31455
  )
31456
31456
  );
31457
31457
  const required = new Set(schema.required || []);
31458
- const explicitFilter = CCXT_REQUIRED_BATCH_FILTERS[tool100.name];
31458
+ const explicitFilter = CCXT_REQUIRED_BATCH_FILTERS[tool101.name];
31459
31459
  if (explicitFilter) required.add(explicitFilter);
31460
31460
  return {
31461
- ...tool100,
31462
- description: explicitFilter ? `${tool100.description}
31461
+ ...tool101,
31462
+ description: explicitFilter ? `${tool101.description}
31463
31463
 
31464
- Hive safety bound: ${explicitFilter} is required and accepts at most 100 entries; unbounded all-market reads are rejected.` : tool100.description,
31464
+ Hive safety bound: ${explicitFilter} is required and accepts at most 100 entries; unbounded all-market reads are rejected.` : tool101.description,
31465
31465
  inputSchema: {
31466
31466
  ...schema,
31467
31467
  type: "object",
@@ -31472,7 +31472,7 @@ Hive safety bound: ${explicitFilter} is required and accepts at most 100 entries
31472
31472
  };
31473
31473
  }
31474
31474
  var tools = Object.fromEntries(
31475
- Object.entries(rawTools).map(([key, tool100]) => [key, withCcxtBounds(tool100)])
31475
+ Object.entries(rawTools).map(([key, tool101]) => [key, withCcxtBounds(tool101)])
31476
31476
  );
31477
31477
  var exportedHandlers = handlers2;
31478
31478
  var ccxt_default = { metadata: metadata100, tools, handlers: exportedHandlers };
@@ -31587,6 +31587,7 @@ var ResilientHttpClient = class {
31587
31587
  this.axiosInstance = axios2.create({
31588
31588
  baseURL: this.config.baseURL,
31589
31589
  timeout: this.config.timeout,
31590
+ ...config2.maxContentLength ? { maxContentLength: config2.maxContentLength } : {},
31590
31591
  headers: {
31591
31592
  "Content-Type": "application/json",
31592
31593
  Accept: "application/json",
@@ -31728,7 +31729,8 @@ var ResilientHttpClient = class {
31728
31729
  } else {
31729
31730
  if (error instanceof AxiosError) {
31730
31731
  const status = error.response?.status ?? 0;
31731
- if (!status || status >= 500 || status === 429) {
31732
+ const oversized = error.message.includes("maxContentLength");
31733
+ if (!status && !oversized || status >= 500 || status === 429) {
31732
31734
  this.recordFailure(error);
31733
31735
  }
31734
31736
  }
@@ -32588,9 +32590,9 @@ function handleSimulateBundle(clientParam, args) {
32588
32590
  save: sim.save ?? false,
32589
32591
  estimate_gas: sim.estimate_gas ?? true
32590
32592
  };
32591
- const blockNumber = sim.block_number ?? args?.block_number;
32592
- if (typeof blockNumber === "number") {
32593
- simulation.block_number = blockNumber;
32593
+ const blockNumber2 = sim.block_number ?? args?.block_number;
32594
+ if (typeof blockNumber2 === "number") {
32595
+ simulation.block_number = blockNumber2;
32594
32596
  } else {
32595
32597
  delete simulation.block_number;
32596
32598
  }
@@ -32984,7 +32986,7 @@ function makeGatewayTool(key, name, method, description, properties, required, b
32984
32986
  httpPath: "/{network}.gateway.tenderly.co/{accessKey}",
32985
32987
  operationId: `tenderly-${method.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`
32986
32988
  };
32987
- const tool100 = {
32989
+ const tool101 = {
32988
32990
  name,
32989
32991
  title: name.replace(/^tenderly_/, "").replace(/_/g, " ").replace(/\b\w/g, (character) => character.toUpperCase()),
32990
32992
  description: `${description}
@@ -33041,7 +33043,7 @@ Requires TENDERLY_NODE_ACCESS_KEY (or TENDERLY_GATEWAY_ACCESS_KEY). This is a re
33041
33043
  );
33042
33044
  }
33043
33045
  };
33044
- return { key, tool: tool100, metadata: metadata103, handler: handler100 };
33046
+ return { key, tool: tool101, metadata: metadata103, handler: handler100 };
33045
33047
  }
33046
33048
  var accessListProp = {
33047
33049
  type: "array",
@@ -36797,7 +36799,7 @@ function meta(resource, path, method) {
36797
36799
  };
36798
36800
  }
36799
36801
  function dataPost(key, name, description, path, properties, bodyBuilder, required = [], schemaExtensions = {}) {
36800
- const tool100 = makeTool(
36802
+ const tool101 = makeTool(
36801
36803
  name,
36802
36804
  description,
36803
36805
  properties,
@@ -36807,7 +36809,7 @@ function dataPost(key, name, description, path, properties, bodyBuilder, require
36807
36809
  );
36808
36810
  return {
36809
36811
  key,
36810
- tool: tool100,
36812
+ tool: tool101,
36811
36813
  metadata: meta(key.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`), path, "post"),
36812
36814
  handler: async (clientParam, args = {}) => {
36813
36815
  const client2 = resolveClient3(clientParam);
@@ -36822,7 +36824,7 @@ function dataPost(key, name, description, path, properties, bodyBuilder, require
36822
36824
  };
36823
36825
  }
36824
36826
  function dataGet(key, name, description, path, properties, queryBuilder, required = [], schemaExtensions = {}) {
36825
- const tool100 = makeTool(
36827
+ const tool101 = makeTool(
36826
36828
  name,
36827
36829
  description,
36828
36830
  properties,
@@ -36832,7 +36834,7 @@ function dataGet(key, name, description, path, properties, queryBuilder, require
36832
36834
  );
36833
36835
  return {
36834
36836
  key,
36835
- tool: tool100,
36837
+ tool: tool101,
36836
36838
  metadata: meta(key.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`), path, "get"),
36837
36839
  handler: async (clientParam, args = {}) => {
36838
36840
  const client2 = resolveClient3(clientParam);
@@ -36847,7 +36849,7 @@ function dataGet(key, name, description, path, properties, queryBuilder, require
36847
36849
  };
36848
36850
  }
36849
36851
  function nftGet(key, name, description, path, properties, queryBuilder, required = [], annotations = volatileAnnotations3, schemaExtensions = {}) {
36850
- const tool100 = makeTool(
36852
+ const tool101 = makeTool(
36851
36853
  name,
36852
36854
  description,
36853
36855
  properties,
@@ -36857,7 +36859,7 @@ function nftGet(key, name, description, path, properties, queryBuilder, required
36857
36859
  );
36858
36860
  return {
36859
36861
  key,
36860
- tool: tool100,
36862
+ tool: tool101,
36861
36863
  metadata: meta(`nft.${key.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`)}`, path, "get"),
36862
36864
  handler: async (clientParam, args = {}) => {
36863
36865
  const client2 = resolveClient3(clientParam);
@@ -36877,7 +36879,7 @@ function nftGet(key, name, description, path, properties, queryBuilder, required
36877
36879
  };
36878
36880
  }
36879
36881
  function nftPost(key, name, description, path, properties, bodyBuilder, required = [], annotations = volatileAnnotations3, schemaExtensions = {}) {
36880
- const tool100 = makeTool(
36882
+ const tool101 = makeTool(
36881
36883
  name,
36882
36884
  description,
36883
36885
  properties,
@@ -36887,7 +36889,7 @@ function nftPost(key, name, description, path, properties, bodyBuilder, required
36887
36889
  );
36888
36890
  return {
36889
36891
  key,
36890
- tool: tool100,
36892
+ tool: tool101,
36891
36893
  metadata: meta(`nft.${key.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`)}`, path, "post"),
36892
36894
  handler: async (clientParam, args = {}) => {
36893
36895
  const client2 = resolveClient3(clientParam);
@@ -36907,7 +36909,7 @@ function nftPost(key, name, description, path, properties, bodyBuilder, required
36907
36909
  };
36908
36910
  }
36909
36911
  function rpcTool(key, name, description, method, properties, paramsBuilder, required = [], schemaExtensions = {}, defaultNetwork = "eth-mainnet") {
36910
- const tool100 = makeTool(
36912
+ const tool101 = makeTool(
36911
36913
  name,
36912
36914
  description,
36913
36915
  properties,
@@ -36917,7 +36919,7 @@ function rpcTool(key, name, description, method, properties, paramsBuilder, requ
36917
36919
  );
36918
36920
  return {
36919
36921
  key,
36920
- tool: tool100,
36922
+ tool: tool101,
36921
36923
  metadata: meta(`rpc.${key.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`)}`, "/v2/{apiKey}", "post"),
36922
36924
  handler: async (clientParam, args = {}) => {
36923
36925
  const client2 = resolveClient3(clientParam);
@@ -38691,8 +38693,8 @@ var ALCHEMY_ARRAY_LIMITS = {
38691
38693
  networks: 20,
38692
38694
  category: 10
38693
38695
  };
38694
- function withAlchemyBounds(tool100) {
38695
- const schema = tool100.inputSchema;
38696
+ function withAlchemyBounds(tool101) {
38697
+ const schema = tool101.inputSchema;
38696
38698
  const properties = Object.fromEntries(
38697
38699
  Object.entries(schema.properties || {}).map(
38698
38700
  ([name, rawProperty]) => {
@@ -38714,7 +38716,7 @@ function withAlchemyBounds(tool100) {
38714
38716
  }
38715
38717
  )
38716
38718
  );
38717
- return { ...tool100, inputSchema: { ...schema, properties } };
38719
+ return { ...tool101, inputSchema: { ...schema, properties } };
38718
38720
  }
38719
38721
  var activeDefinitions = definitions.map((definition) => ({
38720
38722
  ...definition,
@@ -39103,17 +39105,17 @@ var HEADROOM_TOOL_PATTERNS = [
39103
39105
  function toolNeedsResponseHeadroom(toolName) {
39104
39106
  return HEADROOM_TOOL_PATTERNS.some((pattern) => pattern.test(toolName));
39105
39107
  }
39106
- function getAnnotatedMaxResultSizeChars(tool100) {
39107
- const meta2 = tool100?._meta;
39108
+ function getAnnotatedMaxResultSizeChars(tool101) {
39109
+ const meta2 = tool101?._meta;
39108
39110
  const value = meta2?.[MAX_RESULT_SIZE_META_KEY];
39109
39111
  return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : null;
39110
39112
  }
39111
- function withResponseHeadroomMeta(tool100) {
39112
- if (!toolNeedsResponseHeadroom(tool100.name)) return tool100;
39113
- const existing = tool100._meta;
39114
- if (existing && existing[MAX_RESULT_SIZE_META_KEY] !== void 0) return tool100;
39113
+ function withResponseHeadroomMeta(tool101) {
39114
+ if (!toolNeedsResponseHeadroom(tool101.name)) return tool101;
39115
+ const existing = tool101._meta;
39116
+ if (existing && existing[MAX_RESULT_SIZE_META_KEY] !== void 0) return tool101;
39115
39117
  return {
39116
- ...tool100,
39118
+ ...tool101,
39117
39119
  _meta: {
39118
39120
  ...existing ?? {},
39119
39121
  [MAX_RESULT_SIZE_META_KEY]: ANNOTATED_MAX_RESULT_SIZE_CHARS
@@ -42044,13 +42046,13 @@ function historyInputSchema(baseCoinDescription) {
42044
42046
  required: ["base_coin"]
42045
42047
  };
42046
42048
  }
42047
- function errorResult2(tool100, error) {
42049
+ function errorResult2(tool101, error) {
42048
42050
  if (error instanceof ArchiveInputError) {
42049
42051
  return asTextContentResult(
42050
42052
  {
42051
42053
  error: error.message,
42052
42054
  runtime_status: "invalid_input",
42053
- tool: tool100
42055
+ tool: tool101
42054
42056
  },
42055
42057
  true
42056
42058
  );
@@ -42060,17 +42062,17 @@ function errorResult2(tool100, error) {
42060
42062
  {
42061
42063
  error: message,
42062
42064
  runtime_status: classifyRuntimeStatusFromError(message),
42063
- tool: tool100
42065
+ tool: tool101
42064
42066
  },
42065
42067
  true
42066
42068
  );
42067
42069
  }
42068
- function missingCredentialsResult(tool100) {
42070
+ function missingCredentialsResult(tool101) {
42069
42071
  return asTextContentResult(
42070
42072
  {
42071
42073
  error: ARCHIVE_MISSING_CREDENTIALS_MESSAGE,
42072
42074
  runtime_status: "missing_key",
42073
- tool: tool100
42075
+ tool: tool101
42074
42076
  },
42075
42077
  true
42076
42078
  );
@@ -43198,13 +43200,13 @@ function okResult(sourceUrl, body) {
43198
43200
  may_have_more
43199
43201
  });
43200
43202
  }
43201
- function errorResult3(tool100, error) {
43203
+ function errorResult3(tool101, error) {
43202
43204
  if (error instanceof PolymarketInputError) {
43203
43205
  return asTextContentResult(
43204
43206
  {
43205
43207
  error: error.message,
43206
43208
  runtime_status: "invalid_input",
43207
- tool: tool100
43209
+ tool: tool101
43208
43210
  },
43209
43211
  true
43210
43212
  );
@@ -43214,7 +43216,7 @@ function errorResult3(tool100, error) {
43214
43216
  {
43215
43217
  error: message,
43216
43218
  runtime_status: classifyRuntimeStatusFromError(message),
43217
- tool: tool100
43219
+ tool: tool101
43218
43220
  },
43219
43221
  true
43220
43222
  );
@@ -44720,10 +44722,10 @@ async function fetchHackRows() {
44720
44722
  }
44721
44723
 
44722
44724
  // src/tools/signals/tools.ts
44723
- function errorResult4(tool100, error, extra = {}) {
44725
+ function errorResult4(tool101, error, extra = {}) {
44724
44726
  if (error instanceof SignalsInputError) {
44725
44727
  return asTextContentResult(
44726
- { error: error.message, runtime_status: "invalid_input", tool: tool100, ...extra },
44728
+ { error: error.message, runtime_status: "invalid_input", tool: tool101, ...extra },
44727
44729
  true
44728
44730
  );
44729
44731
  }
@@ -44732,7 +44734,7 @@ function errorResult4(tool100, error, extra = {}) {
44732
44734
  {
44733
44735
  error: message,
44734
44736
  runtime_status: classifyRuntimeStatusFromError(message),
44735
- tool: tool100,
44737
+ tool: tool101,
44736
44738
  ...extra
44737
44739
  },
44738
44740
  true
@@ -45437,6 +45439,822 @@ Don't use when:
45437
45439
  ];
45438
45440
  }
45439
45441
 
45442
+ // src/tools/goldsky/tools.ts
45443
+ var GOLDSKY_PROVIDER = "Goldsky";
45444
+ var EDGE_BASE_URL = "https://edge.goldsky.com";
45445
+ var MAX_LOG_BLOCK_SPAN = 999;
45446
+ var MAX_UNFILTERED_LOG_BLOCK_SPAN = 9;
45447
+ var MAX_RESPONSE_BYTES = 8 * 1024 * 1024;
45448
+ var MAX_TRACE_FILTER_BLOCK_SPAN = 1e3;
45449
+ var CHAIN_IDS = {
45450
+ ethereum: 1,
45451
+ mainnet: 1,
45452
+ eth: 1,
45453
+ base: 8453,
45454
+ arbitrum: 42161,
45455
+ arbitrum_one: 42161,
45456
+ optimism: 10,
45457
+ polygon: 137,
45458
+ bsc: 56,
45459
+ bnb: 56,
45460
+ hyperevm: 999,
45461
+ avalanche: 43114,
45462
+ linea: 59144,
45463
+ scroll: 534352,
45464
+ zksync: 324,
45465
+ unichain: 130,
45466
+ sonic: 146,
45467
+ berachain: 80094,
45468
+ mantle: 5e3,
45469
+ blast: 81457,
45470
+ monad: 143,
45471
+ worldchain: 480,
45472
+ plasma: 9745,
45473
+ megaeth: 4326,
45474
+ sei: 1329,
45475
+ gnosis: 100,
45476
+ celo: 42220,
45477
+ ink: 57073,
45478
+ katana: 747474,
45479
+ abstract: 2741,
45480
+ robinhood: 4663,
45481
+ tron: 728126428
45482
+ };
45483
+ var FEEDS_CHAINS = {
45484
+ ethereum: "ethereum",
45485
+ eth: "ethereum",
45486
+ mainnet: "ethereum",
45487
+ base: "base",
45488
+ arbitrum: "arbitrum_one",
45489
+ arbitrum_one: "arbitrum_one",
45490
+ optimism: "optimism",
45491
+ polygon: "polygon",
45492
+ bsc: "bsc",
45493
+ bnb: "bsc",
45494
+ robinhood: "robinhood",
45495
+ arc: "arc"
45496
+ };
45497
+ var READ_METHODS = [
45498
+ "eth_blockNumber",
45499
+ "eth_chainId",
45500
+ "eth_gasPrice",
45501
+ "eth_maxPriorityFeePerGas",
45502
+ "eth_blobBaseFee",
45503
+ "eth_feeHistory",
45504
+ "eth_syncing",
45505
+ "eth_getBalance",
45506
+ "eth_getCode",
45507
+ "eth_getStorageAt",
45508
+ "eth_getTransactionCount",
45509
+ "eth_getProof",
45510
+ "eth_getTransactionByHash",
45511
+ "eth_getTransactionByBlockNumberAndIndex",
45512
+ "eth_getTransactionByBlockHashAndIndex",
45513
+ "eth_getTransactionReceipt",
45514
+ "eth_getBlockByNumber",
45515
+ "eth_getBlockByHash",
45516
+ "eth_getBlockReceipts",
45517
+ "eth_getBlockTransactionCountByNumber",
45518
+ "eth_getBlockTransactionCountByHash",
45519
+ "eth_call",
45520
+ "eth_estimateGas",
45521
+ "eth_createAccessList",
45522
+ "net_version",
45523
+ "web3_clientVersion"
45524
+ ];
45525
+ var ADDRESS = /^0x[0-9a-fA-F]{40}$/;
45526
+ var HEX_DATA = /^0x(?:[0-9a-fA-F]{2})*$/;
45527
+ var TX_HASH = /^0x[0-9a-fA-F]{64}$/;
45528
+ var HEX_QUANTITY = /^0x[0-9a-fA-F]+$/;
45529
+ var BLOCK_TAGS = ["latest", "safe", "finalized", "earliest", "pending"];
45530
+ var chainProp = {
45531
+ oneOf: [{ type: "string" }, { type: "integer", minimum: 1 }],
45532
+ default: "ethereum",
45533
+ description: `EVM chain: a name (${Object.keys(CHAIN_IDS).filter((name) => !["mainnet", "eth", "arbitrum_one", "bnb"].includes(name)).join(
45534
+ ", "
45535
+ )}) or any numeric chain id Goldsky Edge serves (about 150 mainnets).`
45536
+ };
45537
+ var blockProp = {
45538
+ type: "string",
45539
+ default: "latest",
45540
+ description: "Block tag (latest, safe, finalized, earliest) or a hex block number. Historical blocks are served from archive nodes."
45541
+ };
45542
+ var edgeClient = null;
45543
+ function getEdgeClient() {
45544
+ if (!edgeClient) {
45545
+ edgeClient = createHttpClient({
45546
+ baseURL: EDGE_BASE_URL,
45547
+ serviceName: "GoldskyEdge",
45548
+ timeout: 3e4,
45549
+ headers: {
45550
+ Accept: "application/json",
45551
+ "Content-Type": "application/json"
45552
+ },
45553
+ maxRetries: 2,
45554
+ retryBaseDelay: 500,
45555
+ maxContentLength: MAX_RESPONSE_BYTES
45556
+ });
45557
+ }
45558
+ return edgeClient;
45559
+ }
45560
+ function requireKey(name) {
45561
+ const key = getEnvVar(name);
45562
+ if (!key)
45563
+ throw new Error(`Goldsky API key not configured (${name} is not set).`);
45564
+ return key;
45565
+ }
45566
+ function resolveChainId(value) {
45567
+ const raw = String(value ?? "ethereum").trim().toLowerCase();
45568
+ if (/^\d+$/.test(raw)) {
45569
+ const id2 = Number(raw);
45570
+ if (Number.isSafeInteger(id2) && id2 > 0) return id2;
45571
+ }
45572
+ const id = CHAIN_IDS[raw.replace(/[\s-]+/g, "_")];
45573
+ if (id) return id;
45574
+ throw new SignalsInputError(
45575
+ `unknown chain "${value}". Use one of ${Object.keys(CHAIN_IDS).join(", ")}, or a numeric chain id.`
45576
+ );
45577
+ }
45578
+ function requirePattern(value, pattern, field, hint) {
45579
+ if (typeof value !== "string" || !pattern.test(value)) {
45580
+ throw new SignalsInputError(`${field} must be ${hint}.`);
45581
+ }
45582
+ return value;
45583
+ }
45584
+ function blockArg(value) {
45585
+ const block = value === void 0 ? "latest" : String(value);
45586
+ if (BLOCK_TAGS.includes(block) || HEX_QUANTITY.test(block)) return block;
45587
+ throw new SignalsInputError(
45588
+ "block must be a block tag (latest, safe, finalized, earliest) or a hex block number such as 0x1312d00."
45589
+ );
45590
+ }
45591
+ function blockNumber(value, field) {
45592
+ return BigInt(
45593
+ requirePattern(
45594
+ value,
45595
+ HEX_QUANTITY,
45596
+ field,
45597
+ "a hex block number such as 0x1312d00"
45598
+ )
45599
+ );
45600
+ }
45601
+ function boundedInt(value, fallback, min, max, field) {
45602
+ if (value === void 0) return fallback;
45603
+ const n = Number(value);
45604
+ if (!Number.isInteger(n) || n < min || n > max) {
45605
+ throw new SignalsInputError(
45606
+ `${field} must be an integer from ${min} to ${max}.`
45607
+ );
45608
+ }
45609
+ return n;
45610
+ }
45611
+ async function edgeRpc(chainId, method, params) {
45612
+ const key = requireKey("GOLDSKY_EDGE_API_KEY");
45613
+ let response;
45614
+ try {
45615
+ response = await getEdgeClient().post(
45616
+ `/standard/evm/${chainId}`,
45617
+ {
45618
+ body: { jsonrpc: "2.0", id: 1, method, params },
45619
+ headers: { Authorization: `Bearer ${key}` }
45620
+ }
45621
+ );
45622
+ } catch (error) {
45623
+ const message = error instanceof Error ? error.message : String(error);
45624
+ if (message.includes("maxContentLength")) {
45625
+ throw new SignalsInputError(
45626
+ `${method} returned more than ${MAX_RESPONSE_BYTES / 1024 / 1024} MB. Narrow the block range, add an address or topic filter, or lower the count.`
45627
+ );
45628
+ }
45629
+ if (/network 'evm:\d+'/i.test(message)) {
45630
+ throw new SignalsInputError(
45631
+ `chain id ${chainId} is not served by Goldsky Edge. Pass a supported chain name or id (https://docs.goldsky.com/chains/supported-networks).`
45632
+ );
45633
+ }
45634
+ throw error;
45635
+ }
45636
+ if (response?.error) {
45637
+ const { code, message = "unknown error" } = response.error;
45638
+ if (code === -32602 || code === -32600 || code === -32012 || code === 3 || /revert/i.test(message)) {
45639
+ throw new SignalsInputError(
45640
+ `Goldsky Edge rejected ${method} (${code}): ${message}`
45641
+ );
45642
+ }
45643
+ throw new Error(`Goldsky Edge ${method} failed (${code}): ${message}`);
45644
+ }
45645
+ return response?.result ?? null;
45646
+ }
45647
+ async function feedsGet(path, query) {
45648
+ const key = requireKey("GOLDSKY_DATA_API_KEY");
45649
+ const params = Object.fromEntries(
45650
+ Object.entries(query).filter(([, v]) => v !== void 0)
45651
+ );
45652
+ return getEdgeClient().get(
45653
+ `/data/feeds/wallets/${path}`,
45654
+ {
45655
+ params,
45656
+ headers: { "X-API-Key": key }
45657
+ }
45658
+ );
45659
+ }
45660
+ function feedsChains(value) {
45661
+ if (value === void 0 || value === "") return void 0;
45662
+ const names = Array.isArray(value) ? value : String(value).split(",");
45663
+ return names.map((name) => {
45664
+ const slug = FEEDS_CHAINS[String(name).trim().toLowerCase()];
45665
+ if (!slug) {
45666
+ throw new SignalsInputError(
45667
+ `Feeds does not cover chain "${name}". Supported: ethereum, base, arbitrum, optimism, polygon, bsc, robinhood, arc.`
45668
+ );
45669
+ }
45670
+ return slug;
45671
+ }).join(",");
45672
+ }
45673
+ function walletAddress(args) {
45674
+ return requirePattern(
45675
+ args.address,
45676
+ ADDRESS,
45677
+ "address",
45678
+ "an EVM address (0x + 40 hex digits)"
45679
+ );
45680
+ }
45681
+ function tool100(name, resource, tags, description, properties, required, run) {
45682
+ return {
45683
+ metadata: {
45684
+ resource,
45685
+ operation: "read",
45686
+ tags: ["goldsky", "onchain", ...tags]
45687
+ },
45688
+ tool: {
45689
+ name,
45690
+ description,
45691
+ inputSchema: {
45692
+ type: "object",
45693
+ properties,
45694
+ required,
45695
+ additionalProperties: false
45696
+ },
45697
+ annotations: VOLATILE_READ_ANNOTATIONS
45698
+ },
45699
+ handler: async (_client, args) => {
45700
+ try {
45701
+ return asTextContentResult({
45702
+ provider: GOLDSKY_PROVIDER,
45703
+ ...await run(args ?? {})
45704
+ });
45705
+ } catch (error) {
45706
+ const message = error instanceof Error ? error.message : String(error);
45707
+ return asTextContentResult(
45708
+ {
45709
+ error: message,
45710
+ runtime_status: error instanceof SignalsInputError ? "invalid_input" : classifyRuntimeStatusFromError(message),
45711
+ tool: name,
45712
+ provider: GOLDSKY_PROVIDER
45713
+ },
45714
+ true
45715
+ );
45716
+ }
45717
+ }
45718
+ };
45719
+ }
45720
+ function getAllGoldskyEndpoints() {
45721
+ return [
45722
+ tool100(
45723
+ "goldsky_rpc_call",
45724
+ "goldsky.rpc.call",
45725
+ ["rpc", "evm", "network", "blocks", "transactions"],
45726
+ `Run one read-only EVM JSON-RPC method on any chain Goldsky Edge serves (about 150 mainnets, including HyperEVM, Monad, Sonic, Berachain, Plasma and Tron), with archive history. Writes are refused.
45727
+
45728
+ Args:
45729
+ - chain (string or integer, default ethereum): chain name or numeric chain id.
45730
+ - method (string, required): one of ${READ_METHODS.join(", ")}.
45731
+ - params (array, default []): the method's positional JSON-RPC params, e.g. ["0xd8dA...6045", "latest"] for eth_getBalance.
45732
+
45733
+ Returns: { "provider": "Goldsky", "chain_id", "method", "result" } with the raw JSON-RPC result (hex quantities stay hex).
45734
+
45735
+ Examples:
45736
+ - { "chain": "hyperevm", "method": "eth_blockNumber" }
45737
+ - { "chain": 8453, "method": "eth_getTransactionReceipt", "params": ["0x<64 hex>"] }
45738
+
45739
+ Use when: you need a node read on a chain other tools do not cover, or a method like eth_getProof, eth_getStorageAt or eth_feeHistory.
45740
+ Don't use when: you need logs (goldsky_get_logs), traces (goldsky_trace_transaction) or a contract read (goldsky_call_contract).`,
45741
+ {
45742
+ chain: chainProp,
45743
+ method: {
45744
+ type: "string",
45745
+ enum: [...READ_METHODS],
45746
+ description: "Read-only JSON-RPC method."
45747
+ },
45748
+ params: {
45749
+ type: "array",
45750
+ maxItems: 8,
45751
+ items: {},
45752
+ default: [],
45753
+ description: "Positional JSON-RPC params."
45754
+ }
45755
+ },
45756
+ ["method"],
45757
+ async (args) => {
45758
+ const chainId = resolveChainId(args.chain);
45759
+ const method = String(args.method);
45760
+ if (!READ_METHODS.includes(method)) {
45761
+ throw new SignalsInputError(
45762
+ `method must be one of ${READ_METHODS.join(", ")}.`
45763
+ );
45764
+ }
45765
+ const params = args.params ?? [];
45766
+ if (!Array.isArray(params))
45767
+ throw new SignalsInputError("params must be an array.");
45768
+ return {
45769
+ chain_id: chainId,
45770
+ method,
45771
+ result: await edgeRpc(chainId, method, params)
45772
+ };
45773
+ }
45774
+ ),
45775
+ tool100(
45776
+ "goldsky_call_contract",
45777
+ "goldsky.rpc.eth_call",
45778
+ ["rpc", "evm", "contracts", "state"],
45779
+ `Read a smart contract's state with eth_call on any Goldsky Edge chain, at the latest or any historical block: pool reserves, vault balances, lending positions, token balanceOf, oracle prices. Read-only; nothing is signed or sent.
45780
+
45781
+ Args:
45782
+ - chain (string or integer, default ethereum): chain name or numeric chain id.
45783
+ - to (string, required): contract address.
45784
+ - data (string, required): ABI-encoded calldata (4-byte selector plus arguments), e.g. 0x18160ddd for totalSupply().
45785
+ - from (string, optional): caller address, for contracts that branch on msg.sender.
45786
+ - block (string, default latest): block tag or hex block number.
45787
+
45788
+ Returns: { "provider": "Goldsky", "chain_id", "to", "block", "result" } where result is the ABI-encoded return value as hex. A revert returns invalid_input with the reason.
45789
+
45790
+ Example: { "chain": "ethereum", "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "data": "0x18160ddd" }
45791
+
45792
+ Use when: the answer lives in contract storage and no typed tool exposes it.
45793
+ Don't use when: you want to simulate a state-changing transaction (use tenderly_simulate_transaction).`,
45794
+ {
45795
+ chain: chainProp,
45796
+ to: {
45797
+ type: "string",
45798
+ pattern: ADDRESS.source,
45799
+ description: "Contract address."
45800
+ },
45801
+ data: {
45802
+ type: "string",
45803
+ pattern: HEX_DATA.source,
45804
+ maxLength: 2e4,
45805
+ description: "ABI-encoded calldata (0x...)."
45806
+ },
45807
+ from: {
45808
+ type: "string",
45809
+ pattern: ADDRESS.source,
45810
+ description: "Optional caller address."
45811
+ },
45812
+ block: blockProp
45813
+ },
45814
+ ["to", "data"],
45815
+ async (args) => {
45816
+ const chainId = resolveChainId(args.chain);
45817
+ const to = requirePattern(
45818
+ args.to,
45819
+ ADDRESS,
45820
+ "to",
45821
+ "a contract address (0x + 40 hex digits)"
45822
+ );
45823
+ const data = requirePattern(
45824
+ args.data,
45825
+ HEX_DATA,
45826
+ "data",
45827
+ "hex calldata (0x + an even number of hex digits)"
45828
+ );
45829
+ const call = { to, data };
45830
+ if (args.from !== void 0)
45831
+ call.from = requirePattern(
45832
+ args.from,
45833
+ ADDRESS,
45834
+ "from",
45835
+ "an EVM address"
45836
+ );
45837
+ const block = blockArg(args.block);
45838
+ return {
45839
+ chain_id: chainId,
45840
+ to,
45841
+ block,
45842
+ result: await edgeRpc(chainId, "eth_call", [call, block])
45843
+ };
45844
+ }
45845
+ ),
45846
+ tool100(
45847
+ "goldsky_get_logs",
45848
+ "goldsky.rpc.eth_getLogs",
45849
+ ["rpc", "evm", "logs", "events"],
45850
+ `Fetch EVM event logs (eth_getLogs) on any Goldsky Edge chain for one block hash or a block range of at most ${MAX_LOG_BLOCK_SPAN + 1} blocks, filtered by contract address and topics. Archive history included.
45851
+
45852
+ Args:
45853
+ - chain (string or integer, default ethereum): chain name or numeric chain id.
45854
+ - from_block / to_block (hex strings): inclusive range, to_block - from_block at most ${MAX_LOG_BLOCK_SPAN} with an address or topic0 filter, or ${MAX_UNFILTERED_LOG_BLOCK_SPAN} without one. Or pass block_hash instead. Responses over ${MAX_RESPONSE_BYTES / 1024 / 1024} MB are refused; narrow the query.
45855
+ - address (string or array of up to 20 strings, optional): emitting contracts.
45856
+ - topics (array, optional): up to 4 topic filters (topic0 is the event signature hash; null matches anything).
45857
+ - limit (integer, default 100, max 1000): logs returned; total_logs reports how many matched.
45858
+
45859
+ Returns: { "provider": "Goldsky", "chain_id", "from_block", "to_block", "block_hash", "total_logs", "returned", "truncated", "logs": [raw log objects] }.
45860
+
45861
+ Example: { "chain": "base", "from_block": "0x3270000", "to_block": "0x32703e7", "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"], "limit": 20 }
45862
+
45863
+ Use when: you need raw events from a specific contract or block range.
45864
+ Don't use when: you want a wallet's transfer history (use goldsky_get_wallet_transfers or get_wallet_transfers).`,
45865
+ {
45866
+ chain: chainProp,
45867
+ from_block: {
45868
+ type: "string",
45869
+ pattern: HEX_QUANTITY.source,
45870
+ description: "Inclusive start block (hex)."
45871
+ },
45872
+ to_block: {
45873
+ type: "string",
45874
+ pattern: HEX_QUANTITY.source,
45875
+ description: "Inclusive end block (hex)."
45876
+ },
45877
+ block_hash: {
45878
+ type: "string",
45879
+ pattern: TX_HASH.source,
45880
+ description: "Single block hash, instead of a range."
45881
+ },
45882
+ address: {
45883
+ oneOf: [
45884
+ { type: "string", pattern: ADDRESS.source },
45885
+ {
45886
+ type: "array",
45887
+ minItems: 1,
45888
+ maxItems: 20,
45889
+ items: { type: "string", pattern: ADDRESS.source }
45890
+ }
45891
+ ],
45892
+ description: "Emitting contract address or addresses."
45893
+ },
45894
+ topics: {
45895
+ type: "array",
45896
+ maxItems: 4,
45897
+ items: {},
45898
+ description: "Topic filters; null matches any."
45899
+ },
45900
+ limit: {
45901
+ type: "integer",
45902
+ minimum: 1,
45903
+ maximum: 1e3,
45904
+ default: 100,
45905
+ description: "Logs to return."
45906
+ }
45907
+ },
45908
+ [],
45909
+ async (args) => {
45910
+ const chainId = resolveChainId(args.chain);
45911
+ const limit = boundedInt(args.limit, 100, 1, 1e3, "limit");
45912
+ const filter = {};
45913
+ if (args.block_hash !== void 0) {
45914
+ filter.blockHash = requirePattern(
45915
+ args.block_hash,
45916
+ TX_HASH,
45917
+ "block_hash",
45918
+ "a block hash (0x + 64 hex digits)"
45919
+ );
45920
+ } else {
45921
+ const from = blockNumber(args.from_block, "from_block");
45922
+ const to = blockNumber(args.to_block, "to_block");
45923
+ const filtered = args.address !== void 0 || Array.isArray(args.topics) && args.topics[0] != null;
45924
+ const span = filtered ? MAX_LOG_BLOCK_SPAN : MAX_UNFILTERED_LOG_BLOCK_SPAN;
45925
+ if (to < from || to - from > BigInt(span)) {
45926
+ throw new SignalsInputError(
45927
+ `from_block..to_block must be ordered and span at most ${span + 1} blocks${filtered ? "" : " without an address or topic0 filter"}; split wider ranges into windows.`
45928
+ );
45929
+ }
45930
+ filter.fromBlock = args.from_block;
45931
+ filter.toBlock = args.to_block;
45932
+ }
45933
+ if (args.address !== void 0) filter.address = args.address;
45934
+ if (args.topics !== void 0) filter.topics = args.topics;
45935
+ const logs = await edgeRpc(chainId, "eth_getLogs", [filter]);
45936
+ const rows = Array.isArray(logs) ? logs : [];
45937
+ return {
45938
+ chain_id: chainId,
45939
+ from_block: filter.fromBlock ?? null,
45940
+ to_block: filter.toBlock ?? null,
45941
+ block_hash: filter.blockHash ?? null,
45942
+ total_logs: rows.length,
45943
+ returned: Math.min(rows.length, limit),
45944
+ truncated: rows.length > limit,
45945
+ logs: rows.slice(0, limit)
45946
+ };
45947
+ }
45948
+ ),
45949
+ tool100(
45950
+ "goldsky_trace_transaction",
45951
+ "goldsky.rpc.trace_transaction",
45952
+ ["rpc", "evm", "traces", "transactions", "internal"],
45953
+ `Trace an EVM transaction on any Goldsky Edge chain: every internal call, value transfer, contract creation and revert. Archive history included.
45954
+
45955
+ Args:
45956
+ - chain (string or integer, default ethereum): chain name or numeric chain id.
45957
+ - tx_hash (string, required): transaction hash.
45958
+ - format (string, default call_tree): "call_tree" returns a nested call tree (debug_traceTransaction with callTracer: type, from, to, value, gas, input, output, error, calls); "flat" returns Parity-style trace rows (trace_transaction, with traceAddress and subtraces).
45959
+
45960
+ Returns: { "provider": "Goldsky", "chain_id", "tx_hash", "format", "trace" }.
45961
+
45962
+ Example: { "chain": "ethereum", "tx_hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" }
45963
+
45964
+ Use when: you need internal ETH movements or the call path behind a transaction.
45965
+ Don't use when: you need decoded calldata only (use tenderly_decode_calldata).`,
45966
+ {
45967
+ chain: chainProp,
45968
+ tx_hash: {
45969
+ type: "string",
45970
+ pattern: TX_HASH.source,
45971
+ description: "Transaction hash."
45972
+ },
45973
+ format: {
45974
+ type: "string",
45975
+ enum: ["call_tree", "flat"],
45976
+ default: "call_tree",
45977
+ description: "Nested call tree or flat trace rows."
45978
+ }
45979
+ },
45980
+ ["tx_hash"],
45981
+ async (args) => {
45982
+ const chainId = resolveChainId(args.chain);
45983
+ const txHash = requirePattern(
45984
+ args.tx_hash,
45985
+ TX_HASH,
45986
+ "tx_hash",
45987
+ "a transaction hash (0x + 64 hex digits)"
45988
+ );
45989
+ const format = args.format === "flat" ? "flat" : "call_tree";
45990
+ const trace = format === "flat" ? await edgeRpc(chainId, "trace_transaction", [txHash]) : await edgeRpc(chainId, "debug_traceTransaction", [
45991
+ txHash,
45992
+ { tracer: "callTracer" }
45993
+ ]);
45994
+ return { chain_id: chainId, tx_hash: txHash, format, trace };
45995
+ }
45996
+ ),
45997
+ tool100(
45998
+ "goldsky_trace_filter",
45999
+ "goldsky.rpc.trace_filter",
46000
+ ["rpc", "evm", "traces", "internal", "wallets"],
46001
+ `Find internal calls and value transfers to or from given addresses over a block range (trace_filter) on any Goldsky Edge chain that supports Parity traces. Catches internal ETH movements that transfer logs miss, such as who funded a wallet through a contract.
46002
+
46003
+ Args:
46004
+ - chain (string or integer, default ethereum): chain name or numeric chain id.
46005
+ - from_block / to_block (hex strings, required): inclusive range, at most ${MAX_TRACE_FILTER_BLOCK_SPAN.toLocaleString("en-US")} blocks (about 3 hours on Ethereum); walk wider windows one range at a time.
46006
+ - from_address / to_address (arrays of up to 10 addresses): at least one of the two is required.
46007
+ - count (integer, default 50, max 200): traces returned.
46008
+ - after (integer, default 0): traces to skip, for paging.
46009
+
46010
+ Returns: { "provider": "Goldsky", "chain_id", "from_block", "to_block", "returned", "after", "next_after", "traces": [Parity trace rows] }. next_after is null when the page came back short.
46011
+
46012
+ Example: { "chain": "ethereum", "from_block": "0x1900000", "to_block": "0x19003e7", "to_address": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"], "count": 20 }
46013
+
46014
+ Use when: you trace funding or payouts through contracts.
46015
+ Don't use when: one transaction is enough (use goldsky_trace_transaction).`,
46016
+ {
46017
+ chain: chainProp,
46018
+ from_block: {
46019
+ type: "string",
46020
+ pattern: HEX_QUANTITY.source,
46021
+ description: "Inclusive start block (hex)."
46022
+ },
46023
+ to_block: {
46024
+ type: "string",
46025
+ pattern: HEX_QUANTITY.source,
46026
+ description: "Inclusive end block (hex)."
46027
+ },
46028
+ from_address: {
46029
+ type: "array",
46030
+ minItems: 1,
46031
+ maxItems: 10,
46032
+ items: { type: "string", pattern: ADDRESS.source },
46033
+ description: "Senders to match."
46034
+ },
46035
+ to_address: {
46036
+ type: "array",
46037
+ minItems: 1,
46038
+ maxItems: 10,
46039
+ items: { type: "string", pattern: ADDRESS.source },
46040
+ description: "Recipients to match."
46041
+ },
46042
+ count: {
46043
+ type: "integer",
46044
+ minimum: 1,
46045
+ maximum: 200,
46046
+ default: 50,
46047
+ description: "Traces to return."
46048
+ },
46049
+ after: {
46050
+ type: "integer",
46051
+ minimum: 0,
46052
+ default: 0,
46053
+ description: "Traces to skip."
46054
+ }
46055
+ },
46056
+ ["from_block", "to_block"],
46057
+ async (args) => {
46058
+ const chainId = resolveChainId(args.chain);
46059
+ const from = blockNumber(args.from_block, "from_block");
46060
+ const to = blockNumber(args.to_block, "to_block");
46061
+ if (to < from || to - from >= BigInt(MAX_TRACE_FILTER_BLOCK_SPAN)) {
46062
+ throw new SignalsInputError(
46063
+ `from_block..to_block must be ordered and span at most ${MAX_TRACE_FILTER_BLOCK_SPAN} blocks.`
46064
+ );
46065
+ }
46066
+ if (args.from_address === void 0 && args.to_address === void 0) {
46067
+ throw new SignalsInputError(
46068
+ "pass from_address or to_address (or both)."
46069
+ );
46070
+ }
46071
+ const count = boundedInt(args.count, 50, 1, 200, "count");
46072
+ const after = boundedInt(args.after, 0, 0, 1e6, "after");
46073
+ const filter = {
46074
+ fromBlock: args.from_block,
46075
+ toBlock: args.to_block,
46076
+ count,
46077
+ after
46078
+ };
46079
+ if (args.from_address !== void 0)
46080
+ filter.fromAddress = args.from_address;
46081
+ if (args.to_address !== void 0) filter.toAddress = args.to_address;
46082
+ const traces = await edgeRpc(chainId, "trace_filter", [filter]);
46083
+ const rows = (Array.isArray(traces) ? traces : []).slice(0, count);
46084
+ return {
46085
+ chain_id: chainId,
46086
+ from_block: args.from_block,
46087
+ to_block: args.to_block,
46088
+ returned: rows.length,
46089
+ after,
46090
+ next_after: rows.length === count ? after + count : null,
46091
+ traces: rows
46092
+ };
46093
+ }
46094
+ ),
46095
+ tool100(
46096
+ "goldsky_get_wallet_balances",
46097
+ "goldsky.feeds.wallets.balances",
46098
+ ["feeds", "wallets", "balances", "portfolio"],
46099
+ `Get the latest token balances of one EVM wallet with USD prices and a wallet total, from Goldsky Feeds, across ethereum, base, arbitrum, optimism, polygon, bsc, robinhood and arc in one call. Native balances are read live; ERC-20 balances come from Goldsky's index; prices older than 4 hours are not served.
46100
+
46101
+ Args:
46102
+ - address (string, required): EVM wallet address.
46103
+ - chains (string or array, optional): subset of the chains above; default all.
46104
+ - min_value_usd (number, optional): drop rows worth less (and unpriced rows).
46105
+ - include_unknown_price (boolean, default false): also return tokens Goldsky cannot price.
46106
+ - page_size (integer, default 100, max 1000) and page_token (string): paging.
46107
+
46108
+ Returns: { "provider": "Goldsky", "address", "total_value_usd", "data": [{ "chain", "token_address", "token_symbol", "token_name", "token_decimals", "balance_raw", "price_usd", "last_priced_at", "value_usd", "block_number", "block_timestamp" }], "pagination": { "next_page_token" } }.
46109
+
46110
+ Example: { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chains": ["ethereum", "base"], "min_value_usd": 10 }
46111
+
46112
+ Use when: you want one priced multi-chain balance sheet for an EVM wallet.
46113
+ Don't use when: the wallet is on Solana (use helius_get_wallet_balances) or you need PnL (use get_wallet_pnl).`,
46114
+ {
46115
+ address: {
46116
+ type: "string",
46117
+ pattern: ADDRESS.source,
46118
+ description: "EVM wallet address."
46119
+ },
46120
+ chains: {
46121
+ oneOf: [
46122
+ { type: "string" },
46123
+ {
46124
+ type: "array",
46125
+ minItems: 1,
46126
+ maxItems: 8,
46127
+ items: { type: "string" }
46128
+ }
46129
+ ],
46130
+ description: "Chains to include; default all eight."
46131
+ },
46132
+ min_value_usd: {
46133
+ type: "number",
46134
+ minimum: 0,
46135
+ description: "Dust filter in USD."
46136
+ },
46137
+ include_unknown_price: {
46138
+ type: "boolean",
46139
+ default: false,
46140
+ description: "Include unpriced tokens."
46141
+ },
46142
+ page_size: {
46143
+ type: "integer",
46144
+ minimum: 1,
46145
+ maximum: 1e3,
46146
+ default: 100,
46147
+ description: "Rows per page."
46148
+ },
46149
+ page_token: {
46150
+ type: "string",
46151
+ maxLength: 2048,
46152
+ description: "next_page_token from a previous page."
46153
+ }
46154
+ },
46155
+ ["address"],
46156
+ async (args) => feedsGet("balances", {
46157
+ address: walletAddress(args),
46158
+ chains: feedsChains(args.chains),
46159
+ min_value_usd: args.min_value_usd,
46160
+ include_unknown_price: args.include_unknown_price,
46161
+ page_size: boundedInt(args.page_size, 100, 1, 1e3, "page_size"),
46162
+ page_token: args.page_token
46163
+ })
46164
+ ),
46165
+ tool100(
46166
+ "goldsky_get_wallet_transfers",
46167
+ "goldsky.feeds.wallets.transfers",
46168
+ ["feeds", "wallets", "transfers", "history"],
46169
+ `Get one EVM wallet's native and ERC-20 transfers, newest first, with the USD value at transfer time, from Goldsky Feeds across ethereum, base, arbitrum, optimism, polygon, bsc, robinhood and arc. NFT transfers are not covered.
46170
+
46171
+ Args:
46172
+ - address (string, required): EVM wallet address.
46173
+ - chains (string or array, optional): subset of the chains above; default all.
46174
+ - direction (string, optional): "in" or "out" relative to address.
46175
+ - transfer_type (string, optional): "native" or "erc20".
46176
+ - token_address (string, optional): comma-separated token contracts; the zero address selects natives.
46177
+ - from / to (RFC 3339 strings, optional): inclusive block-time window.
46178
+ - page_size (integer, default 100, max 1000) and page_token (string): paging.
46179
+
46180
+ Returns: { "provider": "Goldsky", "data": [{ "chain", "block_number", "block_timestamp", "transaction_hash", "from_address", "to_address", "token_address", "token_symbol", "amount_raw", "price_usd", "amount_usd" }], "pagination": { "next_page_token" } }.
46181
+
46182
+ Example: { "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "chains": "base", "direction": "in", "page_size": 20 }
46183
+
46184
+ Use when: you need priced transfer history for an EVM wallet across several chains at once.
46185
+ Don't use when: you need NFT or internal transfers (use alchemy_get_asset_transfers or goldsky_trace_filter).`,
46186
+ {
46187
+ address: {
46188
+ type: "string",
46189
+ pattern: ADDRESS.source,
46190
+ description: "EVM wallet address."
46191
+ },
46192
+ chains: {
46193
+ oneOf: [
46194
+ { type: "string" },
46195
+ {
46196
+ type: "array",
46197
+ minItems: 1,
46198
+ maxItems: 8,
46199
+ items: { type: "string" }
46200
+ }
46201
+ ],
46202
+ description: "Chains to include; default all eight."
46203
+ },
46204
+ direction: {
46205
+ type: "string",
46206
+ enum: ["in", "out"],
46207
+ description: "Relative to address."
46208
+ },
46209
+ transfer_type: {
46210
+ type: "string",
46211
+ enum: ["native", "erc20"],
46212
+ description: "Transfer kind."
46213
+ },
46214
+ token_address: {
46215
+ type: "string",
46216
+ maxLength: 4300,
46217
+ description: "Comma-separated token contracts."
46218
+ },
46219
+ from: {
46220
+ type: "string",
46221
+ format: "date-time",
46222
+ description: "Inclusive lower bound on block time (RFC 3339)."
46223
+ },
46224
+ to: {
46225
+ type: "string",
46226
+ format: "date-time",
46227
+ description: "Inclusive upper bound on block time (RFC 3339)."
46228
+ },
46229
+ page_size: {
46230
+ type: "integer",
46231
+ minimum: 1,
46232
+ maximum: 1e3,
46233
+ default: 100,
46234
+ description: "Rows per page."
46235
+ },
46236
+ page_token: {
46237
+ type: "string",
46238
+ maxLength: 2048,
46239
+ description: "next_page_token from a previous page."
46240
+ }
46241
+ },
46242
+ ["address"],
46243
+ async (args) => feedsGet("transfers", {
46244
+ address: walletAddress(args),
46245
+ chains: feedsChains(args.chains),
46246
+ direction: args.direction,
46247
+ transfer_type: args.transfer_type,
46248
+ token_address: args.token_address,
46249
+ from: args.from,
46250
+ to: args.to,
46251
+ page_size: boundedInt(args.page_size, 100, 1, 1e3, "page_size"),
46252
+ page_token: args.page_token
46253
+ })
46254
+ )
46255
+ ];
46256
+ }
46257
+
45440
46258
  // src/freeWriteEndpoints.ts
45441
46259
  var FREE_WRITE_ENDPOINTS = /* @__PURE__ */ new Set([
45442
46260
  // Feedback is a bounded, rate-limited insert into Hive's own table. It
@@ -47379,6 +48197,18 @@ var PROVIDER_CATALOG = [
47379
48197
  isConfigured: () => hasEnvVar("ALCHEMY_API_KEY")
47380
48198
  },
47381
48199
  matches: (toolName, metadata103) => matchesProvider("alchemy", toolName, metadata103)
48200
+ },
48201
+ {
48202
+ id: "goldsky",
48203
+ name: "Goldsky",
48204
+ prefix: "goldsky_",
48205
+ type: "EVM JSON-RPC on ~150 chains (eth_call, logs, traces, archive, HyperEVM) and priced wallet balances and transfers (Feeds)",
48206
+ clientStrategy: "internal",
48207
+ credentialRequirement: {
48208
+ label: "GOLDSKY_EDGE_API_KEY and GOLDSKY_DATA_API_KEY",
48209
+ isConfigured: () => hasAllEnvVars("GOLDSKY_EDGE_API_KEY", "GOLDSKY_DATA_API_KEY")
48210
+ },
48211
+ matches: (toolName, metadata103) => matchesProvider("goldsky", toolName, metadata103)
47382
48212
  }
47383
48213
  ];
47384
48214
  function getProviderDescriptorForTool(toolName, metadata103) {
@@ -47397,6 +48227,13 @@ function getProviderRuntimeStatus(provider) {
47397
48227
  if (rest || node) return "degraded";
47398
48228
  return "missing_key";
47399
48229
  }
48230
+ if (provider.id === "goldsky") {
48231
+ const edge = hasEnvVar("GOLDSKY_EDGE_API_KEY");
48232
+ const data = hasEnvVar("GOLDSKY_DATA_API_KEY");
48233
+ if (edge && data) return "ok";
48234
+ if (edge || data) return "degraded";
48235
+ return "missing_key";
48236
+ }
47400
48237
  return runtimeStatusForConfiguredKey(
47401
48238
  provider.credentialRequirement?.isConfigured() ?? true
47402
48239
  );
@@ -47424,6 +48261,10 @@ function getCredentialRequirementForTool(toolName, metadata103) {
47424
48261
  isConfigured: hasTenderlyNodeCredentials
47425
48262
  };
47426
48263
  }
48264
+ if (toolName.startsWith("goldsky_")) {
48265
+ const key = toolName.startsWith("goldsky_get_wallet_") ? "GOLDSKY_DATA_API_KEY" : "GOLDSKY_EDGE_API_KEY";
48266
+ return { label: key, isConfigured: () => hasEnvVar(key) };
48267
+ }
47427
48268
  return getProviderDescriptorForTool(toolName, metadata103).credentialRequirement ?? null;
47428
48269
  }
47429
48270
 
@@ -47455,14 +48296,14 @@ var RESPONSE_FORMAT_SCHEMA = {
47455
48296
  enum: ["json", "markdown"],
47456
48297
  description: "Output format: 'json' for structured data (default) or 'markdown' for human-readable text."
47457
48298
  };
47458
- function normalizeToolSchema(tool100) {
48299
+ function normalizeToolSchema(tool101) {
47459
48300
  const normalized = {
47460
- ...tool100,
47461
- inputSchema: tool100.inputSchema ? JSON.parse(JSON.stringify(tool100.inputSchema)) : tool100.inputSchema,
47462
- title: tool100.title ?? getToolTitle(tool100.name),
48301
+ ...tool101,
48302
+ inputSchema: tool101.inputSchema ? JSON.parse(JSON.stringify(tool101.inputSchema)) : tool101.inputSchema,
48303
+ title: tool101.title ?? getToolTitle(tool101.name),
47463
48304
  annotations: {
47464
- ...getAnnotationsForTool(tool100.name),
47465
- ...tool100.annotations ?? {}
48305
+ ...getAnnotationsForTool(tool101.name),
48306
+ ...tool101.annotations ?? {}
47466
48307
  }
47467
48308
  };
47468
48309
  if (normalized.inputSchema && typeof normalized.inputSchema === "object" && normalized.inputSchema.type === "object") {
@@ -48315,9 +49156,9 @@ function withExecMarker(result2, marker) {
48315
49156
  function humanizePropertyName(propName) {
48316
49157
  return propName.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
48317
49158
  }
48318
- function fillMissingInputDescriptions(tool100) {
48319
- const schema = tool100.inputSchema;
48320
- if (!schema?.properties) return tool100;
49159
+ function fillMissingInputDescriptions(tool101) {
49160
+ const schema = tool101.inputSchema;
49161
+ if (!schema?.properties) return tool101;
48321
49162
  let changed = false;
48322
49163
  const properties = {};
48323
49164
  for (const [propName, propSchema] of Object.entries(schema.properties)) {
@@ -48328,14 +49169,14 @@ function fillMissingInputDescriptions(tool100) {
48328
49169
  changed = true;
48329
49170
  properties[propName] = {
48330
49171
  ...propSchema,
48331
- description: `${humanizePropertyName(propName)} parameter for ${tool100.name}. See the tool Args section for accepted values and examples.`
49172
+ description: `${humanizePropertyName(propName)} parameter for ${tool101.name}. See the tool Args section for accepted values and examples.`
48332
49173
  };
48333
49174
  }
48334
- if (!changed) return tool100;
49175
+ if (!changed) return tool101;
48335
49176
  return {
48336
- ...tool100,
49177
+ ...tool101,
48337
49178
  inputSchema: {
48338
- ...tool100.inputSchema,
49179
+ ...tool101.inputSchema,
48339
49180
  properties
48340
49181
  }
48341
49182
  };
@@ -48635,14 +49476,15 @@ function getAllWrappedEndpoints() {
48635
49476
  ...getAllPolymarketEndpoints(),
48636
49477
  ...getAllSignalsEndpoints(),
48637
49478
  ...getAllBlockscoutEndpoints(),
49479
+ ...getAllGoldskyEndpoints(),
48638
49480
  ...getAllFetchEndpoints()
48639
49481
  ];
48640
49482
  const allEndpointsJSON = wrapper;
48641
49483
  const updatedTools = [];
48642
49484
  for (const endpoint of allTool) {
48643
- let { tool: tool100 } = endpoint;
49485
+ let { tool: tool101 } = endpoint;
48644
49486
  let matchedItem = null;
48645
- const originalName = tool100.name;
49487
+ const originalName = tool101.name;
48646
49488
  const strippedName = stripProviderPrefix(originalName);
48647
49489
  for (const endpoints of Object.values(allEndpointsJSON)) {
48648
49490
  for (const item of endpoints) {
@@ -48668,10 +49510,10 @@ function getAllWrappedEndpoints() {
48668
49510
  }
48669
49511
  if (matchedItem) {
48670
49512
  let toolInstanse = {
48671
- ...tool100,
49513
+ ...tool101,
48672
49514
  name: matchedItem.tool.name,
48673
- title: tool100.title ?? getToolTitle(matchedItem.tool.name),
48674
- description: matchedItem.tool.description ?? tool100.description
49515
+ title: tool101.title ?? getToolTitle(matchedItem.tool.name),
49516
+ description: matchedItem.tool.description ?? tool101.description
48675
49517
  };
48676
49518
  if (!toolInstanse.annotations) {
48677
49519
  toolInstanse.annotations = getAnnotationsForTool(toolInstanse.name);
@@ -48711,12 +49553,13 @@ function getAllWrappedEndpoints() {
48711
49553
  "archive_",
48712
49554
  "polymarket_",
48713
49555
  "signals_",
48714
- "fetch_"
49556
+ "fetch_",
49557
+ "goldsky_"
48715
49558
  ];
48716
- if (selfDescribedPrefixes.some((p) => tool100.name.startsWith(p)) || isFreeWriteEndpoint(tool100.name)) {
49559
+ if (selfDescribedPrefixes.some((p) => tool101.name.startsWith(p)) || isFreeWriteEndpoint(tool101.name)) {
48717
49560
  let toolInstanse = {
48718
- ...tool100,
48719
- title: tool100.title ?? getToolTitle(tool100.name)
49561
+ ...tool101,
49562
+ title: tool101.title ?? getToolTitle(tool101.name)
48720
49563
  };
48721
49564
  if (!toolInstanse.annotations) {
48722
49565
  toolInstanse.annotations = getAnnotationsForTool(toolInstanse.name);
@@ -48742,7 +49585,7 @@ function getAllWrappedEndpoints() {
48742
49585
  });
48743
49586
  } else {
48744
49587
  secureLogger.debug(
48745
- `No match found in allEndpoints for tool: ${tool100.name}`
49588
+ `No match found in allEndpoints for tool: ${tool101.name}`
48746
49589
  );
48747
49590
  }
48748
49591
  }
@@ -48758,9 +49601,9 @@ function getToolByCategory(category) {
48758
49601
  const allWrappedTools = getAllWrappedEndpoints();
48759
49602
  const tools4 = [];
48760
49603
  for (const toolName of toolNameList) {
48761
- const tool100 = allWrappedTools.find((tool101) => tool101.tool.name === toolName);
48762
- if (tool100) {
48763
- tools4.push(tool100);
49604
+ const tool101 = allWrappedTools.find((tool102) => tool102.tool.name === toolName);
49605
+ if (tool101) {
49606
+ tools4.push(tool101);
48764
49607
  }
48765
49608
  }
48766
49609
  return tools4;
@@ -48966,7 +49809,7 @@ var ToolRegistry = [
48966
49809
  {
48967
49810
  category: "Portfolio & Wallet",
48968
49811
  name: "get_portfolio_wallet_endpoints",
48969
- description: "Endpoints for tracking user wallet balances, transaction history, portfolio positions across protocols and chains, net asset calculations, token holdings analysis, comprehensive wallet activity monitoring, real-time balance tracking, balance update history over time, multi-token portfolio analysis, balance changes with transaction context, financial auditing capabilities for individual users and addresses, NFT holdings tracking, wallet PnL, and swap history. Provider guide: Use get_wallet_balances, get_wallet_pnl, get_wallet_trades, and get_wallet_transfers (CoinGecko) for EVM balances, PnL, DEX trades, and transfers. Use alchemy_ tools for NFT holdings, raw transfers, and EVM chains CoinGecko does not cover. Use helius_ tools for Solana-native wallet depth (native SOL balance, SPL token accounts, Digital Asset Standard assets owned by a wallet).",
49812
+ description: "Endpoints for tracking user wallet balances, transaction history, portfolio positions across protocols and chains, net asset calculations, token holdings analysis, comprehensive wallet activity monitoring, real-time balance tracking, balance update history over time, multi-token portfolio analysis, balance changes with transaction context, financial auditing capabilities for individual users and addresses, NFT holdings tracking, wallet PnL, and swap history. Provider guide: Use get_wallet_balances, get_wallet_pnl, get_wallet_trades, and get_wallet_transfers (CoinGecko) for EVM balances, PnL, DEX trades, and transfers. Use alchemy_ tools for NFT holdings, raw transfers, and EVM chains CoinGecko does not cover. Use helius_ tools for Solana-native wallet depth (native SOL balance, SPL token accounts, Digital Asset Standard assets owned by a wallet). Use goldsky_get_wallet_balances and goldsky_get_wallet_transfers (Goldsky Feeds) for priced balances and priced transfer history across eight EVM chains in one call.",
48970
49813
  tools: [
48971
49814
  // CoinGecko wallet data (default for EVM balances, PnL, DEX trades, transfers)
48972
49815
  "get_wallet_balances",
@@ -49046,7 +49889,10 @@ var ToolRegistry = [
49046
49889
  "helius_get_wallet_history",
49047
49890
  "helius_get_wallet_transfers",
49048
49891
  "helius_get_transactions_for_address",
49049
- "helius_get_transfers_by_address"
49892
+ "helius_get_transfers_by_address",
49893
+ // Goldsky Feeds: priced multi-chain EVM balances and transfers
49894
+ "goldsky_get_wallet_balances",
49895
+ "goldsky_get_wallet_transfers"
49050
49896
  ]
49051
49897
  },
49052
49898
  {
@@ -49219,7 +50065,7 @@ var ToolRegistry = [
49219
50065
  {
49220
50066
  category: "Network & Infrastructure",
49221
50067
  name: "get_network_infrastructure_endpoints",
49222
- description: "Endpoints for blockchain network information, network health monitoring, gas price tracking, network statistics, asset platform data, infrastructure metrics across different blockchain networks, real-time mempool monitoring, pending transaction analysis, transaction status simulation, MEV detection and protection, gas fee optimization, arbitrage opportunity identification, comprehensive blockchain activity monitoring, community-contributed insights and annotations, data platform system updates monitoring, centralized exchange (CEX) infrastructure including system status monitoring, server time synchronization, available trading markets/pairs browsing, and supported currencies listing across major exchanges. Provider guide: Use coingecko tools for network lists and stats. Use alchemy_ tools for EVM node reads, logs, blocks, and receipts. Use tenderly_ tools for supported EVM simulation/network reads. Use helius_ tools for Solana chain infrastructure (current slot, epoch info, priority-fee estimation, raw transaction fetches).",
50068
+ description: "Endpoints for blockchain network information, network health monitoring, gas price tracking, network statistics, asset platform data, infrastructure metrics across different blockchain networks, real-time mempool monitoring, pending transaction analysis, transaction status simulation, MEV detection and protection, gas fee optimization, arbitrage opportunity identification, comprehensive blockchain activity monitoring, community-contributed insights and annotations, data platform system updates monitoring, centralized exchange (CEX) infrastructure including system status monitoring, server time synchronization, available trading markets/pairs browsing, and supported currencies listing across major exchanges. Provider guide: Use coingecko tools for network lists and stats. Use alchemy_ tools for EVM node reads, logs, blocks, and receipts. Use goldsky_ tools for contract reads (eth_call), traces, wide log ranges, and node reads on chains Alchemy does not cover (about 150 mainnets, HyperEVM included). Use tenderly_ tools for supported EVM simulation/network reads. Use helius_ tools for Solana chain infrastructure (current slot, epoch info, priority-fee estimation, raw transaction fetches).",
49223
50069
  tools: [
49224
50070
  "get_networks",
49225
50071
  "get_asset_platforms",
@@ -49245,7 +50091,13 @@ var ToolRegistry = [
49245
50091
  "helius_get_priority_fee_estimate",
49246
50092
  "helius_get_transaction",
49247
50093
  "helius_get_token_accounts_by_owner_v2",
49248
- "helius_get_program_accounts_v2"
50094
+ "helius_get_program_accounts_v2",
50095
+ // Goldsky Edge RPC: eth_call, logs, traces, any-chain node reads
50096
+ "goldsky_rpc_call",
50097
+ "goldsky_call_contract",
50098
+ "goldsky_get_logs",
50099
+ "goldsky_trace_transaction",
50100
+ "goldsky_trace_filter"
49249
50101
  ]
49250
50102
  },
49251
50103
  {
@@ -50473,7 +51325,7 @@ function describeErrorCode(code) {
50473
51325
  // src/utils/agentErrorCopy.ts
50474
51326
  function agentErrorCopy(status, context = {}) {
50475
51327
  const provider = context.provider || "the provider";
50476
- const tool100 = context.tool || "this tool";
51328
+ const tool101 = context.tool || "this tool";
50477
51329
  switch (status) {
50478
51330
  case "ok":
50479
51331
  return {
@@ -50483,12 +51335,12 @@ function agentErrorCopy(status, context = {}) {
50483
51335
  case "invalid_input":
50484
51336
  return {
50485
51337
  cause: "The arguments failed validation or named an unsupported venue/method; the provider was not the problem.",
50486
- next_action: `Fix the arguments: call get_api_endpoint_schema for '${tool100}', use supported values, then retry. Do not retry unchanged.`
51338
+ next_action: `Fix the arguments: call get_api_endpoint_schema for '${tool101}', use supported values, then retry. Do not retry unchanged.`
50487
51339
  };
50488
51340
  case "missing_key":
50489
51341
  return {
50490
- cause: `${provider} is not configured on this deployment (no API credential), so '${tool100}' cannot return data here.`,
50491
- next_action: `Do not retry '${tool100}'. Use search_tools to pick a sibling provider tool for the same data, or ask the operator to configure ${provider} credentials.`
51342
+ cause: `${provider} is not configured on this deployment (no API credential), so '${tool101}' cannot return data here.`,
51343
+ next_action: `Do not retry '${tool101}'. Use search_tools to pick a sibling provider tool for the same data, or ask the operator to configure ${provider} credentials.`
50492
51344
  };
50493
51345
  case "plan_required":
50494
51346
  return {
@@ -50507,7 +51359,7 @@ function agentErrorCopy(status, context = {}) {
50507
51359
  };
50508
51360
  case "failing":
50509
51361
  return {
50510
- cause: `${provider} returned an unexpected error for '${tool100}'.`,
51362
+ cause: `${provider} returned an unexpected error for '${tool101}'.`,
50511
51363
  next_action: "Do not retry in a loop. Try the route fallback tool or a sibling provider via search_tools, and report the runtime_status to the user."
50512
51364
  };
50513
51365
  }
@@ -50605,7 +51457,7 @@ function defaultDependencies2() {
50605
51457
  flushBatchSize: FLUSH_BATCH_SIZE
50606
51458
  };
50607
51459
  }
50608
- function boundedInt(value) {
51460
+ function boundedInt2(value) {
50609
51461
  if (!Number.isFinite(value)) return 0;
50610
51462
  return Math.max(0, Math.min(MAX_INT4, Math.round(value)));
50611
51463
  }
@@ -50701,7 +51553,7 @@ function createAnalyticsWriter(overrides = {}) {
50701
51553
  ts: event.ts ?? (/* @__PURE__ */ new Date()).toISOString(),
50702
51554
  tool_name: event.toolName,
50703
51555
  success: event.success,
50704
- duration_ms: boundedInt(event.durationMs),
51556
+ duration_ms: boundedInt2(event.durationMs),
50705
51557
  transport: event.transport,
50706
51558
  provider: event.provider ?? null,
50707
51559
  category: event.category ?? null,
@@ -50754,7 +51606,7 @@ function createAnalyticsWriter(overrides = {}) {
50754
51606
  provider: event.provider ?? null,
50755
51607
  category: event.category ?? null,
50756
51608
  runtime_status: event.runtimeStatus ?? null,
50757
- seconds_since_consent: event.secondsSinceConsent === null || event.secondsSinceConsent === void 0 ? null : boundedInt(event.secondsSinceConsent),
51609
+ seconds_since_consent: event.secondsSinceConsent === null || event.secondsSinceConsent === void 0 ? null : boundedInt2(event.secondsSinceConsent),
50758
51610
  connection_hash: event.connectionHash
50759
51611
  });
50760
51612
  } catch {
@@ -51274,7 +52126,8 @@ var PROVIDER_PREFIXES = [
51274
52126
  ["tenderly_", "Tenderly"],
51275
52127
  ["goplus_", "GoPlus"],
51276
52128
  ["ccxt_", "CCXT"],
51277
- ["defillama_", "DeFiLlama"]
52129
+ ["defillama_", "DeFiLlama"],
52130
+ ["goldsky_", "Goldsky"]
51278
52131
  ];
51279
52132
  var replacementAvailability = null;
51280
52133
  function setRetiredReplacementAvailabilityProvider(provider) {
@@ -53302,7 +54155,8 @@ var TASK_TOOLSET_ROUTES = {
53302
54155
  "logs",
53303
54156
  "Read bounded logs only when the receipt needs event context.",
53304
54157
  "alchemy_get_logs",
53305
- null
54158
+ "goldsky_get_logs",
54159
+ PROVIDER_FALLBACK
53306
54160
  )
53307
54161
  ],
53308
54162
  stopCondition: "Stop after status and the minimal failure/event evidence answer the question; avoid broad block scans."
@@ -53889,6 +54743,8 @@ var TASK_TOOLSET_CATALOG = [
53889
54743
  "hyperliquid_get_portfolio"
53890
54744
  ],
53891
54745
  fallbackTools: [
54746
+ "goldsky_get_wallet_balances",
54747
+ "goldsky_get_wallet_transfers",
53892
54748
  "helius_get_parsed_events_transaction_history",
53893
54749
  "check_malicious_address",
53894
54750
  "get_wallet_approvals",
@@ -54164,7 +55020,7 @@ var TASK_TOOLSET_CATALOG = [
54164
55020
  id: "network_infrastructure",
54165
55021
  kind: "product",
54166
55022
  label: "Network Infrastructure",
54167
- purpose: "Read chain state, gas, blocks, receipts, logs, transaction status, supported networks, and Solana priority fees.",
55023
+ purpose: "Read chain state, gas, blocks, receipts, logs, contract state, traces, transaction status, supported networks, and Solana priority fees.",
54168
55024
  outcome: "A chain/RPC diagnostic answer with exact network, block/transaction fixtures, and execution-adjacent status.",
54169
55025
  requiredIdentifiers: ["chain"],
54170
55026
  optionalIdentifiers: [
@@ -54188,7 +55044,12 @@ var TASK_TOOLSET_CATALOG = [
54188
55044
  "tenderly_get_block_number",
54189
55045
  "tenderly_get_gas_price",
54190
55046
  "tenderly_suggest_gas_fee",
54191
- "tenderly_trace_transaction"
55047
+ "tenderly_trace_transaction",
55048
+ "goldsky_rpc_call",
55049
+ "goldsky_call_contract",
55050
+ "goldsky_get_logs",
55051
+ "goldsky_trace_transaction",
55052
+ "goldsky_trace_filter"
54192
55053
  ],
54193
55054
  fallbackTools: [
54194
55055
  "get_networks",
@@ -56616,7 +57477,7 @@ async function runMcpProtocolHealth(options = {}) {
56616
57477
  checks.push(
56617
57478
  await timedCheck("tools_list_root_surface", async () => {
56618
57479
  const listed = await client2.listTools();
56619
- const names = listed.tools.map((tool100) => tool100.name);
57480
+ const names = listed.tools.map((tool101) => tool101.name);
56620
57481
  const expectedCount = getRootVisibleToolCount();
56621
57482
  const expectedTools = [...ROOT_VISIBLE_TOOL_NAMES];
56622
57483
  if (listed.tools.length !== expectedCount) {
@@ -59632,6 +60493,7 @@ var PROVIDER_RESOURCE_PATTERNS = [
59632
60493
  ["alternative", /^signals-fear-greed$/],
59633
60494
  ["blockchain", /^signals-onchain/],
59634
60495
  ["blockscout", /^blockscout(?:[.-]|$)/],
60496
+ ["goldsky", /^goldsky\./],
59635
60497
  ["fetch", /^fetch(?:[.-]|$)/],
59636
60498
  ["helius", /^helius\./],
59637
60499
  ["tenderly", /^tenderly\./],
@@ -59657,6 +60519,7 @@ function classifyProvider(endpoint) {
59657
60519
  if (toolName === "signals_get_fear_greed") return "alternative";
59658
60520
  if (toolName.startsWith("signals_get_onchain")) return "blockchain";
59659
60521
  if (toolName.startsWith("fetch_")) return "fetch";
60522
+ if (toolName.startsWith("goldsky_")) return "goldsky";
59660
60523
  if (toolName.startsWith("hive_")) return "hive";
59661
60524
  return "coingecko";
59662
60525
  }
@@ -59701,6 +60564,10 @@ var QUICK_PROBE_ARGS = {
59701
60564
  toolName: "get_token_holder_distribution",
59702
60565
  args: { network: "eth", address: ETH_USDC, max_pages: 1 }
59703
60566
  },
60567
+ goldsky: {
60568
+ toolName: "goldsky_rpc_call",
60569
+ args: { chain: "ethereum", method: "eth_blockNumber" }
60570
+ },
59704
60571
  fetch: {
59705
60572
  toolName: "fetch_public_api",
59706
60573
  args: { host: "api.coingecko.com", path: "/api/v3/ping" }
@@ -59816,6 +60683,32 @@ var TOOL_PROBE_ARGS = {
59816
60683
  address: ETH_USDC,
59817
60684
  max_pages: 1
59818
60685
  },
60686
+ // Goldsky fixtures verified live 2026-10-24: USDC totalSupply(), the USDC
60687
+ // Transfer logs of one block, a plain ETH transfer from 2015, and Binance 14
60688
+ // sending inside a 1,000-block window.
60689
+ goldsky_rpc_call: { chain: "hyperevm", method: "eth_blockNumber" },
60690
+ goldsky_call_contract: { chain: "ethereum", to: ETH_USDC, data: "0x18160ddd" },
60691
+ goldsky_get_logs: {
60692
+ chain: "ethereum",
60693
+ from_block: ETH_BLOCK_19000000_HEX,
60694
+ to_block: ETH_BLOCK_19000000_HEX,
60695
+ address: ETH_USDC,
60696
+ topics: [ERC20_TRANSFER_TOPIC],
60697
+ limit: 5
60698
+ },
60699
+ goldsky_trace_transaction: {
60700
+ chain: "ethereum",
60701
+ tx_hash: "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
60702
+ },
60703
+ goldsky_trace_filter: {
60704
+ chain: "ethereum",
60705
+ from_block: "0x1900000",
60706
+ to_block: "0x19003e7",
60707
+ from_address: ["0x28C6c06298d514Db089934071355E5743bf21d60"],
60708
+ count: 3
60709
+ },
60710
+ goldsky_get_wallet_balances: { address: ETH_WALLET, chains: "ethereum", page_size: 5 },
60711
+ goldsky_get_wallet_transfers: { address: ETH_WALLET, chains: "base", page_size: 5 },
59819
60712
  polymarket_get_events: { slug: "presidential-election-winner-2028" },
59820
60713
  polymarket_get_market: {
59821
60714
  slug: "will-jd-vance-win-the-2028-us-presidential-election"
@@ -60818,6 +61711,7 @@ function getClientForProvider(provider, clients) {
60818
61711
  case "polymarket":
60819
61712
  case "alternative":
60820
61713
  case "blockchain":
61714
+ case "goldsky":
60821
61715
  return null;
60822
61716
  case "hive":
60823
61717
  return null;
@@ -64890,7 +65784,7 @@ function getRootToolSet() {
64890
65784
  tools: Array.from(toolsByName.values()),
64891
65785
  visibleTools: ROOT_VISIBLE_TOOL_ORDER.map(
64892
65786
  (name) => compatibilityByName.get(name)
64893
- ).filter((tool100) => Boolean(tool100))
65787
+ ).filter((tool101) => Boolean(tool101))
64894
65788
  };
64895
65789
  secureLogger.info("Root MCP tool catalog cached", {
64896
65790
  actualToolCount: actualToolEndpoints.length,
@@ -65162,21 +66056,21 @@ var HiveMCPServer = class {
65162
66056
  }
65163
66057
  registerAllTools() {
65164
66058
  const registeredTools = this.scope.kind === "root" ? this.compatibilityToolEndpoints.map((endpoint) => endpoint.tool) : this.visibleTools;
65165
- for (const tool100 of registeredTools) {
65166
- const inputSchema = tool100.inputSchema;
66059
+ for (const tool101 of registeredTools) {
66060
+ const inputSchema = tool101.inputSchema;
65167
66061
  const inputZodSchema = memoizedJsonSchemaToZodInputSchema(inputSchema);
65168
- const outputSchema = tool100.outputSchema;
66062
+ const outputSchema = tool101.outputSchema;
65169
66063
  const outputZodShape = outputSchema?.type === "object" ? memoizedJsonSchemaToZodOutputSchema(outputSchema) : void 0;
65170
- const toolName = tool100.name;
65171
- const toolMeta = tool100._meta;
66064
+ const toolName = tool101.name;
66065
+ const toolMeta = tool101._meta;
65172
66066
  this.server.registerTool(
65173
66067
  toolName,
65174
66068
  {
65175
- title: tool100.title,
65176
- description: tool100.description,
66069
+ title: tool101.title,
66070
+ description: tool101.description,
65177
66071
  inputSchema: inputZodSchema,
65178
66072
  ...outputZodShape && { outputSchema: outputZodShape },
65179
- annotations: tool100.annotations,
66073
+ annotations: tool101.annotations,
65180
66074
  // Surfaces response-size headroom annotations (plan 1.15) in
65181
66075
  // SDK-generated tools/list responses.
65182
66076
  ...toolMeta && { _meta: toolMeta }