getAllowedDelegates
getAllowedDelegates
is a method on the ARIO
class that retrieves all allowed delegates for a specific gateway address. The cursor parameter is used for pagination and represents the last address from the previous request.
getAllowedDelegates
does not require authentication.
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
address | string | The gateway address to query for allowed delegates | Yes |
cursor | string | Cursor for paginated results | No |
limit | number | Maximum number of results to return (max: 1000) | No |
sortBy | string | Property to sort results by | No |
sortOrder | string | Sort direction (valid values: 'desc' or 'asc') | No |
Example
getAllowedDelegates
const { ARIO } = require('@ar.io/sdk');
async function main() {
const ario = ARIO.init();
const allowedDelegates = await ario.getAllowedDelegates({
address: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ',
});
console.log(allowdDelegates);
}
main();
Output
{
"sortOrder": "desc",
"hasMore": false,
"totalItems": 4,
"limit": 100,
"items": [
"PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM",
"N4h8M9A9hasa3tF47qQyNvcKjm4APBKuFs7vqUVm-SI",
"JcC4ZLUY76vmWha5y6RwKsFqYTrMZhbockl8iM9p5lQ",
"31LPFYoow2G7j-eSSsrIh8OlNaARZ84-80J-8ba68d8"
]
}