Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update #67

Merged
merged 22 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from 14 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
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ The rest of the files in this repo are the standard Jekyll site files.

## Running the site locally

### Prerequisites

You're going to need:

- **Linux or OS X** — Windows may work, but is unsupported.
- **Ruby, version 2.2.5 or newer**
- **Bundler** — If Ruby is already installed, but the `bundle` command doesn't work, just run `gem install bundler` in a terminal.

### Running locally

```shell
git clone https://github.com/lightninglabs/lightning-dev-site
```
Install Jekyll:
```
$ gem install jekyll bundler
Expand All @@ -32,6 +45,8 @@ Run the site and watch for changes:
```
$ bundle exec jekyll serve
```
* If running remotely add: `--host=0.0.0.0`


## Regenerating documentation

Expand All @@ -40,12 +55,17 @@ $ bundle exec jekyll serve
pip install Jinja2
```

# Get the latest INSTALL.md
### Get the latest INSTALL.md
```shell
curl -o INSTALL.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/INSTALL.md
```

# Get the latest gRPC guides
### Fetch the latest Docker guide
```shell
curl -o DOCKER-README.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docker/README.md
```

### Get the latest gRPC guides
```shell
curl -o python.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/grpc/python.md
curl -o javascript.md -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/docs/grpc/javascript.md
Expand Down
6 changes: 3 additions & 3 deletions _pages/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ A quick summary of test practices follows:
or RPC's will need to be accompanied by integration tests which use the
[`networkHarness`framework](https://github.com/lightningnetwork/lnd/blob/master/lntest/harness.go)
contained within `lnd`. For example integration tests, see
[`lnd_test.go`](https://github.com/lightningnetwork/lnd/blob/master/lnd_test.go#L181).
[`lnd_test.go`](https://github.com/lightningnetwork/lnd/blob/master/lntest/itest/lnd_test.go#L203).

Throughout the process of contributing to `lnd`, you'll likely also be
extensively using the commands within our `Makefile`. As a result, we recommend
Expand Down Expand Up @@ -376,7 +376,7 @@ Functions should _not_ just be laid out as a bare contiguous block of code.

#### 4.7. Protobuf Compilation

The `lnd` project uses `protobuf`, and its extension [`gRPC`](www.grpc.io) in
The `lnd` project uses `protobuf`, and its extension [`gRPC`](https://www.grpc.io/) in
several areas and as the primary RPC interface. In order to ensure uniformity
of all protos checked, in we require that all contributors pin against the
_exact same_ version of `protoc`. As of the writing of this article, the `lnd`
Expand Down Expand Up @@ -490,7 +490,7 @@ you rework the code, but generally you will simply be given feedback for you to
make the necessary changes.

During the process of responding to review comments, we prefer that changes be
made with [fixup commits](https://robots.thoughtbot.com/autosquashing-git-commits).
made with [fixup commits](https://thoughtbot.com/blog/autosquashing-git-commits).
The reason for this is two fold: it makes it easier for the reviewer to see
what changes have been made between versions (since Github doesn't easily show
prior versions like Critique) and it makes it easier on the PR author as they
Expand Down
24 changes: 19 additions & 5 deletions _pages/lapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,19 @@ Check out the [Zap website](https://zap.jackmallers.com/) or read the code on
cryptocurrencies.
openoms marked this conversation as resolved.
Show resolved Hide resolved
* [Free DNS Demo](http://freedns.lightning-network.ro/): Purchase subdomains
openoms marked this conversation as resolved.
Show resolved Hide resolved
with off-chain payments.
* [HodlHodl.com](https://HodlHodl.com): Peer-to-peer cryptocurrency exchange with Lightning integration.
* [Zigzag](http://zigzag.bitlum.io/): Cryptocurrency trading using Lightning
(custodial)
* [lntxbot](https://telegram.me/lntxbot) Lightning integration to Telegram with
tipping, send and receive and satellite API usage (custodial).
* [paywall.link](https://paywall.link/) Put any website behind a paywall and pay with Lightning.

### Lightning network explorers

* [1ml.com](https://1ml.com/)
* [explore.casa](https://explore.casa/)
* [explorer.acinq.co](https://explorer.acinq.co/)
* [ln.alhur.es](https://ln.alhur.es/)

### Protocol Services

Expand All @@ -60,7 +71,6 @@ Check out the [Zap website](https://zap.jackmallers.com/) or read the code on
* [lnd.fun](http://lnd.fun/): Panel for webmasters to manage their full lightning node.
<img src="/assets/lapps/lnd.fun.png" alt="Screenshot of lnd.fun dashboard home view" style="max-width: 50%;"/>
* [kibana](https://stats.preimage.net/): Visualization of the Lightning Network
* [1ML](https://1ml.com/): Lightning Network search and analysis engine

### Developer Tools

Expand All @@ -83,6 +93,8 @@ Check out the [Zap website](https://zap.jackmallers.com/) or read the code on
tipbot
* [CoinTippy](http://cointippy.com/): Custodial tip bot available on
multiple platforms, including Reddit, Twitter, and Telegram.
* [LightningPay-PHP](https://github.com/robclark56/lightningPay-PHP): PHP plugin for eCommerce website to add _Pay by Lightning_ to accept order payments via the Lightning Network.
* [Tippin.me](https://tippin.me/) LN tips integrated to Twitter (custodial)

### Gaming
* [Hammercoin](https://hammerco.in/): A role-playing game using Lightning for
Expand All @@ -95,10 +107,13 @@ Check out the [Zap website](https://zap.jackmallers.com/) or read the code on
article](https://coinjournal.net/you-can-go-on-a-digital-treasure-hunt-for-bitcoin-in-minecraft/)
* [Lightning Gem](https://lightninggem.com/): Betting game using Lightning for
payments
* [Kriptode.com](https://kriptode.com/) Lightning based games and more.
* [Satoshis.place](https://satoshis.place/) Internet graffiti paid with Lightning
* [Thunderdice](http://thunderdice.ws/): Off-chain SatoshiDice

<img src="/assets/lapps/thunderdice.png" alt="Screenshot of Thunder Dice Homepage" style="max-width: 50%;"/>


### Eclair Lapps

Eclair is a Scala implementation of the Lightning Network built by [ACINQ](https://acinq.co/)
Expand Down Expand Up @@ -152,7 +167,6 @@ c-lightning is a specification-compliant LN implementation in C, under the

### Requests

If you would like your Lightning app considered for this page, please email a
link and one sentence description of your app to
[[email protected]](mailto:[email protected]). If applicable,
please specify which Lightning implementation it is built on.
If you would like your Lightning app considered for this page, please share a
link and a one sentence description of your app on the [LND Developer Slack](https://join.slack.com/t/lightningcommunity/shared_invite/enQtMzQ0OTQyNjE5NjU1LWRiMGNmOTZiNzU0MTVmYzc1ZGFkZTUyNzUwOGJjMjYwNWRkNWQzZWE3MTkwZjdjZGE5ZGNiNGVkMzI2MDU4ZTE)
openoms marked this conversation as resolved.
Show resolved Hide resolved
If applicable, please specify which Lightning implementation it is built on.
26 changes: 11 additions & 15 deletions _pages/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ permalink: /overview/
### Introduction

The LND Overview and Developer Guide aims to provide *just* enough information
about LND to enable readers to build applications. It start with a conceptual
about LND to enable readers to build applications. It starts with a conceptual
review of the Lightning Network, before jumping into the important aspects of
working with specifically LND. If you are already comfortable with how the
working specifically with LND. If you are already comfortable with how the
Lightning Network works, feel free to skip down to the [Components](#components)
section. The command line examples are for illustrative purposes only and will
be covered in more depth in the [installation guide](/guides/installation/) and
Expand Down Expand Up @@ -64,7 +64,7 @@ the underlying blockchain, but with modern data processing and latency limits -
payments can be made nearly as quickly as packets can be sent.

Hash Time-Locked Contracts (HTLCs) allow transactions to be sent between parties
who do not have a direct channels by routing it through multiple hops, so anyone
who do not have a direct channel by routing it through multiple hops, so anyone
openoms marked this conversation as resolved.
Show resolved Hide resolved
connected to the Lightning Network is part of a single, interconnected global
financial system.

Expand Down Expand Up @@ -215,7 +215,7 @@ security, we generally want to keep as little as possible in hot wallets, and as
much as possible in cold wallets.

It is possible to construct Lightning channels where the keys are cold, but they
would need to be brought back online you conduct a channel update. Only with hot
would need to be brought back online to conduct a channel update. Only with hot
wallets can the Lightning Network attain a high volume of transactions.

This is only a surface level introduction to Lightning integration. For a more
Expand Down Expand Up @@ -249,11 +249,7 @@ layers we encounter when reasoning about `lnd`:
#### Software Components

There are distinct software components we should be aware of when developing on
- `btcd` / `btcutil`: `lnd` currently uses [`btcd` roasbeef
fork](https://github.com/roasbeef/btcd) to interface with the underlying
blockchain. `btcd` comes with `btcutil`, also [roasbeef
fork](https://github.com/Roasbeef/btcutil), that allows us to drive `btcd`
from the command line.
- [`btcd`](https://github.com/btcsuite/btcd) or [`bitcoind`](https://github.com/bitcoin/bitcoin) is used by `lnd` to interface with the underlying blockchain.
- `lnd` / `lncli`: LND stands for Lightning Network Daemon and serves as the
main software component driving the Lightning Network. It manages a database,
connects to peers, opens / closes channels, generates payment invoices, sends,
Expand All @@ -262,9 +258,9 @@ There are distinct software components we should be aware of when developing on
- [Neutrino](https://github.com/lightninglabs/neutrino) is an experimental
Bitcoin light client designed to support Lightning mobile clients. This is a
wallet UI usable with `lnd`. Neutrino is not required from an application
development standpoint, but can be regarded as the primary way the LND end
user interacts with the Lightning Network and thus and applications built on
top of it.
development standpoint, but can be regarded as the primary way for the
openoms marked this conversation as resolved.
Show resolved Hide resolved
end-user of `lnd` to interact with the Bitcoin Network and the applications
built on top of it.

#### LND Interfaces

Expand All @@ -274,12 +270,12 @@ There are several ways to drive `lnd`.
instantaneously. A full list of commands can be viewed with `lncli --help`.
To see a breakdown of the parameters for a particular command, run
`lncli <command> --help`
- gRPC is the preferred programmatic way interact with `lnd`. It includes simple
- gRPC is the preferred programmatic way to interact with `lnd`. It includes simple
methods that return a response immediately, as well as response-streaming and
bidrectional streaming methods. Check out the guides for working with gRPC for
[Python](/guides/python-grpc/) and [Javascript](/guides/javascript-grpc/)
- LND also features a REST proxy someone can use if they are accustomed to
standard RESTful APIs. However, gRPC is higher performance and can provide
standard RESTful APIs. However, gRPC has higher performance and can provide
openoms marked this conversation as resolved.
Show resolved Hide resolved
real-time notifications.

All of these LND interfaces are documented in the [API
Expand Down Expand Up @@ -362,7 +358,7 @@ not attempt them. This will affect any web application with `lnd` integration,
since if an invoice for a good or service is not fulfilled within the given
timeframe, a new one should be generated.

Other possibly unexpected rules include that the payee should accept up the
Other possibly unexpected rules include that the payee should accept up to
twice the amount encoded in the transaction, so that the payer can make payments
harder to track by adding in small variations.

Expand Down
5 changes: 1 addition & 4 deletions _pages/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,4 @@ for anyone's needs.


If something important is missing, or you feel that additional resources or
links would be helpful, please email [Max
Fang](mailto:[email protected]) or message him on the Lightning
Community Slack.

links would be helpful, please send a message in the [LND Developer Slack](https://join.slack.com/t/lightningcommunity/shared_invite/enQtMzQ0OTQyNjE5NjU1LWRiMGNmOTZiNzU0MTVmYzc1ZGFkZTUyNzUwOGJjMjYwNWRkNWQzZWE3MTkwZjdjZGE5ZGNiNGVkMzI2MDU4ZTE)
53 changes: 25 additions & 28 deletions guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,60 +32,57 @@ title: Installation
* **Go:** `lnd` is written in Go. To install, run one of the following commands:


**Note**: The minimum version of Go supported is Go 1.11. We recommend that
users use the latest version of Go, which at the time of writing is
[`1.11`](https://blog.golang.org/go1.11).
**Note**: The minimum version of Go supported is Go 1.11. We recommend to use 1.12.8 version of Go. The most recent v1.13 will be supported from lnd v0.8.0-beta.


On Linux:
```bash
wget https://dl.google.com/go/go1.12.8.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.12.8.linux-amd64.tar.gz
```
sudo apt-get install golang-1.11-go
```
> Note that golang-1.11-go puts binaries in /usr/lib/go-1.11/bin. If you want them on your PATH, you need to make that change yourself. Alternatively, you can run:
```
sudo ln -s /usr/lib/go-1.11/bin/go /usr/local/bin/go
```

On Mac OS X:
```
```bash
brew install go
```

On FreeBSD:
```
```bash
pkg install go
```

Alternatively, one can download the pre-compiled binaries hosted on the
[golang download page](https://golang.org/dl/). If one seeks to install
from source, then more detailed installation instructions can be found
The pre-compiled binaries are hosted on [golang download page](https://golang.org/dl/).
If one seeks to install from source, then more detailed installation instructions can be found
openoms marked this conversation as resolved.
Show resolved Hide resolved
[here](http://golang.org/doc/install).

At this point, you should set your `$GOPATH` environment variable, which
represents the path to your workspace. By default, `$GOPATH` is set to
`~/go`. You will also need to add `$GOPATH/bin` to your `PATH`. This ensures
that your shell will be able to detect the binaries you install.
At this point, you should set your `PATH` environment variable so that your
shell will be able to detect the binaries you install:

```bash
export PATH=$PATH:/usr/local/go/bin
```
By default `GOPATH` is assumed to be `$HOME/go`. If you want to use a custom location as your
workspace, you can set the GOPATH environment variable:
```bash
export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin
```

We recommend placing the above in your .bashrc or in a setup script so that
you can avoid typing this every time you open a new terminal window.
It is recommended to place the above in your `/etc/profile` (for a system-wide installation),
in `$HOME/.profile` or in a setup script so that you can avoid typing this every time you
open a new terminal window.

* **go modules:** This project uses [go modules](https://github.com/golang/go/wiki/Modules)
to manage dependencies as well as to provide *reproducible builds*.

Usage of go modules (with go 1.11) means that you no longer need to clone
Usage of go modules means that you no longer need to clone
`lnd` into your `$GOPATH` for development purposes. Instead, your `lnd`
repo can now live anywhere!

### Installing lnd

With the preliminary steps completed, to install `lnd`, `lncli`, and all
related dependencies run the following commands:
```
```bash
go get -d github.com/lightningnetwork/lnd
cd $GOPATH/src/github.com/lightningnetwork/lnd
make && make install
Expand All @@ -99,7 +96,7 @@ For Windows WSL users, make will need to be referenced directly via
/usr/bin/make/, or alternatively by wrapping quotation marks around make,
like so:

```
```bash
/usr/bin/make && /usr/bin/make install

"make" && "make" install
Expand All @@ -109,15 +106,15 @@ On FreeBSD, use gmake instead of make.

Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
used directly:
```
```bash
GO111MODULE=on go install -v ./...
```

**Updating**

To update your version of `lnd` to the latest version run the following
commands:
```
```bash
cd $GOPATH/src/github.com/lightningnetwork/lnd
git pull
make clean && make && make install
Expand All @@ -127,7 +124,7 @@ On FreeBSD, use gmake instead of make.

Alternatively, if one doesn't wish to use `make`, then the `go` commands can be
used directly:
```
```bash
cd $GOPATH/src/github.com/lightningnetwork/lnd
git pull
GO111MODULE=on go install -v ./...
Expand All @@ -136,7 +133,7 @@ GO111MODULE=on go install -v ./...
**Tests**

To check that `lnd` was installed properly run the following command:
```
```bash
make check
```

Expand Down
2 changes: 1 addition & 1 deletion guides/javascript-grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ client.getInfo({}, (err, res) => { ... });
### Conclusion

With the above, you should have all the `lnd` related `gRPC` dependencies
installed locally in your project. In order to get up to speed with `protofbuf`
installed locally in your project. In order to get up to speed with `protobuf`
usage from Javascript, see [this official `protobuf` reference for
Javascript](https://developers.google.com/protocol-buffers/docs/reference/javascript-generated).
Additionally, [this official gRPC
Expand Down
2 changes: 1 addition & 1 deletion guides/python-grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ stub.GetInfo(ln.GetInfoRequest())

With the above, you should have all the `lnd` related `gRPC` dependencies
installed locally into your virtual environment. In order to get up to speed
with `protofbuf` usage from Python, see [this official `protobuf` tutorial for
with `protobuf` usage from Python, see [this official `protobuf` tutorial for
Python](https://developers.google.com/protocol-buffers/docs/pythontutorial).
Additionally, [this official gRPC
resource](http://www.grpc.io/docs/tutorials/basic/python.html) provides more
Expand Down
2 changes: 1 addition & 1 deletion render.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/local/bin/python2.7
#!/usr/bin/python2.7
from jinja2 import Environment, FileSystemLoader, select_autoescape


Expand Down
Loading