Skip to main content
You’re viewing an old version of the Arkade contracts documentation. Go to Your first contract for the current version.
This escrow holds a buyer’s payment until the buyer and seller agree, an arbiter decides, or a refund time passes. The code uses arkProvider, indexerProvider, serverPubkey, exitTimelock, serverUnrollScript, and hex from Set Up Your Project. The exit path is the only path without the operator’s key. Without it, every path needs the operator’s signature.

Build the escrow

The buyer funds the escrow by sending to this address from any Arkade wallet.

Release the funds

signAndSubmitOffchainTx builds the spend, collects the signatures, and submits it to the operator. The release path needs the buyer’s and the seller’s signatures, so the identity signs with both.
The outputs must add up to the input value. To use another path, pass it to findLeaf and sign with its keys.