How to produce a p2wsh transaction with bitcoin-cli?

1

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?

renlord

Posted 2016-11-15T12:46:10.070

Reputation: 2 167

2

related: Segregated Witness Development Guide

Murch 2016-11-15T13:11:48.590

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 Wuille 2017-07-05T18:14:22.393

Answers

2

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.

Andrew Chow

Posted 2016-11-15T12:46:10.070

Reputation: 40 910