Skip to main content

Transfer of Funds with Expiration

The first new Unlock Condition we are going to look at is the Expiration Unlock Condition. It lets the creator of the output define an Expiration Deadline. Before the deadline, the recipient can consume and unlock the output in a transaction, but once the deadline expired, only the Return Address defined in the Expiration Unlock Condition can unlock it.

Example Transactions

Send Funds with Expiration

Transaction B defines an output that can only be unlocked by the recipient in a transaction that is confirmed by a milestone where Milestone Unix Timestamp is less, than the Unix Time defined in the Expiration Unlock Condition.

Transaction B - Sending funds with expiration

Claim Non-Expired Funds

Transaction C shows how the recipient can consume the output before the deadline and take the funds into full, unconditional custody.

Transaction C - Recipient claims non-expired funds

Claim Expired Funds

Transaction D depicts how the original sender claims an expired output. Note, that it is not necessary for the sender to sweep the funds into their own wallet, they can just treat it as funds they have full custody of.

Transaction D - Original sender claims expired funds