In the realm of the Aleo Network, where data privacy and security reign supreme, a revolutionary concept emerges — Aleo Credits. These credits aren’t just tokens; they power an ecosystem of privacy-centric operations, from executing programs to facilitating seamless transactions.
Here, we unveil the essence of Aleo Credits, their uniqueness, and the mechanics of transferring them.
Aleo Credits: unveiling the Official Token
A Token with Purpose: At the core of the Aleo Network lies the official token of operation — Aleo Credits. These credits serve a pivotal role, acting as the means to cover all fees associated with program execution within the Aleo network.
The Blueprint: credits.aleo Program: To understand Aleo Credits, one must delve into the credits.aleo program. Deployed onto the Aleo Network, this program defines the very essence of Aleo Credits. It outlines the data structures representing these credits and houses functions that orchestrate their management.
Dual paths to hold Aleo Credits
Private Balances via credits.aleo Records: One avenue involves holding Aleo Credits through credits.aleo records. These records empower participants to maintain private balances of Aleo Credits, shielded from prying eyes. A user’s private credits balance aggregates all unspent credits records owned by them, each with a non-zero microcredits value.
Public Balances via credits.aleo Account Mapping: The second pathway entails possessing a balance in the account mapping within the credits.aleo program. This approach allows users to hold a public credits balance. A user’s total public credits balance equates to the value in the account mapping at their address. Notably, users can concurrently maintain private and public balances.
A tale of Aleo Credit Transfers
Transfer Mechanics Unleashed: Aleo Credits can be seamlessly transferred between users, facilitated by the ProgramManager and executed through the transfer method. This method deploys the credits.aleo program to ensure smooth transfers.
Four Paths, One Objective: Four transfer functions usher in this transformative process:
- transfer_private: Transfers credits privately between sender and receiver, creating new records.
- transfer_private_to_public: Converts private credits into public credits, merging records and account mapping.
- transfer_public: Shifts public credits between users’ account mappings, sans records.
- transfer_public_to_private: Transforms public credits into private records, ensuring data privacy.
Tools for Building Zero Knowledge Web Apps
Bringing it all together
Code Walkthrough: To dive into Aleo Credits’ world, developers have the Aleo SDK as their ally. The provided code snippets illustrate the process. From initiating transfers and updating balances to checking public balances, the Aleo SDK empowers developers to harness the potential of Aleo Credits.
In a world marked by data breaches and privacy concerns, Aleo Credits emerge as the antidote — a realm where transactions are secure, and data remains private. Embrace Aleo Credits, and join the journey towards a safer, more confidential digital future.
Prepared by Colliseum