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

@namespacesdk/mint-manager

v1.0.15

Published

Library for minting l2 subnames

Readme

Namespace Ninja

Namespace SDK - Mint Manager

npm version

@namespacesdk/mint-manager is a TypeScript SDK for minting subnames on the ENS (Ethereum Name Service) platform. It enables seamless interaction with the Namespace ecosystem, allowing users to mint both Mainnet and Layer 2 (L2) subnames on supported networks, including Base and Optimism. The SDK abstracts the complexities of interacting with smart contracts, ensuring a smooth developer experience.

Features

  • Mint Subnames: Easily mint ENS subnames listed on the Namespace platform.
  • Mainnet & L2 Support: Works with Ethereum Mainnet as well as Layer 2 networks like Base and Optimism.
  • Subname Availability Checks: Determine whether a subname is available for minting.
  • Configurable Environment: Supports testnet mode, which uses Sepolia-listed names.
  • Custom ENS Record Setting: Set resolver records at the time of minting.

Installation

npm install @namespacesdk/mint-manager

Configuration

The MintClient can be configured with the following parameters:

  • isTestnet (boolean): If true, the SDK operates in test mode and uses subnames listed on the Sepolia test network instead of Mainnet.

Example Usage

import { createMintClient } from "@namespacesdk/mint-manager";

const mintClient = createMintClient({ isTestnet: true });

API

Get Minting Transaction Parameters

This method retrieves the transaction parameters required for minting a subname. It also supports setting ENS records, allowing users to pre-configure resolver records such as avatars, texts, and crypto addresses.

const txParams = await mintClient.getMintTransactionParameters({
  parentName: "example.eth",
  label: "subname",
  minterAddress: "0x123...",
  expiryInYears: 1,
  records: {
    "avatar": "https://example.com/avatar.png",
    "com.twitter": "@example",
  },
});

Response:

  • abi: The ABI of the contract function to call.
  • args: Arguments required for the contract call.
  • functionName: The function to execute (mint).
  • contractAddress: The contract handling the minting.
  • account: The address executing the transaction.
  • value: The total cost of minting (price + fee).

Check L1 Subname Availability

Determines if an ENS subname is available on the Ethereum Mainnet.

const isAvailable = await mintClient.isL1SubnameAvailable("subname.example.eth");
console.log(isAvailable ? "Subname is available" : "Subname is already taken");

Check L2 Subname Availability

Checks whether a subname is available on an L2 network. This requires specifying the chainId of the target network.

const isAvailable = await mintClient.isL2SubnameAvailable("subname.example.eth", 8453); // Base network
console.log(isAvailable ? "Subname is available on L2" : "Subname is already taken");

Parameters:

  • subname (string): The full subname to check.
  • chainId (number): The chain ID of the target L2 network (e.g., 8453 for Base, 10 for Optimism).

Get Listing for a Name

Fetches listing information for a given name from the Namespace listing API.

const listing = await mintClient.getListingForName("example.eth");
console.log("Listing Type:", listing.type);

Response:

  • type: Either L1 (Mainnet) or L2 (Base, Optimism, etc.).
  • l2Metadata: Additional metadata for L2 listings.

License

MIT