Reviewed Aug 2026
DE
BA-07 · LESSON 04

Tapscript

KEY DEFINITIONS

Terms used in this lesson

Tapscript
The version of Bitcoin Script used by a Taproot script-path spend.
Witness
Signatures, scripts, or other data supplied to satisfy a Bitcoin output’s spending condition.
Control block
Proof data showing that a revealed script was committed inside a Taproot output.
Taproot
A Bitcoin output and spending design that can combine a public-key path with privately committed alternative scripts.
P2TR
Pay to Taproot, the Bitcoin output type introduced with Taproot.
BIP340
The Bitcoin Improvement Proposal specifying Schnorr signatures for the secp256k1 curve.
Schnorr signature
Bitcoin’s Taproot signature scheme, whose algebra supports compact verification and advanced multi-party signing.
CHECKSIG
The Bitcoin Script operation that checks whether a signature is valid for the required public key and transaction message.

Script-path spends reveal one leaf, its witness, and a control block while keeping unused branches private.

65 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

Tapscript is the Script version used by Taproot script-path spends. The witness supplies stack arguments, the revealed script leaf, and a control block. Taproot first verifies that the leaf was committed to the P2TR output, then executes it under Tapscript rules. Tapscript uses BIP340 Schnorr signatures and changes several Script limits and upgrade mechanisms.

GUIDED EXPLANATION1/5 ideas inspected
1

Select one committed leaf

The spender chooses a script path and assembles only the arguments needed by that leaf. Other leaves remain hidden.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionA valid control block makes the Taproot spend valid even if the revealed script returns false.

The control block proves commitment membership. The revealed Tapscript must then execute successfully with its witness.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.