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

@spec.dev/ecosystem

v0.0.1

Published

Spec Ecosystem Client

Readme

Spec Ecosystem Client

JavaScript client to interface with resources in the Spec ecosystem.

Requirements

  • Node.js >= 16
  • npm >= 8

Installation

$ npm install @spec.dev/ecosystem

Auth

In order to make changes within your namespace on Spec, you will first need a namespace access token.

It's important to keep this token private — and because of this, any write operations performed by this library should be initiated on the server-side, with your token stored as an environment variable.

Client

Creating a new instance of the ecosystem client is simple.

import { SpecEcosystemClient } from '@spec.dev/ecosystem'

const ecosystem = new SpecEcosystemClient({
    namespaceToken: process.env.SPEC_NAMESPACE_TOKEN
})

Contract Group Operations

Currently, this library can be used:

  1. Create new contract groups
  2. Add new contracts to an existing group

Creating contract groups

const group = 'namespace.ContractName'
const chainIds = [1, 5, 137, ...] // chain ids for the group
const abi = [{ type: 'event', name: 'Transfer', ... }, ...]

const { ok, error } = await ecosystem.createContractGroup(group, chainIds, abi)

Adding contracts to a group

[!NOTE] The contract group must exist before using this method to add contracts to it.

Currently, only a single chain can be used per API call. This may change in the near future, so stay tuned.

const group = 'namespace.ContractName'
const chainId = 5
const addresses = ['0x123...', '0x456...']

const { ok, error } = await spec.addContractsToGroup(group, chainId, addresses)

License

MIT