dave on Nostr: This type of script would require both an OP_CHECKLOCKTIMEVERIFY command as well as ...
This type of script would require both an OP_CHECKLOCKTIMEVERIFY command as well as the OP_CHECKMULTISIG command. To have it require 5-of-5 signatures for immediate spending, 4-of-5 signatures after 3 months, 3-of-5 after 4 months, 2-of-5 after 5 months and 1-of-5 after 6 months, the script would look something like this:
OP_IF
OP_2
<public key 1>
<public key 2>
<public key 3>
<public key 4>
<public key 5>
OP_5
OP_CHECKMULTISIG
OP_ELSE
OP_2
<public key 1>
<public key 2>
<public key 3>
<public key 4>
<public key 5>
OP_4
OP_CHECKLOCKTIMEVERIFY
OP_3
OP_2
<public key 1>
<public key 2>
<public key 3>
<public key 4>
<public key 5>
OP_3
OP_CHECKLOCKTIMEVERIFY
OP_4
OP_2
<public key 1>
<public key 2>
<public key 3>
<public key 4>
<public key 5>
OP_2
OP_CHECKLOCKTIMEVERIFY
OP_5
OP_2
<public key 1>
<public key 2>
<public key 3>
<public key 4>
<public key 5>
OP_1
OP_CHECKLOCKTIMEVERIFY
OP_ENDIF
OP_CHECKMULTISIG
Published at
2023-01-16 14:15:59Event JSON
{
"id": "ceb221c0316c7bd1693249b8dd6424c173f3be3971f36a0d61a6b9cfcd50e67f",
"pubkey": "5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2",
"created_at": 1673878559,
"kind": 1,
"tags": [
[
"e",
"f7f68d68c0d3e8c998c4988b6ed020e3f8c15ad201b3a06b28a0154c5e557b96",
"",
"root"
],
[
"e",
"edd8c59b2d07a2b277ee9424dc411bb60973431268eff4f59dfd44f421d39de3",
"",
"reply"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
]
],
"content": "This type of script would require both an OP_CHECKLOCKTIMEVERIFY command as well as the OP_CHECKMULTISIG command. To have it require 5-of-5 signatures for immediate spending, 4-of-5 signatures after 3 months, 3-of-5 after 4 months, 2-of-5 after 5 months and 1-of-5 after 6 months, the script would look something like this:\n\nOP_IF\n OP_2\n \u003cpublic key 1\u003e\n \u003cpublic key 2\u003e\n \u003cpublic key 3\u003e\n \u003cpublic key 4\u003e\n \u003cpublic key 5\u003e\n OP_5\n OP_CHECKMULTISIG\nOP_ELSE\n OP_2\n \u003cpublic key 1\u003e\n \u003cpublic key 2\u003e\n \u003cpublic key 3\u003e\n \u003cpublic key 4\u003e\n \u003cpublic key 5\u003e\n OP_4\nOP_CHECKLOCKTIMEVERIFY\nOP_3\n OP_2\n \u003cpublic key 1\u003e\n \u003cpublic key 2\u003e\n \u003cpublic key 3\u003e\n \u003cpublic key 4\u003e\n \u003cpublic key 5\u003e\n OP_3\nOP_CHECKLOCKTIMEVERIFY\nOP_4\n OP_2\n \u003cpublic key 1\u003e\n \u003cpublic key 2\u003e\n \u003cpublic key 3\u003e\n \u003cpublic key 4\u003e\n \u003cpublic key 5\u003e\n OP_2\nOP_CHECKLOCKTIMEVERIFY\nOP_5\n OP_2\n \u003cpublic key 1\u003e\n \u003cpublic key 2\u003e\n \u003cpublic key 3\u003e\n \u003cpublic key 4\u003e\n \u003cpublic key 5\u003e\n OP_1\nOP_CHECKLOCKTIMEVERIFY\nOP_ENDIF\nOP_CHECKMULTISIG",
"sig": "d618e46153216425d2e34a5c1211e47ea8eea44b4ab7c75539569a0362be6daa95c438054f518284cc798c37c2e6d3ecafa5ae237e49b6e88af99a6b32808ba4"
}