Text records are key-value pairs that can be used to store any arbitrary data associated with a name. Think of this as a user’s digital backpack utilized for the storage of preferences, public details, and more.
1. addTextRecord
Adds or updates a text record for the specified subname.Usage Example
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
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
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
Return Type
record
: The value associated with the requested key.