How spacesprotocol/spaces works
Project Type Identification
This is a Bitcoin protocol extension project consisting of multiple Rust packages that interact with Bitcoin Core. The system is primarily composed of a daemon service and a wallet implementation.
Main Components
a) External Components:
• Bitcoin Core Node (external dependency)
• Bitcoin Network (Testnet4/Mainnet)
b) Core System Components:
• Spaced Daemon (node package)
• Space CLI Wallet (node package)
• Protocol Library (protocol package)
• Wallet Library (wallet package)
Component Relationships
User -> Space CLI -> Spaced Daemon -> Bitcoin Core -> Bitcoin Network
• > Wallet Library -> Protocol Library
Specific Component Details
For the Spaced Daemon, include these subcomponents (based on src files):
• Config Manager (config.rs)
• Node Service (node.rs)
• RPC Handler (rpc.rs)
• Store Manager (store.rs)
• Sync Service (sync.rs)
• Wallet Manager (wallets.rs)
For the Protocol Library, show:
• Validation Layer (validate.rs)
• Script Handler (script.rs)
• Preparation Logic (prepare.rs)
• Hashing Services (hasher.rs)
Additional Elements
Include:
• Storage interactions
• Security boundaries
• Version compatibility notes (Bitcoin Core 28+)
• Network connection points
Important Notes
• Non-invasive nature of the protocol (no Bitcoin modifications required)
• Clear separation between the daemon and wallet functionalities
• Test coverage points (based on the test directories)
• Configuration dependencies
• Error handling paths