Skip to content

Commit

Permalink
Merge pull request #139 from Thabokani/master
Browse files Browse the repository at this point in the history
fix: typos
  • Loading branch information
rolznz authored Mar 28, 2024
2 parents c157322 + d5a6bfe commit 37eb0be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ This library includes a `fetchWithL402` function to consume L402 protected resou
#### fetchWithL402(url: string, fetchArgs, options)

- url: the L402 protected URL
- fetchArgs: arguments are passed to the underlaying `fetch()` function used to do the HTTP request
- fetchArgs: arguments are passed to the underlying `fetch()` function used to do the HTTP request
- options:
- webln: the webln object used to call `sendPayment()` defaults to globalThis.webln
- store: a key/value store object to persiste the l402 for each URL. The store must implement a `getItem()`/`setItem()` function as the browser's localStorage. By default a memory storage is used.
Expand All @@ -184,7 +184,7 @@ This library includes a `fetchWithL402` function to consume L402 protected resou
```js
import { fetchWithL402 } from "@getalby/lightning-tools";

// this will fetch the resouce and pay the invoice with window.webln.
// this will fetch the resource and pay the invoice with window.webln.
// the tokens/preimage data will be stored in the browser's localStorage and used for any following request
await fetchWithL402(
"https://lsat-weather-api.getalby.repl.co/kigali",
Expand All @@ -204,7 +204,7 @@ const nwc = new webln.NostrWebLNProvider({
nostrWalletConnectUrl: loadNWCUrl(),
});

// this will fetch the resouce and pay the invoice with a NWC webln object
// this will fetch the resource and pay the invoice with a NWC webln object
await fetchWithL402(
"https://lsat-weather-api.getalby.repl.co/kigali",
{},
Expand Down Expand Up @@ -245,7 +245,7 @@ Helpers to convert sats values to fiat and fiat values to sats.

##### getFiatValue(satoshi: number, currency: string): number

Returns the fiat value for a specified currrency of a satoshi amount
Returns the fiat value for a specified currency of a satoshi amount

##### getSatoshiValue(amount: number, currency: string): number

Expand Down
2 changes: 1 addition & 1 deletion examples/zaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import { LightningAddress } from "@getalby/lightning-tools";
// or manually (create an invoice and give it to the user to pay)
const invoice = await ln.zapInvoice(zapArgs); // generates a zap invoice
console.log(invoice.paymentRequest); // print the payment request
await invoice.isPaid(); // check the payment status as descibed above
await invoice.isPaid(); // check the payment status as described above
}
})();

0 comments on commit 37eb0be

Please sign in to comment.