Getting Started

Receive a LNPlay QR code? If so, we show you how to use that info for front-end web app development using Core Lighting's REST interface.

Extract the Node and Rune Information

The first step is to extract the rune and node information from the QR code by using a URL Decoder.

Scan the LNPlay QR code using a suitable scanner app or device and copy the URL. Next, paste the URL into a URL decoder app. Now examine the decoded text. Identify the following elements.

Element Example
Websocket URI (wss://) 03e1abc148ca7f7441cf6bba5d1b481e1a313edd093357a2115b0b9c5c6e8450f2@ lnplay.rocketcitybitcoin.org:6003
REST URI (https://) https://lnplay.rocketcitybitcoin.org:9003 (add 3000 to websocket port)
CLN Admin Rune MvYiCZ5LkkgCA_W_VyVpV7il5SXNASIi72RjNYffJpE9MA==

Verify access to your Core Lightning Node

Now that we have the REST endpoint and RUNE, we can start making REST calls. Try the following curl command. Be sure to swap out your Rune and service endpoint!

curl --silent -X POST https://lnplay.rocketcitybitcoin.org:9001/v1/getinfo -H 'accept: application/json' -H 'Rune: MvYiCZ5LkkgCA_W_VyVpV7il5SXNASIi72RjNYffJpE9MA==' -H 'Content-Type: application/json' -d '{}'

Resources

There are a lot of useful tools for interacting with a CLN REST interface including:

top
You've successfully subscribed to LNWidget.guide
Great! Next, complete checkout for full access to LNWidget.guide
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.