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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sonic_resolver

v1.0.1

Published

This plugin includes the npm package to install as snap on MetaMask to resolve Sonic Name Service

Readme

sns-resolution-snap

This repo includes the npm package to install as a snap on MetaMask to resolve SNS - Sonic Name Service.

Overview

The Sonic Name Service (SNS) is a naming system for the Sonic chain (ID: 146) that allows users to register human-readable names (e.g., name.s) that resolve to Ethereum addresses. SNS is implemented as an ERC721 NFT, with each name represented by a unique tokenId.

This MetaMask Snap enables name resolution for SNS names directly within MetaMask, allowing users to:

  • Type .s domains directly into MetaMask's address field
  • Have the addresses automatically resolved to the correct Ethereum address
  • Use SNS names for sending transactions and interacting with dApps

Features

  • Resolves .s domain names to Ethereum addresses
  • Performs reverse lookup to get SNS names from addresses
  • Works on the Sonic chain (ID: 146)
  • Seamlessly integrates with MetaMask's interface
  • Provides additional RPC methods for dApps to interact with

RPC Methods

The snap exposes the following RPC methods for dApps to use:

  1. reverseLookup - Get the SNS name for a given address

    const name = await ethereum.request({
      method: 'wallet_invokeSnap',
      params: {
        snapId: 'npm:sonic_resolver',
        request: {
          method: 'reverseLookup',
          params: {
            address: '0x123...'
          }
        }
      }
    });
  2. getTokenIdForName - Get the tokenId for a given SNS name

    const result = await ethereum.request({
      method: 'wallet_invokeSnap',
      params: {
        snapId: 'npm:sonic_resolver',
        request: {
          method: 'getTokenIdForName',
          params: {
            name: 'example.s'
          }
        }
      }
    });
    console.log(result.tokenId);
  3. getNameForTokenId - Get the SNS name for a given tokenId

    const result = await ethereum.request({
      method: 'wallet_invokeSnap',
      params: {
        snapId: 'npm:sonic_resolver',
        request: {
          method: 'getNameForTokenId',
          params: {
            tokenId: '123456'
          }
        }
      }
    });
    console.log(result.name);

Contract Addresses

  • Resolver: 0x90DB11399F3577BeFbF5B8E094BcaD35DA348Fc9
  • Registrar: 0xc50DBB6F0BAab19C6D0473B225f7F58e4a2d440b
  • Registry: 0x3D9D5ACc7dBACf1662Bc6D1ea8479F88B90b3cfb

Installation

Once published, you can install the Snap from:

https://snaps.metamask.io/snap/npm/sonic-resolver/

Development

yarn install

Build

yarn build

Serve

To run the Snap locally for testing:

yarn serve