user43363: Using only command line (no GUI), how can I create watch only wallet based on descriptor and get first unused address?
This is the descriptor:

"wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum"

this is the bitcoin-cli command to list addresses based on this descriptor:

./bitcoin-cli deriveaddresses
"wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum" "[0,2]"

How to create actuall watch only wallet so that I can get automatically first unused address?

user48884: First create a descriptor wallet with createwallet:
bitcoin-cli -named createwallet wallet_name=mywallet descriptors=true

This will make a descriptor wallet named mywallet.
Then import a descriptor into that wallet using `importdescriptors:
bitcoin-cli -rpcwallet=mywallet importdescriptors '[{"desc": "wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum", "range": [0, 1000], "timestamp": "now", "internal": false, "watchonly": true, "active": true}]

This will import the descriptor with an initial keypool of 1000. Any new bech32 addresses you request (with getnewaddress or from the GUI) will come from this descriptor.

43363: <p>Using only command line (no GUI), how can I create watch only wallet based on descriptor and get first unused address?</p>
<p>This is the descriptor:</p>
<blockquote>
<p>&quot;wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum&quot;</p>
</blockquote>
<p>this is the bitcoin-cli command to list addresses based on this descriptor:</p>
<blockquote>
<p>./bitcoin-cli deriveaddresses
&quot;wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum&quot; &quot;[0,2]&quot;</p>
</blockquote>
<p>How to create actuall watch only wallet so that I can get automatically first unused address?</p>
 48884: <p>First create a descriptor wallet with <code>createwallet</code>:</p>
<pre><code>bitcoin-cli -named createwallet wallet_name=mywallet descriptors=true
</code></pre>
<p>This will make a descriptor wallet named <code>mywallet</code>.</p>
<p>Then import a descriptor into that wallet using `importdescriptors:</p>
<pre><code>bitcoin-cli -rpcwallet=mywallet importdescriptors '[{&quot;desc&quot;: &quot;wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum&quot;, &quot;range&quot;: [0, 1000], &quot;timestamp&quot;: &quot;now&quot;, &quot;internal&quot;: false, &quot;watchonly&quot;: true, &quot;active&quot;: true}]
</code></pre>
<p>This will import the descriptor with an initial keypool of 1000. Any new bech32 addresses you request (with <code>getnewaddress</code> or from the GUI) will come from this descriptor.</p>
