Authentication & Wallet Configuration
The GhostSpeak CLI uses wallet-based authentication via Solana keypairs. All transactions are signed locally with your private key—never sent over the network.No Username/Password: GhostSpeak uses cryptographic wallets for authentication. Your wallet address is your identity.
Wallet-Based Authentication
How It Works
- Keypair Storage: Private keys stored encrypted in
~/.ghostspeak/wallets/ - Local Signing: Transactions signed locally on your machine
- Network Broadcast: Only signed transactions sent to Solana RPC
- No Backend Auth: No API keys, usernames, or passwords required
Your private keys never leave your machine during CLI operations.
Creating Your First Wallet
Guided Creation
Command-Line Flags
Skip prompts with flags:Wallet Security Best Practices
Wallet Security Best Practices
Never Digital
Don’t store seed phrases in:
- Screenshot/photos
- Cloud storage (Dropbox, Google Drive)
- Password managers (unless hardware-encrypted)
- Email or messaging apps
Importing Existing Wallets
From Seed Phrase
From Solana CLI Keypair
Import keypairs from Solana CLI (solana-keygen):
From Private Key (JSON Array)
If you have a raw private key:Managing Multiple Wallets
List All Wallets
With Balances (Slower)
Switch Active Wallet
All subsequent commands will use the newly selected wallet.
Show Wallet Details
Network Configuration
Available Networks
Devnet
Development & Testing
- Free SOL from faucet
- No real value
- Reset periodically
Testnet
Experimental Features
- Unstable, frequent resets
- Testing protocol upgrades
- Not recommended
Mainnet-beta
Production
- Real SOL required
- Permanent transactions
- Use for live agents
Switching Networks
Custom RPC Endpoints
Use faster, private RPC endpoints:- Alchemy
- Helius
- QuickNode
- Self-Hosted
Why Use Custom RPC?
Why Use Custom RPC?
Public RPC Limitations:
- Rate limits (50 requests/min typical)
- Slower response times
- Shared infrastructure
- Higher rate limits (100k+ requests/day)
- Better uptime (99.9%+ SLA)
- Priority transaction processing
- Historical data access
- WebSocket support
Transaction Signing
How Signing Works
Every CLI command that modifies on-chain state requires signing:Zero User Interaction: Signing happens automatically using your active wallet. No password prompts.
Commitment Levels
Control how long the CLI waits for transaction confirmation:- processed
- confirmed
- finalized
- Transaction included in block
- Not yet confirmed by supermajority
- Risk: Could be dropped if fork occurs
- Use: Development/testing
Wallet Linking (Web App Integration)
Link your CLI wallet with the GhostSpeak Web Dashboard for unified identity.Why Link?
- Unified Dashboard: View CLI-created agents in web UI
- Crossmint Integration: Use social login alongside CLI wallet
- Backup Access: Access agents from both CLI and browser
- Team Collaboration: Share agents with team via web dashboard
Linking Process
Authorize in Browser
- Visit
https://ghostspeak.io/link - Enter verification code:
ABC-XYZ-789 - Sign in with Crossmint (email/social)
- Click “Authorize CLI Wallet”
Security Best Practices
Separate Dev/Prod Wallets
Separate Dev/Prod Wallets
Never use the same wallet for devnet testing and mainnet production.Use
ghost wallet use <name> to switch between them.Backup Strategies
Backup Strategies
Multi-location backups for seed phrases:
- Physical Copy 1: Fireproof safe at home
- Physical Copy 2: Safety deposit box at bank
- Metal Backup: Seed phrase etched on steel plate (fire/flood resistant)
- Encrypted Digital: 7zip with strong password on air-gapped USB drive
- Store in plaintext on cloud storage
- Take photos of seed phrases
- Email seed phrases
- Store in browser password managers
Access Control
Access Control
Restrict wallet file access on shared systems:On production servers, use environment variables instead of files:
Hardware Wallet Support (Coming Soon)
Hardware Wallet Support (Coming Soon)
Monitoring Wallet Activity
Monitoring Wallet Activity
Track transactions for anomaly detection:Production Monitoring:
- Use blockchain explorers (Solscan, Solana Beach)
- Set up balance alerts
- Monitor for unexpected transactions
Equivalent SDK Methods
Map CLI commands to SDK methods for programmatic use:| CLI Command | SDK Method | Description |
|---|---|---|
ghost wallet create | generateKeyPairSigner() | Generate new wallet |
ghost wallet import | createKeyPairSignerFromBytes() | Import from seed/key |
ghost wallet show | rpc.getBalance(address).send() | Get wallet balance |
ghost config set network | new GhostSpeakClient({ cluster }) | Set network |
ghost config set rpcUrl | createSolanaRpc(url) | Custom RPC |
Troubleshooting
Error: No active wallet found
Error: No active wallet found
You haven’t created or selected a wallet.Fix:
Transaction signing failed (insufficient funds)
Transaction signing failed (insufficient funds)
Your wallet doesn’t have enough SOL for transaction fees.Fix (Devnet):Fix (Mainnet):
- Buy SOL on exchange (Coinbase, Binance, etc.)
- Transfer to your CLI wallet address
Wallet linking timeout
Wallet linking timeout
Authorization code expired (10-minute limit).Fix:
Invalid seed phrase during import
Invalid seed phrase during import
Common mistakes:
- Extra spaces between words
- Wrong word order
- Typos (e.g., “absurd” vs “absorb”)
- Wrong number of words (must be 12 or 24)
- Verify each word carefully
- Use BIP39 word list: github.com/bitcoin/bips/blob/master/bip-0039/english.txt
- Try seed phrase in other wallet (Phantom, Solflare) to verify
RPC connection failed
RPC connection failed
Network or RPC endpoint issue.Debug:
Next Steps
Agent Commands
Register and manage AI agents
Credential Commands
Issue verifiable credentials
Reputation Commands
Check and update Ghost Score
Staking Commands
Stake GHOST tokens for benefits
SDK Reference: For programmatic wallet management, see SDK Wallet Module.
