<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=BIP_0118</id>
	<title>BIP 0118 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/index.php?action=history&amp;feed=atom&amp;title=BIP_0118"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;action=history"/>
	<updated>2026-05-03T00:50:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=69486&amp;oldid=prev</id>
		<title>934: Update BIP text with latest version from https://github.com/bitcoin/bips/blob/40aef277672e28af/bip-0118.mediawiki</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=69486&amp;oldid=prev"/>
		<updated>2022-09-29T23:13:49Z</updated>

		<summary type="html">&lt;p&gt;Update BIP text with latest version from https://github.com/bitcoin/bips/blob/40aef277672e28af/bip-0118.mediawiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:13, 29 September 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l77&quot;&gt;Line 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Signature message ====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Signature message ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The function &#039;&#039;SigMsg118(hash_type, ext_flag)&#039;&#039; computes &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;message being signed as a byte array, analogously to &lt;/del&gt;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigMsg&lt;/del&gt;(hash_type&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, ext_flag&lt;/del&gt;)&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;defined in [[bip-0341.mediawiki|BIP 341]], &lt;/del&gt;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigExt118&lt;/del&gt;(hash_type&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,key_version&lt;/del&gt;)&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;computes &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;extension, similarly to [[bip-0342.mediawiki|BIP 342]]&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;We define &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;functions &lt;/ins&gt;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Msg118&lt;/ins&gt;(hash_type)&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/ins&gt;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ext118&lt;/ins&gt;(hash_type)&#039;&#039; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;which compute &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;message being signed as a byte array&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The parameter &amp;#039;&amp;#039;hash_type&amp;#039;&amp;#039; is an 8-bit unsigned value, reusing values defined in [[bip-0341.mediawiki|BIP 341]], with the addition that the values &amp;lt;code&amp;gt;0x41&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x42&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x43&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0xc1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0xc2&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;0xc3&amp;lt;/code&amp;gt; are also valid for BIP 118 public keys.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The parameter &amp;#039;&amp;#039;hash_type&amp;#039;&amp;#039; is an 8-bit unsigned value, reusing values defined in [[bip-0341.mediawiki|BIP 341]], with the addition that the values &amp;lt;code&amp;gt;0x41&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x42&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x43&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0xc1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0xc2&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;0xc3&amp;lt;/code&amp;gt; are also valid for BIP 118 public keys.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT = 0x40&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT = 0x40&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT = 0xc0&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT = 0xc0&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;As per [[bip-0341.mediawiki|BIP 341]], the parameter &#039;&#039;ext_flag&#039;&#039; is an integer in the range 0-127, used for indicating that extensions are added at the end of the message. The parameter &#039;&#039;key_version&#039;&#039; is an 8-bit unsigned value (an integer in the range 0-255) used for committing to the public key version.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following restrictions apply and cause validation failure if violated:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following restrictions apply and cause validation failure if violated:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l92&quot;&gt;Line 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 90:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Using &amp;lt;code&amp;gt;SIGHASH_SINGLE&amp;lt;/code&amp;gt; without a &amp;quot;corresponding output&amp;quot; (an output with the same index as the input being verified).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Using &amp;lt;code&amp;gt;SIGHASH_SINGLE&amp;lt;/code&amp;gt; without a &amp;quot;corresponding output&amp;quot; (an output with the same index as the input being verified).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If these restrictions &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;aren&lt;/del&gt;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;t violated&lt;/del&gt;, &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigMsg118&lt;/del&gt;(hash_type,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ext_flag&lt;/del&gt;)&#039;&#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;evaluates to &lt;/del&gt;the concatenation of the following data, in order (with byte size of each item listed in parentheses). Numerical values in 2, 4, or 8-byte items are encoded in little-endian.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If these restrictions &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;are not violated, &#039;&#039;Msg118(hash_type)&#039;&#039; evaluates as follows.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If &#039;&#039;hash_type &amp;amp; 0x40 == 0&#039;&lt;/ins&gt;&#039;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;then &lt;/ins&gt;&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Msg118(hash_type) = SigMsg&lt;/ins&gt;(hash_type, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/ins&gt;)&#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, where &#039;&#039;SigMsg&#039;&#039; is as defined in [[bip-0341.mediawiki|BIP 341]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If &#039;&#039;hash_type &amp;amp; 0x40 != 0&#039;&#039;, then &#039;&#039;Msg118(hash_type)&#039;&#039; is &lt;/ins&gt;the concatenation of the following data, in order (with byte size of each item listed in parentheses). Numerical values in 2, 4, or 8-byte items are encoded in little-endian.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Control:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Control:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l99&quot;&gt;Line 99:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 101:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;nVersion&amp;#039;&amp;#039; (4): the &amp;#039;&amp;#039;nVersion&amp;#039;&amp;#039; of the transaction.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;nVersion&amp;#039;&amp;#039; (4): the &amp;#039;&amp;#039;nVersion&amp;#039;&amp;#039; of the transaction.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;nLockTime&amp;#039;&amp;#039; (4): the &amp;#039;&amp;#039;nLockTime&amp;#039;&amp;#039; of the transaction.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;nLockTime&amp;#039;&amp;#039; (4): the &amp;#039;&amp;#039;nLockTime&amp;#039;&amp;#039; of the transaction.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is zero:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &#039;&#039;sha_prevouts&#039;&#039; (32): the SHA256 of the serialization of all input outpoints.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &#039;&#039;sha_amounts&#039;&#039; (32): the SHA256 of the serialization of all spent output amounts.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &#039;&#039;sha_scriptpubkeys&#039;&#039; (32): the SHA256 of the serialization of all spent output &#039;&#039;scriptPubKey&#039;&#039;s.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &#039;&#039;sha_sequences&#039;&#039; (32): the SHA256 of the serialization of all input &#039;&#039;nSequence&#039;&#039;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &amp;#039;&amp;#039;hash_type &amp;amp; 3&amp;#039;&amp;#039; does not equal &amp;lt;code&amp;gt;SIGHASH_NONE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;SIGHASH_SINGLE&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &amp;#039;&amp;#039;hash_type &amp;amp; 3&amp;#039;&amp;#039; does not equal &amp;lt;code&amp;gt;SIGHASH_NONE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;SIGHASH_SINGLE&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_outputs&amp;#039;&amp;#039; (32): the SHA256 of the serialization of all outputs in &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt; format.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_outputs&amp;#039;&amp;#039; (32): the SHA256 of the serialization of all outputs in &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt; format.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Data about this input:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Data about this input:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &#039;&#039;spend_type&#039;&#039; (1): equal to &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;(ext_flag * &lt;/del&gt;2&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;) + annex_present&#039;&#039;, where &#039;&#039;annex_present&#039;&#039; is 0 &lt;/del&gt;if no annex is present, or &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1 &lt;/del&gt;otherwise (the original witness stack has two or more witness elements, and the first byte of the last element is &#039;&#039;0x50&#039;&#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &#039;&#039;spend_type&#039;&#039; (1): equal to 2 if no annex is present, or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;3 &lt;/ins&gt;otherwise (the original witness stack has two or more witness elements, and the first byte of the last element is &#039;&#039;0x50&#039;&#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;non-zero:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt;:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &#039;&#039;amount&#039;&#039; (8): value of the previous output spent by this input.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;**** &#039;&#039;outpoint&#039;&#039; (36): the &amp;lt;code&amp;gt;COutPoint&amp;lt;/code&amp;gt; of this input (32-byte hash + 4-byte little-endian).&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &#039;&#039;scriptPubKey&#039;&#039; (35): &#039;&#039;scriptPubKey&#039;&#039; of the previous output spent by this input, serialized as script inside &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt;. Its size is always 35 bytes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt; or &lt;/del&gt;&amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &#039;&#039;nSequence&#039;&#039; (4): &#039;&#039;nSequence&#039;&#039; of this input.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;*** &#039;&#039;amount&#039;&#039; (8): value of the previous output spent by this input.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;*** &#039;&#039;scriptPubKey&#039;&#039; (35): &#039;&#039;scriptPubKey&#039;&#039; of the previous output spent by this input, serialized as script inside &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt;. Its size is always 35 bytes.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&lt;/del&gt;** &#039;&#039;nSequence&#039;&#039; (4): &#039;&#039;nSequence&#039;&#039; of this input&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;** If &#039;&#039;hash_type &amp;amp; 0xc0&#039;&#039; is zero:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*** &#039;&#039;input_index&#039;&#039; (4): index of this input in the transaction input vector. Index of the first input is 0&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If an annex is present (the lowest bit of &amp;#039;&amp;#039;spend_type&amp;#039;&amp;#039; is set):&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If an annex is present (the lowest bit of &amp;#039;&amp;#039;spend_type&amp;#039;&amp;#039; is set):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_annex&amp;#039;&amp;#039; (32): the SHA256 of &amp;#039;&amp;#039;(compact_size(size of annex) || annex)&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;annex&amp;#039;&amp;#039; includes the mandatory &amp;#039;&amp;#039;0x50&amp;#039;&amp;#039; prefix.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_annex&amp;#039;&amp;#039; (32): the SHA256 of &amp;#039;&amp;#039;(compact_size(size of annex) || annex)&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;annex&amp;#039;&amp;#039; includes the mandatory &amp;#039;&amp;#039;0x50&amp;#039;&amp;#039; prefix.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_single_output&amp;#039;&amp;#039; (32): the SHA256 of the corresponding output in &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt; format.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;sha_single_output&amp;#039;&amp;#039; (32): the SHA256 of the corresponding output in &amp;lt;code&amp;gt;CTxOut&amp;lt;/code&amp;gt; format.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, &#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigExt118&lt;/del&gt;(hash_type&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,key_version&lt;/del&gt;)&#039;&#039; evaluates to the concatenation of:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similarly, &#039;&#039;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ext118&lt;/ins&gt;(hash_type)&#039;&#039; evaluates to the concatenation of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the following data, in order&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Extension:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Extension:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &amp;#039;&amp;#039;hash_type &amp;amp; 0xc0&amp;#039;&amp;#039; is not &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT&amp;lt;/codE&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** If &amp;#039;&amp;#039;hash_type &amp;amp; 0xc0&amp;#039;&amp;#039; is not &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT&amp;lt;/codE&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;tapleaf_hash&amp;#039;&amp;#039; (32): the tapleaf hash as defined in [[bip-0341.mediawiki|BIP 341]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*** &amp;#039;&amp;#039;tapleaf_hash&amp;#039;&amp;#039; (32): the tapleaf hash as defined in [[bip-0341.mediawiki|BIP 341]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &#039;&#039;key_version&#039;&#039; (1).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &#039;&#039;key_version&#039;&#039; (1)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: a constant value &#039;&#039;0x01&#039;&#039; representing that this is a signature for a BIP 118 public key&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;codesep_pos&amp;#039;&amp;#039; (4): the opcode position of the last executed &amp;lt;code&amp;gt;OP_CODESEPARATOR&amp;lt;/code&amp;gt; before the currently executed signature opcode, with the value in little endian (or &amp;#039;&amp;#039;0xffffffff&amp;#039;&amp;#039; if none executed). The first opcode in a script has a position of 0. A multi-byte push opcode is counted as one opcode, regardless of the size of data being pushed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;** &amp;#039;&amp;#039;codesep_pos&amp;#039;&amp;#039; (4): the opcode position of the last executed &amp;lt;code&amp;gt;OP_CODESEPARATOR&amp;lt;/code&amp;gt; before the currently executed signature opcode, with the value in little endian (or &amp;#039;&amp;#039;0xffffffff&amp;#039;&amp;#039; if none executed). The first opcode in a script has a position of 0. A multi-byte push opcode is counted as one opcode, regardless of the size of data being pushed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Note that if &#039;&#039;hash_type &amp;amp; 0x40&#039;&#039; is zero, &#039;&#039;SigMsg118(hash_type,ext_flag) == SigMsg(hash_type,ext_flag)&#039;&#039;, and &#039;&#039;SigExt118(hash_type,0x00) == ext&#039;&#039; (where &#039;&#039;ext&#039;&#039; is the message extension as defined in [[bip-0342.mediawiki|BIP 342]]).&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To verify a signature &amp;#039;&amp;#039;sig&amp;#039;&amp;#039; for a BIP 118 public key &amp;#039;&amp;#039;p&amp;#039;&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To verify a signature &amp;#039;&amp;#039;sig&amp;#039;&amp;#039; for a BIP 118 public key &amp;#039;&amp;#039;p&amp;#039;&amp;#039;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If the &#039;&#039;sig&#039;&#039; is 64 bytes long, return &#039;&#039;Verify(p, hash&amp;lt;sub&amp;gt;TapSigHash&amp;lt;/sub&amp;gt;(0x00 || &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigMsg118&lt;/del&gt;(0x00&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, 1&lt;/del&gt;) || &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigExt118&lt;/del&gt;(0x00&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, 0x01&lt;/del&gt;), sig)&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, where &#039;&#039;Verify&#039;&#039; is defined in [[bip-0340.mediawiki|BIP 340]].&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If the &#039;&#039;sig&#039;&#039; is 64 bytes long, return &#039;&#039;Verify(p, hash&amp;lt;sub&amp;gt;TapSigHash&amp;lt;/sub&amp;gt;(0x00 || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Msg118&lt;/ins&gt;(0x00) || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ext118&lt;/ins&gt;(0x00&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;), sig)&#039;&#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If the &#039;&#039;sig&#039;&#039; is 65 bytes long, return &#039;&#039;sig[64] &amp;amp;ne; 0x00 and Verify(p, hash&amp;lt;sub&amp;gt;TapSighash&amp;lt;/sub&amp;gt;(0x00 || &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigMsg118&lt;/del&gt;(sig[64]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, 1&lt;/del&gt;) || &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SigExt118&lt;/del&gt;(sig[64]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, 0x01&lt;/del&gt;), sig[0:64])&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If the &#039;&#039;sig&#039;&#039; is 65 bytes long, return &#039;&#039;sig[64] &amp;amp;ne; 0x00 and Verify(p, hash&amp;lt;sub&amp;gt;TapSighash&amp;lt;/sub&amp;gt;(0x00 || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Msg118&lt;/ins&gt;(sig[64]) || &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ext118&lt;/ins&gt;(sig[64]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;), sig[0:64])&#039;&#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Otherwise, fail.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Otherwise, fail.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;Verify&#039;&#039; is as defined in [[bip-0340.mediawiki|BIP 340]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key differences from [[bip-0342.mediawiki|BIP 342]] signature verification are:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key differences from [[bip-0342.mediawiki|BIP 342]] signature verification are:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l143&quot;&gt;Line 143:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 135:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* In all cases, &amp;lt;code&amp;gt;key_version&amp;lt;/code&amp;gt; is set to the constant value &amp;lt;code&amp;gt;0x01&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;.&amp;lt;ref&amp;gt;&amp;#039;&amp;#039;&amp;#039;Why change key_version?&amp;#039;&amp;#039;&amp;#039; Changing &amp;lt;code&amp;gt;key_version&amp;lt;/code&amp;gt; ensures that if the same private key is used to generate both a [[bip-0342.mediawiki|BIP 342]] key and a BIP 118 public key, that a signature for the [[bip-0342.mediawiki|BIP 342]] key is not also valid for the BIP 118 public key (and vice-versa).&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* In all cases, &amp;lt;code&amp;gt;key_version&amp;lt;/code&amp;gt; is set to the constant value &amp;lt;code&amp;gt;0x01&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt;.&amp;lt;ref&amp;gt;&amp;#039;&amp;#039;&amp;#039;Why change key_version?&amp;#039;&amp;#039;&amp;#039; Changing &amp;lt;code&amp;gt;key_version&amp;lt;/code&amp;gt; ensures that if the same private key is used to generate both a [[bip-0342.mediawiki|BIP 342]] key and a BIP 118 public key, that a signature for the [[bip-0342.mediawiki|BIP 342]] key is not also valid for the BIP 118 public key (and vice-versa).&amp;lt;/ref&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT&amp;lt;/code&amp;gt; is set, the digest is calculated as if &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt; was set, except &amp;lt;code&amp;gt;outpoint&amp;lt;/code&amp;gt; is not included in the digest.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUT&amp;lt;/code&amp;gt; is set, the digest is calculated as if &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt; was set, except &amp;lt;code&amp;gt;outpoint&amp;lt;/code&amp;gt; is not included in the digest.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT&amp;lt;/code&amp;gt; is set, the digest is calculated as if &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt; was set, except &amp;lt;code&amp;gt;outpoint&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scriptPubKey&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tapleaf_hash&amp;lt;/code&amp;gt; are not included in the digest.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* If &amp;lt;code&amp;gt;SIGHASH_ANYPREVOUTANYSCRIPT&amp;lt;/code&amp;gt; is set, the digest is calculated as if &amp;lt;code&amp;gt;SIGHASH_ANYONECANPAY&amp;lt;/code&amp;gt; was set, except &amp;lt;code&amp;gt;outpoint&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;amount&lt;/ins&gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scriptPubKey&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tapleaf_hash&amp;lt;/code&amp;gt; are not included in the digest.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Security ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Security ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>934</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=69113&amp;oldid=prev</id>
		<title>934: Update BIP text with latest version from https://github.com/bitcoin/bips/blob/edffe529056f6dfd/bip-0118.mediawiki</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=69113&amp;oldid=prev"/>
		<updated>2021-12-15T16:06:13Z</updated>

		<summary type="html">&lt;p&gt;Update BIP text with latest version from https://github.com/bitcoin/bips/blob/edffe529056f6dfd/bip-0118.mediawiki&lt;/p&gt;
&lt;a href=&quot;https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;amp;diff=69113&amp;amp;oldid=66879&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>934</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=66879&amp;oldid=prev</id>
		<title>934: Update BIP text with latest version from https://github.com/bitcoin/bips/blob/b5723035e23896d0/bip-0118.mediawiki</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=BIP_0118&amp;diff=66879&amp;oldid=prev"/>
		<updated>2019-09-24T18:00:58Z</updated>

		<summary type="html">&lt;p&gt;Update BIP text with latest version from https://github.com/bitcoin/bips/blob/b5723035e23896d0/bip-0118.mediawiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{bip}}&lt;br /&gt;
{{BipMoved|bip-0118.mediawiki}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  BIP: 118&lt;br /&gt;
  Layer: Consensus (soft fork)&lt;br /&gt;
  Title: SIGHASH_NOINPUT&lt;br /&gt;
  Author: Christian Decker &amp;lt;decker.christian@gmail.com&amp;gt;&lt;br /&gt;
  Comments-Summary: No comments yet.&lt;br /&gt;
  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0118&lt;br /&gt;
  Status: Draft&lt;br /&gt;
  Type: Standards Track&lt;br /&gt;
  Created: 2017-02-28&lt;br /&gt;
  License: BSD-3-Clause&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
This BIP describes a new signature hash flag (&amp;lt;tt&amp;gt;sighash&amp;lt;/tt&amp;gt;-flag) for&lt;br /&gt;
segwit transactions. It removes any commitment to the output being&lt;br /&gt;
spent from the signature verification mechanism. This enables dynamic&lt;br /&gt;
binding of transactions to outputs, predicated solely on the&lt;br /&gt;
compatibility of output scripts to input scripts.&lt;br /&gt;
&lt;br /&gt;
== Motivation ==&lt;br /&gt;
Off-chain protocols make use of transactions that are not yet&lt;br /&gt;
broadcast to the Bitcoin network in order to renegotiate the final&lt;br /&gt;
state that should be settled on-chain.&lt;br /&gt;
In a number of cases it is desirable to react to a given transaction&lt;br /&gt;
being seen on-chain with a predetermined reaction in the form of&lt;br /&gt;
another transaction.&lt;br /&gt;
Often the reaction is identical, no matter which transaction is seen&lt;br /&gt;
on-chain, but the application still needs to create many identical&lt;br /&gt;
transactions.&lt;br /&gt;
This is because signatures in the input of a transaction uniquely&lt;br /&gt;
commit to the hash of the transaction that created the output being&lt;br /&gt;
spent.&lt;br /&gt;
&lt;br /&gt;
This proposal introduces a new sighash flag that modifies the behavior&lt;br /&gt;
of the transaction digest algorithm used in the signature creation and&lt;br /&gt;
verification, to exclude the previous output commitment.&lt;br /&gt;
By removing the commitment we enable dynamic rebinding of a signed&lt;br /&gt;
transaction to outputs whose &amp;lt;tt&amp;gt;witnessProgram&amp;lt;/tt&amp;gt; and value match the ones&lt;br /&gt;
in the &amp;lt;tt&amp;gt;witness&amp;lt;/tt&amp;gt; of the spending transaction.&lt;br /&gt;
&lt;br /&gt;
The dynamic binding is opt-in and can further be restricted by using&lt;br /&gt;
unique &amp;lt;tt&amp;gt;witnessProgram&amp;lt;/tt&amp;gt; scripts that are specific to the application&lt;br /&gt;
instance, e.g., using public keys that are specific to the off-chain&lt;br /&gt;
protocol instance.&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&amp;lt;tt&amp;gt;SIGHASH_NOINPUT&amp;lt;/tt&amp;gt; is a flag with value &amp;lt;tt&amp;gt;0x40&amp;lt;/tt&amp;gt; appended to a signature&lt;br /&gt;
so that the signature does not commit to any of the inputs, and&lt;br /&gt;
therefore to the outputs being spent. The flag applies solely to the&lt;br /&gt;
verification of that single signature.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;SIGHASH_NOINPUT&amp;lt;/tt&amp;gt; flag is only active for segwit scripts with&lt;br /&gt;
version 1 or higher. Should the flag be used in a non-segwit script or&lt;br /&gt;
a segwit script of version 0, the current behavior is maintained and&lt;br /&gt;
the script execution MUST abort with a failure.&lt;br /&gt;
&lt;br /&gt;
The transaction digest algorithm from BIP 143 is used when verifying a&lt;br /&gt;
&amp;lt;tt&amp;gt;SIGHASH_NOINPUT&amp;lt;/tt&amp;gt; signature, with the following modifications:&lt;br /&gt;
&lt;br /&gt;
    2. hashPrevouts (32-byte hash) is 32 0x00 bytes&lt;br /&gt;
    3. hashSequence (32-byte hash) is 32 0x00 bytes&lt;br /&gt;
    4. outpoint (32-byte hash + 4-byte little endian) is&lt;br /&gt;
       set to 36 0x00 bytes&lt;br /&gt;
    5. scriptCode of the input is set to an empty script&lt;br /&gt;
       0x00&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt; of the previous output remains part of the transaction&lt;br /&gt;
digest and is therefore also committed to in the signature.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; flag MAY be combined with the &amp;lt;tt&amp;gt;SINGLE&amp;lt;/tt&amp;gt; flag in which&lt;br /&gt;
case the &amp;lt;tt&amp;gt;hashOutputs&amp;lt;/tt&amp;gt; is modified as per BIP&lt;br /&gt;
143&amp;lt;ref&amp;gt;https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki&amp;lt;/ref&amp;gt;: it&lt;br /&gt;
only commits to the output with the matching index, if such output exists, and&lt;br /&gt;
is a &amp;lt;tt&amp;gt;uint256&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;0x0000......0000&amp;lt;/tt&amp;gt; otherwise.&lt;br /&gt;
&lt;br /&gt;
Being a change in the digest algorithm, the &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; flag applies to&lt;br /&gt;
all segwit signature verification opcodes, specifically it applies to:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;OP_CHECKSIG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;OP_CHECKSIGVERIFY&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;OP_CHECKMULTISIG&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;OP_CHECKMULTISIGVERIFY&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Binding through scripts ==&lt;br /&gt;
Using &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; the input containing the signature no longer&lt;br /&gt;
references a specific output.&lt;br /&gt;
Any participant can take a transaction and rewrite it by changing the&lt;br /&gt;
hash reference to the previous output, without invalidating the&lt;br /&gt;
signatures.&lt;br /&gt;
This allows transactions to be bound to any output that matches the&lt;br /&gt;
value committed to in the &amp;lt;tt&amp;gt;witness&amp;lt;/tt&amp;gt; and whose &amp;lt;tt&amp;gt;witnessProgram&amp;lt;/tt&amp;gt;,&lt;br /&gt;
combined with the spending transaction&amp;#039;s &amp;lt;tt&amp;gt;witness&amp;lt;/tt&amp;gt; returns &amp;lt;tt&amp;gt;true&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Previously, all information in the transaction was committed in the&lt;br /&gt;
signature itself, while now the relationship between the spending&lt;br /&gt;
transaction and the output being spent is solely based on the&lt;br /&gt;
compatibility of the &amp;lt;tt&amp;gt;witnessProgram&amp;lt;/tt&amp;gt; and the &amp;lt;tt&amp;gt;witness&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This also means that particular care has to be taken in order to avoid&lt;br /&gt;
unintentionally enabling this rebinding mechanism. &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; MUST NOT&lt;br /&gt;
be used, unless it is explicitly needed for the application, e.g., it&lt;br /&gt;
MUST NOT be a default signing flag in a wallet&lt;br /&gt;
implementation. Rebinding is only possible when the outputs the&lt;br /&gt;
transaction may bind to all use the same public keys. Any public key&lt;br /&gt;
that is used in a &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; signature MUST only be used for outputs&lt;br /&gt;
that the input may bind to, and they MUST NOT be used for transactions&lt;br /&gt;
that the input may not bind to. For example an application SHOULD&lt;br /&gt;
generate a new key-pair for the application instance using &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt;&lt;br /&gt;
signatures and MUST NOT reuse them afterwards.&lt;br /&gt;
&lt;br /&gt;
== Deployment ==&lt;br /&gt;
The &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; sighash flag is to be deployed during a regular segwit&lt;br /&gt;
script update.&lt;br /&gt;
&lt;br /&gt;
== Backward compatibility ==&lt;br /&gt;
As a soft fork, older software will continue to operate without&lt;br /&gt;
modification. Non-upgraded nodes, however, will not verify the&lt;br /&gt;
validity of the new sighash flag and will consider the transaction&lt;br /&gt;
valid by default. Being only applicable to segwit transactions,&lt;br /&gt;
non-segwit nodes will see an anyone-can-spend script and will consider&lt;br /&gt;
it valid.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgments ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; sighash flag was first proposed by Joseph Poon in&lt;br /&gt;
February 2016&amp;lt;ref&amp;gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-February/012460.html&amp;lt;/ref&amp;gt;, after being mentioned in the original&lt;br /&gt;
Lightning paper&amp;lt;ref&amp;gt;http://lightning.network/lightning-network.pdf&amp;lt;/ref&amp;gt;. A formal proposal was however&lt;br /&gt;
deferred until after the activation of segwit. This proposal is a&lt;br /&gt;
continuation of this discussion and attempts to formalize it in such a&lt;br /&gt;
way that it can be included in the Bitcoin protocol. As such we&amp;#039;d like&lt;br /&gt;
acknowledge Joseph Poon and Thaddeus Dryja as the original inventors&lt;br /&gt;
of the &amp;lt;tt&amp;gt;NOINPUT&amp;lt;/tt&amp;gt; sighash flag, and its uses in off-chain protocols.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copyright ==&lt;br /&gt;
&lt;br /&gt;
This document is licensed under the BSD 3 Clause license.&lt;/div&gt;</summary>
		<author><name>934</name></author>
	</entry>
</feed>