getArNSReturnedNames
getArNSReturnedNames
is a method on the ARIO
class that retrieves all active returned names of the ARIO process, paginated and sorted by the specified criteria. The cursor
used for pagination is the last returned name from the previous request.
getArNSReturnedNames
does not require authentication.
Parameters
Parameter | Type | Description | Optional | Default |
---|---|---|---|---|
cursor | String | Cursor used for paginated results | true | None |
limit | Number | Max number of results to return in a single search. Max is 1000. | true | 100 |
sortBy | String | Property used to sort returned results | true | startTimestamp |
sortOrder | String | Order in which sorted results are returned. valid values are `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"
}