npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sudobility/indexer_client

v0.0.131

Published

React and React Native compatible client library for blockchain mail indexer API with TypeScript support

Downloads

885

Readme

@sudobility/indexer_client

TypeScript client library for the 0xMail blockchain indexer REST and GraphQL APIs. Provides an IndexerClient class, TanStack React Query hooks, GraphQL/admin/webhook helpers, and a business service layer. Works cross-platform on React and React Native via an injected NetworkClient interface.

Installation

bun add @sudobility/indexer_client

Peer dependencies: react (>=18), @tanstack/react-query (>=5), @sudobility/di, @sudobility/types, @sudobility/mail_box_types, @sudobility/configs.

Usage

import { IndexerClient } from '@sudobility/indexer_client';

// Core client (uses injected NetworkClient for cross-platform HTTP)
const client = new IndexerClient(endpointUrl, networkClient, dev);
const accounts = await client.getWalletAccounts(walletAddress, auth);
const points = await client.getPointsBalance(walletAddress, auth);

React Hooks

import {
  useIndexerGetWalletAccounts,
  useIndexerPointsInfo,
  useIndexerPointsLeaderboard,
  useIndexerGetDelegatedTo,
  useWalletNames,
  useResolveNameToAddress,
  useIndexerMailTemplates,
  useIndexerMailWebhooks,
  useIndexerReferralCode,
} from '@sudobility/indexer_client';

// Public endpoints (no auth)
const { data } = useIndexerPointsInfo(networkClient, endpointUrl, dev);
const { data } = useResolveNameToAddress(networkClient, endpointUrl, dev, 'vitalik.eth');

// Authenticated endpoints (wallet signature required)
const { data } = useIndexerGetWalletAccounts(networkClient, endpointUrl, dev, walletAddress, auth);

Utility Helpers

import { createIndexerHelpers } from '@sudobility/indexer_client';

const { admin, graphql, webhook } = createIndexerHelpers(config, networkClient);

// Admin: campaigns, points awards, user flags
// GraphQL: mails, delegations, statistics
// Webhook: email-sent, login, referral events

API

| Export | Description | |--------|-------------| | IndexerClient | Core REST API client (~40 endpoints) | | IndexerService | Singleton with 5-min in-memory cache (public endpoints) | | useIndexer* hooks | 18 individual TanStack React Query hooks | | IndexerMockData | Static mock factories for all response types | | IndexerAdminHelper | Admin API helper (campaigns, points, flags) | | IndexerGraphQLHelper | GraphQL query helper (mails, delegations, stats) | | IndexerWebhookHelper | Webhook processing helper | | createAuthHeaders | Build signature auth headers (x-signature, x-message, x-signer) |

Development

bun install
bun run check-all          # lint + typecheck + test:run
bun run build              # TypeScript compilation
bun run test               # Vitest (watch mode)
bun run test:run           # Single run
bun run test:coverage      # Coverage (70% threshold)
bun run test:integration   # Integration tests (requires live indexer)
bun run typecheck          # tsc --noEmit
bun run lint               # ESLint

Related Packages

  • @0xmail/indexer -- the backend this client connects to
  • @sudobility/di -- provides NetworkClient interface
  • @sudobility/mail_box_types -- shared API response types
  • @sudobility/types -- core types (ChainType, Optional)
  • @sudobility/configs -- application configuration

License

BUSL-1.1