🥷
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
  • 1. addTextRecord
  • Usage Example
  • 2. deleteTextRecord
  • Usage Example
  • 3. getTextRecords
  • Usage Example
  • 4. getTextRecord
  • Usage Example
  1. [ Dev Docs ]
  2. SDK
  3. Offchain Manager

TextRecords

These methods allow you to manage text records for a given ENS subname. You can fetch, add, update, or delete individual records.

1. addTextRecord

Adds or updates a text record for the specified subname.

Usage Example

client.addTextRecord(subname: "ns.myensname.eth", key: "description", value: "HODL ENS!");
  • subname: The full ENS subname.

  • key: The key for the text record (e.g., "description").

  • value: The value to associate with the key.

2. deleteTextRecord

Deletes a text record from the specified subname.

Usage Example

client.deleteTextRecord(subname: "ns.myensname.eth", key: "description");
  • key: The key of the text record to delete.

  • subname: The full ENS subname.

3. getTextRecords

Retrieves all text records associated with the specified subname.

Usage Example

client.getTextRecords("ns.myensname.eth");

Returns a Record<string, string> mapping each text record key to its value.

4. getTextRecord

Retrieves a specific text record from a subname by key

Usage Example

const response = await client.getTextRecord("ns.myensname.eth", "description");
const description = response.record;

Return Type

export interface GetRecordResponse {
  record: string;
}
  • record: The value associated with the requested key.

PreviousChainNameNextDataRecords

Last updated 10 hours ago