getArNSReturnedNames

getArNSReturnedNames is a method on the ARIO class that retrieves all currently active returned ArNS names, with support for pagination and custom sorting. Pagination is handled using a cursor system, where the cursor is the name from the last record of the previous request.

getArNSReturnedNames does not require authentication.

Parameters

ParameterTypeDescriptionOptionalDefault
cursorstringThe name to use as the starting point for the next page of resultstrueNone
limitnumberThe maximum number of records to return (max: 1000)true100
sortBystringThe property to sort results bytruestartTimestamp
sortOrderstringThe sort direction ('desc' or 'asc')truedesc

Example

getArNSReturnedNames

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

async function main() {
  const ario = ARIO.init();
  const returnedNames = await ario.getArNSReturnedNames({
    limit: 100,
    sortBy: 'endTimestamp',
    sortOrder: 'asc', // return the returned names ending soonest first
});

  console.log(returnedNames);
}

main();

Output

{
  "items": [
    {
      "name": "permalink",
      "endTimestamp": 1730985241349,
      "startTimestamp": 1729775641349,
      "baseFee": 250000000,
      "demandFactor": 1.05256,
      "initiator": "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc",
      "settings": {
        "durationMs": 1209600000,
        "decayRate": 0.000000000016847809193121693,
        "scalingExponent": 190,
        "startPriceMultiplier": 50
      }
    }
  ],
  "hasMore": false,
  "totalItems": 1,
  "sortBy": "endTimestamp",
  "sortOrder": "asc"
}