Quick Start
Let's do a quick query to find $web3.
The ADA Handle Standard makes querying a Handle's location (and by extension, the corresponding address) very simple. On Cardano, all NFTs are minted under a Policy ID. The Policy ID can only be generated by the policy's private key, and therefore acts as a guarantee for the NFT being minted that no other NFT under the same name will also have the same Policy ID.
With this in mind, it is completely safe and definitive to query a Handle's name as long as you have the correct Policy IDs in your query.
To demonstrate just how easy this concept is, let's look for the Handle $web3
.
Querying A Handle
Converting a Handle to an address is as simple as checking for the location of that Handle. Rather than typical custom address NFTs that associate an address with metadata, the Handle Standard assumes an associated address by reference.
In our example, we will query the location of the $web3 Handle using a the Blockfrost REST API, but you could query your own Cardano node (equipped with the Wallet API) just as easily.
And that's it! You can be certain that the resulting address will be accurate at the time of the query. Depending on your dApp, you may want to query the Handle's location on an interval to account for possible movement between wallets.
Last updated