Run an LEZ wallet via the CLI
Try the wallet CLI against the live LEZ testnet.
This procedure explains how to install the wallet CLI from the LEZ repository and point it at the public LEZ testnet sequencer.
Before you start, make sure you have the following installed:
- Rust and
cargo— install withrustup. The wallet pins its toolchain viarust-toolchain.toml, so the correct version is selected automatically. - System build dependencies for compiling the wallet from source:
# Ubuntu / Debiansudo apt updatesudo apt install git curl build-essential clang libclang-dev pkg-config libssl-dev# Fedorasudo dnf install git curl gcc glibc-devel clang clang-devel pkgconf-pkg-config openssl-devel llvm-libs# macOSxcode-select --installbrew install pkg-config openssl
What to expect
- You can run wallet commands against the live LEZ testnet sequencer.
- Your wallet is configured to target
https://testnet.lez.logos.coas the sequencer address.
Install the wallet and connect it to the testnet
-
In the LEZ repository, check out the correct release tag:
git clone https://github.com/logos-blockchain/logos-execution-zone.gitcd logos-execution-zonegit checkout v0.2.1 -
Rename the existing wallet directory (if you have one) to avoid conflicts:
mv ~/.lee/wallet ~/.lee/wallet.old 2>/dev/null || true -
Install the wallet CLI:
cargo install --path lez/wallet --force -
Point the wallet at the testnet:
wallet change-network testnet
Verify the connection
-
Run the health check command:
wallet check-healthA successful connection returns:
✅All looks good!
Complete a minimal wallet flow
In this flow, you create and initialise an account, claim testnet funds, send a transfer, and confirm resulting balances.
In this task, wallet account and transfer commands interact with the authenticated-transfer program, and sequencer processing determines the resulting account state. Public and private account paths share command patterns, while private paths can include local proof generation.
Create and initialise the sender public account
-
Create a sender public account and record the
account_idvalue:wallet account new public -
Using the sender public
account_idfrom the previous step, check the sender status:wallet account get --account-id <sender_public_account_id>Example:
wallet account get --account-id Public/14TYHiuzKiNR1ydETpr9mJMkjY6jf1hQFZ11d3X8Tc7NYou should see
Account is Uninitializedin the output. New accounts start uninitialised, so no program owns them yet. A program can claim an uninitialised account (for example, the authenticated-transfer program or the token program). After a program claims an account, only that program can modify the account state. LEZ makes one exception for account credits, where any program can credit native tokens to any account. For account debits, LEZ requires the owning program. -
Initialise the sender account, then check the updated state:
infoRunning
wallet auth-transfer initinitialises the sender account under the authenticated-transfer program, so the account can debit native tokens when you send transfers.wallet auth-transfer init --account-id <sender_public_account_id>In the output, you should see the transaction hash printed as
Transaction hash is <hash>. -
Check the account updated state:
wallet account get --account-id <sender_public_account_id>In the output you should see
Account owned by authenticated transfer program, with"balance":0.
Claim funds using the Piñata faucet
"Piñata" is the name of the LEZ-specific testnet faucet program that funds accounts with native tokens.
-
Fund the sender account via Piñata:
# This may take a few seconds to completewallet pinata claim --to <sender_public_account_id> -
Check the sender account balance:
wallet account get --account-id <sender_public_account_id>In the output you should see
Account owned by authenticated transfer program, with a"balance":150.
Create and fund the recipient public account
-
Create a recipient public account and record the
account_idvalue:wallet account new public -
Send 37 tokens from sender to recipient:
wallet auth-transfer send \--from <sender_public_account_id> \--to <recipient_public_account_id> \--amount 37Example:
wallet auth-transfer send \--from Public/14TYHiuzKiNR1ydETpr9mJMkjY6jf1hQFZ11d3X8Tc7N \--to Public/74zHyMW81mtfcd6VMaLnpnAna8k2V4AN2Ygyy9LcEAQQ \--amount 37 -
Check sender and recipient balances:
# Sender accountwallet account get --account-id <sender_public_account_id>
This should show a "balance":113 (150 - 37 = 113).
# Recipient account
wallet account get --account-id <recipient_public_account_id>
This should show a "balance":37.