Integrate ANS into Wallet


Integrating the Aleo Name Service (ANS) into your wallet application enhances user experience by enabling more human-readable transactions and providing additional security features. This document outlines the key integration points for incorporating ANS within your wallet to leverage these benefits.

Key Integration Points

  1. Displaying Primary Name and Avatar

    • Objective: Display the user's ANS primary name and avatar in the wallet interface.

    • Implementation: Utilize the provided APIs to query the ANS primary name and avatar settings. When a wallet is connected, check if the user has set a primary name or avatar and display these within the wallet interface accordingly.

  2. Transfers Using ANS

    • Objective: Allow users to initiate transfers using ANS domains instead of Aleo account addresses.

    • Details:

      • Public ANS: If the ANS domain is public, the wallet should offer the user the option to send ACs (Aleo Credits) directly to the ANS or to the Aleo account associated with the ANS. Since public ANS domains are linked to a visible Aleo address, the recipient's account details are retrievable.

      • Private ANS: If the ANS domain is private, transfers should be directed to the ANS domain itself. The wallet can enable users to set a password for the transfer, adding an extra layer of security. Recipients must verify this password to claim the ACs.

      • Security Considerations: For transfers to ANS, if ACs are sent, the holder of the ANS domain can withdraw these credits. Note that if the ANS is in a public state at the time of withdrawal, the user’s Aleo address will be exposed in the transaction record.

      • Refer to the "Privacy Credit Transfer Scheme" from ARC0137 for specifics on implementing secure, private transfers. For further details, see ARC0137 on GitHub.

  3. Activities and NFT Display

    • Objective: Enhance the transaction history by replacing Aleo addresses with ANS domain names and support NFT displays.

    • Implementation:

      • Activity Display: Modify the activities display logic to show ANS domain names instead of Aleo addresses wherever applicable, provided the user has set up such a mapping.

      • NFT Display: If the wallet has the capability to display NFTs, include ANS as an NFT, showcasing it similarly to other NFT assets in the wallet.

Security and Privacy

  • Password Protection: When transferring ACs to an ANS domain, offering the option to set a password can help secure the transaction.

  • Address Exposure: Users should be aware that if they opt to use public fees, their Aleo addresses will be exposed in the transaction records.

API Usage

  • Provide specific API endpoints for querying ANS settings (e.g., primary name, avatar) and performing secure transactions using ANS.


Integrating ANS into your wallet improves usability by replacing complex Aleo addresses with readable domain names and enhances security through optional password-protected transfers. Additionally, the capability to display ANS as NFTs brings visual appeal and familiarity for users interacting with NFT assets.

Action Items

  • Implement the primary name, avatar display features, and NFT display capabilities.

  • Support transfers via ANS with security options.

By following this guide, your wallet will be fully equipped to handle ANS features, thus enhancing both usability and security for your users while also embracing the growing trend of NFT display within the crypto wallet environment.

Last updated