<p><code>addwitnessaddress</code> is what you want</p>

<p>create it, fund it and spend coins from it - then check your transactions on any blockexplorer that they are in segwit format</p>

CC BY-SA 3.0
2017-04-25T13:30:37.317Z
When I try to use `addwitnessaddress`, it wants another argument with an address. I don't understand what that argument means.
Karel Bílek
CC BY-SA 3.0
2017-04-25T13:45:42.833Z
private key generates address. then addwitnessaddress adds segwit address generated from your address which can be redeemed with that private key
amaclin
CC BY-SA 3.0
2017-04-26T04:28:59.490Z
Call `getnewaddress` first, and then pass the result to `addwitnessaddress` to convert it to P2SH-embedded P2WPKH. `addwitnessaddress` also works on P2SH multisig addresses (in which case it will produce a P2SH-embedded P2WSH).
Pieter Wuille
CC BY-SA 3.0
2017-04-27T14:08:59.530Z
Ooooh. This is a little confusing, IMO, but yeah it works
Karel Bílek
CC BY-SA 3.0
2017-04-25T11:57:13.373Z
2017-04-25T11:57:13.373Z
amaclin
<p>Can I use the wallet functionality in bitcoin cli daemon with P2SH segwit on testnet/regtest? Meaning, can I <em>receive</em> on these addresses and send from them?</p>

<p>And if I can, how? </p>

<p>I cannot find it anywhere in the help. The only one that gets close is <code>addwitnessaddress</code>, but that does something else, too.</p>

<bitcoind><testnet><segregated-witness>
Can I get the wallet in bitcoind to use P2SH segwit (on testnet)?
Karel Bílek
# Can I get the wallet in bitcoind to use P2SH segwit (on testnet)?

(Asked by: username_0 on 2017-04-25)

Can I use the wallet functionality in bitcoin cli daemon with P2SH segwit on testnet/regtest? Meaning, can I *receive* on these addresses and send from them?

And if I can, how?

I cannot find it anywhere in the help. The only one that gets close is `addwitnessaddress`, but that does something else, too.

**Tags:** bitcoind, testnet, segregated-witness


---

## 1 answers

### Answer by username_1 on 2017-04-25. Score: 1 | Accepted answer

`addwitnessaddress` is what you want

create it, fund it and spend coins from it - then check your transactions on any blockexplorer that they are in segwit format

> **Comments:**
> **username_0**: When I try to use `addwitnessaddress`, it wants another argument with an address. I don't understand what that argument means.  
> **username_1**: private key generates address. then addwitnessaddress adds segwit address generated from your address which can be redeemed with that private key  
> **username_2**: Call `getnewaddress` first, and then pass the result to `addwitnessaddress` to convert it to P2SH-embedded P2WPKH. `addwitnessaddress` also works on P2SH multisig addresses (in which case it will produce a P2SH-embedded P2WSH).  
> **username_0**: Ooooh. This is a little confusing, IMO, but yeah it works  

---

