Package: boltlight
Boltlight - a BOLT-on interface to the Lightning NetworkBoltlight is a Lightning Network node wrapper.It is not a LN node itself and connects to an existing node of one of the
supported implementations, providing a uniform interface and set of features.
Client code that uses boltlight can thus be agnostic on which node is running
under the hood.This means that the underlying LN node implementation can be
changed anytime with minimal intervention and no effects on client code.Each underlying implementation implements some features with "little"
differences. Boltlight strives to keep a uniform interface at all times,
drawing a common line where implementations differ and always choosing to stay
BOLT-compliant as much as possible.LAPP developers should be free to code, without the need to lock-in to any
particular implementation.Supported LN implementations :zap:Currently, the main LN implementations1are supported:c-lightning(v0.10.1) by Blockstreameclair(v0.6.1) by Acinqelectrum(v4.1.5)
by Thomas Voegtlinlnd(v0.13.3-beta) by Lightning
LabsHow it worksOn the client side, boltlight exposes a gRPC client interface, by default on
port 1708. On the node side, it proxies all the received calls to the
underlying implementation, using the appropriate transport and authentication
to connect and applying the appropriate format and data translations to each
implemented call.SeeSupported APIsfor a table of the supported calls
for each implementation.Calls that are not yet implemented return anUNIMPLEMENTEDerror.Software dependencies and configurations are the only significant differences
between the supported implementations.SeeImplementation Specificfor an
incomplete list of configuration tips and nuances that are dependent on the
particular lightning implementation.Notesat the moment, only the specified versions of the LN nodes are supportedRequirementsFirst of all, boltlight will need to connect to an existing and supported LN
node.In order to run boltlight it needs to be configured and software dependencies
have to be met. Some dependencies and configuration choices are determined by
the implementation of choice. Availability of the required dependencies will be
checked at runtime.The supported architectures areamd64andarm32v7. The latter may require
additional dependencies.System dependenciesLinux1,2Python 3.9+3[optional] libscrypt 1.8+ (faster start)ResourcesResource demand should be pretty low:CPU: 1 coreRAM: ~64MB when idlingdisk: docker image weights ~350MBNotestested on Debian 10 BustermacOS should work but is not well tested, Windows may work but is not
actively supportedtested with python 3.9+InstallingBoltlight can be installed with:$ pip install boltlightUsage of avirtualenvis recommended.Configuring and securingBoltlight needs to be configured before it can connect to a LN node and make
itself useful.Configuringcontains all the instructions
on how to configure boltlight.One last step is necessary after configuration is complete: security.On the node side, as with configuration, this partially depends on the chosen
implementation. On the client side, authorization is handled with gRPC
macaroons.For faster setup and execution, TLS and macaroons can be turned off. This is
not suitable for production use but can be useful for testing or development.To configure the necessary secrets and set a password to manage and protect
them run:$boltlight-secureIt can be run interactively or unattended and will create or update boltlight's
database and macaroon files.All secrets will be encrypted and stored in the database, so they won't be
accessible at rest. Secrets are decrypted with boltlight's password as part
of the unlocking process, will only be available to boltlight at runtime and
are never written to disk in plaintext.Please readSecurityfor all the details.UsingRunningTo start boltlight run:$boltlightThis will start its gRPC server, through which Boltlight can be operated.Theboltlight.protodefines the structure for the data to be serialized
and can be foundhere.
gRPC client libraries for supported languages can be generated from this file.
See theGeneration instructionsfor more
information.The proto file contains three services:Unlocker,LightningandLocker.
The first does not require macaroon authorization and can only unlock
boltlight, the other two start after boltlight is unlocked, require
authorization and provide all the supported operations, locking included.API documentationDocumentation for the gRPC APIs along with example code in Python, Go,
Node.js and Bash can be found atAPI page.CLIA CLI namedblink, with bash and zsh completion support, is available for
interactive usage, maintenance or testing.To activate completion support add the appropriate line to your shell's RC
file:~/.bashrc:. /path/to/installed/boltlight/share/complete-blink.bash~/.zshrc:. /path/to/installed/boltlight/share/complete-blink.zshFor a full list of the available CLI commands use the--helpoption:$blink--helpPairingTopairboltlight with a client, run:$boltlight-pairingThis will generate two URIs that allow easy retrieval of connection data
(boltlightconnect://<host>:<port>[?cert=<PEM certificate>])
and macaroon (macaroon:<chosen macaroon>).
The URIs can be displayed as QR codes, suitable for easy reading from client
apps, or as text for easy copying.TheGlobularAndroid wallet is an
example app that supports pairing with boltlight.The forkBoltlight has been forked fromLighterand continues on the same path, aiming to:make it easier to get startedadd support for more implementationskeep the existing support up-to-dateadd more featuresBoltlight is not 100% backwards-compatible with Lighter because of the name
change, so a re-configuration is needed in order to upgrade.ContributingAll contributions are welcome!If you're a developer and want to get involved, seeCONTRIBUTING.mdfor info on how to join the effort.If boltlight is missing that key feature you need, please get in touch.
Feel free to open issues to request new features or report bugs, or send an
email tohashbeam@protonmail.com.