sol-safekey-botlisted
Install: claude install-skill 0xfnzero/solana-bot-dev-skills
# Sol SafeKey Bot
Use `sol-safekey` whenever a Chinese or English bot request needs wallet creation, encrypted keystore storage, unlock, or secure Solana operations.
## Core Security Rules
- Do not hard-code base58 private keys.
- Do not store wallet passwords in environment variables.
- Do not commit keystores, decrypted keys, `.env`, logs with secrets, or startup scripts containing secrets.
- Prefer encrypted keystore files plus stdin or interactive password entry.
- Clear password variables in shell scripts after use.
- Keep real trading disabled until wallet loading and simulation paths are verified.
## Dependency
For bot integration:
```toml
sol-safekey = { version = "0.1.7", features = ["solana-ops"] }
```
For local path development:
```toml
sol-safekey = { path = "../sol-safekey", features = ["solana-ops"] }
```
Feature flags include `cli`, `2fa`, `solana-ops`, `sol-trade-sdk`, and `full`.
## Three Integration Modes
### 1. Embedded Interactive Menu
Add a `safekey` subcommand before bot startup:
```rust
if std::env::args().nth(1).as_deref() == Some("safekey") {
sol_safekey::interactive::show_main_menu()
.map_err(|e| anyhow::anyhow!(e))?;
return Ok(());
}
```
Users run:
```bash
./your-bot safekey
```
### 2. Bot Helper Unlock
Use the helper when an interactive unlock is acceptable:
```rust
let keypair = sol_safekey::bot_helper::ensure_wallet_ready("keystore.json")?;
```
### 3. Programmatic Keystore Load
Use this when the bot reads a pas