btcpayserver-docker icon indicating copy to clipboard operation
btcpayserver-docker copied to clipboard

Add Balance of satoshi integration

Open Kukks opened this issue 2 years ago • 4 comments

https://github.com/alexbosworth/balanceofsatoshis @alexbosworth

Looking for testers as i do not have an lnd deployment

Kukks avatar Jun 06 '22 06:06 Kukks

I added a way to use env vars to specify the default data directory to be looked in: BOS_DEFAULT_LND_PATH=/path/to/lnd/data/dir

alexbosworth avatar Jun 10 '22 02:06 alexbosworth

@alexbosworth that's great! I'll give that a try, just one more note: for our setup it is only some of the macaroons (admin, invoice and readonly) that are stored in the root dir. The others are in the standard location. Is that a problem with that env var or is it only the admin.macaroon that gets used anyways?

dennisreimann avatar Jun 10 '22 05:06 dennisreimann

@alexbosworth I just checked and what we'd need is an env var to specify the macaroon location explicitely. Our setup has the admin.macaroon and tls.cert at the root on the lnd directory, whereas the other data is in the data directory:

root@6c285440f8c4:/data# ls -l 
total 36
-rw------- 1 root root  252 Jan  5  2020 admin.macaroon
drwx------ 5 root root 4096 May  1  2021 data
-rw-r--r-- 1 root root  115 Jan  5  2020 invoice.macaroon
drwx------ 2 root root 4096 May  1  2021 letsencrypt
-rw-r--r-- 1 root root  925 Jun  7 09:09 lnd.conf
drwx------ 3 root root 4096 Jan  2  2020 logs
-rw-r--r-- 1 root root  183 Jan  5  2020 readonly.macaroon
-rw-r--r-- 1 root root  826 May 11  2021 tls.cert
-rw------- 1 root root  227 May 11  2021 tls.key

root@6c285440f8c4:/data# ls -l data/chain/bitcoin/mainnet/
total 1668
-rw-r--r-- 1 root root      83 May 18  2020 chainnotifier.macaroon
-rw-r--r-- 1 root root       0 Jan  7  2021 channel-all.bak
-rw-r--r-- 1 root root    2453 Jun  7 09:10 channel.backup
-rw-r--r-- 1 root root      91 May 18  2020 invoices.macaroon
-rw------- 1 root root   32768 Jun  7 09:09 macaroons.db
-rw-r--r-- 1 root root      91 May 18  2020 router.macaroon
-rw-r--r-- 1 root root      92 May 18  2020 signer.macaroon
-rw------- 1 root root 2097152 Jun 10 13:36 wallet.db
-rw-r--r-- 1 root root     114 May 18  2020 walletkit.macaroon
-rw-r--r-- 1 root root      99 Jan  5  2020 walletunlock.json

dennisreimann avatar Jun 10 '22 13:06 dennisreimann

Ah OK yeah this latest change assumes the admin macaroon would be in the usual place

alexbosworth avatar Jun 10 '22 13:06 alexbosworth