Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
/ middleware Public archive

Lightweight Lightning backend for Citadel, will soon be part of the main API.

License

Notifications You must be signed in to change notification settings

runcitadel/middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

middleware

Middleware wraps LND's gRPC API, and exposes them via a RESTful API.

It is part of Citadel's effort to create an open source, easy to use, and secure Bitcoin full node.

🚀 Getting started

Middleware is normally part of Citadel, but you can also run it manually.

🛠 Running middleware

Make sure a bitcoind and lnd instance is running and available on the same machine.

Step 1. Install dependencies

yarn

Step 2. Set environment variables

Set the following environment variables directly or by placing them in .env file of project's root.

Variable Description Default
PORT Port where middleware should listen for requests 3005
DEVICE_HOSTS Comma separated list of IPs or domain names to whitelist for CORS http://citadel.local
BITCOIN_HOST IP or domain where bitcoind RPC is listening 127.0.0.1
RPC_USER bitcoind RPC username
RPC_PASSWORD bitcoind RPC password
LND_HOST IP or domain where lnd RPC is listening 127.0.0.1
TLS_FILE Path to lnd's TLS certificate /lnd/tls.cert
LND_PORT Port where lnd RPC is listening 10009
LND_NETWORK The chain bitcoind is running on (mainnet, testnet, regtest, simnet) mainnet
MACAROON_DIR Path to lnd's macaroon directory /lnd/data/chain/bitcoin/mainnet/
JWT_PUBLIC_KEY_FILE Path to the JWT public key created by manager /jwt-public-key/jwt.pem

Step 3. Run middleware

yarn start

You can browse through the available API endpoints here.


⚡️ Don't be too reckless

Citadel is still in an early stage and things are expected to break every now and then. We DO NOT recommend running it on the mainnet with real money just yet, unless you want to be really #reckless.

❤️ Contributing

We welcome and appreciate new contributions!

If you're a developer looking to help but not sure where to begin, check out these issues that have specifically been marked as being friendly to new contributors.

If you're looking for a bigger challenge, before opening a pull request please create an issue or join our chat to get feedback, discuss the best way to tackle the challenge, and to ensure that there's no duplication of work.

🙏 Acknowledgements

Middleware is inspired by and built upon the work done by Umbrel on its open-source API.

The original code we forked is licensed under

Copyright (c) 2018-2019 Casa, Inc. https://keys.casa/
Copyright (c) 2020 Umbrel. https://getumbrel.com/

License

About

Lightweight Lightning backend for Citadel, will soon be part of the main API.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Languages