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

← Swipe to see more →
ParameterTypeDescriptionRequired
addressstringThe gateway address to query for allowed delegatesYes
cursorstringCursor for paginated resultsNo
limitnumberMaximum number of results to return (max: 1000)No
sortBystringProperty to sort results byNo
sortOrderstringSort direction (valid values: 'desc' or 'asc')No
← Swipe to see more →

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"
  ]
}