🥷
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
  • Usage
  • MintDetailsResponse
  • MintingValidationErrorType
  1. [ Dev Docs ]
  2. SDK
  3. Mint Manager

GetMintDetails

GetMintDetails function returns data with details about minting a single/specific subname under a listed ENS name.

Usage

import {MintDetailsRequest,MintDetailsResponse} from "@namespacesdk/mint-manager";

const request: MintDetailsRequest {
  parentName: "namespace.eth";
  label: "superman";
  minterAddress: "0x1D84ad46F1ec91b4Bb3208F645aD2fA7aBEc19f8";
  expiryInYears?: number;
}

const mintDetails: MintDetailsResponse = await mintClient.getMintDetails();

MintDetailsResponse

The Data returned from this function answers the questions:

  • What is the total price of minting a given subname

  • Is minter address allowed to mint a subname

export interface MintDetailsResponse {
  canMint: boolean;
  estimatedPriceEth: number;
  estimatedFeeEth: number;
  isStandardFee: boolean;
  validationErrors: MintingValidationErrorType[];
}
  1. canMint - specifies whether a minter address has permission to mint a subname. In case this parameter is false, there will be a reason under validation errors

  2. estimatedPrice - The price for minting a subname, set by listing owner

  3. estimatedFee - The minting fee for minting a subname

  4. validationErrors - If the subname cannot be minted, the validation errors will specify the reason. There could be different reasons, such as: 1. Listing has expired. 2. Minter is not whiteslited, 3. Minter doesn't have a required token in case listing uses token gated access etc.

MintingValidationErrorType

Validation Errors are standard set of errors that are present when a given subname cannot be minted.

Error
Description

SUBNAME_TAKEN

Subname not available

MINTER_NOT_TOKEN_OWNER

Listing uses Token Gated Access and minter does not hold required token

MINTER_NOT_WHITELISTED

Listing uses Whitelisting feature and minter is not whitelisted

LISTING_EXPIRED

Listing uses Deadline feature with expiry set

SUBNAME_RESERVED

A subname label is reserved and not mintable

PreviousInstallationNextGetMintTransactionParameters

Last updated 11 days ago