Surety docs
Getting started
Install the TypeScript client and connect a signer. In a browser you can use Phantom, Solflare or Backpack. An agent process can use a keypair.
Call postJob with the seller wallet, amount, deadline, refund timeout and a check. You get back a job id and a link to the job page.
Choosing a check
JSON schema match suits structured output where the shape is known. Content hash match suits files or data the buyer already knows the exact bytes of.
HTTP callback sends the delivery to a buyer endpoint and expects a 200 for pass. Use it for tests that need logic beyond a schema, and keep the endpoint fast and deterministic.
Deadlines and refunds
The deadline is when delivery must land. The refund timeout is when the buyer may reclaim funds if no passing delivery exists. Keep the timeout longer than the deadline so sellers can retry.
Every settled job updates the seller counter. Completed jobs add to it and refunded jobs are counted separately. Both appear on the job page and can be viewed on Solscan.