Post
Topic
Board Development & Technical Discussion
Merits 4 from 2 users
Re: The dead man’s time lock
by
pooya87
on 19/03/2025, 07:31:45 UTC
⭐ Merited by ABCbits (2) ,nc50lc (2)
Example script:
Code:
     IF
        <Your Private key's Public key pair> CHECKSIGVERIFY
    ELSE
        <Your Preferred inheritance date> CHECKLOCKTIMEVERIFY DROP
    ENDIF
     <Inheritor's Public key> CHECKSIG
In this script the inheritor is always one of the signers when you want to spend those coins meaning the original owner will not be able to move their coin without the second signer.

If that's the intention it can be simplified like this using multisig (same sigop count)
Code:
IF
  2
ELSE
  <Your Preferred inheritance date> CHECKLOCKTIMEVERIFY DROP
  1
ENDIF
<Your Private key's Public key pair>
<Inheritor's Public key>
2
CHECMULTIKSIG

Or can be fixed by pulling the inheritor's pubkey into the else branch.
Code:
IF
  <Your Private key's Public key pair>
ELSE
  <Your Preferred inheritance date> CHECKLOCKTIMEVERIFY DROP
  <Inheritor's Public key>
ENDIF
CHECKSIG