0
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.
1When I try to use
addwitnessaddress, it wants another argument with an address. I don't understand what that argument means. – Karel Bílek – 2017-04-25T13:30:37.317private key generates address. then addwitnessaddress adds segwit address generated from your address which can be redeemed with that private key – amaclin – 2017-04-25T13:45:42.833
1Call
getnewaddressfirst, and then pass the result toaddwitnessaddressto convert it to P2SH-embedded P2WPKH.addwitnessaddressalso works on P2SH multisig addresses (in which case it will produce a P2SH-embedded P2WSH). – Pieter Wuille – 2017-04-26T04:28:59.490Ooooh. This is a little confusing, IMO, but yeah it works – Karel Bílek – 2017-04-27T14:08:59.530