You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,8 @@ Pool is a non-custodial marketplace where users can buy inbound liquidity from n
45
45
46
46
Taro is a Taproot-powered protocol for issuing assets on the bitcoin blockchain that can be transferred over the Lightning Network for instant, high volume, low fee transactions.
Lightning Service Authentication Tokens cleverly combine the capabilities of macaroons with that of a Lightning payment, making it easy to charge satoshis for API requests.
Copy file name to clipboardExpand all lines: community-resources/glossary.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -348,13 +348,13 @@ Loop Out is the process of making a Lightning payment and receiving an equivalen
348
348
349
349
The Lightning Service Authentication Token (LSAT) combines [Macaroons](glossary.md#macaroon) with [preimages](glossary.md#preimage) as proof of payment to create tickets for paid APIs or other services that require authentication and payment.
350
350
351
-
[Read more: LSAT](../the-lightning-network/lsat/)
351
+
[Read more: LSAT](../the-lightning-network/l402/)
352
352
353
353
## Macaroon
354
354
355
355
Macaroons are bearer credentials that allow for detailed attenuation as well as delegation.
Fill in some info for the _Username_, _Title_, and _Content_ fields, then click on the **Submit** button. You will be redirected back to the screen displaying the list of posts.
25
25
26
-
.png>)
26
+

27
27
28
28
Add a couple more posts, just to have some data to play with.
29
29
30
-
.png>)
30
+

31
31
32
32
Click on the **Upvote** button on a post to see the votes counter increment and the posts reorder based on which has the highest votes.
33
33
34
-
.png>)
34
+

35
35
36
36
The app makes use of WebSockets to update the UI in real-time when posts are created and upvoted on the backend. To see this in action, open a second browser window side-by-side with the first window. Create a new post on the left to see it automatically appear on the right. Upvote a post on the right to see it increment and reorder on the left automatically.
37
37
38
-
.png>)
38
+

39
39
40
40
## Architecture
41
41
42
42
This application is split into two parts, the backend API server and the frontend browser-based UI.
Copy file name to clipboardExpand all lines: lightning-network-tools/lightning-terminal/accounts.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ description: >-
6
6
7
7
# LND Accounts
8
8
9
-
Using litd, users are able to create virtual off-chain accounts on top of their LND node, each with their own [macaroon](../../the-lightning-network/lsat/macaroons.md) and spending rules, such as spending limits or an expiration date.
9
+
Using litd, users are able to create virtual off-chain accounts on top of their LND node, each with their own [macaroon](../../the-lightning-network/l402/macaroons.md) and spending rules, such as spending limits or an expiration date.
10
10
11
11
The accounts feature does not validate whether the sum of all account balances is smaller or equal to the channel balance held in the underlying LND node. A user issued such an account enters a trust relationship with the node operator regarding availability of the funds and the node. The account balances are tracked and enforced by LND.
Copy file name to clipboardExpand all lines: lightning-network-tools/lightning-terminal/loop-fees.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ A Loop Out allows you to trade your off-chain balance for on-chain bitcoin. Ther
19
19
20
20
Loop will give us an estimate over the fees we are expected to pay before we confirm our swap. These fees depend on transaction size and current demand for on-chain payments and fall into three categories:
21
21
22
-
**LSAT**: When you perform your first Loop your node will purchase an [LSAT](../../the-lightning-network/lsat/). This LSAT does not expire and costs 1 satoshi.
22
+
**LSAT**: When you perform your first Loop your node will purchase an [LSAT](../../the-lightning-network/l402/). This LSAT does not expire and costs 1 satoshi.
23
23
24
24
**Estimated on-chain fee**: This is the fee you are expected to pay in miners fees to claim your bitcoin from the [HTLC address](../../the-lightning-network/multihop-payments/understanding-submarine-swaps.md#3.-claim-bitcoin-from-the-smart-contract) into your personal wallet. This fee is calculated based on current on-chain fee conditions and may be higher if by the time the Loop Out concludes the mempool is significantly more congested. Larger transaction sizes do not increase this fee, but faster desired confirmation times do.
Copy file name to clipboardExpand all lines: lightning-network-tools/lightning-terminal/pool.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ To open the account, click on ‘Open an Account’ on the left bar of Lightning
18
18
19
19
If you want to primarily sell channels, the funds in your Pool account need to be able to cover the capacity of the channels you intend to sell. If you are only buying channels, you only need to commit enough to cover the fees.
20
20
21
-
To authenticate your account to the Pool server, your node will purchase an [LSAT](../../the-lightning-network/lsat/) for 1000 satoshis. This transaction is made over the Lightning Network and you will be able to see it in your Dashboard.
21
+
To authenticate your account to the Pool server, your node will purchase an [LSAT](../../the-lightning-network/l402/) for 1000 satoshis. This transaction is made over the Lightning Network and you will be able to see it in your Dashboard.
Copy file name to clipboardExpand all lines: lightning-network-tools/lnd/macaroons.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ description: >-
8
8
9
9
LND, Loop, Pool and litd all use macaroons to authenticate RPC calls. Macaroons are similar to cookies in that they are bearer instruments, but they can be more easily verified by the server using HMACs and a root key alone. They can also be attenuated, both by the server and by the user. This greatly simplifies how LND authenticates RPC calls while expanding the detail in which authority over specific RPC calls is permissioned.
10
10
11
-
[Learn more about Macaroons here.](../../the-lightning-network/lsat/macaroons.md)
11
+
[Learn more about Macaroons here.](../../the-lightning-network/l402/macaroons.md)
12
12
13
13
## The default macaroons <ahref="#docs-internal-guid-ad1fdcaf-7fff-adcf-644d-0f14be97523e"id="docs-internal-guid-ad1fdcaf-7fff-adcf-644d-0f14be97523e"></a>
Copy file name to clipboardExpand all lines: the-lightning-network/l402/README.md
+11-12
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,16 @@
1
1
---
2
2
description: >-
3
-
Lightning Service Authentication Tokens cleverly combine the capabilities of
4
-
macaroons with that of a Lightning payment, making it easy to charge satoshis
5
-
for API requests.
3
+
Lightning API keys cleverly combine the capabilities of macaroons with that of
4
+
a Lightning payment, making it easy to charge satoshis for API requests.
6
5
---
7
6
8
-
# LSAT
7
+
# L402: Lightning HTTP 402 Protocol
9
8
10
-
LSAT is a new standard to support the use case of charging for services and authenticating users in distributed networks. It combines the strengths of Macaroons for better authentication with the strengths of the Lightning Network for better payments.
9
+
L402 is a standard to support the use case of charging for services and authenticating users in distributed networks. It combines the strengths of Macaroons for better authentication with the strengths of the Lightning Network for better payments.
11
10
12
-
Aperture is an implementation of this standard. It functions as a reverse HTTP proxy with support for gRPC and REST requests. It allows the safe and efficient creation of paid APIs that separate the logic of payments, permissioning and fulfilling requests. Aperture is used today by Lightning [Loop](../../lightning-network-tools/loop/)and [Pool](../../lightning-network-tools/pool/), a non-custodial swap service for Bitcoin.
11
+
Aperture is an implementation of this standard. It functions as a reverse HTTP proxy with support for gRPC and REST requests. It allows the safe and efficient creation of paid APIs that separate the logic of payments, permissioning and fulfilling requests. Aperture is used today by Lightning [Loop](../../lightning-network-tools/loop/), a non-custodial swap service for Bitcoin and [Pool](../../lightning-network-tools/pool/), a non-custodial marketplace for channel liquidity.
13
12
14
-
LSATs leverage the following tools and mechanisms:
13
+
L402 leverages the following tools and mechanisms:
Lightning Service Authentication Tokens are Macaroons that only become valid together with a cryptographic secret obtained as a preimage through payment a Lightning Network invoice tied to the Macaroon by its payment hash. Where Macaroons allow the separation of issuance, permissioning and validation, LSATs allow the separation of issuance and payment.
27
+
Lightning API keys are Macaroons that only become valid together with a cryptographic secret obtained as a preimage through payment a Lightning Network invoice tied to the Macaroon by its payment hash. Where Macaroons allow the separation of issuance, permissioning and validation, L402s allow the separation of issuance and payment.
29
28
30
29
In practice, a service can hand out Macaroons together with Lightning Network invoices to their potential customers, but does not need to validate specifically whether these invoices have been paid. The mere cryptographic validity of the Macaroon guarantees that the payer has obtained the preimage through their payment.
31
30
32
-
{% content-ref url="lsat.md" %}
33
-
[lsat.md](lsat.md)
31
+
{% content-ref url="l402.md" %}
32
+
[l402.md](l402.md)
34
33
{% endcontent-ref %}
35
34
36
35
## The Aperture proxy <ahref="#docs-internal-guid-2415a258-7fff-3d3d-25b9-4e3b0c38b8ca"id="docs-internal-guid-2415a258-7fff-3d3d-25b9-4e3b0c38b8ca"></a>
37
36
38
-
The Aperture proxy is a reverse proxy that will forward requests with valid LSATs to their relevant API endpoint, while issuing Macaroons and Lightning Network invoices to new users.
37
+
The Aperture proxy is a reverse proxy that will forward a request with a valid L402 to their relevant API endpoint, while issuing Macaroons and Lightning Network invoices to new users.
39
38
40
39
Aperture allows for pricing for API endpoints on the fly, including automatic tier upgrades, per-request pricing or surge pricing. In another light, this can be viewed as a global HTTP 402 reverse proxy at the load balancing level for web services and APIs.
Copy file name to clipboardExpand all lines: the-lightning-network/l402/aperture.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
-
description: Aperture is an implementation of LSATs as a reverse HTTP proxy.
2
+
description: Aperture is an implementation of L402s as a reverse HTTP proxy.
3
3
---
4
4
5
5
# Aperture
6
6
7
7
Aperture is a reverse proxy that acts as a payment and authentication gateway for Lightning Network powered APIs. It can handle gRPC requests over HTTP/2 as well as REST over HTTP/1 and 2.
8
8
9
-
Aperture receives incoming connections, verifies the validity of the LSAT and either forwards the request to the appropriate end point, or obtains a Macaroon and sends it together with a Lightning invoice and the HTTP status code 402 Payment Required.
9
+
Aperture receives incoming connections, verifies the validity of the L402 and either forwards the request to the appropriate end point, or obtains a Macaroon and sends it together with a Lightning invoice and the HTTP status code 402 Payment Required.
10
10
11
11
Aperture is currently used in production in Lightning [Loop](../../lightning-network-tools/loop/) and [Pool](../../lightning-network-tools/pool/).
@@ -29,11 +29,11 @@ To run Aperture, simply run the following command from within aperture's directo
29
29
30
30
`./aperture`
31
31
32
-
## LSAT demo
32
+
## L402 demo
33
33
34
-
A demonstration of LSATs can be found at [https://lsat-playground-bucko.vercel.app/](https://lsat-playground-bucko.vercel.app/) ([Testnet version here](https://testnet-lsat-playground.vercel.app/))
34
+
A demonstration of L402 can be found at [https://lsat-playground-bucko.vercel.app/](https://lsat-playground-bucko.vercel.app/) ([Testnet version here](https://testnet-lsat-playground.vercel.app/))
35
35
36
-
Here you can go through the process of minting a Macaroon, turning it into an LSAT, restricting and validating it as well as see code snippets.
36
+
Here you can go through the process of minting a Macaroon, turning it into an L402, restricting and validating it as well as see code snippets.
37
37
38
38
[See how the client interceptor is coded in Aperture](https://github.com/lightninglabs/aperture/blob/master/lsat/client\_interceptor.go)
0 commit comments