OrdLock listing

OrdLock

An object offered for sale. The lock itself is the offer: it names the price and who gets paid.

What it is

OrdLock is a contract that holds an object until someone pays for it. The seller writes the payment they want, as a whole output, into the lock. Any buyer can open it by building a transaction that includes that exact output, so the seller is paid in the same transaction that hands over the object, or neither happens. The seller can also cancel with a signature.

Script pattern

  1. <contract prefix> Fixed contract code that checks the spending transaction.
  2. <seller pubkey hash> 20 bytes: who can cancel.
  3. <payout output> The output a buyer must create: the price in sats and the seller's lock.
  4. <contract suffix> More fixed contract code.

The contract code is the same in every listing; only the seller and the payout change.

How it is spent

Either the seller cancels with a signature, or anyone buys by paying the price the lock names.

Background

OrdLock came with the 1Sat Ordinals marketplace in 2023, so listings could live on chain rather than in a market's database. It ships in the @1sat/templates package that wallets use to build and read listings.

On chain

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

Specification