getAntsForAddress

getAntsForAddress is a method on the ANTRegistry class that provides a cleaner API for fetching ANTs owned or controlled by a specific wallet address. This method is functionally equivalent to accessControlList but provides a more intuitive interface.

getAntsForAddress does not require authentication.

Examples

getAntsForAddress

const ants = await registry.getAntsForAddress({
    address: '7oqF5r...LbpfT7'
});

Parameters

ParameterTypeDescriptionOptional
addressstring

The wallet address to query for owned or controlled ANTs

false

Output

{
  "Owned": [
    "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
    "abc123def456ghi789jkl012mno345pqr678stu901"
  ],
  "Controlled": [
    "xyz987wvu654tsr321qpo098nml765kji432hgf876"
  ]
}

Notes

  • This method returns the same data structure as accessControlList
  • The Owned array contains ANT process IDs where the address is the owner
  • The Controlled array contains ANT process IDs where the address is a controller
  • If no ANTs are found for the address, both arrays will be empty
  • This method automatically uses HyperBeam caching when available for improved performance

Was this page helpful?