# Token Registry Program on Aleo: a developer's guide

By [Colliseum](https://paragraph.com/@colliseum) · 2025-03-05

---

Hello, my name is Heorhii, and today we’ll dive into **Aleo’s Token Registry Program** — a standardized approach to issuing and managing tokens on the Aleo blockchain. Built as a singleton program, it ensures interoperability while following Aleo's on-chain restrictions on dynamic calls.

This article walks through its key features, usage, and implementation with practical code snippets.

[https://developer.aleo.org/guides/standards/token\_registry](https://developer.aleo.org/guides/standards/token_registry)

**1\. Understanding the Token Registry Program.** The Token Registry Program allows developers to register, mint, transfer, and burn tokens while enabling optional external authorization. This provides flexibility in managing access and permissions.

**Key components:**

*   **Token Registration**. Create a new token with unique parameters
    
*   **Minting & Burning**. Public & private mint/burn functions
    
*   **Transfers**. Support for public and private transfers
    
*   **Access Control**. Set roles like Minter, Burner, and Supply Manager
    
*   **External Authorization**. Add extra control over spending permissions
    

Each token is identified by a unique token ID and has metadata stored on-chain.

**2\. How to use the Token Registry Program:**

**🔹 Registering a Token.** Anyone can register a new token on Aleo by calling:

    register_token(
        token_id: field, 
        name: u128, 
        symbol: u128, 
        decimals: u8, 
        max_supply: u128, 
        external_authorization_required: bool, 
        external_authorization_party: address
    )
    

This creates a new token with optional external authorization requirements.

**🔹 Minting & Burning Tokens.** Once registered, tokens can be minted and burned using the appropriate functions:

    mint_public(token_id: field, recipient: address, amount: u128)
    mint_private(token_id: field, recipient: address, amount: u128)
    burn_public(token_id: field, owner: address, amount: u128)
    burn_private(token: Token, amount: u128)
    

Public transactions are visible on-chain, while private transactions keep ownership confidential.

**🔹 Transferring Tokens.** Tokens can be moved publicly or privately:

    transfer_public(token_id: field, recipient: address, amount: u128)
    transfer_private(token: Token, recipient: address, amount: u128)
    

Additionally, conversions between public and private balances are supported:

    transfer_public_to_private(token_id: field, recipient: address, amount: u128)
    transfer_private_to_public(token: Token, recipient: address, amount: u128)
    

**🔹 Managing Token roles.** The admin can assign specific roles to accounts, such as:

    set_role(token_id: field, account: address, role: u8)
    remove_role(token_id: field, account: address)
    

Roles include:

*   **Minter** – can mint new tokens
    
*   **Burner** – can burn tokens
    
*   **Supply Manager** – can adjust supply
    

**3\. Token Registry data structures.** Each token is represented by structured data stored on-chain.

*   **Token Record:**
    

    record Token {
        owner: address,
        amount: u128,
        token_id: field,
        external_authorization_required: bool,
        authorized_until: u32
    }
    

*   **Token Metadata:**
    

    struct TokenMetadata {
        token_id: field,
        name: u128,
        symbol: u128,
        decimals: u8,
        supply: u128,
        max_supply: u128,
        admin: address,
        external_authorization_required: bool,
        external_authorization_party: address
    }
    

*   **Token Balances:**
    

    struct Balance {
        token_id: field,
        account: address,
        balance: u128,
        authorized_until: u32
    }
    

These records enable on-chain tracking of ownership, balances, and authorization conditions.

**4\. Why use the Token Registry Program?** Aleo’s privacy-first approach makes it ideal for secure, compliant token issuance. This registry provides:

*   **Standardization**. Ensures compatibility across Aleo dApps
    
*   **Privacy control**. Supports private transactions
    
*   **Flexible authorization**. Optional external approval for extra security
    
*   **Role-based access**. Fine-tuned permissions for admins & minters
    
*   **Public & Private transfers**. User choice for visibility
    

The Token Registry Program simplifies token management on Aleo, providing a flexible and privacy-preserving approach to handling digital assets.

Whether you're building a DeFi protocol, gaming platform, or loyalty rewards system, this standard ensures seamless token operations with privacy at its core.

For more details, check out the official source code here.

[https://github.com/demox-labs/aleo-standard-programs/blob/main/token\_registry/src/main.leo](https://github.com/demox-labs/aleo-standard-programs/blob/main/token_registry/src/main.leo)

_To know more about Aleo, join now!_

> *   _Aleo_ [_Twitter_](https://twitter.com/aleohq)
>     
> *   _Aleo_ [_Discord_](https://discord.gg/aleo)
>     
> *   _Aleo_ [_Website_](https://www.aleo.org/)
>     
> *   _List of_ [_Aleo and Leo code and resourses_](https://github.com/howardwu/awesome-aleo#%EF%B8%8F-a-curated-list-of-aleo--leo-code-and-resources-%EF%B8%8F)
>     

Prepared by Colliseum

---

*Originally published on [Colliseum](https://paragraph.com/@colliseum/token-registry-program-on-aleo-a-developer-s-guide)*
