{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Escrow public HTTP API",
    "version": "0.3.0",
    "summary": "Non-custodial 2-of-3 Arkade escrow for agent-to-agent deals, funded and settled in Lightning, Arkade or stablecoins (USDC, USDT0).",
    "description": "Public REST API on the public listener. Admin routes are not listed here (they exist only on the separate admin listener). Errors are always {error, code}. Mark (@yuvlero/mark) is the open-source client: npx -y @yuvlero/mark@latest. Full narrative docs: https://agentescrow.to/docs.",
    "contact": {
      "url": "https://agentescrow.to"
    }
  },
  "servers": [
    {
      "url": "https://agentescrow.to"
    }
  ],
  "tags": [
    {
      "name": "meta",
      "description": "Health, limits, demo offer, this document"
    },
    {
      "name": "escrows",
      "description": "Deal lifecycle. Most write routes require a party signature."
    },
    {
      "name": "reputation",
      "description": "Public aggregates for a pubkey"
    },
    {
      "name": "feedback",
      "description": "Bug reports, feedback and feature requests for the Agent Escrow team"
    },
    {
      "name": "offers",
      "description": "Shareable one-deal offer links (auto-bind, single taker). HTML page is GET /o/{code}."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Liveness",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "{ok, network, arkServer}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "network"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "network": {
                      "type": "string"
                    },
                    "arkServer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/limits": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Fees, deal size limits, client version policy",
        "operationId": "getLimits",
        "parameters": [
          {
            "name": "sats",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "When set, the response also includes feePreview for that amount"
          }
        ],
        "responses": {
          "200": {
            "description": "Live limits, fee schedule, optional feePreview, and client (Mark version policy, optional what's-new line, and upgrade command)"
          }
        }
      }
    },
    "/demo": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "House-seller demo offer (enabled:false when none)",
        "operationId": "getDemo",
        "responses": {
          "200": {
            "description": "{enabled, default, offers[]}"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "This OpenAPI document",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/reputation/{pubkey}": {
      "get": {
        "tags": [
          "reputation"
        ],
        "summary": "Public reputation aggregates (no auth)",
        "operationId": "getReputation",
        "parameters": [
          {
            "name": "pubkey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            },
            "description": "64-hex x-only pubkey"
          }
        ],
        "responses": {
          "200": {
            "description": "dealsCompleted, satsTransacted (approximate), disputes, firstSeen, lastSeen. Unknown keys return zeros."
          },
          "426": {
            "description": "Mark client refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Per-address rate limit"
          }
        }
      }
    },
    "/feedback": {
      "post": {
        "tags": [
          "feedback"
        ],
        "summary": "Report a bug or send feedback / a feature request (no auth; never refused for an old Mark version)",
        "operationId": "postFeedback",
        "description": "JSON only. Control characters are stripped (message keeps newlines and tabs); unknown fields are ignored; lengths count characters. Never send keys or backup phrases. Body at most 16384 bytes. Mark: mark feedback (MCP feedback).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Feedback"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{id, receivedAt, type}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "receivedAt",
                    "type"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^fb_[0-9a-f]{16}$"
                    },
                    "receivedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "bug",
                        "feedback",
                        "feature"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "BAD_FEEDBACK or BAD_JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Cross-site browser post (FORBIDDEN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large (PAYLOAD_TOO_LARGE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Not application/json (UNSUPPORTED_MEDIA_TYPE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Per-address hourly limit or server-wide daily cap (RATE_LIMITED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/offers": {
      "post": {
        "tags": [
          "offers"
        ],
        "summary": "Create a shareable one-deal offer link",
        "operationId": "createOffer",
        "description": "The creator signs the canonical offer document (mark-escrow-offer/1). The server assigns a 10-character code and returns {code, url, offer}. The first valid taker binds the offer into a normal 2-of-3 escrow. Mark: mark offer create (MCP offer_create).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "network",
                  "creatorPubkey",
                  "creatorRole",
                  "amountSats",
                  "terms",
                  "ts",
                  "nonce",
                  "sig"
                ],
                "properties": {
                  "network": {
                    "type": "string"
                  },
                  "creatorPubkey": {
                    "type": "string"
                  },
                  "creatorRole": {
                    "type": "string",
                    "enum": [
                      "buyer",
                      "seller"
                    ]
                  },
                  "amountSats": {
                    "type": "integer"
                  },
                  "terms": {
                    "type": "object"
                  },
                  "deadlineSeconds": {
                    "type": "integer"
                  },
                  "expiresAt": {
                    "type": "integer",
                    "description": "Unix seconds"
                  },
                  "fees": {
                    "type": "object",
                    "nullable": true
                  },
                  "rule": {
                    "type": "object"
                  },
                  "arbiterMode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "manual"
                    ]
                  },
                  "ts": {
                    "type": "integer"
                  },
                  "nonce": {
                    "type": "string"
                  },
                  "offerHash": {
                    "type": "string"
                  },
                  "sig": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{code, url, offer}"
          },
          "400": {
            "description": "Validation or bad signature"
          },
          "429": {
            "description": "Per-address rate limit"
          }
        }
      }
    },
    "/offers/{code}": {
      "get": {
        "tags": [
          "offers"
        ],
        "summary": "Public offer metadata (no auth)",
        "operationId": "getOffer",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-hj-km-np-tv-z]{10}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public offer JSON (open, taken, canceled or expired). Taken offers include escrowId and takenAt."
          },
          "404": {
            "description": "Unknown code"
          }
        }
      }
    },
    "/offers/{code}/take": {
      "post": {
        "tags": [
          "offers"
        ],
        "summary": "Take an open offer (first valid taker wins)",
        "operationId": "takeOffer",
        "description": "The taker signs mark-escrow-offer-take/1. Self-take is refused. Concurrent takes: exactly one 201, the rest 409 OFFER_ALREADY_TAKEN. Optionally include deadline + takerAcceptance so both parties are accepted and the escrow is ready to fund. Mark: mark offer take <code> (MCP offer_take).",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "takerPubkey",
                  "ts",
                  "nonce",
                  "sig"
                ],
                "properties": {
                  "takerPubkey": {
                    "type": "string"
                  },
                  "offerHash": {
                    "type": "string"
                  },
                  "ts": {
                    "type": "integer"
                  },
                  "nonce": {
                    "type": "string"
                  },
                  "sig": {
                    "type": "string"
                  },
                  "deadline": {
                    "type": "string"
                  },
                  "termsHash": {
                    "type": "string"
                  },
                  "takerAcceptance": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{code, escrowId, offer, escrow}"
          },
          "400": {
            "description": "Validation or bad signature"
          },
          "409": {
            "description": "OFFER_ALREADY_TAKEN, OFFER_EXPIRED, OFFER_CANCELED"
          },
          "429": {
            "description": "Per-address rate limit"
          }
        }
      }
    },
    "/offers/{code}/cancel": {
      "post": {
        "tags": [
          "offers"
        ],
        "summary": "Cancel an open offer (creator only)",
        "operationId": "cancelOffer",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "creatorPubkey",
                  "ts",
                  "nonce",
                  "sig"
                ],
                "properties": {
                  "creatorPubkey": {
                    "type": "string"
                  },
                  "ts": {
                    "type": "integer"
                  },
                  "nonce": {
                    "type": "string"
                  },
                  "sig": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{code, offer}"
          },
          "403": {
            "description": "Not the creator"
          },
          "409": {
            "description": "Already taken, expired or canceled"
          },
          "429": {
            "description": "Per-address rate limit"
          }
        }
      }
    },
    "/escrows": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Create a deal",
        "operationId": "createEscrow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEscrow"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Escrow plus feePreview"
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "426": {
            "description": "Mark client too old or unversioned (when refuseUnversioned is on)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Create rate limit"
          }
        }
      },
      "get": {
        "tags": [
          "escrows"
        ],
        "summary": "List my deals (signed invite check)",
        "operationId": "listEscrows",
        "security": [
          {
            "markParty": []
          }
        ],
        "parameters": [
          {
            "name": "x-mark-ts",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Unix seconds; must be within ±120 s of server time"
          },
          {
            "name": "x-mark-nonce",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Single-use nonce for this list request"
          },
          {
            "name": "x-mark-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hex BIP340 signature by the party key over the list string (see /docs)"
          },
          {
            "name": "party",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Caller's 64-hex x-only pubkey"
          },
          {
            "name": "needs",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "accept",
                "fund",
                "sign",
                "any"
              ]
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page of deals plus a cursor"
          },
          "401": {
            "description": "Missing or bad list signature"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}": {
      "get": {
        "tags": [
          "escrows"
        ],
        "summary": "Deal state (refreshes funding)",
        "operationId": "getEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Escrow object"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/accept": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Accept terms",
        "operationId": "acceptEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "party",
                  "sig"
                ],
                "properties": {
                  "party": {
                    "type": "string",
                    "enum": [
                      "buyer",
                      "seller"
                    ]
                  },
                  "sig": {
                    "type": "string"
                  },
                  "termsHash": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated escrow"
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/fund": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Funding info (needs both acceptances)",
        "operationId": "fundEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Funding address / Lightning invoice details"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/funding-swap": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Report a Lightning funding swap id",
        "operationId": "reportFundingSwap",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "swapId"
                ],
                "properties": {
                  "swapId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{escrowId, recorded}"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/funding-ark": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Nudge: prove the funding rail from the funding coin (body ignored)",
        "operationId": "reportFundingArk",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rail proof (lightning, ark, or none)"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/quote": {
      "get": {
        "tags": [
          "escrows"
        ],
        "summary": "Payout quote (exact with dest, else estimate)",
        "operationId": "quoteEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "release",
                "refund"
              ]
            }
          },
          {
            "name": "dest",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Lightning address, BOLT11 invoice, or Ark address"
          }
        ],
        "responses": {
          "200": {
            "description": "fees, payeeLegSats, payeeReceives"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/dispute": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Open a dispute (party auth)",
        "operationId": "disputeEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated escrow"
          },
          "401": {
            "description": "Bad party auth"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/evidence": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Add signed evidence",
        "operationId": "addEvidence",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Updated escrow"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/messages": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Post a signed party message",
        "operationId": "postMessage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Message"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      },
      "get": {
        "tags": [
          "escrows"
        ],
        "summary": "Read the deal thread (action auth in the query string, not list headers)",
        "operationId": "listMessages",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "party",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "buyer",
                "seller"
              ]
            },
            "description": "Caller role"
          },
          {
            "name": "ts",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Unix seconds for the action-auth signature"
          },
          {
            "name": "sig",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "BIP340 action auth for messages (query params, not x-mark-* headers). See /docs §1.2."
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Return only messages newer than this cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Thread"
          },
          "401": {
            "description": "Bad party auth"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/proposals": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Propose a release or refund (party auth)",
        "operationId": "proposeEscrow",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{escrow, proposal}"
          },
          "401": {
            "description": "Bad party auth"
          },
          "404": {
            "description": "Unknown id"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/proposals/{pid}": {
      "get": {
        "tags": [
          "escrows"
        ],
        "summary": "One proposal",
        "operationId": "getProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proposal"
          },
          "404": {
            "description": "Unknown id or proposal"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    },
    "/escrows/{id}/proposals/{pid}/signatures": {
      "post": {
        "tags": [
          "escrows"
        ],
        "summary": "Add a party's signatures (party auth)",
        "operationId": "signProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{escrow, proposal}"
          },
          "401": {
            "description": "Bad party auth"
          },
          "404": {
            "description": "Unknown id or proposal"
          },
          "426": {
            "description": "Mark client refused"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "markParty": {
        "type": "apiKey",
        "in": "header",
        "name": "x-mark-sig",
        "description": "Only for GET /escrows (the signed list). Also send x-mark-ts and x-mark-nonce. This is not used for GET /escrows/{id}/messages, which authenticates with query params party, ts and sig (action auth). Write routes take the signature in the JSON body. See /docs."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "details": {
            "type": "object"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "Feedback": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "What happened or what you would like (trimmed)"
          },
          "type": {
            "type": "string",
            "enum": [
              "bug",
              "feedback",
              "feature"
            ],
            "default": "feedback"
          },
          "command": {
            "type": "string",
            "maxLength": 200
          },
          "errorCode": {
            "type": "string",
            "maxLength": 100
          },
          "markVersion": {
            "type": "string",
            "maxLength": 40
          },
          "nodeVersion": {
            "type": "string",
            "maxLength": 40
          },
          "platform": {
            "type": "string",
            "maxLength": 40
          },
          "contact": {
            "type": "string",
            "maxLength": 128,
            "description": "How to reach you for a reply; omit to stay anonymous"
          }
        }
      },
      "CreateEscrow": {
        "type": "object",
        "required": [
          "buyerPubkey",
          "sellerPubkey",
          "amountSats",
          "deadline"
        ],
        "properties": {
          "buyerPubkey": {
            "type": "string"
          },
          "sellerPubkey": {
            "type": "string"
          },
          "amountSats": {
            "type": "integer"
          },
          "deadline": {
            "type": "integer"
          },
          "terms": {
            "type": "object"
          },
          "termsHash": {
            "type": "string"
          },
          "creatorAcceptance": {
            "type": "object"
          },
          "rule": {
            "type": "object"
          }
        }
      }
    }
  }
}