Skip to content

Commit f99ecc3

Browse files
Initial site
1 parent 5cf6a3b commit f99ecc3

31 files changed

+11426
-2
lines changed

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1-
# lightningdevkit.org
2-
The dev website
1+
# Website
32

3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```console
8+
yarn install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
yarn start
15+
```
16+
17+
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

blog/2019-05-28-hola.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
slug: hola
3+
title: Hola
4+
author: Gao Wei
5+
author_title: Docusaurus Core Team
6+
author_url: https://github.com/wgao19
7+
author_image_url: https://avatars1.githubusercontent.com/u/2055384?v=4
8+
tags: [hola, docusaurus]
9+
---
10+
11+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

blog/2019-05-29-hello-world.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
slug: hello-world
3+
title: Hello
4+
author: Endilie Yacop Sucipto
5+
author_title: Maintainer of Docusaurus
6+
author_url: https://github.com/endiliey
7+
author_image_url: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
8+
tags: [hello, docusaurus]
9+
---
10+
11+
Welcome to this blog. This blog is created with [**Docusaurus 2 alpha**](https://v2.docusaurus.io/).
12+
13+
<!--truncate-->
14+
15+
This is a test post.
16+
17+
A whole bunch of other information.

blog/2019-05-30-welcome.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
slug: welcome
3+
title: Welcome
4+
author: Yangshun Tay
5+
author_title: Front End Engineer @ Facebook
6+
author_url: https://github.com/yangshun
7+
author_image_url: https://avatars0.githubusercontent.com/u/1315101?s=400&v=4
8+
tags: [facebook, hello, docusaurus]
9+
---
10+
11+
Blog features are powered by the blog plugin. Simply add files to the `blog` directory. It supports tags as well!
12+
13+
Delete the whole directory if you don't want the blog features. As simple as that!

docs/build_node.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
id: build_node
3+
title: Building a Node
4+
---
5+
6+
## Introduction
7+
In this guide, we'll be building a lightning node using LDK.
8+
9+
The completed sample node built in this guide is available at [TODO(val) insert link]. *Not intended for use in production.* This node is built using the Java bindings. See [TODO(val)] for all LDK language bindings options.
10+
11+
Whether your project is an existing bitcoin-only wallet or a lightning wallet, the core process for
12+
integrating LDK is the same.
13+
14+
The process breaks down to 3 overarching steps:
15+
1. Initializing LDK's channel, peer, chain monitoring, and (optionally) routing objects.
16+
* These objects will be parameterized by various other objects that can be from either your custom logic or one of LDK's supplied modules.
17+
<!-- 2. Starting loops to (a) poll for new peers and (b) tell LDK's channel and peer objects each time a minute passes, so they can properly maintain their state. -->
18+
2. Starting loops to (a) poll for new peers and (b) periodically nudge the channel and peer objects so they can properly maintain their state.
19+
* Specific instructions for existing lightning wallets is found in the Lightning Wallet Integration Guide.
20+
3. Connect and disconnect blocks to LDK as they come in.
21+
22+
## Requirements
23+
0. Some basic lightning knowledge like e.g. what a channel is, what force-closing means.
24+
1. A regtest bitcoind node (see [TODO(val) link to polar] for an easy way to spin this up)
25+
2. Java (this was tested using Java 11)
26+
<!-- 3. LDK's Java bindings jar [TODO link] in your class path -->
27+
TODO revise requirements
28+
29+
## Part 0: Setup
30+
Import the bindings to your Java file and define a `main()`:
31+
```java
32+
import org.ldk.impl.bindings;
33+
34+
public static void main(String[] args) {
35+
36+
}
37+
```
38+
39+
## Part 1: Managing Channels
40+
We'll start by initializing probably the most core struct to Rust-Lightning (see FAQs[TODO add link] for the difference between Rust-Lightning and LDK): the channel manager.
41+
42+
First, we'll initialize the objects that the channel manager is parameterized by.
43+
// fee estimator, chain_watch, tx broadcaster, logger, keys interface,
44+
45+
## Part 1: Chain Monitoring
46+
Every lightning implementation needs a way to watch for relevant transactions appearing on-chain.
47+
48+
### Setup
49+
But first, some housekeeping.
50+
51+
1. Within `main`, initialize a logger. A logger can be anything that satisfies the `LoggerInterface` interface [TODO add link]. In this case, we'll just print to the console.
52+
53+
```java
54+
public static void main(String[] args) {
55+
// LoggerInterface is a functional interface, so we can implement it with a lambda
56+
final logger = Logger.new_impl((String log) -> System.out.println(log));
57+
}
58+
```
59+
60+
2. Add an on-chain fee estimator, which is anything that satisfies the `FeeEstimatorInterface` interface [TODO add link]. We need this because LDK's chain monitoring logic is responsible for broadcasting force-close transactions.
61+
62+
```java
63+
..
64+
final fee_estimator = FeeEstimator.new_impl((
65+
```
66+
67+
3. Add a transaction broadcaster, which is anything that satisfies the `TransactionBroadcasterInterface` interface. We need this to broadcast the force-closing transaction if need be.
68+
```java
69+
..
70+
final tx_broadcaster =
71+
```
72+
73+
74+
4. Add a data persister, which is anything that satisfies the `PersisterInterface` interface. We need this because our chain monitoring system also needs to ensure that crucial channel data is pesisted to disk and/or backups.
75+
```java
76+
..
77+
final persister =
78+
```
79+
80+
We're now ready to initialize our chain monitor.
81+
82+
```java
83+
..
84+
final chain_monitor = ChainMonitor.constructor_new(null, tx_broadcaster, logger, fee_estimator, persister);
85+
```
86+
87+
Next, we'll add the feature of telling this object whenever we receive a connected or disconnected block.
88+
89+
90+
##

docs/custom_blockdata.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: custom_blockdata
3+
title: Customizing Blockchain Data
4+
---
5+
6+
TODO

docs/custom_key_mgmt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: custom_key_mgmt
3+
title: Customizing Key Management
4+
---
5+
6+
TODO

docs/custom_persist.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
id: custom_persist
3+
title: Customizing Data Persistence
4+
---
5+
6+
TODO

docs/doc1.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
id: doc1
3+
title: Overview
4+
slug: /
5+
---
6+
7+
Hi
8+
9+
Ideas:
10+
Integrating LDK
11+
Bitcoin-Only Wallet
12+
Lightning Wallet
13+
14+
LDK from Scratch: Walkthrough
15+
16+
Customizing LDK
17+
Persistence
18+
Networking
19+
Block Source
20+
Key Management
21+
22+
Language Bindings
23+
Java/Kotlin
24+
Swift
25+
26+
References
27+
Rust API Docs
28+
Sample Node

0 commit comments

Comments
 (0)