Skip to content

Commit

Permalink
feat(tutorial6): update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMinkov committed Aug 28, 2023
1 parent 87b57a3 commit f11f295
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mina zkApp: Zkapp Offchain Storage

An experimental library for storing zkApp data offchain. This project is currently under development and should not be used in production.
An experimental library for storing zkApp data offchain. This project is currently under development and should not be used in production. This library is designed to be a reference implementation for [Tutorial 6](https://docs.minaprotocol.com/zkapps/tutorials/offchain-storage) which showcases how to store zkApp data offchain.

## Usage

Expand All @@ -12,11 +12,11 @@ Ensure all required modules are installed. To do so, run the following command:
npm install
```

### Running the Example
### Configuration

#### Blockchain Mode

Toggle the `useLocalBlockchain` variable to switch between local testing and real-world usage.
In the `main.ts` file, you can toggle the `useLocalBlockchain` variable to switch between local testing and real-world usage.

#### Account Configuration:

Expand All @@ -26,8 +26,7 @@ For `Berkeley` mode, you must provide a `deployerPrivateKey` and `zkAppPrivateKe
To generate these keys, you can use the following command:

```bash
npm run generate-keys

npm run generate-key
```

### Running the Application:
Expand Down Expand Up @@ -79,35 +78,6 @@ This server is designed to interact with the zkApp and help store and manage zkA

- Provides the public key of the server.

### Usage

1. Installation: Install all the necessary packages.

```bash
npm install
```

2. Running the server: Use the following command to start the server.

```bash
npm run server
```

The server will start listening on port 3001.

3. Generate keys: Use the following command to generate keys for the server.

```bash
npm run generate-keys
```

4. Run the example: Use the following command to run the example.

```bash
npm run build
node build/src/examples/main.js [deployerPrivateKey] [zkAppPrivateKey]
```

## License

[Apache-2.0](LICENSE)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"build": "tsc -p tsconfig.json",
"generate-key": "node scripts/generate_private_key.js",
"server": "npm run build && node --enable-source-maps build/src/storageServer.js"
"server": "npm run build && node --enable-source-maps build/src/server/storageServer.js"
},
"lint-staged": {
"**/*": [
Expand Down

0 comments on commit f11f295

Please sign in to comment.