1

I am thinking about how to secure your Bitcoin savings.

One idea I had was to create sort of a "backup" address B for an address A which stores the bitcoins. So what I want to achieve is that you are able to spend your bitcoins with the private key of A at any time. But in case you lose access to the private key of A you are also able to spend the bitcoins with the private key of B but only after a certain amount of time (i.e. blocks) has passed.

Would something like that be possible with the Bitcoin scripting language? And if so, how would one achieve this?

Thanks in advance.

1

Certainly. You can do this with OP_CHECKSEQUENCEVERIFY which allows for relative timelocks.

The basic structure would look something like this:

IF
    <pubkey A>
ELSE
    "30d" CHECKSEQUENCEVERIFY DROP
    <pubkey B>
ENDIF
CHECKSIG

Read BIP 112 for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.