updating draft

This commit is contained in:
2022-11-22 19:58:51 -06:00
parent 238010750d
commit e413ab8970

View File

@@ -11,25 +11,57 @@ Creating interoperable liquidty API we can make integrations between LSPs easier
Request an inbound channel with a specific size and duration. Request an inbound channel with a specific size and duration.
##### Minimal order ##### Order
| Field | Description | Unit | | Field | Description | Unit | Required | Schema
|---|---|---| |---|---|---|---|---|
| min_size | minimum chan size i'm willing to sell ( | sats | | min_size | minimum chan size i'm willing to sell ( | sats |yes|integer|
| max_size | total available capacity | sats | max_size | total available capacity | sats |yes| integer |
| base_fee | fixed fee charged for lease | sats | base_fee | fixed fee charged for lease | sats | yes | integer
| rate_fee | example: size*0.002/duration | expressed as formula | rate_fee | example: size*0.002/duration | expressed as formula |yes|integer|
| min_duration | promise to keep open for minimum this amount of time / blocks | time | min_duration | promise to keep open for minimum this amount of time / blocks | time |yes| integer |
| chan_base_fee | promise to not charge greater than this base fee | sats | chan_base_fee | promise to not charge greater than this base fee | sats|yes| integer|
| chan_rate_fee | promise to not charge greater than this ppm | ppm | chan_rate_fee | promise to not charge greater than this ppm | ppm |yes|integer|
| pub_key | who is selling the liquidity | | pub_key | who is selling the liquidity | N/A|yes| string
| policy | additional optional information | | policy | additional optional information |N/A|no| string
#### Order example (with policies)
```
{
"min_size": "100000",
"max_size": "999999",
"base_fee": "12000",
"rate_fee": "size*0.002/min_duration",
"min_duration": "1440",
"chan_base_fee": "0",
"chan_rate_fee": "1337",
"pub_key": "0288037d3f0bdcfb240402b43b80cdc32e41528b3e2ebe05884aff507d71fca71a",
"policy": [
{
"name": "duration_unit",
"value": "blocks",
"info": "unit for min_duration on our platform is blocks"
},
{
"name": "fee_policy",
"value": "",
"info": "we have different fee tiers based on chan sizes, more at https://lsp.com/rates.html"
},
{
"name": "push_support",
"value": "true",
"info": "we support pushing part of the balance on your side, up to 2btc in size"
}
]
}
```
#### Policies #### Policies
Policy field is an json object that can include various different policies that are not mandatory and serve as an additional information provided. Spec covers a list of predefined policies for common use-cases. Policy field is an json object that can include various different policies that are **not mandatory** and serve as an additional information provided. Spec covers a list of predefined policies for common use-cases. Adding provider specific policies is supported and commonly used policies will be added to future versions of the spec.
##### Communitiy supported policies ##### Communitiy supported policies
1. **closing_policy** - under what conditions will you close the channels or leave it open 1. **closing_policy** - under what conditions will you close the channels or leave it open
@@ -38,17 +70,18 @@ Policy field is an json object that can include various different policies that
4. **min_htlc_size** - what is the min htlc size you'll be allowing on the chan, if you for example don't want to route 1sat payments over these chans 4. **min_htlc_size** - what is the min htlc size you'll be allowing on the chan, if you for example don't want to route 1sat payments over these chans
5. **reputation** - what reputation systems are you using and their links 5. **reputation** - what reputation systems are you using and their links
6. **push_support** - if you support pushing part of the balance to buyers side 6. **push_support** - if you support pushing part of the balance to buyers side
7. **duration_unit** - what units are you using for duration 7. **duration_unit** - what units are you using for `min_duration`
8. **contact** - contact information where node operator/lsp can be reached (tg/twitter/web) 8. **contact** - contact information where node operator/lsp can be reached (tg/twitter/web)
9. **location** - node location information 9. **location** - node location information
10. **tos** - where to find terms of use, legal, etc 10. **tos** - where to find terms of use, legal, etc
##### Policy structure ##### Policy schema
Policy format consists of three fields | Field | Description | Required | Schema
1. name -> standardized name in snake case, should be machine readable |---|---|---|---|
2. value -> machine readable value | name | snake case policy name | yes|string|
3. info -> human readable field with additional information | value | machine readable value | no|string/number|
| info | additional information | no|string|
##### Policy example ##### Policy example
@@ -68,8 +101,8 @@ Policy format consists of three fields
}, },
{ {
"name": "reputation", "name": "reputation",
"value": "bos=https://fulmo.org/bos-score.html,rank=https://terminal.lightning.engineering/", "value": "https://fulmo.org/bos-score.csv",
"info": "" "info": "https://fulmo.org/bos-score.html"
}, },
{ {
"name": "rate_fee_formula", "name": "rate_fee_formula",