core-lightning/doc/schemas/checkmessage.schema.json
Rusty Russell 2ddecdc95a doc: schemas for everything else.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: doc: Epic documentation rewrite: each now lists complete and accurate JSON output, tested against testsuite.
2021-06-25 09:49:33 +09:30

57 lines
1.1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [ "verified" ],
"additionalProperties": true,
"properties": {
"verified": {
"type": "boolean",
"description": "Whether the signature was valid"
}
},
"allOf": [
{
"if": {
"properties": {
"verified": {
"type": "boolean",
"enum": [ true ]
}
}
},
"then": {
"additionalProperties": false,
"required": [ "pubkey" ],
"properties": {
"verified": { },
"pubkey": {
"type": "pubkey",
"description": "the *pubkey* parameter, or the pubkey found by looking for known nodes"
}
}
}
},
{
"if": {
"properties": {
"verified": {
"type": "boolean",
"enum": [ false ]
}
}
},
"then": {
"additionalProperties": false,
"required": [ "pubkey" ],
"properties": {
"verified": { },
"pubkey": {
"type": "pubkey",
"description": "the *pubkey* (if any) which could have signed this; this is usually not useful!"
}
}
}
}
]
}