core-lightning/doc/schemas/listrunes.schema.json
Rusty Russell d492c74e3d docs: document all the rune commands which look like the now-deprecated commando ones.
Rune functionality moved into core from commando plugin.

Changelog-Added: JSON-RPC: `checkrune`: check rune validity for authorization; `createrune` to create/modify rune; `listrunes` to list existing runes; `blacklistrune` to revoke permission of rune

Changelog-Deprecated: JSON-RPC: `commando-rune`, `commando-listrunes` and `commando-blacklist`.

No-schema-diff-check
2023-07-21 16:44:22 +09:30

108 lines
3.4 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"runes"
],
"properties": {
"runes": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"rune",
"unique_id",
"restrictions",
"restrictions_as_english"
],
"properties": {
"rune": {
"type": "string",
"description": "Base64 encoded rune"
},
"unique_id": {
"type": "string",
"description": "Unique id assigned when the rune was generated; this is always a u64 for commando runes"
},
"restrictions": {
"type": "array",
"description": "The restrictions on what commands this rune can authorize",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"alternatives",
"english"
],
"properties": {
"alternatives": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"fieldname",
"value",
"condition",
"english"
],
"properties": {
"fieldname": {
"type": "string",
"description": "The field this restriction applies to; see commando-rune(7)"
},
"value": {
"type": "string",
"description": "The value accepted for this field"
},
"condition": {
"type": "string",
"description": "The way to compare fieldname and value"
},
"english": {
"type": "string",
"description": "English readable description of this alternative"
}
}
}
},
"english": {
"type": "string",
"description": "English readable summary of alternatives above"
}
}
}
},
"restrictions_as_english": {
"type": "string",
"description": "English readable description of the restrictions array above"
},
"stored": {
"type": "boolean",
"enum": [
false
],
"description": "This is false if the rune does not appear in our datastore (only possible when `rune` is specified)"
},
"blacklisted": {
"type": "boolean",
"enum": [
true
],
"description": "The rune has been blacklisted; see commando-blacklist(7)"
},
"our_rune": {
"type": "boolean",
"enum": [
false
],
"description": "This is not a rune for this node (only possible when `rune` is specified)"
}
}
}
}
}
}