mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
976c0c90bc
- Changed ALL `doc/schemas/lightning-*.json` file's `json_example` to `examples` - Change the heading from example to examples - Bring shell command before the json command - Move Example to the end of the page - Remove horizontal line from Example
144 lines
3.8 KiB
JSON
144 lines
3.8 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"added": "v23.08",
|
|
"rpc": "checkrune",
|
|
"title": "Command to Validate Rune",
|
|
"description": [
|
|
"The **checkrune** RPC command checks the validity/authorization rights of specified rune for the given nodeid, method, and params.",
|
|
"",
|
|
"If successful, the rune \"usage\" counter (used for ratelimiting) is incremented.",
|
|
"",
|
|
"See lightning-createrune(7) for the fields in the rune which are checked."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"rune"
|
|
],
|
|
"properties": {
|
|
"rune": {
|
|
"type": "string",
|
|
"description": [
|
|
"Rune to check for authorization."
|
|
]
|
|
},
|
|
"nodeid": {
|
|
"type": "string",
|
|
"description": [
|
|
"Node id of requesting node *(required until v23.11)*."
|
|
]
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": [
|
|
"Method for which rune needs to be validated *(required until v23.11)*."
|
|
]
|
|
},
|
|
"params": {
|
|
"oneOf": [
|
|
{
|
|
"type": "array",
|
|
"description": [
|
|
"Array of positional parameters."
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"description": [
|
|
"Parameters for method."
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"valid"
|
|
],
|
|
"properties": {
|
|
"valid": {
|
|
"type": "boolean",
|
|
"description": [
|
|
"True if the rune is valid."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"errors": [
|
|
"The following error codes may occur:",
|
|
"",
|
|
"- 1501 (RUNE_NOT_AUTHORIZED): rune is not for this node (or perhaps completely invalid)",
|
|
"- 1502 (RUNE_NOT_PERMITTED): rune does not allow this usage (includes a detailed reason why)",
|
|
"- 1503 (RUNE_BLACKLISTED): rune has been explicitly blacklisted."
|
|
],
|
|
"author": [
|
|
"Shahana Farooqui <<sfarooqui@blockstream.com>> is mainly responsible for consolidating logic from commando."
|
|
],
|
|
"see_also": [
|
|
"lightning-createrune(7)",
|
|
"lightning-blacklistrune(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:checkrune#1",
|
|
"method": "checkrune",
|
|
"params": {
|
|
"nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518",
|
|
"rune": "617Obfct0oRBj_uqGFQxDk3XZ1sDFiC2Q5ltm5z1i_k9NSZtZXRob2Q9aW52b2ljZSZwbmFtZWRlc2NyaXB0aW9uPUB0aXBqYXJcfGpiNTVAc2VuZHNhdHMubG9s",
|
|
"method": "invoice",
|
|
"params": {
|
|
"amount_msat": "any",
|
|
"label": "lbl",
|
|
"description": [
|
|
"@tipjar|jb55@sendsats.lol."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"valid": true
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:checkrune#2",
|
|
"method": "checkrune",
|
|
"params": {
|
|
"nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518",
|
|
"rune": "OSqc7ixY6F-gjcigBfxtzKUI54uzgFSA6YfBQoWGDV89MA==",
|
|
"method": "listpeers",
|
|
"params": {}
|
|
}
|
|
},
|
|
"response": {
|
|
"valid": true
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:checkrune#3",
|
|
"method": "checkrune",
|
|
"params": {
|
|
"nodeid": "0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518",
|
|
"rune": "617Obfct0oRBj_uqGFQxDk3XZ1sDFiC2Q5ltm5z1i_k9NSZtZXRob2Q9aW52b2ljZSZwbmFtZWRlc2NyaXB0aW9uPUB0aXBqYXJcfGpiNTVAc2VuZHNhdHMubG9s",
|
|
"method": "invoice",
|
|
"params": {
|
|
"amount_msat": "any",
|
|
"label": "lbl",
|
|
"description": "@tipjar|jb55@sendsats.lol"
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"valid": true
|
|
}
|
|
}
|
|
]
|
|
}
|