If you bought some bitcoins a few years ago you likely made a small fortune by now just by HODLing it.
It's time to answer the question of how to pass this legacy to your heirs in a case of your sudden death.
They won't be able to access your wallet unless you compromise your security and give them your wallet password or backup in advance.
However, there's an easy way for them to access your fortune without putting your bitcoins at risk while you're still around.
The Bitcoin protocol supports a so-called nLocktime, which is a feature that lets you sign a transaction that can only be spent in the future on a certain block height.
Since the block time is around 10 minutes most of the time, it's easy to approximate what the block height will be N years from now.
For the purpose of this tutorial, I will use Electrum as my wallet, but you can use any wallet that lets you save and load transactions in a raw form.
In that case, the only exception is that you will sign a transaction directly with Trezor, not with a password in Electrum wallet.
#1 Create nLocktime transaction
Go to Send tab of Electrum wallet and paste in an address that your relatives have access to and an amount you want to pass on to them.
Select Replaceable so you could bump the fee if needed and click Preview.
A window with transaction details will pop up. Make sure the address and the amount are right.
Click Copy and close the window.
You can decode the transaction to check if it's correct.
Go to Freedom Node's nLocktime transaction editor that lets you create transactions with future "payment date" and paste the copied transaction to the Raw transactionfield.
Take a note of the current block height and use the formula below to calculate your desired future block height.
(<# of blocks per year> x <number of years>) + <current block height>
Let's say the current block height is 488253.
If you want your coins to be spendable in 5 years, the formula would be:
(52560 x 5) + 488253
which gives you a new future block height of 751053.
Type in the new block height to the editor and click Calculate.
The calculator modifies last 4 bytes of the raw transaction that represents the nLocktime parameter.
Copy the new hexadecimal string, go back to Electrum and open
Tools -> Load transaction -> From text and paste it in.
The transaction detail will pop up again but this time with the LockTime parameter.
Check that everything is ok, click Sign and Save the signed transaction to a file.
You can now give this file (on a USB) to your relatives (they won't be able to spend your coins yet).
#2 Spend nLocktime transaction
When the block height reaches the height of 751053, anyone in the possession of the signed transaction will now be able to spend your coins.
To spend these outputs, open Electrum and go to
Tools -> Load transaction -> From file.
Since the transaction is already signed you can just click Broadcast and wait until miners include it in a block.
If the transaction fee is too low by the time your relatives are trying to get access to the coins (which may very well happen), you can "speed up" the transaction by using this paid service.
#3 I'm not dead yet
If you're still alive (and I hope you are) by the time your chosen future block height approaches, you can "cancel" the transaction by spending the coins before anyone else.
Load your signed transaction in your Electrum wallet (please refer to the previous section) and check the Inputs field in the transaction detail window.
These are your unspent outputs that need to be spent before your heirs do.
Close the transaction detail window and enable Coins tab by clicking
View -> Show Coins.
Go to the tab and find the Address (unspent output) that corresponds to the transaction input from the previous step.
Click the unspent output (hold the Ctrl or Cmd key to select more outputs) and then right click on it and select Spend.
You will be taken to the Send tab where the selected outputs become inputs of a new transaction.
Copy and paste one of your receiving addresses (you can get it at Receive tab) to Pay tofield and click Max.
When ready, click Send, sign the transaction with your password (if set) and wait until it gets confirmed on the network.
Your relatives will now lose the ability to spend your bitcoins unless you repeat steps 1 & 2 again.
Also, let us know what you think in the comments section below.