mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
b327bd30c3
Without this, we have hardly any enforcement. This is why the schema mistake fixed in the previous patches weren't spotted immediately. The hard work was done by: ``` $ for f in lightning-*.json; do grep -v '^ "additionalProperties": false,' $f | bagto $f; done $ for f in lightning-*.json; do sed 's/"properties": {/"additionalProperties": false, "properties": {/' $f | bagto $f; done $ make fmt-schemas ``` Then checking where 'additionalProperties: true' had been turned to false (we deliberately use it in some places where there are if statements in the schema, or occasionally where there can be arbitrary fields). [Including doc/rpc-schema-draft.json update by Shahana] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
122 lines
3.0 KiB
JSON
122 lines
3.0 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"added": "v23.05",
|
|
"deprecated": [
|
|
"v23.08",
|
|
"v25.02"
|
|
],
|
|
"rpc": "commando-blacklist",
|
|
"title": "Command to prevent a rune from working",
|
|
"description": [
|
|
"The **commando-blacklist** 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.",
|
|
"",
|
|
"All runes created by commando 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)."
|
|
]
|
|
}
|
|
},
|
|
"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>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-commando-listrunes(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:commando-blacklist#1",
|
|
"method": "commando-blacklist",
|
|
"params": {
|
|
"start": 1
|
|
}
|
|
},
|
|
"response": {
|
|
"blacklist": [
|
|
{
|
|
"start": 1,
|
|
"end": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:commando-blacklist#2",
|
|
"method": "commando-blacklist",
|
|
"params": {
|
|
"start": 2,
|
|
"end": 3
|
|
}
|
|
},
|
|
"response": {
|
|
"blacklist": [
|
|
{
|
|
"start": 1,
|
|
"end": 3
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|