4

I need this for a tool i'm writing that generates a transaction history report. think: accounting, auditing, etc. The tool does not and should not have access to the private keys.

Ideally, the API would:

  1. not require creating a wallet first. I only need it to derive keys.
  2. return only addresses that have been used (received funds), up to the gap defined in bip44.

Alternatively, are there any command-line tools that can do this?

2
  • I have created a 2of3 wallet on Coinbase. I have 3 different xpub. I tried all 3 xpub on goochain.net but in all appear 0 balance. But I have 2 btc. How to monitor the 2of3 of coinbase using xpub?
    – Leonardo
    Commented Jan 2, 2016 at 13:58
  • @Leonardo, that sounds like the beginnings of a good question, perhaps you should ask a separate question! The field you entered in before is for answers, not questions. Does coinbase show you an address that starts with a '3' somewhere? That's where the 2-of-3 coins should be held.
    – morsecoder
    Commented Jan 3, 2016 at 18:28

6 Answers 6

4

I ended up writing my own command-line tool to perform wallet discovery and print out a report.

It supports single xpub derivation as well as multisig m-of-n wallets, specifically CoPay wallets.

It determines if each address has been used or not by querying blockchain.info or also toshi or insight servers (the latter two can be run locally.)

Anyone interested can check it out at: https://github.com/dan-da/hd-wallet-addrs

I plan to add a web frontend soon. Update: Web frontend is here.

Also, blockonomics is pretty good and very fast. They don't seem to support CoPay/multisig yet though.

1

I have 3 ways I go about this:

  1. BX tool by libbitcoin
  2. Python libraries, namely pybitcointools ...
  3. and PyCoin

Both have a CLI interface, though PyCoin is more comprehensive. The address scanning is something that can be achieved with this pybitcointools fork.

You'll need to clarify your preferences in terms of shell/OS/programming language for me to detail this specifically. If you're comfortable with pybitcointools I can detail that.

2
  • @danda I will detail the method which best suits your situation, so take a look at these options and chime in on your preference. I can detail them all, if needs be. Commented Jul 31, 2015 at 6:21
  • linux / php CLI. After more investigation it looks like github.com/Bit-Wasp/bitcoin-lib-php is probably my best bet, and also doing it locally keeps the xpub private vs calling an online service.
    – danda
    Commented Jul 31, 2015 at 18:25
0

Goochain web service does exactly what you request: It provides addresses used listing of the wallet. It doesn't have access to the private keys. Just input xpub... in search field, and it would display all transaction on any BIP32 and BIP44 derived addresses.

goochain.net

This is not API but a web service.

2
  • hmm, goochain looks like they have the functionality but I see no way to programmatically call their service, so it doesn't solve my problem. Also it is not clear to me if they find change addresses, which I need.
    – danda
    Commented Jul 31, 2015 at 18:18
  • This is only a web service that provides basic accounting and transaction history. Goochain displays all used addresses from a xpub. It displays change and payment addresses (/0 and /1), additionally it searches on the direct chain (so you can provide xpub for any branch)
    – antonio-fr
    Commented Aug 1, 2015 at 22:32
0

You can search xpubs using blockonomics api .Would return both main chain and change addreses along with their balance

2
  • They must have removed that option because their docs say nothing about xpubs
    – priestc
    Commented Apr 20, 2016 at 22:30
  • its does actually blockonomics.co/views/faqs.html (How to search HD wallet) Commented Apr 21, 2016 at 4:42
0

Try Goochain's Watch-Only Wallet Services for BIP32 addresses created via Ledger, Trezor, or Mycelium. Based on the xpub, their tool only returns addresses that have been used on-chain previously.

0

https://samouraiwallet.com/sentinel.html

Samourai wallet has another app called Sentinel which is a watch-only bitcoin wallet. The app does not handle private keys for spending (aside from sweeping). Sentinel provides transaction, balance, and receive addresses for each public key provided.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.