Git Product home page Git Product logo

lightningdevkit.org's Introduction

Lightning Dev Kit Documentation

Build Status

Build the Documentation Locally

In order to build the website locally, you'll need Node.js >= 14.16 (or basically the latest LTS version).

The setup is straight forward:

# Install dependencies
npm install

# Serve locally (by default on port 8080)
npm start

Text Highlights

There are three types of text highlights that can be used to display different colored boxes.

A green box displaying a friendly tip:

:::tip
foo
:::

A yellow box with a cautious warning:

:::warning
foo
:::

A red box with a clear danger, you can also add a title foo to any container:

:::danger foo
bar
:::

SEO improvements

We are using the Vuepress SEO plugin to add relevant meta tags to the site and individual pages.

To improve the meta attributes of a specific page, you can add them as YAML frontmatter like this: (see the WooCommerce page for an example)

---
description: How to integrate LDK
tags:
- WooCommerce
- WordPress
- Plugin
- eCommerce
---
# LDK integration

This document explains how to **integrate LDK into your stack**.

Embedding YouTube videos

To add a YouTube video with a preview, you can so so by linking to it like this:

[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/mqdefault.jpg)](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)

Note that the link item need to be a preview image (either from YouTube or a custom one) to result in an embedded video.

Check for broken links

The GitHub Actions pipeline checks for broken links after deploying the production site. You can also run the link check locally using npm run linkcheck:local. The dev server needs to be running alongside for this to work.

lightningdevkit.org's People

Contributors

22388o avatar adamjonas avatar andrei-21 avatar arik-so avatar benthecarman avatar conorokus avatar dennisreimann avatar dunxen avatar epysqyli avatar haleyberkoe avatar jkczyz avatar joelklabo avatar jordan-bravo avatar lsilva01 avatar marnixcroes avatar mattoshibtc avatar moneyball avatar rloomba avatar roy0anonymous avatar rynonl avatar thebluematt avatar tnull avatar valentinewallace avatar wpaulino avatar wuerges avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lightningdevkit.org's Issues

Writing tests for interactions with LDK

We should look to create a dedicated section on testing.

Currently, it's difficult to write tests for things like opening channels as it requires a second node.

Some things we might include in this section:

  • Testing overview, tradeoffs, recommended testing tools
  • Testing recipes, common patterns for testing with LDK
  • Testing environments, mocking functions, mocking modules

Revamp "Build a Node" guide

  • Make all the overall steps Headers rather than checkboxes
  • Make all the information visually hierarchical -- all information/code samples that fall within the header should be indented hierarchically
  • Make key-value information more visually keyed-/value'd. i.e. "Dependencies: ChannelManager" becomes "Dependencies: ChannelManager
  • All code things that are currently formatted like: "channel manager," "peer manager" should become ChannelManager, PeerManager (i.e. code format all the things)
  • Parts of the code samples that are formatted like "<insert X code here>" should be in comments, and prefixed by TODO so syntax highlighting highlights them
  • Don't combine multiple examples into the same code sample, split them
  • Reorder the information in each step of Setup to be: 1. description, 2. code example, 3. dependencies, 4. references.
  • 80col all code examples and comments therein

Vuepress: Add Algolia DocSearch

Once the Vuepress version (currently on the develop branch) is live, we can apply for Algolia Docsearch, which will be a major enhancement of the search. The current search just covers the headline content, Algolia does fulltext search.

Clarify LDK vs. rust-lightning

We currently say "LDK/Rust-Lightning is a generic library which allows you to build a lightning node without needing to..." under Getting Started. I think we should do one of the following:

  1. Only refer to it as LDK on the website
  2. Explain what LDK is and what rust-lightning is then use them consistently on the website

Add further updates to website design

This is an issue is to help us track, improve and implement further visual aspects of the website. Most of what we need is there, but it's important to get the base/template as solid as possible as it will be used by the BDK project. We are looking to make updates in the following areas.

  • The title fonts seem to be randomly missing pixels, a rendering issue?
  • Remove the expanding sidebar as it's difficult to tell what is part of the current article and what links out to other pages. (Discussion needed)
  • Support for a blog page
  • #58
  • #60

Add a Topic index

Our documentation about a specific feature (e.g zero-conf chan) might be an advanced, subsection of the "Opening a channel" one, thus making it hard to find the information.

Once the website is more stuffed, it could be cool to add a topic index, like https://bitcoinops.org/en/topics/

Add a Community section

The LDK project start to be spread across different repositories. Also the type of helpful contributions start to expand (technical writing, infrastructure deployment, product management).

I think we should consider adding a Community section on the website telling about the project history, the modules, their milestones and where to engage with other community participants.

As a reference : https://docs.btcpayserver.org/Contribute/

Create LDK implementation comparison table

Create a table showing the different trade-offs LDK-based implementations have made e.g (Sensei, lnrod, lnq). Based on block sourcing, networking, entropy, pathfinding etc

Vuepress: Features section on homepage

We need to change include the Features section on the landing page. Still need to identify what we want on there.

@ConorOkus proposed a grid layout with each feature linking out to its own page in the docs. Similar to the Why Next.js section in their docs. Open for discussion.

Add Contribution guide

Addition of a beginner-friendly contribution section for anyone looking to contribute to the technical documentation of the site. With some reference from here

I could set it up

Revamp Overview + Getting Started sections

I'm not sure that what's currently in these sections makes sense. Seems like Overview should be more of an overview of LDK or maybe an index of the docs? Maybe take inspiration from Firebase Overview section or Stripe Overview.

And seems like Getting Started is more of an Architecture section, so should be renamed. If Overview becomes an index/entrypoint to the docs, then maybe Getting Started is unnecessary.

In any case, these two sections need some rethinking.

Update Keep LDK Up-to-date with Chain Info

Update this section to make it clear the channel monitor will forward requests through to the chain monitors.

Users should make sure the channel monitors are all the same best hash before they start using the chain monitor.

Vuepress: Integrate footer

@ConorOkus Can you provide some more details on what should be in the footer? For now I haven't done much there, because I found it not necessary to repeat the links from the top navbar.

Update Getting Started copy

We say "We are currently working on a demo node which fetches blockchain data and on-chain funds via Bitcoin Core RPC/REST."

I believe this text is out of date. I think it was written when we didn't yet have a completed sample, but now we have one. Of course we'll always be "currently working" on all aspects of the software, but I think we shouldn't suggest the sample isn't yet complete or ready to use.

Clarify NetGraphMsgHandler in diagram

Screen Shot 2021-04-13 at 10 09 27 AM

Jeff: "when I made the diagram, using the name NetGraphMsgHandler seemed a bit too low-level. It is a struct that implements the RoutingMessageHandler trait, so "Routing" seemed like a better name to use there"

Add explicit code examples for Event Handling

We currently make it clear that multiple types of events need to be handled, but the user has to do some external digging to the site to find examples of how to do this here.

In general, I think we should break up our guides/tutorials into separate pages to allow more room to add these code examples directly into the docs e.g Initialize the ChannelManagerPersister would have its own page with example code for each type of event handling.

Provide best practices guidance on mobile UX for sending payments

(a) use optimal mobile OS APIs to background sync
(b) when app is brought to foreground, prioritize LN network graph data sync
(c) then download remaining block data

Because LN payments can be sent without having the blockchain sync'd (step c). So b should be prioritized over c since that data is required for sending, then by allowing users to send after b but before c there is less latency for the user (ideally none if step a works well and/or step b is fast).

Destination + Shutdown Scripts

shutdown_script is used for our funds when negotiating a channel close and destination_script is used if LDK needs to sweep funds when the counterparty goes to the chain because if we don't they can take them after a delay.

They're stored as a part of the channel, and fetched when channel opens and stored for the duration and only used on close

Add "Using LDK" guide

  • remove "Using LDK" section from main "Build a Node" guide
  • add separate guide with:
  • opening a channel (public + private)
  • [force]closing a channel
  • sending a payment to an invoice
  • list [usable] channels
  • list peers
  • get node pubkey
  • get invoice
  • connect peer

Should be the same format as "Build a Node" guide w/ Rust code samples taken from the sample + modified to suit the docs, but should also the existing docs Java samples, especially Matt's "Opening a Channel" Java sample.

Improvements for Key Management Guide

  • Highlight the fact we expect users to implement their own KeysInterface but use InMemorySigner for channel-specific parts.
  • Some recommendations for transferring state to a separate node/wallet implementation given, spending logic requires a lot of custom logic
  • LDK will always require the user to provide the initial randomness from which things like this can be derived for the default KeysManager
  • What gets persisted so that channel keys can be recovered on restart?
  • What is needed to rederive keys
    • channel_keys_id for the Signer?
    • seed for KeysManager

Vuepress: Change the colour scheme

Remove the blue/purple as it's similar to what Square Crypto and Lightning Labs use.
Let's experiment with the green the current site is using or some other alternative.

Revamp "Open a Channel"

Rather than just a big code block with comments, this section should be broken up into steps with headers, explanations, and code samples -- along the lines of the Build a Node guide.

Syntax highlighting is unreadable within "Tip" blocks when viewed in light mode

The syntax highlighting of <code> elements within a div.custom-block tip has white text with a light background, and can't be read without manually highlighting with the mouse cursor. I suggest a darker color for syntax highlights when they are contained in a tip block in light mode. Replicated in Brave and Firefox on macOS.

Screen Shot 2021-10-29 at 10 52 07 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.