Skip to content

Commit 47f20c0

Browse files
reckless-rpc: add documentation
1 parent aec0bfa commit 47f20c0

File tree

4 files changed

+384
-0
lines changed

4 files changed

+384
-0
lines changed

contrib/msggen/msggen/schema.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25995,6 +25995,197 @@
2599525995
"Main web site: <https://github.com/ElementsProject/lightning>"
2599625996
]
2599725997
},
25998+
"lightning-reckless.json": {
25999+
"$schema": "../rpc-schema-draft.json",
26000+
"type": "object",
26001+
"additionalProperties": false,
26002+
"rpc": "reckless",
26003+
"title": "Issue a command to the reckless plugin manager utility",
26004+
"description": [
26005+
"The **reckless** RPC starts a reckless process with the *command* and *target* provided. Node configuration, network, and lightning direrctory are automatically passed to the reckless utility."
26006+
],
26007+
"request": {
26008+
"required": [
26009+
"command"
26010+
],
26011+
"properties": {
26012+
"command": {
26013+
"type": "string",
26014+
"enum": [
26015+
"install",
26016+
"uninstall",
26017+
"search",
26018+
"enable",
26019+
"disable",
26020+
"source",
26021+
"--version"
26022+
],
26023+
"description": [
26024+
"Determines which command to pass to reckless",
26025+
" - *command* **install** takes a *plugin_name* to search for and install a named plugin.",
26026+
" - *command* **uninstall** takes a *plugin_name* and attempts to uninstall a plugin of the same name.",
26027+
" - *command* **search** takes a *plugin_name* to search for a named plugin.",
26028+
"..."
26029+
]
26030+
},
26031+
"target/subcommand": {
26032+
"oneOf": [
26033+
{
26034+
"type": "string"
26035+
},
26036+
{
26037+
"type": "array"
26038+
}
26039+
],
26040+
"description": [
26041+
"Target of a reckless command or a subcommand."
26042+
]
26043+
},
26044+
"target": {
26045+
"oneOf": [
26046+
{
26047+
"type": "string"
26048+
},
26049+
{
26050+
"type": "array"
26051+
}
26052+
],
26053+
"description": [
26054+
"*name* of a plugin to install/uninstall/search/enable/disable or source to add/remove."
26055+
]
26056+
}
26057+
}
26058+
},
26059+
"response": {
26060+
"required": [
26061+
"log",
26062+
"result"
26063+
],
26064+
"properties": {
26065+
"result": {
26066+
"type": "array",
26067+
"items": {
26068+
"type": "string"
26069+
},
26070+
"description": [
26071+
"Output of the requested reckless command."
26072+
]
26073+
},
26074+
"log": {
26075+
"type": "array",
26076+
"items": {
26077+
"type": "string"
26078+
},
26079+
"description": [
26080+
"Verbose log entries of the requested reckless command."
26081+
]
26082+
}
26083+
}
26084+
},
26085+
"author": [
26086+
"Alex Myers <<[email protected]>> is mainly responsible."
26087+
],
26088+
"see_also": [
26089+
"reckless(7)"
26090+
],
26091+
"resources": [
26092+
"Main web site: <https://github.com/ElementsProject/lightning>"
26093+
],
26094+
"examples": [
26095+
{
26096+
"request": {
26097+
"id": "example:reckless#1",
26098+
"method": "reckless",
26099+
"params": {
26100+
"command": "search",
26101+
"target/subcommand": "backup"
26102+
}
26103+
},
26104+
"response": {
26105+
"result": [
26106+
"https://github.com/lightningd/plugins"
26107+
],
26108+
"log": [
26109+
"DEBUG: Warning: Reckless requires write access",
26110+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/contents/",
26111+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/git/trees/294f93d7060799439c994daa84f534c4d1458325",
26112+
"INFO: found backup in source: https://github.com/lightningd/plugins",
26113+
"DEBUG: entry: None",
26114+
"DEBUG: sub-directory: backup"
26115+
]
26116+
}
26117+
},
26118+
{
26119+
"request": {
26120+
"id": "example:reckless#2",
26121+
"method": "reckless",
26122+
"params": {
26123+
"command": "install",
26124+
"target/subcommand": [
26125+
"summars",
26126+
"currecyrate"
26127+
]
26128+
}
26129+
},
26130+
"response": {
26131+
"result": [
26132+
"/tmp/l1/reckless/summars",
26133+
"/tmp/l1/reckless/currencyrate"
26134+
],
26135+
"log": [
26136+
"DEBUG: Searching for summars",
26137+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/contents/",
26138+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/git/trees/294f93d7060799439c994daa84f534c4d1458325",
26139+
"INFO: found summars in source: https://github.com/lightningd/plugins",
26140+
"DEBUG: entry: None",
26141+
"DEBUG: sub-directory: summars",
26142+
"DEBUG: Retrieving summars from https://github.com/lightningd/plugins",
26143+
"DEBUG: Install requested from InstInfo(summars, https://github.com/lightningd/plugins, None, None, None, summars).",
26144+
"INFO: cloning Source.GITHUB_REPO InstInfo(summars, https://github.com/lightningd/plugins, None, None, None, summars)",
26145+
"DEBUG: cloned_src: InstInfo(summars, /tmp/reckless-726255950dyifh_fh/clone, None, Cargo.toml, Cargo.toml, summars/summars)",
26146+
"DEBUG: using latest commit of default branch",
26147+
"DEBUG: checked out HEAD: 5e449468bd57db7d0f33178fe0dc867e0da94133",
26148+
"DEBUG: using installer rust",
26149+
"DEBUG: creating /tmp/l1/reckless/summars",
26150+
"DEBUG: creating /tmp/l1/reckless/summars/source",
26151+
"DEBUG: copying /tmp/reckless-726255950dyifh_fh/clone/summars/summars tree to /tmp/l1/reckless/summars/source/summars",
26152+
"DEBUG: linking source /tmp/l1/reckless/summars/source/summars/Cargo.toml to /tmp/l1/reckless/summars/Cargo.toml",
26153+
"DEBUG: InstInfo(summars, /tmp/l1/reckless/summars, None, Cargo.toml, Cargo.toml, source/summars)",
26154+
"DEBUG: cargo installing from /tmp/l1/reckless/summars/source/summars",
26155+
"DEBUG: rust project compiled successfully",
26156+
"INFO: plugin installed: /tmp/l1/reckless/summars",
26157+
"DEBUG: activating summars",
26158+
"INFO: summars enabled",
26159+
"DEBUG: Searching for currencyrate",
26160+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/contents/",
26161+
"DEBUG: fetching from gh API: https://api.github.com/repos/lightningd/plugins/git/trees/294f93d7060799439c994daa84f534c4d1458325",
26162+
"INFO: found currencyrate in source: https://github.com/lightningd/plugins",
26163+
"DEBUG: entry: None",
26164+
"DEBUG: sub-directory: currencyrate",
26165+
"DEBUG: Retrieving currencyrate from https://github.com/lightningd/plugins",
26166+
"DEBUG: Install requested from InstInfo(currencyrate, https://github.com/lightningd/plugins, None, None, None, currencyrate).",
26167+
"INFO: cloning Source.GITHUB_REPO InstInfo(currencyrate, https://github.com/lightningd/plugins, None, None, None, currencyrate)",
26168+
"DEBUG: cloned_src: InstInfo(currencyrate, /tmp/reckless-192564272t478naxn/clone, None, currencyrate.py, requirements.txt, currencyrate/currencyrate)",
26169+
"DEBUG: using latest commit of default branch",
26170+
"DEBUG: checked out HEAD: 5e449468bd57db7d0f33178fe0dc867e0da94133",
26171+
"DEBUG: using installer python3venv",
26172+
"DEBUG: creating /tmp/l1/reckless/currencyrate",
26173+
"DEBUG: creating /tmp/l1/reckless/currencyrate/source",
26174+
"DEBUG: copying /tmp/reckless-192564272t478naxn/clone/currencyrate/currencyrate tree to /tmp/l1/reckless/currencyrate/source/currencyrate",
26175+
"DEBUG: linking source /tmp/l1/reckless/currencyrate/source/currencyrate/currencyrate.py to /tmp/l1/reckless/currencyrate/currencyrate.py",
26176+
"DEBUG: InstInfo(currencyrate, /tmp/l1/reckless/currencyrate, None, currencyrate.py, requirements.txt, source/currencyrate)",
26177+
"DEBUG: configuring a python virtual environment (pip) in /tmp/l1/reckless/currencyrate/.venv",
26178+
"DEBUG: virtual environment created in /tmp/l1/reckless/currencyrate/.venv.",
26179+
"INFO: dependencies installed successfully",
26180+
"DEBUG: virtual environment for cloned plugin: .venv",
26181+
"INFO: plugin installed: /tmp/l1/reckless/currencyrate",
26182+
"DEBUG: activating currencyrate",
26183+
"INFO: currencyrate enabled"
26184+
]
26185+
}
26186+
}
26187+
]
26188+
},
2599826189
"lightning-recover.json": {
2599926190
"$schema": "../rpc-schema-draft.json",
2600026191
"type": "object",

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ GENERATE_MARKDOWN := doc/lightning-addgossip.7 \
9797
doc/lightning-plugin.7 \
9898
doc/lightning-preapproveinvoice.7 \
9999
doc/lightning-preapprovekeysend.7 \
100+
doc/lightning-reckless.7 \
100101
doc/lightning-recoverchannel.7 \
101102
doc/lightning-recover.7 \
102103
doc/lightning-renepay.7 \

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Core Lightning Documentation
108108
lightning-plugin <lightning-plugin.7.md>
109109
lightning-preapproveinvoice <lightning-preapproveinvoice.7.md>
110110
lightning-preapprovekeysend <lightning-preapprovekeysend.7.md>
111+
lightning-reckless <lightning-reckless.7.md>
111112
lightning-recover <lightning-recover.7.md>
112113
lightning-recoverchannel <lightning-recoverchannel.7.md>
113114
lightning-renepay <lightning-renepay.7.md>

0 commit comments

Comments
 (0)