core-lightning/doc/guides/Developer-s Guide/app-development/commando.md
Adi Shankara e83782f5de doc: Add guides and GitHub workflow for doc sync
This PR:
- adds all the guides (in markdown format) that is published at https://docs.corelightning.org/docs
- adds a github workflow to sync any future changes made to files inside the guides folder
- does not include API reference (json-rpc commands). Those will be handled in a separate PR since they're used as manpages and will require a different github workflow

Note that the guides do not exactly map to their related files in doc/, since we reorganized the overall documentation structure on readme for better readability and developer experience. For example, doc/FUZZING.md and doc/HACKING.md#Testing are merged into testing.md in the new docs. As on the creation date of this PR, content from each of the legacy documents has been synced with the new docs. Until this PR gets merged, I will continue to push any updates made to the legacy documents into the new docs.

If this looks reasonable, I will add a separate PR to clean up the legacy documents from doc/ (or mark them deprecated) to avoid redundant upkeep and maintenance.

Changelog-None
2023-06-06 12:40:19 +09:30

2.3 KiB

title slug hidden createdAt updatedAt
Commando commando false 2023-02-08T09:54:01.784Z 2023-02-21T13:55:16.224Z

📘

Used for applications that want to connect to a CLN node over the lightning network in a secure manner.

Commando is a direct-to-node plugin that ships natively with Core Lightning. It lets you set runes to create fine-grained access controls to a CLN node's RPC , and provides access to those same RPCs via Lightning-native network connections.

The commando plugin adds two new RPC methods: commando and commando-rune.

  • commando allows you to send a directly connected peer an RPC request, who, in turn, will run and send the result to you. This uses the secure connections that Lightning nodes establish with each other on connect. As arbitrary RPC executions by any connected node can be dangerous, generally, the peer will only allow you to execute the command if you've also provided a rune.
  • commando-rune is the RPC command that allows you to construct a base64 encoded permissions string, which can be handed to peers to allow them to use commando to query or ask your node for things remotely. runes have restrictions added to them, meaning no one can remove a restriction from a rune you've generated and handed them. These restrictions allow you to carefully craft the RPC commands a caller is allowed to access, the number of times that they can do so, the length of time the rune is valid for, and more.

For more details on using runes, read through the docs for commando and commando-rune.

Check out this video of William Casarin (@jb55) walking through how to create runes and connect to a Lightning node via lnsocket.

📘 Pro-tip

  • lnsocket allows you to build a web or mobile app that talks directly to a CLN node over commando with runes. Check out LNLink - a mobile app that allows you to control a Core Lightning node over the lightning network itself!
  • lnmessage allows you to talk to Core Lightning nodes from the browser via a Websocket connection and control it using commando.