arkade with a contract of this kind. Asset Swaps documents that contract. It has no expiry: the user cancels it at any time.
The contract
This isnon_interactive_swap.ark from the compiler examples. makerPk is the user who funds the offer, and takerPk is whoever fills it. These are contract positions, not roles.
non_interactive_swap.ark
new SingleSig(makerPk) is the output script of a SingleSig contract for the maker’s key. Requiring it in output 0 makes sure the maker can spend what they receive.
The contract checks only those two outputs. Fund it with exactly offerAmount of the offered asset: the filler decides where any extra value goes.
The emulator runs swap and cancel before it cosigns, together with the operator. Arkade Compiler explains how covenants become paths.