StarkArk
A secure, Rust-based CLI wallet and library for Starknet.
Features
- 🛡️ Secure Keystore: Encrypted local storage for private keys using AES-256-GCM and Argon2.
- ⚡ Starknet Integration: Native support for Starknet accounts (OpenZeppelin), transfers, and deployments.
- 🖥️ Interactive & CLI Modes: Use it as a command-line tool or via an interactive menu.
- 🌍 Multi-language Support: Supports English and Chinese (configurable via
.env). - 📦 Library Support: Can be used as a Rust crate in other projects.
Installation
From Source
Ensure you have Rust installed.
Configuration
Before using StarkArk, you need to configure the RPC endpoint and other settings.
-
Initialize Configuration: Run the following command to generate a default configuration file in your system's config directory:
-
Edit Configuration: The command above will tell you where the file was created (e.g.,
~/.config/stark-ark/.envon Linux). Open it and set yourSTARKNET_RPC_URL.STARKNET_RPC_URL=https://starknet-sepolia.public.blastapi.io -
Check Configuration: Verify your settings:
Usage
StarkArk can be used in Interactive Mode (by running without arguments) or CLI Mode.
Interactive Mode
Simply run:
Follow the on-screen prompts to create a wallet, manage accounts, and send transactions.
CLI Commands
1. Create a New Account
Generate a new private key and add it to your keystore.
2. List Accounts
View all accounts managed by the keystore.
3. Import an Account
Import an existing private key or a JSON account config (which allows custom salts/class hashes).
# Interactive import (recommended)
# Or via command line (unsafe for history)
4. Check Balance
Check the STRK balance of a specific account (by index).
5. Deploy/Activate Account
Deploy the account contract to the Starknet network. This is required before you can execute transactions (other than deploy). You need to fund the address with ETH/STRK first.
6. Transfer Funds
Send STRK to another address.
7. Export Private Key
Export the private key or full account configuration (JSON) for backup.
8. View Validators
View a link to active validators or check your configured default staker.
9. Stake Funds
Delegate STRK tokens to a validator to earn rewards.
# Interactive mode (prompts for amount and validator)
# Non-interactive mode
10. Check Balance (Wallet + Staked)
View both your wallet balance and your delegated (staked) amount.
License
MIT