MultiversX Tracker is Live!

Recognizing Taproot outputs in raw transactions

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 175 Views

What can be the contents of an P2TR output script? Is it always OP_1 0x20 <32-bit public key>?

A Taproot output contains a 32 byte witness program (or tweaked internal public key) after OP_1. The OP_1 (01) makes it clear that it is a SegWit v1 output rather than say a SegWit v0 output (00). Any scripts are included in the leaves of the Taproot tree and hashed up to a Merkle root (which tweaks the internal public key) so the witness program can commit to various leaf scripts.

Can multisig script be there, and if yes - in what format?

A multisig script can be in a leaf or multiple leaves of the Taproot tree. Note that a Taproot multisig script uses the opcode OP_CHECKSIGADD rather than OP_CHECKMULTISIG (outlined in BIP 342).

How do I convert that script to an address?

The leaf scripts are hashed within the Taproot (Merkle) tree. The Merkle root then tweaks the internal public key. A breakdown of bech32m (SegWit v1) addresses is here. This tweaked internal public key (or witness program) is directly included within the address.


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments