Java‑FFM wrapper for Bitcoin Core’s validation engine via libbitcoinkernel
This library is alpha—under work in progress. APIs may change and functionality is still incomplete. Contributions and bug reports are welcome!
java‑bitcoinkernel
uses Java's FFM (Foreign Function Mapping) to call into Bitcoin Core’s libbitcoinkernel
, exposing core functionalities—including block & transaction validation, and block data access—through a safe Java interface.
- Transaction validation using Bitcoin Core’s validation engine
- Block validation - todo
- Clean Java-native bindings via FFM with minimal overhead
We vendor Bitcoin Core’s libbitcoinkernel
using a Git subtree targeting the kernelApi
branch from your fork:
git subtree pull \
--prefix bitcoinkernel/bitcoin \
https://github.com/TheCharlatan/bitcoin \
kernelApi --squash
- CMake
- C++17 compiler (e.g. GCC/Clang)
- Boost
- JDK 21+ with FFM support
- Rust (optional, if fuzzing enabled)
Refer to Bitcoin Core docs for dependency specifics.
./gradlew compileJava
Note: You might need to update the build.gradle file with different libraries extension(.so for linux, .dylib for macos, .dll for windows)
libraries = [
":/usr/local/lib/libbitcoinkernel.so"
]
- Upstream PR of C header API library -> bitcoin/bitcoin#30595
- rust-bitcoinkernel wrapper
see issue milestone for more info regarding the status of the library