{
  "$schema": "../rpc-schema-draft.json",
  "type": "object",
  "added": "v23.08",
  "rpc": "blacklistrune",
  "title": "Command to prevent a rune from working",
  "description": [
    "The **blacklistrune** RPC command allows you to effectively revoke the rune you have created (and any runes derived from that rune with additional restictions). Attempting to use these runes will be resulted in a `Blacklisted rune` error message.",
    "",
    "Destroy a rune like in olden times with the **destroyrune** command.",
    "",
    "All runes created by lightning have a unique sequential id within them and can be blacklisted in ranges for efficiency. The command always returns the blacklisted ranges on success. If no parameters are specified, no changes have been made. If start specified without end, that single rune is blacklisted. If end is also specified, every rune from start till end inclusive is blacklisted."
  ],
  "request": {
    "required": [],
    "additionalProperties": false,
    "properties": {
      "start": {
        "type": "u64",
        "description": [
          "First rune unique id to blacklist."
        ]
      },
      "end": {
        "type": "u64",
        "description": [
          "Final rune unique id to blacklist (defaults to start)."
        ]
      },
      "relist": {
        "type": "boolean",
        "added": "v25.02",
        "description": [
          "Undo the blacklisting (if any) of every rune in range start to end (inclusive)"
        ]
      }
    },
    "dependentUpon": {
      "start": [
        "end"
      ]
    }
  },
  "response": {
    "required": [
      "blacklist"
    ],
    "additionalProperties": false,
    "properties": {
      "blacklist": {
        "type": "array",
        "description": [
          "The resulting blacklist ranges after the command."
        ],
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "start",
            "end"
          ],
          "properties": {
            "start": {
              "type": "u64",
              "description": [
                "Unique id of first rune in this blacklist range."
              ]
            },
            "end": {
              "type": "u64",
              "description": [
                "Unique id of last rune in this blacklist range."
              ]
            }
          }
        }
      }
    }
  },
  "author": [
    "Shahana Farooqui [sfarooqui@blockstream.com](mailto:sfarooqui@blockstream.com) is mainly responsible."
  ],
  "see_also": [
    "lightning-commando-blacklist(7)",
    "lightning-showrunes(7)"
  ],
  "resources": [
    "Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)"
  ],
  "examples": [
    {
      "request": {
        "id": "example:blacklistrune#1",
        "method": "blacklistrune",
        "params": {
          "start": 1
        }
      },
      "response": {
        "blacklist": [
          {
            "start": 1,
            "end": 1
          }
        ]
      }
    },
    {
      "request": {
        "id": "example:blacklistrune#2",
        "method": "blacklistrune",
        "params": {
          "start": 0,
          "end": 2
        }
      },
      "response": {
        "blacklist": [
          {
            "start": 0,
            "end": 2
          }
        ]
      }
    },
    {
      "request": {
        "id": "example:blacklistrune#3",
        "method": "blacklistrune",
        "params": {
          "start": 3,
          "end": 4
        }
      },
      "response": {
        "blacklist": [
          {
            "start": 0,
            "end": 4
          }
        ]
      }
    },
    {
      "description": [
        "This undoes the blacklisting of rune 3 only"
      ],
      "request": {
        "id": "example:blacklistrune#4",
        "method": "blacklistrune",
        "params": {
          "start": 3,
          "relist": true
        }
      },
      "response": {
        "blacklist": [
          {
            "start": 0,
            "end": 2
          },
          {
            "start": 4,
            "end": 4
          }
        ]
      }
    }
  ]
}
