1. getL2Subname
ThegetL2Subname method retrieves a single subname registered on an L2 chain.
Usage
chainId: The id of the target L2 network (e.g.,base(8453),optimism(10),baseSepolia(84532))nameOrNamehash: Name or namehash representation of an ENS name
Return Type
Field Description
| Field | Description |
|---|---|
name | Full subname (e.g., alice.oppunk.eth) |
namehash | ENS-compatible namehash of the subname |
label | The label (left-most part) of the subname (e.g., alice) |
parentNamehash | Namehash of the parent domain (e.g., oppunk.eth) |
owner | Ethereum address of the current owner |
texts | Map of text records associated with the subname |
addresses | Map of address records (coin type → address) |
contenthash | Content hash (e.g., IPFS, Arweave link) |
chainId | Chain ID where the subname is registered (e.g., 8453 for Base, 10 for Optimism) |
expiry | Unix timestamp indicating when the subname will expire (0 for non-expirable subnames) |
mintTransaction | Object describing the minting transaction |
price | Minting price in ETH |
paymentReceiver | Ethereum address that received the mint payment (e.g., 0x1234...abcd) |
2. getL2Subnames
ThegetL2Subnames method allows you to retrieve a paginated list of Layer 2 (L2) subnames based on various filter criteria.

