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?

  • 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 Jan 2 '16 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 Jan 3 '16 at 18:28
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.

  • @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. – Wizard Of Ozzie Jul 31 '15 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 Jul 31 '15 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.

  • 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 Jul 31 '15 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 Aug 1 '15 at 22:32
0

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

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, privacy policy and cookie policy

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