@@ -34,29 +34,29 @@ The Aleo SDK provides the following functionality (Click to see examples):
34
34
35
35
* [ Installation] ( #Installation )
36
36
* [ Usage] ( #Usage )
37
- * [ Zero-Knowledge Web App Examples] ( #Zero-Knowledge-Web-App-Examples )
37
+ * [ Zero-Knowledge Web App Examples] ( #Getting-Started- Zero-Knowledge-Web-App-Examples )
38
38
* [ Create Leo App] ( #create-leo-app )
39
39
* [ Provable.tools] ( #provabletools )
40
40
* [ Create An Aleo Account] ( #1-create-an-aleo-account )
41
41
* [ Execute Aleo Programs] ( #2-execute-aleo-programs )
42
42
* [ Aleo Programs] ( #21-aleo-programs )
43
43
* [ Program Execution Model] ( #22-program-execution-model )
44
- * [ WebAssembly Initialization ] ( #23-wasm-initialization )
44
+ * [ Multithreading ] ( #23-multithreading )
45
45
* [ Local Program Execution] ( #24-local-program-execution )
46
46
* [ Online Program Execution] ( #25-program-execution-on-the-aleo-network )
47
47
* [ Program Proving Keys and Records] ( #26-program-proving-keys--program-records )
48
48
* [ Deploy Programs] ( #27-deploy-a-new-program-to-the-aleo-network )
49
49
* [ React Example] ( #28-react-example )
50
- * [ Aleo Credit Transfers] ( #3-value -transfers )
50
+ * [ Aleo Credit Transfers] ( #3-aleo-credit -transfers )
51
51
* [ Aleo Credits] ( #31-aleo-credits )
52
- * [ Transfer Aleo Credits] ( #32-transfer -aleo-credits )
52
+ * [ Transfer Aleo Credits] ( #32-transferring -aleo-credits )
53
53
* [ Check Public Balances] ( #32-checking-public-balances )
54
54
* [ Program Data and Private State] ( #4-managing-program-data-and-private-state )
55
- * [ Private State Data: Records] ( #41-private-state-data-- records )
56
- * [ Record Usage Example] ( #42-record-usage-example-- private-value-transfers )
57
- * [ Public State Data: Mappings] ( #43-public-state-data-- mappings )
55
+ * [ Private State Data: Records] ( #41-private-state-data-records )
56
+ * [ Record Usage Example] ( #42-record-usage-example-private-value-transfers )
57
+ * [ Public State Data: Mappings] ( #43-public-state-data-mappings )
58
58
* [ Reading Mappings] ( #44-reading-mappings )
59
- * [ Initializing and Updating Mappings] ( #45-initializing- -updating-mappings )
59
+ * [ Updating Mappings] ( #45-updating-mappings )
60
60
* [ Communicating with the Aleo Network] ( #5-communicating-with-the-aleo-network )
61
61
* [ Further Documentation] ( #further-documentation )
62
62
## Installation
@@ -215,7 +215,8 @@ The SDK provides the ability to execute Aleo programs 100% client-side within th
215
215
216
216
The ` ProgramManager ` object encapsulates the functionality for executing programs and making zero-knowledge proofs about
217
217
them. Under the hood it uses cryptographic code compiled from [ SnarkVM] ( https://docs.leo-lang.org/aleo ) into WebAssembly
218
- with JavaScript bindings that allow for the execution of Aleo programs fully within the browser.
218
+ with JavaScript bindings that allow for the execution of Aleo programs fully within the browser. Users interested in lower-level
219
+ details on how this is achieved can visit the [ aleo-wasm] ( https://crates.io/crates/aleo-wasm ) crate.
219
220
220
221
The basic execution flow of a program within the SDK is as follows:
221
222
1 . A web app creates an instance of the ` ProgramManager ` object.
@@ -226,7 +227,7 @@ The basic execution flow of a program within the SDK is as follows:
226
227
6 . The result is returned to the javascript environment in the form of an ` Execution Transaction ` .
227
228
7 . The execution is sent to the Aleo network.
228
229
229
- ### 2.3 WebAssembly Initialization
230
+ ### 2.3 Multithreading
230
231
231
232
You can enable multithreading by calling the ` initThreadPool ` function. This will run the SDK on multiple workers,
232
233
which significantly speeds up performance:
@@ -426,7 +427,7 @@ step by running:
426
427
427
428
` npm create leo-app@latest `
428
429
429
- You will then be prompted to select either Vanilla, React, or Node.js as the template for the project. For this example, select Vanilla .
430
+ You will then be prompted to select either Vanilla, React, or Node.js as the template for the project. For this example, select React .
430
431
431
432
#### Program execution
432
433
@@ -884,7 +885,7 @@ const publicCredits = networkClient.getMapping("credits.aleo", "[a valid aleo ac
884
885
assert (publicCredits === " 0u64" );
885
886
```
886
887
887
- ### 4.5 Initializing & updating mappings
888
+ ### 4.5 Updating mappings
888
889
Updating mappings is done by executing a program function on the Aleo network which has a finalize block that updates the
889
890
program's mapping. For instance, the ` transfer_public ` function in the ` credits.aleo ` program updates the ` account `
890
891
mapping (and thus a user's balance) when called.
0 commit comments