brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
bitcoin-libraries-bitcoinjbitcoinj: mature Java/Kotlin Bitcoin library. SPV node, wallet, HD derivation, used by BlueWallet (Android), older mobile wallets. USE WHEN: building JVM Bitcoin apps, Android-native wallet code.
Independent GitHub snapshot · Automated classification · Original documentation governs
Java/Kotlin Bitcoin library. Long-standing (since 2011). Used in many JVM-based wallets.
Repo: github.com/bitcoinj/bitcoinj.
Current release: 0.17.1 (4 May 2026). Prior: 0.17 (21 February 2025), 0.16.5 (27 January 2025).
Maven:
<dependency>
<groupId>org.bitcoinj</groupId>
<artifactId>bitcoinj-core</artifactId>
<version>0.17.1</version>
</dependency>
Gradle:
implementation 'org.bitcoinj:bitcoinj-core:0.17.1'
Do not ship 0.16.x or 0.15.x. 0.17.1 fixes two verification
bypasses in ScriptExecution.correctlySpends() — GHSA-hfcf-v2f8-x9pc /
CVE-2026-44714, CVSS 7.5, disclosed 4 May 2026. The P2PKH and native
P2WPKH fast paths verify an attacker-supplied signature against an
attacker-supplied pubkey without checking that pubkey against the hash
committed in the scriptPubKey, so any keypair satisfies local
verification of arbitrary P2PKH/P2WPKH outputs. Affected: 0.15.x,
0.16.x and 0.17; patched only in 0.17.1 — there is no 0.16.x backport
(as of September 2026). Pure SPV never verifies input signatures and is
untouched, but anything calling correctlySpends() must upgrade.
0.17.1 also lowers the default fee to 10000 sat/vkB.
0.17 API (Network/BitcoinNetwork in place of NetworkParameters):
import org.bitcoinj.base.Address;
import org.bitcoinj.base.BitcoinNetwork;
import org.bitcoinj.base.ScriptType;
import org.bitcoinj.core.PeerGroup;
import org.bitcoinj.net.discovery.DnsDiscovery;
import org.bitcoinj.wallet.Wallet;
Wallet wallet = Wallet.createDeterministic(BitcoinNetwork.MAINNET, ScriptType.P2WPKH);
Address addr = wallet.currentReceiveAddress();
System.out.println(addr.toString());
// Sync via SPV (BIP37 bloom filters — see pitfalls)
PeerGroup peerGroup = new PeerGroup(BitcoinNetwork.MAINNET, blockChain);
peerGroup.addPeerDiscovery(new DnsDiscovery(BitcoinNetwork.MAINNET));
peerGroup.start();
peerGroup.downloadBlockChain();
Parse a user-supplied address with wallet.parseAddress(str) or
AddressParser.getDefault(network); the static
Address.fromString(params, str) is deprecated in 0.17.
0.17 is a large breaking release. Per its release notes:
NetworkParameters aspects extracted to a Network interface and
BitcoinNetwork enum; "prod"/"prodnet" is now BitcoinNetwork.MAINNET.AddressParser replaces the static Address.fromString()
constructors.ListenableFuture usage migrated to CompletableFuture
(transitional ListenableCompletableFuture implements both; the Guava
form goes away after 0.17).org.bitcoinj.base (fundamental types, no Guava — becomes
its own module in 0.18) and org.bitcoinj.crypto (no direct BouncyCastle
in the crypto API; AesKey replaces BC KeyParameter).Script.ScriptType is now org.bitcoinj.base.ScriptType; Coin and
Address moved from org.bitcoinj.core to org.bitcoinj.base.HttpDiscovery (use
DnsDiscovery or a hardcoded seed node), GetUTXOsMessage/UTXOsMessage,
Serializable/Cloneable, married key chains, the basic -> deterministic
keychain upgrade path.Services.NODE_COMPACT_FILTERS is only a service-bit constant.| Aspect | bitcoinj | bdk-jvm |
|---|---|---|
| Language | Java | Java/Kotlin |
| Foundation | Pure Java | Rust BDK via JNI |
| Maturity | 14+ years | newer |
| Descriptor support | Limited | Native |
| SegWit | P2WPKH wallets (send + receive) | Full |
| Taproot | Send-only to P2TR (0.17.1) | Full |
Taproot detail: ScriptType.P2TR exists and ScriptPattern/SegwitAddress
handle P2TR outputs, so you can pay a bc1p... address. But
DeterministicKeyChain still rejects any outputScriptType other than
P2PKH or P2WPKH and there is no Schnorr signing, so a bitcoinj wallet
cannot receive to or spend from P2TR — verified against the v0.17.1 source
in September 2026. The 0.16 release notes ("send to P2TR addresses;
receiving and spending ... in a future release") still describe 0.17.1.
For new projects, bdk-jvm is generally recommended. bitcoinj has better adoption for legacy / Android-native cases.