11# React Credits.aleo Functions Template
22
3- This template demonstrates building execution transactions for all 6 credits.aleo
4- transfer and record manipulation functions in a React application.
3+ This template demonstrates building execution transactions for 6 credits.aleo
4+ functions that demonstrate value transfers and record manipulation functions in a React application.
55
66## Functions Demonstrated
77
88### Public Transfers
99
10- - ** transfer_public** : Transfer credits between public balances
11- - ** transfer_public_to_private** : Convert public credits to a private record
10+ - ** transfer_public** : Transfer credits between public balances.
11+ - ** transfer_public_to_private** : Convert public credits to a private record.
1212
1313### Private Transfers
1414
15- - ** transfer_private** : Transfer credits using private records
16- - ** transfer_private_to_public** : Convert private record to public balance
15+ - ** transfer_private** : Transfer credits using private records.
16+ - ** transfer_private_to_public** : Convert private record to public balance.
1717
1818### Record Operations
1919
20- - ** join** : Combine two credit records into one
21- - ** split** : Split one credit record into two
20+ - ** join** : Combine two credit records into one.
21+ - ** split** : Split one credit record into two.
2222
2323## Getting Started
2424
@@ -36,38 +36,37 @@ Your app should be running on http://localhost:5173/
3636This template uses ` buildExecutionTransaction ` to create real transactions that
3737could be broadcast to the Aleo network. The SDK:
3838
39- 1 . Generates zero-knowledge proofs locally in your browser
40- 2 . Fetches inclusion proofs from the network for private record operations
41- 3 . Builds complete transactions ready for broadcast
39+ 1 . Generates zero-knowledge proofs locally in your browser.
40+ 2 . Builds transactions from the proof ready for broadcast.
4241
4342** Note:** Transactions are built but not broadcast, so sample records remain
4443unspent and can be reused.
4544
4645### Credits Records
4746
48- Private credits in Aleo are stored as records with this structure:
47+ Private credits in the credits.aleo program (the official representation of value on the Aleo Network) are stored as Aleo records with this structure:
4948
5049```
5150{
52- owner: aleo1xxx...xxx.private,
53- microcredits: 1000000u64.private,
54- _nonce: 123...789group.public,
55- _version: 1u8.public
51+ owner: aleo1xxx...xxx.private, // An aleo address that owns the record.
52+ microcredits: 1000000u64.private, // The amount in microcredits contained in the record.
53+ _nonce: 123...789group.public, // The unique nonce identifying the record.
54+ _version: 1u8.public // The version of the record.
5655}
5756```
5857
5958### Microcredits
6059
61601 Aleo credit = 1,000,000 microcredits. All amounts are specified in
62- microcredits with the ` u64 ` suffix (e.g., ` 50000u64 ` ).
61+ microcredits as plain numbers (e.g., ` 50000 ` ).
6362
6463## Notes
6564
66- - Network connectivity is required for inclusion proofs
67- - Public function execution takes ~ 10-15 seconds
68- - Private function execution takes ~ 30-120 seconds (includes network calls)
69- - Sample records are pre-filled for testing
70- - First execution downloads proving keys (~ 40-100MB)
65+ - Network connectivity is required for this app.
66+ - Public function execution takes ~ 10-15 seconds.
67+ - Private function execution takes ~ 30-120 seconds (depending on whether keys are locally cached or not).
68+ - Sample records are pre-filled for testing.
69+ - First execution downloads proving keys (~ 40-100MB).
7170
7271## Production Build
7372
0 commit comments