Is it possible to interact with the blockchain through bitcoin-core without a wallet?

2

1

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?

ntonnelier

Posted 2017-07-11T14:57:03.253

Reputation: 243

Answers

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.

You could also try one of these non Bitcoin Core solutions.

(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.)

Nick ODell

Posted 2017-07-11T14:57:03.253

Reputation: 26 536

This is useful data @Nick ODell. Would you still use bitcoin-core to sign transactions having the user provide the PrivKey?ntonnelier 2017-07-11T16:06:28.720

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.Andrew Chow 2017-07-11T16:11:38.633

1

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 2017-07-11T17:38:56.807

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 2017-08-11T05:48:18.437