🥷
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
  3. Mint Manager

Installation

Install the required packages, depending on your package manager

npm install @namespacesdk/mint-manager@latest viem

yarn add @namespacesdk/mint-manager@latest viem

Create an instance of mint client with a proper configuration

import { MintClientConfig, createMintClient, MintClient } from "@namespacesdk/mint-manager"

const TOKEN = process.env.ALCHEMY_TOKEN

const clientConfig: MintClientConfig = {
  isTestnet: false,
  customRpcUrls: {
    [mainnet.id]: `https://eth-mainnet.g.alchemy.com/v2/${TOKEN}`,
    [base.id]: `https://base-mainnet.g.alchemy.com/v2/${TOKEN}`
  },
  mintSource: "my-perfect-app"
}

const mintClient: MintClient = createMintClient(clientConfig) 

MintClientConfig

Parameter
Default
Description

isTestnet

false

Specifies whether the testnet app is used or not.

customRpcUrls

undefined

Sets a map of chain.id - rpc urls that a mint client is going to use when making external calls. If the rpc url is not specified, the client will default to a public client for a given chain

mintSource

namespace-sdk

When a subname is minted, the mint event also emits a source parameter which is usefull to track where the subname mints are coming from

PreviousMint ManagerNextGetMintDetails

Last updated 11 days ago