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

@abstract-names/sdk

v0.4.0

Published

React SDK for Abstract Names - name resolution and profiles

Readme

Abstract Names SDK

npm version npm downloads License: MIT

React SDK for interacting with Abstract Names contracts. Provides simple hooks for name resolution, reverse resolution, and profile data.

WARNING: NOT PRODUCTION READY YET

This project is ongoing development. Please wait before the first major version before using this in production environments.

Installation

# npm
npm install @abstract-names/sdk

# yarn
yarn add @abstract-names/sdk

# pnpm
pnpm add @abstract-names/sdk

# bun
bun add @abstract-names/sdk

Prerequisites

This SDK requires the following peer dependencies:

  • react (^18.0.0 or ^19.0.0)
  • wagmi (^2.0.0)
  • viem (^2.0.0)

Make sure you have wagmi configured in your application.

Quick Start

import { useResolve, useReverseResolve, useProfile } from '@abstract-names/sdk';

function MyComponent() {
  // Resolve name to address
  const { data: address } = useResolve({
    name: 'vitalik.abs'
  });

  // Reverse resolve address to name
  const { data: name } = useReverseResolve({
    address: '0x1234...'
  });

  // Get complete profile
  const { data: profile, getTextRecord } = useProfile({
    nameOrAddress: 'vitalik.abs'
  });

  const twitter = getTextRecord('com.x');

  return (
    <div>
      <p>Address: {address}</p>
      <p>Name: {name}</p>
      <p>Twitter: {twitter}</p>
    </div>
  );
}

Features

  • Auto-Detection - Automatically uses the active chain from wagmi
  • Comprehensive - 15 hooks covering read, write, validation, and pricing
  • Structured Errors - User-friendly error messages for better UX
  • TypeScript First - Full type safety with TypeScript
  • wagmi Integration - Built on wagmi v2 with TanStack Query v5
  • Tree Shakeable - Import only what you need (sideEffects: false)
  • Performance Optimized - Debounced validation, minimal re-renders
  • Works with Any Wallet - Compatible with RainbowKit, Privy, Dynamic, WalletConnect, or native implementations

Available Hooks

Resolution:

  • useResolve - Resolve name to address
  • useReverseResolve - Get primary name for address
  • useProfile - Get complete profile data including text records

Validation:

  • useValidateName - Contract-based name validation (Unicode support)
  • useValidateNameDebounced - Debounced validation (reduces RPC calls ~70%)

Write Operations:

  • useSetTextRecord - Set individual text records
  • useBatchSetText - Gas-efficient batch updates
  • useSetPrimaryName - Set/unset primary names (with fee)
  • useSetAddress - Set resolved address

Pricing & Phases:

  • useNamePrice - Tier-based pricing info
  • useMintPhase - Current phase detection

Utilities:

  • useNameAvailability - Check if name is available
  • useNameExpiry - Expiration info with days until expiry
  • useTextRecord - Fetch individual text records
  • useAllowedTextKeys - Get supported text record keys

How It Works

Automatic Chain Detection

The SDK automatically detects the active chain from wagmi - no need to pass chain parameters to each hook:

// Example with AbstractWalletProvider
import { AbstractWalletProvider } from "@abstract-foundation/agw-react";
import { abstractTestnet } from "viem/chains";

function App() {
  return (
    <AbstractWalletProvider chain={abstractTestnet}>
      <YourApp />
    </AbstractWalletProvider>
  );
}

// In your components - no chain parameter needed!
import { useResolve } from "@abstract-names/sdk";

function YourComponent() {
  const { data } = useResolve({
    name: "vitalik.abs"
  });
  // Auto-detects abstractTestnet from wagmi
}

Works with RainbowKit, Privy, Dynamic, or any wagmi setup - the SDK automatically uses your active chain!

Optional: Override Chain with Provider

Need to query a different chain than the active one? Use the AbstractNamesProvider:

import { AbstractNamesProvider } from "@abstract-names/sdk";
import { abstractTestnet } from "viem/chains";

function App() {
  return (
    <AbstractNamesProvider chainId={abstractTestnet.id}>
      <YourApp />
      {/* All hooks inside will use abstractTestnet */}
    </AbstractNamesProvider>
  );
}

Documentation

For complete documentation, examples, and guides:

📖 General Documentation: https://abstractnames.gitbook.io/docs

🎣 React Hooks Guide: https://abstractnames.gitbook.io/docs/documentation/build/react

License

MIT