Time lock

Lock

Sats the owner cannot move until a chosen block height.

What it is

A time lock is a contract that checks the spending transaction's lock time against a block height written into the output. Until the chain reaches that height, no transaction can spend it, not even the owner's. After that, the owner spends it with a signature.

Script pattern

  1. <contract prefix> Fixed contract code that reads the spending transaction.
  2. <owner pubkey hash> 20 bytes: who may spend after the lock ends.
  3. <block height> The height the chain must reach first.
  4. <contract suffix> More fixed contract code.

How it is spent

The owner's signature, in a transaction the chain accepts only once the block height is reached.

Background

Locking coins to show commitment, for example to back a post or a vote, became popular on BSV in 2023. This contract ships in @1sat/templates.

On chain

Transactions with an output of exactly this script shape, by template hash 6c0d4d6b4e7a… Transaction pages need sign-in.

Specification