Matt Corallo and I have added support for
micropayment channels to bitcoinj. Micropayment channels allow you to send, after an initial setup process, very tiny payments to a chosen third party in a trust-free manner without broadcasting all the payments onto the block chain. This lets you avoid the fees and anti-flooding protections that would otherwise cause problems. The cost is a single ECDSA signature on the client side, and a single verify on the server side.
Please see
the announcement, or the code here:
https://code.google.com/p/bitcoinj/source/detail?r=4908c241f7161bc5facfb85b466feba2929f2567or the documentation here:
https://code.google.com/p/bitcoinj/wiki/WorkingWithMicropaymentsThe documentation explains how the protocol works, the API design and takes you through the included example client/server apps line by line. As you can see it is very easy to use.
Matt did 90% of the work and deserves most of the credit, but I'd also like to give a shout out to Jeremy Spilman and of course Satoshi for their contributions to the design.
Now for some personal commentary. I'm excited by this work for a couple of reasons.
One is that I strongly believe that Bitcoin's short to medium term future lies in finding an advanced "killer app" rather than trying to compete head on with VISA or MasterCard. Whilst Bitcoin has many advantages over credit card payments, for most people the barriers to entry are high enough to keep them on their existing payment solutions. If we create a new market or application that is highly compelling and requires Bitcoin, then we give people a stronger incentive to acquire some. And once they've made the decision to get some coins for that killer app, why not get a little bit more than needed and also use it to buy other things later? To make a killer app we need things Bitcoin can do that other systems can't. Micropayments is an obvious example.
The second reason this work is important is that our community hasn't been making good use of the contracts features Satoshi left for us. Despite that many designs were documented years ago (by me on the Contracts page), there haven't really been any apps that use them. "Where are the contract apps?" is a question that came up a lot when I was in California for the conference. The cause seems to be that it's hard to understand how to turn the high level descriptions on the wiki into working code. The micropayment channels code in bitcoinj now gives us a worked example from beginning to end - you can read the theory, read the protocol description and then see it how to translate it into a real, working system that manages all the fiddly details. Now we have an complete demonstration of how to turn a contract design into reality, I hope we've cut a road through the jungle that others can follow.
If you're interested in building a contract app, please do consider building on bitcoinj and feel free to ask us any questions on the mailing list. We're happy to help.