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 the name
checkName answers both questions a mint needs in one call: is the name free, and may this wallet mint it. Pass the whole subname; the SDK normalizes it, resolves the listing, and works out the chain itself.check.ts
status, so the price fields exist only on the available branch. See Check a name for every status and the full table of refusal reasons.5
5. Generate transaction parameters
Pass the check result to The SDK uses the parent listing to return the appropriate contract, ABI, arguments, and transaction value for Ethereum or the listing’s L2 chain.
prepareMint. The listing is already resolved, so nothing is fetched twice. Add optional text and address records to apply them in the same transaction as the mint:transaction.ts
6
6. 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
checkNamereturnsblocked, readreasons. A minter gate fails identically for every label, so prompt for a different wallet rather than a different name. - If it returns
taken, choose another label; do not submit the transaction. - If a call throws
RPC_ERROR, the name’s status is unknown rather than unavailable. Retry, and setcustomRpcUrlsto your own endpoints. - If
prepareMintthrowsPRICE_EXCEEDS_MAX, the price moved past your cap. Re-runcheckNameand confirm the new price before retrying. - If it throws
SIGNATURE_EXPIRED, the authorization aged out. CallprepareMintagain and submit promptly. - If simulation fails, confirm the wallet and public clients use the chain reported in
check.chainId.
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.

