getMintDetails to check whether a wallet can mint a subname and to retrieve the estimated price and fee.
For most integrations, prefer
checkName. It takes the whole name, derives the chain from the listing, and reconciles this response with the registry. getMintDetails validation stops at the first failure, so on a gated listing it never evaluates the name at all, and a free name and a taken name return identical responses.Usage
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?
- canMint - Specifies whether a minter address has permission to mint a subname. If this is false, see
validationErrorsfor the reason. - estimatedPriceEth - The price for minting a subname, set by the listing owner.
- estimatedFeeEth - The minting fee for minting a subname.
- validationErrors - Lists the exact reason the mint cannot proceed, such as an unavailable label, expired listing, missing whitelist entry, or unmet token requirement.
MintingValidationErrorType
Validation errors are a standard set of reasons a subname cannot be minted. They are not interchangeable: what your app should do next depends on whether the obstacle is the name or the minter, and whether another label would help.
Validation stops at the first failure, so
validationErrors is a partial list. Clearing one reason can reveal another.
isTestnet on MintDetailsRequest is deprecated and ignored. The network comes from the client’s own isTestnet, so a quote can no longer disagree with the transaction it precedes.
