stark-ark

Crates.iostark-ark
lib.rsstark-ark
version0.1.11
created_at2025-12-28 11:57:00.251851+00
updated_at2025-12-31 15:39:33.381904+00
descriptionA secure, Rust-based CLI wallet and library for Starknet.
homepage
repositoryhttps://github.com/0xcrypto2024/stark-ark
max_upload_size
id2008659
size23,177,100
0xcrypto (0xcrypto2024)

documentation

README

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.

git clone https://github.com/your-username/stark-ark.git
cd stark-ark
cargo install --path .

Configuration

Before using StarkArk, you need to configure the RPC endpoint and other settings.

  1. Initialize Configuration: Run the following command to generate a default configuration file in your system's config directory:

    stark-ark config init
    
  2. Edit Configuration: The command above will tell you where the file was created (e.g., ~/.config/stark-ark/.env on Linux). Open it and set your STARKNET_RPC_URL.

    STARKNET_RPC_URL=https://starknet-sepolia.public.blastapi.io
    
  3. Check Configuration: Verify your settings:

    stark-ark config show
    

Usage

StarkArk can be used in Interactive Mode (by running without arguments) or CLI Mode.

Interactive Mode

Simply run:

stark-ark

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.

stark-ark new

2. List Accounts

View all accounts managed by the keystore.

stark-ark list

3. Import an Account

Import an existing private key or a JSON account config (which allows custom salts/class hashes).

# Interactive import (recommended)
stark-ark import

# Or via command line (unsafe for history)
stark-ark import --key <PRIVATE_KEY_HEX_OR_JSON>

4. Check Balance

Check the STRK balance of a specific account (by index).

stark-ark balance --index 0

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.

stark-ark deploy --index 0

6. Transfer Funds

Send STRK to another address.

stark-ark transfer --from-index 0 --to 0x123... --amount 1.5

7. Export Private Key

Export the private key or full account configuration (JSON) for backup.

stark-ark export --index 0

8. View Validators

View a link to active validators or check your configured default staker.

stark-ark validators

9. Stake Funds

Delegate STRK tokens to a validator to earn rewards.

# Interactive mode (prompts for amount and validator)
stark-ark stake --index 0

# Non-interactive mode
stark-ark stake --index 0 --amount 10 --validator 0x123...

10. Check Balance (Wallet + Staked)

View both your wallet balance and your delegated (staked) amount.

stark-ark balance --index 0

License

MIT

Commit count: 0

cargo fmt