From 42fe6e94a0d6cbdac86bb9454187c3d1a4cf9360 Mon Sep 17 00:00:00 2001 From: Nathaniel Nanle Date: Wed, 10 Jun 2026 22:42:25 +0100 Subject: [PATCH 01/34] updating Docs --- .github/pull_request_template.md | 4 +- API_REFERENCE.md | 1236 ---------------------- ARCHITECTURE.md | 1148 -------------------- AUDIT_TRAIL_DOCUMENTATION.md | 508 --------- BENCHMARKS.md | 88 -- BUILD_BASELINE_VERIFICATION.md | 253 ----- BUILD_TROUBLESHOOTING.md | 487 --------- CI_ENFORCEMENT.md | 432 -------- CODE_STYLE_STANDARDS.md | 1263 ----------------------- CONTRIBUTING.md | 533 ---------- CONTRIBUTOR_QUICK_REFERENCE.md | 290 ------ DEPLOYMENT_PREPARATION_TEST_COVERAGE.md | 362 ------- DEVELOPER_GUIDE.md | 1221 ---------------------- DEVELOPMENT_WORKFLOW.md | 776 -------------- DOCKER_SETUP.md | 211 ---- Documentation.md | 323 ------ PLUGIN_TRUST.md | 156 --- QUICK_START_TEMPLATES.md | 209 ---- README.md | 69 +- SECURITY_LOGGING_AUDIT.md | 33 - SECURITY_LOGGING_BEST_PRACTICES.md | 661 ------------ SECURITY_LOGGING_GUIDE.md | 555 ---------- SHELL_COMPLETIONS.md | 151 --- TELEMETRY_PRIVACY.md | 153 --- TEMPLATE_MARKETPLACE.md | 467 --------- TEMPLATE_MARKETPLACE_TEST_COVERAGE.md | 288 ------ WALLET_ENCRYPTION_FIX.md | 221 ---- WALLET_LIFECYCLE_E2E_TEST_COVERAGE.md | 329 ------ docs/COMMAND_REFERENCE.md | 182 ---- examples/plugin_example.md | 61 -- examples/template_marketplace_usage.md | 399 ------- pr.md | 60 -- templates/README.md | 120 --- 33 files changed, 13 insertions(+), 13236 deletions(-) delete mode 100644 API_REFERENCE.md delete mode 100644 ARCHITECTURE.md delete mode 100644 AUDIT_TRAIL_DOCUMENTATION.md delete mode 100644 BENCHMARKS.md delete mode 100644 BUILD_BASELINE_VERIFICATION.md delete mode 100644 BUILD_TROUBLESHOOTING.md delete mode 100644 CI_ENFORCEMENT.md delete mode 100644 CODE_STYLE_STANDARDS.md delete mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTOR_QUICK_REFERENCE.md delete mode 100644 DEPLOYMENT_PREPARATION_TEST_COVERAGE.md delete mode 100644 DEVELOPER_GUIDE.md delete mode 100644 DEVELOPMENT_WORKFLOW.md delete mode 100644 DOCKER_SETUP.md delete mode 100644 Documentation.md delete mode 100644 PLUGIN_TRUST.md delete mode 100644 QUICK_START_TEMPLATES.md delete mode 100644 SECURITY_LOGGING_AUDIT.md delete mode 100644 SECURITY_LOGGING_BEST_PRACTICES.md delete mode 100644 SECURITY_LOGGING_GUIDE.md delete mode 100644 SHELL_COMPLETIONS.md delete mode 100644 TELEMETRY_PRIVACY.md delete mode 100644 TEMPLATE_MARKETPLACE.md delete mode 100644 TEMPLATE_MARKETPLACE_TEST_COVERAGE.md delete mode 100644 WALLET_ENCRYPTION_FIX.md delete mode 100644 WALLET_LIFECYCLE_E2E_TEST_COVERAGE.md delete mode 100644 docs/COMMAND_REFERENCE.md delete mode 100644 examples/plugin_example.md delete mode 100644 examples/template_marketplace_usage.md delete mode 100644 pr.md delete mode 100644 templates/README.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7d954206..8b5383e8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -53,9 +53,7 @@ If checked, describe the breaking changes and migration path: ## Documentation -- [ ] README.md updated -- [ ] DEVELOPER_GUIDE.md updated (if applicable) -- [ ] API_REFERENCE.md updated (if applicable) +- [ ] README.md updated (if applicable) - [ ] No documentation changes needed ## Screenshots (if applicable) diff --git a/API_REFERENCE.md b/API_REFERENCE.md deleted file mode 100644 index ef2d934b..00000000 --- a/API_REFERENCE.md +++ /dev/null @@ -1,1236 +0,0 @@ -# StarForge API Reference - -Complete reference for all StarForge commands, options, and utilities. - -> For a concise, navigable index of every CLI subcommand see [docs/COMMAND_REFERENCE.md](docs/COMMAND_REFERENCE.md). - -## Table of Contents - -1. [Command Line Interface](#command-line-interface) -2. [Wallet Commands](#wallet-commands) -3. [Template Commands](#template-commands) -4. [Contract Commands](#contract-commands) -5. [Network Commands](#network-commands) -6. [Transaction Commands](#transaction-commands) -7. [Utility Commands](#utility-commands) -8. [Configuration](#configuration) -9. [Exit Codes](#exit-codes) - ---- - -## Command Line Interface - -### Global Options - -```bash -starforge [OPTIONS] -``` - -| Option | Description | -|--------|-------------| -| `-q, --quiet` | Suppress ASCII banner and decorative output | -| `-h, --help` | Print help information | -| `-V, --version` | Print version information | - -### Environment Variables - -| Variable | Description | Default | -|----------|-------------|---------| -| `STARFORGE_CONFIG_DIR` | Configuration directory | `~/.starforge` | -| `STARFORGE_TELEMETRY` | Enable/disable telemetry | `true` | -| `RUST_LOG` | Logging level | `info` | - ---- - -## Wallet Commands - -### `starforge wallet create` - -Create a new Stellar keypair and save it locally. - -**Usage:** -```bash -starforge wallet create [OPTIONS] -``` - -**Arguments:** -- `` - Friendly name for the wallet (alphanumeric, dash, underscore) - -**Options:** -- `--fund` - Fund the wallet via Friendbot immediately (testnet only) -- `--network ` - Network to associate with wallet (`testnet`, `mainnet`) -- `--encrypt` - Encrypt the secret key with a passphrase - -**Examples:** -```bash -# Create basic wallet -starforge wallet create alice - -# Create and fund on testnet -starforge wallet create deployer --fund - -# Create with encryption -starforge wallet create secure-wallet --encrypt - -# Create on mainnet -starforge wallet create mainnet-wallet --network mainnet -``` - -**Output:** -``` -◆ Creating wallet 'alice' - -[1/2] Generating keypair… - -Public Key : GABC...XYZ -Secret Key : Stored in plaintext (not recommended for mainnet). - -[2/2] Saving to ~/.starforge/config.toml… - -✓ Wallet 'alice' created and saved! - -View it with: starforge wallet show alice -``` - ---- - -### `starforge wallet list` - -List all saved wallets. - -**Usage:** -```bash -starforge wallet list -``` - -**Output:** -``` -◆ Saved Wallets -───────────────────────────────────────────────────────────── - - 1. alice [funded] - Key : GABC...XYZ - Net : testnet - - 2. bob [unfunded] - Key : GDEF...ABC - Net : testnet - -───────────────────────────────────────────────────────────── -2 wallet(s) on testnet — ~/.starforge/config.toml -``` - ---- - -### `starforge wallet show` - -Show details of a saved wallet including live balance. - -**Usage:** -```bash -starforge wallet show [OPTIONS] -``` - -**Arguments:** -- `` - Wallet name - -**Options:** -- `--reveal` - Show the secret key in plaintext - -**Examples:** -```bash -# Show wallet details -starforge wallet show alice - -# Reveal secret key -starforge wallet show alice --reveal -``` - -**Output:** -``` -◆ Wallet: alice -───────────────────────────────────────────────────────────── - -Public Key : GABC...XYZ -Secret Key : ******************** (--reveal to show) -Network : testnet -Funded : yes -Created : 2025-01-01T00:00:00Z - -───────────────────────────────────────────────────────────── - -Fetching live balance on testnet… - -XLM : 10000.0000000 XLM -``` - ---- - -### `starforge wallet fund` - -Fund a wallet via Friendbot (testnet only). - -**Usage:** -```bash -starforge wallet fund -``` - -**Arguments:** -- `` - Wallet name to fund - -**Example:** -```bash -starforge wallet fund alice -``` - ---- - -### `starforge wallet remove` - -Remove a wallet from local storage. - -**Usage:** -```bash -starforge wallet remove -``` - -**Arguments:** -- `` - Wallet name to remove - -**Example:** -```bash -starforge wallet remove alice -``` - ---- - -### `starforge wallet rename` - -Rename a wallet. - -**Usage:** -```bash -starforge wallet rename -``` - -**Arguments:** -- `` - Current wallet name -- `` - New wallet name - -**Example:** -```bash -starforge wallet rename alice alice-testnet -``` - ---- - -### `starforge wallet export` - -Export a wallet to a JSON backup file. - -**Usage:** -```bash -starforge wallet export --output -``` - -**Arguments:** -- `` - Wallet name to export - -**Options:** -- `--output ` - Output file path for the backup JSON - -**Example:** -```bash -starforge wallet export alice --output ./wallet-backup.json -``` - -**Notes:** -- Secrets are written only to the backup file and are never printed to stdout. - ---- - -### `starforge wallet import` - -Import wallets from a JSON backup file. - -**Usage:** -```bash -starforge wallet import --file -``` - -**Options:** -- `--file ` - Path to a wallet backup JSON file - -**Example:** -```bash -starforge wallet import --file ./wallet-backup.json -``` - ---- - -### `starforge wallet sign` - -Sign an arbitrary message using a wallet. - -**Usage:** -```bash -starforge wallet sign [OPTIONS] -``` - -**Arguments:** -- `` - Wallet name to use for signing -- `` - Message to sign (UTF-8 string) - -**Options:** -- `--hardware ` - Use hardware wallet (`ledger`, `trezor`) - -**Examples:** -```bash -# Sign with local key -starforge wallet sign alice "Hello, Stellar!" - -# Sign with hardware wallet -starforge wallet sign alice "Transaction data" --hardware ledger -``` - ---- - -### `starforge wallet multisig` - -Multi-signature account management. - -#### `starforge wallet multisig create` - -Create a multi-sig configuration. - -**Usage:** -```bash -starforge wallet multisig create --threshold --signers -``` - -**Arguments:** -- `` - Multi-sig account name - -**Options:** -- `--threshold ` - Required signature weight -- `--signers ` - Comma-separated wallet names -- `--network ` - Network override - -**Example:** -```bash -starforge wallet multisig create treasury \ - --threshold 2 \ - --signers alice,bob,charlie -``` - -#### `starforge wallet multisig sign` - -Sign a multi-sig transaction. - -**Usage:** -```bash -starforge wallet multisig sign --transaction [OPTIONS] -``` - -**Arguments:** -- `` - Multi-sig account name - -**Options:** -- `--transaction ` - Path to transaction JSON -- `--output ` - Output file (defaults to in-place update) - -**Example:** -```bash -starforge wallet multisig sign treasury --transaction tx.json -``` - -#### `starforge wallet multisig list` - -List multi-sig accounts. - -**Usage:** -```bash -starforge wallet multisig list -``` - -#### `starforge wallet multisig show` - -Show multi-sig account details. - -**Usage:** -```bash -starforge wallet multisig show -``` - -#### `starforge wallet multisig submit` - -Submit a fully-signed multi-sig transaction. - -**Usage:** -```bash -starforge wallet multisig submit --transaction [OPTIONS] -``` - -**Options:** -- `--transaction ` - Path to signed transaction JSON -- `--network ` - Network to submit on - ---- - -## Template Commands - -### `starforge template init` - -Initialize template registry with example templates. - -**Usage:** -```bash -starforge template init -``` - -**Output:** -``` -◆ Initialize Template Registry - -Adding example templates to the marketplace... - -✓ Added: uniswap-v2 -✓ Added: lending-pool -✓ Added: governance -✓ Added: multisig-wallet - -✓ Template registry initialized with 4 example templates - -Browse templates: - starforge template list - starforge template search defi -``` - ---- - -### `starforge template search` - -Search for templates in the marketplace. - -**Usage:** -```bash -starforge template search [OPTIONS] -``` - -**Arguments:** -- `` - Search query (matches name, description, tags) - -**Options:** -- `--tags ` - Filter by tags (comma-separated) - -**Examples:** -```bash -# Search by keyword -starforge template search defi - -# Search with tag filter -starforge template search dex --tags amm,swap - -# Search for governance -starforge template search governance -``` - -**Output:** -``` -◆ Template Marketplace — Search -Query : defi -───────────────────────────────────────────────────────────── - -Found 2 template(s): - -1. uniswap-v2 ✓ - Uniswap V2 style automated market maker (AMM) DEX implementation - 1.0.0 • Stellar Community • 42 downloads - Tags: defi, dex, amm, swap - -2. lending-pool ✓ - Decentralized lending and borrowing protocol - 1.0.0 • Stellar Community • 28 downloads - Tags: defi, lending, borrowing - -───────────────────────────────────────────────────────────── - -Use a template: - starforge new contract my-project --template uniswap-v2 --from marketplace -``` - ---- - -### `starforge template list` - -List all available templates. - -**Usage:** -```bash -starforge template list -``` - ---- - -### `starforge template show` - -Show details of a specific template. - -**Usage:** -```bash -starforge template show -``` - -**Arguments:** -- `` - Template name - -**Example:** -```bash -starforge template show uniswap-v2 -``` - -**Output:** -``` -◆ Template: uniswap-v2 -───────────────────────────────────────────────────────────── - -uniswap-v2 ✓ - -Description : Uniswap V2 style automated market maker (AMM) DEX -Version : 1.0.0 -Author : Stellar Community -Downloads : 42 -Tags : defi, dex, amm, swap - -Created : 2025-01-01T00:00:00Z -Updated : 2025-01-15T00:00:00Z - -Source : Git Repository -URL : https://github.com/stellar/soroban-examples -Branch : main - -───────────────────────────────────────────────────────────── - -Use this template: - starforge new contract my-project --template uniswap-v2 --from marketplace -``` - ---- - -### `starforge template publish` - -Publish a template to the local marketplace. - -**Usage:** -```bash -starforge template publish [OPTIONS] -``` - -**Arguments:** -- `` - Path to template directory - -**Options:** -- `--name ` - Template name -- `--description ` - Template description -- `--author ` - Author name -- `--tags ` - Comma-separated tags -- `--version ` - Version (default: 1.0.0) - -**Examples:** -```bash -# Publish with all options -starforge template publish ./my-template \ - --name my-awesome-template \ - --description "An awesome contract" \ - --author "Your Name" \ - --tags "defi,custom" \ - --version "1.0.0" - -# Interactive publish (prompts for missing info) -starforge template publish ./my-template -``` - ---- - -### `starforge template remove` - -Remove a template from the local marketplace. - -**Usage:** -```bash -starforge template remove -``` - -**Arguments:** -- `` - Template name to remove - -**Example:** -```bash -starforge template remove my-template -``` - ---- - -## Contract Commands - -### `starforge new contract` - -Scaffold a new Soroban smart contract project. - -**Usage:** -```bash -starforge new contract [OPTIONS] -``` - -**Arguments:** -- `` - Project name - -**Options:** -- `--template