{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simpleeasytransactions-com/json-schema/simpleeasytransactions-com-escrow-proposal-schema.json",
  "title": "EscrowProposal",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simpleeasytransactions-com-openapi.json#/components/schemas/EscrowProposal",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "esp_ and 32 hex characters."
    },
    "object": {
      "type": "string",
      "const": "escrow_proposal"
    },
    "kind": {
      "type": "string",
      "enum": [
        "release",
        "refund"
      ]
    },
    "milestone": {
      "type": [
        "string",
        "null"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "awaiting_signatures",
        "ready",
        "executed",
        "failed",
        "cancelled"
      ]
    },
    "amount": {
      "type": "string",
      "description": "A decimal string in USDC, never a float."
    },
    "destination": {
      "type": "string"
    },
    "destinationKind": {
      "type": "string",
      "enum": [
        "seller_wallet",
        "cash_out_address",
        "prefunding",
        "buyer_wallet"
      ]
    },
    "safeNonce": {
      "type": "integer"
    },
    "safeTxHash": {
      "type": "string",
      "description": "0x and 64 hex characters.",
      "pattern": "^0x[0-9a-fA-F]{64}$"
    },
    "signatures": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "signer": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "buyer",
              "seller",
              "arbiter"
            ]
          },
          "at": {
            "type": "string"
          }
        },
        "required": [
          "signer",
          "role",
          "at"
        ]
      }
    },
    "threshold": {
      "type": "integer"
    },
    "typedData": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "object",
          "additionalProperties": true
        },
        "types": {
          "type": "object",
          "additionalProperties": true
        },
        "primaryType": {
          "type": "string"
        },
        "message": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "required": [
        "domain",
        "types",
        "primaryType",
        "message"
      ],
      "description": "The SafeTx an owner signs with eth_signTypedData_v4."
    },
    "executedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "executedSource": {
      "type": [
        "string",
        "null"
      ],
      "description": "chain, or simulator in the sandbox."
    },
    "createdAt": {
      "type": "string"
    },
    "safe": {
      "type": "object",
      "properties": {
        "safe": {
          "type": "string"
        },
        "chainId": {
          "type": "integer"
        },
        "to": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "data": {
          "type": "string"
        },
        "operation": {
          "type": "integer"
        },
        "safeTxGas": {
          "type": "string"
        },
        "baseGas": {
          "type": "string"
        },
        "gasPrice": {
          "type": "string"
        },
        "gasToken": {
          "type": "string"
        },
        "refundReceiver": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "contractTransactionHash": {
          "type": "string",
          "description": "0x and 64 hex characters.",
          "pattern": "^0x[0-9a-fA-F]{64}$"
        }
      },
      "required": [
        "safe",
        "chainId",
        "contractTransactionHash"
      ],
      "description": "POST …/propose_release?format=safe only: the Safe Transaction Service's proposal shape."
    },
    "execution": {
      "type": [
        "object",
        "null"
      ],
      "description": "POST …/signatures only: the execTransaction call any party may broadcast once two owners signed; null until then.",
      "properties": {
        "to": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "chainId": {
          "type": "integer"
        },
        "data": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "to",
        "value",
        "chainId",
        "data"
      ]
    },
    "signedBy": {
      "type": "string",
      "enum": [
        "buyer",
        "seller",
        "arbiter"
      ],
      "description": "POST …/signatures only: the owner whose signature this request carried."
    },
    "milestones": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "POST …/propose_refund only: the milestones the refund returns."
    },
    "next": {
      "type": "string",
      "description": "What to do next, in words. On the answers that carry it."
    },
    "sandbox": {
      "type": "boolean",
      "description": "true on a test key."
    }
  },
  "required": [
    "id",
    "object",
    "kind",
    "milestone",
    "state",
    "amount",
    "destination",
    "destinationKind",
    "safeNonce",
    "safeTxHash",
    "signatures",
    "threshold",
    "typedData",
    "executedAt",
    "executedSource",
    "createdAt"
  ]
}