From 4675a2c29d1de4b43b34e1bdda32a3f7b83ac81b Mon Sep 17 00:00:00 2001 From: Keyan <34140557+huumn@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:52:04 -0600 Subject: [PATCH] sndev cleanup (#1563) * begin sndev cleanup * cleanup sndev * fix posix shell compliance * add tests to sndev --- .env.development | 4 +- README.md | 55 ++++--- docker-compose.yml | 77 ++++++---- docker/tor/services.conf | 4 +- docker/tor/tor.sh | 12 +- sndev | 307 ++++++++++++++++----------------------- wallets/cln/ATTACH.md | 6 +- wallets/lnbits/ATTACH.md | 6 +- wallets/lnd/ATTACH.md | 12 +- wallets/webln/ATTACH.md | 2 +- 10 files changed, 219 insertions(+), 266 deletions(-) diff --git a/.env.development b/.env.development index e4c87983a..a9242b5d5 100644 --- a/.env.development +++ b/.env.development @@ -138,13 +138,13 @@ LND_PUBKEY=02cb2e2d5a6c5b17fa67b1a883e2973c82e328fb9bd08b2b156a9e23820c87a490 # stacker lnd container stuff STACKER_LND_REST_PORT=8081 STACKER_LND_GRPC_PORT=10010 -# docker exec -u lnd stacker_lnd lncli newaddress p2wkh --unused +# docker exec -u lnd lnd lncli newaddress p2wkh --unused STACKER_LND_ADDR=bcrt1qfqau4ug9e6rtrvxrgclg58e0r93wshucumm9vu STACKER_LND_PUBKEY=028093ae52e011d45b3e67f2e0f2cb6c3a1d7f88d2920d408f3ac6db3a56dc4b35 # stacker cln container stuff STACKER_CLN_REST_PORT=9092 -# docker exec -u clightning stacker_cln lightning-cli newaddr bech32 +# docker exec -u clightning cln lightning-cli newaddr bech32 STACKER_CLN_ADDR=bcrt1q02sqd74l4pxedy24fg0qtjz4y2jq7x4lxlgzrx STACKER_CLN_PUBKEY=03ca7acec181dbf5e427c682c4261a46a0dd9ea5f35d97acb094e399f727835b90 diff --git a/README.md b/README.md index ed793b89f..d67e2973f 100644 --- a/README.md +++ b/README.md @@ -64,44 +64,39 @@ USAGE $ sndev help [COMMAND] COMMANDS - help show help + help show help env: - start start env - stop stop env - restart restart env - status status of env - logs logs from env - delete delete env + start start env + stop stop env + restart restart env + status status of env + logs logs from env + delete delete env sn: - login login as a nym - fund_user fund a nym without using an LN invoice + login login as a nym + set_balance set the balance of a nym - lnd: - fund pay a bolt11 for funding - withdraw create a bolt11 for withdrawal - - cln: - cln_fund pay a bolt11 for funding with CLN - cln_withdraw create a bolt11 for withdrawal with CLN + lightning: + fund pay a bolt11 for funding + withdraw create a bolt11 for withdrawal db: - psql open psql on db - prisma run prisma commands + psql open psql on db + prisma run prisma commands dev: - pr fetch and checkout a pr - lint run linters - open open container url in browser + pr fetch and checkout a pr + lint run linters + test run tests other: - compose docker compose passthrough - sn_lndcli lncli passthrough on sn_lnd - stacker_lndcli lncli passthrough on stacker_lnd - stacker_clncli lightning-cli passthrough on stacker_cln - stacker_litcli litcli passthrough on litd - + cli service cli passthrough + open open service GUI in browser + onion service onion address + cert service tls cert + compose docker compose passthrough ``` ### Modifying services @@ -368,9 +363,11 @@ You can connect to the local database via `./sndev psql`. [psql](https://www.pos
-## Running lncli on the local lnd nodes +## Running cli on local lightning nodes + +You can run `lncli` on the local lnd nodes via `./sndev cli lnd` and `./sndev cli sn_lnd`. The node for your local SN instance is `sn_lnd` and the node serving as any external node, like a stacker's node or external wallet, is `lnd`. -You can run `lncli` on the local lnd nodes via `./sndev sn_lncli` and `./sndev stacker_lncli`. The node for your local SN instance is `sn_lnd` and the node serving as any external node, like a stacker's node or external wallet, is `stacker_lnd`. +You can run `lightning-cli` on the local cln node via `./sndev cli cln` which serves as an external node or wallet.
diff --git a/docker-compose.yml b/docker-compose.yml index 57b240f99..17ae74881 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -275,7 +275,7 @@ services: echo "Creating wallet and address..." bitcoin-cli createwallet "" nodes+=($$(bitcoin-cli getnewaddress)) - echo "Mining 100 blocks to sn_lnd, stacker_lnd, stacker_cln..." + echo "Mining 100 blocks to sn_lnd, lnd, cln..." for addr in "$${nodes[@]}"; do bitcoin-cli generatetoaddress 100 $$addr echo "Mining 100 blocks to a random address..." @@ -349,6 +349,8 @@ services: volumes: - sn_lnd:/home/lnd/.lnd labels: + CLI: "lncli" + CLI_USER: "lnd" ofelia.enabled: "true" ofelia.job-exec.sn_channel_cron.schedule: "@every 1m" ofelia.job-exec.sn_channel_cron.command: > @@ -356,17 +358,17 @@ services: if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then exit 0 else - lncli openchannel --node_key=$STACKER_LND_PUBKEY --connect stacker_lnd:9735 --sat_per_vbyte 1 \\ + lncli openchannel --node_key=$STACKER_LND_PUBKEY --connect lnd:9735 --sat_per_vbyte 1 \\ --min_confs 0 --local_amt=1000000000 --push_amt=500000000 fi " cpu_shares: "${CPU_SHARES_MODERATE}" - stacker_lnd: + lnd: build: context: ./docker/lnd args: - LN_NODE_FOR=stacker - container_name: stacker_lnd + container_name: lnd restart: unless-stopped profiles: - payments @@ -384,9 +386,9 @@ services: - 'lnd' - '--noseedbackup' - '--trickledelay=5000' - - '--alias=stacker_lnd' - - '--externalip=stacker_lnd' - - '--tlsextradomain=stacker_lnd' + - '--alias=lnd' + - '--externalip=lnd' + - '--tlsextradomain=lnd' - '--tlsextradomain=host.docker.internal' - '--tlsextradomain=$${ONION_DOMAIN}' - '--listen=0.0.0.0:9735' @@ -413,12 +415,16 @@ services: - "${STACKER_LND_REST_PORT}:8080" - "${STACKER_LND_GRPC_PORT}:10009" volumes: - - stacker_lnd:/home/lnd/.lnd + - lnd:/home/lnd/.lnd - tordata:/home/lnd/.tor labels: + TORDIR: "/home/lnd/.tor" + CERTDIR: "/home/lnd/.lnd" + CLI: "lncli" + CLI_USER: "lnd" ofelia.enabled: "true" - ofelia.job-exec.stacker_lnd_channel_cron.schedule: "@every 1m" - ofelia.job-exec.stacker_lnd_channel_cron.command: > + ofelia.job-exec.lnd_channel_cron.schedule: "@every 1m" + ofelia.job-exec.lnd_channel_cron.command: > su lnd -c bash -c " if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then exit 0 @@ -439,11 +445,11 @@ services: <<: *healthcheck test: ["CMD", "curl", "-f", "http://localhost:8443"] depends_on: - stacker_lnd: + lnd: condition: service_healthy restart: true volumes: - - stacker_lnd:/lnd + - lnd:/lnd ports: - "8443:8443" command: @@ -454,7 +460,7 @@ services: - '--lnd-mode=remote' - '--network=regtest' - '--remote.lit-debuglevel=debug' - - '--remote.lnd.rpcserver=stacker_lnd:10009' + - '--remote.lnd.rpcserver=lnd:10009' - '--remote.lnd.macaroonpath=/lnd/data/chain/bitcoin/regtest/admin.macaroon' - '--remote.lnd.tlscertpath=/lnd/tls.cert' - '--autopilot.disable' @@ -462,11 +468,13 @@ services: - '--loop.server.host=test.swap.lightning.today:11010' labels: CONNECT: "localhost:8443" + CLI: "litcli" + CLI_ARGS: "-n regtest --rpcserver localhost:8444" cpu_shares: "${CPU_SHARES_MODERATE}" - stacker_cln: + cln: build: context: ./docker/cln - container_name: stacker_cln + container_name: cln restart: unless-stopped profiles: - payments @@ -482,7 +490,7 @@ services: command: - 'lightningd' - '--network=regtest' - - '--alias=stacker_cln' + - '--alias=cln' - '--bitcoin-rpcconnect=bitcoin' - '--bitcoin-rpcuser=${RPC_USER}' - '--bitcoin-rpcpassword=${RPC_PASS}' @@ -495,12 +503,16 @@ services: ports: - "${STACKER_CLN_REST_PORT}:3010" volumes: - - stacker_cln:/home/clightning/.lightning + - cln:/home/clightning/.lightning - tordata:/home/clightning/.tor labels: + TORDIR: "/home/clightning/.tor" + CLI: "lightning-cli" + CLI_USER: "clightning" + CLI_ARGS: "--regtest" ofelia.enabled: "true" - ofelia.job-exec.stacker_cln_channel_cron.schedule: "@every 1m" - ofelia.job-exec.stacker_cln_channel_cron.command: > + ofelia.job-exec.cln_channel_cron.schedule: "@every 1m" + ofelia.job-exec.cln_channel_cron.command: > su clightning -c bash -c " if [ $$(lightning-cli --regtest getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then exit 0 @@ -519,8 +531,8 @@ services: depends_on: - bitcoin - sn_lnd - - stacker_lnd - - stacker_cln + - lnd + - cln restart: unless-stopped command: daemon --docker -f label=com.docker.compose.project=${COMPOSE_PROJECT_NAME} volumes: @@ -550,12 +562,12 @@ services: - wallets restart: unless-stopped depends_on: - stacker_lnd: + lnd: condition: service_healthy restart: true volumes: - nwc_send:/app - - stacker_lnd:/app/.lnd + - lnd:/app/.lnd environment: - RUST_LOG=info entrypoint: @@ -567,7 +579,7 @@ services: - '--cert-file' - '/app/.lnd/tls.cert' - '--lnd-host' - - 'stacker_lnd' + - 'lnd' - '--lnd-port' - '10009' - '--max-amount' @@ -584,12 +596,12 @@ services: - wallets restart: unless-stopped depends_on: - stacker_lnd: + lnd: condition: service_healthy restart: true volumes: - nwc_recv:/app - - stacker_lnd:/app/.lnd + - lnd:/app/.lnd environment: - RUST_LOG=info entrypoint: @@ -601,7 +613,7 @@ services: - '--cert-file' - '/app/.lnd/tls.cert' - '--lnd-host' - - 'stacker_lnd' + - 'lnd' - '--lnd-port' - '10009' - '--max-amount' @@ -624,29 +636,30 @@ services: tor: condition: service_healthy restart: true - stacker_lnd: + lnd: condition: service_healthy restart: true environment: - LNBITS_ADMIN_UI=true - LNBITS_BACKEND_WALLET_CLASS=LndWallet - - LND_GRPC_ENDPOINT=stacker_lnd + - LND_GRPC_ENDPOINT=lnd - LND_GRPC_PORT=10009 - LND_GRPC_CERT=/app/.lnd/tls.cert - LND_GRPC_MACAROON=/app/.lnd/data/chain/bitcoin/regtest/admin.macaroon volumes: - - stacker_lnd:/app/.lnd + - lnd:/app/.lnd - tordata:/app/.tor labels: CONNECT: "localhost:${LNBITS_WEB_PORT}" + TORDIR: "/app/.tor" cpu_shares: "${CPU_SHARES_LOW}" volumes: db: os: bitcoin: sn_lnd: - stacker_lnd: - stacker_cln: + lnd: + cln: s3: nwc_send: nwc_recv: diff --git a/docker/tor/services.conf b/docker/tor/services.conf index 6da6d0dae..dd8313ae6 100644 --- a/docker/tor/services.conf +++ b/docker/tor/services.conf @@ -1,3 +1,3 @@ -HiddenServicePort 10009 stacker_lnd:10009 -HiddenServicePort 3010 stacker_cln:3010 +HiddenServicePort 10009 lnd:10009 +HiddenServicePort 3010 cln:3010 HiddenServicePort 5000 lnbits:5000 diff --git a/docker/tor/tor.sh b/docker/tor/tor.sh index e866b8844..5e3c7af03 100644 --- a/docker/tor/tor.sh +++ b/docker/tor/tor.sh @@ -1,6 +1,6 @@ #!/bin/bash -function initialize { +function initialize { ####################### generate and save control password ######################## cp -f /etc/tor/torrc.template /tordata/torrc TOR_PASSWORD="" @@ -21,9 +21,9 @@ function mergeServices { cat /services.conf >> /tordata/torrc } -# There is a circular dependency between tor and stacker_lnd: -# <-> tor needs stacker_lnd to be running to resolve the hidden service target -# <-> stacker_lnd needs to wait for tor to start and generate the hidden service address +# There is a circular dependency between tor and lnd: +# <-> tor needs lnd to be running to resolve the hidden service target +# <-> lnd needs to wait for tor to start and generate the hidden service address # Afaik there isn't an "official" solution for this issue. # # This workaround starts tor the first time without the lnd hidden service @@ -47,7 +47,7 @@ then exit 0 fi else - # Step 1: we start tor with a fake hidden service that points to port 8080, + # Step 1: we start tor with a fake hidden service that points to port 8080, # just to get it to generate the hidden service data, then we kill it immediately after echo "Initializing..." initialize @@ -58,7 +58,7 @@ else # debug ls /tordata/hidden_service/ - + # Step 2: we merge the service configuration and start tor again echo "Starting tor..." initialize diff --git a/sndev b/sndev index eff1dcbc0..414d8b313 100755 --- a/sndev +++ b/sndev @@ -32,46 +32,6 @@ docker__exec() { DOCKER_CLI_HINTS=false command docker exec -i "$@" } -docker__sn_lnd() { - t=$1 - if [ "$t" = "-t" ]; then - shift - else - t="" - fi - - docker__exec $t -u lnd sn_lnd lncli "$@" -} - -docker__stacker_lnd() { - t=$1 - if [ "$t" = "-t" ]; then - shift - else - t="" - fi - - docker__exec $t -u lnd stacker_lnd lncli "$@" -} - -docker__stacker_cln() { - t=$1 - - if [ "$t" = "-t" ]; then - shift - else - t="" - fi - - if [ "$1" = "get_onion" ]; then - onion="$(docker__exec $t stacker_cln cat /home/clightning/.tor/hidden_service/hostname | tr -d '[:space:]')" - echo "$onion:3010" - exit 0 - fi - - docker__exec $t -u clightning stacker_cln lightning-cli --regtest "$@" -} - sndev__start() { shift @@ -232,38 +192,41 @@ USAGE echo "$help" } -sndev__fund_user() { +sndev__set_balance() { shift + if [ -z "$1" ]; then - echo " argument required" - sndev__help_fund_user + echo "NYM argument required" + sndev__help_set_balance exit 1 fi + if [ -z "$2" ]; then - echo " argument required" - sndev__help_fund_user + echo "MSATS argument required" + sndev__help_set_balance exit 2 fi - re='^[0-9]+$' - if ! [[ $2 =~ $re ]]; then - echo " is not a positive integer" - sndev__help_fund_user + + if ! echo "$2" | grep -qE "^[0-9]+$"; then + echo "MSATS argument is not a positive integer" + sndev__help_set_balance exit 3 fi + docker__exec db psql -U sn -d stackernews -q < [OPTIONS] + $ sndev withdraw SATS [OPTIONS] + $ sndev withdraw --cln SATS OPTIONS" echo "$help" - docker__stacker_lnd addinvoice -h | awk '/OPTIONS:/{y=1;next}y' | awk '!/^[\t ]+(--amt|--amt_msat) value/' + sndev__cli lnd addinvoice -h | awk '/OPTIONS:/{y=1;next}y' | awk '!/^[\t ]+(--amt|--amt_msat) value/' } sndev__psql() { @@ -387,52 +334,37 @@ USAGE echo "$help" } -sndev__compose() { +sndev__test() { shift - docker__compose "$@" -} - -sndev__help_compose() { - docker__compose --help -} -sndev__sn_lndcli() { - shift - docker__sn_lnd -t "$@" -} + args="" + if [ $# -gt 0 ]; then + args="-- $@" + fi -sndev__help_sn_lndcli() { - docker__sn_lnd --help + docker__exec -t -u apprunner app npm run test $args } -sndev__stacker_lndcli() { - shift - docker__stacker_lnd -t "$@" -} +sndev__help_test() { + help=" +run tests -sndev__help_stacker_lndcli() { - docker__stacker_lnd --help -} +USAGE + $ sndev test [OPTIONS] -sndev__stacker_clncli() { - shift - docker__stacker_cln -t "$@" -} +OPTIONS" -sndev__help_stacker_clncli() { - docker__stacker_cln help - echo - echo "EXTRA:" - echo " get_onion get the onion address" + echo "$help" + docker__exec -u apprunner app npm run test -- --help | awk '/Options:/{y=1;next}y' } -sndev__stacker_litcli() { +sndev__compose() { shift - docker__exec -t litd litcli -n regtest --rpcserver localhost:8444 "$@" + docker__compose "$@" } -sndev__help_stacker_litcli() { - docker__exec -t litd litcli -h +sndev__help_compose() { + docker__compose --help } __sndev__pr_track() { @@ -484,7 +416,7 @@ sndev__help_pr() { fetch and checkout a pr USAGE - $ sndev pr [OPTIONS] + $ sndev pr [OPTIONS] PR_NUMBER OPTIONS -t, --track track the pr in a new branch, creating a remote if necessary @@ -497,7 +429,7 @@ OPTIONS sndev__login() { shift if [ -z "$1" ]; then - echo " argument required" + echo "NYM argument required" sndev__help_login exit 1 fi @@ -528,84 +460,102 @@ sndev__help_login() { login as a nym USAGE - $ sndev login + $ sndev login NYM " echo "$help" } -sndev__help_stacker_lnd() { +sndev__onion() { + shift + tordir=$(docker__compose ps $1 --format '{{.Label "TORDIR"}}') + if [ -z "$tordir" ]; then + echo "no TORDIR label found for $1" + exit 1 + fi + onion=$(docker__exec $1 cat $tordir/hidden_service/hostname | tr -d '[:space:]') + echo "$onion" +} + +sndev__help_onion() { help=" +get the onion address of a service USAGE - $ sndev stacker_lnd get_cert get the tls cert - $ sndev stacker_lnd get_onion get the onion address + $ sndev onion SERVICE " echo "$help" } -sndev__stacker_lnd() { +sndev__cert() { shift - if [ -z "$1" ]; then - echo "no command provided" - sndev__help_stacker_lnd + certdir=$(docker__compose ps $1 --format '{{.Label "CERTDIR"}}') + if [ -z "$certdir" ]; then + echo "no CERTDIR label found for $1" exit 1 fi - if [ "$1" = "get_cert" ]; then - echo $(docker__exec -t stacker_lnd openssl base64 -A -in /home/lnd/.lnd/tls.cert) - elif [ "$1" = "get_onion" ]; - then - onion="$(docker__exec -t stacker_lnd cat /home/lnd/.tor/hidden_service/hostname | tr -d '[:space:]')" - echo "$onion:10009" - fi + docker__exec $1 cat $certdir/tls.cert | base64 } -sndev__help_lnbits() { +sndev__help_cert() { help=" +get the tls cert of a service USAGE - $ sndev stacker_lnbits get_onion get the onion address + $ sndev cert SERVICE " + + echo "$help" } -sndev__lnbits() { - shift +sndev__cli() { + t=$1 + + if [ "$t" = "-t" ]; then + shift + else + t="" + fi + + if [ "$1" = "cli" ]; then + shift + fi + if [ -z "$1" ]; then - echo "no command provided" - sndev__help_lnbits + echo "SERVICE required" + sndev__help_cli exit 1 fi - if [ "$1" = "get_onion" ]; - then - onion="$(docker__exec -t lnbits cat /app/.tor/hidden_service/hostname | tr -d '[:space:]')" - echo "$onion:5000" + + service=$1 + cli=$(docker__compose ps $service --format '{{.Label "CLI"}}') + cli_user=$(docker__compose ps $service --format '{{.Label "CLI_USER"}}') + cli_args=$(docker__compose ps $service --format '{{.Label "CLI_ARGS"}}') + + if [ -z "$cli" ]; then + echo "no CLI label found for $service" + exit 1 fi -} + shift + + if [ -n "$cli_user" ]; then + cli_user="-u $cli_user" + fi -sndev__help_tor() { + docker__exec $t $cli_user $service $cli $cli_args "$@" +} + +sndev__help_cli() { help=" +run a cli command on a service USAGE - $ sndev tor get_onion get the onion address + $ sndev cli SERVICE [COMMAND [ARGS]] " - - echo "$help" -} -sndev__tor() { - shift - if [ -z "$1" ]; then - echo "no command provided" - sndev__help_tor - exit 1 - fi - if [ "$1" = "get_onion" ]; - then - onion="$(docker__exec -t stacker_lnd cat /home/lnd/.tor/hidden_service/hostname | tr -d '[:space:]')" - echo "$onion" - fi + echo "$help" } sndev__help() { @@ -643,16 +593,12 @@ COMMANDS sn: login login as a nym - fund_user fund a nym without using an LN invoice + set_balance set the balance of a nym - lnd: + lightning: fund pay a bolt11 for funding withdraw create a bolt11 for withdrawal - cln: - cln_fund pay a bolt11 for funding with CLN - cln_withdraw create a bolt11 for withdrawal with CLN - db: psql open psql on db prisma run prisma commands @@ -660,19 +606,14 @@ COMMANDS dev: pr fetch and checkout a pr lint run linters - open open container url in browser + test run tests other: + cli service cli passthrough + open open service GUI in browser + onion service onion address + cert service tls cert compose docker compose passthrough - sn_lndcli lncli passthrough on sn_lnd - stacker_lndcli lncli passthrough on stacker_lnd - stacker_clncli lightning-cli passthrough on stacker_cln - stacker_litcli litcli passthrough on litd - tor get_onion get the onion address - stacker_lnd get_cert get the tls cert - stacker_lnd get_onion get the onion address - stacker_clncli get_onion get the onion address - lndbits get_onion get the onion address " echo "$help" } diff --git a/wallets/cln/ATTACH.md b/wallets/cln/ATTACH.md index 4093f1b4d..43f797a88 100644 --- a/wallets/cln/ATTACH.md +++ b/wallets/cln/ATTACH.md @@ -2,20 +2,20 @@ For testing cln as an attached receiving wallet, you'll need a rune and the cert # host and port -`stacker_cln:3010` +`cln:3010` # host and port (onion) Run: ```bash -sndev stacker_clncli get_onion +sndev onion cln ``` # create rune ```bash -sndev stacker_clncli --regtest createrune restrictions='["method=invoice"]' +sndev cli cln --regtest createrune restrictions='["method=invoice"]' ``` # get cert diff --git a/wallets/lnbits/ATTACH.md b/wallets/lnbits/ATTACH.md index aced9a418..98c13e638 100644 --- a/wallets/lnbits/ATTACH.md +++ b/wallets/lnbits/ATTACH.md @@ -21,7 +21,7 @@ Or simply copy the keys from here: ( These keys can be found under `Node URL, API keys and API docs`. ) -To use the same URL to connect to LNbits in the browser and server during local development, `localhost:` is mapped to `lnbits:5000` on the server. +To use the same URL to connect to LNbits in the browser and server during local development, `http://localhost:` is mapped to `http://lnbits:5000` on the server. # tor onion url @@ -29,5 +29,5 @@ To use the same URL to connect to LNbits in the browser and server during local Run the following command to get the onion url: ```bash -sndev lnbits get_onion -``` \ No newline at end of file +sndev onion lnbits +``` diff --git a/wallets/lnd/ATTACH.md b/wallets/lnd/ATTACH.md index e61c2e90c..47a8956e1 100644 --- a/wallets/lnd/ATTACH.md +++ b/wallets/lnd/ATTACH.md @@ -2,20 +2,22 @@ For testing lnd as an attached receiving wallet, you'll need a macaroon and the # host and port -`stacker_lnd:10009` +`lnd:10009` ## host and port (onion) To get the onion address run this command: ```bash -sndev stacker_lnd get_onion +sndev onion lnd ``` +Then use port 10009 on the onion address. + # generate macaroon ```bash -sndev stacker_lndcli -n regtest bakemacaroon invoices:write invoices:read +sndev cli lnd -n regtest bakemacaroon invoices:write invoices:read ``` # get cert @@ -23,5 +25,5 @@ sndev stacker_lndcli -n regtest bakemacaroon invoices:write invoices:read To get the cert run this command: ```bash -sndev stacker_lnd get_cert -``` \ No newline at end of file +sndev cert lnd +``` diff --git a/wallets/webln/ATTACH.md b/wallets/webln/ATTACH.md index afb7b59d3..e03f2cc51 100644 --- a/wallets/webln/ATTACH.md +++ b/wallets/webln/ATTACH.md @@ -1,4 +1,4 @@ -Using webln will require installing the alby browser extension and connecting it to an alby hub connected to `stacker_lnd`. +Using webln will require installing the alby browser extension and connecting it to an alby hub connected to `lnd`. 1. Install the [Alby browser extensions](https://chromewebstore.google.com/detail/alby-bitcoin-wallet-for-l/iokeahhehimjnekafflcihljlcjccdbe?pli=1) 2. Create an Alby account