robosats/api/lightning/node.py
2023-05-25 04:19:45 -07:00

17 lines
377 B
Python

from decouple import config
LNVENDOR = config("LNVENDOR", cast=str, default="LND")
if LNVENDOR == "LND":
from api.lightning.lnd import LNDNode
LNNode = LNDNode
elif LNVENDOR == "CLN":
from api.lightning.cln import CLNNode
LNNode = CLNNode
else:
raise ValueError(
f'Invalid Lightning Node vendor: {LNVENDOR}. Must be either "LND" or "CLN"'
)