These versions are not yet released. For official releases, see the release notes.
Version 0.17 alpha 1
See the preliminary API documentation.
Requirements for developers and consumers:
- JDK 11+ is required for building the project. In particular, we support LTS releases JDK 11 and JDK 17.
- The Gradle requirement moderately updated: 4.4+ for everything except:
bitcoinj-integration-test: 4.6+. If you want to use the new
testOnJdk8task, Gradle 6.7+ is required.
- The Java API requirement for
bitcoinj-coreremains unchanged at Java 8. For any other module it has been raised to Java 11.
- The Android API requirement for
bitcoinj-corehas been raised to API level 26 (Android 8.0).
- Unchanged is the possibility to use up to Java 8 language features (except
bitcoinj-wallettemplate: Java 11).
- A considerable number of previously deprecated methods and classes have been removed. If you want to ease the migration to bitcoinj 0.17, please migrate usages of deprecated API before updating your bitcoinj dependency.
- We moved many classes to two new packages:
org.bitcoinj.base: provides fundamental types with minimal dependencies. This will become its own module in bitcoinj 0.18.
org.bitcoinj.crypto: we’ve removed direct usage of BouncyCastle in our crypo API. If you’ve been using BC
KeyParametersto encrypt wallets, please use our very similar
In general, an “optimize imports” should be enough to resolve the new packages. Many method signatures have changed though. We tried to provide deprecation stubs for the old signatures to ease the migration.
- We’re extracting many aspects of
NetworkParametersto a new
Networkinterface and its implementing
BitcoinNetworkenum. Many APIs that used
Network. Again, we’re providing deprecation stubs.
- We’re not using the term “prod” (or “prodnet”) any more. It’s now
- We moved many internal helpers/utils to
.internalpackages. These are not public API, please don’t use them from your app. If there is a helper which you think would be useful for everyone, please drop us a note and we’ll consider adding it to the public API.
- We removed the (semi-automatic) upgrade path from basic to deterministic keychains/wallets. It was useful back in the time, but nowadays it’s becoming difficult to maintain code for unexpected behaviour. For more information see this issue.
- We finally removed all
PrefixedChecksummedByteshas been renamed to
- Constructors in the
Messagehierarchy previously taking a
bytemessage payload are now consuming from
ByteBuffer. There are no deprecation stubs provided for this change. Payloads are now never retained.
- If you’ve been using
PeerDataEventListenerto observe the blockchain download, use
HttpDiscovery, implementing the protocol to discover seeds via HTTP, is no more. We suggest to use
DnsDiscoveryor use a hardcoded “seed node” (see new feature below).
- Removed support for querying Bitcoin XT nodes for UTXOs.
- All database-backed block stores have been removed.
- The C++/JNI wallet interface has been deprecated and will be removed in a future release. For more information see this issue.
- Likewise, the native interface to libsecp256k1 has been deprecated. For more information see this issue.
- Setting tags on objects (
TaggableObject) has been deprecated and will go away in a future release.
- On Android,
LinuxSecureRandomisn’t automatically installed anymore. The class is still around for manual installation if you’re supporting Android 4.x affected by the RNG vulnerability.
New noteworthy features:
PeerGroupcan now add addresses discovered via
addrv2messages to the pool of nodes to connect to. This means one or more hardcoded nodes can act as a seed for others. This means you can run realistically run a
- Support for Signet.
Transaction.addSignedInput()now also support segwit.
- Wallet has two new static constructors to load from file:
KeyChainGroupStructurenow also supports a BIP-43/BIP-44/BIP-84 structure.
- We now have an
AddressParser, which replaces the previous static
ECKeycan now sign and verify messages with segwit addresses (BIP-137). There is a new
MessageVerifyUtilsto aid with signing and verifying messages.
- We’re going all-in on Java 8 language features! Lambdas, method references, you name it! Generally speaking, we’re on a quest to adopt functional programming style.
- In the API and internally, all integer timestamps have been replaced with
- Likewise, integer-based intervals now use
- Transaction lock time values are wrapped in a new class
- Accessors that could previously return
nullare being migrated to
- In value-based/immutable classes we’re in the process of stripping the prefix “get” from the accessor names.
- All usages of Guava
ListenableFuturehave been migrated to
CompletableFuture. To ease the migration, we use
ListenableCompletableFuturewhich implements both.
- We’re on a mission to replace Guava with JDK 7+ equivalents. Our new
org.bitcoinj.basepackage is not depending on Guava at all!
- WalletTool is slowly evolving into a standalone tool:
- It now lives in its own
- Its build generates man, html5 and adoc manpages from the picocli annotations.
- It now lives in its own
- We updated the DNS seeds.
- We refreshed the bundled checkpoints.
- We’re now using SLF4J 2.0 with its fluent logging API.
- Our integration tests have moved to a new submodule
bitcoinj-integration-test. It makes early use of JUnit 5 and requires Gradle 4.6+ because of that.
- Our CI has improved a lot:
- On GitHub Actions, we’re testing a large matrix of supported and future operating systems, JDKs and
versions of Gradle. We’re also testing for accidental usage of API only available past JDK 8. A new
testOnJdk8task has been added for this (requires Gradle 6.7+).
- On Gitlab CI, the focus is on testing compatibility with an “all free software” toolchain (Debian) and reproducible builds.
- On GitHub Actions, we’re testing a large matrix of supported and future operating systems, JDKs and versions of Gradle. We’re also testing for accidental usage of API only available past JDK 8. A new
- We now have a Matrix space! Join us there if you’ve got questions or suggestions.