Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin/photon
key: photon-${{ runner.os }}-49b7e7f0d668babbc4d65fe8a0a7236df76f75a8
key: photon-${{ runner.os }}-1a785036de52896b68d06413e3b0231122d6aa4a

- name: Install Solana CLI tools
shell: bash
Expand All @@ -106,7 +106,7 @@ runs:

- name: Install Light CLI
shell: bash
run: npm install -g @lightprotocol/zk-compression-cli
run: npm install -g @lightprotocol/zk-compression-cli@0.27.1-alpha.2

- name: Cache Powers of Tau file
if: inputs.install-circom == 'true'
Expand Down Expand Up @@ -141,7 +141,7 @@ runs:
shell: bash
env:
RUSTFLAGS: "-A dead-code"
run: cargo install --git https://github.com/lightprotocol/photon.git --rev 49b7e7f0d668babbc4d65fe8a0a7236df76f75a8 --locked
run: cargo install --git https://github.com/lightprotocol/photon.git --rev 1a785036de52896b68d06413e3b0231122d6aa4a --locked --force

- name: Generate keypair
shell: bash
Expand Down
38 changes: 29 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,27 @@ full compressed account lifecycle (create, increment, decrement, reset, close):

- **[zk-id](./zk-id)** - A minimal zk id Solana program that uses zero-knowledge proofs for identity verification with compressed accounts.


## Tree Versions

Compressed Accounts examples use different Tree versions:

### V1 Trees (Mainnet)
- **[counter/anchor](./counter/anchor/)** - Full compressed account lifecycle using Anchor
- **[counter/native](./counter/native/)** - Full compressed account lifecycle using native Solana
- **[counter/pinocchio](./counter/pinocchio/)** - Full compressed account lifecycle using Pinocchio
- **[account-comparison](./account-comparison/)** - Account comparison example

V1 Trees are deployed on **mainnet**.

### V2 Trees (Local/Devnet)
- **[create-and-update](./create-and-update/)** - Create and update accounts with single validity proof
- **[read-only](./read-only)** - Create and read compressed accounts onchain
- **[zk-id](./zk-id)** - Zero-knowledge identity verification

V2 Trees consume **significantly less CU** (compute units) and are available on **local and devnet** environments.

Both Tree versions are supported in Light SDK 0.16.0.

## Light Protocol dependencies

### Rust Crates
Expand All @@ -43,45 +63,45 @@ full compressed account lifecycle (create, increment, decrement, reset, close):

### TypeScript/JavaScript Packages

- `@lightprotocol/stateless.js` - Client library for interacting with compressed accounts
- `@lightprotocol/zk-compression-cli` - Command-line tools for ZK compression development
- `@lightprotocol/stateless.js@0.22.1-alpha.1"` - Client library for interacting with compressed accounts
- `@lightprotocol/zk-compression-cli@0.27.1-alpha.2` - Command-line tools for ZK compression development

## Prerequisites

Required versions:

- **Rust**: 1.86.0 or later
- **Solana CLI**: 2.2.15
- **Rust**: 1.90.0 or later
- **Solana CLI**: 2.3.11
- **Anchor CLI**: 0.31.1
- **Zk compression CLI**: 0.27.0 or later
- **Node.js**: 23.5.0 or later

Install the Light CLI:

```bash
$ npm -g i @lightprotocol/zk-compression-cli
$ npm -g i @lightprotocol/zk-compression-cli@0.27.1-alpha.2
```

Install Solana CLI:

```bash
sh -c "$(curl -sSfL https://release.solana.com/v2.2.15/install)"
sh -c "$(curl -sSfL https://release.solana.com/v2.3.11/install)"
```

Install Anchor CLI:

```bash
cargo install --git https://github.com/coral-xyz/anchor avm --force
avm install latest
avm use latest
avm use 0.31.1
```

## Getting Started with your own Program

1. install the light cli

```bash
$ npm -g i @lightprotocol/zk-compression-cli
$ npm -g i @lightprotocol/zk-compression-cli@0.27.1-alpha.2
```

2. instantiate a template Solana program with compressed accounts
Expand Down
Loading