<blockquote>
  <p>I don't see a way of doing this through bitcoin-core. How could I accomplish this? Is there a library I could use? Should I create my own methods? Can you think of a workaround?</p>
</blockquote>

<p>You can disable the wallet by passing <code>--disable-wallet</code> at compile time. I don't think that's what you're asking, though.</p>

<p>I'm guessing you want to be able to query the balance of an address, where the address unknown at the time of synchronization. Bitcoin Core can't do this efficiently, because it doesn't index transactions by address unless the address is in the wallet.</p>

<p>There are patches to Bitcoin Core that create an address index, but none are officially supported.</p>

<ul>
<li><a href="https://github.com/satoshilabs/bitcoin" rel="nofollow noreferrer">https://github.com/satoshilabs/bitcoin</a></li>
<li><a href="https://github.com/btcdrak/bitcoin" rel="nofollow noreferrer">https://github.com/btcdrak/bitcoin</a></li>
</ul>

<p>You could also try <a href="https://bitcoin.stackexchange.com/questions/11459/whats-the-best-practice-for-creating-and-maintaining-an-address-index">one of these non Bitcoin Core solutions</a>.</p>

<p>(Another approach would be to import the public key as watch-only, which would let you do this with Bitcoin Core. I don't know if that satisfies your security requirements, though.)</p>

CC BY-SA 3.0
2017-07-11T16:06:28.720Z
This is useful data @Nick ODell. Would you still use bitcoin-core to sign transactions having the user provide the PrivKey?
ntonnelier
CC BY-SA 3.0
2017-07-11T16:11:38.633Z
Yes. The `signrawtransaction` RPC command allows you to sign a transaction where you provide the RPC the private key. The private key will never enter the wallet.
Ava Chow
CC BY-SA 3.0
2017-07-11T17:38:56.807Z
We are currently maintaining branch of bitcoind with bitcore patches at https://github.com/satoshilabs/bitcoin . I don't want to put that into npm since I can't promise long term commitment (also we would need to rename it etc)
Karel Bílek
CC BY-SA 3.0
2017-08-11T05:48:18.437Z
You can also use watch-only functionality (which implies storing the address in Bitcoin Core's wallet file, but not the private key).
Pieter Wuille
CC BY-SA 3.0
2017-07-11T15:45:01.643Z
2017-07-11T17:44:54.390Z
2017-07-11T17:44:54.390Z
Nick ODell
<p>Im running a full node and am developing an application that interacts with it. One of its features is users should be able to create a pair of Bitcoin PrivKey and PubKey. But for security reasons, I dont want to save them. Not on my wallet.dat, not on database. I want to create the keys programmatically and serve them for the user to manage them.</p>

<p>I don't see a way of doing this through bitcoin-core. How could I accomplish this? Is there a library I could use? Should I create my own methods? Can you think of a workaround?</p>

<blockchain><bitcoin-core><wallet.dat>
Is it possible to interact with the blockchain through bitcoin-core without a wallet?
ntonnelier
# Is it possible to interact with the blockchain through bitcoin-core without a wallet?

(Asked by: username_0 on 2017-07-11)

Im running a full node and am developing an application that interacts with it. One of its features is users should be able to create a pair of Bitcoin PrivKey and PubKey. But for security reasons, I dont want to save them. Not on my wallet.dat, not on database. I want to create the keys programmatically and serve them for the user to manage them.

I don't see a way of doing this through bitcoin-core. How could I accomplish this? Is there a library I could use? Should I create my own methods? Can you think of a workaround?

**Tags:** blockchain, bitcoin-core, wallet.dat


---

## 1 answers

### Answer by username_1 on 2017-07-11. Score: 1

> I don't see a way of doing this through bitcoin-core. How could I accomplish this? Is there a library I could use? Should I create my own methods? Can you think of a workaround?

You can disable the wallet by passing `--disable-wallet` at compile time. I don't think that's what you're asking, though.

I'm guessing you want to be able to query the balance of an address, where the address unknown at the time of synchronization. Bitcoin Core can't do this efficiently, because it doesn't index transactions by address unless the address is in the wallet.

There are patches to Bitcoin Core that create an address index, but none are officially supported.

* <https://github.com/satoshilabs/bitcoin>
* <https://github.com/btcdrak/bitcoin>

You could also try [one of these non Bitcoin Core solutions](https://bitcoin.stackexchange.com/questions/11459/whats-the-best-practice-for-creating-and-maintaining-an-address-index).

(Another approach would be to import the public key as watch-only, which would let you do this with Bitcoin Core. I don't know if that satisfies your security requirements, though.)

> **Comments:**
> **username_0**: This is useful data @username_1. Would you still use bitcoin-core to sign transactions having the user provide the PrivKey?  
> **username_2**: Yes. The `signrawtransaction` RPC command allows you to sign a transaction where you provide the RPC the private key. The private key will never enter the wallet.  
> **username_3**: We are currently maintaining branch of bitcoind with bitcore patches at https://github.com/satoshilabs/bitcoin . I don't want to put that into npm since I can't promise long term commitment (also we would need to rename it etc)  
> **username_4**: You can also use watch-only functionality (which implies storing the address in Bitcoin Core's wallet file, but not the private key).  

---

