diff --git a/docs/scenarios/01_wallet_basics.md b/docs/scenarios/01_wallet_basics.md index ced53f4c..02d21282 100644 --- a/docs/scenarios/01_wallet_basics.md +++ b/docs/scenarios/01_wallet_basics.md @@ -56,6 +56,31 @@ An hermes agent needs a wallet to: - AITBC blockchain node running - Keystore directory configured (`/etc/aitbc/keystore`) +### **Wallet Authentication** +The CLI supports multiple methods for wallet password authentication: + +```bash +# Interactive prompt (default) +aitbc wallet create my-agent-wallet + +# Password file (recommended for scripts) +aitbc wallet create my-agent-wallet --password-file /path/to/password.txt + +# Direct password (not recommended for production) +aitbc wallet create my-agent-wallet --password mypassword + +# Environment variable +export KEYSTORE_PASSWORD=mypassword +aitbc wallet create my-agent-wallet +``` + +**Security Best Practices:** +- Use password files with restricted permissions (chmod 600) +- Store password files outside the repository +- Avoid hardcoding passwords in scripts +- Use environment variables for CI/CD pipelines +- Never commit passwords to version control + --- ## 🔧 **Step-by-Step Workflow** diff --git a/docs/scenarios/02_transaction_sending.md b/docs/scenarios/02_transaction_sending.md index 9e5689bb..65593d89 100644 --- a/docs/scenarios/02_transaction_sending.md +++ b/docs/scenarios/02_transaction_sending.md @@ -57,6 +57,26 @@ An hermes agent needs to send transactions to: - Wallet created with sufficient balance - Blockchain node running and accessible +### **Wallet Authentication** +For transaction signing, the CLI requires wallet authentication: + +```bash +# Interactive prompt (default) +aitbc transaction send --from my-wallet --to
--amount 100 + +# Password file (recommended for scripts) +aitbc transaction send --from my-wallet --to
--amount 100 --password-file /path/to/password.txt + +# Environment variable +export KEYSTORE_PASSWORD=mypassword +aitbc transaction send --from my-wallet --to
--amount 100 +``` + +**Security Best Practices:** +- Use password files with restricted permissions (chmod 600) +- Store password files outside the repository +- Avoid hardcoding passwords in scripts + --- ## 🔧 **Step-by-Step Workflow** diff --git a/docs/scenarios/06_basic_trading.md b/docs/scenarios/06_basic_trading.md index 1c4cb5b8..87d2a74f 100644 --- a/docs/scenarios/06_basic_trading.md +++ b/docs/scenarios/06_basic_trading.md @@ -59,6 +59,26 @@ An hermes agent needs trading to: - Wallet with sufficient balance - Network connectivity +### **Wallet Authentication** +For trading operations requiring wallet signing, use one of these methods: + +```bash +# Interactive prompt (default) +aitbc trade buy --from my-wallet --pair AIT/BTC --amount 100 + +# Password file (recommended for scripts) +aitbc trade buy --from my-wallet --pair AIT/BTC --amount 100 --password-file /path/to/password.txt + +# Environment variable +export KEYSTORE_PASSWORD=mypassword +aitbc trade buy --from my-wallet --pair AIT/BTC --amount 100 +``` + +**Security Best Practices:** +- Use password files with restricted permissions (chmod 600) +- Store password files outside the repository +- Avoid hardcoding passwords in scripts + --- ## 🔧 **Step-by-Step Workflow** diff --git a/docs/scenarios/07_ai_job_submission.md b/docs/scenarios/07_ai_job_submission.md index 12702c79..6e8df975 100644 --- a/docs/scenarios/07_ai_job_submission.md +++ b/docs/scenarios/07_ai_job_submission.md @@ -58,6 +58,27 @@ An hermes agent needs to submit AI jobs to: ### **Setup Required** - Coordinator API running - GPU marketplace available +- Wallet with AIT tokens for payment + +### **Wallet Authentication** +For AI job submission requiring wallet payments, use one of these methods: + +```bash +# Interactive prompt (default) +aitbc ai submit --wallet my-wallet --model llama2 --prompt "Hello world" + +# Password file (recommended for scripts) +aitbc ai submit --wallet my-wallet --model llama2 --prompt "Hello world" --password-file /path/to/password.txt + +# Environment variable +export KEYSTORE_PASSWORD=mypassword +aitbc ai submit --wallet my-wallet --model llama2 --prompt "Hello world" +``` + +**Security Best Practices:** +- Use password files with restricted permissions (chmod 600) +- Store password files outside the repository +- Avoid hardcoding passwords in scripts - Wallet with sufficient balance ---