~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
43 lines · 2.6 KB Raw History
{
  "lexicon": 1,
  "id": "com.publicdomainrelay.temp.market.submitAccept",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "A requester submits its accept of a bid to the bidder, which records a provisioning intent and answers 202 at once. The receipt follows later as a market.receipt record in the bidder's repo, which the requester reads by one getRecord. Requires a service-auth JWT with lxm set to this NSID; the requester is the token issuer.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["acceptUri", "acceptCid"],
          "properties": {
            "acceptUri": { "type": "string", "format": "at-uri", "description": "The market.accept record." },
            "acceptCid": { "type": "string", "format": "cid", "description": "The CID of the market.accept record." },
            "ingress": { "type": "array", "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, "description": "The requester's com.publicdomainrelay.temp.ingress.webRTC listen records for this call; the bidder reads the field and does not act on it today." }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["ok", "id", "acceptUri", "acceptCid"],
          "properties": {
            "ok": { "type": "boolean", "description": "Always true on the 202 answer." },
            "id": { "type": "string", "description": "The name of the provisioning intent the bidder recorded for this accept." },
            "acceptUri": { "type": "string", "format": "at-uri", "description": "The accept of the request, echoed." },
            "acceptCid": { "type": "string", "format": "cid", "description": "The accept CID of the request, echoed." }
          }
        }
      },
      "errors": [
        { "name": "InvalidRequest", "description": "400: the body is not JSON, or acceptUri or acceptCid is missing." },
        { "name": "Unauthorized", "description": "401: the service-auth token is missing or not valid for this method." },
        { "name": "Forbidden", "description": "403: the token's issuer may not submit this accept." },
        { "name": "CapacityExceeded", "description": "409: taking the accept would overcommit the bidder's host; the requester excludes this bidder and accepts the next bid." },
        { "name": "InternalError", "description": "500: the provisioning intent could not be recorded." },
        { "name": "Unavailable", "description": "503: the bidder is starting and cannot authorize or take accepts yet." }
      ]
    }
  }
}