Skip to content

Instantly share code, notes, and snippets.

@AdamISZ
Last active January 21, 2025 17:56
Show Gist options
  • Save AdamISZ/c0592f92206640c9333902c53b730b12 to your computer and use it in GitHub Desktop.
Save AdamISZ/c0592f92206640c9333902c53b730b12 to your computer and use it in GitHub Desktop.
Instructions for HOLDER

We are working in pairs. One person is HOLDER. One person is RECEIVER.

Instructions for HOLDER

You are going to die soon!! Hurry!

  1. Download Electrum from https://electrum.org .
  2. Run Electrum using ./electrum-4.5.8-x86_64.AppImage --signet on Linux or /Applications/Electrum.app/Contents/MacOS/run_electrum --signet on Mac. On Windows do the same; run the executable FROM THE COMMAND LINE: C:\Program Files (x86)\Electrum> electrum-4.5.8.exe --signet.
  3. Go to File-> New/Restore, leave default (standard) wallet and enter a file name. Enter the 12 word seed phrase ("I already have a seed"), choose BIP39 in Options, and recover the wallet. It should contain a bit less than 10M sats.
  4. Now you'll create a transaction that spends the first 3 of the 4 utxos. Follow this process:

Process for constructing a timelocked transaction:

a. Enable the "Coins" tab from the Menu (View -> Coins).

b. In the Coins tab, (right click) "add to coin control" each coin you want to spend.

c. Go to the Send tab. Enter the destination address that the RECEIVER gave you. Click "Max" (should add up to all coins you selected minus a fee - check!)

d. then click Pay (NOT "Save").

e. Change the fee target to "Static" and choose at least 30 sats/vb. We don't want be delayed here!

f. MOST IMPORTANT PART! Click tool icon in top right, then select "Edit locktime".

g. Enter the block height as instructed (3 blocks after "now"). Find the current blockheight on mempool.space.

h. Click "Preview". Then "Sign". Then "Share" - "copy to clipboard". Should get something like this:

02000000000103b96f96d13fe2a476d4fef86fb8b22cb2feb8b5c5a151e4d0b62fcc691978d8570200000000fdffffffb96f96d13fe2a476d4fef86fb8b22cb2feb8b5c5a151e4d0b62fcc691978d8570300000000fdffffffb96f96d13fe2a476d4fef86fb8b22cb2feb8b5c5a151e4d0b62fcc691978d8570400000000fdffffff01a0b60600000000001600146d7f971d3358c3beaafb0cf6fb9c98ee89f58bfc02473044022000c49a01c5cefbc6fce10b2d602441673515b5be0341b015fe96213b22284a7802200290811d5f20668070313946a4aea96d74bb0aa69b33d5d0899221f22a9fe93f012102e1cfb074ac6610ce074d367426ee5144224070edb348de6cd00bd08455551067024730440220436f1335840e0d3ad172a540ce242b2a458ec06ad364085cdbcf7dda70d0249202201004473ec864e849665ce5d1800723f8a940cbdf63bb163d1a3ae3b811baa2060121027416bf286577d520f214044f228f37f115dec0a1f5bf1a8a73b6e497dcd0ff220247304402203b24a8d198bbdc5e61c53b6b9aeb53c083499ea46ec706b5695a0717c52fb3ca0220293dfe349686f3188ac898b9c3b44f94aa43615c0610e26ed17eb9c8b0c443df012102db1b874baf0e9d469440d760a0d1edb5034ea901ecbe9f8773527f50bc9df6fca2840300

i. If you have a signet node running you can do bitcoin-cli -signet testmempoolaccept \[\"hex\"\] and you should get "non-final":

  {
    "txid": "94b11506e5b74a8f7be84d0e76aa27ff4dd0a3eadb8d773f39a252723eff60fd",
    "wtxid": "2ba9bf6142fa338714671e5fc0355dbc4df5d4cc40a56b4eccb02b3735f5b3ff",
    "allowed": false,
    "reject-reason": "non-final"
  }
]

Otherwise, go to https://mempool.space/signet/pushtx and enter the same hex into the box. You should get the same error message, in red, after clicking "Broadcast Transaction":

Failed to broadcast transaction, reason: non-final

If you get ANY other error message, something has gone wrong. If you don't get an error, then oops, you sent the money!

j. Assuming nothing is wrong, send the transaction hex (02000000000103b96f96d13fe2a...) to the RECEIVER to do the final steps. You are done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment