Skip to content

Commit

Permalink
Merge pull request bitcoin#42 from jonasnick/clarify-diagram
Browse files Browse the repository at this point in the history
Clarify description of diagram
  • Loading branch information
sipa authored May 10, 2019
2 parents b55fed9 + 04b8445 commit 084dee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bip-taproot.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def taproot_output_script(internal_pubkey, script_tree):
The function <code>taproot_output_script</code> returns a byte array with the scriptPubKey. It can be P2SH wrapped if desired (see BIP141).
[[File:bip-taproot/tree.png|frame|This diagram shows the hashing structure to obtain the tweak from an internal key ''P'' and a Merkle tree consisting of 3 script leaves.]]
[[File:bip-taproot/tree.png|frame|This diagram shows the hashing structure to obtain the tweak from an internal key ''P'' and a Merkle tree consisting of 5 script leaves. ''A'', ''B'', ''C'' and ''E'' are ''TapLeaf'' hashes similar to ''D'' and ''AB'' is a ''TapBranch'' hash. Note that when ''CDE'' is computed ''E'' is hashed first because ''E'' is less than ''CD''.]]
'''Spending using the internal key''' A Taproot output can be spent with the private key corresponding to the <code>internal_pubkey</code>. To do so, a witness stack consisting of a single element, a bip-schnorr signature on the signature hash as defined above, with the private key tweaked by the same <code>t</code> in the above snippet. See the code below:
Expand Down

0 comments on commit 084dee8

Please sign in to comment.