Skip to main content

Getting Started

Test LNPlay

Ok, you've deployed LNPlay, and now you want to test it out so you understand how it works end-to-end. Execute this test plan to gain a full understanding of the system from a user's perspective.

Before we list all the functional tests, we need to level-set some requirements and recommendations when running this test plan.

LNPlay scripts automate as many tests as possible. However, due to the smartphone-centric nature of this application (meetups/conferences), manual tests using a variety of smartphones are recommended. In addition, one should test with at LEAST ONE Apple iOS and at least one Android. It is recommended that Alice be an iOS device and Bob be an Android device. Carol can be either an iOS or Android device. (Alice, Bob, and Carol can be considered LNPlay Simulation Users.)

Run through these tests on as many combinations as possible, making sure all apps and browsers are up-to-date.

  • Apple IOS: Safari (RECOMMENDED), Brave, Chrome, Firefox
  • Android/Graphene: Vanadium (RECOMMENDED), Chrome (RECOMMENDED), Firefox (RECOMMENDED).
💡
Want to test LNPlay remotely on your desktop browser? Download Chromium and use the New Window with Temporary Profile option to open multiple browser sessions on the same computer. Other options include using multiple devices and/or multiple browsers/private windows.

Functional Tests

After you open Clams Remote (the URL encoded in their QR Code), click the Wallets main menu item to ensure the node is funded with 1.00000000 BTC. The balance SHOULD appear automatically, though the Sync may be used to update the balance, if necessary.

💡
If Clams Remote fails to scan a QR code (due to bad camera or lightning issues), consider using your OS's built-in QR scanner, then copy/paste. Consider reporting any scanning issues.

Channel Tests

Alice Opens Channel to Bob

The goal is for Alice to open a channel to Bob. Bob will click the "Info" button at the top of his app to show the Connect dialog.

Alice will press the "Input" button at the top right. Then click on "Scan". Alice may have to approve permissions on her device to allow the browser to use the camera to scan QR codes.

Alice will see an Open Channel dialog with Bob's connection details in the "Peer address" field. Alice will choose a channel size (e.g., 2,000,000 sats) and click "Open". The next screen will show the state of the channel. Once it goes Active, the channel is ready to use for payments!

Bob Opens Channel to Carol

Repeat the steps above to open a Channel from Bob to Carol.

Payment Tests

After executing the following tests, the two channels that exist should be balanced.

Alice Pays Carol BOLT11 Invoice

From the main menu, Carol will click "Receive" in the upper right. Ensure "Invoice" is selected. The amount should be 100,000 sats.

💡
Note! Sometimes you might experience payments from Bob to Alice when Bob's channel reserve requirements aren't satisfied. Keep this in mind, especially when making small initial payments.

Alice clicks "Input" in the upper right, then scans Carol's BOLT11 invoice from the Scan menu. On the Invoice menu, click Pay!

Carol's BOLT11 invoice should switch to paid and Carol should receive a notification in Clams Remote.

Alice Pays Carol on-chain

From the main menu, Carol will click "Receive" in the upper right. Ensure "Address" is selected and "Invoice" is UNSELECTED. The amount should be 300,000 sats. Press the Create button to generate a new address.

Alice clicks "Input" in the upper right, then scans Carol's on-chain address. On the Invoice menu, click Pay! If successful, Alice's Clams Remote should indicate a successful payment.

Carol can then browse to the UTXO menu and see the new UTXO sitting there. A Sync may be required.

Alice Pays Carol's BOLT12 Offer

For Alice to pay Carol's BOLT12 Offer, Carol will need to create an Offer. There should be no Offers listed by default. Carol will click "Create" on the Offers menu. On the Create Offer menu, ensure "Pay" is selected, then enter 0 for the amount. Leave the label empty.

A new BOLT12 offer will be shown on Carol's device.

Alice will click "Input" on her Clams Remote, then scan Carol's BOLT12 QR Code. She will enter 200,000 sats and click "Pay". The payment should be completed without issue.

Alice's Clams Remote will indicate the completion of the payment, and Carol should receive a notification that the offer received an incoming payment.

Carol withdraws BTC from Alice's node

On Alice's Clams Remote, click Offers from the main menu. On the Create Offer menu select "Withdraw" under the Offer type. For the amount, select whatever is necessary to leave a balanced channel. In this example, 700,000 sats. Next, click the Create button.

Carol will click the Input button at the top, then scan in Alice's BOLT12 withdraw offer, then click Withdraw. Carol should see a notification if the withdrawal was successful.

Verification

To verify that the tests have been completed successfully, there should be a channel graph that looks like the following. Each of the channels should be balanced. Small payments between Alice and Carol should be reflected as Forwards on Bob.

This visualization was created by this project.