mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-23 14:55:51 +01:00
cleanup whitespace in readme
This commit is contained in:
49
README.md
49
README.md
@@ -73,6 +73,7 @@ Alternatively you can also use the [Alby simnetwork](https://github.com/getAlby/
|
|||||||
|
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
|
|
||||||
LndHub.go supports PostgreSQL and SQLite as database backend. But SQLite does not support the same data consistency checks as PostgreSQL.
|
LndHub.go supports PostgreSQL and SQLite as database backend. But SQLite does not support the same data consistency checks as PostgreSQL.
|
||||||
|
|
||||||
## Prometheus
|
## Prometheus
|
||||||
@@ -116,6 +117,7 @@ Both incoming and outgoing keysend payments are supported. For outgoing keysend
|
|||||||
For incoming keysend payments, we are using a [custom TLV record with type `696969`](https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md#field-696969---lnpay), which should contain the hex-encoded `login` of the receiving user's account. TLV records are stored as json blobs with the invoices and are returned by the `/getuserinvoices` endpoint.
|
For incoming keysend payments, we are using a [custom TLV record with type `696969`](https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md#field-696969---lnpay), which should contain the hex-encoded `login` of the receiving user's account. TLV records are stored as json blobs with the invoices and are returned by the `/getuserinvoices` endpoint.
|
||||||
|
|
||||||
### Ideas
|
### Ideas
|
||||||
|
|
||||||
+ Using low level database constraints to prevent data inconsistencies
|
+ Using low level database constraints to prevent data inconsistencies
|
||||||
+ Follow double-entry bookkeeping ideas (Every transaction is a debit of one account and a credit to another one)
|
+ Follow double-entry bookkeeping ideas (Every transaction is a debit of one account and a credit to another one)
|
||||||
+ Support multiple database backends (PostgreSQL for production, SQLite for development and personal/friend setups)
|
+ Support multiple database backends (PostgreSQL for production, SQLite for development and personal/friend setups)
|
||||||
@@ -123,31 +125,30 @@ For incoming keysend payments, we are using a [custom TLV record with type `6969
|
|||||||
### Data model
|
### Data model
|
||||||
|
|
||||||
```
|
```
|
||||||
┌─────────────┐
|
┌─────────────┐
|
||||||
│ User │
|
│ User │
|
||||||
└─────────────┘
|
└─────────────┘
|
||||||
│
|
│
|
||||||
┌─────────────────┬───────┴─────────┬─────────────────┐
|
┌─────────────────┬───────┴─────────┬─────────────────┐
|
||||||
▼ ▼ ▼ ▼
|
▼ ▼ ▼ ▼
|
||||||
Accounts: ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
Accounts: ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||||||
│ Incoming │ │ Current │ │ Outgoing │ │ Fees │
|
│ Incoming │ │ Current │ │ Outgoing │ │ Fees │
|
||||||
Every user has └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
Every user has └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
||||||
four accounts
|
four accounts
|
||||||
|
|
||||||
Every Transaction Entry is associated to one debit account and one
|
Every Transaction Entry is associated to one debit account and one
|
||||||
credit account
|
credit account
|
||||||
|
|
||||||
┌────────────────────────┐
|
┌────────────────────────┐
|
||||||
│Transaction Entry │
|
│Transaction Entry │
|
||||||
│ │
|
│ │
|
||||||
│+ user_id │
|
│+ user_id │
|
||||||
┌────────────┐ │+ invoice_id │
|
┌────────────┐ │+ invoice_id │
|
||||||
│ Invoice │────────────────▶+ debit_account_id │
|
│ Invoice │────────────────▶+ debit_account_id │
|
||||||
└────────────┘ │+ credit_account_id │
|
└────────────┘ │+ credit_account_id │
|
||||||
│+ amount │
|
│+ amount │
|
||||||
Invoice holds the │+ ... │
|
Invoice holds the │+ ... │
|
||||||
lightning related │ │
|
lightning related │ │
|
||||||
data └────────────────────────┘
|
data └────────────────────────┘
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user