Skip to main content
£0.00 0

Basket

No products in the basket.

ASIC mining articles and advice

BIP 382 SegWit Output Script Descriptors Guide

BIP 382 guide covering Deployed wpkh() and wsh() descriptors, compressed-key rules, witnessScript recovery, nesting constraints, checksums and test vectors.

BIP 382 SegWit descriptors guide cover

This guide explains BIP 382 SegWit descriptors in plain English. It covers the problem behind the BIP, why it matters and whether the proposal is part of Bitcoin today.

TL;DR

  • What it is: BIP 382 specifies the deployed wpkh() and wsh() output descriptor expressions for native and nested SegWit scripts. Wpkh() commits to the HASH160 of one compressed public key, while wsh() commits to the SHA256 of a nested witness script. Both use BIP 380’s common grammar.
  • Why it matters: BIP 382 standardises how wallets describe P2WPKH and P2WSH policy. Its safety comes from strict compressed-key and nesting rules plus complete descriptor recovery, not merely recognising a version-zero witness program.
  • Current position: BIP 382 is Deployed and Informational and requires BIP 380.

BIP 382 SegWit descriptors in simple English

BIP 382 SegWit descriptors: BIP 382 is Deployed and Informational and requires BIP 380. Its expressions describe SegWit version-zero script forms, not Taproot version one.

Simple example

A node operator is checking BIP 382 SegWit descriptors. It produces witness version zero plus a 20-byte key hash and accepts only key expressions that produce compressed public keys.

Key terms in plain English

BIP:
Bitcoin Improvement Proposal: a document describing a proposed rule, standard or process. Its status must be checked separately.
Taproot:
A Bitcoin upgrade that added new signature and script options for spending outputs.
Node:
A computer running Bitcoin software that checks data and communicates with other peers.

Status and scope

BIP 382 is Deployed and Informational and requires BIP 380. Its expressions describe SegWit version-zero script forms, not Taproot version one.

wpkh expression

wpkh(KEY) can be top level or inside sh(). It produces witness version zero plus a 20-byte key hash and accepts only key expressions that produce compressed public keys.

wsh expression

wsh(SCRIPT) can be top level or inside sh(). It produces witness version zero plus the SHA256 of the nested script and also generates the witnessScript required to spend.

BIP 382 SegWit descriptors technical diagram
wsh expression: the fields, validation boundary and operational evidence that implementations need to agree.

Compressed keys

Every key anywhere beneath wsh() must produce compressed public keys. Reject uncompressed WIFs or points even when a general key parser accepts them elsewhere.

Nesting

Reject wpkh inside wsh, wsh inside wsh, raw keys passed directly to wsh and script expressions passed to wpkh. Only the specified top-level and sh-wrapped forms are valid.

Recovery

Back up the complete checksummed descriptor, origins, wildcard branch, range and highest-used indexes. A witness program alone cannot reconstruct a complex witnessScript or identify keys.

Vectors

Run published valid and invalid cases, derive several child indexes, compare scriptPubKeys and redeem/witness scripts, and test watch-only import, signing and restoration independently. Build a revision-pinned evidence pack on an isolated node, wallet or protocol harness. Record source commit, binary hash, network, chain identity, configuration and dependencies.

Frequently asked questions

What is the main point of BIP 382 SegWit descriptors?

BIP 382 SegWit descriptors: BIP 382 is Deployed and Informational and requires BIP 380. Its expressions describe SegWit version-zero script forms, not Taproot version one.

For BIP 382 SegWit descriptors, what should a beginner know about status and scope?

BIP 382 is Deployed and Informational and requires BIP 380. Its expressions describe SegWit version-zero script forms, not Taproot version one.

For BIP 382 SegWit descriptors, what should a beginner know about wpkh expression?

wpkh(KEY) can be top level or inside sh(). It produces witness version zero plus a 20-byte key hash and accepts only key expressions that produce compressed public keys.

For BIP 382 SegWit descriptors, what should a beginner know about wsh expression?

wsh(SCRIPT) can be top level or inside sh(). It produces witness version zero plus the SHA256 of the nested script and also generates the witnessScript required to spend.

Conclusion

BIP 382 standardises how wallets describe P2WPKH and P2WSH policy. Its safety comes from strict compressed-key and nesting rules plus complete descriptor recovery, not merely recognising a version-zero witness program.

Primary sources

Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.

ASIC MINER PICKS

Recommended ASIC Mining Hardware

Compare three of our highest ranked ASIC miners currently available, with live product details and pricing.
Overall ranking
Equihash
·
ZEC
Overall rank#1of 100AvailableAll: #3 / 831
Bitmain Antminer Z15K 525KSol Equihash Zcash Miner
Bitmain
Pre-Order
Hashrate
525KSOL
Efficiency
4.73W/KSOL
Power
2483W
Earns/kWh
41.5p
Free Shipping
Price · delivered
£6,050.00
ex VAT
Est. per month
£751.05
Payback 8.1 Months
Overall ranking
Equihash
·
ZEC
Overall rank#2of 100AvailableAll: #4 / 831
Bitmain Antminer Z15 Pro 800KSol Equihash Zcash Miner
Bitmain
In stock
Hashrate
800KSOL
Efficiency
3.3W/KSOL
Power
2640W
Earns/kWh
59.4p
Price · delivered
£11,925.00
ex VAT
Est. per month
£1144.46
Payback 10.4 Months
Overall ranking
SHA-256
·
BTC
Overall rank#6of 100AvailableAll: #9 / 831
Bitmain Antminer S23e Hydro 2U 865Th SHA-256 Bitcoin Miner
Bitmain
Pre-Order
Hashrate
865TH
Efficiency
10W/TH
Power
8650W
Earns/kWh
13.2p
Free Shipping
Price · delivered
£9,382.50
ex VAT
Est. per month
£835.74
Payback 11.2 Months
Browse all ASIC miners
MORE MINING ADVICE

More ASIC Mining Articles

Read practical advice about choosing hardware, calculating electricity costs, setting up miners, hosting and maintenance.
MINER COMMUNITY

Join the ASIC Mining Discussion

Ask a question or share what has worked for you. Your experience may help another miner make a better decision.

Members can read and join the discussion

Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.

Log in to read comments Register to join the discussion

Membership helps us protect the discussion from spam and keep answers useful.

ASIC MINING SUPPORT

Need Help Choosing an ASIC Miner?

Tell us what you want to mine, your electricity cost and where the machine will run. We can help you compare hardware, power requirements, hosting and repairs.
Contact our mining team
Browse ASIC miners