1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-06-30 12:42:43 +00:00

383: Fix output scripts and reword minimal encoding explanation

Co-Authored-By: Dr. Maxim Orlovsky <orlovsky@lnp-bp.org>
This commit is contained in:
Ava Chow 2025-06-03 15:42:48 -07:00
parent 7d8b390c78
commit ee7accaf5f

View File

@ -43,15 +43,14 @@ When used at the top level, there can only be at most 3 keys.
When used inside of a <tt>sh()</tt> expression, there can only be most 15 compressed public keys (this is limited by the P2SH script limit). When used inside of a <tt>sh()</tt> expression, there can only be most 15 compressed public keys (this is limited by the P2SH script limit).
Otherwise the maximum number of keys is 20. Otherwise the maximum number of keys is 20.
The output script produced also depends on the value of <tt>k</tt>. If <tt>k</tt> is less than or equal to 16: The output script produced will be
<pre> <pre>
OP_k KEY_1 KEY_2 ... KEY_n OP_CHECKMULTISIG k KEY_1 KEY_2 ... KEY_n n OP_CHECKMULTISIG
</pre> </pre>
if <tt>k</tt> is greater than 16: The values <tt>k</tt> and <tt>n</tt> must be minimally encoded integers.
<pre> For values less than or equal to 16, they must be encoded using <tt>OP_0</tt> through <tt>OP_16</tt>.
k KEY_1 KEY_2 ... KEY_n OP_CHECKMULTISIG For values greater than 16, they must be a push of the signed little endian encoded value without padding.
</pre>
===<tt>sortedmulti()</tt>=== ===<tt>sortedmulti()</tt>===