esplora_clnd_plugin
c-lightning C plugin to use (as possible) esplora web explorer to fetch bitcoin data.
1st c-lightning plugin with esplora integration is sauron plugin developped by darosior.
Build
- copy
esplora.c
andMakefile
intolightning/plugins
folder - edit main
lightning/Makefile
as the following:
- add esplora plugin to PLUGIN list
PLUGINS=plugins/pay plugins/autoclean plugins/fundchannel plugins/bcli plugins/esplora
- add libcurl to LDLIBS dep (needed for esplora plugin)
LDLIBS = -L/usr/local/lib -lm -lgmp -lsqlite3 -lz -lcurl $(COVFLAGS)
- run make on your lightning folder
Run
Disable bcli
plugin in order to fetch bitcoin data from esplora
plugin, and set plugin options, as the following:
lightningd --testnet --disable-plugin bcli --log-level=debug \
--blockchair-api-endpoint https://api.blockchair.com/bitcoin/testnet --esplora-api-endpoint https://blockstream.info/testnet/api
Extra options:
--esplora-verbose=1
: enable curl verbosity--esplora-cainfo=<path>
: set absolute ca info path for cacert.pem (CA certificates extracted from Mozilla at https://curl.haxx.se/docs/caextract.html)