If there is an error, consider increasing your delay tolerance from 3 seconds to 5 or so
```javascript
varfrom=1723625720;//optional. If you include "from" then no tx created before the specified timestamp will be returned
varuntil=1723680682;//optional. If you include "until" then no tx created after the specified timestamp will be returned
varlimit=10;//optional. If you include "limit" then a number of txs equal to or smaller than your limit will be returned
varoffset=2;//optional. If you include "offset" then the first n txs which *would* have been returned will be skipped (where n == offset)
varunpaid=true;//optional and defaults to false. Unless you set it to true, any txs that haven't been settled yet will be skipped
vartype="incoming";//optional and defaults to null. You can set to "incoming" to only return txs that paid you or set it to "outgoing" to only return txs where you paid someone. Keeping it null (or not including it at all) means you will get all transactions, incoming *and* outgoing.
Originally this library had a method called nwcjs.payInvoice() instead of nwcjs.tryToPayInvoice(). After paying the invoice, it would return the invoice's preimage. I modified its name because (1) lightning payments do not reliably succeed, so I wanted to indicate that through the method name (2) lightning payments sometimes get stuck for several minutes or hours, and I prefer to avoid using the "await" command if it might get stuck for a long time. So I renamed payInvoice() to tryToPayInvoice() and made it so it never gets stuck, it just immediately sends the "pay" command to the wallet. But that doesn't mean the invoice will actually get paid, so I recommend following that up by calling the nwcjs.didPaymentSucceed() method to find out if the payment went through or not. In the meantime you can show your user a pending status indicator or similar.
This method takes a lightning address and amount of sats as input and returns a lightning invoice and a checking id. You can also optionally specify a list of one or more relays where you want the recipient of the funds to send their zap receipt to. By default, it requests all receipts to be sent to just one relay, nostrue.com.
This method takes a lightning invoice and checking id as input and returns either the string "not paid yet" or the zap receipt provided by the recipient of the funds. You can also specify a list of one or more relays where you expect the recipient of the funds to send their zap receipt to. By default, it listens for all zap receipts on just one relay, nostrue.com.