How spacemeshos/smcli works
smcli is a Spacemesh CLI whose main workflow creates or reads encrypted wallet files, with a separate command for calculating genesis vesting and vault addresses. The wallet workflow covers mnemonic or Ledger key sourcing, hierarchical account derivation, encryption and file output, then decryption and account display. Source excerpts show those wallet operations and the genesis calculations; broader command behavior is represented only where documented, and no uninspected subsystem wiring is assumed.
Main entry points: wallet.go Wallet commands · bip32.go HD key derivation · root.go Command root · genesis.go Genesis verify
Components 15
CLI entrypoints
- Program entry
main.go - Command root
cmd/root.go
Wallet management
- Wallet commands
cmd/wallet.go - Wallet creation
wallet/wallet.go - HD key derivation
wallet/bip32.go - HD path rules
wallet/bip44.go - Wallet encryption
wallet/store.go - Wallet file paths
common/common.go
Genesis verification
- Genesis verify
cmd/genesis.go
Other components
- CLI user
- Encrypted wallet
- Ledger device
- BIP32 library
- Spacemesh templates
- Terminal output
Connections 16
- CLI user → Program entry: runs CLI
- Program entry → Command root: calls Execute
- Command root → Wallet commands: dispatches wallet
- Command root → Genesis verify: dispatches genesis
- Wallet commands → Wallet creation: creates wallet
- Wallet creation → HD key derivation: derives keys
- HD key derivation → HD path rules: builds paths
- HD key derivation → BIP32 library: derives software keys
- HD key derivation → Ledger device: reads public keys
- Wallet commands → Wallet encryption: exports or opens
- Wallet commands → Wallet file paths: gets output path
- Wallet commands → Encrypted wallet: opens or writes
- Wallet encryption → Encrypted wallet: reads or writes JSON
- Wallet commands → Terminal output: prints accounts
- Genesis verify → Spacemesh templates: computes addresses
- Genesis verify → Terminal output: reads inputs and prints