About 2 years ago I started working on this Java library in a WebOfTrustInfo repository:

It can convert encode/decode txrefs, and it can also look up transactions from the blockchain via 1. Blockcypher API, 2. bitcoind RPC, 3. btcd RPC. It’s used by the DIF Universal Resolver’s btcr driver:

On Monday this week in a call with Ryan, Dan and Michael, we agreed that the txref-conversion-java library should re-use the libtxref-java library, which is more recent and likely higher quality, to avoid duplication of efforts:

I started refactoring accordingly, seems to be working fine, see this branch:

My current thoughts:

  1. I think txref-conversion-java continues to be useful, since it has code for looking up transactions from the blockchain.
  2. Over time, if other Java libraries emerge that implement Bitcoin blockchain lookups, then txref-conversion-java could be completely deprecated.
  3. txref-conversion-java could perhaps be renamed to btc-tx-lookup-java or something like that, to better reflect what it does.
  4. Right now it lives under a WebOfTrustInfo repository. Is WebOfTrustInfo a place where code libraries should live, or should it be moved elsewhere?

I’m happy to hear that your refactoring to use libtxref-java went fairly smoothly.

In reply to your thoughts:

  1. I agree. libtxref-java only does conversions.
    2,3) I also think you should rename your library to btc-tx-lookup-java. In our btcr-DID-method project, we also have a transaction lookup layer, but it is quite primitive (uses chain.so lookups), and depending where we go with a public btcd or libbitcoin server, it would be useful to have a separate transaction lookup library.
  2. I’ll admit I didn’t catch all the discussions last week about where repos should go. Did you get a good idea?

BTW could you add a LICENSE to libbech32-java and libtxref-java ?


I am now done refactoring my library, I created the new btc-tx-lookup-java as a replacement for txref-conversion-java:

It uses libtxref-java and libbech32-java as dependencies.

For now I aso created the repo under WebOfTrustInfo, but I’m open to suggestions if there’s a better place.

If/when your own transaction lookup layer evolves, we can at any time also work on consolidating those, in order to further reduce any duplication of work.