purchase_name
Purchase an ENS name by registering available names or buying listed ones from marketplaces, with automatic detection and transaction details provided.
Instructions
Purchase an ENS name — either buy a listed name from a marketplace or register an available name directly on-chain.
For AVAILABLE names: Returns a complete registration recipe with contract address, ABI, step-by-step instructions, and a pre-generated secret. Your wallet signs and submits the transactions (commit → wait 60s → register).
For LISTED names: Searches all marketplaces (OpenSea, Grails) for the best price. If there are MULTIPLE active listings, returns CHOOSE_LISTING status with all options — present these to the user and ask which one they want. When the user chooses, call this tool again with the chosen orderHash to get the buy transaction.
The tool auto-detects whether the name is available or listed. You can override with the 'action' parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ENS name to purchase (e.g. "coffee.eth") | |
| action | No | Action: buy_listing (purchase listed name), register (register available name), auto (detect automatically) | auto |
| duration | No | Registration duration in DAYS, for available names (ENS minimum 28, maximum 3650 = 10 years, default 365 = 1 year) | |
| orderHash | No | Specific Seaport order hash to fulfill. Use this when the user has chosen a specific listing from multiple options. | |
| maxPriceEth | No | Maximum price willing to pay in ETH (for listed names) | |
| durationYears | No | DEPRECATED — use duration (days) instead. Years are converted to days on the backend. | |
| walletAddress | Yes | Buyer wallet address (will own the name) |