Fedimint Technical Reference Documentation
Target audience
This documentation is automatically generated from the Fedimint source code, and it’s meant for developers, builders and people who want to understand the Fedimint project on an implementation level.
If you are looking for higher level documentation and help, please check:
State
This is a recently added document and subject of continuous change. Please report problems and submit improvements.
Overview
Fedimint is implemented in Rust and consists of multiple Rust crates. On a high-level Fedimint architecture consist of:
- Server side:
fedimintd
daemon typically running on Linux servers, serving a role of a a “peer” in a Federation by communicating with other “peers” to form a consensus. - Client side:
fedimint-client
library, that handles client side state handling and communication with Fedimint peers. This library can be used to build Fedimint client applications that can run on desktop computers, mobile devices and in web browsers (WASM).
More high level documentation is available as a part of fedimint-docs
crate.
Modules
Fedimint architecture is extensible using a modular design. Fedimint modules can build on top of Fedimint consensus to implement additional functionality and applications.
In fact core functions of Fedimint are implemented as modules:
- fedimint-mint-server and fedimint-mint-client implement ecash.
- fedimint-wallet-server and fedimint-wallet-client implement on-chain deposits and withdrawals.
- fedimint-ln-server and fedimint-ln-client implement lightning integration.
Some additional built-in modules are also available:
- fedimint-meta-server and fedimint-meta-client implement guardian managing additional (“meta”) information about the Federation.
- fedimint-empty-server and fedimint-empty-client are a reference “empty” module that can be used as a starting point for new modules.
- fedimint-dummy-server and fedimint-dummy-client are a test-only modules, possibly useful as a simple example.
Developers and builders are encouraged to create their own modules. Check “Fedimint Modules” Discussions for ideas and help.
Notable crates
You might consider viewing the following top-level crates:
- fedimint-core is a core common code shared between client and server.
- fedimint-cli is a command line client.
- fedimint-client is a client library.
- fedimint-server is a core server side logic.
- gatewayd is a LN Gateway implementation.
- gateway_cli is a command line client for LN Gateway.
- fedimint_dbtool implements a helpful database helper tool.
- recoverytool implements an on chain multisig recovery tool for defunct/test Federations.
List of all crates
- circular_deposit_test
- devimint
- devimint_faucet
- fedimint_aead
- fedimint_api_client
- fedimint_bip39
- fedimint_bitcoind
- fedimint_build
- fedimint_cli
- fedimint_client
- fedimint_client_wasm
- fedimint_core
- fedimint_dbtool
- fedimint_derive
- fedimint_derive_secret
- fedimint_docs
- fedimint_dummy_client
- fedimint_dummy_common
- fedimint_dummy_server
- fedimint_empty_client
- fedimint_empty_common
- fedimint_empty_server
- fedimint_ln_client
- fedimint_ln_common
- fedimint_ln_server
- fedimint_lnv2_client
- fedimint_lnv2_common
- fedimint_lnv2_server
- fedimint_load_test_tool
- fedimint_logging
- fedimint_meta_client
- fedimint_meta_common
- fedimint_meta_server
- fedimint_metrics
- fedimint_mint_client
- fedimint_mint_common
- fedimint_mint_server
- fedimint_portalloc
- fedimint_recoverytool
- fedimint_rocksdb
- fedimint_server
- fedimint_testing
- fedimint_testing_core
- fedimint_unknown_common
- fedimint_unknown_server
- fedimint_wallet_client
- fedimint_wallet_common
- fedimint_wallet_server
- fedimint_wasm_tests
- fedimintd
- gateway_cli
- gateway_cln_extension
- gateway_tests
- gatewayd
- hkdf
- ln_gateway
- meta_sanity_test
- mint_client_restore
- mint_client_sanity
- tbs
- tests
- tpe
- wallet_recovery_test