
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@lightprotocol/cli
Advanced tools
CLI to interact with Light Protocol and ZK compression.
Ensure you have Node >= v20.9.0 installed on your machine.
You will need a valid Solana filesystem wallet set up at ~/.config/solana/id.json
.
If you don't have one yet, visit the Solana documentation for details.
The CLI will use this wallet as the default fee payer and mint authority.
npm install -g @lightprotocol/cli
If you prefer to build the CLI from source, follow the steps below to install the necessary prerequesites.
1. Activate the Development Environment
Ensure you are at the root of the monorepo.
. ./scripts/devenv
2. Install and build the monorepo from source. This also builds the CLI.
./scripts/install.sh
./scripts/build.sh
3. Make your CLI available globally
pnpm link --global
# Verify the CLI was correctly installed
which light
1. Once globally installed, start the Light test validator
light test-validator
This starts a Solana test-validator with the Light system programs and accounts, a prover server, and the Photon indexer as background processes against a clean ledger.
# Pass --skip-indexer to start without the indexer
light test-validator --skip-indexer
# Pass --skip-prover to start without the prover
light test-validator --skip-prover
Note: The CLI currently runs the photon indexer and gnark-prover as background processes at port:
8784
and3001
respectively.
2. Ensure you have sufficient localnet funds
# Airdrop 1 SOL
solana airdrop 1
# Print your address
solana address
# Print your balance
solana balance
Now you're all set up to run CLI commands :)
light create-mint
USAGE
$ light create-mint [--mint-keypair <value>] [--mint-authority <value>]
[--mint-decimals <value>]
FLAGS
--mint-authority=<value> Path to the mint authority keypair file.
Defaults to default local Solana wallet file
path.
--mint-decimals=<value> Number of base 10 digits to the right
of the decimal place [default: 9].
--mint-keypair=<value> Path to a mint keypair file. Defaults to a
random keypair.
light mint-to --mint "YOUR_MINT_ADDRESS" --to "YOUR_WALLET_ADDRESS" --amount 4200000000
USAGE
$ light mint-to --mint <value> --to <value> --amount <value>
[--mint-authority <value>]
FLAGS
--amount=<value> (required) Amount to mint.
--mint=<value> (required) Mint address.
--mint-authority=<value> File path of the mint authority keypair.
Defaults to local Solana wallet.
--to=<value> (required) Recipient address.
light transfer --mint "YOUR_MINT_ADDRESS" --to "RECIPIENT_WALLET_ADDRESS" --amount 4200000000
USAGE
$ light transfer --mint <value> --to <value> --amount <value>
[--fee-payer <value>]
FLAGS
--amount=<value> (required) Amount to send.
--fee-payer=<value> Fee payer account. Defaults to the client
keypair.
--mint=<value> (required) Mint to transfer
--to=<value> (required) Recipient address
Note: Ensure the SOL omnibus account of the Light system program is already initialized by running:
light init-sol-pool
light compress-sol --amount 1000 --to "YOUR_WALLET_ADDRESS_BASE58"
USAGE
$ light compress-sol --to <value> --amount <value>
FLAGS
--amount=<value> (required) Amount to compress in lamports.
--to=<value> (required) Specify the recipient address.
light decompress-sol --amount 42 --to "YOUR_WALLET_ADDRESS_BASE58"
USAGE
$ light decompress-sol --to <value> --amount <value>
FLAGS
--amount=<value> (required) Amount to decompress in lamports.
--to=<value> (required) Specify the recipient address.
FAQs
ZK Compression: Secure Scaling of State on Solana
We found that @lightprotocol/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.