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?

  • 2
    related: Segregated Witness Development Guide
    – Murch
    Nov 15, 2016 at 13:11
  • 1
    Only 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). Jul 5, 2017 at 18:14

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.