DataRecords

Data Record methods allows for fetching, adding, updating or deleting text records for a given subname

Data Records are key value pairs that are not nesesarily needed or used for ENS Resolutin, but can be helpful for storing metadata which can be used for filtering

AddDataRecord method adds data record to the subname.

Usage

client.addDataRecord(subname: "ns.myensname.eth", key: "data", data: "HODL ENS!");

DeleteDataRecord method deletes data record to the subname.

Usage

client.deleteDataRecord(subname: "ns.myensname.eth", key: "data");

GetDataRecords method returns all data records of provided subname.

Usage

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

GetDataRecord method returns requested data record of provided subname.

Usage

const response = client.getDataRecord("ns.myensname.eth", "data");
const data = response.record;

Return Type

export interface GetRecordResponse {
  record: string;
}

record - value of requested data record

Last updated