Skip to content

Commit

Permalink
prerequisite versions fix and Lightnet work with Serhii
Browse files Browse the repository at this point in the history
  • Loading branch information
barriebyron committed Jan 24, 2024
1 parent d07d979 commit 4345142
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
6 changes: 3 additions & 3 deletions docs/zkapps/install-zkapp-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ To build zero knowledge apps that use [o1js](/zkapps/o1js), you only need to ins

### Dependencies

- NodeJS v16 and later
- NPM v8 and later
- Git 2+
- NodeJS v18 and later
- NPM v10 and later
- git v2 and later

If you have a later version of a dependency, install the required version using the package manager for your system:

Expand Down
16 changes: 5 additions & 11 deletions docs/zkapps/testing-zkapps-lightnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,14 @@ Blockchain network properties include:

Each Docker image is packaged with a genesis ledger that is configured with more than 1000 prefunded accounts. Each account has a balance of 1550 MINA.

The Mina accounts manager helper tool provides a random public/private key pair that operates with accounts already configured in the genesis ledger.
The Mina Accounts-Manager helper tool provides a random public/private key pair that operates with accounts already configured in the genesis ledger. On Lightnet, the Mina Accounts-Manager is deployed to http://localhost:8181/ with HTTP endpoints. This endpoint is the same for all users and is available when Lightnet is up and running.

**Advanced** To access the genesis ledger configuration file `daemon.json`, you must manually access the Docker container file system with `docker exec -it mina-local-lightnet bash`.
**Advanced** The genesis ledger configuration file is `daemon.json`. You can manually access the Docker container file system to view and download the file.

### zkApp Account Interactions

The `acquireKeyPair()`, `releaseKeyPair()`, and `listAcquiredKeyPairs()` methods in the `Lightnet` o1js API namespace handle zkApp access to account information, including public keys, private keys, and secret keys. For details, see the [doc comments](https://github.com/o1-labs/o1js/blob/f5db874a3fd52635d3d77628696bc8e97f78b76c/src/lib/fetch.ts#L1012) in the code.
The `acquireKeyPair()`, `releaseKeyPair()`, and `listAcquiredKeyPairs()` methods in the `Lightnet` o1js API namespace handle zkApp access to account information, including public keys, private keys, and secret keys.

For a real-world example of using Lightnet accounts, see [run_live.ts](https://github.com/o1-labs/o1js/blob/main/src/examples/zkapps/hello_world/run_live.ts) example file used in [Tutorial 1: Hello World](/zkapps/tutorials/hello-world).
For details, see the [doc comments](https://github.com/o1-labs/o1js/blob/f5db874a3fd52635d3d77628696bc8e97f78b76c/src/lib/fetch.ts#L1012) in the code.

### Accounts Outside of zkApps

To get the accounts information outside of the zkApp program, use the Accounts-Manager Docker container service at the endpoint: http://localhost:8181/. This endpoint is the same for all users and is available when the Lightnet Docker container is up and running.

<!--
Question for Serhii: how to release unused accounts?
-->
For a real-world example of using Lightnet accounts, see [run_live.ts](https://github.com/o1-labs/o1js/blob/main/src/examples/zkapps/hello_world/run_live.ts) example file used in [Tutorial 1: Hello World](/zkapps/tutorials/hello-world).
6 changes: 3 additions & 3 deletions docs/zkapps/tutorials/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ $ zk --version

To use the zkApp CLI and o1js, your environment requires:

- NodeJS v16 and later (or NodeJS v14 using `--experimental-wasm-threads`)
- NPM v6 and later
- Git v2 and later
- NodeJS v18 and later
- NPM v10 and later
- git v2 and later

Use a package manager to install the required versions and upgrade older versions if needed. Package managers for the supported environments are:

Expand Down

0 comments on commit 4345142

Please sign in to comment.