Prerequisites
- Node.js 22 and npm
- TypeScript experience
- An ENS name activated and listed in the Namespace App
- A wallet with enough native currency for the mint price and gas
- An RPC endpoint for the chain on which you will mint
1
1. Activate your ENS name
Before you can mint subnames, your parent ENS name must be activated on the Namespace platform. This is a prerequisite for all subname minting operations.
How to activate an ENS name
See the step-by-step guide on how to activate an ENS name.
2
2. Install the dependencies
Install the package versions used by this documentation:
3
3. Configure the clients
Add the RPC endpoint and private key to Create the Mint Manager SDK client and Viem clients:
.env:.env
clients.ts
To use testnet listings and Namespace staging services, initialize the Mint Manager SDK with
createMintClient({ isTestnet: true, mintSource: 'my-app' }) and configure Viem clients for the matching testnet chain.4
4. Check availability
For a listing on an L2 chain, pass the target chain ID:For a listing on Ethereum, use
availability.ts
isL1SubnameAvailable instead:5
5. Check eligibility and price
getMintDetails reports whether the wallet can mint and returns the estimated price and fee:quote.ts
6
6. Generate transaction parameters
Add optional text and address records while preparing the transaction:The SDK uses the parent listing to return the appropriate contract, ABI, arguments, and transaction value for Ethereum or the listing’s L2 chain.
transaction.ts
7
7. Simulate and send the transaction
Simulate first so contract errors are surfaced before the wallet sends the transaction:Wait for a receipt before showing the subname as confirmed in your product.
mint.ts
Troubleshooting
- If
canMintis false, display or logvalidationErrors. - If simulation fails, confirm the wallet and public clients use the listing’s chain.
- If the mint price changed, generate fresh transaction parameters before retrying.
- If the subname is unavailable, choose another label; do not submit the transaction.
Next steps
Mint Manager reference
Review every Mint Manager SDK method and response type.
Indexer Manager
Read indexed subname and registry data from L2 chains after minting.

