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
Parameter | Type | Description | Optional | Default |
---|---|---|---|---|
cursor | string | The name to use as the starting point for the next page of results | true | None |
limit | number | The maximum number of records to return (max: 1000) | true | 100 |
sortBy | string | The property to sort results by | true | startTimestamp |
sortOrder | string | The sort direction ('desc' or 'asc') | true | desc |
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"
}