# beldex-coin/beldex architecture

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

- Interactive diagram: https://gitdiagram.com/beldex-coin/beldex
- Repository: https://github.com/beldex-coin/beldex

## Overview

Beldex is a privacy-focused cryptocurrency whose runtime centers on a full node: operators start the daemon, it participates in peer synchronization and consensus, validates transactions and blocks, and persists blockchain state. Wallet users create, recover, or open wallets and query a daemon for network state. The graph includes major subsystems evident in the README and tree; the sampled excerpts confirm daemon startup, wallet-to-RPC requests, protocol dispatch, LMDB-backed storage, and portable serialization, but do not expose every internal call path.

Main entry points: [`src/cryptonote_core/cryptonote_core.cpp`](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/cryptonote_core.cpp) (Node core), [`src/wallet`](https://github.com/beldex-coin/beldex/tree/dev/src/wallet) (Wallet engine), [`src/cryptonote_core/blockchain.cpp`](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/blockchain.cpp) (Blockchain logic), [`src/wallet/api/wallet_manager.cpp`](https://github.com/beldex-coin/beldex/blob/dev/src/wallet/api/wallet_manager.cpp) (Wallet manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_node["Node runtime"]
  node_daemon_entry["Daemon entry<br/>[main.cpp]"]
  node_daemon["Daemon control<br/>[daemon.cpp]"]
  node_p2p["Peer networking<br/>[net_node.cpp]"]
  node_protocol["Sync protocol"]
end

subgraph group_consensus["Ledger and consensus"]
  node_core["Node core"]
  node_blockchain["Blockchain logic<br/>[blockchain.cpp]"]
  node_tx_pool["Transaction pool<br/>[tx_pool.cpp]"]
  node_master_nodes["Master nodes"]
  node_quorum["Quorum voting"]
  node_crypto["Cryptography<br/>[crypto.cpp]"]
  node_ledger_db[("LMDB ledger<br/>[db_lmdb.cpp]")]
  node_name_system["Name system"]
end

subgraph group_wallet["Wallet clients"]
  node_wallet_manager["Wallet manager<br/>[wallet_manager.cpp]"]
  node_wallet_engine["Wallet engine"]
  node_wallet_cli["Wallet CLI<br/>[simplewallet.cpp]"]
  node_mnemonics["Seed phrases<br/>[electrum-words.cpp]"]
  node_hardware["Hardware wallet<br/>[device.cpp]"]
end

subgraph group_interfaces["RPC and integrations"]
  node_rpc_server["RPC server"]
  node_rpc_client["Daemon RPC<br/>[http_client.h]"]
  node_portable_storage["Portable serialization"]
end

node_operator(("Node operator"))
node_peer_network(("Beldex peers"))
node_wallet_user(("Wallet user"))

node_operator -->|"starts"| node_daemon_entry
node_daemon_entry -->|"daemonizes"| node_daemon
node_daemon -->|"runs"| node_core
node_p2p -->|"exchanges messages"| node_peer_network
node_protocol -->|"uses endpoint"| node_p2p
node_protocol -->|"dispatches sync"| node_core
node_core -->|"processes ledger"| node_blockchain
node_core -->|"handles transactions"| node_tx_pool
node_blockchain -->|"persists state"| node_ledger_db
node_blockchain -->|"verifies cryptography"| node_crypto
node_core -->|"manages nodes"| node_master_nodes
node_master_nodes -->|"supports voting"| node_quorum
node_core -->|"serves names"| node_name_system
node_rpc_server -->|"serves requests"| node_core
node_wallet_user -->|"manages wallet"| node_wallet_manager
node_wallet_manager -->|"creates and recovers"| node_wallet_engine
node_wallet_cli -->|"uses"| node_wallet_engine
node_wallet_manager -->|"queries daemon"| node_rpc_client
node_rpc_client -->|"sends HTTP RPC"| node_rpc_server
node_wallet_engine -->|"uses seed phrases"| node_mnemonics
node_wallet_engine -.->|"supports device"| node_hardware
node_rpc_server -->|"serializes data"| node_portable_storage

click node_daemon_entry "https://github.com/beldex-coin/beldex/blob/dev/src/daemon/main.cpp"
click node_daemon "https://github.com/beldex-coin/beldex/blob/dev/src/daemon/daemon.cpp"
click node_p2p "https://github.com/beldex-coin/beldex/blob/dev/src/p2p/net_node.cpp"
click node_protocol "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_protocol/cryptonote_protocol_handler.h"
click node_core "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/cryptonote_core.cpp"
click node_blockchain "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/blockchain.cpp"
click node_tx_pool "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/tx_pool.cpp"
click node_master_nodes "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/master_node_list.cpp"
click node_quorum "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/master_node_voting.cpp"
click node_crypto "https://github.com/beldex-coin/beldex/blob/dev/src/crypto/crypto.cpp"
click node_ledger_db "https://github.com/beldex-coin/beldex/blob/dev/src/blockchain_db/lmdb/db_lmdb.cpp"
click node_rpc_server "https://github.com/beldex-coin/beldex/blob/dev/src/rpc/core_rpc_server.cpp"
click node_rpc_client "https://github.com/beldex-coin/beldex/blob/dev/src/rpc/http_client.h"
click node_wallet_manager "https://github.com/beldex-coin/beldex/blob/dev/src/wallet/api/wallet_manager.cpp"
click node_wallet_engine "https://github.com/beldex-coin/beldex/tree/dev/src/wallet"
click node_wallet_cli "https://github.com/beldex-coin/beldex/blob/dev/src/simplewallet/simplewallet.cpp"
click node_mnemonics "https://github.com/beldex-coin/beldex/blob/dev/src/mnemonics/electrum-words.cpp"
click node_hardware "https://github.com/beldex-coin/beldex/blob/dev/src/device/device.cpp"
click node_name_system "https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/beldex_name_system.cpp"
click node_portable_storage "https://github.com/beldex-coin/beldex/blob/dev/contrib/epee/src/portable_storage.cpp"

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_daemon_entry,node_daemon,node_p2p,node_protocol,node_wallet_user toneBlue
class node_core,node_blockchain,node_tx_pool,node_master_nodes,node_quorum,node_crypto,node_ledger_db,node_name_system toneAmber
class node_wallet_manager,node_wallet_engine,node_wallet_cli,node_mnemonics,node_hardware toneMint
class node_rpc_server,node_rpc_client,node_portable_storage toneRose
class node_operator,node_peer_network toneIndigo
```

## Components

### Node runtime

- [Daemon entry](https://github.com/beldex-coin/beldex/blob/dev/src/daemon/main.cpp): `src/daemon/main.cpp`
- [Daemon control](https://github.com/beldex-coin/beldex/blob/dev/src/daemon/daemon.cpp): `src/daemon/daemon.cpp`
- [Peer networking](https://github.com/beldex-coin/beldex/blob/dev/src/p2p/net_node.cpp): `src/p2p/net_node.cpp`
- [Sync protocol](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_protocol/cryptonote_protocol_handler.h): `src/cryptonote_protocol/cryptonote_protocol_handler.h`

### Ledger and consensus

- [Node core](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/cryptonote_core.cpp): `src/cryptonote_core/cryptonote_core.cpp`
- [Blockchain logic](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/blockchain.cpp): `src/cryptonote_core/blockchain.cpp`
- [Transaction pool](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/tx_pool.cpp): `src/cryptonote_core/tx_pool.cpp`
- [Master nodes](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/master_node_list.cpp): `src/cryptonote_core/master_node_list.cpp`
- [Quorum voting](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/master_node_voting.cpp): `src/cryptonote_core/master_node_voting.cpp`
- [Cryptography](https://github.com/beldex-coin/beldex/blob/dev/src/crypto/crypto.cpp): `src/crypto/crypto.cpp`
- [LMDB ledger](https://github.com/beldex-coin/beldex/blob/dev/src/blockchain_db/lmdb/db_lmdb.cpp): `src/blockchain_db/lmdb/db_lmdb.cpp`
- [Name system](https://github.com/beldex-coin/beldex/blob/dev/src/cryptonote_core/beldex_name_system.cpp): `src/cryptonote_core/beldex_name_system.cpp`

### Wallet clients

- [Wallet manager](https://github.com/beldex-coin/beldex/blob/dev/src/wallet/api/wallet_manager.cpp): `src/wallet/api/wallet_manager.cpp`
- [Wallet engine](https://github.com/beldex-coin/beldex/tree/dev/src/wallet): `src/wallet`
- [Wallet CLI](https://github.com/beldex-coin/beldex/blob/dev/src/simplewallet/simplewallet.cpp): `src/simplewallet/simplewallet.cpp`
- [Seed phrases](https://github.com/beldex-coin/beldex/blob/dev/src/mnemonics/electrum-words.cpp): `src/mnemonics/electrum-words.cpp`
- [Hardware wallet](https://github.com/beldex-coin/beldex/blob/dev/src/device/device.cpp): `src/device/device.cpp`

### RPC and integrations

- [RPC server](https://github.com/beldex-coin/beldex/blob/dev/src/rpc/core_rpc_server.cpp): `src/rpc/core_rpc_server.cpp`
- [Daemon RPC](https://github.com/beldex-coin/beldex/blob/dev/src/rpc/http_client.h): `src/rpc/http_client.h`
- [Portable serialization](https://github.com/beldex-coin/beldex/blob/dev/contrib/epee/src/portable_storage.cpp): `contrib/epee/src/portable_storage.cpp`

### Other components

- **Node operator**
- **Beldex peers**
- **Wallet user**

## Connections

- Node operator → Daemon entry: starts
- Daemon entry → Daemon control: daemonizes
- Daemon control → Node core: runs
- Peer networking → Beldex peers: exchanges messages
- Sync protocol → Peer networking: uses endpoint
- Sync protocol → Node core: dispatches sync
- Node core → Blockchain logic: processes ledger
- Node core → Transaction pool: handles transactions
- Blockchain logic → LMDB ledger: persists state
- Blockchain logic → Cryptography: verifies cryptography
- Node core → Master nodes: manages nodes
- Master nodes → Quorum voting: supports voting
- Node core → Name system: serves names
- RPC server → Node core: serves requests
- Wallet user → Wallet manager: manages wallet
- Wallet manager → Wallet engine: creates and recovers
- Wallet CLI → Wallet engine: uses
- Wallet manager → Daemon RPC: queries daemon
- Daemon RPC → RPC server: sends HTTP RPC
- Wallet engine → Seed phrases: uses seed phrases
- Wallet engine → Hardware wallet: supports device
- RPC server → Portable serialization: serializes data
