@@ -44,7 +44,6 @@ or for use without any build tools:
4444The ` LightningAddress ` class provides helpers to work with lightning addresses
4545
4646``` js
47- // import { LightningAddress } from "@getalby/lightning-tools"; (or)
4847import { LightningAddress } from " @getalby/lightning-tools/lnurl" ;
4948
5049const ln = new LightningAddress (" hello@getalby.com" );
@@ -61,7 +60,6 @@ console.log(ln.keysendData);
6160#### Get an invoice:
6261
6362``` js
64- // import { LightningAddress } from "@getalby/lightning-tools"; (or)
6563import { LightningAddress } from " @getalby/lightning-tools/lnurl" ;
6664
6765const ln = new LightningAddress (" hello@getalby.com" );
@@ -78,7 +76,6 @@ console.log(invoice.paymentHash); // print the payment hash
7876#### Verify a payment
7977
8078``` js
81- // import { LightningAddress } from "@getalby/lightning-tools"; (or)
8279import { LightningAddress } from " @getalby/lightning-tools/lnurl" ;
8380const ln = new LightningAddress (" hello@getalby.com" );
8481await ln .fetch ();
@@ -106,7 +103,6 @@ await invoice.isPaid();
106103It is also possible to manually initialize the ` Invoice `
107104
108105``` js
109- // import { Invoice } from "@getalby/lightning-tools"; (or)
110106import { Invoice } from " @getalby/lightning-tools/bolt11" ;
111107
112108const invoice = new Invoice ({ pr: pr, preimage: preimage });
@@ -118,7 +114,6 @@ await invoice.isPaid();
118114You can also attach additional metadata information like app name, version, name of the podcast which is boosted etc. to the keysend payment.
119115
120116``` js
121- // import { LightningAddress } from "@getalby/lightning-tools"; (or)
122117import { LightningAddress } from " @getalby/lightning-tools/lnurl" ;
123118const ln = new LightningAddress (" hello@getalby.com" );
124119await ln .fetch ();
@@ -146,7 +141,6 @@ Nostr is a simple, open protocol that enables truly censorship-resistant and glo
146141This librarys provides helpers to create [ zaps] ( https://github.com/nostr-protocol/nips/blob/master/57.md ) .
147142
148143``` js
149- // import { LightningAddress } from "@getalby/lightning-tools"; (or)
150144import { LightningAddress } from " @getalby/lightning-tools/lnurl" ;
151145const ln = new LightningAddress (" hello@getalby.com" );
152146await ln .fetch ();
@@ -188,7 +182,6 @@ This library includes a `fetchWithL402` function to consume L402 protected resou
188182##### Examples
189183
190184``` js
191- // import { fetchWithL402 } from "@getalby/lightning-tools"; (or)
192185import { fetchWithL402 } from " @getalby/lightning-tools/l402" ;
193186
194187// this will fetch the resource and pay the invoice with window.webln.
@@ -203,7 +196,6 @@ await fetchWithL402(
203196```
204197
205198``` js
206- // import { fetchWithL402 } from "@getalby/lightning-tools"; (or)
207199import { fetchWithL402 } from " @getalby/lightning-tools/l402" ;
208200import { NostrWebLNProvider } from " @getalby/sdk" ;
209201
@@ -223,7 +215,6 @@ await fetchWithL402(
223215```
224216
225217``` js
226- // import { fetchWithL402, NoStorage } from "@getalby/lightning-tools"; (or)
227218import { fetchWithL402 , NoStorage } from " @getalby/lightning-tools/l402" ;
228219
229220// do not store the tokens
@@ -239,7 +230,6 @@ await fetchWithL402(
239230You can initialize an ` Invoice ` to decode a payment request.
240231
241232``` js
242- // import { Invoice } from "@getalby/lightning-tools"; (or)
243233import { Invoice } from " @getalby/lightning-tools/bolt11" ;
244234
245235const invoice = new Invoice ({ pr });
0 commit comments