🥷
Namespace
  • [ Introduction ]
    • ENS
    • Namespace
  • Official Links
  • [ Dapps ]
    • Overview
    • Onchain Subs (App)
      • Search & Register
      • Wizard
        • Listing an ENS Name
        • Features List
      • ENS Widget
      • Farcaster Frames
        • Default Frame
        • Custom Frame
    • Offchain Subs (DevPortal)
      • Subname create/manage
      • Resolver set
      • API keys
  • How-to Guides and Demos
  • [ Dev Docs ]
    • SDK
      • Offchain Manager
        • Installation
        • Generate API key
        • Create or Update Subname
        • DeleteSubname
        • IsSubnameAvailable
        • GetFilteredSubnames
        • AddressRecords
          • ChainName
        • TextRecords
        • DataRecords
      • Indexer Manager
        • Installation
        • Methods
        • GetL2Subname
        • GetL2Subnames
      • Mint Manager
        • Installation
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • How To Mint L1 & L2 subname via mint-manager
      • Namespace Client (deprecated)
        • Installation
        • GetListedName
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • GenerateAuthToken
    • APIs
      • Offchain Manager
      • Mint Manager
    • Infrastructure
      • Namespace L2 Subnames
  • [ ecosystem ]
    • Use Cases
  • [ Jobs ]
    • 🧑‍💻 Full-Stack Dev
    • 🥷 Dev-Rel Lead
    • 💼 BD Lead
Powered by GitBook
On this page
  • Usage
  • Return Type
  1. [ Dev Docs ]
  2. SDK
  3. Indexer Manager

GetL2Subnames

GetL2Subnames method allows you to get list of L2 subnames based on requested criteria.

Usage

It accepts GetL2SubnamesQuery interface that contains data for that subname.

export interface GetL2SubnamesQuery {
  network?: L2Network;
  owner?: number;
  pageSize?: number;
  page?: number;
  stringSearch?: string;
  parentName?: string;
  isTestnet?: boolean;
}
client.getL2Subnames({
  network: "base",
  parentName: "example.eth",
  pageSize: 200,
});

Return Type

export interface L2SubnamePagedResponse {
  items: L2SubnameResponse[];
  totalItems: number;
  page: number;
  pageSize: number;
}

export interface L2SubnameResponse {
  name: string;
  namehash: string;
  label: string;
  parentNamehash: string;
  owner: string;
  texts: Record<string, string>;
  addresses: Record<string, string>;
  contenthash?: string;
  chainId: number;
  expiry: number;
  mintTransaction?: {
    price: number;
    paymentReceiver: string;
  };
}
  1. items - list of subnames that match requested criteria

  2. totalItems - total number of subnames found

  3. page - number of page in the response

  4. pageSize - number of returned subnames per page


  1. name - the name of the subname

  2. namehash - the hash of the subname

  3. label - the label of the subname

  4. parentNamehash - the hash of the parent name

  5. owner - the owner of the subname

  6. texts - a text records associated with the subname

  7. addresses - a address records associated with the subname

  8. contenthash - the contenthash of the subname

  9. chainId - the chain ID where the subname is registered

  10. expiry - the expiry date of the subname

  11. mintTransaction - details of the mint transaction

    • price - the price of the mint transaction

    • paymentReceiver - the receiver of the payment

PreviousGetL2SubnameNextMint Manager