SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c565562c38d6040989692f9bfb96ebf2fb598cc8
parent 12bb81257cbcf9d9014da6bbbc046e07d6c7319e
Author: nickfarrow <nicholas.w.farrow@gmail.com>
Date:   Tue,  9 Nov 2021 01:46:30 +1100

Update example docs to align with new config layout

Diffstat:
Mdocs/config_lightning.py | 42++++++++++++++++++++++--------------------
Mdocs/config_remote_node.py | 37+++++++++++++++++++------------------
2 files changed, 41 insertions(+), 38 deletions(-)

diff --git a/docs/config_lightning.py b/docs/config_lightning.py @@ -1,7 +1,7 @@ # In this example config, we enable lightning payments # On-chain payments will still be an option for users -# We will be hosting SatSale on the same machine as our node. +# We will be hosting SatSale on the same machine as our node. For remote, see other example config. # SatSale & Bitcoin Lightning Node 1.1.1.1 8332, 10009 (bitcoind, lnd) # As we are running SatSale on our node, @@ -11,17 +11,16 @@ rpcport = "8332" # From ~/.bitcoin/bitcoin.conf username = "bitcoinrpc" -password = "RPAPASSWORD" +password = "rpcpassword" -# Wallet ("" if single-wallet node, OR wallet name/path as shown in `biitcoin-cli listwallets`) +# Wallet (empty "" if your node has a single wallet, OR wallet name/path as shown in `biitcoin-cli listwallets`) wallet = "" # File in which API key will be stored api_key_path = "SatSale_API_key" - # As we are running SatSale on our node -# we do not require any remote tunnel +# we do not require any remote tunnel, leaving next part as None, #### Connect To Remote Node #### # Can use SSH or TOR @@ -36,13 +35,28 @@ tunnel_host = None # "HOST@IP" tor_bitcoinrpc_host = None # e.g. "http://if...dwr.onion" # and a tor proxy, default 127.0.0.1:9050 (for Tor Browser use "127.0.0.1:9150") tor_proxy = None -################################ + +#### Payment method #### +pay_method = "bitcoind" + +#### Lightning #### +# HERE we Switch payment_method to lnd, +pay_method = "lnd" + +# Uncomment lnd_dir, +lnd_dir = "~/.lnd/" + +# And specify the RPC port +lnd_rpcport = "10009" + +# That's all the changes needed to get lightning connected. + # Check for payment every xx seconds pollrate = 15 # Payment expires after xx seconds -payment_timeout = 60 * 60 +payment_timeout = 60*60 # Required confirmations for a payment required_confirmations = 2 @@ -50,21 +64,9 @@ required_confirmations = 2 # Global connection attempts connection_attempts = 3 -# Redirect url after payment +# Generic redirect url after payment redirect = "https://github.com/nickfarrow/satsale" -# Payment method has been switched to lnd -# pay_method = "bitcoind" -pay_method = "lnd" - -# Specify lightning directory and port -lnd_dir = "~/.lnd/" -lnd_rpcport = "10009" - -# Login certificates automatically pulled from ~/.lnd/ and ~/.lnd/data/chain/bitcoin/mainnet/ -lnd_macaroon = "invoice.macaroon" -lnd_cert = "tls.cert" - # DO NOT CHANGE THIS TO TRUE UNLESS YOU WANT ALL PAYMENTS TO AUTOMATICALLY # BE CONSIDERED AS PAID. free_mode = False diff --git a/docs/config_remote_node.py b/docs/config_remote_node.py @@ -9,19 +9,20 @@ # tunneling the required ports over SSH. # SatSale can then talk to our node via localhost on 127.0.0.1 host = "127.0.0.1" -rpcport = "8332" # port for bitcoind +rpcport = "8332" # If connections get kicked back, you may also need to set `rpcallowip=YOUR_SERVER_IP` in your `~/.bitcoin/bitcoin.conf`. # From ~/.bitcoin/bitcoin.conf username = "bitcoinrpc" -password = "RPAPASSWORD" +password = "rpcpassword" -# Wallet ("" if single-wallet node, OR wallet name/path as shown in `biitcoin-cli listwallets`) +# Wallet (empty "" if your node has a single wallet, OR wallet name/path as shown in `biitcoin-cli listwallets`) wallet = "" # File in which API key will be stored api_key_path = "SatSale_API_key" + #### Connect To Remote Node #### # Can use SSH or TOR # to tunnel/relay ports required to talk to the node via RPC (gRPC for lightning) @@ -35,13 +36,25 @@ tunnel_host = "pi@1.1.1.1" tor_bitcoinrpc_host = None # e.g. "http://if...dwr.onion" # and a tor proxy, default 127.0.0.1:9050 (for Tor Browser use "127.0.0.1:9150") tor_proxy = None -################################ + + +#### Payment method #### +pay_method = "bitcoind" + +#### Lightning #### +# Payment method has been switched to lnd +pay_method = "lnd" + +# Specify lightning directory and port +lnd_dir = "~/.lnd/" +lnd_rpcport = "10009" + # Check for payment every xx seconds pollrate = 15 # Payment expires after xx seconds -payment_timeout = 60 * 60 +payment_timeout = 60*60 # Required confirmations for a payment required_confirmations = 2 @@ -49,21 +62,9 @@ required_confirmations = 2 # Global connection attempts connection_attempts = 3 -# Redirect url after payment +# Generic redirect url after payment redirect = "https://github.com/nickfarrow/satsale" -# Payment method has been switched to lnd -# pay_method = "bitcoind" -pay_method = "lnd" - -# Specify lightning directory and port -lnd_dir = "~/.lnd/" -lnd_rpcport = "10009" - -# Login certificates automatically pulled from ~/.lnd/ and ~/.lnd/data/chain/bitcoin/mainnet/ -lnd_macaroon = "invoice.macaroon" -lnd_cert = "tls.cert" - # DO NOT CHANGE THIS TO TRUE UNLESS YOU WANT ALL PAYMENTS TO AUTOMATICALLY # BE CONSIDERED AS PAID. free_mode = False