Skip to content

Commit cea6c81

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
doc: App development updated with standard connection URI format
Changelog-None.
1 parent 266a5f9 commit cea6c81

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

doc/developers-guide/app-development.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ slug: "app-development"
44
excerpt: "Build a lightning application using Core Lightning APIs."
55
hidden: false
66
---
7+
8+
## Interacting with CLN Node
9+
710
There are several ways to connect and interact with a Core Lightning node in order to build a lightning app or integrate lightning in your application.
811

912
- Using **[JSON-RPC commands](doc:json-rpc)** if you're building an application in the same system as the CLN node.
@@ -13,6 +16,69 @@ There are several ways to connect and interact with a Core Lightning node in ord
1316
- Using **[WSS Proxy](doc:wss-proxy)** to connect to a CLN node over web secure socket proxy.
1417
- Third-party libraries that offer **[JSON over HTTPS](doc:third-party-libraries#json-over-https)** or **[GraphQL](doc:third-party-libraries#graphql)** (deprecated) frameworks to connect to a CLN node remotely.
1518

19+
## CLN connection URIs
20+
21+
This section outlines the standard URI formats for connecting to Core Lightning (CLN) nodes via different protocols.
22+
23+
### Commando WebSocket Connection
24+
```
25+
commando+<protocol>://<cln-host>:<ws-port>?pubkey=<pubkey>&rune=<rune>&invoiceRune=<invoice-rune>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
26+
```
27+
28+
#### Parameters:
29+
- protocol: ws or wss (WebSocket or secure WebSocket)
30+
- cln-host: Hostname or IP address of the CLN node
31+
- ws-port: WebSocket port
32+
- pubkey: Node's public key (hex encoded)
33+
- rune: Authentication rune for general commands
34+
- invoiceRune: Specific rune for invoice creation (optional)
35+
- certs: Base64-encoded concatenation of client key, client cert, and CA cert
36+
37+
#### Example:
38+
39+
```
40+
commando+wss://cln.local:5001?pubkey=023456789abcdef&rune=8hJ6ZKFvRune&invoiceRune=5kJ3ZKFvInvRune&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
41+
```
42+
43+
### REST API Connection
44+
```
45+
clnrest+<protocol>://<rest-host>:<rest-port>?rune=<rune>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
46+
```
47+
48+
#### Parameters:
49+
- protocol: http or https
50+
- rest-host: Hostname or IP address of the REST interface
51+
- rest-port: REST API port (typically 3010)
52+
- rune: Authentication rune for REST API access
53+
- certs: Base64-encoded concatenation of client key, client cert, and CA cert
54+
55+
#### Example:
56+
57+
```
58+
clnrest+https://cln.local:3010?rune=8hJ6ZKFvRune&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
59+
```
60+
61+
## gRPC Connection
62+
63+
```
64+
clngrpc://<grpc-host>:<grpc-port>?pubkey=<pubkey>&protoPath=<path-to-proto>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
65+
```
66+
67+
#### Parameters:
68+
- grpc-host: Hostname or IP address of the gRPC interface
69+
- grpc-port: gRPC port (typically 9736)
70+
- pubkey: Node's public key (hex encoded)
71+
- protoPath: Path to protocol buffer definition file (typically https://github.com/ElementsProject/lightning/tree/master/cln-grpc/proto)
72+
- certs: Base64-encoded concatenation of client key, client cert, and CA cert
73+
74+
#### Example:
75+
76+
```
77+
clngrpc://cln.grpc:9736?pubkey=023456789abcdef&protoPath=/path/to/cln.proto&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
78+
```
79+
80+
## Image of available API interfaces and transport protocols
81+
1682
[block:image]
1783
{
1884
"images": [

0 commit comments

Comments
 (0)