orb.cli.node module¶
- orb.cli.node.create(hostname: str = <typer.models.OptionInfo object>, mac_hex: str = <typer.models.OptionInfo object>, node_type: str = <typer.models.OptionInfo object>, protocol: str = <typer.models.OptionInfo object>, network: str = <typer.models.OptionInfo object>, cert_hex: str = <typer.models.OptionInfo object>, rest_port: int = <typer.models.OptionInfo object>, grpc_port: int = <typer.models.OptionInfo object>, use_node: bool = <typer.models.OptionInfo object>)¶
Create a node.
This command encrypts the mac / certs, and attempts to connect to the node. If the connection is successful, then it saves the node information for later access.
If use-node is True then all subsequent commands will use this node as the default node.
A node is essentially the bare-minimum data Orb requires to connect to a lightning node.
Node data is saved in various places depending on your OS:
Linux: ~/.config/orb_<pubkey>/orb_<pubkey>.ini
OSX: ~/Library/Application Support/orb_<pubkey>/orb_<pubkey>.ini
Windows: ${APPDATA}/orb_<pubkey>/orb_<pubkey>.ini
This command is used by other commands, e.g:
- orb.cli.node.create_from_cert_files(hostname: str = <typer.models.OptionInfo object>, mac_file_path: str = <typer.models.OptionInfo object>, node_type: str = <typer.models.OptionInfo object>, protocol: str = <typer.models.OptionInfo object>, network: str = <typer.models.OptionInfo object>, cert_file_path: str = <typer.models.OptionInfo object>, rest_port: int = <typer.models.OptionInfo object>, grpc_port: int = <typer.models.OptionInfo object>, use_node: bool = <typer.models.OptionInfo object>)¶
Create node and use certificate files.
This command is very similar to orb node create, the difference being that instead of taking certificate and macaroon data, it takes in paths to those files, with:
–mac-file-path=… –cert-file-path=…
This is practical for creating nodes after certificates and macaroons have been copied locally.
- orb.cli.node.create_orb_public(node_type: str = <typer.models.ArgumentInfo object>, protocol: str = <typer.models.ArgumentInfo object>, use_node: bool = <typer.models.OptionInfo object>)¶
Create public testnet node.
This command enables users to quickly create node connection information for orb’s public nodes. The typical invocates are:
orb node create-orb-public cln rest orb node create-orb-public lnd rest orb node create-orb-public lnd grpc
Since Core-Lightning’s GRPC interface is still new and not used a lot, it is currently unsupported by Orb, which is why the cln grpc node flavor isn’t available.
After the public node has been created, if –use-node was specified then subsequent orb commands will use it by default. These nodes have admin macaroons, and are used by the integration tests, so please keep the in a sane state so they don’t need to be re-created.
- orb.cli.node.delete(pubkey: str | None = <typer.models.ArgumentInfo object>)¶
Delete node information.
Node data is saved in various places depending on your OS:
Linux: ~/.config/orb_<pubkey>/orb_<pubkey>.ini
OSX: ~/Library/Application Support/orb_<pubkey>/orb_<pubkey>.ini
Windows: ${APPDATA}/orb_<pubkey>/orb_<pubkey>.ini
This command recursively deletes the node’s folder. This is a destructive command. Use with care.
- orb.cli.node.info(pubkey: str | None = <typer.models.ArgumentInfo object>)¶
Get node information.
This command connects to the lightning node, gets basic information and prints it out in the console.
- orb.cli.node.list(show_info: bool = <typer.models.OptionInfo object>)¶
Get a list of nodes known to Orb.
Node data is saved in various places depending on your OS:
Linux: ~/.config/orb_<pubkey>/orb_<pubkey>.ini
OSX: ~/Library/Application Support/orb_<pubkey>/orb_<pubkey>.ini
Windows: ${APPDATA}/orb_<pubkey>/orb_<pubkey>.ini
This command simply scans those folders for a matching pattern.
If the –show-info is provided, then Orb attempts to connect to the node, and to invoke the orb node info command on the available nodes.
- orb.cli.node.ssh_fetch_certs(hostname: str = <typer.models.OptionInfo object>, ssh_cert_path: ~pathlib.Path = <typer.models.OptionInfo object>, ssh_password: str = <typer.models.OptionInfo object>, ln_cert_path: ~pathlib.Path = <typer.models.OptionInfo object>, ln_macaroon_path: ~pathlib.Path = <typer.models.OptionInfo object>, ssh_user: str = <typer.models.OptionInfo object>, ssh_port: int = <typer.models.OptionInfo object>)¶
SSH into the node, copy the cert and mac into the current folder.
- orb.cli.node.ssh_wizard(hostname: str = <typer.models.OptionInfo object>, node_type: str = <typer.models.OptionInfo object>, ssh_cert_path: ~pathlib.Path = <typer.models.OptionInfo object>, ssh_password: str = <typer.models.OptionInfo object>, ln_cert_path: ~pathlib.Path = <typer.models.OptionInfo object>, ln_macaroon_path: ~pathlib.Path = <typer.models.OptionInfo object>, network: str = <typer.models.OptionInfo object>, protocol: str = <typer.models.OptionInfo object>, rest_port: int = <typer.models.OptionInfo object>, grpc_port: int = <typer.models.OptionInfo object>, ssh_user: str = <typer.models.OptionInfo object>, ssh_port: int = <typer.models.OptionInfo object>, use_node: bool = <typer.models.OptionInfo object>)¶
SSH into the node, copy the cert and mac, and create the node.
The command sshes into a host, and copies the certificate and macaroon from the paths specified with –ln-cert-path=… and –ln-macaroon-path=… flags.
The remainder of the operations is invoking the orb_node_create command.
- orb.cli.node.use(pubkey: str = <typer.models.ArgumentInfo object>)¶
Make all subsequent commands use this node.
This command inserts the pubkey in the config files of the orbconnector app.
Linux: ~/.config/orbconnector/orbconnector.ini
OSX: ~/Library/Application Support/orbconnector/orbconnector.ini
Windows: ${APPDATA}/orbconnector/orbconnector.ini
All subsequent orb invocations will use this node by default, unless otherwise specified.