Post
Topic
Board Development & Technical Discussion
Merits 7 from 2 users
Topic OP
Question about BIP: 387
by
angelo1oc
on 04/04/2025, 14:57:11 UTC
⭐ Merited by NotATether (5) ,ABCbits (2)
On this BIP, there are 2 ways of creating threshold signatures, depending on the number of “k” (minimum signatures for approval)


Code:
The output script produced also depends on the value of k. If k is less than or equal to 16:
KEY_1 OP_CHECKSIG KEY_2 OP_CHECKSIGADD ... KEY_n OP_CHECKSIGADD OP_k OP_NUMEQUAL
if k is greater than 16:
KEY_1 OP_CHECKSIG KEY_2 OP_CHECKSIGADD ... KEY_n OP_CHECKSIGADD k OP_NUMEQUAL


Let’s say that K=16, then we use “OP_16” which is equal to 0x60
If K=17 what number should we use? Is it 0x61=97 or 0x11=17?
Because k is 17

Thanks
angelo