bitcoinj is a Java implementation of the Bitcoin protocol, which allows it to maintain a wallet and send/receive transactions without needing a local copy of Bitcoin Core. It comes with full documentation and some example apps showing how to use the library.
If you use bitcoinj in an application please sign up for the announcement list so you know when new versions are available and if there are critical bugs found.
Be aware: this library is Apache licensed. By using it, you agree with the terms of that license. In particular pay attention to section 7 and 8, which assert there is NO WARRANTEE that this library is safe to use or bug free, and in fact that by using this code you accept that none of the contributors shall be liable for any damages or monetary loss that results from your use of their code, even if due to bugs in that code. In short, according to the license the library is distributed under, there are no situations in which you could sue any of the developers (it's as if you wrote the entire library yourself). If you can't handle that, don't use this library.
- Connect to the P2P network and download/parse/verify the block chain.
- Highly optimised lightweight simplified payment verification (SPV) mode. In this mode, only a small part of the block chain is downloaded and verified, making bitcoinj suitable for usage on constrained devices like laptops, smartphones or cheap virtual private servers. SPV wallets can sync with the blockchain in seconds, even from a cold start.
- Experimental full verification mode, which does the same verification work as Bitcoin Core. In this mode, the unspent transaction output set (UTXO set) is calculated and, thanks to a PostgreSQL store, can be indexed into a database allowing for fast lookup of balance by address.
- A wallet class with encryption, fee calculation, pluggable coin selection/coin control policies, extensions support and event listeners that let you stay up to date with changes in your balance.
- Easily implement apps that use Bitcoin's contracts features. As an example, the library includes ....
- Support for micropayment channels that let you set up a multi-signature contract between client and server, and then negotiate over how much value is sent on the channel, allowing rapid and fast micropayments that avoid miner fees.
- Provides both async and thread-per-connection for network IO, allowing you to choose between scalability and blocking-only features like SOCKS/Tor proxying.
- Strong BitcoinStandards support.
- Command line tool for working with wallet and chain files.
- Example apps, thorough API documentation and articles explaining the design and layout of the library.
- A friendly and helpful community!
Download the library as a JAR, or use Maven, and then read:
- Satoshi's white paper - the bitcoinj documentation assumes basic familiarity with how Bitcoin works, the structure of transactions and the block chain.
- Getting started - a step by step tutorial on how to write a simple app that just forwards any money it receives.
- The JavaDocs: 0.11 API documentation
There are also some more in depth articles covering various topics. For best understanding, read them in order.
Join our community!
You can read the release notes for each release starting from 0.3.