user30572: getnewaddress "" bech32 generates a P2WPKH address (e.g. tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx).
How can I generate a P2WSH address (e.g. tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7)?

user48884: To generate a P2WSH address, you need to have some script. The easiest one you can use is a multisig script. You can do this with the command addmultisigaddress. If you do something like
addmultisigaddress 1 '["37Ju7oTbPfe5qNAHYiAKfdTtVvCSP3TTdL"]' "" "bech32"

you should get a P2WSH address.

30572: <p><code>getnewaddress "" bech32</code> generates a <code>P2WPKH</code> address (e.g. <code>tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx</code>).</p>

<p>How can I generate a <code>P2WSH</code> address (e.g. <code>tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7</code>)?</p>
 48884: <p>To generate a P2WSH address, you need to have some script. The easiest one you can use is a multisig script. You can do this with the command <code>addmultisigaddress</code>. If you do something like</p>
<pre><code>addmultisigaddress 1 '[&quot;37Ju7oTbPfe5qNAHYiAKfdTtVvCSP3TTdL&quot;]' &quot;&quot; &quot;bech32&quot;
</code></pre>
<p>you should get a P2WSH address.</p>
