Merge branch 'master' into fix/bootstrap
This commit is contained in:
commit
fb7e679325
117 changed files with 51904 additions and 50029 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.git
|
||||
.github
|
||||
build
|
||||
node_modules
|
||||
22
Umbrel/docker-compose.yml
Normal file
22
Umbrel/docker-compose.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
version: "3.7"
|
||||
services:
|
||||
app_proxy:
|
||||
environment:
|
||||
APP_HOST: lightning-pub
|
||||
APP_PORT: 1776
|
||||
|
||||
server:
|
||||
image: ghcr.io/shocknet/lightning.pub:umbrel-works
|
||||
volumes:
|
||||
- "${APP_DATA_DIR}/data:/data"
|
||||
- "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro"
|
||||
environment:
|
||||
LN_BACKEND_TYPE: "LND"
|
||||
LND_ADDRESS: $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT
|
||||
LND_CERT_PATH: "/lnd/tls.cert"
|
||||
LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon"
|
||||
DATABASE_FILE: "/data/db.sqlite"
|
||||
METRICS_DATABASE_FILE: "/data/metrics.sqlite"
|
||||
PORT: 1776
|
||||
restart: on-failure
|
||||
stop_grace_period: 1m
|
||||
36
Umbrel/umbrel-app.yml
Normal file
36
Umbrel/umbrel-app.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
manifestVersion: 1
|
||||
id: lightning-pub
|
||||
category: finance
|
||||
name: Lightning.Pub
|
||||
version: "1.0.0"
|
||||
tagline: lightning, nostr, accounts, lnurl, web
|
||||
description: >-
|
||||
"Pub" is a Nostr-native account system designed
|
||||
to make running Lightning infrastructure for your friends/family/customers
|
||||
easier than previously thought possible.
|
||||
|
||||
Being Nostr-native eliminates the complexity of configuring your node like a server by using commodity Nostr relays.
|
||||
These relays, unlike LNURL proxies, are trustless by nature of Nostr's own encryption spec (NIP44).
|
||||
|
||||
Support for optional services are integrated into Pub for operators seeking backward compatibility with legacy LNURLs and Lightning Addresses.
|
||||
|
||||
By solving the networking and programability hurdles, Pub provides Lightning with a 3rd Layer that enables node-runners and
|
||||
Uncle Jims to more easily bring their personal network into Bitcoin's permissionless economy. In doing so, Pub runners
|
||||
can keep the Lightning Network decentralized, with custodial scaling that is free of fiat rails, large banks,
|
||||
and other forms of high-time-preference shitcoinery.
|
||||
developer: shocknet
|
||||
website: https://shock.network
|
||||
dependencies:
|
||||
- lightning
|
||||
repo: https://github.com/shocknet/Lightning.Pub
|
||||
support: https://github.com/shocknet/Lightning.Pub/discussions
|
||||
port: 1776
|
||||
gallery:
|
||||
- 1.jpg
|
||||
- 2.jpg
|
||||
- 3.jpg
|
||||
path: ""
|
||||
defaultUsername: ""
|
||||
defaultPassword: ""
|
||||
submitter: shocknet
|
||||
submission: https://github.com/getumbrel/umbrel/pull/334
|
||||
376
deploy.sh
Executable file
376
deploy.sh
Executable file
|
|
@ -0,0 +1,376 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
PRIMARY_COLOR="\e[38;5;208m" # #f59322
|
||||
SECONDARY_COLOR="\e[38;5;165m" # #c740c7
|
||||
RESET_COLOR="\e[0m"
|
||||
|
||||
LOG_FILE="/var/log/deploy.log"
|
||||
|
||||
touch $LOG_FILE
|
||||
chmod 644 $LOG_FILE
|
||||
|
||||
log() {
|
||||
local message="$(date '+%Y-%m-%d %H:%M:%S') $1"
|
||||
if [ -t 1 ]; then
|
||||
echo -e "$message"
|
||||
fi
|
||||
echo -e "$(echo $message | sed 's/\\e\[[0-9;]*m//g')" >> $LOG_FILE
|
||||
}
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
log "${PRIMARY_COLOR}Please run as root or use sudo.${RESET_COLOR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_homebrew() {
|
||||
if ! command -v brew &> /dev/null; then
|
||||
log "${PRIMARY_COLOR}Homebrew not found. Installing Homebrew...${RESET_COLOR}"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
}
|
||||
|
||||
install_rsync_mac() {
|
||||
check_homebrew
|
||||
log "${PRIMARY_COLOR}Installing${RESET_COLOR} rsync using Homebrew..."
|
||||
brew install rsync
|
||||
}
|
||||
|
||||
create_launchd_plist() {
|
||||
create_plist() {
|
||||
local plist_path=$1
|
||||
local label=$2
|
||||
local program_args=$3
|
||||
local working_dir=$4
|
||||
|
||||
if [ -f "$plist_path" ]; then
|
||||
log "${PRIMARY_COLOR}${label} already exists. Skipping creation.${RESET_COLOR}"
|
||||
else
|
||||
cat <<EOF > "$plist_path"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>${label}</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
${program_args}
|
||||
</array>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>${working_dir}</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
USER_HOME=$(eval echo ~$(whoami))
|
||||
NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${USER_HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
LAUNCH_AGENTS_DIR="${USER_HOME}/Library/LaunchAgents"
|
||||
|
||||
create_plist "${LAUNCH_AGENTS_DIR}/local.lnd.plist" "local.lnd" "<string>${USER_HOME}/lnd/lnd</string>" ""
|
||||
create_plist "${LAUNCH_AGENTS_DIR}/local.lightning_pub.plist" "local.lightning_pub" "<string>/bin/bash</string><string>-c</string><string>source ${NVM_DIR}/nvm.sh && npm start</string>" "${USER_HOME}/lightning_pub"
|
||||
|
||||
log "${PRIMARY_COLOR}Created launchd plists. Please load them using launchctl.${RESET_COLOR}"
|
||||
}
|
||||
|
||||
start_services_mac() {
|
||||
create_launchd_plist
|
||||
launchctl load "${LAUNCH_AGENTS_DIR}/local.lnd.plist"
|
||||
launchctl load "${LAUNCH_AGENTS_DIR}/local.lightning_pub.plist"
|
||||
log "${SECONDARY_COLOR}LND${RESET_COLOR} and ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} services started using launchd."
|
||||
}
|
||||
|
||||
handle_macos() {
|
||||
check_homebrew
|
||||
install_rsync_mac
|
||||
install_nodejs
|
||||
install_lightning_pub
|
||||
start_services_mac
|
||||
}
|
||||
|
||||
detect_os_arch() {
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
case "$OS" in
|
||||
Linux*) OS=Linux;;
|
||||
Darwin*) OS=Mac;;
|
||||
CYGWIN*) OS=Cygwin;;
|
||||
MINGW*) OS=MinGw;;
|
||||
*) OS="UNKNOWN"
|
||||
esac
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH=amd64;;
|
||||
arm64) ARCH=arm64;;
|
||||
*) ARCH="UNKNOWN"
|
||||
esac
|
||||
|
||||
if [ "$OS" = "Linux" ] && command -v systemctl &> /dev/null; then
|
||||
SYSTEMCTL_AVAILABLE=true
|
||||
else
|
||||
SYSTEMCTL_AVAILABLE=false
|
||||
fi
|
||||
}
|
||||
|
||||
install_lnd() {
|
||||
LND_VERSION=$(wget -qO- https://api.github.com/repos/lightningnetwork/lnd/releases/latest | grep 'tag_name' | cut -d\" -f4)
|
||||
LND_URL="https://github.com/lightningnetwork/lnd/releases/download/${LND_VERSION}/lnd-${OS}-${ARCH}-${LND_VERSION}.tar.gz"
|
||||
|
||||
# Check if LND is already installed
|
||||
if [ -d "$HOME/lnd" ]; then
|
||||
CURRENT_VERSION=$("$HOME/lnd/lnd" --version | grep -oP 'version \K[^\s]+')
|
||||
if [ "$CURRENT_VERSION" == "${LND_VERSION#v}" ]; then
|
||||
log "${SECONDARY_COLOR}LND${RESET_COLOR} is already up-to-date (version $CURRENT_VERSION)."
|
||||
return
|
||||
else
|
||||
if [ "$SKIP_PROMPT" != true ]; then
|
||||
read -p "LND version $CURRENT_VERSION is installed. Do you want to upgrade to version $LND_VERSION? (y/N): " response
|
||||
case "$response" in
|
||||
[yY][eE][sS]|[yY])
|
||||
log "${PRIMARY_COLOR}Upgrading${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR} from version $CURRENT_VERSION to $LND_VERSION..."
|
||||
;;
|
||||
*)
|
||||
log "$(date '+%Y-%m-%d %H:%M:%S') Upgrade cancelled."
|
||||
return
|
||||
;;
|
||||
esac
|
||||
else
|
||||
log "${PRIMARY_COLOR}Upgrading${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR} from version $CURRENT_VERSION to $LND_VERSION..."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
log "${PRIMARY_COLOR}Downloading${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR}..."
|
||||
|
||||
# Start the download
|
||||
wget -q $LND_URL -O lnd.tar.gz
|
||||
|
||||
# Check if LND is already running and stop it if necessary (Linux)
|
||||
if [ "$OS" = "Linux" ] && [ "$SYSTEMCTL_AVAILABLE" = true ]; then
|
||||
if systemctl is-active --quiet lnd; then
|
||||
log "${PRIMARY_COLOR}Stopping${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR} service..."
|
||||
sudo systemctl stop lnd
|
||||
fi
|
||||
else
|
||||
log "${PRIMARY_COLOR}systemctl not found. Please stop ${SECONDARY_COLOR}LND${RESET_COLOR} manually if it is running.${RESET_COLOR}"
|
||||
fi
|
||||
|
||||
tar -xzf lnd.tar.gz -C ~/ > /dev/null
|
||||
rm lnd.tar.gz
|
||||
mv lnd-* lnd
|
||||
|
||||
# Create .lnd directory if it doesn't exist
|
||||
mkdir -p ~/.lnd
|
||||
|
||||
# Check if lnd.conf already exists and avoid overwriting it
|
||||
if [ -f ~/.lnd/lnd.conf ]; then
|
||||
log "${PRIMARY_COLOR}lnd.conf already exists. Skipping creation of new lnd.conf file.${RESET_COLOR}"
|
||||
else
|
||||
cat <<EOF > ~/.lnd/lnd.conf
|
||||
bitcoin.mainnet=true
|
||||
bitcoin.node=neutrino
|
||||
neutrino.addpeer=neutrino.shock.network
|
||||
feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
|
||||
EOF
|
||||
fi
|
||||
|
||||
log "${SECONDARY_COLOR}LND${RESET_COLOR} installation and configuration completed."
|
||||
}
|
||||
|
||||
# Use nvm to install nodejs
|
||||
install_nodejs() {
|
||||
log "${PRIMARY_COLOR}Checking${RESET_COLOR} for Node.js..."
|
||||
MINIMUM_VERSION="18.0.0"
|
||||
|
||||
# Load nvm if it already exists
|
||||
export NVM_DIR="${NVM_DIR}"
|
||||
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"
|
||||
|
||||
if ! command -v nvm &> /dev/null; then
|
||||
NVM_VERSION=$(wget -qO- https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash > /dev/null 2>&1
|
||||
export NVM_DIR="${NVM_DIR}"
|
||||
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"
|
||||
fi
|
||||
|
||||
if command -v node &> /dev/null; then
|
||||
NODE_VERSION=$(node -v | sed 's/v//')
|
||||
if [ "$(printf '%s\n' "$MINIMUM_VERSION" "$NODE_VERSION" | sort -V | head -n1)" = "$MINIMUM_VERSION" ]; then
|
||||
log "Node.js is already installed and meets the minimum version requirement."
|
||||
return
|
||||
else
|
||||
log "${PRIMARY_COLOR}Updating${RESET_COLOR} Node.js to the LTS version..."
|
||||
fi
|
||||
else
|
||||
log "Node.js is not installed. ${PRIMARY_COLOR}Installing the LTS version...${RESET_COLOR}"
|
||||
fi
|
||||
|
||||
nvm install --lts
|
||||
|
||||
log "Node.js LTS installation completed."
|
||||
}
|
||||
|
||||
install_lightning_pub() {
|
||||
log "${PRIMARY_COLOR}Installing${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..."
|
||||
REPO_URL="https://github.com/shocknet/Lightning.Pub/tarball/master"
|
||||
wget $REPO_URL -O lightning_pub.tar.gz > /dev/null 2>&1
|
||||
mkdir -p lightning_pub_temp
|
||||
tar -xvzf lightning_pub.tar.gz -C lightning_pub_temp --strip-components=1 > /dev/null 2>&1
|
||||
rm lightning_pub.tar.gz
|
||||
|
||||
if ! command -v rsync &> /dev/null; then
|
||||
log "${PRIMARY_COLOR}rsync not found, installing...${RESET_COLOR}"
|
||||
if [ "$OS" = "Mac" ]; then
|
||||
brew install rsync
|
||||
elif [ "$OS" = "Linux" ]; then
|
||||
if [ -x "$(command -v apt-get)" ]; then
|
||||
sudo apt-get update > /dev/null 2>&1
|
||||
sudo apt-get install -y rsync > /dev/null 2>&1
|
||||
elif [ -x "$(command -v yum)" ]; then
|
||||
sudo yum install -y rsync > /dev/null 2>&1
|
||||
else
|
||||
log "${PRIMARY_COLOR}Package manager not found. Please install rsync manually.${RESET_COLOR}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
log "${PRIMARY_COLOR}Package manager not found. Please install rsync manually.${RESET_COLOR}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Merge if upgrade
|
||||
rsync -av --exclude='*.sqlite' --exclude='.env' --exclude='logs' --exclude='node_modules' lightning_pub_temp/ lightning_pub/ > /dev/null 2>&1
|
||||
rm -rf lightning_pub_temp
|
||||
|
||||
# Load nvm and npm
|
||||
export NVM_DIR="${NVM_DIR}"
|
||||
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh"
|
||||
|
||||
cd lightning_pub
|
||||
|
||||
log "${PRIMARY_COLOR}Installing${RESET_COLOR} npm dependencies..."
|
||||
|
||||
npm install > npm_install.log 2>&1 &
|
||||
npm_pid=$!
|
||||
wait $npm_pid
|
||||
|
||||
log "${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} installation completed."
|
||||
}
|
||||
|
||||
create_start_script() {
|
||||
cat <<EOF > start.sh
|
||||
#!/bin/bash
|
||||
${USER_HOME}/lnd/lnd &
|
||||
LND_PID=\$!
|
||||
sleep 10
|
||||
npm start &
|
||||
NODE_PID=\$!
|
||||
wait \$LND_PID
|
||||
wait \$NODE_PID
|
||||
EOF
|
||||
chmod +x start.sh
|
||||
log "systemctl not available. Created start.sh. Please use this script to start the services manually."
|
||||
}
|
||||
|
||||
start_services() {
|
||||
USER_HOME=$(eval echo ~$(whoami))
|
||||
if [ "$OS" = "Linux" ]; then
|
||||
if [ "$SYSTEMCTL_AVAILABLE" = true ]; then
|
||||
sudo bash -c "cat > /etc/systemd/system/lnd.service <<EOF
|
||||
[Unit]
|
||||
Description=LND Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=${USER_HOME}/lnd/lnd
|
||||
User=$(whoami)
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF"
|
||||
|
||||
sudo bash -c "cat > /etc/systemd/system/lightning_pub.service <<EOF
|
||||
[Unit]
|
||||
Description=Lightning.Pub Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c 'source ${NVM_DIR}/nvm.sh && npm start'
|
||||
WorkingDirectory=${USER_HOME}/lightning_pub
|
||||
User=$(whoami)
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF"
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable lnd
|
||||
sudo systemctl enable lightning_pub
|
||||
|
||||
log "${PRIMARY_COLOR}Starting${RESET_COLOR} ${SECONDARY_COLOR}LND${RESET_COLOR} service..."
|
||||
sudo systemctl start lnd &
|
||||
lnd_pid=$!
|
||||
wait $lnd_pid
|
||||
if systemctl is-active --quiet lnd; then
|
||||
log "${SECONDARY_COLOR}LND${RESET_COLOR} started successfully using systemd."
|
||||
else
|
||||
log "Failed to start ${SECONDARY_COLOR}LND${RESET_COLOR} using systemd."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Giving ${SECONDARY_COLOR}LND${RESET_COLOR} a few seconds to start before starting ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR}..."
|
||||
sleep 10
|
||||
|
||||
log "${PRIMARY_COLOR}Starting${RESET_COLOR} ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} service..."
|
||||
sudo systemctl start lightning_pub &
|
||||
lightning_pub_pid=$!
|
||||
wait $lightning_pub_pid
|
||||
if systemctl is-active --quiet lightning_pub; then
|
||||
log "${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} started successfully using systemd."
|
||||
else
|
||||
log "Failed to start ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} using systemd."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
create_start_script
|
||||
log "systemctl not available. Created start.sh. Please use this script to start the services manually."
|
||||
fi
|
||||
elif [ "$OS" = "Mac" ]; then
|
||||
log "macOS detected. Please configure launchd manually to start ${SECONDARY_COLOR}LND${RESET_COLOR} and ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} at startup."
|
||||
create_start_script
|
||||
elif [ "$OS" = "Cygwin" ] || [ "$OS" = "MinGw" ]; then
|
||||
log "Windows detected. Please configure your startup scripts manually to start ${SECONDARY_COLOR}LND${RESET_COLOR} and ${SECONDARY_COLOR}Lightning.Pub${RESET_COLOR} at startup."
|
||||
create_start_script
|
||||
else
|
||||
log "Unsupported OS detected. Please configure your startup scripts manually."
|
||||
create_start_script
|
||||
fi
|
||||
}
|
||||
|
||||
# Upgrade flag
|
||||
SKIP_PROMPT=false
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--yes)
|
||||
SKIP_PROMPT=true
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
detect_os_arch
|
||||
|
||||
if [ "$OS" = "Mac" ]; then
|
||||
handle_macos
|
||||
else
|
||||
install_lnd
|
||||
install_nodejs
|
||||
install_lightning_pub
|
||||
start_services
|
||||
fi
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
import express from 'express';
|
||||
import path from 'path';
|
||||
import { ServerOptions } from "../proto/autogenerated/ts/express_server";
|
||||
import { AdminContext, MetricsContext } from "../proto/autogenerated/ts/types";
|
||||
import Main from './services/main'
|
||||
|
|
@ -6,6 +8,7 @@ const serverOptions = (mainHandler: Main): ServerOptions => {
|
|||
const log = getLogger({})
|
||||
return {
|
||||
logger: { log, error: err => log(ERROR, err) },
|
||||
staticFiles: path.resolve('static'),
|
||||
AdminAuthGuard: adminAuth,
|
||||
MetricsAuthGuard: metricsAuth,
|
||||
AppAuthGuard: async (authHeader) => { return { app_id: mainHandler.applicationManager.DecodeAppToken(stripBearer(authHeader)) } },
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
import { EnvMustBeNonEmptyString, EnvMustBeInteger, EnvCanBeBoolean, EnvCanBeInteger } from '../helpers/envParser.js'
|
||||
import { LndSettings } from './settings.js'
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
|
||||
const resolveHome = (filepath: string) => {
|
||||
if (filepath[0] === '~') {
|
||||
return path.join(os.homedir(), filepath.slice(1))
|
||||
}
|
||||
return filepath
|
||||
}
|
||||
|
||||
export const LoadLndSettingsFromEnv = (): LndSettings => {
|
||||
const lndAddr = process.env.LND_ADDRESS || "127.0.0.1:10009"
|
||||
const lndCertPath = process.env.LND_CERT_PATH || "~/.lnd/tls.cert"
|
||||
const lndMacaroonPath = process.env.LND_MACAROON_PATH || "~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"
|
||||
const lndCertPath = process.env.LND_CERT_PATH || resolveHome("~/.lnd/tls.cert")
|
||||
const lndMacaroonPath = process.env.LND_MACAROON_PATH || resolveHome("~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon")
|
||||
const feeRateLimit = EnvCanBeInteger("OUTBOUND_MAX_FEE_BPS", 60) / 10000
|
||||
const feeFixedLimit = EnvCanBeInteger("OUTBOUND_MAX_FEE_EXTRA_SATS", 100)
|
||||
const mockLnd = EnvCanBeBoolean("MOCK_LND")
|
||||
|
|
|
|||
|
|
@ -2,11 +2,18 @@ import { ChildProcess, fork } from 'child_process'
|
|||
import { EnvMustBeNonEmptyString } from "../helpers/envParser.js"
|
||||
import { NostrSettings, NostrEvent, ChildProcessRequest, ChildProcessResponse, SendData, SendInitiator } from "./handler.js"
|
||||
type EventCallback = (event: NostrEvent) => void
|
||||
|
||||
const getEnvOrDefault = (name: string, defaultValue: string): string => {
|
||||
return process.env[name] || defaultValue;
|
||||
}
|
||||
|
||||
export const LoadNosrtSettingsFromEnv = (test = false) => {
|
||||
const relaysEnv = getEnvOrDefault("NOSTR_RELAYS", "wss://strfry.shock.network");
|
||||
return {
|
||||
relays: EnvMustBeNonEmptyString("NOSTR_RELAYS").split(' ')
|
||||
relays: relaysEnv.split(' ')
|
||||
}
|
||||
}
|
||||
|
||||
export default class NostrSubprocess {
|
||||
settings: NostrSettings
|
||||
childProcess: ChildProcess
|
||||
|
|
|
|||
102
static/backup.html
Normal file
102
static/backup.html
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<link rel="stylesheet" href="css/backup.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<button class="icon-button back-button" onclick="history.back()">
|
||||
<img src="img/back.svg" alt="" />
|
||||
</button>
|
||||
<h2>Choose a Recovery Method</h2>
|
||||
<p class="header-title">
|
||||
<span style="font-weight: bold">New Node! 🎉</span> It's important
|
||||
to backup your keys.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<section class="setup-content">
|
||||
<div class="description-box">
|
||||
<div class="description">
|
||||
In addition to your seed phrase, you also need channel details to recover funds should your node experience a hardware failure.
|
||||
</div>
|
||||
<br />
|
||||
<div class="description">
|
||||
It's important always to have the latest version of this file. Fortunately, it's small enough to automatically store on the Nostr relay.
|
||||
</div>
|
||||
</div>
|
||||
<div class="warning-text">
|
||||
If you did not choose the developers relay, be sure your relay has
|
||||
adequate storage policies to hold NIP78 events.
|
||||
</div>
|
||||
<div class="checkbox-container">
|
||||
<div class="checkbox" style="margin-top: 12px">
|
||||
<input type="checkbox" id="backup" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="backup">
|
||||
Encrypted Backup to Nostr Relay
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="checkbox-container">
|
||||
<div class="checkbox manual-checkbox" style="margin-top: 12px">
|
||||
<input type="checkbox" id="manual-backup" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="manual-backup" >
|
||||
DO NOT store on relay (Manual Backups)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="push-button hidden-button"
|
||||
onclick="location.href='seed.html'"
|
||||
style="margin-top: 60px;"
|
||||
id="next-button"
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text">
|
||||
<div>By proceeding you acknowledge that this is</div>
|
||||
<div>bleeding-edge software, and agree to the providers</div>
|
||||
<div>
|
||||
<span style="color: #c434e0">terms</span> regarding any services
|
||||
herein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
|
||||
<script src="js/backup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
80
static/connect.html
Normal file
80
static/connect.html
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<link rel="stylesheet" href="css/connect.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<button class="icon-button back-button" onclick="history.back()">
|
||||
<img src="img/back.svg" alt="" />
|
||||
</button>
|
||||
<h2>Connect</h2>
|
||||
<p class="header-title">
|
||||
You can now manage your node remotely
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<section class="setup-content">
|
||||
<div>For dashboard access, use <a href="https://preview.uxpin.com/ae6e6372ab26cd13438d486d4d1ac9d184ec8e82#/pages/164889267" style="color: #2aabe9;" target="_blank">ShockWallet</a> and tap the logo 3 times.</div>
|
||||
<div style="font-size: 13px; margin-top: 5px;">Scan the QR or Copy-Paste the string to establish the connection.</div>
|
||||
<div style="display: flex; justify-content: center;">
|
||||
<div class="qrcode-box" id="codebox">
|
||||
<div style="font-size: 11px;">
|
||||
<div style="text-align: center; color: #a3a3a3;">Code contains a one-time pairing secret</div>
|
||||
<div style="text-align: center; color: #c434e0;" id="click-text">Click to reveal</div>
|
||||
</div>
|
||||
<div id="qrcode"></div>
|
||||
<div style="color: #a3a3a3; font-size: 11px;">
|
||||
<div>npub123abcdefghhhhhhhhhhhhhhh</div>
|
||||
<div>relay.lightning.pub</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text">
|
||||
<div>By proceeding you acknowledge that this is</div>
|
||||
<div>bleeding-edge software, and agree to the providers</div>
|
||||
<div>
|
||||
<span style="color: #c434e0">terms</span> regarding any services
|
||||
herein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
|
||||
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script>
|
||||
|
||||
<script src="js/script.js"></script>
|
||||
<script src="js/connect.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
28
static/css/backup.css
Normal file
28
static/css/backup.css
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
.description {
|
||||
font-size: 14px;
|
||||
color: #a3a3a3;
|
||||
text-decoration: none solid rgb(163, 163, 163);
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.warning-text {
|
||||
font-size: 14px;
|
||||
color: #c434e0;
|
||||
font-style: italic;
|
||||
text-decoration: none solid rgb(196, 52, 224);
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
margin-top: 16px;
|
||||
}
|
||||
.checkbox .manual_backup {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.manual-checkbox {
|
||||
margin-left: 9%;
|
||||
}
|
||||
@media screen and (max-width: 425px) {
|
||||
.manual-checkbox {
|
||||
margin-left: 4%;
|
||||
}
|
||||
}
|
||||
49
static/css/connect.css
Normal file
49
static/css/connect.css
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
.qrcode-box::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 15px;
|
||||
border: 1px solid transparent;
|
||||
background: linear-gradient(60deg, #ff7700 0%, #c740c7 100% ) border-box;
|
||||
mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
-webkit-mask-composite: destination-out;
|
||||
mask-composite: exclude;
|
||||
}
|
||||
.qrcode-box {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 253px;
|
||||
height: 241px;
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
backdrop-filter: blur(10px);
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
transition: background-color 0.5s;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.qrcode-box:hover {
|
||||
background-color: #80808062;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.qrcode-box-clicked::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 15px;
|
||||
border: 1px solid transparent;
|
||||
background: linear-gradient(60deg, #ff7700 0%, #c740c7 100% ) border-box;
|
||||
mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
-webkit-mask-composite: destination-out;
|
||||
mask-composite: exclude;
|
||||
}
|
||||
.qrcode-box-clicked {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 253px;
|
||||
height: 241px;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
transition: background-color 0.5s;
|
||||
border-radius: 15px;
|
||||
}
|
||||
43
static/css/liquidity.css
Normal file
43
static/css/liquidity.css
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
.question-box {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
left: -4px;
|
||||
}
|
||||
|
||||
.automate .question-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
min-width: 280px;
|
||||
background-color: var(--background-color);
|
||||
color: #a3a3a3;
|
||||
padding: 12px;
|
||||
border: 2px solid #c423e0;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
transform: translate(-50%, -50%);
|
||||
padding-top: 28px;
|
||||
z-index: 200;
|
||||
left: 65%;
|
||||
}
|
||||
|
||||
.question-content .close-button {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 0;
|
||||
}
|
||||
.question-content .question-more {
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
right: 6px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.automate {
|
||||
position: relative;
|
||||
}
|
||||
@media screen and (max-width: 450px) {
|
||||
.automate > .question-content {
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
35
static/css/seed.css
Normal file
35
static/css/seed.css
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
.seed-box-container {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto auto auto auto;
|
||||
justify-content: center;
|
||||
row-gap: 4px;
|
||||
column-gap: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 680px) {
|
||||
.seed-box-container {
|
||||
grid-template-columns: auto auto auto auto;
|
||||
}
|
||||
}
|
||||
|
||||
.blur-filter {
|
||||
filter: blur(5px);
|
||||
}
|
||||
|
||||
.seed-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.reveal-button {
|
||||
font-size: 14px;
|
||||
color: #c434e0;
|
||||
font-style: italic;
|
||||
text-decoration: none solid rgb(196, 52, 224);
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
margin-top: 16px;
|
||||
}
|
||||
141
static/css/status.css
Normal file
141
static/css/status.css
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
.status-element {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 100px;
|
||||
margin-top: 10px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.green-dot {
|
||||
font-size: 15px;
|
||||
color: #32a852;
|
||||
}
|
||||
|
||||
.yellow-dot {
|
||||
font-size: 15px;
|
||||
color: #ccc731;
|
||||
}
|
||||
|
||||
.editable-content {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: flex-start;
|
||||
color: #999999;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.show-nodey>input {
|
||||
/* border: none; */
|
||||
/* box-shadow: none; */
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.invite-link {
|
||||
margin-top: 5px;
|
||||
font-size: 12px;
|
||||
color: #c434e0;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 450px) {
|
||||
.status-element {
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
main {
|
||||
zoom: 1.1;
|
||||
}
|
||||
#reset-box {
|
||||
top: 30%!important;
|
||||
}
|
||||
}
|
||||
|
||||
.watchdog-status {
|
||||
position: absolute;
|
||||
right: -22px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
#reset-box {
|
||||
width: 296px;
|
||||
height: auto;
|
||||
border: 1px solid #c434e0;
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: rgb(0, 0, 0);
|
||||
z-index: 1;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#reset-box .close-button {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.reset-box-content {
|
||||
padding: 28px 10px 5px 10px;
|
||||
color: #a3a3a3;
|
||||
font-size: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.continue-button-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.continue-button {
|
||||
display: block;
|
||||
position: relative;
|
||||
border-radius: 100px;
|
||||
text-align: center;
|
||||
width: 134px;
|
||||
height: 30px;
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
transition: background-color 0.5s;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.continue-button::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 15px;
|
||||
border: 1px solid transparent;
|
||||
background: linear-gradient(60deg, #ff7700 0%, #c740c7 100% ) border-box;
|
||||
mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
-webkit-mask-composite: destination-out;
|
||||
mask-composite: exclude;
|
||||
}
|
||||
.continue-button:hover {
|
||||
background-color: #373a3d;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.small-btn {
|
||||
margin-block-start: 1px;
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
background: linear-gradient(var(--background-color), var(--background-color)) padding-box,
|
||||
var(--gradient) border-box;
|
||||
border-radius: 2rem;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
286
static/css/styles.css
Normal file
286
static/css/styles.css
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
:root {
|
||||
--background-color: #16191c;
|
||||
--color: #ffffff;
|
||||
--color-marked: #ff7700;
|
||||
--color-linked: #2aabe9;
|
||||
--gradient: linear-gradient(60deg, #ff7700 0%, #c740c7 100%);
|
||||
--font-size-h2: 36px;
|
||||
--font-size-p: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Montserrat;
|
||||
background-color: var(--background-color);
|
||||
color: var(--color);
|
||||
text-align: center;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: var(--background-color);
|
||||
padding-inline: 2%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
height: 4rem;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 600px;
|
||||
margin-inline: auto;
|
||||
padding: 1rem;
|
||||
margin-bottom: auto;
|
||||
zoom: 1.3;
|
||||
}
|
||||
|
||||
@media (max-height: 740px) {
|
||||
main {
|
||||
zoom: unset;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
body > * {
|
||||
zoom: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 2000px) {
|
||||
body > * {
|
||||
zoom: 1.6;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 425px) {
|
||||
header > img:nth-child(1) {
|
||||
width: 30px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
header > img:nth-child(2) {
|
||||
width: auto;
|
||||
height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
background-color: transparent;
|
||||
padding: 7px 10px;
|
||||
border: 1px solid #c740c7;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
outline: none;
|
||||
color: #999999;
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.push-button {
|
||||
background-color: transparent;
|
||||
padding: 10px 55px;
|
||||
font-size: 20px;
|
||||
color: var(--color);
|
||||
text-align: center;
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
background: linear-gradient(var(--background-color), var(--background-color))
|
||||
padding-box,
|
||||
var(--gradient) border-box;
|
||||
border-radius: 5px;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: var(--font-size-h2);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: var(--font-size-p);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.text-gray {
|
||||
color: #a3a3a3;
|
||||
margin-block-end: 5px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Hide the default checkbox */
|
||||
.checkbox input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Create a new box */
|
||||
.checkbox label {
|
||||
padding-left: 32px;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
color: #a3a3a3;
|
||||
text-decoration: none solid rgb(163, 163, 163);
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.checkbox .checkbox-shape {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: transparent;
|
||||
border: 1px solid #a3a3a3;
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Display a checkmark when the checkbox is checked */
|
||||
.checkbox input[type="checkbox"]:checked + .checkbox-shape::before {
|
||||
content: "✓";
|
||||
color: #a012c7;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.line {
|
||||
margin-block: 24px;
|
||||
background: var(--gradient);
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.marked {
|
||||
color: var(--color-marked);
|
||||
}
|
||||
|
||||
.linked {
|
||||
color: var(--color-linked);
|
||||
}
|
||||
|
||||
.setup-footer > p {
|
||||
line-height: 4px;
|
||||
}
|
||||
|
||||
.setup-header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.setup-header > .back-button {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.setup-header > .back-button {
|
||||
top: 10px;
|
||||
left: -20px;
|
||||
}
|
||||
}
|
||||
|
||||
.setup-header > h2 {
|
||||
margin-block-start: 20px;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.setup-header > h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.setup-header .header-title {
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#qrcode {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 5px;
|
||||
filter: blur(5px);
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.input-group span {
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
text-decoration: none solid rgb(255, 255, 255);
|
||||
text-shadow: 0px 0px 2px rgba(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
.input-group > input {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
margin-inline: auto;
|
||||
padding-top: 18px;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
footer .footer-text {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.checkbox-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.hidden-button {
|
||||
visibility: hidden;
|
||||
}
|
||||
.need-help{
|
||||
transition-duration: 0.3s;
|
||||
text-decoration-color: #c434e0;
|
||||
|
||||
}
|
||||
.need-help:hover{
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #c434e0;
|
||||
}
|
||||
BIN
static/img/LightningPub.png
Normal file
BIN
static/img/LightningPub.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
1
static/img/back.svg
Normal file
1
static/img/back.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 24 24" width="24" height="24"><g><path xmlns:default="http://www.w3.org/2000/svg" d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" style="fill: rgb(255, 255, 255);" vector-effect="non-scaling-stroke"/></g></svg>
|
||||
|
After Width: | Height: | Size: 383 B |
1
static/img/close.svg
Normal file
1
static/img/close.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 41 41" width="20" height="20"><g><path xmlns:default="http://www.w3.org/2000/svg" d="M35.6,41.5c-0.8,0-1.6-0.3-2.1-0.9L20.7,27.8L8,40.6c-1.1,1.1-3.1,1.1-4.2,0l-2.8-2.8c-1.2-1.2-1.2-3.1,0-4.3l12.7-12.8 L0.9,7.9C0.3,7.4,0,6.6,0,5.8s0.3-1.6,0.9-2.1l2.8-2.8c1.1-1.1,3.1-1.1,4.2,0l12.7,12.8L33.5,0.9c1.1-1.1,3.1-1.1,4.2,0l2.8,2.8 c0.6,0.6,0.9,1.3,0.9,2.1s-0.3,1.6-0.9,2.1L27.8,20.7l12.7,12.8c1.2,1.2,1.2,3.1,0,4.3l-2.8,2.8C37.1,41.1,36.4,41.5,35.6,41.5z M20.7,25l14.2,14.2c0.4,0.4,1,0.4,1.4,0l2.8-2.8c0.4-0.4,0.4-1,0-1.4L25,20.7L39.1,6.5c0.2-0.2,0.3-0.4,0.3-0.7s-0.1-0.5-0.3-0.7 l-2.8-2.8c-0.4-0.4-1-0.4-1.4,0L20.7,16.5L6.5,2.3c-0.4-0.4-1-0.4-1.4,0L2.3,5.1C2.1,5.3,2,5.6,2,5.8s0.1,0.5,0.3,0.7l14.2,14.2 L2.3,34.9c-0.4,0.4-0.4,1,0,1.4l2.8,2.8c0.4,0.4,1,0.4,1.4,0L20.7,25z" style="fill: rgb(196, 52, 224);" vector-effect="non-scaling-stroke"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1,008 B |
1
static/img/pencil.svg
Normal file
1
static/img/pencil.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 24 24" width="16" height="16"><g><path xmlns:default="http://www.w3.org/2000/svg" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" style="fill: rgb(140, 140, 140);" vector-effect="non-scaling-stroke"/></g></svg>
|
||||
|
After Width: | Height: | Size: 472 B |
BIN
static/img/pub_logo.png
Normal file
BIN
static/img/pub_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
1
static/img/question.svg
Normal file
1
static/img/question.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" overflow="visible" preserveAspectRatio="none" viewBox="0 0 24 24" width="16" height="16"><g><path xmlns:default="http://www.w3.org/2000/svg" id="question-circle" d="M13.24,17.24c-0.06,0.06-0.15,0.09-0.24,0.09h-2c-0.18,0.01-0.32-0.13-0.33-0.31c0-0.01,0-0.01,0-0.02 v-2c-0.01-0.18,0.13-0.32,0.31-0.33c0.01,0,0.01,0,0.02,0h2c0.18-0.01,0.32,0.13,0.33,0.31c0,0.01,0,0.01,0,0.02v2 C13.33,17.09,13.3,17.18,13.24,17.24z M16,10c0,0.29-0.04,0.57-0.13,0.84c-0.07,0.22-0.17,0.43-0.29,0.63 c-0.13,0.19-0.28,0.36-0.46,0.5c-0.15,0.13-0.31,0.25-0.48,0.36l-0.51,0.3c-0.23,0.13-0.42,0.31-0.57,0.52 c-0.12,0.15-0.2,0.33-0.22,0.52c0.01,0.18-0.13,0.32-0.31,0.33c-0.01,0-0.02,0-0.03,0h-2c-0.18,0.01-0.32-0.13-0.33-0.31 c0-0.01,0-0.01,0-0.02v-0.38c0.01-0.48,0.21-0.94,0.54-1.29c0.33-0.38,0.74-0.69,1.2-0.9c0.27-0.11,0.51-0.27,0.71-0.47 c0.15-0.18,0.22-0.4,0.21-0.63c-0.02-0.26-0.17-0.49-0.39-0.61c-0.55-0.35-1.24-0.35-1.79,0c-0.34,0.29-0.64,0.63-0.9,1 c-0.06,0.08-0.16,0.12-0.26,0.12c-0.07,0.01-0.14-0.02-0.2-0.06l-1.37-1c-0.14-0.09-0.19-0.27-0.1-0.41 c0.01-0.01,0.01-0.02,0.02-0.03C9.11,7.6,10.6,6.74,12.2,6.79c1.25-0.02,2.44,0.54,3.22,1.51C15.8,8.79,16,9.38,16,10L16,10z M18.93,8c-0.7-1.21-1.71-2.22-2.93-2.92C14.79,4.37,13.41,3.99,12,4c-1.41-0.01-2.79,0.37-4,1.08C6.79,5.78,5.78,6.79,5.08,8 C4.37,9.21,3.99,10.59,4,12c-0.01,1.41,0.36,2.79,1.07,4c0.7,1.21,1.71,2.22,2.93,2.92c1.21,0.71,2.59,1.09,4,1.08 c1.41,0.01,2.79-0.36,4-1.07c1.21-0.7,2.22-1.71,2.92-2.93c0.71-1.21,1.09-2.59,1.08-4c0.01-1.41-0.37-2.79-1.08-4H18.93z" style="fill: rgb(163, 163, 163);" vector-effect="non-scaling-stroke"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
89
static/index.html
Normal file
89
static/index.html
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<h2>Setup your Pub</h2>
|
||||
<p class="header-title">
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<section class="setup-content">
|
||||
<div class="input-group">
|
||||
<span>Give this node a name that wallet users will see:</span>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Nodey McNodeFace"
|
||||
value=""
|
||||
style="width: 100%"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-group" style="margin-top: 38px">
|
||||
<span>If you want to use a specific Nostr relay, enter it now:</span>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="wss://relay.lightning.pub"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="checkbox" style="margin-top: 12px">
|
||||
<input type="checkbox" id="customCheckbox" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="customCheckbox">
|
||||
Use the default managed relay service and auto-pay 1000 sats
|
||||
per month to support developers
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="push-button"
|
||||
onclick="location.href='liquidity.html'"
|
||||
style="margin-top: 60px"
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text">
|
||||
<div>By proceeding you acknowledge that this is</div>
|
||||
<div>bleeding-edge software, and agree to the providers</div>
|
||||
<div>
|
||||
<span style="color: #c434e0">terms</span> regarding any services
|
||||
herein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
23
static/js/backup.js
Normal file
23
static/js/backup.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
$(() => {
|
||||
let backup; let manual_backup;
|
||||
$("#backup").click(() => {
|
||||
backup = $("#backup").prop("checked");
|
||||
$('#manual-backup').prop("checked",false);
|
||||
const nextButton = $("#next-button");
|
||||
if (backup) {
|
||||
nextButton.removeClass("hidden-button");
|
||||
} else {
|
||||
nextButton.addClass("hidden-button");
|
||||
}
|
||||
});
|
||||
$("#manual-backup").click(()=>{
|
||||
manual_backup = $('#manual-backup').prop("checked");
|
||||
$("#backup").prop("checked",false);
|
||||
const nextButton = $("#next-button");
|
||||
if(manual_backup) {
|
||||
nextButton.removeClass("hidden-button");
|
||||
} else {
|
||||
nextButton.addClass("hidden-button");
|
||||
};
|
||||
});
|
||||
});
|
||||
19
static/js/connect.js
Normal file
19
static/js/connect.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$(() => {
|
||||
$("#codebox").click(() => {
|
||||
const divText = $("#click-text").text();
|
||||
if(divText == "Click to copy"){
|
||||
var copytext = $("#qrcode")[0].title;
|
||||
var $temp = $("<textarea>");
|
||||
$("body").append($temp);
|
||||
$temp.val(copytext).select();
|
||||
document.execCommand("copy");
|
||||
$temp.remove();
|
||||
} else {
|
||||
$("#click-text").text("Click to copy");
|
||||
$("#qrcode").css({
|
||||
'filter': 'blur(0px)'
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
19
static/js/liquidity.js
Normal file
19
static/js/liquidity.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$(() => {
|
||||
$("#show-question").click(() => {
|
||||
$("#question-content").show();
|
||||
});
|
||||
|
||||
$("#close-question").click(() => {
|
||||
$("#question-content").hide();
|
||||
});
|
||||
|
||||
$("#automate").click(() => {
|
||||
$('[data-group="service"]').prop("checked", false);
|
||||
$("#automate").prop("checked", true);
|
||||
});
|
||||
|
||||
$("#manual").click(() => {
|
||||
$('[data-group="service"]').prop("checked", false);
|
||||
$("#manual").prop("checked", true);
|
||||
});
|
||||
});
|
||||
10
static/js/script.js
Normal file
10
static/js/script.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
$(document).ready(function() {
|
||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||
text: "strfry.shock.network npub123abcdefghhhhhhhhhhhhhhh",
|
||||
width: 157,
|
||||
height: 157,
|
||||
colorDark : "#000000",
|
||||
colorLight : "#ffffff",
|
||||
// correctLevel : QRCode.CorrectLevel.H
|
||||
});
|
||||
});
|
||||
19
static/js/seed.js
Normal file
19
static/js/seed.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
$(() => {
|
||||
$("#reveal-button").click(() => {
|
||||
$("#seed-box-container").removeClass("blur-filter");
|
||||
});
|
||||
|
||||
$("#seed-box-container").click(() => {
|
||||
$("#seed-box-container").removeClass("blur-filter");
|
||||
});
|
||||
|
||||
$('#copied').click(() => {
|
||||
const checked = $("#copied").prop('checked');
|
||||
const nextButton = $("#next-button");
|
||||
if (checked) {
|
||||
nextButton.removeClass("hidden-button");
|
||||
} else {
|
||||
nextButton.addClass("hidden-button");
|
||||
}
|
||||
})
|
||||
});
|
||||
49
static/js/status.js
Normal file
49
static/js/status.js
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
$(() => {
|
||||
$("#show-reset").click(() => {
|
||||
$("#reset-content").text('Reset the administrator account if you lost access via the Dashboard.');
|
||||
$("#reset-box").show();
|
||||
});
|
||||
$("#close-reset-box").click(() => {
|
||||
$("#reset-box").hide();
|
||||
});
|
||||
$("#show-nostr").click(() => {
|
||||
$("#reset-content").text("Changing the Nostr relay may cause some clients to lose connection. We'll make one last update to the old relay to tell clients about the new relay.");
|
||||
$("#reset-box").show();
|
||||
$('.continue-button').attr('id', 'set-show-nostr');
|
||||
});
|
||||
$("#show-nodey").click(() => {
|
||||
$('.show-nodey').show()
|
||||
$('#show-nodey-text').hide()
|
||||
$('input[name="show-nodey"]').focus();
|
||||
});
|
||||
$("#save-show-nodey").click(() => {
|
||||
var targetInputVal = $('input[name="show-nodey"]').val()
|
||||
$('#show-nodey-text').text(targetInputVal)
|
||||
$('.show-nodey').hide()
|
||||
$('#show-nodey-text').show()
|
||||
})
|
||||
$("#cancel-show-nodey").click(() => {
|
||||
$('.show-nodey').hide()
|
||||
$('#show-nodey-text').show()
|
||||
})
|
||||
$(".continue-button").click((e) => {
|
||||
if($(".continue-button").prop('id') !== "set-show-nostr") {
|
||||
return
|
||||
}
|
||||
$('.continue-button').attr('id', '');
|
||||
$("#reset-box").hide();
|
||||
$('.show-nostr').show()
|
||||
$('#show-nostr-text').hide()
|
||||
$('input[name="show-nostr"]').focus();
|
||||
});
|
||||
$("#save-show-nostr").click(() => {
|
||||
var targetInputVal = $('input[name="show-nostr"]').val()
|
||||
$('#show-nostr-text').text(targetInputVal)
|
||||
$('.show-nostr').hide()
|
||||
$('#show-nostr-text').show()
|
||||
})
|
||||
$("#cancel-show-nostr").click(() => {
|
||||
$('.show-nostr').hide()
|
||||
$('#show-nostr-text').show()
|
||||
})
|
||||
});
|
||||
93
static/liquidity.html
Normal file
93
static/liquidity.html
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<link rel="stylesheet" href="css/liquidity.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<button class="icon-button back-button" onclick="history.back()">
|
||||
<img src="img/back.svg" alt="" />
|
||||
</button>
|
||||
<h2>Manage Node Liquidity</h2>
|
||||
<p class="header-title">
|
||||
How do you want to manage Lightning channels?
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<section class="setup-content">
|
||||
<div class="checkbox" style="margin-top: 60px">
|
||||
<input type="checkbox" id="automate" data-group="service" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="automate" class="automate">
|
||||
Use Automation Service
|
||||
<div class="question-box">
|
||||
<button class="icon-button" id="show-question">
|
||||
<img src="img/question.svg" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="question-content" id="question-content">
|
||||
Automation helps reduce the fees you pay by trusting peers temporarily until your node balance is sufficient to open a balanced Lightning channel.
|
||||
<button class="icon-button close-button" id="close-question">
|
||||
<img src="img/close.svg" alt="" />
|
||||
</button>
|
||||
<a href="https://docs.shock.network/" target="_blank" class="marked question-more">Learn More</a>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox" style="margin-top: 30px">
|
||||
<input type="checkbox" id="manual" data-group="service" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="manual">Manage my channels manually</label>
|
||||
</div>
|
||||
<button
|
||||
class="push-button"
|
||||
onclick="location.href='backup.html'"
|
||||
style="margin-top: 60px"
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text">
|
||||
<div>By proceeding you acknowledge that this is</div>
|
||||
<div>bleeding-edge software, and agree to the providers</div>
|
||||
<div>
|
||||
<span style="color: #c434e0">terms</span> regarding any services
|
||||
herein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
|
||||
<script src="js/liquidity.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
180
static/seed.html
Normal file
180
static/seed.html
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<link rel="stylesheet" href="css/seed.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<button class="icon-button back-button" onclick="history.back()">
|
||||
<img src="img/back.svg" alt="" />
|
||||
</button>
|
||||
<h2>Seed Phrase</h2>
|
||||
<p class="header-title">
|
||||
Store your seed phrase somewhere safe, you will need it if something ever goes wrong with your node hard drive.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<section class="setup-content">
|
||||
<div class="seed-box-container blur-filter" id="seed-box-container">
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
<div class="seed-box">
|
||||
<span>1</span>
|
||||
<span>albert</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="reveal-button" id="reveal-button">Click To Reveal</button>
|
||||
|
||||
<div class="checkbox-container">
|
||||
<div class="checkbox" style="margin-top: 12px">
|
||||
<input type="checkbox" id="copied" />
|
||||
<div class="checkbox-shape"></div>
|
||||
<label for="copied">
|
||||
I have copied this somewhere safe
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
id="next-button"
|
||||
class="push-button hidden-button"
|
||||
onclick="location.href='connect.html'"
|
||||
style="margin-top: 60px"
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text">
|
||||
<div>By proceeding you acknowledge that this is</div>
|
||||
<div>bleeding-edge software, and agree to the providers</div>
|
||||
<div>
|
||||
<span style="color: #c434e0">terms</span> regarding any services
|
||||
herein.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
|
||||
<script src="js/seed.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
148
static/stauts.html
Normal file
148
static/stauts.html
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title></title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Montserrat"
|
||||
/>
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
<link rel="stylesheet" href="css/status.css" />
|
||||
<!-- HTML Meta Tags -->
|
||||
<title>Lightning.Pub</title>
|
||||
<meta name="description" content="Lightning for Everyone" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<img
|
||||
src="img/pub_logo.png"
|
||||
width="38px"
|
||||
height="auto"
|
||||
alt="Lightning Pub logo"
|
||||
/>
|
||||
<img src="img/LightningPub.png" height="33px" alt="Lightning Pub logo" />
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="setup-header">
|
||||
<h2>Node Status</h2>
|
||||
<p class="header-title"></p>
|
||||
</section>
|
||||
|
||||
<div class="line" style="width: 100%;"></div>
|
||||
|
||||
<section class="node-status">
|
||||
<div>
|
||||
<div class="status-element" style="margin-top: 15px;">
|
||||
<div style="text-align: left;">Public Node Name:</div>
|
||||
<div class="fc-grey editable-content">
|
||||
<div class="show-nodey" style="display: flex; flex-direction: column; display: none;">
|
||||
<input type="text" value="" name="show-nodey" placeholder="Nodey McNodeFace" />
|
||||
<div style="display: flex;justify-content: end;">
|
||||
<button class="small-btn" id="cancel-show-nodey">Cancel</button>
|
||||
<button class="small-btn" id="save-show-nodey">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="show-nodey-text">Nodey McNodeFace</div>
|
||||
<div class="question-box">
|
||||
<button class="icon-button" id="show-nodey">
|
||||
<img src="img/pencil.svg" style="cursor: pointer;" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-element" style="margin-top: 15px;">
|
||||
<div style="text-align: left;">Nostr Relay:</div>
|
||||
<div class="fc-grey editable-content">
|
||||
<div class="show-nostr" style="display: flex; flex-direction: column; display: none;">
|
||||
<input type="text" value="" name="show-nostr" placeholder="wss://relay.lightning.pub" />
|
||||
<div style="display: flex;justify-content: end;">
|
||||
<button class="small-btn" id="cancel-show-nostr">Cancel</button>
|
||||
<button class="small-btn" id="save-show-nostr">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="show-nostr-text">wss://relay.lightning.pub</div>
|
||||
<div class="question-box">
|
||||
<button class="icon-button" id="show-nostr">
|
||||
<img src="img/pencil.svg" style="cursor: pointer;" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-element" style="margin-top: 15px;">
|
||||
<div>Administrator:</div>
|
||||
<div>
|
||||
npub12334556677889990
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: end;padding-right: 12px;">
|
||||
<div class="marked" id="show-reset" style="text-decoration: underline; margin-top: 5px;position: relative;">Reset
|
||||
<div class="watchdog-status">
|
||||
<button class="icon-button" id="show-question">
|
||||
<img src="img/question.svg" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="reset-box">
|
||||
<div style="width: 100%;height: 100%;position: relative;">
|
||||
<button class="icon-button close-button" id="close-reset-box">
|
||||
<img src="img/close.svg" alt="">
|
||||
</button>
|
||||
<div class="reset-box-content" id="reset-content">
|
||||
</div>
|
||||
<div class="continue-button-container">
|
||||
<div class="continue-button" id="">Continue</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 40px;">
|
||||
<div class="status-element">
|
||||
<div>Relay Status:</div>
|
||||
<div>
|
||||
<span class="green-dot">●</span> Connected
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-element">
|
||||
<div>Lightning Status:</div>
|
||||
<div>
|
||||
<span class="yellow-dot">●</span> Syncing
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-element">
|
||||
<div style="position: relative;">
|
||||
Watchdog Status:
|
||||
<div class="watchdog-status">
|
||||
<button class="icon-button" id="show-question">
|
||||
<img src="img/question.svg" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span class="green-dot">●</span> No Alarms
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px;">
|
||||
<div style="font-size: 13px; text-align: left;">Guest Invitation Link:</div>
|
||||
<a href="https://my.shockwallet.app/invite/nprofile12345678899988" target="_blank" style="font-size: 11px;" class="invite-link">
|
||||
https://my.shockwallet.app/invite/nprofile12345678899988
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-text" style="width: 80%">
|
||||
<div class="line"></div>
|
||||
<a href="https://docs.shock.network" class="marked need-help">Need Help?</a>
|
||||
</footer>
|
||||
|
||||
<script src="js/status.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue