<p>bcoin can be run with <code>—index-address</code> or <code>indexAddress: true</code> in <code>bcoin.conf</code>. This will index all transactions by address, a feature I do not think is available in Bitcoin Core. </p>

<p>You can read about the API call here: 
<a href="https://bcoin.io/api-docs/?shell--cli#get-tx-by-address" rel="nofollow noreferrer">https://bcoin.io/api-docs/?shell--cli#get-tx-by-address</a></p>

<p>Normally switching indexes on or off after a full node is synced would not be allowed. However a recent update to the bcoin indexer module (on GitHub master branch, not yet released or published to npm) allows the user to enable indexing at any time. It will, of course, require a long rescan of all block data to create the indexes. </p>

<p>You can review the indexer update here: <a href="https://github.com/bcoin-org/bcoin/pull/758" rel="nofollow noreferrer">https://github.com/bcoin-org/bcoin/pull/758</a></p>

CC BY-SA 4.0
2019-07-20T20:12:10.790Z
2019-07-20T20:12:10.790Z
pinhead
<p>I am trying to set up a Bitcoin node. It should be possible to query the node through JSON RPC to get a list of all transactions (including UTXOs) of any Bitcoin Address, which doesn't necessarily belong to my wallet. This node should power a wallet application which can be downloaded and used by anyone.</p>

<p>I ve already tried with Bitcoin Core. In the bitcoin.conf file I specified txindex=1. Of course the blockchain was not pruned, but I could only retrive transactions for the addresses inside my wallet.</p>

<p>I learnt that I could add "watch only" external addresses. However, this requires re-scanning the blockchain every time a new address is added, which is a lengthy process. Another option would be to use blockchain.info APIs, but the whole point of my efforts is to avoid relying on third parties.</p>

<p>Finally I found bcoin which is an alternative implementation of the bitcoin client. I read in their documentation that one can create a full-blown table of transactions inserting into the bitcoin.conf file index-tx=true and index-address=true. Anyway, bcoin documentation doesn't specify if by doing this I ll be able to query the node to get transactions for any address I want or only for addresses which are part of the wallet. I 'd rather avoid re-downloading and validating the whole blockchain only to find out.</p>

<p>Can anybody tell me if bcoin can solve my problem?</p>

<p>In case bcoin doesn t serve my purpose, can anybody please tell me what I can do to be able to query my node to find all transactions for any address I want, including those which are not part of my wallet?</p>

<bitcoin-core><bcoin>
Bcoin vs Bitcoin Core: query your node to list transactions of any address
Mario Mazzola
# Bcoin vs Bitcoin Core: query your node to list transactions of any address

(Asked by: username_0 on 2019-07-20)

I am trying to set up a Bitcoin node. It should be possible to query the node through JSON RPC to get a list of all transactions (including UTXOs) of any Bitcoin Address, which doesn't necessarily belong to my wallet. This node should power a wallet application which can be downloaded and used by anyone.

I ve already tried with Bitcoin Core. In the bitcoin.conf file I specified txindex=1. Of course the blockchain was not pruned, but I could only retrive transactions for the addresses inside my wallet.

I learnt that I could add "watch only" external addresses. However, this requires re-scanning the blockchain every time a new address is added, which is a lengthy process. Another option would be to use blockchain.info APIs, but the whole point of my efforts is to avoid relying on third parties.

Finally I found bcoin which is an alternative implementation of the bitcoin client. I read in their documentation that one can create a full-blown table of transactions inserting into the bitcoin.conf file index-tx=true and index-address=true. Anyway, bcoin documentation doesn't specify if by doing this I ll be able to query the node to get transactions for any address I want or only for addresses which are part of the wallet. I 'd rather avoid re-downloading and validating the whole blockchain only to find out.

Can anybody tell me if bcoin can solve my problem?

In case bcoin doesn t serve my purpose, can anybody please tell me what I can do to be able to query my node to find all transactions for any address I want, including those which are not part of my wallet?

**Tags:** bitcoin-core, bcoin


---

## 1 answers

### Answer by username_1 on 2019-07-20. Score: 1

bcoin can be run with `—index-address` or `indexAddress: true` in `bcoin.conf`. This will index all transactions by address, a feature I do not think is available in Bitcoin Core.

You can read about the API call here:
<https://bcoin.io/api-docs/?shell--cli#get-tx-by-address>

Normally switching indexes on or off after a full node is synced would not be allowed. However a recent update to the bcoin indexer module (on GitHub master branch, not yet released or published to npm) allows the user to enable indexing at any time. It will, of course, require a long rescan of all block data to create the indexes.

You can review the indexer update here: <https://github.com/bcoin-org/bcoin/pull/758>


---

