{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://gryd.world/protocol/schemas/place.json",
  "title": "Locus place payload (v3)",
  "description": "OP_RETURN payload for op=place. Canonical JSON (sorted keys, no whitespace). See SPEC.md §7.1. Unknown fields are allowed and must be preserved by indexers (SPEC.md §11).",
  "type": "object",
  "required": ["p", "v", "op", "lat", "lng", "owner", "owner_pubkey"],
  "properties": {
    "p": { "const": "locus" },
    "v": { "enum": [2, 3] },
    "op": { "const": "place" },
    "lat": { "$ref": "common.json#/$defs/lat" },
    "lng": { "$ref": "common.json#/$defs/lng" },
    "geohash": { "$ref": "common.json#/$defs/geohash" },
    "geo_ipv6": { "$ref": "common.json#/$defs/geoIPv6" },
    "city_prefix": { "$ref": "common.json#/$defs/cityPrefix" },
    "address_prefix": { "$ref": "common.json#/$defs/addressPrefix" },
    "type": { "$ref": "common.json#/$defs/pinType", "default": "presence" },
    "subtype": { "type": "string" },
    "content_uri": { "type": "string" },
    "content": {},
    "behavior": {},
    "inscription_txid": { "$ref": "common.json#/$defs/txid" },
    "is_ordinal": { "type": "boolean" },
    "ordinal_outpoint": { "type": "string", "pattern": "^[0-9a-f]{64}\\.[0-9]+$" },
    "proof": { "$ref": "common.json#/$defs/presenceProof" },
    "owner": { "$ref": "common.json#/$defs/bsvAddress" },
    "owner_pubkey": { "$ref": "common.json#/$defs/pubkey" },
    "nonce": { "$ref": "common.json#/$defs/nonce" },
    "ts": { "$ref": "common.json#/$defs/ts" },
    "metadata": { "type": "object" }
  },
  "additionalProperties": true
}
