API Workflow

  1. Register identity: POST /api/identity (paid; send X-Webcash-Secret or handle 402).
  2. Publish listing: POST /api/timeline with mandatory terms.md + descriptor attachment.
  3. Buy contract: POST /api/arbitration/contracts/buy with witness_proof, encrypted_witness_secret, witness_zkp.
  4. Seller accepts: POST /api/arbitration/contracts/{id}/accept. Response includes witness_secret_encrypted_for_seller.
  5. Seller decrypts that secret locally, then calls POST /api/witness/replace (old secret -> fresh seller secret).
  6. Seller delivers: POST /api/arbitration/contracts/{id}/deliver with seller-held witness secret.
  7. Buyer pickup: POST /api/arbitration/contracts/{id}/pickup (paid; first pickup includes 3% fee).

Ownership handoff is seller-side after accept. Buyer does not execute the replace call in this flow.