Files
palladum-lightning/doc/schemas/disconnect.json
ShahanaFarooqui 3e841b358e docs: Updated schema for mdx compatibility
Changelog-Fixed: Ensure documentation renders correctly when adding/updating new RPCs by detecting non-MDX-compatible pages.
2025-12-18 10:27:15 +10:30

74 lines
2.0 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "disconnect",
"title": "Command for disconnecting from another lightning node",
"description": [
"The disconnect RPC command closes an existing connection to a peer, identified by *id*, in the Lightning Network, as long as it doesn't have an active channel."
],
"request": {
"required": [
"id"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "pubkey",
"description": [
"The public key of the peer to terminate the connection. It can be discovered as peer_id in the output of the listpeerchannels command."
]
},
"force": {
"type": "boolean",
"description": [
"If set to True, it will disconnect even with an active channel."
]
}
}
},
"response": {
"additionalProperties": false,
"properties": {}
},
"errors": [
"On error the returned object will contain `code` and `message` properties, with `code` being one of the following:",
"",
"- -32602: If the given parameters are wrong.",
"- -1: Catchall nonspecific error."
],
"author": [
"Michael Hawkins [michael.hawkins@protonmail.com](mailto:michael.hawkins@protonmail.com)."
],
"see_also": [
"lightning-connect(7)",
"lightning-listpeerchannels(7)"
],
"resources": [
"Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)"
],
"examples": [
{
"request": {
"id": "example:disconnect#1",
"method": "disconnect",
"params": {
"id": "nodeid040404040404040404040404040404040404040404040404040404040404",
"force": false
}
},
"response": {}
},
{
"request": {
"id": "example:disconnect#2",
"method": "disconnect",
"params": {
"id": "nodeid050505050505050505050505050505050505050505050505050505050505",
"force": true
}
},
"response": {}
}
]
}