Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump js and cli releases #865

Merged
merged 10 commits into from
Jun 24, 2024
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
29 changes: 29 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,35 @@ solana balance

Now you're all set up to run CLI commands :)

#### Using ZK Testnet

By default, the CLI interacts with localnet. You can view the current config by running:

```bash
light config --get
```

To switch to ZK Testnet, run:

```bash
light config --indexerUrl "https://zk-testnet.helius.dev:8784" \
--proverUrl "https://zk-testnet.helius.dev:3001" \
--solanaRpcUrl "https://zk-testnet.helius.dev:8899"
```

Also adjust your solana config:

```bash
# Set config
solana config set --url "https://zk-testnet.helius.dev:8899"

# Airdrop 1 SOL
solana airdrop 1

# Print your address
solana address
```

### Commands

#### Create a compressed token mint
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/zk-compression-cli",
"version": "0.3.0",
"version": "0.4.2",
"description": "ZK Compression: Secure Scaling on Solana",
"maintainers": [
{
Expand Down
2 changes: 1 addition & 1 deletion cli/src/utils/processPhotonIndexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function startIndexer(
resolvedOrNull === null ||
(checkPhotonVersion && !(await isExpectedPhotonVersion(PHOTON_VERSION)))
) {
const message = `Photon indexer not found. Please install it by running "cargo install photon-indexer --version ${PHOTON_VERSION}"`;
const message = `Photon indexer not found. Please install it by running "cargo install photon-indexer --version ${PHOTON_VERSION} --locked"`;
console.log(message);
throw new Error(message);
} else {
Expand Down
2 changes: 1 addition & 1 deletion hasher.rs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/hasher.rs",
"version": "0.1.0-alpha.1",
"version": "0.2.0",
"description": "",
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion js/compressed-token/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/compressed-token",
"version": "0.2.0",
"version": "0.3.0",
"description": "JS client to interact with the compressed-token program",
"sideEffects": false,
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions js/stateless.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightprotocol/stateless.js",
"version": "0.3.0",
"version": "0.4.0",
"description": "JavaScript API for Light and ZK Compression",
"sideEffects": false,
"main": "dist/cjs/node/index.cjs",
Expand Down Expand Up @@ -38,14 +38,14 @@
"@solana/web3.js": "^1.91.8"
},
"dependencies": {
"@lightprotocol/hasher.rs": "workspace:*",
"@coral-xyz/anchor": "0.29.0",
"@noble/hashes": "^1.3.2",
"buffer": "^6.0.3",
"superstruct": "^1.0.3",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
"@lightprotocol/hasher.rs": "workspace:*",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@lightprotocol/programs": "workspace:*",
"@playwright/test": "^1.43.1",
Expand Down
5 changes: 5 additions & 0 deletions js/stateless.js/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const rolls = (fmt, env) => ({
}),
env === 'browser' ? nodePolyfills() : undefined,
].filter(Boolean),
onwarn(warning, warn) {
if (warning.code !== 'CIRCULAR_DEPENDENCY') {
warn(warning);
}
},
});

const typesConfig = {
Expand Down
5 changes: 0 additions & 5 deletions js/stateless.js/src/test-helpers/merkle-tree/indexed-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,6 @@ if (import.meta.vitest) {
const refIndexedArrayElem2 = new IndexedElement(2, bn(30), 1);

describe('IndexedArray', () => {
// it("init should match ref", () => {
// const indexedArray = new IndexedArray(refIndexedArrayElem0, refIndexedArrayElem1, refIndexedArrayElem2);
// expect(indexedArray.root).toEqual(refIndexedMerkleTreeInitedRoot);
// });

beforeAll(async () => {
WasmFactory = (await import('@lightprotocol/hasher.rs'))
.WasmFactory;
Expand Down
6 changes: 5 additions & 1 deletion photon-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
name = "photon-api"
version = "0.27.0"
authors = ["OpenAPI Generator team and contributors"]
description = "Solana indexer for general compression"
description = "Auto-generated API for Helius Labs' Photon Compression Indexer"
license = "Apache-2.0"
edition = "2018"
documentation = "https://docs.rs/photon-api"
homepage = "https://github.com/lightprotocol/lightprotocol"
repository = "https://github.com/lightprotocol/lightprotocol"


[dependencies]
serde = "^1.0"
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/release-all-rust-crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ echo "Tagging and releasing all Rust projects..."
echo "Logging in to crates.io..."
cargo login "${CRATES_IO_TOKEN}"
# TODO: allow dynamic releases, and add gh release workflow
# PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils")
PACKAGES=("light-compressed-token" "light-test-utils")
PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils")
PACKAGES=("light-test-utils")
for PACKAGE in "${PACKAGES[@]}"; do
PKG_VERSION=$(cargo pkgid -p "$PACKAGE" | cut -d "#" -f2)
VERSION=${PKG_VERSION#*@}
Expand Down
4 changes: 2 additions & 2 deletions test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ light-compressed-token = { path = "../programs/compressed-token", version = "0.4
light-system-program = { path = "../programs/system", version = "0.4.0", features = ["cpi"] }
light-registry = { path = "../programs/registry", version = "0.4.0", features = ["cpi"] }
spl-token = { version="3.5.0", features = ["no-entrypoint"] }
solana-transaction-status = { git = "https://github.com/Lightprotocol/agave", branch = "v1.18.11-enforce-cpi-tracking" }
solana-transaction-status = "1.18.11"
tokio = "1.36"
light-prover-client = { path = "../circuit-lib/light-prover-client", version = "0.2.0" }
reqwest = "0.11.26"
Expand All @@ -39,7 +39,7 @@ light-verifier = { path = "../circuit-lib/verifier", version = "0.2.0" }
light-utils = { path = "../utils", version = "0.2.0" }
memoffset = "0.9.1"
rand = "0.8"
photon-api = { path = "../photon-api" }
photon-api = { path = "../photon-api", version = "0.27.0" }
log = "0.4"

[dev-dependencies]
Expand Down