<p><code>walletnotify</code> is called every time a wallet transaction occurs, i.e. a transaction in which at least one input or output belongs to the wallet. It doesn't matter if the transaction is incoming or outgoing, or whether it was created by the Bitcoin Core wallet or any other wallet with the same set of keys.</p>

CC BY-SA 4.0
2024-05-30T05:34:37.423Z
2024-05-30T05:34:37.423Z
Vojtěch Strnad
<p>I have a watch-only descriptor wallet. I'm interested in getting notified when funds are sent <strong>from</strong> this wallet. By looking at the <a href="https://github.com/bitcoin/bitcoin/blob/10164916f712bd3c92f0b3ac329ba2e1209746fe/src/wallet/wallet.cpp#L1152-L1178" rel="nofollow noreferrer">code for <code>walletnotify</code></a> it seems like this is only called when funds are added <strong>to</strong> the wallet.</p>
<p>Is it somehow possible to configure <code>walletnotify</code> and a descriptor-based watch-only wallet such that I'm notified when a given UTXO is <em>spent</em>? Or is this otherwise possible using <code>bitcoind</code>?</p>

<bitcoind><wallet-notify>
Can I use "walletnotify" to watch outgoing transactions from a watch-only wallet?
torkel
# Can I use "walletnotify" to watch outgoing transactions from a watch-only wallet?

(Asked by: username_0 on 2024-05-30)

I have a watch-only descriptor wallet. I'm interested in getting notified when funds are sent **from** this wallet. By looking at the [code for `walletnotify`](https://github.com/bitcoin/bitcoin/blob/10164916f712bd3c92f0b3ac329ba2e1209746fe/src/wallet/wallet.cpp#L1152-L1178) it seems like this is only called when funds are added **to** the wallet.

Is it somehow possible to configure `walletnotify` and a descriptor-based watch-only wallet such that I'm notified when a given UTXO is *spent*? Or is this otherwise possible using `bitcoind`?

**Tags:** bitcoind, wallet-notify


---

## 1 answers

### Answer by username_1 on 2024-05-30. Score: 3

`walletnotify` is called every time a wallet transaction occurs, i.e. a transaction in which at least one input or output belongs to the wallet. It doesn't matter if the transaction is incoming or outgoing, or whether it was created by the Bitcoin Core wallet or any other wallet with the same set of keys.


---

