Understanding Records
Records are encrypted data structures that represent private state on the Aleo blockchain. Each record:- Is encrypted to a specific address
- Can only be decrypted with the corresponding view key
- Becomes “spent” when used as input to a transaction
- Contains an owner and program-specific data
Record Structure
A typical credits record:Finding Records
Use the ledger to find records associated with a view key:Record Filters
Filter records by spent status:All Records
Unspent Records
Spent Records
Slow Filters
For more accurate filtering (slower but uses private key):Use
Unspent and Spent filters for performance. Use SlowUnspent and SlowSpent when you need guaranteed accuracy.Finding Credits Records
Find unspent credits records specifically:Decrypting Records
Decrypt ciphertext records:Using Records in Transactions
Transfer with Private Record
Split Record
Extracting Records from Transactions
Get records from transaction outputs:Record Ownership Verification
Check if you own a record:Record Tags and Serial Numbers
Computing Record Tags
Computing Serial Numbers
Creating Custom Records
Create records in your own programs:Record Storage Patterns
Indexing Records
Caching Unspent Records
Error Handling
Handle record-related errors:Best Practices
Select Records Efficiently
Choose the smallest sufficient record for transactions:Batch Record Operations
Process multiple records efficiently:Next Steps
- Learn about executing transactions using records
- Explore working with accounts to manage record ownership
- Understand deploying programs that create custom records