getArNSReservedNames
getArNSReservedNames
is a method on the ARIO
class that retrieves all reserved ArNS names, with support for pagination and custom sorting. Reserved names are names that are protected and cannot be registered by users.
getArNSReservedNames
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 | name |
sortOrder | string | The sort direction ('desc' or 'asc') | true | asc |
Examples
getArNSReservedNames
const { ARIO } = require('@ar.io/sdk');
async function main() {
const ario = ARIO.init();
const reservedNames = await ario.getArNSReservedNames({
limit: 50,
sortBy: 'name',
sortOrder: 'asc'
});
console.log(reservedNames);
}
main();
Output
{
"items": [
{
"name": "arweave",
"target": "some-protected-target",
"endTimestamp": null
},
{
"name": "ar-io",
"target": "another-protected-target",
"endTimestamp": null
}
],
"hasMore": true,
"nextCursor": "ar-io",
"totalItems": 150,
"sortBy": "name",
"sortOrder": "asc"
}