🥷
Namespace
  • [ Introduction ]
    • ENS
    • Namespace
  • Official Links
  • [ Dapps ]
    • Overview
    • Onchain Subs (App)
      • Search & Register
      • Wizard
        • Listing an ENS Name
        • Features List
      • ENS Widget
      • Farcaster Frames
        • Default Frame
        • Custom Frame
    • Offchain Subs (DevPortal)
      • Subname create/manage
      • Resolver set
      • API keys
  • How-to Guides and Demos
  • [ Dev Docs ]
    • SDK
      • Offchain Manager
        • Installation
        • Generate API key
        • Create or Update Subname
        • DeleteSubname
        • IsSubnameAvailable
        • GetFilteredSubnames
        • AddressRecords
          • ChainName
        • TextRecords
        • DataRecords
      • Indexer Manager
        • Installation
        • Methods
        • GetL2Subname
        • GetL2Subnames
      • Mint Manager
        • Installation
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • How To Mint L1 & L2 subname via mint-manager
      • Namespace Client (deprecated)
        • Installation
        • GetListedName
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • GenerateAuthToken
    • APIs
      • Offchain Manager
      • Mint Manager
    • Infrastructure
      • Namespace L2 Subnames
  • [ ecosystem ]
    • Use Cases
  • [ Jobs ]
    • 🧑‍💻 Full-Stack Dev
    • 🥷 Dev-Rel Lead
    • 💼 BD Lead
Powered by GitBook
On this page
  1. [ Dev Docs ]
  2. SDK

Namespace Client (deprecated)

A function to create a NamespaceClient

PreviousHow To Mint L1 & L2 subname via mint-managerNextInstallation

Last updated 11 days ago

namespace-sdk library is deprecated. Please use

A Namespace Client is an interface for interacting with Namespace Backend API And Smart contracts on different chains.

The createNamespaceClientfunction sets up a Namespace Client with a given ChainId. The ChainId specifies an id of a blockchain where the subnames are being minted from.

index.ts
import { createNamespaceClient } from "namespace-sdk";
import { base } from "viem/chains";

const NamespaceClient = createNamespaceClient({
    chainId: base.id,
    mintSource: "my-app",
    rpcUrl: "https://alchemy-url"
});

Parameters

1. chainId ( required ) - Specifies chain id where subnames are minted from, supported chains include

  • Mainnet ( chainId: 1 )

  • Base ( chainId: 8453 )

  • Sepolia ( chainId: 11155111 )

  • BaseSepolia ( chainId: 84532)

  1. mintSource ( optional ) - Used to track the source of minted subnames on a blockchain, defaults to "namespace-sdk".

  2. rpcUrl ( optional ) - Http RPC URL which will be used by SDK when it performs blockchain operations, defaults to a public RPC for a given chain

@namespacesdk/mint-manager