> ## Documentation Index
> Fetch the complete documentation index at: https://docs.namespace.ninja/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Mint Details

> Get the details about minting a single/specific subname under a listed ENS name.

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

### Usage

```typescript theme={null}
import {
  MintDetailsRequest,
  MintDetailsResponse,
} from "@thenamespace/mint-manager";

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

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

### MintDetailsResponse

The data returned from this function answers the questions:

* What is the total price of minting a given subname?
* Is the minter address allowed to mint a subname?

```typescript theme={null}
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. If this is false, see validationErrors for the reason.
2. **estimatedPriceEth** - The price for minting a subname, set by the listing owner.
3. **estimatedFeeEth** - 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: Listing has expired, minter is not whitelisted, minter doesn't have a required token in case listing uses token gated access, etc.

### MintingValidationErrorType

Validation Errors are a 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                            |
