With the impending adoption of segregated witness, users reliant on the bitcoin-cli API would require to reconstruct new methods to re-produce more efficient transactions. Is there some guide out there to learn how to produce a p2wsh transaction based off a conventional p2sh transaction?
-
2related: Segregated Witness Development Guide– Murch ♦Nov 15, 2016 at 13:11
-
1Only outputs sent to a SegWit address/script can be spent using SegWit inputs. So the real question is how to establish that address (see Andrew's answer below).– Pieter WuilleJul 5, 2017 at 18:14
1 Answer
If a P2SH address is already in your wallet, you can use the addwitnessaddress
RPC command to get the P2SH-P2WSH version of that address and have it added to your wallet for tracking.