{
  "lexicon": 1,
  "id": "xyz.avocadough.payment.endpoint",
  "defs": {
    "main": {
      "type": "record",
      "description": "An identity's published, settlement-agnostic payment endpoints. One canonical record per identity.",
      "key": "literal:self",
      "record": {
        "type": "object",
        "required": ["methods", "updatedAt"],
        "properties": {
          "methods": {
            "type": "array",
            "items": { "type": "ref", "ref": "#method" }
          },
          "updatedAt": { "type": "string", "format": "datetime" }
        }
      }
    },
    "method": {
      "type": "object",
      "required": ["type", "value"],
      "properties": {
        "type": {
          "type": "string",
          "knownValues": ["lnAddress", "bolt12", "lnurlp", "cashuMint"]
        },
        "value": {
          "type": "string",
          "description": "lud16 address / BOLT12 offer / LNURL / mint at-identifier"
        },
        "priority": {
          "type": "integer",
          "description": "Resolution order across methods; lower is preferred."
        }
      }
    }
  }
}
