High performance Bitcoin development platform.
Knuth is a high performance implementation of the Bitcoin protocol focused on users requiring extra performance and flexibility, what makes it the best platform for wallets, exchanges, block explorers and miners.
Knuth is a multi-crypto full node, but it is also a development platform.
Knuth's core is written in C++23, on top of it we provide a set of libraries and modules written in various programming languages that you can use as basis for building your application.
At the moment we have libraries in the following languages: C++, C, Javascript, TypeScript, JS/TS WebAssembly, C# and Python. You can build your own library in the language of your choice on top of our C library.
Knuth provides multiple ways to use the platform:
The complete Bitcoin node that you can run out of the box. Perfect for running a full node, mining, or as a backend for applications that need blockchain access.
A high-performance C++23 library that gives you direct access to all Bitcoin protocol functionality. Ideal for building performance-critical applications.
A stable C interface that provides access to all core functionality and serves as the foundation for bindings in other programming languages.
Built on top of the C API, these bindings allow you to use Knuth from your preferred programming language:
- JavaScript API - Full-featured Node.js binding
- WebAssembly - Browser-compatible WebAssembly binding
- C# API - .NET binding for Windows, Linux, and macOS
- Python API - Pythonic interface to Knuth functionality
All Knuth components are now available through a single unified package:
- Install and configure the Knuth build helper:
$ pip install kthbuild --user --upgrade
$ conan config install https://github.com/k-nuth/ci-utils/raw/master/conan/config2023.zip
- Install the unified Knuth package:
$ conan install --requires=kth/0.68.0 --update --deployer=direct_deploy
This single installation provides you with:
bin/kth
- The node executablelib/
- All static libraries (libnode.a, libc-api.a, etc.)include/kth/
- C++ headers and C API headers
After installation, you can immediately run the full Bitcoin node:
# Run the node
$ ./kth/bin/kth
For C++ developers, link against the appropriate libraries:
// example.cpp
#include <kth/node.hpp>
int main() {
kth::node::node node{"config.cfg"};
node.initchain();
node.run();
auto& chain = node.chain();
auto height = chain.get_last_height();
std::cout << "Current height: " << height << std::endl;
return 0;
}
When compiling, link against the static libraries found in lib/
:
$ g++ -std=c++23 example.cpp -I./kth/include -L./kth/lib -lnode -lblockchain -ldomain -linfrastructure
For C developers or language bindings:
// hello_knuth.c
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <kth/capi.h>
int main() {
// Create and configure node
kth_node_t node = kth_node_construct("config.cfg", stdout, stderr);
// Initialize blockchain database
kth_node_initchain(node);
// Run the node
kth_node_run_wait(node);
// Get blockchain interface
kth_chain_t chain = kth_node_get_chain(node);
// Query current height
uint64_t height;
chain_get_last_height(chain, &height);
printf("Current height: %" PRIu64 "\n", height);
// Cleanup
kth_node_destruct(node);
return 0;
}
When compiling, link against the C API library:
$ gcc hello_knuth.c -I./kth/include -L./kth/lib -lc-api
For more detailed instructions, please refer to our documentation.
We designed Knuth to be a high performance node, so our build system has the ability to automatically detect the microarchitecture of your processor and perform an optimized build for it.
For those who don't want to wait for compilation times, we provide pre-built binaries compatible with Intel's Haswell microarchitecture. But you don't have to worry about that, our build system will do everything for you.
Knuth is based on a modular architecture simple to modify, expand and learn. Any protocol change can be introduced in Knuth much faster and more efficiently than in reference implementations.
Knuth can be used in any computer architecture and operating system, it only requires a 64-bit system.
Knuth has been well tested on x86-64 processors and on the following operating systems: FreeBSD, Linux, macOS and Windows. However, it is not limited to these, Knuth can be used in any computer architecture and any operating system, the only requirement is a 64-bit system.
If you find a problem in any other platform, please let us know.
Any protocol change can be introduced in Knuth much faster and more efficiently than in reference implementations.
Starting with v0.68.0 (June 2025), all Knuth components are released from this unified mono-repository with synchronized versioning.
Before v0.68.0: Multi-repository architecture with independent release cycles
- Components were developed in separate repositories
- Each repository had its own version numbering and release schedule
- Different components could have different versions (e.g., C-API v0.67.0, Node v0.58.0)
From v0.68.0: Mono-repository architecture with unified versioning
- All components unified in this single repository (
kth-mono
) - Synchronized version numbers across all components
- Single release process for all components
You may notice that Node and Node-exe components appear to "skip" versions 0.59.0 through 0.67.0. Here's why:
During the multi-repository period (2024-2025):
- C-API: Actively released versions 0.59.0 → 0.67.0 with regular updates
- Node & Node-exe: Remained stable at v0.58.0 (no new releases needed)
- Other components: Various independent version numbers
If you need access to pre-mono-repository versions:
C-API versions ≤ 0.67.0:
- Repository:
k-nuth/c-api
- Available versions: 0.47.0 → 0.67.0
Node & Node-exe versions ≤ 0.58.0:
- Node Repository:
k-nuth/node
- Node-exe Repository:
k-nuth/node-exe
- Available versions: 0.47.0 → 0.58.0
All versions ≥ 0.68.0:
- Repository: This repository (
k-nuth/kth-mono
) - Unified versioning for all components
- Simplified Management: Single repository, single version, single release process
- Improved Coordination: All components evolve together with consistent versioning
- Better Developer Experience: One codebase, one build system, one release cycle
- Easier Dependency Management: No more version compatibility matrices between components
Knuth is a community backed project developed. Donations received will be used to subsidize development costs for general maintenance and support of our implementation.
Your contributions are greatly appreciated!
bitcoincash:qrlgfg2qkj3na2x9k7frvcmv06ljx5xlnuuwx95zfn
See fund.kth.cash for active Flipstarter campaigns.
Knuth node is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT
To optimize CI/CD performance, we use specific branch prefixes that determine which workflows are executed:
docs/
- Documentation-only changes (fast validation, ~30s)style/
- Code formatting, copyright updates, comment fixes (fast validation)chore/
- Maintenance tasks, dependency updates (fast validation)noci/
- Explicitly skip heavy CI (fast validation)
All other branches (feature/
, fix/
, refactor/
, etc.) run the full CI pipeline.
📖 See Branch Conventions Guide for detailed usage examples.
You can contact us through our Telegram group or write to us at info@kth.cash.
To report security issues please contact:
Fernando Pelliccioni (fpelliccioni@gmail.com) - GPG Fingerprint: 8C1C 3163 AAE1 0EFA 704C 8A00 FE77 07B7 4C29 E389