getRecords

getRecords is a method on the ANT class that retrieves all records from the configured ANT process. This includes the required @ record that resolves connected ArNS names.

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
  },
  "zed": {
    "transactionId": "-k7t8xMoB8hW482609Z9F4bTFMC3MnuW8bTvTyT8pFI",
    "ttlSeconds": 900
  },

  "ardrive": {
    "transactionId": "-cucucachoodwedwedoiwepodiwpodiwpoidpwoiedp",
    "ttlSeconds": 900
  }
}