I am looking at web3.eth.ens library, I can see methods setText and getText, which allows you to set and get key value pairs against an ENS name. What is the purpose of this? Also is there a way to find all the keys against an ENS name?
text() allow ENS name holders to associate metadata with a ENS name.
Both are functions of the
From ENS docs:
function setText(bytes32 node, string calldata key, string calldata value) external authorised(node)
Sets text metadata for
nodewith the unique key
value, overwriting anything previously stored for
key. To clear a text field, set it to the empty string.
function text(bytes32 node, string calldata key) external view returns (string memory)
Retrieves text metadata for
node. Each name may have multiple pieces of metadata, identified by a unique string
key. If no text data exists for
nodewith the key
key, the empty string is returned.