Author

Topic: Bitcoin core node with watch-only [electrum generated] (Read 244 times)

sr. member
Activity: 434
Merit: 253
But there is no parameter to automatically get the bitcoin-cli to notify me whenever one of the watched addresses receives a payment ? Do I have to make a query to get balances after every new block is found ?
You can start Bitcoin Core (bitcoind) with the -walletnotify= option where is a command that you want Bitcoin Core to execute every time a new transaction to the wallet is received. Read the help (start with -help option) for more info on how to use it.


Perfect, that's exactly what I needed and I found a thread discussing this feature : https://bitcointalksearch.org/topic/how-to-use-wallet-notify-bitcoind-1442574

Edit : Per this thread, one can even add the -walletnotify parameter in the config file : https://bitcoin.stackexchange.com/questions/24457/how-do-i-use-walletnotify

staff
Activity: 3458
Merit: 6793
Just writing some code
But there is no parameter to automatically get the bitcoin-cli to notify me whenever one of the watched addresses receives a payment ? Do I have to make a query to get balances after every new block is found ?
You can start Bitcoin Core (bitcoind) with the -walletnotify= option where is a command that you want Bitcoin Core to execute every time a new transaction to the wallet is received. Read the help (start with -help option) for more info on how to use it.
sr. member
Activity: 434
Merit: 253
You can import the addresses that you would like to watch using the importaddress or importmulti commands. You should still see notifications for transactions to and from watch only addresses. To be able to see watch only balances and transactions using RPC, you will need to set the watch_only parameters to true for the commands that have that (e.g. getbalance, fundrawtransaction, etc).

But there is no parameter to automatically get the bitcoin-cli to notify me whenever one of the watched addresses receives a payment ? Do I have to make a query to get balances after every new block is found ?


staff
Activity: 3458
Merit: 6793
Just writing some code
You cannot import extended public or private keys into Bitcoin Core.

You can import the addresses that you would like to watch using the importaddress or importmulti commands. You should still see notifications for transactions to and from watch only addresses. To be able to see watch only balances and transactions using RPC, you will need to set the watch_only parameters to true for the commands that have that (e.g. getbalance, fundrawtransaction, etc).
sr. member
Activity: 434
Merit: 253
Thank you for your reply,

I think it's not possible at all to import the watch-only wallet, even if Bitcoin core does support multi-sig wallets AND watch-only wallets, it will very unlikely support a watch only wallet with 5 xpubs.

I will dive a bit into the importaddress parameter, and write a python script to compute/generate addresses from those 5 public keys.


Does Bitcoin Core support notification when I add an address via importaddress parameter ? whenever I google a feature it's either removed from recent version or will be, quite frustrating.
sr. member
Activity: 434
Merit: 253
Yes, it's possible if you add each address with importaddress/importpubkey, but beware that by default it will rescan whole blockchain which took few minutes.


Adding an address after another is counter-productive, plus I need to generate them automatically on a server-side machin in the first place. That's why I seek to import the wallet master public key once, then generate addresses from it.

I can't find the "importpubkey" parameter in the documentation you've attached by the way and the search bar of that website does not seems to work.

Thank you.
sr. member
Activity: 434
Merit: 253
Greetings,


Let's say I want to use bitcoin core full node to programmatically interact via RPC with a watch only wallet.

That watch only wallet has been generated from a MULTI-SIG (3-of-5) Electrum client, where one signature could be a Trezor, another signature a Ledger and a 3rd one a simple xpriv on an HSM.

Is it possible to directly interact with that watch-only wallet directly from bitcoin-core cli / RPC  : to get new address, get address balance and other stuff ??

Jump to: