Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/scripts/sync-rpc-cmds.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
from urllib.parse import quote
from time import sleep
import requests
import re
from enum import Enum

# readme url
URL = "https://dash.readme.com/api/v1"
URL = "https://api.readme.com/v2/branches/stable"
# category id for API reference
CATEGORY_ID = "685ce4df1df887006ff221c5"
CATEGORY_SLUG = "json-rpc-apis"
CATEGORY_SLUG = "JSON-RPC API Reference"


class Action(Enum):
Expand All @@ -18,9 +19,9 @@ class Action(Enum):


def getListOfRPCDocs(headers):
response = requests.get(f"{URL}/categories/{CATEGORY_SLUG}/docs", headers=headers)
response = requests.get(f"{URL}/categories/reference/{quote(CATEGORY_SLUG)}/pages", headers=headers)
if response.status_code == 200:
return response.json()
return response.json().get('data', [])
else:
return []

Expand All @@ -30,28 +31,30 @@ def publishDoc(action, title, body, order, headers):
"title": title,
"type": "basic",
"body": body,
"category": CATEGORY_ID,
"category": {
"id": CATEGORY_ID
},
"hidden": False,
"order": order,
}
# title == slug
if action == Action.ADD:
# create doc
response = requests.post(URL + "/docs", json=payload, headers=headers)
payload['slug'] = title
response = requests.post(URL + "/reference", json=payload, headers=headers)
if response.status_code != 201:
print(response.text)
else:
print("Created ", title)
elif action == Action.UPDATE:
# update doc
response = requests.put(f"{URL}/docs/{title}", json=payload, headers=headers)
response = requests.patch(f"{URL}/reference/{title}", json=payload, headers=headers)
if response.status_code != 200:
print(response.text)
else:
print("Updated ", title)
elif action == Action.DELETE:
# delete doc
response = requests.delete(f"{URL}/docs/{title}", headers=headers)
response = requests.delete(f"{URL}/reference/{title}", headers=headers)
if response.status_code != 204:
print(response.text)
else:
Expand Down Expand Up @@ -79,7 +82,7 @@ def main():
headers = {
"accept": "application/json",
"content-type": "application/json",
"authorization": "Basic " + os.environ.get("README_API_KEY"),
"Authorization": "Bearer " + os.environ.get("README_API_KEY"),
}

# path to the rst file from where we fetch all the RPC commands
Expand Down
30 changes: 10 additions & 20 deletions .github/workflows/rdme-docs-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,26 @@ jobs:
uses: actions/checkout@v4

- name: Sync doc/getting-started/ 🚀
uses: readmeio/rdme@v8
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
uses: readmeio/rdme@v10
with:
rdme: docs doc/getting-started --key=${{ env.README_API_KEY }} --version=1
rdme: docs upload ./doc/getting-started --key=${{ secrets.README_API_KEY }} --branch=1

- name: Sync doc/beginners-guide/ 🚀
uses: readmeio/rdme@v8
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
uses: readmeio/rdme@v10
with:
rdme: docs doc/beginners-guide --key=${{ env.README_API_KEY }} --version=1
rdme: docs upload ./doc/beginners-guide --key=${{ secrets.README_API_KEY }} --branch=1

- name: Sync doc/node-operators-guide/ 🚀
uses: readmeio/rdme@v8
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
uses: readmeio/rdme@v10
with:
rdme: docs doc/node-operators-guide --key=${{ env.README_API_KEY }} --version=1
rdme: docs upload ./doc/node-operators-guide --key=${{ secrets.README_API_KEY }} --branch=1

- name: Sync doc/developers-guide/ 🚀
uses: readmeio/rdme@v8
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
uses: readmeio/rdme@v10
with:
rdme: docs doc/developers-guide --key=${{ env.README_API_KEY }} --version=1
rdme: docs upload ./doc/developers-guide --key=${{ secrets.README_API_KEY }} --branch=1

- name: Sync doc/contributing-to-core-lightning/ 🚀
uses: readmeio/rdme@v8
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
uses: readmeio/rdme@v10
with:
rdme: docs doc/contribute-to-core-lightning --key=${{ env.README_API_KEY }} --version=1
rdme: docs upload ./doc/contribute-to-core-lightning --key=${{ secrets.README_API_KEY }} --branch=1
10 changes: 6 additions & 4 deletions doc/beginners-guide/backup-and-recovery/advanced-db-backup.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: "Advanced DB Backup"
slug: "advanced-db-backup"
excerpt: "Learn the various DB backup techniques."
hidden: false
title: Advanced DB Backup
slug: advanced-db-backup
content:
excerpt: Learn the various DB backup techniques.
privacy:
view: public
---

To recover in-channel funds, you need to use one or more of the backup strategies below.
Expand Down
10 changes: 6 additions & 4 deletions doc/beginners-guide/backup-and-recovery/hsm-secret.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: "HSM Secret"
slug: "hsm-secret"
excerpt: "Learn about various cool HSM secret methods."
hidden: false
title: HSM Secret
slug: hsm-secret
content:
excerpt: Learn about various cool HSM secret methods.
privacy:
view: public
---


Expand Down
10 changes: 6 additions & 4 deletions doc/beginners-guide/backup-and-recovery/recovery.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: "Wallet recovery"
slug: "recovery"
excerpt: "Learn about various recovery methods."
hidden: false
title: Wallet recovery
slug: recovery
content:
excerpt: Learn about various recovery methods.
privacy:
view: public
---


Expand Down
12 changes: 6 additions & 6 deletions doc/beginners-guide/backup.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Backup your wallet"
slug: "backup"
excerpt: "Learn the various backup options available for your Core Lightning node."
hidden: false
createdAt: "2022-11-18T16:28:17.292Z"
updatedAt: "2023-04-22T12:51:49.775Z"
title: Backup your wallet
slug: backup
content:
excerpt: Learn the various backup options available for your Core Lightning node.
privacy:
view: public
---

In Lightning, since _you_ are the only one storing all your financial information, you **_cannot_** recover this financial information from anywhere else.This means that on Lightning, **you have to** responsibly back up your financial information yourself, using various processes and automation.
Expand Down
12 changes: 6 additions & 6 deletions doc/beginners-guide/beginners-guide.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Running your node"
slug: "beginners-guide"
excerpt: "A guide to all the basics you need to get up and running immediately."
hidden: false
createdAt: "2022-11-18T14:27:50.098Z"
updatedAt: "2023-02-21T13:49:20.132Z"
title: Running your node
slug: beginners-guide
content:
excerpt: A guide to all the basics you need to get up and running immediately.
privacy:
view: public
---
## Starting `lightningd`

Expand Down
11 changes: 5 additions & 6 deletions doc/beginners-guide/opening-channels.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Opening channels"
slug: "opening-channels"
hidden: false
createdAt: "2022-11-18T16:26:57.798Z"
updatedAt: "2023-01-31T15:07:08.196Z"
title: Opening channels
slug: opening-channels
privacy:
view: public
---
First you need to transfer some funds to `lightningd` so that it can open a channel:

Expand Down Expand Up @@ -47,4 +46,4 @@ This opens a connection and, on top of that connection, then opens a channel.

The funding transaction needs 3 confirmations in order for the channel to be usable, and 6 to be announced for others to use.

You can check the status of the channel using `lightning-cli listpeers`, which after 3 confirmations (1 on testnet) should say that `state` is `CHANNELD_NORMAL`; after 6 confirmations you can use `lightning-cli listchannels` to verify that the `public` field is now `true`.
You can check the status of the channel using `lightning-cli listpeers`, which after 3 confirmations (1 on testnet) should say that `state` is `CHANNELD_NORMAL`; after 6 confirmations you can use `lightning-cli listchannels` to verify that the `public` field is now `true`.
11 changes: 5 additions & 6 deletions doc/beginners-guide/sending-and-receiving-payments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Sending and receiving payments"
slug: "sending-and-receiving-payments"
hidden: false
createdAt: "2022-11-18T16:27:07.625Z"
updatedAt: "2023-01-31T15:06:02.214Z"
title: Sending and receiving payments
slug: sending-and-receiving-payments
privacy:
view: public
---
Payments in Lightning are invoice based.

Expand All @@ -21,4 +20,4 @@ The sender can feed this `bolt11` string to the `decodepay` command to see what
lightning-cli pay <bolt11>
```

Note that there are lower-level interfaces (and more options to these interfaces) for more sophisticated use.
Note that there are lower-level interfaces (and more options to these interfaces) for more sophisticated use.
14 changes: 7 additions & 7 deletions doc/beginners-guide/watchtowers.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "Watchtowers"
slug: "watchtowers"
excerpt: "Defend your node against breaches using a watchtower."
hidden: false
createdAt: "2022-11-18T16:28:27.054Z"
updatedAt: "2023-02-02T07:13:57.111Z"
title: Watchtowers
slug: watchtowers
content:
excerpt: Defend your node against breaches using a watchtower.
privacy:
view: public
---
The Lightning Network protocol assumes that a node is always online and synchronised with the network. Should your lightning node go offline for some time, it is possible that a node on the other side of your channel may attempt to force close the channel with an outdated state (also known as revoked commitment). This may allow them to steal funds from the channel that belonged to you.

A watchtower is a third-party service that you can hire to defend your node against such breaches, whether malicious or accidental, in the event that your node goes offline. It will watch for breaches on the blockchain and punish the malicious peer by relaying a penalty transaction on your behalf.

There are a number of watchtower services available today. One of them is the [watchtower client plugin](https://github.com/talaia-labs/rust-teos/tree/master/watchtower-plugin) that works with the [Eye of Satoshi tower](https://github.com/talaia-labs/rust-teos) (or any [BOLT13](https://github.com/sr-gi/bolt13/blob/master/13-watchtowers.md) compliant watchtower).
There are a number of watchtower services available today. One of them is the [watchtower client plugin](https://github.com/talaia-labs/rust-teos/tree/master/watchtower-plugin) that works with the [Eye of Satoshi tower](https://github.com/talaia-labs/rust-teos) (or any [BOLT13](https://github.com/sr-gi/bolt13/blob/master/13-watchtowers.md) compliant watchtower).
9 changes: 4 additions & 5 deletions doc/contribute-to-core-lightning/code-generation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Code Generation"
slug: "code-generation"
hidden: false
createdAt: "2023-04-22T12:29:01.116Z"
updatedAt: "2024-01-18T12:44:47.814Z"
title: Code Generation
slug: code-generation
privacy:
view: public
---
The CLN project has a multitude of interfaces, most of which are generated from an abstract schema:

Expand Down
9 changes: 4 additions & 5 deletions doc/contribute-to-core-lightning/coding-style-guidelines.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Coding Style Guidelines"
slug: "coding-style-guidelines"
hidden: false
createdAt: "2023-01-25T05:34:10.822Z"
updatedAt: "2023-07-13T05:11:09.525Z"
title: Coding Style Guidelines
slug: coding-style-guidelines
privacy:
view: public
---
Style is an individualistic thing, but working on software is group activity, so consistency is important. Generally our coding style is similar to the [Linux coding style](https://www.kernel.org/doc/html/v4.10/process/coding-style.html).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Writing JSON Schemas"
slug: "writing-json-schemas"
hidden: false
createdAt: "2023-01-25T05:46:43.718Z"
updatedAt: "2024-01-18T15:36:28.523Z"
title: Writing JSON Schemas
slug: writing-json-schemas
privacy:
view: public
---
A JSON Schema is a JSON file which defines what a structure should look like; in our case we use it in our testsuite to check that they match command requests and responses, and also use it to generate our documentation.

Expand Down
12 changes: 6 additions & 6 deletions doc/contribute-to-core-lightning/contribute-to-core-lightning.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "CLN Architecture"
slug: "contribute-to-core-lightning"
excerpt: "Familiarise yourself with the core components of Core Lightning."
hidden: false
createdAt: "2022-11-18T14:28:33.564Z"
updatedAt: "2023-02-21T15:12:37.888Z"
title: CLN Architecture
slug: contribute-to-core-lightning
content:
excerpt: Familiarise yourself with the core components of Core Lightning.
privacy:
view: public
---
The Core Lightning project implements the lightning protocol as specified in [various BOLTs](https://github.com/lightning/bolts). It's broken into subdaemons, with the idea being that we can add more layers of separation between different clients and extra barriers to exploits.

Expand Down
12 changes: 6 additions & 6 deletions doc/contribute-to-core-lightning/contributor-workflow.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Contributor Workflow"
slug: "contributor-workflow"
excerpt: "Learn the practical process and guidelines for contributing."
hidden: false
createdAt: "2022-12-09T09:57:57.245Z"
updatedAt: "2023-07-12T13:40:58.465Z"
title: Contributor Workflow
slug: contributor-workflow
content:
excerpt: Learn the practical process and guidelines for contributing.
privacy:
view: public
---
## Build and Development

Expand Down
11 changes: 5 additions & 6 deletions doc/contribute-to-core-lightning/docker-images.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Docker Images"
slug: "docker-images"
hidden: false
createdAt: "2023-12-07T10:00:00.000Z"
updatedAt: "2023-12-07T10:00:00.000Z"
title: Docker Images
slug: docker-images
privacy:
view: public
---
# Setting up Docker's Buildx

Expand Down Expand Up @@ -131,4 +130,4 @@ docker exec -it <container-id-from-step2> bash
```shell
docker run -it --rm --platform=linux/amd64 --network=host -v '/root/.lightning:/root/.lightning' -v '/root/.bitcoin:/root/.bitcoin' -e LIGHTNINGD_DATA=/root/.lightning elementsproject/lightningd:latest --network=regtest

```
```
9 changes: 4 additions & 5 deletions doc/contribute-to-core-lightning/release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: "Release Checklist"
slug: "release-checklist"
hidden: false
createdAt: "2023-12-07T10:00:00.000Z"
updatedAt: "2023-12-07T10:00:00.000Z"
title: Release Checklist
slug: release-checklist
privacy:
view: public
---
# Release checklist

Expand Down
12 changes: 6 additions & 6 deletions doc/contribute-to-core-lightning/security-policy.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Security policy"
slug: "security-policy"
excerpt: "Learn how to responsibly report a security issue."
hidden: false
createdAt: "2022-12-09T09:58:38.899Z"
updatedAt: "2025-03-22T15:15:57.281Z"
title: Security policy
slug: security-policy
content:
excerpt: Learn how to responsibly report a security issue.
privacy:
view: public
---
## Supported Versions

Expand Down
Loading
Loading