Skip to content

refactor(sdk)!: remove unused discoverIndexDtfsByChain - #42

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1788274835-deprecate-discover-by-chain
Open

refactor(sdk)!: remove unused discoverIndexDtfsByChain#42
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1788274835-deprecate-discover-by-chain

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes discoverIndexDtfsByChain / sdk.index.discoverByChain (and DiscoverIndexDtfsByChainParams) rather than just deprecating it. Its backing endpoint /discover/dtf is deprecated in reserve-api (#254) — a popularity-filtered browse view that can omit supported DTFs — and nothing consumes the wrapper.

Usage search across the repos on hand (dtf-interface, register, zapper, scout-etl): zero callers of discoverIndexDtfsByChain / discoverByChain / DiscoverIndexDtfsByChainParams outside the SDK's own exports, docs, and test. react-sdk never wrapped it. Register hits /discover/dtf by raw fetch in three SEO/logo scripts, unrelated to this SDK surface — left alone.

discoverIndexDtfs already accepts an optional chainId, so the chain-scoped case is sdk.index.discover({ chainId }) against the canonical /discover/dtfs. With the only other caller gone, fetchDiscoveryItems loses its path parameter and the DiscoveryPath union:

-function fetchDiscoveryItems(client, path: DiscoveryPath, params) {
-  return client.api.get({ path, query: { ... } });
+function fetchDiscoveryItems(client, params) {
+  return client.api.get({ path: "/discover/dtfs", query: { ... } });

The existing chain-scoped test now exercises discoverIndexDtfs(client, { chainId: 8453 }) and asserts the request URL is /discover/dtfs?chainId=8453.

Changeset is minor (breaking removal on a 0.x package), renamed to remove-discover-by-chain.md. Docs updated in apps/docs (discovery + workflows tables), docs/index-dtf/discovery-holders.md, docs/protocol/data-sources.md, and the react-sdk migration plan; oxfmt re-aligned the data-sources table columns, hence the wider diff there.

Verification: node scripts/llm-workflow/scope.mjs --base origin/main green (format:check, lint, sdk typecheck + test, bundle:check, docs:build, docs:links).

Link to Devin session: https://app.devin.ai/sessions/934d80460fb8438e90a4f1af36fa60e8
Open in Devin Desktop: https://app.devin.ai/desktop/session/934d80460fb8438e90a4f1af36fa60e8?variant=devin

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

…recating it

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title docs(sdk): deprecate discoverIndexDtfsByChain in favor of discover refactor(sdk)!: remove unused discoverIndexDtfsByChain Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants