Skip to content

yuvicc/java-bitcoinkernel

Repository files navigation

Java‑Bitcoinkernel ⚠️🚧

Java‑FFM wrapper for Bitcoin Core’s validation engine via libbitcoinkernel

⚠️ Status

This library is alpha—under work in progress. APIs may change and functionality is still incomplete. Contributions and bug reports are welcome!

Overview

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.

Features

  • Transaction validation using Bitcoin Core’s validation engine
  • Block validation - todo
  • Clean Java-native bindings via FFM with minimal overhead

Building

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

Requirements

  • 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.

Build

./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"
        ]

References

Current Status of the Library

see issue milestone for more info regarding the status of the library

About

Java Bindings for Bitcoin Kernel Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published