1
0

Add documentation to use ndlc

This commit is contained in:
nicolas.dorier
2020-11-21 11:37:51 +09:00
parent b0c5182248
commit a879a5ad60
2 changed files with 46 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ Available `BTCPAYGEN_ADDITIONAL_FRAGMENTS` currently are:
* [opt-add-electrum-ps](docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml), to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option `-txindex` is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable `EPS_XPUB` before enabling EPS for the first time (see above section on environment variables, and see [full documentation](https://docs.btcpayserver.org/ElectrumPersonalServer/) for details).
* [opt-add-configurator](docker-compose-generator/docker-fragments/opt-add-configurator.yml), to integrate the [BTCPay Server Configurator](https://install.btcpayserver.org) to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.
* [opt-add-pihole](docker-compose-generator/docker-fragments/opt-add-pihole.yml) ([See the documentation](docs/pihole.md))
* [opt-add-ndlc](docker-compose-generator/docker-fragments/opt-add-ndlc.yml) ([See the documentation](docs/ndlc.md))
* [opt-add-thunderhub](docker-compose-generator/docker-fragments/opt-add-thunderhub.yml) for a LND Lightning Node Manager in your Browser. Maintained by [apotdevin](https://github.com/apotdevin).
* [opt-add-teos](docker-compose-generator/docker-fragments/opt-add-teos.yml) for [The Eye Of Satoshi](https://github.com/talaia-labs/python-teos), a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.

45
docs/ndlc.md Normal file
View File

@@ -0,0 +1,45 @@
# NDLC support
DISCLAIMER: THIS PROJECT IS EXPERIMENTAL BASED ON A PROTOCOL WHICH IS STILL EVOLVING EVERYDAY. USE WITH CAUTION.
I WILL TAKE NO ATTEMPT AT MAINTAINING BACKWARD COMPATIBILITY AT THIS STAGE.
## Introduction
A DLC can be seen as a smart contract involving two `parties`, a future `event`, a set of outcomes and a `payoff function`.
An `outcome` can be `attested` by an `oracle`. The `oracle` does not need to interact with either party, and its only role is to `attest` the outcome of the event.
The `payoff function` determines the two parties' profit or loss depending on which outcome get `attested`.
The `oracle` roles is to define the `event` and `attest` a single outcome of the event.
Let's call Alice and Bob the two parties of the contract, and Olivia the oracle.
A DLC will show two transactions on the chain:
* The Funding Transaction
* The Contract Execution Transaction (CET)
The `Funding Transaction` is a transaction built by the two parties of the contract, locking their collateral for the contract.
The `Contract Execution Transaction` (or `CET`) is the transaction distributing the locked collateral according to the `payoff function` for the outcome attested by the oracle.
The following documentation is also explained in this video.
[<img src="https://img.youtube.com/vi/DakwshnNkho/mqdefault.jpg">](https://youtu.be/DakwshnNkho)
## How to use
You need to add ndlc's docker fragment to your install with:
```bash
BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-ndlc"
. btcpay-setup.sh -i
```
You can then use `ndlc-cli.sh` to run use ndlc-cli, for example:
```bash
ndlc.sh oracle generate MyOwnOracle
```
Read our documentation on our [github repository](https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md).