# eldoreondev/slitecoin architecture

> Architecture diagram of the GitHub repository eldoreondev/slitecoin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eldoreondev/slitecoin
- Repository: https://github.com/eldoreondev/slitecoin

## Overview

SLiteCoin (STC) is a decentralized digital-currency node based on a Bitcoin-style codebase, with a Mimblewimble extension (MWEB) and a wallet. A typical user workflow is to submit a wallet or RPC request, construct or relay a transaction, validate it against consensus rules, and update chain state; mining produces blocks for that same validation and state path. The tree also shows networking, indexes, a GUI, and MWEB-specific node and wallet modules. The README describes the project but not runtime wiring, so most links are dashed and unverified; unsampled implementations are not treated as inspected.

Main entry points: [`src/chain.cpp`](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/chain.cpp) (Chain State), [`src/wallet/context.cpp`](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/wallet/context.cpp) (Wallet Services), [`src/rpc/server.cpp`](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/rpc/server.cpp) (RPC Server), [`src/bitcoind.cpp`](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/bitcoind.cpp) (Node Daemon)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_apps["Applications and APIs"]
  node_rpcclient["RPC Client<br/>[bitcoin-cli.cpp]"]
  node_rpcserver["RPC Server<br/>[server.cpp]"]
  node_daemon["Node Daemon<br/>[bitcoind.cpp]"]
  node_gui["Desktop GUI<br/>[bitcoingui.cpp]"]
  node_rpcmethods["RPC Methods<br/>[blockchain.cpp]"]
end

subgraph group_chain["Chain and Consensus"]
  node_mempool["Transaction Policy<br/>[policy.cpp]"]
  node_validation["Transaction Validation<br/>[tx_verify.cpp]"]
  node_chainstate["Chain State<br/>[chain.cpp]"]
  node_mining["Block Mining<br/>[miner.cpp]"]
  node_mwebnode["MWEB Node<br/>[mweb_node.cpp]"]
end

subgraph group_p2p["Peer Networking"]
  node_network["Peer Network<br/>[net.cpp]"]
  node_netprocessing["Message Processing<br/>[net_processing.cpp]"]
end

subgraph group_wallet["Wallet and MWEB"]
  node_wallet["Wallet Services<br/>[context.cpp]"]
  node_walletui["Wallet UI"]
  node_txbuild["Transaction Builder<br/>[TxBuilder.cpp]"]
  node_mwebwallet["MWEB Wallet<br/>[mweb_wallet.cpp]"]
  node_mwebtransact["MWEB Transactions<br/>[mweb_transact.cpp]"]
end

subgraph group_storage["State and Cryptography"]
  node_coins[("UTXO State<br/>[coins.cpp]")]
  node_blockstore[("Block Files<br/>[flatfile.cpp]")]
  node_indexes[("Chain Indexes<br/>[base.cpp]")]
  node_libmwdb[("MWEB Databases<br/>[Database.h]")]
  node_crypto["Cryptography<br/>[secp256k1.h]"]
  node_leveldb[("LevelDB Storage<br/>[version_set.cc]")]
end

node_user(("User"))

node_user -.->|"submits request"| node_rpcclient
node_rpcclient -.->|"sends RPC"| node_rpcserver
node_user -.->|"uses wallet"| node_gui
node_gui -.->|"manages wallet"| node_walletui
node_walletui -.->|"requests actions"| node_wallet
node_rpcserver -.->|"dispatches calls"| node_rpcmethods
node_rpcmethods -.->|"requests wallet work"| node_wallet
node_wallet -.->|"builds transactions"| node_txbuild
node_wallet -.->|"uses MWEB"| node_mwebwallet
node_mwebwallet -.->|"creates transactions"| node_mwebtransact
node_daemon -.->|"starts service"| node_rpcserver
node_daemon -.->|"starts networking"| node_network
node_network -.->|"delivers messages"| node_netprocessing
node_netprocessing -.->|"submits transactions"| node_mempool
node_mempool -.->|"checks transactions"| node_validation
node_validation -.->|"validates updates"| node_chainstate
node_mining -.->|"proposes blocks"| node_chainstate
node_chainstate -.->|"updates UTXOs"| node_coins
node_chainstate -.->|"stores blocks"| node_blockstore
node_chainstate -.->|"updates indexes"| node_indexes
node_mwebnode -.->|"uses MWEB state"| node_libmwdb
node_mwebtransact -.->|"uses cryptography"| node_crypto
node_coins -.->|"persists state"| node_leveldb

click node_rpcclient "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/bitcoin-cli.cpp"
click node_rpcserver "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/rpc/server.cpp"
click node_daemon "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/bitcoind.cpp"
click node_gui "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/qt/bitcoingui.cpp"
click node_rpcmethods "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/rpc/blockchain.cpp"
click node_wallet "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/wallet/context.cpp"
click node_walletui "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/qt/walletcontroller.cpp"
click node_txbuild "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/libmw/src/wallet/TxBuilder.cpp"
click node_mwebwallet "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_wallet.cpp"
click node_mwebtransact "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_transact.cpp"
click node_network "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/net.cpp"
click node_netprocessing "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/net_processing.cpp"
click node_mempool "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/policy/policy.cpp"
click node_validation "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/consensus/tx_verify.cpp"
click node_chainstate "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/chain.cpp"
click node_mining "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/miner.cpp"
click node_mwebnode "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_node.cpp"
click node_coins "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/coins.cpp"
click node_blockstore "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/flatfile.cpp"
click node_indexes "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/index/base.cpp"
click node_libmwdb "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/libmw/src/db/common/Database.h"
click node_crypto "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/secp256k1-zkp/include/secp256k1.h"
click node_leveldb "https://github.com/eldoreondev/slitecoin/blob/stc-development/src/leveldb/db/version_set.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rpcclient,node_rpcserver,node_daemon,node_gui,node_rpcmethods,node_user toneBlue
class node_mempool,node_validation,node_chainstate,node_mining,node_mwebnode toneAmber
class node_network,node_netprocessing toneMint
class node_wallet,node_walletui,node_txbuild,node_mwebwallet,node_mwebtransact toneRose
class node_coins,node_blockstore,node_indexes,node_libmwdb,node_crypto,node_leveldb toneIndigo
```

## Components

### Applications and APIs

- [RPC Client](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/bitcoin-cli.cpp): `src/bitcoin-cli.cpp`
- [RPC Server](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/rpc/server.cpp): `src/rpc/server.cpp`
- [Node Daemon](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/bitcoind.cpp): `src/bitcoind.cpp`
- [Desktop GUI](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/qt/bitcoingui.cpp): `src/qt/bitcoingui.cpp`
- [RPC Methods](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/rpc/blockchain.cpp): `src/rpc/blockchain.cpp`

### Chain and Consensus

- [Transaction Policy](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/policy/policy.cpp): `src/policy/policy.cpp`
- [Transaction Validation](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/consensus/tx_verify.cpp): `src/consensus/tx_verify.cpp`
- [Chain State](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/chain.cpp): `src/chain.cpp`
- [Block Mining](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/miner.cpp): `src/miner.cpp`
- [MWEB Node](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_node.cpp): `src/mweb/mweb_node.cpp`

### Peer Networking

- [Peer Network](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/net.cpp): `src/net.cpp`
- [Message Processing](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/net_processing.cpp): `src/net_processing.cpp`

### Wallet and MWEB

- [Wallet Services](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/wallet/context.cpp): `src/wallet/context.cpp`
- [Wallet UI](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/qt/walletcontroller.cpp): `src/qt/walletcontroller.cpp`
- [Transaction Builder](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/libmw/src/wallet/TxBuilder.cpp): `src/libmw/src/wallet/TxBuilder.cpp`
- [MWEB Wallet](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_wallet.cpp): `src/mweb/mweb_wallet.cpp`
- [MWEB Transactions](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/mweb/mweb_transact.cpp): `src/mweb/mweb_transact.cpp`

### State and Cryptography

- [UTXO State](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/coins.cpp): `src/coins.cpp`
- [Block Files](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/flatfile.cpp): `src/flatfile.cpp`
- [Chain Indexes](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/index/base.cpp): `src/index/base.cpp`
- [MWEB Databases](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/libmw/src/db/common/Database.h): `src/libmw/src/db/common/Database.h`
- [Cryptography](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/secp256k1-zkp/include/secp256k1.h): `src/secp256k1-zkp/include/secp256k1.h`
- [LevelDB Storage](https://github.com/eldoreondev/slitecoin/blob/stc-development/src/leveldb/db/version_set.cc): `src/leveldb/db/version_set.cc`

### Other components

- **User**

## Connections

- User → RPC Client: submits request
- RPC Client → RPC Server: sends RPC
- User → Desktop GUI: uses wallet
- Desktop GUI → Wallet UI: manages wallet
- Wallet UI → Wallet Services: requests actions
- RPC Server → RPC Methods: dispatches calls
- RPC Methods → Wallet Services: requests wallet work
- Wallet Services → Transaction Builder: builds transactions
- Wallet Services → MWEB Wallet: uses MWEB
- MWEB Wallet → MWEB Transactions: creates transactions
- Node Daemon → RPC Server: starts service
- Node Daemon → Peer Network: starts networking
- Peer Network → Message Processing: delivers messages
- Message Processing → Transaction Policy: submits transactions
- Transaction Policy → Transaction Validation: checks transactions
- Transaction Validation → Chain State: validates updates
- Block Mining → Chain State: proposes blocks
- Chain State → UTXO State: updates UTXOs
- Chain State → Block Files: stores blocks
- Chain State → Chain Indexes: updates indexes
- MWEB Node → MWEB Databases: uses MWEB state
- MWEB Transactions → Cryptography: uses cryptography
- UTXO State → LevelDB Storage: persists state
