lnbits-legend/docs/guide/wallets.md
Bitkarrot d5ae1e3d6a
feat: add getalby wallet as funding source (#2086)
* initial scaffolding, methods for getalby wallet
* Add getAlby to docs and i18n
* update alby wallet methods
* change names from GetAlbyWallet to AlbyWallet
* remove unused variables in AlbyFundingSource in settings.py
* rename getalby.py to alby.py
* fix method auth and status
* resolve rolznz commented issues
* rename ALBY_API_KEY to ALBY_ACCESS_TOKEN
* fix desc hash in create_invoice

---------

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
Co-authored-by: dni  <office@dnilabs.com>
2023-11-14 20:28:25 +01:00

2.9 KiB

layout title nav_order
default Backend wallets 3

Backend wallets

LNbits can run on top of many lightning-network funding sources. Currently there is support for CoreLightning, LND, LNbits, LNPay, Alby, and OpenNode, with more being added regularly.

A backend wallet can be configured using the following LNbits environment variables:

CoreLightning

  • LNBITS_BACKEND_WALLET_CLASS: CoreLightningWallet
  • CORELIGHTNING_RPC: /file/path/lightning-rpc

CoreLightning REST

  • LNBITS_BACKEND_WALLET_CLASS: CoreLightningRestWallet
  • CORELIGHTNING_REST_URL: http://127.0.0.1:8185/
  • CORELIGHTNING_REST_MACAROON: /file/path/admin.macaroon or Base64/Hex
  • CORELIGHTNING_REST_CERT: /home/lightning/clnrest/tls.cert

Spark (Core Lightning)

LND (REST)

  • LNBITS_BACKEND_WALLET_CLASS: LndRestWallet
  • LND_REST_ENDPOINT: http://10.147.17.230:8080/
  • LND_REST_CERT: /file/path/tls.cert
  • LND_REST_MACAROON: /file/path/admin.macaroon or Base64/Hex

or

  • LND_REST_MACAROON_ENCRYPTED: eNcRyPtEdMaCaRoOn

LND (gRPC)

  • LNBITS_BACKEND_WALLET_CLASS: LndWallet
  • LND_GRPC_ENDPOINT: ip_address
  • LND_GRPC_PORT: port
  • LND_GRPC_CERT: /file/path/tls.cert
  • LND_GRPC_MACAROON: /file/path/admin.macaroon or Base64/Hex

You can also use an AES-encrypted macaroon (more info) instead by using

  • LND_GRPC_MACAROON_ENCRYPTED: eNcRyPtEdMaCaRoOn

To encrypt your macaroon, run poetry run python lnbits/wallets/macaroon/macaroon.py.

LNbits

  • LNBITS_BACKEND_WALLET_CLASS: LNbitsWallet
  • LNBITS_ENDPOINT: e.g. https://lnbits.com
  • LNBITS_KEY: lnbitsAdminKey

LNPay

For the invoice listener to work you have a publicly accessible URL in your LNbits and must set up LNPay webhooks pointing to <your LNbits host>/wallet/webhook with the "Wallet Receive" event and no secret. For example, https://mylnbits/wallet/webhook will be the Endpoint Url that gets notified about the payment.

  • LNBITS_BACKEND_WALLET_CLASS: LNPayWallet
  • LNPAY_API_ENDPOINT: https://api.lnpay.co/v1/
  • LNPAY_API_KEY: sak_apiKey
  • LNPAY_WALLET_KEY: waka_apiKey

OpenNode

For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary.

  • LNBITS_BACKEND_WALLET_CLASS: OpenNodeWallet
  • OPENNODE_API_ENDPOINT: https://api.opennode.com/
  • OPENNODE_KEY: opennodeAdminApiKey

Alby

For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary. You can generate an alby access token here: https://getalby.com/developer/access_tokens/new

  • LNBITS_BACKEND_WALLET_CLASS: AlbyWallet
  • ALBY_API_ENDPOINT: https://api.getalby.com/
  • ALBY_ACCESS_TOKEN: AlbyAccessToken

Cliche Wallet

  • CLICHE_ENDPOINT: ws://127.0.0.1:12000