bitcoin-spring-boot-starter icon indicating copy to clipboard operation
bitcoin-spring-boot-starter copied to clipboard

Write enterprise Bitcoin applications with Spring Boot. Starter projects with multiple Bitcoin related modules that you can include in your application.

Build GitHub Release Maven Central License



Write enterprise Bitcoin applications with Spring Boot.

Spring boot starter projects with convenient dependency descriptors for multiple Bitcoin related modules that you can include in your application. Strong focus on integration and regression testing your own application or module. Included are features for representing, transporting, and performing comprehensive calculations and tests with Bitcoin in financial applications and computations.

Note: Most code is still experimental - do not use in production. This project is under active development. Pull requests and issues are welcome. Look at the changelog to track notable changes. Also, developing this project is fun.

Table of Contents

  • Install
  • Modules
  • Examples
  • Development
  • Contributing
  • Resources
  • License


Download from Maven Central.


implementation "io.github.theborakompanioni:bitcoin-jsonrpc-client-starter:${bitcoinSpringBootStarterVersion}"



The example above imports module bitcoin-jsonrpc-client-starter - you can import any module by its name.


This project contains various modules that can be integrated into your project depending on your requirements.

You can find a small selection in the following table. But there is much more to discover.

Module Description
bitcoin-jsonrpc-client Connect to Bitcoin Core via ConsensusJ Bitcoin Core JSON-RPC API client.
bitcoin-zeromq-client Connect to Bitcoin Core via ZeroMq API client.
bitcoin-regtest Integration and regression testing your own application.
lnd-grpc-client Connect to lnd node via LightningJ gRPC API client.
xchange-jsr354 Exchange rates from popular Bitcoin exchanges for your application.
spring-xchange Automatically create and configure XChange beans.
spring-tor Automatically expose your application as Tor Hidden Service.
spring-lnurl Spring Security configurations for authentication with lnurl-auth.

See for general information about specific modules.


Besides, that most starter modules also have their own example applications, there are also stand-alone example applications showing basic usage of the functionality provided by these modules.

  • [x] bitcoin-autodca: Stacking Sats on Kraken: Auto DCA example application
  • [x] bitcoin-exchange-rate: Currency Conversion API example application
  • [x] lnd-playground: Lightning Network Playground example application (using lnd)
  • [x] lnurl-auth: Spring Security Authentication with lnurl-auth example application

Example apps can be started with a single command, e.g.:

./gradlew -p incubator/spring-lnurl/spring-lnurl-auth-example-application bootRun



  • java >=11
  • docker

A Bitcoin Core Testcontainer running in regtest mode is started for most examples. Having access to a Bitcoin Core node running on mainnet is quite useful if you want to try everything. Optional: A node should publish rawtx and rawblock messages via zmq for some features to work.


./gradlew build -x test


./gradlew test integrationTest

Tests in example application modules or modules that start a lot of docker containers (modules named "-example-application" or "spring-testcontainer-") are excluded from the default test phase and must be manually enabled if you want to run them. To run all tests pass arguments -PexampleTest and -PtestcontainerTest:

./gradlew test integrationTest -PtestcontainerTest -PexampleTest

Be aware this might take several minutes to complete (>= 10 minutes).

Dependency Verification

Gradle is used for checksum and signature verification of dependencies.

# write metadata for dependency verification
./gradlew --write-verification-metadata pgp,sha256 --export-keys

See Gradle Userguide: Verifying dependencies for more information.


Checkstyle with adapted google_checks is used for checking Java source code for adherence to a Code Standard.

# check for code standard violations with checkstyle
./gradlew checkstyleMain


SpotBugs is used for static code analysis.

# invoke static code analysis with spotbugs
./gradlew spotbugsMain


All contributions and ideas are always welcome. For any question, bug or feature request, please create an issue. Before you start, please read the contributing guidelines.


  • Bitcoin:
  • Lightning Network:
  • JSR354 (GitHub):
  • Spring Boot (GitHub):

  • Bitcoin Core (GitHub): (Docker)
  • lnd (GitHub): (Docker)
  • lnurl (GitHub):
  • ElectrumX Server (GitHub): (Docker)
  • Electrum Personal Server (GitHub): (Docker)
  • Electrum Client (GitHub): (Docker)
  • XChange (GitHub):
  • bitcoin-kmp (GitHub):
  • bitcoinj (GitHub):
  • LightningJ (GitHub):
  • ConsensusJ (GitHub):
  • JeroMq (GitHub):
  • Project Reactor (GitHub):
  • jMolecules (GitHub):
  • Testcontainers (GitHub):
  • Tor:
  • Protocol Buffers:


The project is licensed under the Apache License. See LICENSE for details.