{
  "$defs": {
    "BondAmount": {
      "description": "Exact, non-negative decimal amount used by every bond money field.\n\nThe wire form is always a JSON string in canonical plain-decimal notation.\nValues are constrained to PostgreSQL `NUMERIC(38,18)`: at most 20 integer\ndigits and 18 fractional digits, with no sign or exponent. This keeps\nsignature bytes, threshold checks, and database values identical.",
      "pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{1,18})?$",
      "type": "string"
    },
    "BondStatus": {
      "description": "Status of a publisher bond.\nPer MARS Specification Appendix A (bondReference schema).",
      "oneOf": [
        {
          "const": "active",
          "description": "Bond is active and fully collateralized.",
          "type": "string"
        },
        {
          "const": "partially_slashed",
          "description": "Bond has been partially slashed but still covers minimum.",
          "type": "string"
        },
        {
          "const": "fully_slashed",
          "description": "Bond has been fully slashed — entry should be revoked.",
          "type": "string"
        },
        {
          "const": "released",
          "description": "Bond has been released back to the publisher.",
          "type": "string"
        }
      ]
    }
  },
  "$id": "urn:mars:schema:v1:bond-reference",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "A reference to a bond stored in a MARS entry.\nPer MARS Specification Section 7.2.",
  "properties": {
    "amount": {
      "$ref": "#/$defs/BondAmount",
      "description": "Amount staked in MINTS."
    },
    "bondId": {
      "description": "Unique bond identifier.",
      "type": "string"
    },
    "currency": {
      "description": "Currency — always \"MINTS\".",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/BondStatus",
      "description": "Current bond status."
    }
  },
  "required": [
    "bondId",
    "amount",
    "currency",
    "status"
  ],
  "title": "BondReference",
  "type": "object"
}
