Skip to content

Conversation

@cxalem
Copy link

@cxalem cxalem commented Jan 20, 2026

Integrate tx-indexer SDK to provide transaction classification, protocol detection, spam filtering, and token metadata enrichment.

Features:

  • Transaction classification (swap, transfer, stake, NFT, etc.)
  • Protocol detection (Jupiter, Raydium, etc.)
  • Automatic spam filtering
  • Token metadata enrichment
  • Cursor-based pagination with oldestSignature/hasMore
  • Auto cluster detection from RPC endpoint URL
  • Rate-limit friendly defaults for public RPCs

Also adds example component ClassifiedTransactionsCard to vite-react demo.

const { transactions, oldestSignature, hasMore, isLoading } = useClassifiedTransactions({
  address: walletAddress,
  options: { limit: 10 },
});

Summary

  • Add useClassifiedTransactions hook to @solana/react-hooks
  • Add tx-indexer@^1.3.2 dependency
  • Export tx-indexer types (ClassifiedTransaction, Cluster, TokenInfo, etc.)
  • Add example component and tests

Testing

  • pnpm lint
  • pnpm test
  • pnpm build
  • Other (describe):

Integrate tx-indexer SDK to provide transaction classification, protocol
detection, spam filtering, and token metadata enrichment.

Features:
- Transaction classification (swap, transfer, stake, NFT, etc.)
- Protocol detection (Jupiter, Raydium, etc.)
- Automatic spam filtering
- Token metadata enrichment
- Cursor-based pagination with oldestSignature/hasMore
- Auto cluster detection from RPC endpoint URL
- Rate-limit friendly defaults for public RPCs

New options:
- cluster: Override auto-detected cluster
- includeTokenAccounts: Query ATAs for incoming transfers
- maxTokenAccounts: Limit ATA queries
- overfetchMultiplier, minPageSize, transactionConcurrency: RPC tuning

Also adds example component ClassifiedTransactionsCard to vite-react demo.
@vercel
Copy link

vercel bot commented Jan 20, 2026

@cxalem is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@GuiBibeau
Copy link
Collaborator

@cxalem this is a great PR! Can you please verify two thigns:

  • Is there an increase to bundle size?
  • please make docs in both the readmes to show examples and in the docs site

@cxalem
Copy link
Author

cxalem commented Jan 21, 2026

@cxalem this is a great PR! Can you please verify two thigns:

  • Is there an increase to bundle size?
  • please make docs in both the readmes to show examples and in the docs site

1.- Yes, since tx-indexer is listed as a dependency, it increased by 1.34 KB!
2.- Working on it!

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