<p>As you mentioned, <code>strippedsize</code> was added as a parameter to <code>getblock()</code> that shows the block size excluding witness data.   </p>

<p><code>txinwitness</code> has been added as value to the response from <code>getrawtransaction()</code> and <code>decoderawtransaction()</code>.     </p>

<p>That's all I was able to pick up from the RPC... I suspect looping through the transactions in each block and checking for the <code>txinwitness</code> value could get the number of segwit transactions.</p>

CC BY-SA 3.0
2016-11-18T05:53:41.743Z
2016-11-18T05:53:41.743Z
m1xolyd1an
<p>For example, I can see <code>getblock</code> now returns two fields for a block's size:</p>

<p><code>size</code> (all data) and <code>strippedsize</code> (base block size, NOT including witness data)</p>

<p>Are there any more RPC updates to interact with witness data? Like return the number of segwit transactions in a block? Or return the <code>wtxid</code> or witness data from a specific transaction?</p>

<json-rpc><segregated-witness>
What new JSON-RPC calls are available with SegWit activation?
pinhead
# What new JSON-RPC calls are available with SegWit activation?

(Asked by: username_0 on 2016-11-17)

For example, I can see `getblock` now returns two fields for a block's size:

`size` (all data) and `strippedsize` (base block size, NOT including witness data)

Are there any more RPC updates to interact with witness data? Like return the number of segwit transactions in a block? Or return the `wtxid` or witness data from a specific transaction?

**Tags:** json-rpc, segregated-witness


---

## 1 answers

### Answer by username_1 on 2016-11-18. Score: 1

As you mentioned, `strippedsize` was added as a parameter to `getblock()` that shows the block size excluding witness data.

`txinwitness` has been added as value to the response from `getrawtransaction()` and `decoderawtransaction()`.

That's all I was able to pick up from the RPC... I suspect looping through the transactions in each block and checking for the `txinwitness` value could get the number of segwit transactions.


---

