Skip to definition

Transactions & network Advanced

Nested SegWit

In brief A SegWit output wrapped in P2SH, with the fee tool's nested option limited to the single-key P2SH-P2WPKH type.

Also referred to as: P2SH-P2WPKH · P2WPKH-in-P2SH · P2WPKH nested in P2SH · wrapped SegWit

Full explanation

A SegWit witness program wrapped inside a P2SH output. For the site's fee estimator, nested specifically means P2SH-P2WPKH, the single-key construction. It retains extra P2SH wrapping data compared with native P2WPKH. Other P2SH constructions need different assumptions.

For exampleA wallet identifying an input as P2SH-P2WPKH supplies enough information to use the nested input option; an M-prefixed address alone does not.

Common mistakeTreating nested SegWit as native Bech32 or assuming that the word P2SH always means P2SH-P2WPKH.

Put it into practice: Explore transparent transaction size and fees →

Primary sources: BIP 49: P2WPKH nested in P2SH BIP 141: P2SH witness programs

Definition checked:

Quick answers about Nested SegWit

What does Nested SegWit mean in Litecoin?
A SegWit output wrapped in P2SH, with the fee tool's nested option limited to the single-key P2SH-P2WPKH type. A SegWit witness program wrapped inside a P2SH output. For the site's fee estimator, nested specifically means P2SH-P2WPKH, the single-key construction. It retains extra P2SH wrapping data compared with native P2WPKH. Other P2SH constructions need different assumptions.
What is a common mistake with Nested SegWit?
Treating nested SegWit as native Bech32 or assuming that the word P2SH always means P2SH-P2WPKH.
How is Nested SegWit applied in practice?
A wallet identifying an input as P2SH-P2WPKH supplies enough information to use the nested input option; an M-prefixed address alone does not. You can explore this hands-on with our Explore transparent transaction size and fees.
Jarosław Wasiński
Editor-in-chief · Financial markets and Litecoin education

Editor-in-chief of Litecoin.watch and founder of MyBank.pl. His published work covers foreign exchange, financial education and Litecoin. On Litecoin.watch, his remit includes editorial direction, source transparency and the practical guides and research published by the site.

Background, selected work and editorial responsibility →

Founder of MyBank.pl Financial education and market analysis Named editorial responsibility