add sndev payinvoice

This commit is contained in:
keyan 2024-03-10 16:29:10 -05:00
parent e824261143
commit 714aecc477
2 changed files with 14 additions and 9 deletions

View File

@ -42,11 +42,6 @@ OPENSEARCH_PASSWORD=
OPENSEARCH_INDEX=item
OPENSEARCH_MODEL_ID=
#######################################################
# WALLET / OPTIONAL #
# if you want to work with payments you'll need these #
#######################################################
# lnurl ... you'll need a tunnel to localhost:3000 for these
LNAUTH_URL=
LNWITH_URL=

10
sndev
View File

@ -4,6 +4,10 @@ docker__compose() {
CURRENT_UID=$(id -u) CURRENT_GID=$(id -g) command docker compose --env-file .env.sndev "$@"
}
docker__exec() {
exec command docker exec "$@"
}
sndev__start() {
if [ ! -x "$(command -v docker-compose)" ]; then
echo "docker compose is not installed"
@ -31,6 +35,11 @@ sndev__delete() {
docker__compose down --volumes --remove-orphans
}
sndev__payinvoice() {
shift
docker__exec -u lnd stacker_lnd lncli payinvoice --force "$@"
}
sndev__help() {
if [ $# -eq 3 ]; then
call "sndev__$1__$2__$3" "$@"
@ -46,6 +55,7 @@ COMMANDS
start start env
stop stop env
delete delete env
payinvoice pay invoice to sn
help display help for sndev
"
echo "$help"