ANTRegistry
Overview
The ANT Registry is a utility developed to make it easier to obtain a list of ANTs owned or controlled by a specific address. The Owners and Controllers for each ArNS name are stored in the state of the ANT itself, rather than in the AR.IO Network contract, which means every individual ANT would normally need to be queried in order to compose a complete list of ANTs owned or controlled by a specific address.
When appropriately constructed ANTs are registered with the registry, they will send updates to the registry whenever they update their own owner or controller data, creating a single index where the information can be quickly queried by apps that have use for that information.
The ANTRegistry
class in the AR.IO SDK contains 2 methods.
accessControlList
which accepts a wallet address and returns a list of all ANTs owned or controlled by that address,register
which registers a new ANT with the registry process
ArNS names that are purchased via ar://arns which use default ANTs are registered without further input during the creation process,
but users who bring their own custom ANTs to assign new ArNS names to will need to call the ANTRegistry.register()
method in order for apps using the registry to see the new ArNS name.
The ANT Registry is separate from the AR.IO Network Contract, ANT registration is not essential for ANTs and their corresponding ArNS name to function correctly, though some applications, like ar://arns, may have features that rely on the registry.