From ee7accaf5f1141755f2ce48fd21ea060aa0418cf Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Tue, 3 Jun 2025 15:42:48 -0700 Subject: [PATCH] 383: Fix output scripts and reword minimal encoding explanation Co-Authored-By: Dr. Maxim Orlovsky --- bip-0383.mediawiki | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bip-0383.mediawiki b/bip-0383.mediawiki index 522eb0cc..19b9b8e4 100644 --- a/bip-0383.mediawiki +++ b/bip-0383.mediawiki @@ -43,15 +43,14 @@ When used at the top level, there can only be at most 3 keys. When used inside of a sh() 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. -The output script produced also depends on the value of k. If k is less than or equal to 16: +The output script produced will be
-OP_k KEY_1 KEY_2 ... KEY_n OP_CHECKMULTISIG
+k KEY_1 KEY_2 ... KEY_n n OP_CHECKMULTISIG
 
-if k is greater than 16: -
-k KEY_1 KEY_2 ... KEY_n OP_CHECKMULTISIG
-
+The values k and n must be minimally encoded integers. +For values less than or equal to 16, they must be encoded using OP_0 through OP_16. +For values greater than 16, they must be a push of the signed little endian encoded value without padding. ===sortedmulti()===