getRecords

getRecords is a method on the ANT class that retrieves all the records stored in the ANT process, including both base name records and undername records.

getRecords does not require authentication.

Parameters

The getRecords method does not accept any parameters.

Examples

getRecords

const { ANT } = require('@ar.io/sdk');

async function main() {
  const ant = ANT.init({ processId: "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM" });
  const records = await ant.getRecords();

  console.log(records);
}

main();

Output

{
  "@": {
    "transactionId": "UyC5P5qKPZaltMmmZAWdakhlDXsBF6qmyrbWYFchRTk",
    "ttlSeconds": 3600
  },
  "blog": {
    "transactionId": "UyC5P5qKPZaltMmmZAWdakhlDXsBF6qmyrbWYFchRTk",
    "ttlSeconds": 3600
  },
  "docs": {
    "transactionId": "f5-cw-0Gl60FqmKhP5Sj3gQlJ1FhWXPkXB3UQEVoV4o",
    "ttlSeconds": 3600
  }
}